1||l==0||v.content.size)&&(f=b,u.push(Mg(v.mark(h.allowedMarks(v.marks)),c==1?l:0,c==a.childCount?p:-1)))}let g=c==a.childCount;g||(p=-1),this.placed=gs(this.placed,n,K.from(u)),this.frontier[n].match=f,g&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,b=a;v1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n=0;a--){let{match:l,type:c}=this.frontier[a],u=$u(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=gs(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=gs(this.placed,this.depth,K.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(K.empty,!0);n.childCount&&(this.placed=gs(this.placed,this.frontier.length,n))}}function ms(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ms(e.firstChild.content,t-1,n)))}function gs(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(gs(e.lastChild.content,t-1,n)))}function Iu(e,t){for(let n=0;n1&&(r=r.replaceChild(0,Mg(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(K.empty,!0)))),e.copy(r)}function $u(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!O8(n,o.content,s)?a:null}function O8(e,t,n){for(let r=n;r0;h--,p--){let g=i.node(h).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;s.indexOf(h)>-1?a=h:i.before(h)==p&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],u=r.openStart;for(let h=r.content,p=0;;p++){let g=h.firstChild;if(c.push(g),p==r.openStart)break;h=g.content}for(let h=u-1;h>=0;h--){let p=c[h].type,g=T8(p);if(g&&i.node(l).type!=p)u=h;else if(g||!p.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+u+1)%(r.openStart+1),g=c[p];if(!!g)for(let v=0;v=0&&(e.replace(t,n,r),!(e.steps.length>f));h--){let p=s[h];p<0||(t=i.before(p),n=o.after(p))}}function Ag(e,t,n,r,i){if(tr){let o=i.contentMatchAt(0),s=o.fillBefore(e).append(e);e=s.append(o.matchFragment(s).fillBefore(K.empty,!0))}return e}function R8(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=A8(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new re(K.from(r),0,0))}function j8(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),o=Eg(r,i);for(let s=0;s0&&(l||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return e.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s)return e.delete(r.before(s),n);e.delete(t,n)}function Eg(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let o=e.start(i);if(ot.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(o==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==o-1)&&n.push(i)}return n}class eo extends Ut{constructor(t,n,r){super();this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return mt.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return mt.fromReplace(t,this.pos,this.pos+1,new re(K.from(i),0,n.isLeaf?0:1))}getMap(){return pn.empty}invert(t){return new eo(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new eo(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new eo(n.pos,n.attr,n.value)}}Ut.jsonID("attr",eo);let to=class extends Error{};to=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};to.prototype=Object.create(Error.prototype);to.prototype.constructor=to;to.prototype.name="TransformError";class Og{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Xi}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new to(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=re.empty){let i=Du(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new re(K.from(r),0,0))}delete(t,n){return this.replace(t,n,re.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return P8(this,t,n,r),this}replaceRangeWith(t,n,r){return R8(this,t,n,r),this}deleteRange(t,n){return j8(this,t,n),this}lift(t,n){return v8(this,t,n),this}join(t,n=1){return M8(this,t,n),this}wrap(t,n){return x8(this,t,n),this}setBlockType(t,n=t,r,i=null){return k8(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return C8(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new eo(t,n,r)),this}addNodeMark(t,n){return this.step(new br(t,n)),this}removeNodeMark(t,n){if(!(n instanceof nt)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Qi(t,n)),this}split(t,n=1,r){return _8(this,t,n,r),this}addMark(t,n,r){return p8(this,t,n,r),this}removeMark(t,n,r){return m8(this,t,n,r),this}clearIncompatible(t,n,r){return g8(this,t,n,r),this}}const Bu=Object.create(null);class Se{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Tg(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;o--){let s=n<0?no(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):no(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new en(t.node(0))}static atStart(t){return no(t,t,0,0,1)||new en(t)}static atEnd(t){return no(t,t,t.content.size,t.childCount,-1)||new en(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Bu[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Bu)throw new RangeError("Duplicate use of selection JSON ID "+t);return Bu[t]=n,n.prototype.jsonID=t,n}getBookmark(){return ke.between(this.$anchor,this.$head).getBookmark()}}Se.prototype.visible=!0;class Tg{constructor(t,n){this.$from=t,this.$to=n}}let Pg=!1;function Rg(e){!Pg&&!e.parent.inlineContent&&(Pg=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ke extends Se{constructor(t,n=t){Rg(t),Rg(n);super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Se.near(r);let i=t.resolve(n.map(this.anchor));return new ke(i.parent.inlineContent?i:r,r)}replace(t,n=re.empty){if(super.replace(t,n),n==re.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof ke&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Fa(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ke(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=Se.findFrom(n,r,!0)||Se.findFrom(n,-r,!0);if(o)n=o.$head;else return Se.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(Se.findFrom(t,-r,!0)||Se.findFrom(t,r,!0)).$anchor,t.pos0?0:1);i>0?s=0;s+=i){let a=t.child(s);if(a.isAtom){if(!o&&be.isSelectable(a))return be.create(e,n-(i<0?a.nodeSize:0))}else{let l=no(e,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function jg(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=u)}),e.setSelection(Se.near(e.doc.resolve(s),n))}function Ng(e,t){return!t||!e?e:e.bind(t)}class Va{constructor(t,n,r){this.name=t,this.init=Ng(n.init,r),this.apply=Ng(n.apply,r)}}const TP=[new Va("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Va("selection",{init(e,t){return e.selection||Se.atStart(t.doc)},apply(e){return e.selection}}),new Va("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Va("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];function Lg(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=Lg(i,t,{})),n[r]=i}return n}class gt{constructor(t){this.spec=t,this.props={},t.props&&Lg(t.props,this,this.props),this.key=t.key?t.key.key:Dg("plugin")}getState(t){return t[this.key]}}const zu=Object.create(null);function Dg(e){return e in zu?e+"$"+ ++zu[e]:(zu[e]=0,e+"$")}class yt{constructor(t="key"){this.key=Dg(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const ys=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t};const Ig=function(e,t,n,r){return n&&($g(e,t,n,r,-1)||$g(e,t,n,r,1))},L8=/^(img|br|input|textarea|hr)$/i;function $g(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Wa(e))){let o=e.parentNode;if(!o||o.nodeType!=1||I8(e)||L8.test(e.nodeName)||e.contentEditable=="false")return!1;t=ys(e)+(i<0?0:1),e=o}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?Wa(e):0}else return!1}}function Wa(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function D8(e,t,n){for(let r=t==0,i=t==Wa(e);r||i;){if(e==n)return!0;let o=ys(e);if(e=e.parentNode,!e)return!1;r=r&&o==0,i=i&&o==Wa(e)}}function I8(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Bg=function(e){return e.focusNode&&Ig(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Hg(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const xr=typeof navigator!="undefined"?navigator:null,zg=typeof document!="undefined"?document:null,kr=xr&&xr.userAgent||"",Fu=/Edge\/(\d+)/.exec(kr),Fg=/MSIE \d/.exec(kr),Vu=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(kr),ro=!!(Fg||Vu||Fu),Wu=Fg?document.documentMode:Vu?+Vu[1]:Fu?+Fu[1]:0,Ua=!ro&&/gecko\/(\d+)/i.test(kr);Ua&&+(/Firefox\/(\d+)/.exec(kr)||[0,0])[1];const Uu=!ro&&/Chrome\/(\d+)/.exec(kr),io=!!Uu,$8=Uu?+Uu[1]:0,ui=!ro&&!!xr&&/Apple Computer/.test(xr.vendor),Ku=ui&&(/Mobile\/\w+/.test(kr)||!!xr&&xr.maxTouchPoints>2),mn=Ku||(xr?/Mac/.test(xr.platform):!1),vs=/Android \d/.test(kr),qu=!!zg&&"webkitFontSmoothing"in zg.documentElement.style,B8=qu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;const Vg=function(e){e&&(this.nodeName=e)};Vg.prototype=Object.create(null);const PP=[new Vg];function H8(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,c;if(Bg(n)){for(l=a;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&be.isSelectable(u)&&i.parent&&!(u.isInline&&D8(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;c=new be(s==f?a:r.resolve(f))}}else{let u=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null;l=r.resolve(u)}if(!c){let u=t=="pointer"||e.state.selection.head{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!Wg(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function F8(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setEnd(r.parentNode,ys(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&ro&&Wu<=11&&(r.disabled=!0,r.disabled=!1)}function V8(e,t){if(t instanceof be){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Jg(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Jg(e)}function Jg(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Gg(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||ke.between(t,n,r)}function W8(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Yu(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&Se.findFrom(o,t)}function di(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Yg(e,t,n){let r=e.state.selection;if(r instanceof ke){if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let i=Yu(e.state,t);return i&&i instanceof be?di(e,i):!1}else if(!(mn&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let a=t<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?be.isSelectable(o)?di(e,new be(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):qu?di(e,new ke(e.state.doc.resolve(t<0?a:a+o.nodeSize))):!1:!1}}else{if(r instanceof be&&r.node.isInline)return di(e,new ke(t>0?r.$to:r.$from));{let i=Yu(e.state,t);return i?di(e,i):!1}}}function Ka(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function bs(e){let t=e.pmViewDesc;return t&&t.size==0&&(e.nextSibling||e.nodeName!="BR")}function Xu(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(Ua&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(bs(a))i=n,o=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(Xg(n))break;{let a=n.previousSibling;for(;a&&bs(a);)i=n.parentNode,o=ys(a),a=a.previousSibling;if(a)n=a,r=Ka(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Zu(e,n,r):i&&Zu(e,i,o)}function Qu(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Ka(n),o,s;for(;;)if(r{e.state==i&&Ju(e)},50)}function Qg(e,t,n){let r=e.state.selection;if(r instanceof ke&&!r.empty||n.indexOf("s")>-1||mn&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Yu(e.state,t);if(s&&s instanceof be)return di(e,s)}if(!i.parent.inlineContent){let s=t<0?i:o,a=r instanceof en?Se.near(s,t):Se.findFrom(s,t);return a?di(e,a):!1}return!1}function Zg(e,t){if(!(e.state.selection instanceof ke))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=e.state.tr;return t<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),e.dispatch(s),!0}return!1}function e1(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function U8(e){if(!ui||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;e1(e,r,"true"),setTimeout(()=>e1(e,r,"false"),20)}return!1}function K8(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function q8(e,t){let n=t.keyCode,r=K8(t);return n==8||mn&&n==72&&r=="c"?Zg(e,-1)||Xu(e):n==46||mn&&n==68&&r=="c"?Zg(e,1)||Qu(e):n==13||n==27?!0:n==37||mn&&n==66&&r=="c"?Yg(e,-1,r)||Xu(e):n==39||mn&&n==70&&r=="c"?Yg(e,1,r)||Qu(e):n==38||mn&&n==80&&r=="c"?Qg(e,-1,r)||Xu(e):n==40||mn&&n==78&&r=="c"?U8(e)||Qg(e,1,r)||Qu(e):r==(mn?"m":"c")&&(n==66||n==73||n==89||n==90)}function t1(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||ci.fromSchema(e.state.schema),a=c1(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c=l.firstChild,u,f=0;for(;c&&c.nodeType==1&&(u=a1[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let g=a.createElement(u[p]);for(;l.firstChild;)g.appendChild(l.firstChild);l.appendChild(g),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
+
+`);return{dom:l,text:h}}function n1(e,t,n,r,i){let o=i.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=t&&(r||o||!n);if(l){if(e.someProp("transformPastedText",h=>{t=h(t,o||r,e)}),o)return t?new re(K.from(e.state.schema.text(t.replace(/\r\n?/g,`
+`))),0,0):re.empty;let f=e.someProp("clipboardTextParser",h=>h(t,i,r,e));if(f)a=f;else{let h=i.marks(),{schema:p}=e.state,g=ci.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(v=>{let b=s.appendChild(document.createElement("p"));v&&b.appendChild(g.serializeNode(p.text(v,h)))})}}else e.someProp("transformPastedHTML",f=>{n=f(n,e)}),s=Y8(n),qu&&X8(s);let c=s&&s.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||hs.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||u),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!J8.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=Q8(s1(a,+u[1],+u[2]),u[4]);else if(a=re.maxOpen(G8(a.content,i),!0),a.openStart||a.openEnd){let f=0,h=0;for(let p=a.content.firstChild;f{a=f(a,e)}),a}const J8=/^(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 G8(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),o,s=[];if(e.forEach(a=>{if(!s)return;let l=i.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&o.length&&i1(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=o1(s[s.length-1],o.length));let u=r1(a,l);s.push(u),i=i.matchType(u.type),o=l}}),s)return K.from(s)}return e}function r1(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,K.from(e));return e}function i1(e,t,n,r,i){if(i=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(K.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function s1(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=c1().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&a1[r[1].toLowerCase()])&&(e=i.map(o=>"<"+o+">").join("")+e+i.map(o=>""+o+">").reverse().join("")),n.innerHTML=e,i)for(let o=0;o=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=K.from(l.create(r[a+1],i)),o++,s++}return new re(i,o,s)}const On={},tn={};function Sr(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}tn.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!d1(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(vs&&io&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Ku&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,Hg(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||q8(e,n)?n.preventDefault():Sr(e,"key")};tn.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};tn.keypress=(e,t)=>{let n=t;if(d1(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||mn&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof ke)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",o=>o(e,r.$from.pos,r.$to.pos,i))&&e.dispatch(e.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function qa(e){return{left:e.clientX,top:e.clientY}}function Z8(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function td(e,t,n,r,i){if(r==-1)return!1;let o=e.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(e.someProp(t,a=>s>o.depth?a(e,n,o.nodeAfter,o.before(s),i,!0):a(e,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function oo(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function eS(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&be.isSelectable(r)?(oo(e,new be(n),"pointer"),!0):!1}function tS(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof be&&(r=n.node);let o=e.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(be.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(s);break}}return i!=null?(oo(e,be.create(e.state.doc,i),"pointer"),!0):!1}function nS(e,t,n,r,i){return td(e,"handleClickOn",t,n,r)||e.someProp("handleClick",o=>o(e,t,r))||(i?tS(e,n):eS(e,n))}function rS(e,t,n,r){return td(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function iS(e,t,n,r){return td(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||oS(e,n,r)}function oS(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(oo(e,ke.create(r,0,r.content.size),"pointer"),!0):!1;let i=r.resolve(t);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)oo(e,ke.create(r,a+1,a+1+s.content.size),"pointer");else if(be.isSelectable(s))oo(e,be.create(r,a),"pointer");else continue;return!0}}function nd(e){return Ja(e)}const u1=mn?"metaKey":"ctrlKey";On.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=nd(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&Z8(n,e.input.lastClick)&&!n[u1]&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(qa(n));!s||(o=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new sS(e,s,n,!!r)):(o=="doubleClick"?rS:iS)(e,s.pos,s.inside,n)?n.preventDefault():Sr(e,"pointer"))};class sS{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[u1],this.allowDefault=r.shiftKey;let o,s;if(n.inside>-1)o=t.state.doc.nodeAt(n.inside),s=n.inside;else{let u=t.state.doc.resolve(n.pos);o=u.parent,s=u.depth?u.before():0}const a=i?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof be&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ua&&!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()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Sr(t,"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(()=>Ju(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(qa(t))),this.updateAllowDefault(t),this.allowDefault||!n?Sr(this.view,"pointer"):nS(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||ui&&this.mightDrag&&!this.mightDrag.node.isAtom||io&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(oo(this.view,Se.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Sr(this.view,"pointer")}move(t){this.updateAllowDefault(t),Sr(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}On.touchstart=e=>{e.input.lastTouch=Date.now(),nd(e),Sr(e,"pointer")};On.touchmove=e=>{e.input.lastTouch=Date.now(),Sr(e,"pointer")};On.contextmenu=e=>nd(e);function d1(e,t){return e.composing?!0:ui&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const aS=vs?5e3:-1;tn.compositionstart=tn.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Ja(e,!0),e.markCursor=null;else if(Ja(e),Ua&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){e.domSelection().collapse(s,s.nodeValue.length);break}else i=s,o=-1}}e.input.composing=!0}f1(e,aS)};tn.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,f1(e,20))};function f1(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Ja(e),t))}function lS(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=cS());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function cS(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Ja(e,t=!1){if(!(vs&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),lS(e),t||e.docView&&e.docView.dirty){let n=H8(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function uS(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const so=ro&&Wu<15||Ku&&B8<604;On.copy=tn.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let o=so?null:n.clipboardData,s=r.content(),{dom:a,text:l}=t1(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):uS(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function dS(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function fS(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?rd(e,r.value,null,e.input.shiftKey,t):rd(e,r.textContent,r.innerHTML,e.input.shiftKey,t)},50)}function rd(e,t,n,r,i){let o=n1(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,o||re.empty)))return!0;if(!o)return!1;let s=dS(o),a=s?e.state.tr.replaceSelectionWith(s,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}tn.paste=(e,t)=>{let n=t;if(e.composing&&!vs)return;let r=so?null:n.clipboardData;r&&rd(e,r.getData("text/plain"),r.getData("text/html"),e.input.shiftKey,n)?n.preventDefault():fS(e,n)};class hS{constructor(t,n){this.slice=t,this.move=n}}const h1=mn?"altKey":"ctrlKey";On.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(qa(n));if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof be?i.to-1:i.to))){if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(be.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let c=e.docView.nearestDesc(n.target,!0);c&&c.node.type.spec.draggable&&c!=e.docView&&e.dispatch(e.state.tr.setSelection(be.create(e.state.doc,c.posBefore)))}}let s=e.state.selection.content(),{dom:a,text:l}=t1(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(so?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",so||n.dataTransfer.setData("text/plain",l),e.dragging=new hS(s,!n[h1])};On.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};tn.dragover=tn.dragenter=(e,t)=>t.preventDefault();tn.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(qa(n));if(!i)return;let o=e.state.doc.resolve(i.pos),s=r&&r.slice;s?e.someProp("transformPasted",g=>{s=g(s,e)}):s=n1(e,n.dataTransfer.getData(so?"Text":"text/plain"),so?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(r&&!n[h1]);if(e.someProp("handleDrop",g=>g(e,n,s||re.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let l=s?Cg(e.state.doc,o.pos,s):o.pos;l==null&&(l=o.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=c.doc;if(f?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let p=c.doc.resolve(u);if(f&&be.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new be(p));else{let g=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((v,b,w,k)=>g=k),c.setSelection(Gg(e,p,c.doc.resolve(g)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};On.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Ju(e)},20))};On.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};On.beforeinput=(e,t)=>{if(io&&vs&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",o=>o(e,Hg(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in tn)On[e]=tn[e];function ws(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class id{constructor(t,n){this.toDOM=t,this.spec=n||fi,this.side=this.spec.side||0}map(t,n,r,i){let{pos:o,deleted:s}=t.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Kt(o-r,o-r,this)}valid(){return!0}eq(t){return this==t||t instanceof id&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ws(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Cr{constructor(t,n){this.attrs=t,this.spec=n||fi}map(t,n,r,i){let o=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Kt(o,s,this)}valid(t,n){return n.from=t&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,i+a,o)}}map(t,n,r){return this==Bt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||fi)}mapInner(t,n,r,i,o){let s;for(let a=0;a{let c=l+r,u;if(!!(u=m1(n,a,c))){for(i||(i=this.children.slice());oa&&f.to=t){this.children[a]==t&&(r=this.children[a+2]);break}let o=t+1,s=o+n.content.size;for(let a=0;ao&&l.type instanceof Cr){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;ci.map(t,n,fi));return hi.from(r)}forChild(t,n){if(n.isLeaf)return Qe.empty;let r=[];for(let i=0;in instanceof Qe)?t:t.reduce((n,r)=>n.concat(r instanceof Qe?r:r.members),[]))}}}function pS(e,t,n,r,i,o,s){let a=e.slice();for(let c=0,u=o;c{let b=v-g-(p-h);for(let w=0;wk+u-f)continue;let A=a[w]+u-f;p>=A?a[w+1]=h<=A?-2:-1:g>=i&&b&&(a[w]+=b,a[w+1]+=b)}f+=b}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c=r.content.size){l=!0;continue}let h=n.map(e[c+1]+o,-1),p=h-i,{index:g,offset:v}=r.content.findIndex(f),b=r.maybeChild(g);if(b&&v==f&&v+b.nodeSize==p){let w=a[c+2].mapInner(n,b,u+1,e[c]+o+1,s);w!=Bt?(a[c]=f,a[c+1]=p,a[c+2]=w):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=mS(a,e,t,n,i,o,s),u=Ga(c,r,0,s);t=u.local;for(let f=0;fn&&s.to{let c=m1(e,a,l+n);if(c){o=!0;let u=Ga(c,a,n+l+1,r);u!=Bt&&i.push(l,l+a.nodeSize,u)}});let s=p1(o?g1(e):e,-n).sort(pi);for(let a=0;a0;)t++;e.splice(t,0,n)}const RP=ro&&Wu<=11;let jP=new WeakMap;var _r={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:"'"},Ya={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},v1=typeof navigator!="undefined"&&/Chrome\/(\d+)/.exec(navigator.userAgent);typeof navigator!="undefined"&&/Gecko\/\d+/.test(navigator.userAgent);var gS=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),yS=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),vS=gS||v1&&+v1[1]<57;for(var Ot=0;Ot<10;Ot++)_r[48+Ot]=_r[96+Ot]=String(Ot);for(var Ot=1;Ot<=24;Ot++)_r[Ot+111]="F"+Ot;for(var Ot=65;Ot<=90;Ot++)_r[Ot]=String.fromCharCode(Ot+32),Ya[Ot]=String.fromCharCode(Ot);for(var ad in _r)Ya.hasOwnProperty(ad)||(Ya[ad]=_r[ad]);function bS(e){var t=vS&&(e.ctrlKey||e.altKey||e.metaKey)||yS&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Ya:_r)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const wS=typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function xS(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,o,s;for(let a=0;a127)&&(o=_r[r.keyCode])&&o!=i){let a=t[ld(o,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const cd=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function SS(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const w1=(e,t,n)=>{let r=SS(e,n);if(!r)return!1;let i=k1(r);if(!i){let s=r.blockRange(),a=s&&Zi(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&T1(e,i,t))return!0;if(r.parent.content.size==0&&(lo(o,"end")||be.isSelectable(o))){let s=Du(e.doc,r.before(),r.after(),re.empty);if(s&&s.slice.size{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=k1(r)}let s=o&&o.nodeBefore;return!s||!be.isSelectable(s)?!1:(t&&t(e.tr.setSelection(be.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function k1(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function CS(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=CS(e,n);if(!r)return!1;let i=_1(r);if(!i)return!1;let o=i.nodeAfter;if(T1(e,i,t))return!0;if(r.parent.content.size==0&&(lo(o,"start")||be.isSelectable(o))){let s=Du(e.doc,r.before(),r.after(),re.empty);if(s&&s.slice.size{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof be,i;if(r){if(n.node.isTextblock||!wr(e.doc,n.from))return!1;i=n.from}else if(i=za(e.doc,n.from,-1),i==null)return!1;if(t){let o=e.tr.join(i);r&&o.setSelection(be.create(o.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0},MS=(e,t)=>{let n=e.selection,r;if(n instanceof be){if(n.node.isTextblock||!wr(e.doc,n.to))return!1;r=n.to}else if(r=za(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},AS=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),o=i&&Zi(i);return o==null?!1:(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},M1=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
+`).scrollIntoView()),!0)};function ud(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=ud(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(Se.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},E1=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof en||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=ud(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(tr(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Zi(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function ES(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof be&&t.selection.node.isBlock)return!r.parentOffset||!tr(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let o=i.parentOffset==i.parent.content.size,s=t.tr;(t.selection instanceof ke||t.selection instanceof en)&&s.deleteSelection();let a=r.depth==0?null:ud(r.node(-1).contentMatchAt(r.indexAfter(-1))),l=e&&e(i.parent,o),c=l?[l]:o&&a?[{type:a}]:void 0,u=tr(s.doc,s.mapping.map(r.pos),1,c);if(!c&&!u&&tr(s.doc,s.mapping.map(r.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(s.split(s.mapping.map(r.pos),1,c),!o&&!r.parentOffset&&r.parent.type!=a)){let f=s.mapping.map(r.before()),h=s.doc.resolve(f);a&&r.node(-1).canReplaceWith(h.index(),h.index()+1,a)&&s.setNodeMarkup(s.mapping.map(r.before()),a)}n(s.scrollIntoView())}return!0}}const OS=ES(),TS=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),t&&t(e.tr.setSelection(be.create(e.doc,i))),!0)},PS=(e,t)=>(t&&t(e.tr.setSelection(new en(e.doc))),!0);function RS(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||wr(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function T1(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o,s;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(RS(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(o=(s=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(n){let f=t.pos+i.nodeSize,h=K.empty;for(let v=o.length-1;v>=0;v--)h=K.from(o[v].create(null,h));h=K.from(r.copy(h));let p=e.tr.step(new _t(t.pos-1,f,t.pos,f,new re(h,1,0),o.length,!0)),g=f+2*o.length;wr(p.doc,g)&&p.join(g),n(p.scrollIntoView())}return!0}let l=Se.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&Zi(c);if(u!=null&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&lo(i,"start",!0)&&lo(r,"end")){let f=r,h=[];for(;h.push(f),!f.isTextblock;)f=f.lastChild;let p=i,g=1;for(;!p.isTextblock;p=p.firstChild)g++;if(f.canReplace(f.childCount,f.childCount,p.content)){if(n){let v=K.empty;for(let w=h.length-1;w>=0;w--)v=K.from(h[w].copy(v));let b=e.tr.step(new _t(t.pos-h.length,t.pos+i.nodeSize,t.pos+g,t.pos+i.nodeSize-g,new re(v,h.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function P1(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(t.tr.setSelection(ke.create(t.doc,e<0?i.start(o):i.end(o)))),!0):!1}}const R1=P1(-1),j1=P1(1);function jS(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&Lu(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function N1(e,t=null){return function(n,r){let i=!1;for(let o=0;o{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let u=n.doc.resolve(c),f=u.index();i=u.parent.canReplaceWith(f,f+1,e)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s=2&&i.node(s.depth-1).type.compatibleContent(e)&&s.startIndex==0){if(i.index(s.depth-1)==0)return!1;let u=n.doc.resolve(s.start-2);l=new La(u,u,s.depth),s.endIndex=0;u--)o=K.from(n[u].type.create(n[u].attrs,o));e.step(new _t(t.start-(r?2:0),t.end,t.start,t.end,new re(o,0,0),n.length,!0));let s=0;for(let u=0;us.childCount>0&&s.firstChild.type==e);return o?n?r.node(o.depth-1).type==e?$S(t,n,e,o):BS(t,n,o):!0:!1}}function $S(e,t,n,r){let i=e.tr,o=r.end,s=r.$to.end(r.depth);ov;g--)p-=i.child(g).nodeSize,r.delete(p-1,p+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?K.empty:K.from(i))))return!1;let f=o.pos,h=f+s.nodeSize;return r.step(new _t(f-(a?1:0),h+(l?1:0),f+1,h-1,new re((a?K.empty:K.from(i.copy(K.empty))).append(l?K.empty:K.from(i.copy(K.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}function HS(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==e);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=K.from(c?e.create():null),f=new re(K.from(e.create(null,K.from(a.type.create(null,u)))),c?3:1,0),h=o.start,p=o.end;n(t.tr.step(new _t(h-(c?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}function D1(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return Me(J({},t),{apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}})}class zS{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:i}=n,{tr:o}=r,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>{const f=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a=[],l=!!t,c=t||o.tr,u=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(h=>h===!0)),f=Me(J({},Object.fromEntries(Object.entries(r).map(([h,p])=>[h,(...v)=>{const b=this.buildProps(c,n),w=p(...v)(b);return a.push(w),f}]))),{run:u});return f}createCan(t){const{rawCommands:n,state:r}=this,i=!1,o=t||r.tr,s=this.buildProps(o,i),a=Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)(Me(J({},s),{dispatch:void 0}))]));return Me(J({},a),{chain:()=>this.createChain(o,i)})}buildProps(t,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a={tr:t,editor:i,view:s,state:D1({state:o,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}function ut(e,t,n){return e.config[t]===void 0&&e.parent?ut(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind(Me(J({},n),{parent:e.parent?ut(e.parent,t,n):null})):e.config[t]}function FS(e){const t=e.filter(i=>i.type==="extension"),n=e.filter(i=>i.type==="node"),r=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function Tt(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Ue(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r=J({},t);return Object.entries(n).forEach(([i,o])=>{if(!r[i]){r[i]=o;return}if(i==="class"){const a=o?o.split(" "):[],l=r[i]?r[i].split(" "):[],c=a.filter(u=>!l.includes(u));r[i]=[...l,...c].join(" ")}else i==="style"?r[i]=[r[i],o].join("; "):r[i]=o}),r},{})}function VS(e){return typeof e=="function"}function Ze(e,t=void 0,...n){return VS(e)?t?e.bind(t)(...n):e(...n):e}function WS(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class xs{constructor(t){this.find=t.find,this.handler=t.handler}}class US{constructor(t){this.find=t.find,this.handler=t.handler}}function KS(e){return Object.prototype.toString.call(e).slice(8,-1)}function hd(e){return KS(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Xa(e,t){const n=J({},e);return hd(e)&&hd(t)&&Object.keys(t).forEach(r=>{hd(t[r])?r in e?n[r]=Xa(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}class vt{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=J(J({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ze(ut(this,"addOptions",{name:this.name}))),this.storage=Ze(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new vt(t)}configure(t={}){const n=this.extend();return n.options=Xa(this.options,t),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new vt(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ze(ut(n,"addOptions",{name:n.name})),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}}function qS(e,t,n){const{from:r,to:i}=t,{blockSeparator:o=`
+
+`,textSerializers:s={}}=n||{};let a="",l=!0;return e.nodesBetween(r,i,(c,u,f,h)=>{var p;const g=s==null?void 0:s[c.type.name];g?(c.isBlock&&!l&&(a+=o,l=!0),f&&(a+=g({node:c,pos:u,parent:f,index:h,range:t}))):c.isText?(a+=(p=c==null?void 0:c.text)===null||p===void 0?void 0:p.slice(Math.max(r,u)-u,i-u),l=!1):c.isBlock&&!l&&(a+=o,l=!0)}),a}function JS(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const NP=vt.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new gt({key:new yt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map(u=>u.$from.pos)),a=Math.max(...o.map(u=>u.$to.pos)),l=JS(n);return qS(r,{from:s,to:a},{textSerializers:l})}}})]}}),GS=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),YS=(e=!1)=>({commands:t})=>t.setContent("",e),XS=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:s})=>{e.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=t,f=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),p=f.blockRange(h);if(!p)return;const g=Zi(p);if(a.type.isTextblock){const{defaultType:v}=f.parent.contentMatchAt(f.index());t.setNodeMarkup(p.start,v)}(g||g===0)&&t.lift(p,g)})}),!0},QS=e=>t=>e(t),ZS=()=>({state:e,dispatch:t})=>E1(e,t),eC=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,o.content),r.setSelection(new ke(r.doc.resolve(s-1))),!0},tC=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){const a=i.before(o),l=i.after(o);e.delete(a,l).scrollIntoView()}return!0}return!1},nC=e=>({tr:t,state:n,dispatch:r})=>{const i=Tt(e,n.schema),o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const l=o.before(s),c=o.after(s);t.delete(l,c).scrollIntoView()}return!0}return!1},rC=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},iC=()=>({state:e,dispatch:t})=>cd(e,t),oC=()=>({commands:e})=>e.keyboardShortcut("Enter"),sC=()=>({state:e,dispatch:t})=>A1(e,t);function Qa(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:WS(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function pd(e,t,n={}){return e.find(r=>r.type===t&&Qa(r.attrs,n))}function aC(e,t,n={}){return!!pd(e,t,n)}function md(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const i=pd([...r.node.marks],t,n);if(!i)return;let o=r.index,s=e.start()+r.offset,a=o+1,l=s+r.node.nodeSize;for(pd([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,s-=e.parent.child(o).nodeSize;for(;a({tr:n,state:r,dispatch:i})=>{const o=Ar(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:u}=a;if(i){const f=md(l,o,t);if(f&&f.from<=c&&f.to>=u){const h=ke.create(s,f.from,f.to);n.setSelection(h)}}return!0},cC=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:i,dispatch:o})=>{t=J({scrollIntoView:!0},t);const s=()=>{yd()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),(t==null?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(o&&e===null&&!gd(n.state.selection))return s(),!0;const a=uC(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},fC=(e,t)=>n=>e.every((r,i)=>t(r,Me(J({},n),{index:i}))),hC=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t);function I1(e){const t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function Za(e,t,n){if(n=J({slice:!0,parseOptions:{}},n),typeof e=="object"&&e!==null)try{return Array.isArray(e)&&e.length>0?K.fromArray(e.map(r=>t.nodeFromJSON(r))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),Za("",t,n)}if(typeof e=="string"){const r=hs.fromSchema(t);return n.slice?r.parseSlice(I1(e),n.parseOptions).content:r.parse(I1(e),n.parseOptions)}return Za("",t,n)}function pC(e,t,n){const r=e.steps.length-1;if(r{s===0&&(s=u)}),e.setSelection(Se.near(e.doc.resolve(s),n))}const mC=e=>e.toString().startsWith("<"),gC=(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{if(i){n=J({parseOptions:{},updateSelection:!0},n);const s=Za(t,o.schema,{parseOptions:J({preserveWhitespace:"full"},n.parseOptions)});if(s.toString()==="<>")return!0;let{from:a,to:l}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},c=!0,u=!0;if((mC(s)?s:[s]).forEach(h=>{h.check(),c=c?h.isText&&h.marks.length===0:!1,u=u?h.isBlock:!1}),a===l&&u){const{parent:h}=r.doc.resolve(a);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(a-=1,l+=1)}c?Array.isArray(t)?r.insertText(t.map(h=>h.text||"").join(""),a,l):typeof t=="object"&&!!t&&!!t.text?r.insertText(t.text,a,l):r.insertText(t,a,l):r.replaceWith(a,l,s),n.updateSelection&&pC(r,r.steps.length-1,-1)}return!0},yC=()=>({state:e,dispatch:t})=>_S(e,t),vC=()=>({state:e,dispatch:t})=>MS(e,t),bC=()=>({state:e,dispatch:t})=>w1(e,t),wC=()=>({state:e,dispatch:t})=>S1(e,t),xC=()=>({tr:e,state:t,dispatch:n})=>{try{const r=za(t.doc,t.selection.$from.pos,-1);return r==null?!1:(e.join(r,2),n&&n(e),!0)}catch(r){return!1}},kC=()=>({state:e,dispatch:t,tr:n})=>{try{const r=za(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch(r){return!1}};function vd(){return typeof navigator!="undefined"?/Mac/.test(navigator.platform):!1}function SC(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,i,o,s;for(let a=0;a({editor:t,view:n,tr:r,dispatch:i})=>{const o=SC(e).split(/-(?!$)/),s=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&i&&r.maybeStep(u)}),!0};function bd(e,t,n={}){const{from:r,to:i,empty:o}=e.selection,s=t?Tt(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,(f,h)=>{if(f.isText)return;const p=Math.max(r,h),g=Math.min(i,h+f.nodeSize);a.push({node:f,from:p,to:g})});const l=i-r,c=a.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>Qa(f.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((f,h)=>f+h.to-h.from,0)>=l}const _C=(e,t={})=>({state:n,dispatch:r})=>{const i=Tt(e,n.schema);return bd(n,i,t)?AS(n,r):!1},MC=()=>({state:e,dispatch:t})=>O1(e,t),AC=e=>({state:t,dispatch:n})=>{const r=Tt(e,t.schema);return IS(r)(t,n)},EC=()=>({state:e,dispatch:t})=>M1(e,t);function wd(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function $1(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,i)=>(n.includes(i)||(r[i]=e[i]),r),{})}const OC=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=wd(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(o=Tt(e,r.schema)),a==="mark"&&(s=Ar(e,r.schema)),i&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&n.setNodeMarkup(u,void 0,$1(c.attrs,t)),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&n.addMark(u,u+c.nodeSize,s.create($1(f.attrs,t)))})})}),!0):!1},TC=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),PC=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),RC=()=>({state:e,dispatch:t})=>x1(e,t),jC=()=>({state:e,dispatch:t})=>C1(e,t),NC=()=>({state:e,dispatch:t})=>TS(e,t),LC=()=>({state:e,dispatch:t})=>j1(e,t),DC=()=>({state:e,dispatch:t})=>R1(e,t);function IC(e,t,n={}){return Za(e,t,{slice:!1,parseOptions:n})}const $C=(e,t=!1,n={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,a=IC(e,i.schema,n);return o&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0};function ks(e,t){const n=Ar(t,e.schema),{from:r,to:i,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?J({},a.attrs):{}}function BC(e,t){const n=new Og(e);return t.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function HC(e){for(let t=0;t{n(i)&&r.push({node:i,pos:o})}),r}function B1(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function xd(e){return t=>B1(t.$from,e)}function FC(e,t){const n=Tt(t,e.schema),{from:r,to:i}=e.selection,o=[];e.doc.nodesBetween(r,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===n.name);return s?J({},s.attrs):{}}function VC(e,t){const n=wd(typeof t=="string"?t:t.name,e.schema);return n==="node"?FC(e,t):n==="mark"?ks(e,t):{}}function WC(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function UC(e){const t=WC(e);return t.length===1?t:t.filter((n,r)=>!t.filter((o,s)=>s!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function KC(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=t.slice(o).map(a,-1),u=t.slice(o).map(l),f=t.invert().map(c,-1),h=t.invert().map(u);r.push({oldRange:{from:f,to:h},newRange:{from:c,to:u}})})}),UC(r)}function kd(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(i=>{const o=n.resolve(e-1),s=md(o,i.type);!s||r.push(J({mark:i},s))}):n.nodesBetween(e,t,(i,o)=>{r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}function el(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=e.find(o=>o.type===t&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}function qC(e,t,n={}){const{empty:r,ranges:i}=e.selection,o=t?Ar(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(f=>o?o.name===f.type.name:!0).find(f=>Qa(f.attrs,n,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:f,$to:h})=>{const p=f.pos,g=h.pos;e.doc.nodesBetween(p,g,(v,b)=>{if(!v.isText&&!v.marks.length)return;const w=Math.max(p,b),k=Math.min(g,b+v.nodeSize);s+=k-w,a.push(...v.marks.map(d=>({mark:d,from:w,to:k})))})}),s===0)return!1;const l=a.filter(f=>o?o.name===f.mark.type.name:!0).filter(f=>Qa(f.mark.attrs,n,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),c=a.filter(f=>o?f.mark.type!==o&&f.mark.type.excludes(o):!0).reduce((f,h)=>f+h.to-h.from,0);return(l>0?l+c:l)>=s}function H1(e,t){const{nodeExtensions:n}=FS(t),r=n.find(s=>s.name===e);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=Ze(ut(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function JC(e){return e instanceof be}function z1(e,t,n){const r=0,i=e.state.doc.content.size,o=nr(t,r,i),s=nr(n,r,i),a=e.coordsAtPos(o),l=e.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),f=Math.min(a.left,l.left),h=Math.max(a.right,l.right),p=h-f,g=u-c,w={top:c,bottom:u,left:f,right:h,width:p,height:g,x:f,y:c};return Me(J({},w),{toJSON:()=>w})}function GC(e,t,n){var r;const{selection:i}=t;let o=null;if(gd(i)&&(o=i.$cursor),o){const a=(r=e.storedMarks)!==null&&r!==void 0?r:o.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:s}=i;return s.some(({$from:a,$to:l})=>{let c=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(u,f,h)=>{if(c)return!1;if(u.isInline){const p=!h||h.type.allowsMarkType(n),g=!!n.isInSet(u.marks)||!u.marks.some(v=>v.type.excludes(n));c=p&&g}return!c}),c})}const YC=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=Ar(e,r.schema);if(i)if(s){const c=ks(r,l);n.addStoredMark(l.create(J(J({},c),t)))}else a.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(u,f,(h,p)=>{const g=Math.max(p,u),v=Math.min(p+h.nodeSize,f);h.marks.find(w=>w.type===l)?h.marks.forEach(w=>{l===w.type&&n.addMark(g,v,l.create(J(J({},w.attrs),t)))}):n.addMark(g,v,l.create(t))})});return GC(r,n,l)},XC=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),QC=(e,t={})=>({state:n,dispatch:r,chain:i})=>{const o=Tt(e,n.schema);return o.isTextblock?i().command(({commands:s})=>N1(o,t)(n)?!0:s.clearNodes()).command(({state:s})=>N1(o,t)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},ZC=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,i=nr(e,0,r.content.size),o=be.create(r,i);t.setSelection(o)}return!0},e_=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:i,to:o}=typeof e=="number"?{from:e,to:e}:e,s=ke.atStart(r).from,a=ke.atEnd(r).to,l=nr(i,s,a),c=nr(o,s,a),u=ke.create(r,l,c);t.setSelection(u)}return!0},t_=e=>({state:t,dispatch:n})=>{const r=Tt(e,t.schema);return HS(r)(t,n)};function F1(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(r)}}const n_=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:s}=t,{$from:a,$to:l}=o,c=i.extensionManager.attributes,u=el(c,a.node().type.name,a.node().attrs);if(o instanceof be&&o.node.isBlock)return!a.parentOffset||!tr(s,a.pos)?!1:(r&&(e&&F1(n,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const f=l.parentOffset===l.parent.content.size;o instanceof ke&&t.deleteSelection();const h=a.depth===0?void 0:HC(a.node(-1).contentMatchAt(a.indexAfter(-1)));let p=f&&h?[{type:h,attrs:u}]:void 0,g=tr(t.doc,t.mapping.map(a.pos),1,p);if(!p&&!g&&tr(t.doc,t.mapping.map(a.pos),1,h?[{type:h}]:void 0)&&(g=!0,p=h?[{type:h,attrs:u}]:void 0),g&&(t.split(t.mapping.map(a.pos),1,p),h&&!f&&!a.parentOffset&&a.parent.type!==h)){const v=t.mapping.map(a.before()),b=t.doc.resolve(v);a.node(-1).canReplaceWith(b.index(),b.index()+1,h)&&t.setNodeMarkup(t.mapping.map(a.before()),h)}e&&F1(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0},r_=e=>({tr:t,state:n,dispatch:r,editor:i})=>{var o;const s=Tt(e,n.schema),{$from:a,$to:l}=n.selection,c=n.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let b=K.empty;const w=a.index(-1)?1:a.index(-2)?2:3;for(let x=a.depth-w;x>=a.depth-3;x-=1)b=K.from(a.node(x).copy(b));const k=a.indexAfter(-1){if(m>-1)return!1;x.isTextblock&&x.content.size===0&&(m=S+1)}),m>-1&&t.setSelection(ke.near(t.doc.resolve(m))),t.scrollIntoView()}return!0}const h=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,p=el(f,u.type.name,u.attrs),g=el(f,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const v=h?[{type:s,attrs:p},{type:h,attrs:g}]:[{type:s,attrs:p}];if(!tr(t.doc,a.pos,2))return!1;if(r){const{selection:b,storedMarks:w}=n,{splittableMarks:k}=i.extensionManager,A=w||b.$to.parentOffset&&b.$from.marks();if(t.split(a.pos,2,v).scrollIntoView(),!A||!r)return!0;const d=A.filter(y=>k.includes(y.type.name));t.ensureMarks(d)}return!0},Sd=(e,t)=>{const n=xd(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&wr(e.doc,n.pos)&&e.join(n.pos),!0},Cd=(e,t)=>{const n=xd(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&wr(e.doc,r)&&e.join(r),!0},i_=(e,t,n,r={})=>({editor:i,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:f,splittableMarks:h}=i.extensionManager,p=Tt(e,s.schema),g=Tt(t,s.schema),{selection:v,storedMarks:b}=s,{$from:w,$to:k}=v,A=w.blockRange(k),d=b||v.$to.parentOffset&&v.$from.marks();if(!A)return!1;const y=xd(m=>H1(m.type.name,f))(v);if(A.depth>=1&&y&&A.depth-y.depth<=1){if(y.node.type===p)return c.liftListItem(g);if(H1(y.node.type.name,f)&&p.validContent(y.node.content)&&a)return l().command(()=>(o.setNodeMarkup(y.pos,p),!0)).command(()=>Sd(o,p)).command(()=>Cd(o,p)).run()}return!n||!d||!a?l().command(()=>u().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>Sd(o,p)).command(()=>Cd(o,p)).run():l().command(()=>{const m=u().wrapInList(p,r),x=d.filter(S=>h.includes(S.type.name));return o.ensureMarks(x),m?!0:c.clearNodes()}).wrapInList(p,r).command(()=>Sd(o,p)).command(()=>Cd(o,p)).run()},o_=(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=Ar(e,r.schema);return qC(r,s,t)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,t)},s_=(e,t,n={})=>({state:r,commands:i})=>{const o=Tt(e,r.schema),s=Tt(t,r.schema);return bd(r,o,n)?i.setNode(s):i.setNode(o,n)},a_=(e,t={})=>({state:n,commands:r})=>{const i=Tt(e,n.schema);return bd(n,i,t)?r.lift(i):r.wrapIn(i,t)},l_=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,e.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},c_=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(o=>{e.removeMark(o.$from.pos,o.$to.pos)}),!0},u_=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=Ar(e,r.schema),{$from:c,empty:u,ranges:f}=a;if(!i)return!0;if(u&&s){let{from:h,to:p}=a;const g=(o=c.marks().find(b=>b.type===l))===null||o===void 0?void 0:o.attrs,v=md(c,l,g);v&&(h=v.from,p=v.to),n.removeMark(h,p,l)}else f.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,l)});return n.removeStoredMark(l),!0},d_=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=wd(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(o=Tt(e,r.schema)),a==="mark"&&(s=Ar(e,r.schema)),i&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;r.doc.nodesBetween(c,u,(f,h)=>{o&&o===f.type&&n.setNodeMarkup(h,void 0,J(J({},f.attrs),t)),s&&f.marks.length&&f.marks.forEach(p=>{if(s===p.type){const g=Math.max(h,c),v=Math.min(h+f.nodeSize,u);n.addMark(g,v,s.create(J(J({},p.attrs),t)))}})})}),!0):!1},f_=(e,t={})=>({state:n,dispatch:r})=>{const i=Tt(e,n.schema);return jS(i,t)(n,r)},h_=(e,t={})=>({state:n,dispatch:r})=>{const i=Tt(e,n.schema);return LS(i,t)(n,r)};var p_=Object.freeze({__proto__:null,blur:GS,clearContent:YS,clearNodes:XS,command:QS,createParagraphNear:ZS,cut:eC,deleteCurrentNode:tC,deleteNode:nC,deleteRange:rC,deleteSelection:iC,enter:oC,exitCode:sC,extendMarkRange:lC,first:cC,focus:dC,forEach:fC,insertContent:hC,insertContentAt:gC,joinUp:yC,joinDown:vC,joinBackward:bC,joinForward:wC,joinItemBackward:xC,joinItemForward:kC,keyboardShortcut:CC,lift:_C,liftEmptyBlock:MC,liftListItem:AC,newlineInCode:EC,resetAttributes:OC,scrollIntoView:TC,selectAll:PC,selectNodeBackward:RC,selectNodeForward:jC,selectParentNode:NC,selectTextblockEnd:LC,selectTextblockStart:DC,setContent:$C,setMark:YC,setMeta:XC,setNode:QC,setNodeSelection:ZC,setTextSelection:e_,sinkListItem:t_,splitBlock:n_,splitListItem:r_,toggleList:i_,toggleMark:o_,toggleNode:s_,toggleWrap:a_,undoInputRule:l_,unsetAllMarks:c_,unsetMark:u_,updateAttributes:d_,wrapIn:f_,wrapInList:h_});const LP=vt.create({name:"commands",addCommands(){return J({},p_)}}),DP=vt.create({name:"editable",addProseMirrorPlugins(){return[new gt({key:new yt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),IP=vt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new gt({key:new yt("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),$P=vt.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:f}=l,{pos:h,parent:p}=f,g=f.parent.isTextblock?a.doc.resolve(h-1):f,v=g.parent.type.spec.isolating,b=f.pos-f.parentOffset,w=v&&g.parent.childCount===1?b===f.pos:Se.atStart(c).from===h;return!u||!w||!p.type.isTextblock||p.textContent.length?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i=J({},r),o=Me(J({},r),{"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()});return yd()||vd()?o:i},addProseMirrorPlugins(){return[new gt({key:new yt("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(g=>g.docChanged)&&!t.doc.eq(n.doc)))return;const{empty:i,from:o,to:s}=t.selection,a=Se.atStart(t.doc).from,l=Se.atEnd(t.doc).to;if(i||!(o===a&&s===l)||!(n.doc.textBetween(0,n.doc.content.size," "," ").length===0))return;const f=n.tr,h=D1({state:n,transaction:f}),{commands:p}=new zS({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),BP=vt.create({name:"tabindex",addProseMirrorPlugins(){return[new gt({key:new yt("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});function mi(e){return new xs({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ze(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(kd(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(v=>v===e.type&&v!==p.mark.type)).filter(p=>p.to>c).length)return null;un.from&&o.delete(n.from+l,c);const h=n.from+l+s.length;o.addMark(n.from+l,h,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function V1(e){return new xs({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ze(e.getAttributes,void 0,r)||{},{tr:o}=t,s=n.from;let a=n.to;const l=e.type.create(i);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=s+c;u>a?u=a:a=u+r[1].length;const f=r[0][r[0].length-1];o.insertText(f,s+r[0].length-1),o.replaceWith(u,a,l)}else r[0]&&o.insert(s-1,e.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a));o.scrollIntoView()}})}function _d(e){return new xs({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=Ze(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function rt(e){return new xs({find:e.find,handler:({state:t,range:n,match:r})=>{let i=e.replace,o=n.from;const s=n.to;if(r[1]){const a=r[0].lastIndexOf(r[1]);i+=r[0].slice(a+r[1].length),o+=a;const l=o-s;l>0&&(i=r[0].slice(a-l,a)+i,o=s)}t.tr.insertText(i,o,s)}})}function Ss(e){return new xs({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=Ze(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&Lu(l,e.type,o);if(!c)return null;if(s.wrap(l,c),e.keepMarks&&e.editor){const{selection:f,storedMarks:h}=t,{splittableMarks:p}=e.editor.extensionManager,g=h||f.$to.parentOffset&&f.$from.marks();if(g){const v=g.filter(b=>p.includes(b.type.name));s.ensureMarks(v)}}if(e.keepAttributes){const f=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(f,o).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===e.type&&wr(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,u))&&s.join(n.from-1)}})}class gn{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=J(J({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ze(ut(this,"addOptions",{name:this.name}))),this.storage=Ze(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new gn(t)}configure(t={}){const n=this.extend();return n.options=Xa(this.options,t),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new gn(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ze(ut(n,"addOptions",{name:n.name})),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=s.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}}class et{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=J(J({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ze(ut(this,"addOptions",{name:this.name}))),this.storage=Ze(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new et(t)}configure(t={}){const n=this.extend();return n.options=Xa(this.options,t),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new et(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ze(ut(n,"addOptions",{name:n.name})),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}}function gi(e){return new US({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ze(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];let l=n.to;if(s){const c=a.search(/\S/),u=n.from+a.indexOf(s),f=u+s.length;if(kd(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(v=>v===e.type&&v!==p.mark.type)).filter(p=>p.to>u).length)return null;fn.from&&o.delete(n.from+c,u),l=n.from+c+s.length,o.addMark(n.from+c,l,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function m_(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var qt="top",yn="bottom",vn="right",Jt="left",Md="auto",Cs=[qt,yn,vn,Jt],co="start",_s="end",g_="clippingParents",W1="viewport",Ms="popper",y_="reference",U1=Cs.reduce(function(e,t){return e.concat([t+"-"+co,t+"-"+_s])},[]),K1=[].concat(Cs,[Md]).reduce(function(e,t){return e.concat([t,t+"-"+co,t+"-"+_s])},[]),v_="beforeRead",b_="read",w_="afterRead",x_="beforeMain",k_="main",S_="afterMain",C_="beforeWrite",__="write",M_="afterWrite",A_=[v_,b_,w_,x_,k_,S_,C_,__,M_];function zn(e){return e?(e.nodeName||"").toLowerCase():null}function nn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function yi(e){var t=nn(e).Element;return e instanceof t||e instanceof Element}function bn(e){var t=nn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ad(e){if(typeof ShadowRoot=="undefined")return!1;var t=nn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function E_(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!bn(o)||!zn(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function O_(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!bn(i)||!zn(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var q1={name:"applyStyles",enabled:!0,phase:"write",fn:E_,effect:O_,requires:["computeStyles"]};function Fn(e){return e.split("-")[0]}var vi=Math.max,tl=Math.min,uo=Math.round;function Ed(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function J1(){return!/^((?!chrome|android).)*safari/i.test(Ed())}function fo(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&bn(e)&&(i=e.offsetWidth>0&&uo(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&uo(r.height)/e.offsetHeight||1);var s=yi(e)?nn(e):window,a=s.visualViewport,l=!J1()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,f=r.width/i,h=r.height/o;return{width:f,height:h,top:u,right:c+f,bottom:u+h,left:c,x:c,y:u}}function Od(e){var t=fo(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function G1(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ad(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function rr(e){return nn(e).getComputedStyle(e)}function T_(e){return["table","td","th"].indexOf(zn(e))>=0}function Er(e){return((yi(e)?e.ownerDocument:e.document)||window.document).documentElement}function nl(e){return zn(e)==="html"?e:e.assignedSlot||e.parentNode||(Ad(e)?e.host:null)||Er(e)}function Y1(e){return!bn(e)||rr(e).position==="fixed"?null:e.offsetParent}function P_(e){var t=/firefox/i.test(Ed()),n=/Trident/i.test(Ed());if(n&&bn(e)){var r=rr(e);if(r.position==="fixed")return null}var i=nl(e);for(Ad(i)&&(i=i.host);bn(i)&&["html","body"].indexOf(zn(i))<0;){var o=rr(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function As(e){for(var t=nn(e),n=Y1(e);n&&T_(n)&&rr(n).position==="static";)n=Y1(n);return n&&(zn(n)==="html"||zn(n)==="body"&&rr(n).position==="static")?t:n||P_(e)||t}function Td(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Es(e,t,n){return vi(e,tl(t,n))}function R_(e,t,n){var r=Es(e,t,n);return r>n?n:r}function X1(){return{top:0,right:0,bottom:0,left:0}}function Q1(e){return Object.assign({},X1(),e)}function Z1(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var j_=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Q1(typeof t!="number"?t:Z1(t,Cs))};function N_(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Fn(n.placement),l=Td(a),c=[Jt,vn].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var f=j_(i.padding,n),h=Od(o),p=l==="y"?qt:Jt,g=l==="y"?yn:vn,v=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],b=s[l]-n.rects.reference[l],w=As(o),k=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,A=v/2-b/2,d=f[p],y=k-h[u]-f[g],m=k/2-h[u]/2+A,x=Es(d,m,y),S=l;n.modifiersData[r]=(t={},t[S]=x,t.centerOffset=x-m,t)}}function L_(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!G1(t.elements.popper,i)||(t.elements.arrow=i))}var D_={name:"arrow",enabled:!0,phase:"main",fn:N_,effect:L_,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ho(e){return e.split("-")[1]}var I_={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $_(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:uo(n*i)/i||0,y:uo(r*i)/i||0}}function e0(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,h=s.x,p=h===void 0?0:h,g=s.y,v=g===void 0?0:g,b=typeof u=="function"?u({x:p,y:v}):{x:p,y:v};p=b.x,v=b.y;var w=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),A=Jt,d=qt,y=window;if(c){var m=As(n),x="clientHeight",S="clientWidth";if(m===nn(n)&&(m=Er(n),rr(m).position!=="static"&&a==="absolute"&&(x="scrollHeight",S="scrollWidth")),m=m,i===qt||(i===Jt||i===vn)&&o===_s){d=yn;var _=f&&m===y&&y.visualViewport?y.visualViewport.height:m[x];v-=_-r.height,v*=l?1:-1}if(i===Jt||(i===qt||i===yn)&&o===_s){A=vn;var C=f&&m===y&&y.visualViewport?y.visualViewport.width:m[S];p-=C-r.width,p*=l?1:-1}}var E=Object.assign({position:a},c&&I_),T=u===!0?$_({x:p,y:v},nn(n)):{x:p,y:v};if(p=T.x,v=T.y,l){var R;return Object.assign({},E,(R={},R[d]=k?"0":"",R[A]=w?"0":"",R.transform=(y.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",R))}return Object.assign({},E,(t={},t[d]=k?v+"px":"",t[A]=w?p+"px":"",t.transform="",t))}function B_(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Fn(t.placement),variation:ho(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,e0(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,e0(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var H_={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:B_,data:{}},rl={passive:!0};function z_(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=nn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,rl)}),a&&l.addEventListener("resize",n.update,rl),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,rl)}),a&&l.removeEventListener("resize",n.update,rl)}}var F_={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:z_,data:{}},V_={left:"right",right:"left",bottom:"top",top:"bottom"};function il(e){return e.replace(/left|right|bottom|top/g,function(t){return V_[t]})}var W_={start:"end",end:"start"};function t0(e){return e.replace(/start|end/g,function(t){return W_[t]})}function Pd(e){var t=nn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Rd(e){return fo(Er(e)).left+Pd(e).scrollLeft}function U_(e,t){var n=nn(e),r=Er(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=J1();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Rd(e),y:l}}function K_(e){var t,n=Er(e),r=Pd(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=vi(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=vi(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Rd(e),l=-r.scrollTop;return rr(i||n).direction==="rtl"&&(a+=vi(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function jd(e){var t=rr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function n0(e){return["html","body","#document"].indexOf(zn(e))>=0?e.ownerDocument.body:bn(e)&&jd(e)?e:n0(nl(e))}function Os(e,t){var n;t===void 0&&(t=[]);var r=n0(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=nn(r),s=i?[o].concat(o.visualViewport||[],jd(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Os(nl(s)))}function Nd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function q_(e,t){var n=fo(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function r0(e,t,n){return t===W1?Nd(U_(e,n)):yi(t)?q_(t,n):Nd(K_(Er(e)))}function J_(e){var t=Os(nl(e)),n=["absolute","fixed"].indexOf(rr(e).position)>=0,r=n&&bn(e)?As(e):e;return yi(r)?t.filter(function(i){return yi(i)&&G1(i,r)&&zn(i)!=="body"}):[]}function G_(e,t,n,r){var i=t==="clippingParents"?J_(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var u=r0(e,c,r);return l.top=vi(u.top,l.top),l.right=tl(u.right,l.right),l.bottom=tl(u.bottom,l.bottom),l.left=vi(u.left,l.left),l},r0(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function i0(e){var t=e.reference,n=e.element,r=e.placement,i=r?Fn(r):null,o=r?ho(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case qt:l={x:s,y:t.y-n.height};break;case yn:l={x:s,y:t.y+t.height};break;case vn:l={x:t.x+t.width,y:a};break;case Jt:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?Td(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case co:l[c]=l[c]-(t[u]/2-n[u]/2);break;case _s:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Ts(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?g_:a,c=n.rootBoundary,u=c===void 0?W1:c,f=n.elementContext,h=f===void 0?Ms:f,p=n.altBoundary,g=p===void 0?!1:p,v=n.padding,b=v===void 0?0:v,w=Q1(typeof b!="number"?b:Z1(b,Cs)),k=h===Ms?y_:Ms,A=e.rects.popper,d=e.elements[g?k:h],y=G_(yi(d)?d:d.contextElement||Er(e.elements.popper),l,u,s),m=fo(e.elements.reference),x=i0({reference:m,element:A,strategy:"absolute",placement:i}),S=Nd(Object.assign({},A,x)),_=h===Ms?S:m,C={top:y.top-_.top+w.top,bottom:_.bottom-y.bottom+w.bottom,left:y.left-_.left+w.left,right:_.right-y.right+w.right},E=e.modifiersData.offset;if(h===Ms&&E){var T=E[i];Object.keys(C).forEach(function(R){var N=[vn,yn].indexOf(R)>=0?1:-1,D=[qt,yn].indexOf(R)>=0?"y":"x";C[R]+=T[D]*N})}return C}function Y_(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?K1:l,u=ho(r),f=u?a?U1:U1.filter(function(g){return ho(g)===u}):Cs,h=f.filter(function(g){return c.indexOf(g)>=0});h.length===0&&(h=f);var p=h.reduce(function(g,v){return g[v]=Ts(e,{placement:v,boundary:i,rootBoundary:o,padding:s})[Fn(v)],g},{});return Object.keys(p).sort(function(g,v){return p[g]-p[v]})}function X_(e){if(Fn(e)===Md)return[];var t=il(e);return[t0(e),t,t0(t)]}function Q_(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,g=p===void 0?!0:p,v=n.allowedAutoPlacements,b=t.options.placement,w=Fn(b),k=w===b,A=l||(k||!g?[il(b)]:X_(b)),d=[b].concat(A).reduce(function(_e,I){return _e.concat(Fn(I)===Md?Y_(t,{placement:I,boundary:u,rootBoundary:f,padding:c,flipVariations:g,allowedAutoPlacements:v}):I)},[]),y=t.rects.reference,m=t.rects.popper,x=new Map,S=!0,_=d[0],C=0;C=0,D=N?"width":"height",M=Ts(t,{placement:E,boundary:u,rootBoundary:f,altBoundary:h,padding:c}),P=N?R?vn:Jt:R?yn:qt;y[D]>m[D]&&(P=il(P));var L=il(P),H=[];if(o&&H.push(M[T]<=0),a&&H.push(M[P]<=0,M[L]<=0),H.every(function(_e){return _e})){_=E,S=!1;break}x.set(E,H)}if(S)for(var te=g?3:1,q=function(I){var Y=d.find(function(V){var ee=x.get(V);if(ee)return ee.slice(0,I).every(function(Ae){return Ae})});if(Y)return _=Y,"break"},ae=te;ae>0;ae--){var ge=q(ae);if(ge==="break")break}t.placement!==_&&(t.modifiersData[r]._skip=!0,t.placement=_,t.reset=!0)}}var Z_={name:"flip",enabled:!0,phase:"main",fn:Q_,requiresIfExists:["offset"],data:{_skip:!1}};function o0(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function s0(e){return[qt,vn,yn,Jt].some(function(t){return e[t]>=0})}function eM(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Ts(t,{elementContext:"reference"}),a=Ts(t,{altBoundary:!0}),l=o0(s,r),c=o0(a,i,o),u=s0(l),f=s0(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}var tM={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:eM};function nM(e,t,n){var r=Fn(e),i=[Jt,qt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Jt,vn].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function rM(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=K1.reduce(function(u,f){return u[f]=nM(f,t.rects,o),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}var iM={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rM};function oM(e){var t=e.state,n=e.name;t.modifiersData[n]=i0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var sM={name:"popperOffsets",enabled:!0,phase:"read",fn:oM,data:{}};function aM(e){return e==="x"?"y":"x"}function lM(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,g=n.tetherOffset,v=g===void 0?0:g,b=Ts(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),w=Fn(t.placement),k=ho(t.placement),A=!k,d=Td(w),y=aM(d),m=t.modifiersData.popperOffsets,x=t.rects.reference,S=t.rects.popper,_=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,C=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(!!m){if(o){var R,N=d==="y"?qt:Jt,D=d==="y"?yn:vn,M=d==="y"?"height":"width",P=m[d],L=P+b[N],H=P-b[D],te=p?-S[M]/2:0,q=k===co?x[M]:S[M],ae=k===co?-S[M]:-x[M],ge=t.elements.arrow,_e=p&&ge?Od(ge):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:X1(),Y=I[N],V=I[D],ee=Es(0,x[M],_e[M]),Ae=A?x[M]/2-te-ee-Y-C.mainAxis:q-ee-Y-C.mainAxis,Ee=A?-x[M]/2+te+ee+V+C.mainAxis:ae+ee+V+C.mainAxis,we=t.elements.arrow&&As(t.elements.arrow),xe=we?d==="y"?we.clientTop||0:we.clientLeft||0:0,O=(R=E==null?void 0:E[d])!=null?R:0,j=P+Ae-O-xe,$=P+Ee-O,F=Es(p?tl(L,j):L,P,p?vi(H,$):H);m[d]=F,T[d]=F-P}if(a){var z,Q=d==="x"?qt:Jt,ne=d==="x"?yn:vn,W=m[y],G=y==="y"?"height":"width",U=W+b[Q],le=W-b[ne],oe=[qt,Jt].indexOf(w)!==-1,de=(z=E==null?void 0:E[y])!=null?z:0,ye=oe?U:W-x[G]-S[G]-de+C.altAxis,Oe=oe?W+x[G]+S[G]-de-C.altAxis:le,$e=p&&oe?R_(ye,W,Oe):Es(p?ye:U,W,p?Oe:le);m[y]=$e,T[y]=$e-W}t.modifiersData[r]=T}}var cM={name:"preventOverflow",enabled:!0,phase:"main",fn:lM,requiresIfExists:["offset"]};function uM(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function dM(e){return e===nn(e)||!bn(e)?Pd(e):uM(e)}function fM(e){var t=e.getBoundingClientRect(),n=uo(t.width)/e.offsetWidth||1,r=uo(t.height)/e.offsetHeight||1;return n!==1||r!==1}function hM(e,t,n){n===void 0&&(n=!1);var r=bn(t),i=bn(t)&&fM(t),o=Er(t),s=fo(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((zn(t)!=="body"||jd(o))&&(a=dM(t)),bn(t)?(l=fo(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Rd(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function pM(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function mM(e){var t=pM(e);return A_.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function gM(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function yM(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var a0={placement:"bottom",modifiers:[],strategy:"absolute"};function l0(){for(var e=arguments.length,t=new Array(e),n=0;n-1}function h0(e,t){return typeof e=="function"?e.apply(void 0,t):e}function p0(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function SM(e){return e.split(/\s+/).filter(Boolean)}function po(e){return[].concat(e)}function m0(e,t){e.indexOf(t)===-1&&e.push(t)}function CM(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function _M(e){return e.split("-")[0]}function ol(e){return[].slice.call(e)}function g0(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Ps(){return document.createElement("div")}function sl(e){return["Element","Fragment"].some(function(t){return Dd(e,t)})}function MM(e){return Dd(e,"NodeList")}function AM(e){return Dd(e,"MouseEvent")}function EM(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function OM(e){return sl(e)?[e]:MM(e)?ol(e):Array.isArray(e)?e:ol(document.querySelectorAll(e))}function Id(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function y0(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function TM(e){var t,n=po(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function PM(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,s=i.popperState,a=i.props,l=a.interactiveBorder,c=_M(s.placement),u=s.modifiersData.offset;if(!u)return!0;var f=c==="bottom"?u.top.y:0,h=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,g=c==="left"?u.right.x:0,v=o.top-r+f>l,b=r-o.bottom-h>l,w=o.left-n+p>l,k=n-o.right-g>l;return v||b||w||k})}function $d(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function v0(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Vn={isTouch:!1},b0=0;function RM(){Vn.isTouch||(Vn.isTouch=!0,window.performance&&document.addEventListener("mousemove",w0))}function w0(){var e=performance.now();e-b0<20&&(Vn.isTouch=!1,document.removeEventListener("mousemove",w0)),b0=e}function jM(){var e=document.activeElement;if(EM(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function NM(){document.addEventListener("touchstart",RM,bi),window.addEventListener("blur",jM)}var LM=typeof window!="undefined"&&typeof document!="undefined",DM=LM?!!window.msCrypto:!1,IM={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},$M={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Tn=Object.assign({appendTo:f0,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},IM,$M),BM=Object.keys(Tn),HM=function(t){var n=Object.keys(t);n.forEach(function(r){Tn[r]=t[r]})};function x0(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var a;r[o]=e[o]!==void 0?e[o]:(a=Tn[o])!=null?a:s}return r},{});return Object.assign({},e,n)}function zM(e,t){var n=t?Object.keys(x0(Object.assign({},Tn,{plugins:t}))):BM,r=n.reduce(function(i,o){var s=(e.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch(a){i[o]=s}return i},{});return r}function k0(e,t){var n=Object.assign({},t,{content:h0(t.content,[e])},t.ignoreAttributes?{}:zM(e,t.plugins));return n.aria=Object.assign({},Tn.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var FM=function(){return"innerHTML"};function Bd(e,t){e[FM()]=t}function S0(e){var t=Ps();return e===!0?t.className=u0:(t.className=d0,sl(e)?t.appendChild(e):Bd(t,e)),t}function C0(e,t){sl(t.content)?(Bd(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Bd(e,t.content):e.textContent=t.content)}function Hd(e){var t=e.firstElementChild,n=ol(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(c0)}),arrow:n.find(function(r){return r.classList.contains(u0)||r.classList.contains(d0)}),backdrop:n.find(function(r){return r.classList.contains(kM)})}}function _0(e){var t=Ps(),n=Ps();n.className=xM,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Ps();r.className=c0,r.setAttribute("data-state","hidden"),C0(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,s){var a=Hd(t),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&C0(c,e.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(S0(s.arrow))):l.appendChild(S0(s.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}_0.$$tippy=!0;var VM=1,al=[],zd=[];function WM(e,t){var n=k0(e,Object.assign({},Tn,x0(g0(t)))),r,i,o,s=!1,a=!1,l=!1,c=!1,u,f,h,p=[],g=p0(j,n.interactiveDebounce),v,b=VM++,w=null,k=CM(n.plugins),A={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},d={id:b,reference:e,popper:Ps(),popperInstance:w,props:n,state:A,plugins:k,clearDelayTimeouts:ye,setProps:Oe,setContent:$e,show:ze,hide:Ke,hideWithInteractivity:Yt,enable:oe,disable:de,unmount:or,destroy:Fs};if(!n.render)return d;var y=n.render(d),m=y.popper,x=y.onUpdate;m.setAttribute("data-tippy-root",""),m.id="tippy-"+d.id,d.popper=m,e._tippy=d,m._tippy=d;var S=k.map(function(B){return B.fn(d)}),_=e.hasAttribute("aria-expanded");return we(),te(),P(),L("onCreate",[d]),n.showOnCreate&&U(),m.addEventListener("mouseenter",function(){d.props.interactive&&d.state.isVisible&&d.clearDelayTimeouts()}),m.addEventListener("mouseleave",function(){d.props.interactive&&d.props.trigger.indexOf("mouseenter")>=0&&N().addEventListener("mousemove",g)}),d;function C(){var B=d.props.touch;return Array.isArray(B)?B:[B,0]}function E(){return C()[0]==="hold"}function T(){var B;return!!((B=d.props.render)!=null&&B.$$tippy)}function R(){return v||e}function N(){var B=R().parentNode;return B?TM(B):document}function D(){return Hd(m)}function M(B){return d.state.isMounted&&!d.state.isVisible||Vn.isTouch||u&&u.type==="focus"?0:Ld(d.props.delay,B?0:1,Tn.delay)}function P(B){B===void 0&&(B=!1),m.style.pointerEvents=d.props.interactive&&!B?"":"none",m.style.zIndex=""+d.props.zIndex}function L(B,ce,pe){if(pe===void 0&&(pe=!0),S.forEach(function(Re){Re[B]&&Re[B].apply(Re,ce)}),pe){var Pe;(Pe=d.props)[B].apply(Pe,ce)}}function H(){var B=d.props.aria;if(!!B.content){var ce="aria-"+B.content,pe=m.id,Pe=po(d.props.triggerTarget||e);Pe.forEach(function(Re){var Lt=Re.getAttribute(ce);if(d.state.isVisible)Re.setAttribute(ce,Lt?Lt+" "+pe:pe);else{var rn=Lt&&Lt.replace(pe,"").trim();rn?Re.setAttribute(ce,rn):Re.removeAttribute(ce)}})}}function te(){if(!(_||!d.props.aria.expanded)){var B=po(d.props.triggerTarget||e);B.forEach(function(ce){d.props.interactive?ce.setAttribute("aria-expanded",d.state.isVisible&&ce===R()?"true":"false"):ce.removeAttribute("aria-expanded")})}}function q(){N().removeEventListener("mousemove",g),al=al.filter(function(B){return B!==g})}function ae(B){if(!(Vn.isTouch&&(l||B.type==="mousedown"))){var ce=B.composedPath&&B.composedPath()[0]||B.target;if(!(d.props.interactive&&v0(m,ce))){if(po(d.props.triggerTarget||e).some(function(pe){return v0(pe,ce)})){if(Vn.isTouch||d.state.isVisible&&d.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[d,B]);d.props.hideOnClick===!0&&(d.clearDelayTimeouts(),d.hide(),a=!0,setTimeout(function(){a=!1}),d.state.isMounted||Y())}}}function ge(){l=!0}function _e(){l=!1}function I(){var B=N();B.addEventListener("mousedown",ae,!0),B.addEventListener("touchend",ae,bi),B.addEventListener("touchstart",_e,bi),B.addEventListener("touchmove",ge,bi)}function Y(){var B=N();B.removeEventListener("mousedown",ae,!0),B.removeEventListener("touchend",ae,bi),B.removeEventListener("touchstart",_e,bi),B.removeEventListener("touchmove",ge,bi)}function V(B,ce){Ae(B,function(){!d.state.isVisible&&m.parentNode&&m.parentNode.contains(m)&&ce()})}function ee(B,ce){Ae(B,ce)}function Ae(B,ce){var pe=D().box;function Pe(Re){Re.target===pe&&($d(pe,"remove",Pe),ce())}if(B===0)return ce();$d(pe,"remove",f),$d(pe,"add",Pe),f=Pe}function Ee(B,ce,pe){pe===void 0&&(pe=!1);var Pe=po(d.props.triggerTarget||e);Pe.forEach(function(Re){Re.addEventListener(B,ce,pe),p.push({node:Re,eventType:B,handler:ce,options:pe})})}function we(){E()&&(Ee("touchstart",O,{passive:!0}),Ee("touchend",$,{passive:!0})),SM(d.props.trigger).forEach(function(B){if(B!=="manual")switch(Ee(B,O),B){case"mouseenter":Ee("mouseleave",$);break;case"focus":Ee(DM?"focusout":"blur",F);break;case"focusin":Ee("focusout",F);break}})}function xe(){p.forEach(function(B){var ce=B.node,pe=B.eventType,Pe=B.handler,Re=B.options;ce.removeEventListener(pe,Pe,Re)}),p=[]}function O(B){var ce,pe=!1;if(!(!d.state.isEnabled||z(B)||a)){var Pe=((ce=u)==null?void 0:ce.type)==="focus";u=B,v=B.currentTarget,te(),!d.state.isVisible&&AM(B)&&al.forEach(function(Re){return Re(B)}),B.type==="click"&&(d.props.trigger.indexOf("mouseenter")<0||s)&&d.props.hideOnClick!==!1&&d.state.isVisible?pe=!0:U(B),B.type==="click"&&(s=!pe),pe&&!Pe&&le(B)}}function j(B){var ce=B.target,pe=R().contains(ce)||m.contains(ce);if(!(B.type==="mousemove"&&pe)){var Pe=G().concat(m).map(function(Re){var Lt,rn=Re._tippy,_i=(Lt=rn.popperInstance)==null?void 0:Lt.state;return _i?{popperRect:Re.getBoundingClientRect(),popperState:_i,props:n}:null}).filter(Boolean);PM(Pe,B)&&(q(),le(B))}}function $(B){var ce=z(B)||d.props.trigger.indexOf("click")>=0&&s;if(!ce){if(d.props.interactive){d.hideWithInteractivity(B);return}le(B)}}function F(B){d.props.trigger.indexOf("focusin")<0&&B.target!==R()||d.props.interactive&&B.relatedTarget&&m.contains(B.relatedTarget)||le(B)}function z(B){return Vn.isTouch?E()!==B.type.indexOf("touch")>=0:!1}function Q(){ne();var B=d.props,ce=B.popperOptions,pe=B.placement,Pe=B.offset,Re=B.getReferenceClientRect,Lt=B.moveTransition,rn=T()?Hd(m).arrow:null,_i=Re?{getBoundingClientRect:Re,contextElement:Re.contextElement||R()}:e,Rf={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Vs){var Mi=Vs.state;if(T()){var Qy=D(),Kl=Qy.box;["placement","reference-hidden","escaped"].forEach(function(Ws){Ws==="placement"?Kl.setAttribute("data-placement",Mi.placement):Mi.attributes.popper["data-popper-"+Ws]?Kl.setAttribute("data-"+Ws,""):Kl.removeAttribute("data-"+Ws)}),Mi.attributes.popper={}}}},Dr=[{name:"offset",options:{offset:Pe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Lt}},Rf];T()&&rn&&Dr.push({name:"arrow",options:{element:rn,padding:3}}),Dr.push.apply(Dr,(ce==null?void 0:ce.modifiers)||[]),d.popperInstance=wM(_i,m,Object.assign({},ce,{placement:pe,onFirstUpdate:h,modifiers:Dr}))}function ne(){d.popperInstance&&(d.popperInstance.destroy(),d.popperInstance=null)}function W(){var B=d.props.appendTo,ce,pe=R();d.props.interactive&&B===f0||B==="parent"?ce=pe.parentNode:ce=h0(B,[pe]),ce.contains(m)||ce.appendChild(m),d.state.isMounted=!0,Q()}function G(){return ol(m.querySelectorAll("[data-tippy-root]"))}function U(B){d.clearDelayTimeouts(),B&&L("onTrigger",[d,B]),I();var ce=M(!0),pe=C(),Pe=pe[0],Re=pe[1];Vn.isTouch&&Pe==="hold"&&Re&&(ce=Re),ce?r=setTimeout(function(){d.show()},ce):d.show()}function le(B){if(d.clearDelayTimeouts(),L("onUntrigger",[d,B]),!d.state.isVisible){Y();return}if(!(d.props.trigger.indexOf("mouseenter")>=0&&d.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(B.type)>=0&&s)){var ce=M(!1);ce?i=setTimeout(function(){d.state.isVisible&&d.hide()},ce):o=requestAnimationFrame(function(){d.hide()})}}function oe(){d.state.isEnabled=!0}function de(){d.hide(),d.state.isEnabled=!1}function ye(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function Oe(B){if(!d.state.isDestroyed){L("onBeforeUpdate",[d,B]),xe();var ce=d.props,pe=k0(e,Object.assign({},ce,g0(B),{ignoreAttributes:!0}));d.props=pe,we(),ce.interactiveDebounce!==pe.interactiveDebounce&&(q(),g=p0(j,pe.interactiveDebounce)),ce.triggerTarget&&!pe.triggerTarget?po(ce.triggerTarget).forEach(function(Pe){Pe.removeAttribute("aria-expanded")}):pe.triggerTarget&&e.removeAttribute("aria-expanded"),te(),P(),x&&x(ce,pe),d.popperInstance&&(Q(),G().forEach(function(Pe){requestAnimationFrame(Pe._tippy.popperInstance.forceUpdate)})),L("onAfterUpdate",[d,B])}}function $e(B){d.setProps({content:B})}function ze(){var B=d.state.isVisible,ce=d.state.isDestroyed,pe=!d.state.isEnabled,Pe=Vn.isTouch&&!d.props.touch,Re=Ld(d.props.duration,0,Tn.duration);if(!(B||ce||pe||Pe)&&!R().hasAttribute("disabled")&&(L("onShow",[d],!1),d.props.onShow(d)!==!1)){if(d.state.isVisible=!0,T()&&(m.style.visibility="visible"),P(),I(),d.state.isMounted||(m.style.transition="none"),T()){var Lt=D(),rn=Lt.box,_i=Lt.content;Id([rn,_i],0)}h=function(){var Dr;if(!(!d.state.isVisible||c)){if(c=!0,m.offsetHeight,m.style.transition=d.props.moveTransition,T()&&d.props.animation){var Ul=D(),Vs=Ul.box,Mi=Ul.content;Id([Vs,Mi],Re),y0([Vs,Mi],"visible")}H(),te(),m0(zd,d),(Dr=d.popperInstance)==null||Dr.forceUpdate(),L("onMount",[d]),d.props.animation&&T()&&ee(Re,function(){d.state.isShown=!0,L("onShown",[d])})}},W()}}function Ke(){var B=!d.state.isVisible,ce=d.state.isDestroyed,pe=!d.state.isEnabled,Pe=Ld(d.props.duration,1,Tn.duration);if(!(B||ce||pe)&&(L("onHide",[d],!1),d.props.onHide(d)!==!1)){if(d.state.isVisible=!1,d.state.isShown=!1,c=!1,s=!1,T()&&(m.style.visibility="hidden"),q(),Y(),P(!0),T()){var Re=D(),Lt=Re.box,rn=Re.content;d.props.animation&&(Id([Lt,rn],Pe),y0([Lt,rn],"hidden"))}H(),te(),d.props.animation?T()&&V(Pe,d.unmount):d.unmount()}}function Yt(B){N().addEventListener("mousemove",g),m0(al,g),g(B)}function or(){d.state.isVisible&&d.hide(),!!d.state.isMounted&&(ne(),G().forEach(function(B){B._tippy.unmount()}),m.parentNode&&m.parentNode.removeChild(m),zd=zd.filter(function(B){return B!==d}),d.state.isMounted=!1,L("onHidden",[d]))}function Fs(){d.state.isDestroyed||(d.clearDelayTimeouts(),d.unmount(),xe(),delete e._tippy,d.state.isDestroyed=!0,L("onDestroy",[d]))}}function mo(e,t){t===void 0&&(t={});var n=Tn.plugins.concat(t.plugins||[]);NM();var r=Object.assign({},t,{plugins:n}),i=OM(e),o=i.reduce(function(s,a){var l=a&&WM(a,r);return l&&s.push(l),s},[]);return sl(e)?o[0]:o}mo.defaultProps=Tn;mo.setDefaultProps=HM;mo.currentInput=Vn;Object.assign({},q1,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});mo.setDefaultProps({render:_0});class UM{constructor({editor:t,element:n,view:r,tippyOptions:i={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:c,to:u})=>{const{doc:f,selection:h}=l,{empty:p}=h,g=!f.textBetween(c,u).length&&gd(l.selection),v=this.element.contains(document.activeElement);return!(!(a.hasFocus()||v)||p||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}(a==null?void 0:a.relatedTarget)&&((l=this.element.parentNode)===null||l===void 0?void 0:l.contains(a.relatedTarget))||this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const c=!(l==null?void 0:l.selection.eq(a.state.selection)),u=!(l==null?void 0:l.doc.eq(a.state.doc));!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,c,u,l)},this.updateDelay))},this.updateHandler=(a,l,c,u)=>{var f,h,p;const{state:g,composing:v}=a,{selection:b}=g;if(v||!l&&!c)return;this.createTooltip();const{ranges:k}=b,A=Math.min(...k.map(m=>m.$from.pos)),d=Math.max(...k.map(m=>m.$to.pos));if(!((f=this.shouldShow)===null||f===void 0?void 0:f.call(this,{editor:this.editor,view:a,state:g,oldState:u,from:A,to:d}))){this.hide();return}(h=this.tippy)===null||h===void 0||h.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(JC(g.selection)){let m=a.nodeDOM(A);const x=m.dataset.nodeViewWrapper?m:m.querySelector("[data-node-view-wrapper]");if(x&&(m=x.firstChild),m)return m.getBoundingClientRect()}return z1(a,A,d)})}),this.show()},this.editor=t,this.element=n,this.view=r,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,n=!!t.parentElement;this.tippy||!n||(this.tippy=mo(t,J({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,n){const{state:r}=t,i=r.selection.$from.pos!==r.selection.$to.pos;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(t,n);return}const o=!(n==null?void 0:n.selection.eq(t.state.selection)),s=!(n==null?void 0:n.doc.eq(t.state.doc));this.updateHandler(t,o,s,n)}show(){var t;(t=this.tippy)===null||t===void 0||t.show()}hide(){var t;(t=this.tippy)===null||t===void 0||t.hide()}destroy(){var t,n;((t=this.tippy)===null||t===void 0?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const M0=e=>new gt({key:typeof e.pluginKey=="string"?new yt(e.pluginKey):e.pluginKey,view:t=>new UM(J({view:t},e))});vt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[M0({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class KM{constructor({editor:t,element:n,view:r,tippyOptions:i={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a})=>{const{selection:l}=a,{$anchor:c,empty:u}=l,f=c.depth===1,h=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent;return!(!s.hasFocus()||!u||!f||!h||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;if(this.preventHide){this.preventHide=!1;return}(s==null?void 0:s.relatedTarget)&&((a=this.element.parentNode)===null||a===void 0?void 0:a.contains(s.relatedTarget))||this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=t,this.element=n,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,n=!!t.parentElement;this.tippy||!n||(this.tippy=mo(t,J({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,n){var r,i,o;const{state:s}=t,{doc:a,selection:l}=s,{from:c,to:u}=l;if(n&&n.doc.eq(a)&&n.selection.eq(l))return;if(this.createTooltip(),!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:t,state:s,oldState:n}))){this.hide();return}(i=this.tippy)===null||i===void 0||i.setProps({getReferenceClientRect:((o=this.tippyOptions)===null||o===void 0?void 0:o.getReferenceClientRect)||(()=>z1(t,c,u))}),this.show()}show(){var t;(t=this.tippy)===null||t===void 0||t.show()}hide(){var t;(t=this.tippy)===null||t===void 0||t.hide()}destroy(){var t,n;((t=this.tippy)===null||t===void 0?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const A0=e=>new gt({key:typeof e.pluginKey=="string"?new yt(e.pluginKey):e.pluginKey,view:t=>new KM(J({view:t},e))});vt.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[A0({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});const HP=je({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:t}){const n=se(null);return Je(()=>{const{updateDelay:r,editor:i,pluginKey:o,shouldShow:s,tippyOptions:a}=e;i.registerPlugin(M0({updateDelay:r,editor:i,element:n.value,pluginKey:o,shouldShow:s,tippyOptions:a}))}),Io(()=>{const{pluginKey:r,editor:i}=e;i.unregisterPlugin(r)}),()=>{var r;return He("div",{ref:n},(r=t.default)===null||r===void 0?void 0:r.call(t))}}});const zP=je({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const t=se(),n=$c();return xt(()=>{const r=e.editor;r&&r.options.element&&t.value&&bt(()=>{if(!t.value||!r.options.element.firstChild)return;const i=Rt(t.value);t.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,r.setOptions({element:i}),r.createNodeViews()})}),Io(()=>{const r=e.editor;if(!r||(r.isDestroyed||r.view.setProps({nodeViews:{}}),r.contentComponent=null,!r.options.element.firstChild))return;const i=document.createElement("div");i.append(...r.options.element.childNodes),r.setOptions({element:i})}),{rootEl:t}},render(){const e=[];return this.editor&&this.editor.vueRenderers.forEach(t=>{const n=He(jc,{to:t.teleportElement,key:t.id},He(t.component,J({ref:t.id},t.props)));e.push(n)}),He("div",{ref:t=>{this.rootEl=t}},...e)}}),FP=je({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:t}){const n=se(null);return Je(()=>{const{pluginKey:r,editor:i,tippyOptions:o,shouldShow:s}=e;i.registerPlugin(A0({pluginKey:r,editor:i,element:n.value,tippyOptions:o,shouldShow:s}))}),Io(()=>{const{pluginKey:r,editor:i}=e;i.unregisterPlugin(r)}),()=>{var r;return He("div",{ref:n},(r=t.default)===null||r===void 0?void 0:r.call(t))}}});je({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return He(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});je({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var e,t;return He(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))}});const qM=/^\s*>\s$/,JM=et.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Ss({find:qM,type:this.type})]}}),GM=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,YM=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,XM=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,QM=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,ZM=gn.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[mi({find:GM,type:this.type}),mi({find:XM,type:this.type})]},addPasteRules(){return[gi({find:YM,type:this.type}),gi({find:QM,type:this.type})]}}),eA=et.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Ue(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),E0=gn.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=ks(e,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),O0=/^\s*([-+*])\s$/,tA=et.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(eA.name,this.editor.getAttributes(E0.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Ss({find:O0,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Ss({find:O0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(E0.name),editor:this.editor})),[e]}}),nA=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,rA=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,iA=gn.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[mi({find:nA,type:this.type})]},addPasteRules(){return[gi({find:rA,type:this.type})]}}),oA=/^```([a-z]+)?[\s\n]$/,sA=/^~~~([a-z]+)?[\s\n]$/,aA=et.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,o=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",Ue(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(`
+
+`);return!o||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0||r.nodeAt(a)?!1:e.commands.exitCode()}}},addInputRules(){return[_d({find:oA,type:this.type,getAttributes:e=>({language:e[1]})}),_d({find:sA,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new gt({key:new yt("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(ke.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,`
+`)),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),lA=et.create({name:"doc",topNode:!0,content:"block+"});function cA(e={}){return new gt({view(t){return new uA(t,e)}})}class uA{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=s=>{this[i](s)};return t.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r;if(n){let a=t.nodeBefore,l=t.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),f=a?u.bottom:u.top;a&&l&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let o,s;if(!i||i==document.body&&getComputedStyle(i).position=="static")o=-pageXOffset,s=-pageYOffset;else{let a=i.getBoundingClientRect();o=a.left-i.scrollLeft,s=a.top-i.scrollTop}this.element.style.left=r.left-o+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,n,t):i;if(n&&!o){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Cg(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const dA=vt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[cA(this.options)]}});class it extends Se{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return it.valid(r)?new it(r):Se.near(r)}content(){return re.empty}eq(t){return t instanceof it&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new it(t.resolve(n.pos))}getBookmark(){return new Fd(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!fA(t)||!hA(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(t.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&it.valid(t))return t;let i=t.pos,o=null;for(let s=t.depth;;s--){let a=t.node(s);if(n>0?t.indexAfter(s)0){o=a.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;i+=n;let l=t.doc.resolve(i);if(it.valid(l))return l}for(;;){let s=n>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!be.isSelectable(o)){t=t.doc.resolve(i+o.nodeSize*n),r=!1;continue e}break}o=s,i+=n;let a=t.doc.resolve(i);if(it.valid(a))return a}return null}}}it.prototype.visible=!1;it.findFrom=it.findGapCursorFrom;Se.jsonID("gapcursor",it);class Fd{constructor(t){this.pos=t}map(t){return new Fd(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return it.valid(n)?new it(n):Se.near(n)}}function fA(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function hA(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function pA(){return new gt({props:{decorations:vA,createSelectionBetween(e,t,n){return t.pos==n.pos&&it.valid(n)?new it(n):null},handleClick:gA,handleKeyDown:mA,handleDOMEvents:{beforeinput:yA}}})}const mA=b1({ArrowLeft:ll("horiz",-1),ArrowRight:ll("horiz",1),ArrowUp:ll("vert",-1),ArrowDown:ll("vert",1)});function ll(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,i,o){let s=r.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof ke){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(t>0?a.after():a.before())}let c=it.findGapCursorFrom(a,t,l);return c?(i&&i(r.tr.setSelection(new it(c))),!0):!1}}function gA(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!it.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&be.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new it(r))),!0)}function yA(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof it))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=K.empty;for(let s=r.length-1;s>=0;s--)i=K.from(r[s].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new re(i,0,0));return o.setSelection(ke.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function vA(e){if(!(e.selection instanceof it))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Qe.create(e.doc,[Kt.widget(e.selection.head,t,{key:"gapcursor"})])}const bA=vt.create({name:"gapCursor",addProseMirrorPlugins(){return[pA()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Ze(ut(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),wA=et.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Ue(this.options.HTMLAttributes,e)]},renderText(){return`
+`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const f=l.filter(h=>a.includes(h.type.name));c.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),xA=et.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Ue(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>Me(J({},e),{[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>_d({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var cl=200,Pt=function(){};Pt.prototype.append=function(t){return t.length?(t=Pt.from(t),!this.length&&t||t.length=n?Pt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Pt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Pt.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};Pt.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(t(o,s))},n,r),i};Pt.from=function(t){return t instanceof Pt?t:t&&t.length?new T0(t):Pt.empty};var T0=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new t(this.values.slice(i,o))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,o,s,a){for(var l=o;l=s;l--)if(i(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=cl)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=cl)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Pt);Pt.empty=new T0([]);var kA=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return ra&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)===!1||o=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(Pt),P0=Pt;const SA=500;class Pn{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=t.tr,a,l,c=[],u=[];return this.items.forEach((f,h)=>{if(!f.step){i||(i=this.remapping(r,h+1),o=i.maps.length),o--,u.push(f);return}if(i){u.push(new Wn(f.map));let p=f.step.map(i.slice(o)),g;p&&s.maybeStep(p).doc&&(g=s.mapping.maps[s.mapping.maps.length-1],c.push(new Wn(g,void 0,void 0,c.length+u.length))),o--,g&&i.appendMap(g,o)}else s.maybeStep(f.step);if(f.selection)return a=i?f.selection.map(i.slice(o)):f.selection,l=new Pn(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let u=0;u_A&&(a=CA(a,c),s-=c),new Pn(a.append(o),s)}remapping(t,n){let r=new Xi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new Pn(this.items.append(t.map(n=>new Wn(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let g=o.maps[p];if(h.step){let v=t.steps[p].invert(t.docs[p]),b=h.selection&&h.selection.map(o.slice(l+1,p));b&&a++,r.push(new Wn(g,v,b))}else r.push(new Wn(g))},i);let c=[];for(let h=n;hSA&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=s.selection&&s.selection.map(n.slice(r));u&&o++;let f=new Wn(c.invert(),l,u),h,p=i.length-1;(h=i.length&&i[p].merge(f))?i[p]=h:i.push(f)}}else s.map&&r--},this.items.length,0),new Pn(P0.from(i.reverse()),o)}}Pn.empty=new Pn(P0.empty,0);function CA(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}class Wn{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new Wn(n.getMap().invert(),n,this.selection)}}}class Or{constructor(t,n,r,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i}}const _A=20;function MA(e,t,n,r){let i=n.getMeta(Tr),o;if(i)return i.historyState;n.getMeta(EA)&&(e=new Or(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Tr))return s.getMeta(Tr).redo?new Or(e.done.addTransform(n,void 0,r,ul(t)),e.undone,R0(n.mapping.maps[n.steps.length-1]),e.prevTime):new Or(e.done,e.undone.addTransform(n,void 0,r,ul(t)),null,e.prevTime);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=e.prevTime==0||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!AA(n,e.prevRanges)),l=s?Vd(e.prevRanges,n.mapping):R0(n.mapping.maps[n.steps.length-1]);return new Or(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,ul(t)),Pn.empty,l,n.time)}else return(o=n.getMeta("rebased"))?new Or(e.done.rebased(n,o),e.undone.rebased(n,o),Vd(e.prevRanges,n.mapping),e.prevTime):new Or(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Vd(e.prevRanges,n.mapping),e.prevTime)}function AA(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let o=0;o=t[o]&&(n=!0)}),n}function R0(e){let t=[];return e.forEach((n,r,i,o)=>t.push(i,o)),t}function Vd(e,t){if(!e)return null;let n=[];for(let r=0;r{let n=Tr.getState(e);return!n||n.done.eventCount==0?!1:(t&&j0(n,e,t,!1),!0)},D0=(e,t)=>{let n=Tr.getState(e);return!n||n.undone.eventCount==0?!1:(t&&j0(n,e,t,!0),!0)},TA=vt.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>L0(e,t),redo:()=>({state:e,dispatch:t})=>D0(e,t)}},addProseMirrorPlugins(){return[OA(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}}),PA=et.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Ue(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{$to:n}=t.selection,r=e();return n.parentOffset===0?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:i,dispatch:o})=>{var s;if(o){const{$to:a}=i.selection,l=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?i.setSelection(ke.create(i.doc,a.pos+1)):a.nodeAfter.isBlock?i.setSelection(be.create(i.doc,a.pos)):i.setSelection(ke.create(i.doc,a.pos));else{const c=(s=a.parent.type.contentMatch.defaultType)===null||s===void 0?void 0:s.create();c&&(i.insert(l,c),i.setSelection(ke.create(i.doc,l+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[V1({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),RA=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,jA=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,NA=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,LA=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,DA=gn.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[mi({find:RA,type:this.type}),mi({find:NA,type:this.type})]},addPasteRules(){return[gi({find:jA,type:this.type}),gi({find:LA,type:this.type})]}}),IA=et.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Ue(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),$A=et.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Ue(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),I0=gn.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=ks(e,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),$0=/^(\d+)\.\s$/,BA=et.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const r=e,{start:t}=r,n=Ve(r,["start"]);return t===1?["ol",Ue(this.options.HTMLAttributes,n),0]:["ol",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes($A.name,this.editor.getAttributes(I0.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Ss({find:$0,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Ss({find:$0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>J({start:+t[1]},this.editor.getAttributes(I0.name)),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),HA=et.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),zA=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,FA=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,VA=gn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){const e={};return vd()?e["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():e["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),e},addInputRules(){return[mi({find:zA,type:this.type})]},addPasteRules(){return[gi({find:FA,type:this.type})]}}),WA=et.create({name:"text",group:"inline"}),VP=vt.create({name:"starterKit",addExtensions(){var e,t,n,r,i,o,s,a,l,c,u,f,h,p,g,v,b,w;const k=[];return this.options.blockquote!==!1&&k.push(JM.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bold!==!1&&k.push(ZM.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.bulletList!==!1&&k.push(tA.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&k.push(iA.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&k.push(aA.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&k.push(lA.configure((o=this.options)===null||o===void 0?void 0:o.document)),this.options.dropcursor!==!1&&k.push(dA.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&k.push(bA.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&k.push(wA.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&k.push(xA.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&k.push(TA.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&k.push(PA.configure((f=this.options)===null||f===void 0?void 0:f.horizontalRule)),this.options.italic!==!1&&k.push(DA.configure((h=this.options)===null||h===void 0?void 0:h.italic)),this.options.listItem!==!1&&k.push(IA.configure((p=this.options)===null||p===void 0?void 0:p.listItem)),this.options.orderedList!==!1&&k.push(BA.configure((g=this.options)===null||g===void 0?void 0:g.orderedList)),this.options.paragraph!==!1&&k.push(HA.configure((v=this.options)===null||v===void 0?void 0:v.paragraph)),this.options.strike!==!1&&k.push(VA.configure((b=this.options)===null||b===void 0?void 0:b.strike)),this.options.text!==!1&&k.push(WA.configure((w=this.options)===null||w===void 0?void 0:w.text)),k}}),WP=vt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new gt({key:new yt("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,i=[];if(!n)return null;const o=e.type.createAndFill(),s=(o==null?void 0:o.sameMarkup(e))&&o.content.findDiffStart(e.content)===null;return e.descendants((a,l)=>{const c=r>=l&&r<=l+a.nodeSize,u=!a.isLeaf&&!a.childCount;if((c||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const h=Kt.node(l,l+a.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:c}):this.options.placeholder});i.push(h)}return this.options.includeChildren}),Qe.create(e,i)}}})]}}),UP=vt.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.textAlign||this.options.defaultAlignment,renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${e.textAlign}`}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.every(n=>t.updateAttributes(n,{textAlign:e})):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var Ud,Kd;if(typeof WeakMap!="undefined"){let e=new WeakMap;Ud=t=>e.get(t),Kd=(t,n)=>(e.set(t,n),n)}else{const e=[],t=10;let n=0;Ud=r=>{for(let i=0;i(n==t&&(n=0),e[n++]=r,e[n++]=i)}var ot=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:w-A});break}const d=i+A*t;for(let y=0;yr&&(o+=c.attrs.colspan)}}for(let s=0;s1&&(n=!0)}t==-1?t=o:t!=o&&(t=Math.max(t,o))}return t}function qA(e,t,n){e.problems||(e.problems=[]);const r={};for(let i=0;i0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function GA(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function Rn(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function dl(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=go(t.$head)||YA(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function YA(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function qd(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function XA(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Jd(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function B0(e,t,n){const r=e.node(-1),i=ot.get(r),o=e.start(-1),s=i.nextCell(e.pos-o,t,n);return s==null?null:e.node(0).resolve(o+s)}function wi(e,t,n=1){const r=Me(J({},e),{colspan:e.colspan-n});return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function H0(e,t,n=1){const r=Me(J({},e),{colspan:e.colspan+n});if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;ic!=t.pos-i);a.unshift(t.pos-i);const l=a.map(c=>{const u=n.nodeAt(c);if(!u)throw RangeError(`No cell with offset ${c} found`);const f=i+c+1;return new Tg(s.resolve(f),s.resolve(f+u.content.size))});super(l[0].$from,l[0].$to,l);this.$anchorCell=e,this.$headCell=t}map(e,t){const n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(qd(n)&&qd(r)&&Jd(n,r)){const i=this.$anchorCell.node(-1)!=n.node(-1);return i&&this.isRowSelection()?De.rowSelection(n,r):i&&this.isColSelection()?De.colSelection(n,r):new De(n,r)}return ke.between(n,r)}content(){const e=this.$anchorCell.node(-1),t=ot.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},o=[];for(let a=r.top;a0||v>0){let b=p.attrs;if(g>0&&(b=wi(b,0,g)),v>0&&(b=wi(b,b.colspan-v,v)),h.leftr.bottom){const b=Me(J({},p.attrs),{rowspan:Math.min(h.bottom,r.bottom)-Math.max(h.top,r.top)});h.top0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const n=e.node(-1),r=ot.get(n),i=e.start(-1),o=r.findCell(e.pos-i),s=r.findCell(t.pos-i),a=e.node(0);return o.top<=s.top?(o.top>0&&(e=a.resolve(i+r.map[o.left])),s.bottom0&&(t=a.resolve(i+r.map[s.left])),o.bottom0)return!1;const o=r+this.$anchorCell.nodeAfter.attrs.colspan,s=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,s)==t.width}eq(e){return e instanceof De&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const n=e.node(-1),r=ot.get(n),i=e.start(-1),o=r.findCell(e.pos-i),s=r.findCell(t.pos-i),a=e.node(0);return o.left<=s.left?(o.left>0&&(e=a.resolve(i+r.map[o.top*r.width])),s.right0&&(t=a.resolve(i+r.map[s.top*r.width])),o.right{t.push(Kt.node(r,r+n.nodeSize,{class:"selectedCell"}))}),Qe.create(e.doc,t)}function eE({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(i+1)=0&&!(t.before(o+1)>t.start(o));o--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function tE({$from:e,$to:t}){let n,r;for(let i=e.depth;i>0;i--){const o=e.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){n=o;break}}for(let i=t.depth;i>0;i--){const o=t.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=o;break}}return n!==r&&t.parentOffset===0}function nE(e,t,n){const r=(t||e).selection,i=(t||e).doc;let o,s;if(r instanceof be&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=De.create(i,r.from);else if(s=="row"){const a=i.resolve(r.from+1);o=De.rowSelection(a,a)}else if(!n){const a=ot.get(r.node),l=r.from+1,c=l+a.map[a.width*a.height-1];o=De.create(i,l+1,c)}}else r instanceof ke&&eE(r)?o=ke.create(i,r.from):r instanceof ke&&tE(r)&&(o=ke.create(i,r.$from.start(),r.$from.end()));return o&&(t||(t=e.tr)).setSelection(o),t}var rE=new yt("fix-tables");function F0(e,t,n,r){const i=e.childCount,o=t.childCount;e:for(let s=0,a=0;s{i.type.spec.tableRole=="table"&&(n=iE(e,i,o,n))};return t?t.doc!=e.doc&&F0(t.doc,e.doc,0,r):e.doc.descendants(r),n}function iE(e,t,n,r){const i=ot.get(t);if(!i.problems)return r;r||(r=e.tr);const o=[];for(let l=0;l0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const g=[];for(let b=0;b0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const i=t.child(0),o=i.type.spec.tableRole,s=i.type.schema,a=[];if(o=="row")for(let l=0;l=0;s--){const{rowspan:a,colspan:l}=o.child(s).attrs;for(let c=i;c=t.length&&t.push(K.empty),n[i]r&&(h=h.type.createChecked(wi(h.attrs,h.attrs.colspan,u+h.attrs.colspan-r),h.content)),c.push(h),u+=h.attrs.colspan;for(let p=1;pi&&(f=f.type.create(Me(J({},f.attrs),{rowspan:Math.max(1,i-f.attrs.rowspan)}),f.content)),l.push(f)}o.push(K.from(l))}n=o,t=i}return{width:e,height:t,rows:n}}function lE(e,t,n,r,i,o,s){const a=e.doc.type.schema,l=Nt(a);let c,u;if(i>t.width)for(let f=0,h=0;ft.height){const f=[];for(let g=0,v=(t.height-1)*t.width;g=t.width?!1:n.nodeAt(t.map[v+g]).type==l.header_cell;f.push(b?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,K.from(f)),p=[];for(let g=t.height;g{if(!i)return!1;const o=n.selection;if(o instanceof De)return fl(n,r,Se.near(o.$headCell,t));if(e!="horiz"&&!o.empty)return!1;const s=q0(i,e,t);if(s==null)return!1;if(e=="horiz")return fl(n,r,Se.near(n.doc.resolve(o.head+t),t));{const a=n.doc.resolve(s),l=B0(a,e,t);let c;return l?c=Se.near(l,1):t<0?c=Se.near(n.doc.resolve(a.before(-1)),-1):c=Se.near(n.doc.resolve(a.after(-1)),1),fl(n,r,c)}}}function pl(e,t){return(n,r,i)=>{if(!i)return!1;const o=n.selection;let s;if(o instanceof De)s=o;else{const l=q0(i,e,t);if(l==null)return!1;s=new De(n.doc.resolve(l))}const a=B0(s.$headCell,e,t);return a?fl(n,r,new De(s.$anchorCell,a)):!1}}function ml(e,t){const n=e.selection;if(!(n instanceof De))return!1;if(t){const r=e.tr,i=Nt(e.schema).cell.createAndFill().content;n.forEachCell((o,s)=>{o.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+o.nodeSize-1),new re(i,0,0))}),r.docChanged&&t(r)}return!0}function uE(e,t){const n=e.state.doc,r=go(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new De(r))),!0):!1}function dE(e,t,n){if(!Rn(e.state))return!1;let r=oE(n);const i=e.state.selection;if(i instanceof De){r||(r={width:1,height:1,rows:[K.from(Gd(Nt(e.state.schema).cell,n))]});const o=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),a=ot.get(o).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=aE(r,a.right-a.left,a.bottom-a.top),K0(e.state,e.dispatch,s,a,r),!0}else if(r){const o=dl(e.state),s=o.start(-1);return K0(e.state,e.dispatch,s,ot.get(o.node(-1)).findCell(o.pos-s),r),!0}else return!1}function fE(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=J0(e,t.target);let i;if(t.shiftKey&&e.state.selection instanceof De)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=go(e.state.selection.$anchor))!=null&&((n=Yd(e,t))==null?void 0:n.pos)!=i.pos)o(i,t),t.preventDefault();else if(!r)return;function o(l,c){let u=Yd(e,c);const f=Pr.getState(e.state)==null;if(!u||!Jd(l,u))if(f)u=l;else return;const h=new De(l,u);if(f||!e.state.selection.eq(h)){const p=e.state.tr.setSelection(h);f&&p.setMeta(Pr,l.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),Pr.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Pr,-1))}function a(l){const c=l,u=Pr.getState(e.state);let f;if(u!=null)f=e.state.doc.resolve(u);else if(J0(e,c.target)!=r&&(f=Yd(e,t),!f))return s();f&&o(f,c)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function q0(e,t,n){if(!(e.state.selection instanceof ke))return null;const{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){const o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const a=r.before(i),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?a:null}}return null}function J0(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Yd(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?go(e.state.doc.resolve(n.pos)):null}var hE=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Xd(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Xd(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Xd(e,t,n,r,i,o){var s;let a=0,l=!0,c=t.firstChild;const u=e.firstChild;if(!!u){for(let f=0,h=0;fnew n(a,t,l),new gl(-1,!1)},apply(o,s){return s.apply(o)}},props:{attributes:o=>{const s=wn.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{mE(o,s,e,t,r)},mouseleave:o=>{gE(o)},mousedown:(o,s)=>{yE(o,s,t)}},decorations:o=>{const s=wn.getState(o);if(s&&s.activeHandle>-1)return SE(o,s.activeHandle)},nodeViews:{}}});return i}var gl=class{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,n=e.getMeta(wn);if(n&&n.setHandle!=null)return new gl(n.setHandle,!1);if(n&&n.setDragging!==void 0)return new gl(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let r=e.mapping.map(t.activeHandle,-1);return qd(e.doc.resolve(r))||(r=-1),new gl(r,t.dragging)}return t}};function mE(e,t,n,r,i){const o=wn.getState(e.state);if(!!o&&!o.dragging){const s=bE(t.target);let a=-1;if(s){const{left:l,right:c}=s.getBoundingClientRect();t.clientX-l<=n?a=G0(e,t,"left"):c-t.clientX<=n&&(a=G0(e,t,"right"))}if(a!=o.activeHandle){if(!i&&a!==-1){const l=e.state.doc.resolve(a),c=l.node(-1),u=ot.get(c),f=l.start(-1);if(u.colCount(l.pos-f)+l.nodeAfter.attrs.colspan-1==u.width-1)return}X0(e,a)}}}function gE(e){const t=wn.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&X0(e,-1)}function yE(e,t,n){const r=wn.getState(e.state);if(!r||r.activeHandle==-1||r.dragging)return!1;const i=e.state.doc.nodeAt(r.activeHandle),o=vE(e,r.activeHandle,i.attrs);e.dispatch(e.state.tr.setMeta(wn,{setDragging:{startX:t.clientX,startWidth:o}}));function s(l){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);const c=wn.getState(e.state);(c==null?void 0:c.dragging)&&(wE(e,c.activeHandle,Y0(c.dragging,l,n)),e.dispatch(e.state.tr.setMeta(wn,{setDragging:null})))}function a(l){if(!l.which)return s(l);const c=wn.getState(e.state);if(!!c&&c.dragging){const u=Y0(c.dragging,l,n);xE(e,c.activeHandle,u,n)}}return window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),t.preventDefault(),!0}function vE(e,t,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const o=e.domAtPos(t);let a=o.node.childNodes[o.offset].offsetWidth,l=n;if(r)for(let c=0;c0?-1:0;QA(t,r,i+o)&&(o=i==0||i==t.width?null:0);for(let s=0;s0&&i0&&t.map[a-1]==l||i0?-1:0;EE(t,r,i+l)&&(l=i==0||i==t.height?null:0);for(let c=0,u=t.width*i;c0&&i0&&u==t.map[c-t.width]){const f=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(a).map(u+r),null,Me(J({},f),{rowspan:f.rowspan-1})),l+=f.colspan-1}else if(i0&&n[o]==n[o-1]||r.right0&&n[i]==n[i-e]||r.bottomn[r.type.spec.tableRole])(e,t)}function NE(e){return(t,n)=>{var r;const i=t.selection;let o,s;if(i instanceof De){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;o=i.$anchorCell.nodeAfter,s=i.$anchorCell.pos}else{if(o=GA(i.$from),!o)return!1;s=(r=go(i.$from))==null?void 0:r.pos}if(o==null||s==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let a=o.attrs;const l=[],c=a.colwidth;a.rowspan>1&&(a=Me(J({},a),{rowspan:1})),a.colspan>1&&(a=Me(J({},a),{colspan:1}));const u=Un(t),f=t.tr;for(let p=0;p{s.attrs[e]!==t&&o.setNodeMarkup(a,null,Me(J({},s.attrs),{[e]:t}))}):o.setNodeMarkup(i.pos,null,Me(J({},i.nodeAfter.attrs),{[e]:t})),r(o)}return!0}}function DE(e){return function(t,n){if(!Rn(t))return!1;if(n){const r=Nt(t.schema),i=Un(t),o=t.tr,s=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(l=>i.table.nodeAt(l));for(let l=0;l{const g=p+o.tableStart,v=s.doc.nodeAt(g);v&&s.setNodeMarkup(g,h,v.attrs)}),r(s)}return!0}}Rs("row",{useDeprecatedLogic:!0});Rs("column",{useDeprecatedLogic:!0});var IE=Rs("cell",{useDeprecatedLogic:!0});function $E(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,i=e.before();r>=0;r--){const o=e.node(-1).child(r),s=o.lastChild;if(s)return i-1-s.nodeSize;i-=o.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function HE({allowTableNodeSelection:e=!1}={}){return new gt({key:Pr,state:{init(){return null},apply(t,n){const r=t.getMeta(Pr);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:i,pos:o}=t.mapping.mapResult(n);return i?null:o}},props:{decorations:ZA,handleDOMEvents:{mousedown:fE},createSelectionBetween(t){return Pr.getState(t.state)!=null?t.state.selection:null},handleTripleClick:uE,handleKeyDown:cE,handlePaste:dE},appendTransaction(t,n,r){return nE(r,V0(r,n),e)}})}function oy(e,t,n,r,i,o){let s=0,a=!0,l=t.firstChild;const c=e.firstChild;for(let u=0,f=0;u{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function VE(e,t,n,r,i){const o=FE(e),s=[],a=[];for(let c=0;c{const{selection:t}=e.state;if(!WE(t))return!1;let n=0;const r=B1(t.ranges[0].$from,o=>o.type.name==="table");return r==null||r.node.descendants(o=>{if(o.type.name==="table")return!1;["tableCell","tableHeader"].includes(o.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},KP=et.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:zE,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({HTMLAttributes:e}){return["table",Ue(this.options.HTMLAttributes,e),["tbody",0]]},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:o})=>{const s=VE(o.schema,e,t,n);if(i){const a=r.selection.anchor+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(ke.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>CE(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>_E(e,t),deleteColumn:()=>({state:e,dispatch:t})=>AE(e,t),addRowBefore:()=>({state:e,dispatch:t})=>OE(e,t),addRowAfter:()=>({state:e,dispatch:t})=>TE(e,t),deleteRow:()=>({state:e,dispatch:t})=>RE(e,t),deleteTable:()=>({state:e,dispatch:t})=>BE(e,t),mergeCells:()=>({state:e,dispatch:t})=>ty(e,t),splitCell:()=>({state:e,dispatch:t})=>ny(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Rs("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Rs("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>IE(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>ty(e,t)?!0:ny(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>LE(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>iy(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>iy(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&V0(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){const r=De.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:yl,"Mod-Backspace":yl,Delete:yl,"Mod-Delete":yl}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[pE({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],HE({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){const t={name:e.name,options:e.options,storage:e.storage};return{tableRole:Ze(ut(e,"tableRole",t))}}}),qP=et.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",Ue(this.options.HTMLAttributes,e),0]}}),JP=et.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",Ue(this.options.HTMLAttributes,e),0]}}),GP=et.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",Ue(this.options.HTMLAttributes,e),0]}});var ay=e=>new Promise(t=>{let n=new FileReader;n.onloadend=()=>{t(n.result)},n.readAsDataURL(e)});const UE=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/;var YP=et.create({name:"image",addOptions(){return{inline:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:"img[src]"}]},renderHTML({HTMLAttributes:e}){return["img",Ue(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[V1({find:UE,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]},addProseMirrorPlugins(){return[KE()]}});const KE=()=>new gt({props:{handlePaste(e,t,n){var o;const r=Array.from(((o=t.clipboardData)==null?void 0:o.items)||[]),{schema:i}=e.state;return r.forEach(s=>{const a=s.getAsFile();!a||s.type.indexOf("image")===0&&(t.preventDefault(),ay(a).then(l=>{const c=i.nodes.image.create({src:l}),u=e.state.tr.replaceSelectionWith(c);e.dispatch(u)}))}),!1},handleDOMEvents:{drop:(e,t)=>{var s,a;if(!(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length))return!1;const r=Array.from((a=(s=t.dataTransfer)==null?void 0:s.files)!=null?a:[]).filter(l=>/image/i.test(l.type));if(r.length===0)return!1;t.preventDefault();const{schema:i}=e.state,o=e.posAtCoords({left:t.clientX,top:t.clientY});return o?(r.forEach(l=>Ir(void 0,null,function*(){ay(l).then(c=>{const u=i.nodes.image.create({src:c}),f=e.state.tr.insert(o.pos,u);e.dispatch(f)})})),!0):!1}}}}),XP=et.create({name:"video",group:"block",selectable:!0,draggable:!0,atom:!0,addAttributes(){return{src:{default:null}}},parseHTML(){return[{tag:"video"}]},renderHTML({HTMLAttributes:e}){return["video",Ue(e)]},addNodeView(){return({editor:e,node:t})=>{const n=document.createElement("div");n.className="relative aspect-w-16 aspect-h-9"+(e.isEditable?" cursor-pointer":"");const r=document.createElement("video");if(e.isEditable&&(r.className="pointer-events-none"),r.src=t.attrs.src,!e.isEditable)r.setAttribute("controls","");else{let i=document.createElement("div");i.className="absolute top-0 right-0 text-xs m-2 bg-gray-800 text-white px-2 py-1 rounded-md",i.innerHTML="Video",n.append(i)}return n.append(r),{dom:n}}}}),qE="aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",JE="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u062A\u0635\u0627\u0644\u0627\u062A6\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",yo=(e,t)=>{for(const n in t)e[n]=t[n];return e},Qd="numeric",Zd="ascii",ef="alpha",vl="asciinumeric",bl="alphanumeric",tf="domain",ly="emoji",GE="scheme",YE="slashscheme",cy="whitespace";function XE(e,t){return e in t||(t[e]=[]),t[e]}function xi(e,t,n){t[Qd]&&(t[vl]=!0,t[bl]=!0),t[Zd]&&(t[vl]=!0,t[ef]=!0),t[vl]&&(t[bl]=!0),t[ef]&&(t[bl]=!0),t[bl]&&(t[tf]=!0),t[ly]&&(t[tf]=!0);for(const r in t){const i=XE(r,n);i.indexOf(e)<0&&i.push(e)}}function QE(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Gt(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}Gt.groups={};Gt.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,i),xn=(e,t,n,r,i)=>e.tr(t,n,r,i),uy=(e,t,n,r,i)=>e.ts(t,n,r,i),Z=(e,t,n,r,i)=>e.tt(t,n,r,i),ir="WORD",nf="UWORD",js="LOCALHOST",rf="TLD",of="UTLD",wl="SCHEME",vo="SLASH_SCHEME",sf="NUM",dy="WS",af="NL",bo="OPENBRACE",Ns="OPENBRACKET",Ls="OPENANGLEBRACKET",Ds="OPENPAREN",ki="CLOSEBRACE",wo="CLOSEBRACKET",xo="CLOSEANGLEBRACKET",Si="CLOSEPAREN",xl="AMPERSAND",kl="APOSTROPHE",Sl="ASTERISK",Rr="AT",Cl="BACKSLASH",_l="BACKTICK",Ml="CARET",jr="COLON",lf="COMMA",Al="DOLLAR",Kn="DOT",El="EQUALS",cf="EXCLAMATION",qn="HYPHEN",Ol="PERCENT",Tl="PIPE",Pl="PLUS",Rl="POUND",jl="QUERY",uf="QUOTE",df="SEMI",Jn="SLASH",Is="TILDE",Nl="UNDERSCORE",fy="EMOJI",Ll="SYM";var hy=Object.freeze({__proto__:null,WORD:ir,UWORD:nf,LOCALHOST:js,TLD:rf,UTLD:of,SCHEME:wl,SLASH_SCHEME:vo,NUM:sf,WS:dy,NL:af,OPENBRACE:bo,OPENBRACKET:Ns,OPENANGLEBRACKET:Ls,OPENPAREN:Ds,CLOSEBRACE:ki,CLOSEBRACKET:wo,CLOSEANGLEBRACKET:xo,CLOSEPAREN:Si,AMPERSAND:xl,APOSTROPHE:kl,ASTERISK:Sl,AT:Rr,BACKSLASH:Cl,BACKTICK:_l,CARET:Ml,COLON:jr,COMMA:lf,DOLLAR:Al,DOT:Kn,EQUALS:El,EXCLAMATION:cf,HYPHEN:qn,PERCENT:Ol,PIPE:Tl,PLUS:Pl,POUND:Rl,QUERY:jl,QUOTE:uf,SEMI:df,SLASH:Jn,TILDE:Is,UNDERSCORE:Nl,EMOJI:fy,SYM:Ll});const ko=/[a-z]/,ff=/\p{L}/u,hf=/\p{Emoji}/u,pf=/\d/,py=/\s/,my=`
+`,ZE="\uFE0F",e4="\u200D";let Dl=null,Il=null;function t4(e){e===void 0&&(e=[]);const t={};Gt.groups=t;const n=new Gt;Dl==null&&(Dl=gy(qE)),Il==null&&(Il=gy(JE)),Z(n,"'",kl),Z(n,"{",bo),Z(n,"[",Ns),Z(n,"<",Ls),Z(n,"(",Ds),Z(n,"}",ki),Z(n,"]",wo),Z(n,">",xo),Z(n,")",Si),Z(n,"&",xl),Z(n,"*",Sl),Z(n,"@",Rr),Z(n,"`",_l),Z(n,"^",Ml),Z(n,":",jr),Z(n,",",lf),Z(n,"$",Al),Z(n,".",Kn),Z(n,"=",El),Z(n,"!",cf),Z(n,"-",qn),Z(n,"%",Ol),Z(n,"|",Tl),Z(n,"+",Pl),Z(n,"#",Rl),Z(n,"?",jl),Z(n,'"',uf),Z(n,"/",Jn),Z(n,";",df),Z(n,"~",Is),Z(n,"_",Nl),Z(n,"\\",Cl);const r=xn(n,pf,sf,{[Qd]:!0});xn(r,pf,r);const i=xn(n,ko,ir,{[Zd]:!0});xn(i,ko,i);const o=xn(n,ff,nf,{[ef]:!0});xn(o,ko),xn(o,ff,o);const s=xn(n,py,dy,{[cy]:!0});Z(n,my,af,{[cy]:!0}),Z(s,my),xn(s,py,s);const a=xn(n,hf,fy,{[ly]:!0});xn(a,hf,a),Z(a,ZE,a);const l=Z(a,e4);xn(l,hf,a);const c=[[ko,i]],u=[[ko,null],[ff,o]];for(let f=0;ff[0]>h[0]?1:-1);for(let f=0;f=0?g[tf]=!0:ko.test(h)?pf.test(h)?g[vl]=!0:g[Zd]=!0:g[Qd]=!0,uy(n,h,h,g)}return uy(n,"localhost",js,{ascii:!0}),n.jd=new Gt(Ll),{start:n,tokens:yo({groups:t},hy)}}function n4(e,t){const n=r4(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let o=0,s=0;for(;s=0&&(f+=n[s].length,h++),c+=n[s].length,o+=n[s].length,s++;o-=f,s-=h,c-=f,i.push({t:u.t,v:t.slice(o-c,o),s:o-c,e:o})}return i}function r4(e){const t=[],n=e.length;let r=0;for(;r56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function Nr(e,t,n,r,i){let o;const s=t.length;for(let a=0;a=0;)o++;if(o>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+o),10);s>0;s--)n.pop();r+=o}else n.push(e[r]),r++}return t}const $s={defaultProtocol:"http",events:null,format:yy,formatHref:yy,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function mf(e,t){t===void 0&&(t=null);let n=yo({},$s);e&&(n=yo(n,e instanceof mf?e.o:e));const r=n.ignoreTags,i=[];for(let o=0;on?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=$s.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),s={},a=e.get("className",n,t),l=e.get("target",n,t),c=e.get("rel",n,t),u=e.getObj("attributes",n,t),f=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),u&&yo(s,u),{tagName:i,attributes:s,content:o,eventListeners:f}}};function $l(e,t){class n extends vy{constructor(i,o){super(i,o);this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const by=$l("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),wy=$l("text"),i4=$l("nl"),Ci=$l("url",{isLink:!0,toHref(e){return e===void 0&&(e=$s.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==js&&e[1].t===jr}}),Mt=e=>new Gt(e);function o4(e){let{groups:t}=e;const n=t.domain.concat([xl,Sl,Rr,Cl,_l,Ml,Al,El,qn,sf,Ol,Tl,Pl,Rl,Jn,Ll,Is,Nl]),r=[kl,xo,ki,wo,Si,jr,lf,Kn,cf,Ls,bo,Ns,Ds,jl,uf,df],i=[xl,kl,Sl,Cl,_l,Ml,ki,Al,El,qn,bo,Ol,Tl,Pl,Rl,jl,Jn,Ll,Is,Nl],o=Mt(),s=Z(o,Is);me(s,i,s),me(s,t.domain,s);const a=Mt(),l=Mt(),c=Mt();me(o,t.domain,a),me(o,t.scheme,l),me(o,t.slashscheme,c),me(a,i,s),me(a,t.domain,a);const u=Z(a,Rr);Z(s,Rr,u),Z(l,Rr,u),Z(c,Rr,u);const f=Z(s,Kn);me(f,i,s),me(f,t.domain,s);const h=Mt();me(u,t.domain,h),me(h,t.domain,h);const p=Z(h,Kn);me(p,t.domain,h);const g=Mt(by);me(p,t.tld,g),me(p,t.utld,g),Z(u,js,g);const v=Z(h,qn);me(v,t.domain,h),me(g,t.domain,h),Z(g,Kn,p),Z(g,qn,v);const b=Z(g,jr);me(b,t.numeric,by);const w=Z(a,qn),k=Z(a,Kn);me(w,t.domain,a),me(k,i,s),me(k,t.domain,a);const A=Mt(Ci);me(k,t.tld,A),me(k,t.utld,A),me(A,t.domain,a),me(A,i,s),Z(A,Kn,k),Z(A,qn,w),Z(A,Rr,u);const d=Z(A,jr),y=Mt(Ci);me(d,t.numeric,y);const m=Mt(Ci),x=Mt();me(m,n,m),me(m,r,x),me(x,n,m),me(x,r,x),Z(A,Jn,m),Z(y,Jn,m);const S=Z(l,jr),_=Z(c,jr),C=Z(_,Jn),E=Z(C,Jn);me(l,t.domain,a),Z(l,Kn,k),Z(l,qn,w),me(c,t.domain,a),Z(c,Kn,k),Z(c,qn,w),me(S,t.domain,m),Z(S,Jn,m),me(E,t.domain,m),me(E,n,m),Z(E,Jn,m);const T=Z(m,bo),R=Z(m,Ns),N=Z(m,Ls),D=Z(m,Ds);Z(x,bo,T),Z(x,Ns,R),Z(x,Ls,N),Z(x,Ds,D),Z(T,ki,m),Z(R,wo,m),Z(N,xo,m),Z(D,Si,m),Z(T,ki,m);const M=Mt(Ci),P=Mt(Ci),L=Mt(Ci),H=Mt(Ci);me(T,n,M),me(R,n,P),me(N,n,L),me(D,n,H);const te=Mt(),q=Mt(),ae=Mt(),ge=Mt();return me(T,r),me(R,r),me(N,r),me(D,r),me(M,n,M),me(P,n,P),me(L,n,L),me(H,n,H),me(M,r,M),me(P,r,P),me(L,r,L),me(H,r,H),me(te,n,te),me(q,n,P),me(ae,n,L),me(ge,n,H),me(te,r,te),me(q,r,q),me(ae,r,ae),me(ge,r,ge),Z(P,wo,m),Z(L,xo,m),Z(H,Si,m),Z(M,ki,m),Z(q,wo,m),Z(ae,xo,m),Z(ge,Si,m),Z(te,Si,m),Z(o,js,A),Z(o,af,i4),{start:o,tokens:hy}}function s4(e,t,n){let r=n.length,i=0,o=[],s=[];for(;i=0&&h++,i++,u++;if(h<0)i-=u,i0&&(o.push(gf(wy,t,s)),s=[]),i-=h,u-=h;const p=f.t,g=n.slice(i-u,i);o.push(gf(p,t,g))}}return s.length>0&&o.push(gf(wy,t,s)),o}function gf(e,t,n){const r=n[0].s,i=n[n.length-1].e,o=t.slice(r,i);return new e(o,n)}const a4=typeof console!="undefined"&&console&&console.warn||(()=>{}),l4="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",tt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function c4(){Gt.groups={},tt.scanner=null,tt.parser=null,tt.tokenQueue=[],tt.pluginQueue=[],tt.customSchemes=[],tt.initialized=!1}function xy(e,t){if(t===void 0&&(t=!1),tt.initialized&&a4(`linkifyjs: already initialized - will not register custom scheme "${e}" ${l4}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
+ 1. Must only contain digits, lowercase ASCII letters or "-"
+ 2. Cannot start or end with "-"
+ 3. "-" cannot repeat`);tt.customSchemes.push([e,t])}function u4(){tt.scanner=t4(tt.customSchemes);for(let e=0;e{const i=t.some(c=>c.docChanged)&&!n.doc.eq(r.doc),o=t.some(c=>c.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=BC(n.doc,[...t]);if(KC(a).forEach(({newRange:c})=>{const u=zC(r.doc,c,p=>p.isTextblock);let f,h;if(u.length>1?(f=u[0],h=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):u.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(f=u[0],h=r.doc.textBetween(f.pos,c.to,void 0," ")),f&&h){const p=h.split(" ").filter(b=>b!=="");if(p.length<=0)return!1;const g=p[p.length-1],v=f.pos+h.lastIndexOf(g);if(!g)return!1;yf(g).filter(b=>b.isLink).map(b=>Me(J({},b),{from:v+b.start+1,to:v+b.end+1})).filter(b=>r.schema.marks.code?!r.doc.rangeHasMark(b.from,b.to,r.schema.marks.code):!0).filter(b=>e.validate?e.validate(b.value):!0).forEach(b=>{kd(b.from,b.to,r.doc).some(w=>w.mark.type===e.type)||s.addMark(b.from,b.to,e.type.create({href:b.href}))})}}),!!s.steps.length)return s}})}function h4(e){return new gt({key:new yt("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,o;if(r.button!==0||r.target.nodeName!=="A")return!1;const a=VC(t.state,e.type.name),l=r.target,c=(i=l==null?void 0:l.href)!==null&&i!==void 0?i:a.href,u=(o=l==null?void 0:l.target)!==null&&o!==void 0?o:a.target;return l&&c?(t.editable&&window.open(c,u),!0):!1}}})}function p4(e){return new gt({key:new yt("handlePasteLink"),props:{handlePaste:(t,n,r)=>{var i,o;const{state:s}=t,{selection:a}=s;if(s.doc.resolve(a.from).parent.type.spec.code)return!1;let l="";r.content.forEach(k=>{l+=k.textContent});let c=!1;if(r.content.descendants(k=>{k.marks.some(A=>A.type.name===e.type.name)&&(c=!0)}),c)return;const u=yf(l).find(k=>k.isLink&&k.value===l);if(!a.empty&&e.linkOnPaste){const k=(u==null?void 0:u.href)||null;if(k)return e.editor.commands.setMark(e.type,{href:k}),!0}const f=((i=r.content.firstChild)===null||i===void 0?void 0:i.type.name)==="text",h=(o=r.content.firstChild)===null||o===void 0?void 0:o.marks.some(k=>k.type.name===e.type.name);if(f&&h||!e.linkOnPaste)return!1;if(u&&a.empty)return e.editor.commands.insertContent(`${u.href}`),!0;const{tr:p}=s;let g=!1;a.empty||(g=!0,p.delete(a.from,a.to));let v=a.from,b=[];r.content.forEach(k=>{b=yf(k.textContent),p.insert(v-1,k),b.length>0&&(g=!1,b.forEach(A=>{const d=v+A.start,y=v+A.end;p.doc.rangeHasMark(d,y,e.type)||p.addMark(d,y,e.type.create({href:A.href}))})),v+=k.nodeSize});const w=b.length>0;return p.docChanged&&!g&&w?(e.editor.view.dispatch(p),!0):!1}}})}const QP=gn.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){xy(e);return}xy(e.scheme,e.optionalSlashes)})},onDestroy(){c4()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(f4({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push(h4({type:this.type})),e.push(p4({editor:this.editor,type:this.type,linkOnPaste:this.options.linkOnPaste})),e}}),m4=e=>rt({find:/--$/,replace:e!=null?e:"\u2014"}),g4=e=>rt({find:/\.\.\.$/,replace:e!=null?e:"\u2026"}),y4=e=>rt({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:e!=null?e:"\u201C"}),v4=e=>rt({find:/"$/,replace:e!=null?e:"\u201D"}),b4=e=>rt({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:e!=null?e:"\u2018"}),w4=e=>rt({find:/'$/,replace:e!=null?e:"\u2019"}),x4=e=>rt({find:/<-$/,replace:e!=null?e:"\u2190"}),k4=e=>rt({find:/->$/,replace:e!=null?e:"\u2192"}),S4=e=>rt({find:/\(c\)$/,replace:e!=null?e:"\xA9"}),C4=e=>rt({find:/\(tm\)$/,replace:e!=null?e:"\u2122"}),_4=e=>rt({find:/\(sm\)$/,replace:e!=null?e:"\u2120"}),M4=e=>rt({find:/\(r\)$/,replace:e!=null?e:"\xAE"}),A4=e=>rt({find:/(?:^|\s)(1\/2)$/,replace:e!=null?e:"\xBD"}),E4=e=>rt({find:/\+\/-$/,replace:e!=null?e:"\xB1"}),O4=e=>rt({find:/!=$/,replace:e!=null?e:"\u2260"}),T4=e=>rt({find:/<<$/,replace:e!=null?e:"\xAB"}),P4=e=>rt({find:/>>$/,replace:e!=null?e:"\xBB"}),R4=e=>rt({find:/\d+\s?([*x])\s?\d+$/,replace:e!=null?e:"\xD7"}),j4=e=>rt({find:/\^2$/,replace:e!=null?e:"\xB2"}),N4=e=>rt({find:/\^3$/,replace:e!=null?e:"\xB3"}),L4=e=>rt({find:/(?:^|\s)(1\/4)$/,replace:e!=null?e:"\xBC"}),D4=e=>rt({find:/(?:^|\s)(3\/4)$/,replace:e!=null?e:"\xBE"}),ZP=vt.create({name:"typography",addInputRules(){const e=[];return this.options.emDash!==!1&&e.push(m4(this.options.emDash)),this.options.ellipsis!==!1&&e.push(g4(this.options.ellipsis)),this.options.openDoubleQuote!==!1&&e.push(y4(this.options.openDoubleQuote)),this.options.closeDoubleQuote!==!1&&e.push(v4(this.options.closeDoubleQuote)),this.options.openSingleQuote!==!1&&e.push(b4(this.options.openSingleQuote)),this.options.closeSingleQuote!==!1&&e.push(w4(this.options.closeSingleQuote)),this.options.leftArrow!==!1&&e.push(x4(this.options.leftArrow)),this.options.rightArrow!==!1&&e.push(k4(this.options.rightArrow)),this.options.copyright!==!1&&e.push(S4(this.options.copyright)),this.options.trademark!==!1&&e.push(C4(this.options.trademark)),this.options.servicemark!==!1&&e.push(_4(this.options.servicemark)),this.options.registeredTrademark!==!1&&e.push(M4(this.options.registeredTrademark)),this.options.oneHalf!==!1&&e.push(A4(this.options.oneHalf)),this.options.plusMinus!==!1&&e.push(E4(this.options.plusMinus)),this.options.notEqual!==!1&&e.push(O4(this.options.notEqual)),this.options.laquo!==!1&&e.push(T4(this.options.laquo)),this.options.raquo!==!1&&e.push(P4(this.options.raquo)),this.options.multiplication!==!1&&e.push(R4(this.options.multiplication)),this.options.superscriptTwo!==!1&&e.push(j4(this.options.superscriptTwo)),this.options.superscriptThree!==!1&&e.push(N4(this.options.superscriptThree)),this.options.oneQuarter!==!1&&e.push(L4(this.options.oneQuarter)),this.options.threeQuarters!==!1&&e.push(D4(this.options.threeQuarters)),e}}),eR=gn.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=ks(e,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),I4=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,$4=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,tR=gn.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[mi({find:I4,type:this.type})]},addPasteRules(){return[gi({find:$4,type:this.type})]}}),nR=vt.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function B4(e){var t;const{char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:s}=e,a=m_(n),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=r?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),f=((t=s.nodeBefore)===null||t===void 0?void 0:t.isText)&&s.nodeBefore.text;if(!f)return null;const h=s.pos-f.length,p=Array.from(f.matchAll(u)).pop();if(!p||p.input===void 0||p.index===void 0)return null;const g=p.input.slice(Math.max(0,p.index-1),p.index),v=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(g);if(i!==null&&!v)return null;const b=h+p.index;let w=b+p[0].length;return r&&l.test(f.slice(w-1,w+1))&&(p[0]+=" ",w+=1),b=s.pos?{range:{from:b,to:w},query:p[0].slice(n.length),text:p[0]}:null}const H4=new yt("suggestion");function z4({pluginKey:e=H4,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=()=>null,items:c=()=>[],render:u=()=>({}),allow:f=()=>!0}){let h;const p=u==null?void 0:u(),g=new gt({key:e,view(){return{update:(v,b)=>Ir(this,null,function*(){var w,k,A,d,y,m,x;const S=(w=this.key)===null||w===void 0?void 0:w.getState(b),_=(k=this.key)===null||k===void 0?void 0:k.getState(v.state),C=S.active&&_.active&&S.range.from!==_.range.from,E=!S.active&&_.active,T=S.active&&!_.active,R=!E&&!T&&S.query!==_.query,N=E||C,D=R&&!C,M=T||C;if(!N&&!D&&!M)return;const P=M&&!N?S:_,L=v.dom.querySelector(`[data-decoration-id="${P.decorationId}"]`);h={editor:t,range:P.range,query:P.query,text:P.text,items:[],command:H=>{l({editor:t,range:P.range,props:H})},decorationNode:L,clientRect:L?()=>{var H;const{decorationId:te}=(H=this.key)===null||H===void 0?void 0:H.getState(t.state),q=v.dom.querySelector(`[data-decoration-id="${te}"]`);return(q==null?void 0:q.getBoundingClientRect())||null}:null},N&&((A=p==null?void 0:p.onBeforeStart)===null||A===void 0||A.call(p,h)),D&&((d=p==null?void 0:p.onBeforeUpdate)===null||d===void 0||d.call(p,h)),(D||N)&&(h.items=yield c({editor:t,query:P.query})),M&&((y=p==null?void 0:p.onExit)===null||y===void 0||y.call(p,h)),D&&((m=p==null?void 0:p.onUpdate)===null||m===void 0||m.call(p,h)),N&&((x=p==null?void 0:p.onStart)===null||x===void 0||x.call(p,h))}),destroy:()=>{var v;!h||(v=p==null?void 0:p.onExit)===null||v===void 0||v.call(p,h)}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(v,b,w,k){const{isEditable:A}=t,{composing:d}=t.view,{selection:y}=v,{empty:m,from:x}=y,S=J({},b);if(S.composing=d,A&&(m||t.view.composing)){(xb.range.to)&&!d&&!b.composing&&(S.active=!1);const _=B4({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:y.$from}),C=`id_${Math.floor(Math.random()*4294967295)}`;_&&f({editor:t,state:k,range:_.range})?(S.active=!0,S.decorationId=b.decorationId?b.decorationId:C,S.range=_.range,S.query=_.query,S.text=_.text):S.active=!1}else S.active=!1;return S.active||(S.decorationId=null,S.range={from:0,to:0},S.query=null,S.text=null),S}},props:{handleKeyDown(v,b){var w;const{active:k,range:A}=g.getState(v.state);return k&&((w=p==null?void 0:p.onKeyDown)===null||w===void 0?void 0:w.call(p,{view:v,event:b,range:A}))||!1},decorations(v){const{active:b,range:w,decorationId:k}=g.getState(v);return b?Qe.create(v.doc,[Kt.inline(w.from,w.to,{nodeName:s,class:a,"data-decoration-id":k})]):null}}});return g}const F4=new yt("mention"),rR=et.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:e,node:t}){var n;return`${e.suggestion.char}${(n=t.attrs.label)!==null&&n!==void 0?n:t.attrs.id}`},suggestion:{char:"@",pluginKey:F4,command:({editor:e,range:t,props:n})=>{var r,i;const o=e.view.state.selection.$to.nodeAfter;((r=o==null?void 0:o.text)===null||r===void 0?void 0:r.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(i=window.getSelection())===null||i===void 0||i.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),r=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){return["span",Ue({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]},renderText({node:e}){return this.options.renderLabel({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:i,anchor:o}=r;return i?(t.doc.nodesBetween(o-1,o,(s,a)=>{if(s.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",a,a+s.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[z4(J({editor:this.editor},this.options.suggestion))]}});const V4={},W4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},U4=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),K4=ie("path",{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z",fill:"currentColor"},null,-1),q4=[U4,K4];function J4(e,t){return ue(),ve("svg",W4,q4)}var G4=Ie(V4,[["render",J4]]);const Y4={},X4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Q4=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),Z4=ie("path",{d:"M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z",fill:"currentColor"},null,-1),eO=[Q4,Z4];function tO(e,t){return ue(),ve("svg",X4,eO)}var nO=Ie(Y4,[["render",tO]]);const rO={},iO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},oO=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),sO=ie("path",{d:"M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z",fill:"currentColor"},null,-1),aO=[oO,sO];function lO(e,t){return ue(),ve("svg",iO,aO)}var cO=Ie(rO,[["render",lO]]);const uO={},dO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},fO=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),hO=ie("path",{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm9-12v8h1.5v2H22v2h-2v-2h-5.5v-1.34l5-8.66H22zm-2 3.133L17.19 16H20v-4.867z",fill:"currentColor"},null,-1),pO=[fO,hO];function mO(e,t){return ue(),ve("svg",dO,pO)}var gO=Ie(uO,[["render",mO]]);const yO={},vO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},bO=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),wO=ie("path",{d:"M22 8v2h-4.323l-.464 2.636c.33-.089.678-.136 1.037-.136 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.827 0-3.367-1.224-3.846-2.897l1.923-.551c.24.836 1.01 1.448 1.923 1.448 1.105 0 2-.895 2-2s-.895-2-2-2c-.63 0-1.193.292-1.56.748l-1.81-.904L16 8h6zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z",fill:"currentColor"},null,-1),xO=[bO,wO];function kO(e,t){return ue(),ve("svg",vO,xO)}var SO=Ie(yO,[["render",kO]]);const CO={},_O={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},MO=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),AO=ie("path",{d:"M21.097 8l-2.598 4.5c2.21 0 4.001 1.79 4.001 4s-1.79 4-4 4-4-1.79-4-4c0-.736.199-1.426.546-2.019L18.788 8h2.309zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 10.5c-1.105 0-2 .895-2 2s.895 2 2 2 2-.895 2-2-.895-2-2-2z",fill:"currentColor"},null,-1),EO=[MO,AO];function OO(e,t){return ue(),ve("svg",_O,EO)}var TO=Ie(CO,[["render",OO]]);const PO={},RO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},jO=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),NO=ie("path",{d:"M13 6v15h-2V6H5V4h14v2z",fill:"currentColor"},null,-1),LO=[jO,NO];function DO(e,t){return ue(),ve("svg",RO,LO)}var IO=Ie(PO,[["render",DO]]);const $O={},BO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},HO=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),zO=ie("path",{d:"M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z",fill:"currentColor"},null,-1),FO=[HO,zO];function VO(e,t){return ue(),ve("svg",BO,FO)}var WO=Ie($O,[["render",VO]]);const UO={},KO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},qO=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),JO=ie("path",{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z",fill:"currentColor"},null,-1),GO=[qO,JO];function YO(e,t){return ue(),ve("svg",KO,GO)}var XO=Ie(UO,[["render",YO]]);const QO={},ZO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},eT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),tT=ie("path",{d:"M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z",fill:"currentColor"},null,-1),nT=[eT,tT];function rT(e,t){return ue(),ve("svg",ZO,nT)}var iT=Ie(QO,[["render",rT]]);const oT={},sT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},aT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),lT=ie("path",{d:"M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z",fill:"currentColor"},null,-1),cT=[aT,lT];function uT(e,t){return ue(),ve("svg",sT,cT)}var dT=Ie(oT,[["render",uT]]);const fT={},hT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},pT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),mT=ie("path",{d:"M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z",fill:"currentColor"},null,-1),gT=[pT,mT];function yT(e,t){return ue(),ve("svg",hT,gT)}var vT=Ie(fT,[["render",yT]]);const bT={},wT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},xT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),kT=ie("path",{d:"M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z",fill:"currentColor"},null,-1),ST=[xT,kT];function CT(e,t){return ue(),ve("svg",wT,ST)}var _T=Ie(bT,[["render",CT]]);const MT={},AT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},ET=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),OT=ie("path",{d:"M15.246 14H8.754l-1.6 4H5l6-15h2l6 15h-2.154l-1.6-4zm-.8-2L12 5.885 9.554 12h4.892zM3 20h18v2H3v-2z",fill:"currentColor"},null,-1),TT=[ET,OT];function PT(e,t){return ue(),ve("svg",AT,TT)}var RT=Ie(MT,[["render",PT]]);const jT={},NT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},LT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),DT=ie("path",{d:"M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z",fill:"currentColor"},null,-1),IT=[LT,DT];function $T(e,t){return ue(),ve("svg",NT,IT)}var BT=Ie(jT,[["render",$T]]);const HT={},zT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},FT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),VT=ie("path",{d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z",fill:"currentColor"},null,-1),WT=[FT,VT];function UT(e,t){return ue(),ve("svg",zT,WT)}var KT=Ie(HT,[["render",UT]]);const qT={},JT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},GT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),YT=ie("path",{d:"M19.417 6.679C20.447 7.773 21 9 21 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311-1.804-.167-3.226-1.648-3.226-3.489a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179zm-10 0C10.447 7.773 11 9 11 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C4.591 12.322 3.17 10.841 3.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z",fill:"currentColor"},null,-1),XT=[GT,YT];function QT(e,t){return ue(),ve("svg",JT,XT)}var ZT=Ie(qT,[["render",QT]]);const e5={},t5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},n5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),r5=ie("path",{d:"M16.95 8.464l1.414-1.414 4.95 4.95-4.95 4.95-1.414-1.414L20.485 12 16.95 8.464zm-9.9 0L3.515 12l3.535 3.536-1.414 1.414L.686 12l4.95-4.95L7.05 8.464z",fill:"currentColor"},null,-1),i5=[n5,r5];function o5(e,t){return ue(),ve("svg",t5,i5)}var s5=Ie(e5,[["render",o5]]);const a5={},l5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},c5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),u5=ie("path",{d:"M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z",fill:"currentColor"},null,-1),d5=[c5,u5];function f5(e,t){return ue(),ve("svg",l5,d5)}var h5=Ie(a5,[["render",f5]]);const p5={},m5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},g5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),y5=ie("path",{d:"M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2zm.008-12c.548 0 .992.445.992.993V13h-2V5H4v13.999L14 9l3 3v2.829l-3-3L6.827 19H14v2H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016zM8 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4z",fill:"currentColor"},null,-1),v5=[g5,y5];function b5(e,t){return ue(),ve("svg",m5,v5)}var w5=Ie(p5,[["render",b5]]);const x5={},k5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},S5=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),C5=ie("path",{d:"M16 4c.552 0 1 .448 1 1v4.2l5.213-3.65c.226-.158.538-.103.697.124.058.084.09.184.09.286v12.08c0 .276-.224.5-.5.5-.103 0-.203-.032-.287-.09L17 14.8V19c0 .552-.448 1-1 1H2c-.552 0-1-.448-1-1V5c0-.552.448-1 1-1h14zm-1 2H3v12h12V6zM8 8h2v3h3v2H9.999L10 16H8l-.001-3H5v-2h3V8zm13 .841l-4 2.8v.718l4 2.8V8.84z",fill:"currentColor"},null,-1),_5=[S5,C5];function M5(e,t){return ue(),ve("svg",k5,_5)}var A5=Ie(x5,[["render",M5]]);const E5={},O5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},T5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),P5=ie("path",{d:"M5.828 7l2.536 2.536L6.95 10.95 2 6l4.95-4.95 1.414 1.414L5.828 5H13a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H5.828z",fill:"currentColor"},null,-1),R5=[T5,P5];function j5(e,t){return ue(),ve("svg",O5,R5)}var N5=Ie(E5,[["render",j5]]);const L5={},D5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},I5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),$5=ie("path",{d:"M18.172 7H11a6 6 0 1 0 0 12h9v2h-9a8 8 0 1 1 0-16h7.172l-2.536-2.536L17.05 1.05 22 6l-4.95 4.95-1.414-1.414L18.172 7z",fill:"currentColor"},null,-1),B5=[I5,$5];function H5(e,t){return ue(),ve("svg",D5,B5)}var z5=Ie(L5,[["render",H5]]);const F5={},V5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},W5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),U5=ie("path",{d:"M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z",fill:"currentColor"},null,-1),K5=[W5,U5];function q5(e,t){return ue(),ve("svg",V5,K5)}var J5=Ie(F5,[["render",q5]]);const G5={},Y5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},X5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),Q5=ie("path",{d:"M13 10v4h6v-4h-6zm-2 0H5v4h6v-4zm2 9h6v-3h-6v3zm-2 0v-3H5v3h6zm2-14v3h6V5h-6zm-2 0H5v3h6V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z",fill:"currentColor"},null,-1),Z5=[X5,Q5];function e6(e,t){return ue(),ve("svg",Y5,Z5)}var t6=Ie(G5,[["render",e6]]),iR={Paragraph:{label:"Paragraph",icon:IO,action:e=>e.chain().focus().setParagraph().run(),isActive:e=>e.isActive("paragraph")},"Heading 1":{label:"Heading 1",text:"H1",icon:G4,action:e=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e=>e.isActive("heading",{level:1})},"Heading 2":{label:"Heading 2",text:"H2",icon:nO,action:e=>e.chain().focus().toggleHeading({level:2}).run(),isActive:e=>e.isActive("heading",{level:2})},"Heading 3":{label:"Heading 3",text:"H3",icon:cO,action:e=>e.chain().focus().toggleHeading({level:3}).run(),isActive:e=>e.isActive("heading",{level:3})},"Heading 4":{label:"Heading 4",text:"H4",icon:gO,action:e=>e.chain().focus().toggleHeading({level:4}).run(),isActive:e=>e.isActive("heading",{level:4})},"Heading 5":{label:"Heading 5",text:"H5",icon:SO,action:e=>e.chain().focus().toggleHeading({level:5}).run(),isActive:e=>e.isActive("heading",{level:5})},"Heading 6":{label:"Heading 6",text:"H6",icon:TO,action:e=>e.chain().focus().toggleHeading({level:6}).run(),isActive:e=>e.isActive("heading",{level:6})},Bold:{label:"Bold",icon:WO,action:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive("bold")},Italic:{label:"Italic",icon:XO,action:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive("italic")},Underline:{label:"Underline",icon:iT,action:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive("underline")},"Bullet List":{label:"Bullet List",icon:KT,action:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isActive("bulletList")},"Numbered List":{label:"Numbered List",icon:BT,action:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive("orderedList")},"Align Center":{label:"Align Center",icon:dT,action:e=>e.chain().focus().setTextAlign("center").run(),isActive:e=>e.isActive({textAlign:"center"})},"Align Left":{label:"Align Left",icon:vT,action:e=>e.chain().focus().setTextAlign("left").run(),isActive:e=>e.isActive({textAlign:"left"})},"Align Right":{label:"Align Right",icon:_T,action:e=>e.chain().focus().setTextAlign("right").run(),isActive:e=>e.isActive({textAlign:"right"})},FontColor:{label:"Font Color",icon:RT,isActive:e=>e.isActive("textStyle")||e.isActive("highlight"),component:aa(()=>import("./FontColor.0920821f.js"))},Blockquote:{label:"Blockquote",icon:ZT,action:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isActive("blockquote")},Code:{label:"Code",icon:s5,action:e=>e.chain().focus().toggleCodeBlock().run(),isActive:e=>e.isActive("codeBlock")},"Horizontal Rule":{label:"Horizontal Rule",icon:J5,action:e=>e.chain().focus().setHorizontalRule().run(),isActive:e=>!1},Link:{label:"Link",icon:h5,isActive:e=>e.isActive("link"),component:aa(()=>import("./InsertLink.f10788b0.js"))},Image:{label:"Image",icon:w5,isActive:e=>!1,component:aa(()=>import("./InsertImage.45a66060.js"))},Video:{label:"Video",icon:A5,isActive:e=>!1,component:aa(()=>import("./InsertVideo.a8f5bc73.js"))},Undo:{label:"Undo",icon:N5,action:e=>e.chain().focus().undo().run(),isActive:e=>!1},Redo:{label:"Redo",icon:z5,action:e=>e.chain().focus().redo().run(),isActive:e=>!1},InsertTable:{label:"Insert Table",icon:t6,action:e=>e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),isActive:e=>!1},AddColumnBefore:{label:"Add Column Before",action:e=>e.chain().focus().addColumnBefore().run(),isActive:e=>!1,isDisabled:e=>!e.can().addColumnBefore()},AddColumnAfter:{label:"Add Column After",action:e=>e.chain().focus().addColumnAfter().run(),isActive:e=>!1,isDisabled:e=>!e.can().addColumnAfter()},DeleteColumn:{label:"Delete Column",action:e=>e.chain().focus().deleteColumn().run(),isActive:e=>!1,isDisabled:e=>!e.can().deleteColumn()},AddRowBefore:{label:"Add Row Before",action:e=>e.chain().focus().addRowBefore().run(),isActive:e=>!1,isDisabled:e=>!e.can().addRowBefore()},AddRowAfter:{label:"Add Row After",action:e=>e.chain().focus().addRowAfter().run(),isActive:e=>!1,isDisabled:e=>!e.can().addRowAfter()},DeleteRow:{label:"Delete Row",action:e=>e.chain().focus().deleteRow().run(),isActive:e=>!1,isDisabled:e=>!e.can().deleteRow()},DeleteTable:{label:"Delete Table",action:e=>e.chain().focus().deleteTable().run(),isActive:e=>!1,isDisabled:e=>!e.can().deleteTable()},MergeCells:{label:"Merge Cells",action:e=>e.chain().focus().mergeCells().run(),isActive:e=>!1,isDisabled:e=>!e.can().mergeCells()},SplitCell:{label:"Split Cell",action:e=>e.chain().focus().splitCell().run(),isActive:e=>!1,isDisabled:e=>!e.can().splitCell()},ToggleHeaderColumn:{label:"Toggle Header Column",action:e=>e.chain().focus().toggleHeaderColumn().run(),isActive:e=>!1,isDisabled:e=>!e.can().toggleHeaderColumn()},ToggleHeaderRow:{label:"Toggle Header Row",action:e=>e.chain().focus().toggleHeaderRow().run(),isActive:e=>!1,isDisabled:e=>!e.can().toggleHeaderRow()},ToggleHeaderCell:{label:"Toggle Header Cell",action:e=>e.chain().focus().toggleHeaderCell().run(),isActive:e=>!1,isDisabled:e=>!e.can().toggleHeaderCell()},Separator:{type:"separator"}};var ky={exports:{}};(function(e){(function(){function t(d){var y={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex: foo
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `\xAB\xAB\xAB` and `\xBB\xBB\xBB` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(d===!1)return JSON.parse(JSON.stringify(y));var m={};for(var x in y)y.hasOwnProperty(x)&&(m[x]=y[x].defaultValue);return m}function n(){var d=t(!0),y={};for(var m in d)d.hasOwnProperty(m)&&(y[m]=!0);return y}var r={},i={},o={},s=t(!0),a="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};r.helper={},r.extensions={},r.setOption=function(d,y){return s[d]=y,this},r.getOption=function(d){return s[d]},r.getOptions=function(){return s},r.resetOptions=function(){s=t(!0)},r.setFlavor=function(d){if(!l.hasOwnProperty(d))throw Error(d+" flavor was not found");r.resetOptions();var y=l[d];a=d;for(var m in y)y.hasOwnProperty(m)&&(s[m]=y[m])},r.getFlavor=function(){return a},r.getFlavorOptions=function(d){if(l.hasOwnProperty(d))return l[d]},r.getDefaultOptions=function(d){return t(d)},r.subParser=function(d,y){if(r.helper.isString(d))if(typeof y!="undefined")i[d]=y;else{if(i.hasOwnProperty(d))return i[d];throw Error("SubParser named "+d+" not registered!")}},r.extension=function(d,y){if(!r.helper.isString(d))throw Error("Extension 'name' must be a string");if(d=r.helper.stdExtName(d),r.helper.isUndefined(y)){if(!o.hasOwnProperty(d))throw Error("Extension named "+d+" is not registered!");return o[d]}else{typeof y=="function"&&(y=y()),r.helper.isArray(y)||(y=[y]);var m=c(y,d);if(m.valid)o[d]=y;else throw Error(m.error)}},r.getAllExtensions=function(){return o},r.removeExtension=function(d){delete o[d]},r.resetExtensions=function(){o={}};function c(d,y){var m=y?"Error in "+y+" extension->":"Error in unnamed extension",x={valid:!0,error:""};r.helper.isArray(d)||(d=[d]);for(var S=0;S").replace(/&/g,"&")};var f=function(d,y,m,x){var S=x||"",_=S.indexOf("g")>-1,C=new RegExp(y+"|"+m,"g"+S.replace(/g/g,"")),E=new RegExp(y,S.replace(/g/g,"")),T=[],R,N,D,M,P;do for(R=0;D=C.exec(d);)if(E.test(D[0]))R++||(N=C.lastIndex,M=N-D[0].length);else if(R&&!--R){P=D.index+D[0].length;var L={left:{start:M,end:N},match:{start:N,end:D.index},right:{start:D.index,end:P},wholeMatch:{start:M,end:P}};if(T.push(L),!_)return T}while(R&&(C.lastIndex=N));return T};r.helper.matchRecursiveRegExp=function(d,y,m,x){for(var S=f(d,y,m,x),_=[],C=0;C0){var R=[];C[0].wholeMatch.start!==0&&R.push(d.slice(0,C[0].wholeMatch.start));for(var N=0;N=0?x+(m||0):x},r.helper.splitAtIndex=function(d,y){if(!r.helper.isString(d))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[d.substring(0,y),d.substring(y)]},r.helper.encodeEmailAddress=function(d){var y=[function(m){return""+m.charCodeAt(0)+";"},function(m){return""+m.charCodeAt(0).toString(16)+";"},function(m){return m}];return d=d.replace(/./g,function(m){if(m==="@")m=y[Math.floor(Math.random()*2)](m);else{var x=Math.random();m=x>.9?y[2](m):x>.45?y[1](m):y[0](m)}return m}),d},r.helper.padEnd=function(y,m,x){return m=m>>0,x=String(x||" "),y.length>m?String(y):(m=m-y.length,m>x.length&&(x+=x.repeat(m/x.length)),String(y)+x.slice(0,m))},typeof console=="undefined"&&(console={warn:function(d){alert(d)},log:function(d){alert(d)},error:function(d){throw d}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"\u{1F44D}","-1":"\u{1F44E}","100":"\u{1F4AF}","1234":"\u{1F522}","1st_place_medal":"\u{1F947}","2nd_place_medal":"\u{1F948}","3rd_place_medal":"\u{1F949}","8ball":"\u{1F3B1}",a:"\u{1F170}\uFE0F",ab:"\u{1F18E}",abc:"\u{1F524}",abcd:"\u{1F521}",accept:"\u{1F251}",aerial_tramway:"\u{1F6A1}",airplane:"\u2708\uFE0F",alarm_clock:"\u23F0",alembic:"\u2697\uFE0F",alien:"\u{1F47D}",ambulance:"\u{1F691}",amphora:"\u{1F3FA}",anchor:"\u2693\uFE0F",angel:"\u{1F47C}",anger:"\u{1F4A2}",angry:"\u{1F620}",anguished:"\u{1F627}",ant:"\u{1F41C}",apple:"\u{1F34E}",aquarius:"\u2652\uFE0F",aries:"\u2648\uFE0F",arrow_backward:"\u25C0\uFE0F",arrow_double_down:"\u23EC",arrow_double_up:"\u23EB",arrow_down:"\u2B07\uFE0F",arrow_down_small:"\u{1F53D}",arrow_forward:"\u25B6\uFE0F",arrow_heading_down:"\u2935\uFE0F",arrow_heading_up:"\u2934\uFE0F",arrow_left:"\u2B05\uFE0F",arrow_lower_left:"\u2199\uFE0F",arrow_lower_right:"\u2198\uFE0F",arrow_right:"\u27A1\uFE0F",arrow_right_hook:"\u21AA\uFE0F",arrow_up:"\u2B06\uFE0F",arrow_up_down:"\u2195\uFE0F",arrow_up_small:"\u{1F53C}",arrow_upper_left:"\u2196\uFE0F",arrow_upper_right:"\u2197\uFE0F",arrows_clockwise:"\u{1F503}",arrows_counterclockwise:"\u{1F504}",art:"\u{1F3A8}",articulated_lorry:"\u{1F69B}",artificial_satellite:"\u{1F6F0}",astonished:"\u{1F632}",athletic_shoe:"\u{1F45F}",atm:"\u{1F3E7}",atom_symbol:"\u269B\uFE0F",avocado:"\u{1F951}",b:"\u{1F171}\uFE0F",baby:"\u{1F476}",baby_bottle:"\u{1F37C}",baby_chick:"\u{1F424}",baby_symbol:"\u{1F6BC}",back:"\u{1F519}",bacon:"\u{1F953}",badminton:"\u{1F3F8}",baggage_claim:"\u{1F6C4}",baguette_bread:"\u{1F956}",balance_scale:"\u2696\uFE0F",balloon:"\u{1F388}",ballot_box:"\u{1F5F3}",ballot_box_with_check:"\u2611\uFE0F",bamboo:"\u{1F38D}",banana:"\u{1F34C}",bangbang:"\u203C\uFE0F",bank:"\u{1F3E6}",bar_chart:"\u{1F4CA}",barber:"\u{1F488}",baseball:"\u26BE\uFE0F",basketball:"\u{1F3C0}",basketball_man:"\u26F9\uFE0F",basketball_woman:"\u26F9\uFE0F\u2640\uFE0F",bat:"\u{1F987}",bath:"\u{1F6C0}",bathtub:"\u{1F6C1}",battery:"\u{1F50B}",beach_umbrella:"\u{1F3D6}",bear:"\u{1F43B}",bed:"\u{1F6CF}",bee:"\u{1F41D}",beer:"\u{1F37A}",beers:"\u{1F37B}",beetle:"\u{1F41E}",beginner:"\u{1F530}",bell:"\u{1F514}",bellhop_bell:"\u{1F6CE}",bento:"\u{1F371}",biking_man:"\u{1F6B4}",bike:"\u{1F6B2}",biking_woman:"\u{1F6B4}\u2640\uFE0F",bikini:"\u{1F459}",biohazard:"\u2623\uFE0F",bird:"\u{1F426}",birthday:"\u{1F382}",black_circle:"\u26AB\uFE0F",black_flag:"\u{1F3F4}",black_heart:"\u{1F5A4}",black_joker:"\u{1F0CF}",black_large_square:"\u2B1B\uFE0F",black_medium_small_square:"\u25FE\uFE0F",black_medium_square:"\u25FC\uFE0F",black_nib:"\u2712\uFE0F",black_small_square:"\u25AA\uFE0F",black_square_button:"\u{1F532}",blonde_man:"\u{1F471}",blonde_woman:"\u{1F471}\u2640\uFE0F",blossom:"\u{1F33C}",blowfish:"\u{1F421}",blue_book:"\u{1F4D8}",blue_car:"\u{1F699}",blue_heart:"\u{1F499}",blush:"\u{1F60A}",boar:"\u{1F417}",boat:"\u26F5\uFE0F",bomb:"\u{1F4A3}",book:"\u{1F4D6}",bookmark:"\u{1F516}",bookmark_tabs:"\u{1F4D1}",books:"\u{1F4DA}",boom:"\u{1F4A5}",boot:"\u{1F462}",bouquet:"\u{1F490}",bowing_man:"\u{1F647}",bow_and_arrow:"\u{1F3F9}",bowing_woman:"\u{1F647}\u2640\uFE0F",bowling:"\u{1F3B3}",boxing_glove:"\u{1F94A}",boy:"\u{1F466}",bread:"\u{1F35E}",bride_with_veil:"\u{1F470}",bridge_at_night:"\u{1F309}",briefcase:"\u{1F4BC}",broken_heart:"\u{1F494}",bug:"\u{1F41B}",building_construction:"\u{1F3D7}",bulb:"\u{1F4A1}",bullettrain_front:"\u{1F685}",bullettrain_side:"\u{1F684}",burrito:"\u{1F32F}",bus:"\u{1F68C}",business_suit_levitating:"\u{1F574}",busstop:"\u{1F68F}",bust_in_silhouette:"\u{1F464}",busts_in_silhouette:"\u{1F465}",butterfly:"\u{1F98B}",cactus:"\u{1F335}",cake:"\u{1F370}",calendar:"\u{1F4C6}",call_me_hand:"\u{1F919}",calling:"\u{1F4F2}",camel:"\u{1F42B}",camera:"\u{1F4F7}",camera_flash:"\u{1F4F8}",camping:"\u{1F3D5}",cancer:"\u264B\uFE0F",candle:"\u{1F56F}",candy:"\u{1F36C}",canoe:"\u{1F6F6}",capital_abcd:"\u{1F520}",capricorn:"\u2651\uFE0F",car:"\u{1F697}",card_file_box:"\u{1F5C3}",card_index:"\u{1F4C7}",card_index_dividers:"\u{1F5C2}",carousel_horse:"\u{1F3A0}",carrot:"\u{1F955}",cat:"\u{1F431}",cat2:"\u{1F408}",cd:"\u{1F4BF}",chains:"\u26D3",champagne:"\u{1F37E}",chart:"\u{1F4B9}",chart_with_downwards_trend:"\u{1F4C9}",chart_with_upwards_trend:"\u{1F4C8}",checkered_flag:"\u{1F3C1}",cheese:"\u{1F9C0}",cherries:"\u{1F352}",cherry_blossom:"\u{1F338}",chestnut:"\u{1F330}",chicken:"\u{1F414}",children_crossing:"\u{1F6B8}",chipmunk:"\u{1F43F}",chocolate_bar:"\u{1F36B}",christmas_tree:"\u{1F384}",church:"\u26EA\uFE0F",cinema:"\u{1F3A6}",circus_tent:"\u{1F3AA}",city_sunrise:"\u{1F307}",city_sunset:"\u{1F306}",cityscape:"\u{1F3D9}",cl:"\u{1F191}",clamp:"\u{1F5DC}",clap:"\u{1F44F}",clapper:"\u{1F3AC}",classical_building:"\u{1F3DB}",clinking_glasses:"\u{1F942}",clipboard:"\u{1F4CB}",clock1:"\u{1F550}",clock10:"\u{1F559}",clock1030:"\u{1F565}",clock11:"\u{1F55A}",clock1130:"\u{1F566}",clock12:"\u{1F55B}",clock1230:"\u{1F567}",clock130:"\u{1F55C}",clock2:"\u{1F551}",clock230:"\u{1F55D}",clock3:"\u{1F552}",clock330:"\u{1F55E}",clock4:"\u{1F553}",clock430:"\u{1F55F}",clock5:"\u{1F554}",clock530:"\u{1F560}",clock6:"\u{1F555}",clock630:"\u{1F561}",clock7:"\u{1F556}",clock730:"\u{1F562}",clock8:"\u{1F557}",clock830:"\u{1F563}",clock9:"\u{1F558}",clock930:"\u{1F564}",closed_book:"\u{1F4D5}",closed_lock_with_key:"\u{1F510}",closed_umbrella:"\u{1F302}",cloud:"\u2601\uFE0F",cloud_with_lightning:"\u{1F329}",cloud_with_lightning_and_rain:"\u26C8",cloud_with_rain:"\u{1F327}",cloud_with_snow:"\u{1F328}",clown_face:"\u{1F921}",clubs:"\u2663\uFE0F",cocktail:"\u{1F378}",coffee:"\u2615\uFE0F",coffin:"\u26B0\uFE0F",cold_sweat:"\u{1F630}",comet:"\u2604\uFE0F",computer:"\u{1F4BB}",computer_mouse:"\u{1F5B1}",confetti_ball:"\u{1F38A}",confounded:"\u{1F616}",confused:"\u{1F615}",congratulations:"\u3297\uFE0F",construction:"\u{1F6A7}",construction_worker_man:"\u{1F477}",construction_worker_woman:"\u{1F477}\u2640\uFE0F",control_knobs:"\u{1F39B}",convenience_store:"\u{1F3EA}",cookie:"\u{1F36A}",cool:"\u{1F192}",policeman:"\u{1F46E}",copyright:"\xA9\uFE0F",corn:"\u{1F33D}",couch_and_lamp:"\u{1F6CB}",couple:"\u{1F46B}",couple_with_heart_woman_man:"\u{1F491}",couple_with_heart_man_man:"\u{1F468}\u2764\uFE0F\u{1F468}",couple_with_heart_woman_woman:"\u{1F469}\u2764\uFE0F\u{1F469}",couplekiss_man_man:"\u{1F468}\u2764\uFE0F\u{1F48B}\u{1F468}",couplekiss_man_woman:"\u{1F48F}",couplekiss_woman_woman:"\u{1F469}\u2764\uFE0F\u{1F48B}\u{1F469}",cow:"\u{1F42E}",cow2:"\u{1F404}",cowboy_hat_face:"\u{1F920}",crab:"\u{1F980}",crayon:"\u{1F58D}",credit_card:"\u{1F4B3}",crescent_moon:"\u{1F319}",cricket:"\u{1F3CF}",crocodile:"\u{1F40A}",croissant:"\u{1F950}",crossed_fingers:"\u{1F91E}",crossed_flags:"\u{1F38C}",crossed_swords:"\u2694\uFE0F",crown:"\u{1F451}",cry:"\u{1F622}",crying_cat_face:"\u{1F63F}",crystal_ball:"\u{1F52E}",cucumber:"\u{1F952}",cupid:"\u{1F498}",curly_loop:"\u27B0",currency_exchange:"\u{1F4B1}",curry:"\u{1F35B}",custard:"\u{1F36E}",customs:"\u{1F6C3}",cyclone:"\u{1F300}",dagger:"\u{1F5E1}",dancer:"\u{1F483}",dancing_women:"\u{1F46F}",dancing_men:"\u{1F46F}\u2642\uFE0F",dango:"\u{1F361}",dark_sunglasses:"\u{1F576}",dart:"\u{1F3AF}",dash:"\u{1F4A8}",date:"\u{1F4C5}",deciduous_tree:"\u{1F333}",deer:"\u{1F98C}",department_store:"\u{1F3EC}",derelict_house:"\u{1F3DA}",desert:"\u{1F3DC}",desert_island:"\u{1F3DD}",desktop_computer:"\u{1F5A5}",male_detective:"\u{1F575}\uFE0F",diamond_shape_with_a_dot_inside:"\u{1F4A0}",diamonds:"\u2666\uFE0F",disappointed:"\u{1F61E}",disappointed_relieved:"\u{1F625}",dizzy:"\u{1F4AB}",dizzy_face:"\u{1F635}",do_not_litter:"\u{1F6AF}",dog:"\u{1F436}",dog2:"\u{1F415}",dollar:"\u{1F4B5}",dolls:"\u{1F38E}",dolphin:"\u{1F42C}",door:"\u{1F6AA}",doughnut:"\u{1F369}",dove:"\u{1F54A}",dragon:"\u{1F409}",dragon_face:"\u{1F432}",dress:"\u{1F457}",dromedary_camel:"\u{1F42A}",drooling_face:"\u{1F924}",droplet:"\u{1F4A7}",drum:"\u{1F941}",duck:"\u{1F986}",dvd:"\u{1F4C0}","e-mail":"\u{1F4E7}",eagle:"\u{1F985}",ear:"\u{1F442}",ear_of_rice:"\u{1F33E}",earth_africa:"\u{1F30D}",earth_americas:"\u{1F30E}",earth_asia:"\u{1F30F}",egg:"\u{1F95A}",eggplant:"\u{1F346}",eight_pointed_black_star:"\u2734\uFE0F",eight_spoked_asterisk:"\u2733\uFE0F",electric_plug:"\u{1F50C}",elephant:"\u{1F418}",email:"\u2709\uFE0F",end:"\u{1F51A}",envelope_with_arrow:"\u{1F4E9}",euro:"\u{1F4B6}",european_castle:"\u{1F3F0}",european_post_office:"\u{1F3E4}",evergreen_tree:"\u{1F332}",exclamation:"\u2757\uFE0F",expressionless:"\u{1F611}",eye:"\u{1F441}",eye_speech_bubble:"\u{1F441}\u{1F5E8}",eyeglasses:"\u{1F453}",eyes:"\u{1F440}",face_with_head_bandage:"\u{1F915}",face_with_thermometer:"\u{1F912}",fist_oncoming:"\u{1F44A}",factory:"\u{1F3ED}",fallen_leaf:"\u{1F342}",family_man_woman_boy:"\u{1F46A}",family_man_boy:"\u{1F468}\u{1F466}",family_man_boy_boy:"\u{1F468}\u{1F466}\u{1F466}",family_man_girl:"\u{1F468}\u{1F467}",family_man_girl_boy:"\u{1F468}\u{1F467}\u{1F466}",family_man_girl_girl:"\u{1F468}\u{1F467}\u{1F467}",family_man_man_boy:"\u{1F468}\u{1F468}\u{1F466}",family_man_man_boy_boy:"\u{1F468}\u{1F468}\u{1F466}\u{1F466}",family_man_man_girl:"\u{1F468}\u{1F468}\u{1F467}",family_man_man_girl_boy:"\u{1F468}\u{1F468}\u{1F467}\u{1F466}",family_man_man_girl_girl:"\u{1F468}\u{1F468}\u{1F467}\u{1F467}",family_man_woman_boy_boy:"\u{1F468}\u{1F469}\u{1F466}\u{1F466}",family_man_woman_girl:"\u{1F468}\u{1F469}\u{1F467}",family_man_woman_girl_boy:"\u{1F468}\u{1F469}\u{1F467}\u{1F466}",family_man_woman_girl_girl:"\u{1F468}\u{1F469}\u{1F467}\u{1F467}",family_woman_boy:"\u{1F469}\u{1F466}",family_woman_boy_boy:"\u{1F469}\u{1F466}\u{1F466}",family_woman_girl:"\u{1F469}\u{1F467}",family_woman_girl_boy:"\u{1F469}\u{1F467}\u{1F466}",family_woman_girl_girl:"\u{1F469}\u{1F467}\u{1F467}",family_woman_woman_boy:"\u{1F469}\u{1F469}\u{1F466}",family_woman_woman_boy_boy:"\u{1F469}\u{1F469}\u{1F466}\u{1F466}",family_woman_woman_girl:"\u{1F469}\u{1F469}\u{1F467}",family_woman_woman_girl_boy:"\u{1F469}\u{1F469}\u{1F467}\u{1F466}",family_woman_woman_girl_girl:"\u{1F469}\u{1F469}\u{1F467}\u{1F467}",fast_forward:"\u23E9",fax:"\u{1F4E0}",fearful:"\u{1F628}",feet:"\u{1F43E}",female_detective:"\u{1F575}\uFE0F\u2640\uFE0F",ferris_wheel:"\u{1F3A1}",ferry:"\u26F4",field_hockey:"\u{1F3D1}",file_cabinet:"\u{1F5C4}",file_folder:"\u{1F4C1}",film_projector:"\u{1F4FD}",film_strip:"\u{1F39E}",fire:"\u{1F525}",fire_engine:"\u{1F692}",fireworks:"\u{1F386}",first_quarter_moon:"\u{1F313}",first_quarter_moon_with_face:"\u{1F31B}",fish:"\u{1F41F}",fish_cake:"\u{1F365}",fishing_pole_and_fish:"\u{1F3A3}",fist_raised:"\u270A",fist_left:"\u{1F91B}",fist_right:"\u{1F91C}",flags:"\u{1F38F}",flashlight:"\u{1F526}",fleur_de_lis:"\u269C\uFE0F",flight_arrival:"\u{1F6EC}",flight_departure:"\u{1F6EB}",floppy_disk:"\u{1F4BE}",flower_playing_cards:"\u{1F3B4}",flushed:"\u{1F633}",fog:"\u{1F32B}",foggy:"\u{1F301}",football:"\u{1F3C8}",footprints:"\u{1F463}",fork_and_knife:"\u{1F374}",fountain:"\u26F2\uFE0F",fountain_pen:"\u{1F58B}",four_leaf_clover:"\u{1F340}",fox_face:"\u{1F98A}",framed_picture:"\u{1F5BC}",free:"\u{1F193}",fried_egg:"\u{1F373}",fried_shrimp:"\u{1F364}",fries:"\u{1F35F}",frog:"\u{1F438}",frowning:"\u{1F626}",frowning_face:"\u2639\uFE0F",frowning_man:"\u{1F64D}\u2642\uFE0F",frowning_woman:"\u{1F64D}",middle_finger:"\u{1F595}",fuelpump:"\u26FD\uFE0F",full_moon:"\u{1F315}",full_moon_with_face:"\u{1F31D}",funeral_urn:"\u26B1\uFE0F",game_die:"\u{1F3B2}",gear:"\u2699\uFE0F",gem:"\u{1F48E}",gemini:"\u264A\uFE0F",ghost:"\u{1F47B}",gift:"\u{1F381}",gift_heart:"\u{1F49D}",girl:"\u{1F467}",globe_with_meridians:"\u{1F310}",goal_net:"\u{1F945}",goat:"\u{1F410}",golf:"\u26F3\uFE0F",golfing_man:"\u{1F3CC}\uFE0F",golfing_woman:"\u{1F3CC}\uFE0F\u2640\uFE0F",gorilla:"\u{1F98D}",grapes:"\u{1F347}",green_apple:"\u{1F34F}",green_book:"\u{1F4D7}",green_heart:"\u{1F49A}",green_salad:"\u{1F957}",grey_exclamation:"\u2755",grey_question:"\u2754",grimacing:"\u{1F62C}",grin:"\u{1F601}",grinning:"\u{1F600}",guardsman:"\u{1F482}",guardswoman:"\u{1F482}\u2640\uFE0F",guitar:"\u{1F3B8}",gun:"\u{1F52B}",haircut_woman:"\u{1F487}",haircut_man:"\u{1F487}\u2642\uFE0F",hamburger:"\u{1F354}",hammer:"\u{1F528}",hammer_and_pick:"\u2692",hammer_and_wrench:"\u{1F6E0}",hamster:"\u{1F439}",hand:"\u270B",handbag:"\u{1F45C}",handshake:"\u{1F91D}",hankey:"\u{1F4A9}",hatched_chick:"\u{1F425}",hatching_chick:"\u{1F423}",headphones:"\u{1F3A7}",hear_no_evil:"\u{1F649}",heart:"\u2764\uFE0F",heart_decoration:"\u{1F49F}",heart_eyes:"\u{1F60D}",heart_eyes_cat:"\u{1F63B}",heartbeat:"\u{1F493}",heartpulse:"\u{1F497}",hearts:"\u2665\uFE0F",heavy_check_mark:"\u2714\uFE0F",heavy_division_sign:"\u2797",heavy_dollar_sign:"\u{1F4B2}",heavy_heart_exclamation:"\u2763\uFE0F",heavy_minus_sign:"\u2796",heavy_multiplication_x:"\u2716\uFE0F",heavy_plus_sign:"\u2795",helicopter:"\u{1F681}",herb:"\u{1F33F}",hibiscus:"\u{1F33A}",high_brightness:"\u{1F506}",high_heel:"\u{1F460}",hocho:"\u{1F52A}",hole:"\u{1F573}",honey_pot:"\u{1F36F}",horse:"\u{1F434}",horse_racing:"\u{1F3C7}",hospital:"\u{1F3E5}",hot_pepper:"\u{1F336}",hotdog:"\u{1F32D}",hotel:"\u{1F3E8}",hotsprings:"\u2668\uFE0F",hourglass:"\u231B\uFE0F",hourglass_flowing_sand:"\u23F3",house:"\u{1F3E0}",house_with_garden:"\u{1F3E1}",houses:"\u{1F3D8}",hugs:"\u{1F917}",hushed:"\u{1F62F}",ice_cream:"\u{1F368}",ice_hockey:"\u{1F3D2}",ice_skate:"\u26F8",icecream:"\u{1F366}",id:"\u{1F194}",ideograph_advantage:"\u{1F250}",imp:"\u{1F47F}",inbox_tray:"\u{1F4E5}",incoming_envelope:"\u{1F4E8}",tipping_hand_woman:"\u{1F481}",information_source:"\u2139\uFE0F",innocent:"\u{1F607}",interrobang:"\u2049\uFE0F",iphone:"\u{1F4F1}",izakaya_lantern:"\u{1F3EE}",jack_o_lantern:"\u{1F383}",japan:"\u{1F5FE}",japanese_castle:"\u{1F3EF}",japanese_goblin:"\u{1F47A}",japanese_ogre:"\u{1F479}",jeans:"\u{1F456}",joy:"\u{1F602}",joy_cat:"\u{1F639}",joystick:"\u{1F579}",kaaba:"\u{1F54B}",key:"\u{1F511}",keyboard:"\u2328\uFE0F",keycap_ten:"\u{1F51F}",kick_scooter:"\u{1F6F4}",kimono:"\u{1F458}",kiss:"\u{1F48B}",kissing:"\u{1F617}",kissing_cat:"\u{1F63D}",kissing_closed_eyes:"\u{1F61A}",kissing_heart:"\u{1F618}",kissing_smiling_eyes:"\u{1F619}",kiwi_fruit:"\u{1F95D}",koala:"\u{1F428}",koko:"\u{1F201}",label:"\u{1F3F7}",large_blue_circle:"\u{1F535}",large_blue_diamond:"\u{1F537}",large_orange_diamond:"\u{1F536}",last_quarter_moon:"\u{1F317}",last_quarter_moon_with_face:"\u{1F31C}",latin_cross:"\u271D\uFE0F",laughing:"\u{1F606}",leaves:"\u{1F343}",ledger:"\u{1F4D2}",left_luggage:"\u{1F6C5}",left_right_arrow:"\u2194\uFE0F",leftwards_arrow_with_hook:"\u21A9\uFE0F",lemon:"\u{1F34B}",leo:"\u264C\uFE0F",leopard:"\u{1F406}",level_slider:"\u{1F39A}",libra:"\u264E\uFE0F",light_rail:"\u{1F688}",link:"\u{1F517}",lion:"\u{1F981}",lips:"\u{1F444}",lipstick:"\u{1F484}",lizard:"\u{1F98E}",lock:"\u{1F512}",lock_with_ink_pen:"\u{1F50F}",lollipop:"\u{1F36D}",loop:"\u27BF",loud_sound:"\u{1F50A}",loudspeaker:"\u{1F4E2}",love_hotel:"\u{1F3E9}",love_letter:"\u{1F48C}",low_brightness:"\u{1F505}",lying_face:"\u{1F925}",m:"\u24C2\uFE0F",mag:"\u{1F50D}",mag_right:"\u{1F50E}",mahjong:"\u{1F004}\uFE0F",mailbox:"\u{1F4EB}",mailbox_closed:"\u{1F4EA}",mailbox_with_mail:"\u{1F4EC}",mailbox_with_no_mail:"\u{1F4ED}",man:"\u{1F468}",man_artist:"\u{1F468}\u{1F3A8}",man_astronaut:"\u{1F468}\u{1F680}",man_cartwheeling:"\u{1F938}\u2642\uFE0F",man_cook:"\u{1F468}\u{1F373}",man_dancing:"\u{1F57A}",man_facepalming:"\u{1F926}\u2642\uFE0F",man_factory_worker:"\u{1F468}\u{1F3ED}",man_farmer:"\u{1F468}\u{1F33E}",man_firefighter:"\u{1F468}\u{1F692}",man_health_worker:"\u{1F468}\u2695\uFE0F",man_in_tuxedo:"\u{1F935}",man_judge:"\u{1F468}\u2696\uFE0F",man_juggling:"\u{1F939}\u2642\uFE0F",man_mechanic:"\u{1F468}\u{1F527}",man_office_worker:"\u{1F468}\u{1F4BC}",man_pilot:"\u{1F468}\u2708\uFE0F",man_playing_handball:"\u{1F93E}\u2642\uFE0F",man_playing_water_polo:"\u{1F93D}\u2642\uFE0F",man_scientist:"\u{1F468}\u{1F52C}",man_shrugging:"\u{1F937}\u2642\uFE0F",man_singer:"\u{1F468}\u{1F3A4}",man_student:"\u{1F468}\u{1F393}",man_teacher:"\u{1F468}\u{1F3EB}",man_technologist:"\u{1F468}\u{1F4BB}",man_with_gua_pi_mao:"\u{1F472}",man_with_turban:"\u{1F473}",tangerine:"\u{1F34A}",mans_shoe:"\u{1F45E}",mantelpiece_clock:"\u{1F570}",maple_leaf:"\u{1F341}",martial_arts_uniform:"\u{1F94B}",mask:"\u{1F637}",massage_woman:"\u{1F486}",massage_man:"\u{1F486}\u2642\uFE0F",meat_on_bone:"\u{1F356}",medal_military:"\u{1F396}",medal_sports:"\u{1F3C5}",mega:"\u{1F4E3}",melon:"\u{1F348}",memo:"\u{1F4DD}",men_wrestling:"\u{1F93C}\u2642\uFE0F",menorah:"\u{1F54E}",mens:"\u{1F6B9}",metal:"\u{1F918}",metro:"\u{1F687}",microphone:"\u{1F3A4}",microscope:"\u{1F52C}",milk_glass:"\u{1F95B}",milky_way:"\u{1F30C}",minibus:"\u{1F690}",minidisc:"\u{1F4BD}",mobile_phone_off:"\u{1F4F4}",money_mouth_face:"\u{1F911}",money_with_wings:"\u{1F4B8}",moneybag:"\u{1F4B0}",monkey:"\u{1F412}",monkey_face:"\u{1F435}",monorail:"\u{1F69D}",moon:"\u{1F314}",mortar_board:"\u{1F393}",mosque:"\u{1F54C}",motor_boat:"\u{1F6E5}",motor_scooter:"\u{1F6F5}",motorcycle:"\u{1F3CD}",motorway:"\u{1F6E3}",mount_fuji:"\u{1F5FB}",mountain:"\u26F0",mountain_biking_man:"\u{1F6B5}",mountain_biking_woman:"\u{1F6B5}\u2640\uFE0F",mountain_cableway:"\u{1F6A0}",mountain_railway:"\u{1F69E}",mountain_snow:"\u{1F3D4}",mouse:"\u{1F42D}",mouse2:"\u{1F401}",movie_camera:"\u{1F3A5}",moyai:"\u{1F5FF}",mrs_claus:"\u{1F936}",muscle:"\u{1F4AA}",mushroom:"\u{1F344}",musical_keyboard:"\u{1F3B9}",musical_note:"\u{1F3B5}",musical_score:"\u{1F3BC}",mute:"\u{1F507}",nail_care:"\u{1F485}",name_badge:"\u{1F4DB}",national_park:"\u{1F3DE}",nauseated_face:"\u{1F922}",necktie:"\u{1F454}",negative_squared_cross_mark:"\u274E",nerd_face:"\u{1F913}",neutral_face:"\u{1F610}",new:"\u{1F195}",new_moon:"\u{1F311}",new_moon_with_face:"\u{1F31A}",newspaper:"\u{1F4F0}",newspaper_roll:"\u{1F5DE}",next_track_button:"\u23ED",ng:"\u{1F196}",no_good_man:"\u{1F645}\u2642\uFE0F",no_good_woman:"\u{1F645}",night_with_stars:"\u{1F303}",no_bell:"\u{1F515}",no_bicycles:"\u{1F6B3}",no_entry:"\u26D4\uFE0F",no_entry_sign:"\u{1F6AB}",no_mobile_phones:"\u{1F4F5}",no_mouth:"\u{1F636}",no_pedestrians:"\u{1F6B7}",no_smoking:"\u{1F6AD}","non-potable_water":"\u{1F6B1}",nose:"\u{1F443}",notebook:"\u{1F4D3}",notebook_with_decorative_cover:"\u{1F4D4}",notes:"\u{1F3B6}",nut_and_bolt:"\u{1F529}",o:"\u2B55\uFE0F",o2:"\u{1F17E}\uFE0F",ocean:"\u{1F30A}",octopus:"\u{1F419}",oden:"\u{1F362}",office:"\u{1F3E2}",oil_drum:"\u{1F6E2}",ok:"\u{1F197}",ok_hand:"\u{1F44C}",ok_man:"\u{1F646}\u2642\uFE0F",ok_woman:"\u{1F646}",old_key:"\u{1F5DD}",older_man:"\u{1F474}",older_woman:"\u{1F475}",om:"\u{1F549}",on:"\u{1F51B}",oncoming_automobile:"\u{1F698}",oncoming_bus:"\u{1F68D}",oncoming_police_car:"\u{1F694}",oncoming_taxi:"\u{1F696}",open_file_folder:"\u{1F4C2}",open_hands:"\u{1F450}",open_mouth:"\u{1F62E}",open_umbrella:"\u2602\uFE0F",ophiuchus:"\u26CE",orange_book:"\u{1F4D9}",orthodox_cross:"\u2626\uFE0F",outbox_tray:"\u{1F4E4}",owl:"\u{1F989}",ox:"\u{1F402}",package:"\u{1F4E6}",page_facing_up:"\u{1F4C4}",page_with_curl:"\u{1F4C3}",pager:"\u{1F4DF}",paintbrush:"\u{1F58C}",palm_tree:"\u{1F334}",pancakes:"\u{1F95E}",panda_face:"\u{1F43C}",paperclip:"\u{1F4CE}",paperclips:"\u{1F587}",parasol_on_ground:"\u26F1",parking:"\u{1F17F}\uFE0F",part_alternation_mark:"\u303D\uFE0F",partly_sunny:"\u26C5\uFE0F",passenger_ship:"\u{1F6F3}",passport_control:"\u{1F6C2}",pause_button:"\u23F8",peace_symbol:"\u262E\uFE0F",peach:"\u{1F351}",peanuts:"\u{1F95C}",pear:"\u{1F350}",pen:"\u{1F58A}",pencil2:"\u270F\uFE0F",penguin:"\u{1F427}",pensive:"\u{1F614}",performing_arts:"\u{1F3AD}",persevere:"\u{1F623}",person_fencing:"\u{1F93A}",pouting_woman:"\u{1F64E}",phone:"\u260E\uFE0F",pick:"\u26CF",pig:"\u{1F437}",pig2:"\u{1F416}",pig_nose:"\u{1F43D}",pill:"\u{1F48A}",pineapple:"\u{1F34D}",ping_pong:"\u{1F3D3}",pisces:"\u2653\uFE0F",pizza:"\u{1F355}",place_of_worship:"\u{1F6D0}",plate_with_cutlery:"\u{1F37D}",play_or_pause_button:"\u23EF",point_down:"\u{1F447}",point_left:"\u{1F448}",point_right:"\u{1F449}",point_up:"\u261D\uFE0F",point_up_2:"\u{1F446}",police_car:"\u{1F693}",policewoman:"\u{1F46E}\u2640\uFE0F",poodle:"\u{1F429}",popcorn:"\u{1F37F}",post_office:"\u{1F3E3}",postal_horn:"\u{1F4EF}",postbox:"\u{1F4EE}",potable_water:"\u{1F6B0}",potato:"\u{1F954}",pouch:"\u{1F45D}",poultry_leg:"\u{1F357}",pound:"\u{1F4B7}",rage:"\u{1F621}",pouting_cat:"\u{1F63E}",pouting_man:"\u{1F64E}\u2642\uFE0F",pray:"\u{1F64F}",prayer_beads:"\u{1F4FF}",pregnant_woman:"\u{1F930}",previous_track_button:"\u23EE",prince:"\u{1F934}",princess:"\u{1F478}",printer:"\u{1F5A8}",purple_heart:"\u{1F49C}",purse:"\u{1F45B}",pushpin:"\u{1F4CC}",put_litter_in_its_place:"\u{1F6AE}",question:"\u2753",rabbit:"\u{1F430}",rabbit2:"\u{1F407}",racehorse:"\u{1F40E}",racing_car:"\u{1F3CE}",radio:"\u{1F4FB}",radio_button:"\u{1F518}",radioactive:"\u2622\uFE0F",railway_car:"\u{1F683}",railway_track:"\u{1F6E4}",rainbow:"\u{1F308}",rainbow_flag:"\u{1F3F3}\uFE0F\u{1F308}",raised_back_of_hand:"\u{1F91A}",raised_hand_with_fingers_splayed:"\u{1F590}",raised_hands:"\u{1F64C}",raising_hand_woman:"\u{1F64B}",raising_hand_man:"\u{1F64B}\u2642\uFE0F",ram:"\u{1F40F}",ramen:"\u{1F35C}",rat:"\u{1F400}",record_button:"\u23FA",recycle:"\u267B\uFE0F",red_circle:"\u{1F534}",registered:"\xAE\uFE0F",relaxed:"\u263A\uFE0F",relieved:"\u{1F60C}",reminder_ribbon:"\u{1F397}",repeat:"\u{1F501}",repeat_one:"\u{1F502}",rescue_worker_helmet:"\u26D1",restroom:"\u{1F6BB}",revolving_hearts:"\u{1F49E}",rewind:"\u23EA",rhinoceros:"\u{1F98F}",ribbon:"\u{1F380}",rice:"\u{1F35A}",rice_ball:"\u{1F359}",rice_cracker:"\u{1F358}",rice_scene:"\u{1F391}",right_anger_bubble:"\u{1F5EF}",ring:"\u{1F48D}",robot:"\u{1F916}",rocket:"\u{1F680}",rofl:"\u{1F923}",roll_eyes:"\u{1F644}",roller_coaster:"\u{1F3A2}",rooster:"\u{1F413}",rose:"\u{1F339}",rosette:"\u{1F3F5}",rotating_light:"\u{1F6A8}",round_pushpin:"\u{1F4CD}",rowing_man:"\u{1F6A3}",rowing_woman:"\u{1F6A3}\u2640\uFE0F",rugby_football:"\u{1F3C9}",running_man:"\u{1F3C3}",running_shirt_with_sash:"\u{1F3BD}",running_woman:"\u{1F3C3}\u2640\uFE0F",sa:"\u{1F202}\uFE0F",sagittarius:"\u2650\uFE0F",sake:"\u{1F376}",sandal:"\u{1F461}",santa:"\u{1F385}",satellite:"\u{1F4E1}",saxophone:"\u{1F3B7}",school:"\u{1F3EB}",school_satchel:"\u{1F392}",scissors:"\u2702\uFE0F",scorpion:"\u{1F982}",scorpius:"\u264F\uFE0F",scream:"\u{1F631}",scream_cat:"\u{1F640}",scroll:"\u{1F4DC}",seat:"\u{1F4BA}",secret:"\u3299\uFE0F",see_no_evil:"\u{1F648}",seedling:"\u{1F331}",selfie:"\u{1F933}",shallow_pan_of_food:"\u{1F958}",shamrock:"\u2618\uFE0F",shark:"\u{1F988}",shaved_ice:"\u{1F367}",sheep:"\u{1F411}",shell:"\u{1F41A}",shield:"\u{1F6E1}",shinto_shrine:"\u26E9",ship:"\u{1F6A2}",shirt:"\u{1F455}",shopping:"\u{1F6CD}",shopping_cart:"\u{1F6D2}",shower:"\u{1F6BF}",shrimp:"\u{1F990}",signal_strength:"\u{1F4F6}",six_pointed_star:"\u{1F52F}",ski:"\u{1F3BF}",skier:"\u26F7",skull:"\u{1F480}",skull_and_crossbones:"\u2620\uFE0F",sleeping:"\u{1F634}",sleeping_bed:"\u{1F6CC}",sleepy:"\u{1F62A}",slightly_frowning_face:"\u{1F641}",slightly_smiling_face:"\u{1F642}",slot_machine:"\u{1F3B0}",small_airplane:"\u{1F6E9}",small_blue_diamond:"\u{1F539}",small_orange_diamond:"\u{1F538}",small_red_triangle:"\u{1F53A}",small_red_triangle_down:"\u{1F53B}",smile:"\u{1F604}",smile_cat:"\u{1F638}",smiley:"\u{1F603}",smiley_cat:"\u{1F63A}",smiling_imp:"\u{1F608}",smirk:"\u{1F60F}",smirk_cat:"\u{1F63C}",smoking:"\u{1F6AC}",snail:"\u{1F40C}",snake:"\u{1F40D}",sneezing_face:"\u{1F927}",snowboarder:"\u{1F3C2}",snowflake:"\u2744\uFE0F",snowman:"\u26C4\uFE0F",snowman_with_snow:"\u2603\uFE0F",sob:"\u{1F62D}",soccer:"\u26BD\uFE0F",soon:"\u{1F51C}",sos:"\u{1F198}",sound:"\u{1F509}",space_invader:"\u{1F47E}",spades:"\u2660\uFE0F",spaghetti:"\u{1F35D}",sparkle:"\u2747\uFE0F",sparkler:"\u{1F387}",sparkles:"\u2728",sparkling_heart:"\u{1F496}",speak_no_evil:"\u{1F64A}",speaker:"\u{1F508}",speaking_head:"\u{1F5E3}",speech_balloon:"\u{1F4AC}",speedboat:"\u{1F6A4}",spider:"\u{1F577}",spider_web:"\u{1F578}",spiral_calendar:"\u{1F5D3}",spiral_notepad:"\u{1F5D2}",spoon:"\u{1F944}",squid:"\u{1F991}",stadium:"\u{1F3DF}",star:"\u2B50\uFE0F",star2:"\u{1F31F}",star_and_crescent:"\u262A\uFE0F",star_of_david:"\u2721\uFE0F",stars:"\u{1F320}",station:"\u{1F689}",statue_of_liberty:"\u{1F5FD}",steam_locomotive:"\u{1F682}",stew:"\u{1F372}",stop_button:"\u23F9",stop_sign:"\u{1F6D1}",stopwatch:"\u23F1",straight_ruler:"\u{1F4CF}",strawberry:"\u{1F353}",stuck_out_tongue:"\u{1F61B}",stuck_out_tongue_closed_eyes:"\u{1F61D}",stuck_out_tongue_winking_eye:"\u{1F61C}",studio_microphone:"\u{1F399}",stuffed_flatbread:"\u{1F959}",sun_behind_large_cloud:"\u{1F325}",sun_behind_rain_cloud:"\u{1F326}",sun_behind_small_cloud:"\u{1F324}",sun_with_face:"\u{1F31E}",sunflower:"\u{1F33B}",sunglasses:"\u{1F60E}",sunny:"\u2600\uFE0F",sunrise:"\u{1F305}",sunrise_over_mountains:"\u{1F304}",surfing_man:"\u{1F3C4}",surfing_woman:"\u{1F3C4}\u2640\uFE0F",sushi:"\u{1F363}",suspension_railway:"\u{1F69F}",sweat:"\u{1F613}",sweat_drops:"\u{1F4A6}",sweat_smile:"\u{1F605}",sweet_potato:"\u{1F360}",swimming_man:"\u{1F3CA}",swimming_woman:"\u{1F3CA}\u2640\uFE0F",symbols:"\u{1F523}",synagogue:"\u{1F54D}",syringe:"\u{1F489}",taco:"\u{1F32E}",tada:"\u{1F389}",tanabata_tree:"\u{1F38B}",taurus:"\u2649\uFE0F",taxi:"\u{1F695}",tea:"\u{1F375}",telephone_receiver:"\u{1F4DE}",telescope:"\u{1F52D}",tennis:"\u{1F3BE}",tent:"\u26FA\uFE0F",thermometer:"\u{1F321}",thinking:"\u{1F914}",thought_balloon:"\u{1F4AD}",ticket:"\u{1F3AB}",tickets:"\u{1F39F}",tiger:"\u{1F42F}",tiger2:"\u{1F405}",timer_clock:"\u23F2",tipping_hand_man:"\u{1F481}\u2642\uFE0F",tired_face:"\u{1F62B}",tm:"\u2122\uFE0F",toilet:"\u{1F6BD}",tokyo_tower:"\u{1F5FC}",tomato:"\u{1F345}",tongue:"\u{1F445}",top:"\u{1F51D}",tophat:"\u{1F3A9}",tornado:"\u{1F32A}",trackball:"\u{1F5B2}",tractor:"\u{1F69C}",traffic_light:"\u{1F6A5}",train:"\u{1F68B}",train2:"\u{1F686}",tram:"\u{1F68A}",triangular_flag_on_post:"\u{1F6A9}",triangular_ruler:"\u{1F4D0}",trident:"\u{1F531}",triumph:"\u{1F624}",trolleybus:"\u{1F68E}",trophy:"\u{1F3C6}",tropical_drink:"\u{1F379}",tropical_fish:"\u{1F420}",truck:"\u{1F69A}",trumpet:"\u{1F3BA}",tulip:"\u{1F337}",tumbler_glass:"\u{1F943}",turkey:"\u{1F983}",turtle:"\u{1F422}",tv:"\u{1F4FA}",twisted_rightwards_arrows:"\u{1F500}",two_hearts:"\u{1F495}",two_men_holding_hands:"\u{1F46C}",two_women_holding_hands:"\u{1F46D}",u5272:"\u{1F239}",u5408:"\u{1F234}",u55b6:"\u{1F23A}",u6307:"\u{1F22F}\uFE0F",u6708:"\u{1F237}\uFE0F",u6709:"\u{1F236}",u6e80:"\u{1F235}",u7121:"\u{1F21A}\uFE0F",u7533:"\u{1F238}",u7981:"\u{1F232}",u7a7a:"\u{1F233}",umbrella:"\u2614\uFE0F",unamused:"\u{1F612}",underage:"\u{1F51E}",unicorn:"\u{1F984}",unlock:"\u{1F513}",up:"\u{1F199}",upside_down_face:"\u{1F643}",v:"\u270C\uFE0F",vertical_traffic_light:"\u{1F6A6}",vhs:"\u{1F4FC}",vibration_mode:"\u{1F4F3}",video_camera:"\u{1F4F9}",video_game:"\u{1F3AE}",violin:"\u{1F3BB}",virgo:"\u264D\uFE0F",volcano:"\u{1F30B}",volleyball:"\u{1F3D0}",vs:"\u{1F19A}",vulcan_salute:"\u{1F596}",walking_man:"\u{1F6B6}",walking_woman:"\u{1F6B6}\u2640\uFE0F",waning_crescent_moon:"\u{1F318}",waning_gibbous_moon:"\u{1F316}",warning:"\u26A0\uFE0F",wastebasket:"\u{1F5D1}",watch:"\u231A\uFE0F",water_buffalo:"\u{1F403}",watermelon:"\u{1F349}",wave:"\u{1F44B}",wavy_dash:"\u3030\uFE0F",waxing_crescent_moon:"\u{1F312}",wc:"\u{1F6BE}",weary:"\u{1F629}",wedding:"\u{1F492}",weight_lifting_man:"\u{1F3CB}\uFE0F",weight_lifting_woman:"\u{1F3CB}\uFE0F\u2640\uFE0F",whale:"\u{1F433}",whale2:"\u{1F40B}",wheel_of_dharma:"\u2638\uFE0F",wheelchair:"\u267F\uFE0F",white_check_mark:"\u2705",white_circle:"\u26AA\uFE0F",white_flag:"\u{1F3F3}\uFE0F",white_flower:"\u{1F4AE}",white_large_square:"\u2B1C\uFE0F",white_medium_small_square:"\u25FD\uFE0F",white_medium_square:"\u25FB\uFE0F",white_small_square:"\u25AB\uFE0F",white_square_button:"\u{1F533}",wilted_flower:"\u{1F940}",wind_chime:"\u{1F390}",wind_face:"\u{1F32C}",wine_glass:"\u{1F377}",wink:"\u{1F609}",wolf:"\u{1F43A}",woman:"\u{1F469}",woman_artist:"\u{1F469}\u{1F3A8}",woman_astronaut:"\u{1F469}\u{1F680}",woman_cartwheeling:"\u{1F938}\u2640\uFE0F",woman_cook:"\u{1F469}\u{1F373}",woman_facepalming:"\u{1F926}\u2640\uFE0F",woman_factory_worker:"\u{1F469}\u{1F3ED}",woman_farmer:"\u{1F469}\u{1F33E}",woman_firefighter:"\u{1F469}\u{1F692}",woman_health_worker:"\u{1F469}\u2695\uFE0F",woman_judge:"\u{1F469}\u2696\uFE0F",woman_juggling:"\u{1F939}\u2640\uFE0F",woman_mechanic:"\u{1F469}\u{1F527}",woman_office_worker:"\u{1F469}\u{1F4BC}",woman_pilot:"\u{1F469}\u2708\uFE0F",woman_playing_handball:"\u{1F93E}\u2640\uFE0F",woman_playing_water_polo:"\u{1F93D}\u2640\uFE0F",woman_scientist:"\u{1F469}\u{1F52C}",woman_shrugging:"\u{1F937}\u2640\uFE0F",woman_singer:"\u{1F469}\u{1F3A4}",woman_student:"\u{1F469}\u{1F393}",woman_teacher:"\u{1F469}\u{1F3EB}",woman_technologist:"\u{1F469}\u{1F4BB}",woman_with_turban:"\u{1F473}\u2640\uFE0F",womans_clothes:"\u{1F45A}",womans_hat:"\u{1F452}",women_wrestling:"\u{1F93C}\u2640\uFE0F",womens:"\u{1F6BA}",world_map:"\u{1F5FA}",worried:"\u{1F61F}",wrench:"\u{1F527}",writing_hand:"\u270D\uFE0F",x:"\u274C",yellow_heart:"\u{1F49B}",yen:"\u{1F4B4}",yin_yang:"\u262F\uFE0F",yum:"\u{1F60B}",zap:"\u26A1\uFE0F",zipper_mouth_face:"\u{1F910}",zzz:"\u{1F4A4}",octocat:'',showdown:`S`},r.Converter=function(d){var y={},m=[],x=[],S={},_=a,C={parsed:{},raw:"",format:""};E();function E(){d=d||{};for(var M in s)s.hasOwnProperty(M)&&(y[M]=s[M]);if(typeof d=="object")for(var P in d)d.hasOwnProperty(P)&&(y[P]=d[P]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof d+" was passed instead.");y.extensions&&r.helper.forEach(y.extensions,T)}function T(M,P){if(P=P||null,r.helper.isString(M))if(M=r.helper.stdExtName(M),P=M,r.extensions[M]){console.warn("DEPRECATION WARNING: "+M+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),R(r.extensions[M],M);return}else if(!r.helper.isUndefined(o[M]))M=o[M];else throw Error('Extension "'+M+'" could not be loaded. It was either not found or is not a valid extension.');typeof M=="function"&&(M=M()),r.helper.isArray(M)||(M=[M]);var L=c(M,P);if(!L.valid)throw Error(L.error);for(var H=0;H[ \t]+,">\xA8NBSP;<"),!P)if(window&&window.document)P=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var L=P.createElement("div");L.innerHTML=M;var H={preList:_e(L)};ge(L);for(var te=L.childNodes,q="",ae=0;ae'}else V.push(Y[ee].innerHTML),Y[ee].innerHTML="",Y[ee].setAttribute("prenum",ee.toString());return V}return q},this.setOption=function(M,P){y[M]=P},this.getOption=function(M){return y[M]},this.getOptions=function(){return y},this.addExtension=function(M,P){P=P||null,T(M,P)},this.useExtension=function(M){T(M)},this.setFlavor=function(M){if(!l.hasOwnProperty(M))throw Error(M+" flavor was not found");var P=l[M];_=M;for(var L in P)P.hasOwnProperty(L)&&(y[L]=P[L])},this.getFlavor=function(){return _},this.removeExtension=function(M){r.helper.isArray(M)||(M=[M]);for(var P=0;P? ?(['"].*['"])?\)$/m)>-1)E="";else if(!E)if(C||(C=_.toLowerCase().replace(/ ?\n/g," ")),E="#"+C,!r.helper.isUndefined(m.gUrls[C]))E=m.gUrls[C],r.helper.isUndefined(m.gTitles[C])||(N=m.gTitles[C]);else return S;E=E.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var D='"+_+"",D};return d=d.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,x),d=d.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,x),d=d.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,x),d=d.replace(/\[([^\[\]]+)]()()()()()/g,x),y.ghMentions&&(d=d.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(S,_,C,E,T){if(C==="\\")return _+E;if(!r.helper.isString(y.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var R=y.ghMentionsLink.replace(/\{u}/g,T),N="";return y.openLinksInNewWindow&&(N=' rel="noopener noreferrer" target="\xA8E95Eblank"'),_+'"+E+""})),d=m.converter._dispatch("anchors.after",d,y,m),d});var h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,p=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,g=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,v=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,b=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,w=function(d){return function(y,m,x,S,_,C,E){x=x.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var T=x,R="",N="",D=m||"",M=E||"";return/^www\./i.test(x)&&(x=x.replace(/^www\./i,"http://www.")),d.excludeTrailingPunctuationFromURLs&&C&&(R=C),d.openLinksInNewWindow&&(N=' rel="noopener noreferrer" target="\xA8E95Eblank"'),D+'"+T+""+R+M}},k=function(d,y){return function(m,x,S){var _="mailto:";return x=x||"",S=r.subParser("unescapeSpecialChars")(S,d,y),d.encodeEmails?(_=r.helper.encodeEmailAddress(_+S),S=r.helper.encodeEmailAddress(S)):_=_+S,x+''+S+""}};r.subParser("autoLinks",function(d,y,m){return d=m.converter._dispatch("autoLinks.before",d,y,m),d=d.replace(g,w(y)),d=d.replace(b,k(y,m)),d=m.converter._dispatch("autoLinks.after",d,y,m),d}),r.subParser("simplifiedAutoLinks",function(d,y,m){return y.simplifiedAutoLink&&(d=m.converter._dispatch("simplifiedAutoLinks.before",d,y,m),y.excludeTrailingPunctuationFromURLs?d=d.replace(p,w(y)):d=d.replace(h,w(y)),d=d.replace(v,k(y,m)),d=m.converter._dispatch("simplifiedAutoLinks.after",d,y,m)),d}),r.subParser("blockGamut",function(d,y,m){return d=m.converter._dispatch("blockGamut.before",d,y,m),d=r.subParser("blockQuotes")(d,y,m),d=r.subParser("headers")(d,y,m),d=r.subParser("horizontalRule")(d,y,m),d=r.subParser("lists")(d,y,m),d=r.subParser("codeBlocks")(d,y,m),d=r.subParser("tables")(d,y,m),d=r.subParser("hashHTMLBlocks")(d,y,m),d=r.subParser("paragraphs")(d,y,m),d=m.converter._dispatch("blockGamut.after",d,y,m),d}),r.subParser("blockQuotes",function(d,y,m){d=m.converter._dispatch("blockQuotes.before",d,y,m),d=d+`
+
+`;var x=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return y.splitAdjacentBlockquotes&&(x=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),d=d.replace(x,function(S){return S=S.replace(/^[ \t]*>[ \t]?/gm,""),S=S.replace(/¨0/g,""),S=S.replace(/^[ \t]+$/gm,""),S=r.subParser("githubCodeBlocks")(S,y,m),S=r.subParser("blockGamut")(S,y,m),S=S.replace(/(^|\n)/g,"$1 "),S=S.replace(/(\s*[^\r]+?<\/pre>)/gm,function(_,C){var E=C;return E=E.replace(/^ /mg,"\xA80"),E=E.replace(/¨0/g,""),E}),r.subParser("hashBlock")(`
+`+S+`
+
`,y,m)}),d=m.converter._dispatch("blockQuotes.after",d,y,m),d}),r.subParser("codeBlocks",function(d,y,m){d=m.converter._dispatch("codeBlocks.before",d,y,m),d+="\xA80";var x=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return d=d.replace(x,function(S,_,C){var E=_,T=C,R=`
+`;return E=r.subParser("outdent")(E,y,m),E=r.subParser("encodeCode")(E,y,m),E=r.subParser("detab")(E,y,m),E=E.replace(/^\n+/g,""),E=E.replace(/\n+$/g,""),y.omitExtraWLInCodeBlocks&&(R=""),E=""+E+R+"
",r.subParser("hashBlock")(E,y,m)+T}),d=d.replace(/¨0/,""),d=m.converter._dispatch("codeBlocks.after",d,y,m),d}),r.subParser("codeSpans",function(d,y,m){return d=m.converter._dispatch("codeSpans.before",d,y,m),typeof d=="undefined"&&(d=""),d=d.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(x,S,_,C){var E=C;return E=E.replace(/^([ \t]*)/g,""),E=E.replace(/[ \t]*$/g,""),E=r.subParser("encodeCode")(E,y,m),E=S+""+E+"
",E=r.subParser("hashHTMLSpans")(E,y,m),E}),d=m.converter._dispatch("codeSpans.after",d,y,m),d}),r.subParser("completeHTMLDocument",function(d,y,m){if(!y.completeHTMLDocument)return d;d=m.converter._dispatch("completeHTMLDocument.before",d,y,m);var x="html",S=`
+`,_="",C=`
+`,E="",T="";typeof m.metadata.parsed.doctype!="undefined"&&(S="
+`,x=m.metadata.parsed.doctype.toString().toLowerCase(),(x==="html"||x==="html5")&&(C=''));for(var R in m.metadata.parsed)if(m.metadata.parsed.hasOwnProperty(R))switch(R.toLowerCase()){case"doctype":break;case"title":_=""+m.metadata.parsed.title+`
+`;break;case"charset":x==="html"||x==="html5"?C='
+`:C='
+`;break;case"language":case"lang":E=' lang="'+m.metadata.parsed[R]+'"',T+='
+`;break;default:T+='
+`}return d=S+"
+
+`+_+C+T+`
+
+`+d.trim()+`
+
+`,d=m.converter._dispatch("completeHTMLDocument.after",d,y,m),d}),r.subParser("detab",function(d,y,m){return d=m.converter._dispatch("detab.before",d,y,m),d=d.replace(/\t(?=\t)/g," "),d=d.replace(/\t/g,"\xA8A\xA8B"),d=d.replace(/¨B(.+?)¨A/g,function(x,S){for(var _=S,C=4-_.length%4,E=0;E/g,">"),d=m.converter._dispatch("encodeAmpsAndAngles.after",d,y,m),d}),r.subParser("encodeBackslashEscapes",function(d,y,m){return d=m.converter._dispatch("encodeBackslashEscapes.before",d,y,m),d=d.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),d=d.replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,r.helper.escapeCharactersCallback),d=m.converter._dispatch("encodeBackslashEscapes.after",d,y,m),d}),r.subParser("encodeCode",function(d,y,m){return d=m.converter._dispatch("encodeCode.before",d,y,m),d=d.replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),d=m.converter._dispatch("encodeCode.after",d,y,m),d}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(d,y,m){d=m.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",d,y,m);var x=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,S=/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return d=d.replace(x,function(_){return _.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),d=d.replace(S,function(_){return _.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),d=m.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",d,y,m),d}),r.subParser("githubCodeBlocks",function(d,y,m){return y.ghCodeBlocks?(d=m.converter._dispatch("githubCodeBlocks.before",d,y,m),d+="\xA80",d=d.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(x,S,_,C){var E=y.omitExtraWLInCodeBlocks?"":`
+`;return C=r.subParser("encodeCode")(C,y,m),C=r.subParser("detab")(C,y,m),C=C.replace(/^\n+/g,""),C=C.replace(/\n+$/g,""),C=""+C+E+"
",C=r.subParser("hashBlock")(C,y,m),`
+
+\xA8G`+(m.ghCodeBlocks.push({text:x,codeblock:C})-1)+`G
+
+`}),d=d.replace(/¨0/,""),m.converter._dispatch("githubCodeBlocks.after",d,y,m)):d}),r.subParser("hashBlock",function(d,y,m){return d=m.converter._dispatch("hashBlock.before",d,y,m),d=d.replace(/(^\n+|\n+$)/g,""),d=`
+
+\xA8K`+(m.gHtmlBlocks.push(d)-1)+`K
+
+`,d=m.converter._dispatch("hashBlock.after",d,y,m),d}),r.subParser("hashCodeTags",function(d,y,m){d=m.converter._dispatch("hashCodeTags.before",d,y,m);var x=function(S,_,C,E){var T=C+r.subParser("encodeCode")(_,y,m)+E;return"\xA8C"+(m.gHtmlSpans.push(T)-1)+"C"};return d=r.helper.replaceRecursiveRegExp(d,x,"]*>","
","gim"),d=m.converter._dispatch("hashCodeTags.after",d,y,m),d}),r.subParser("hashElement",function(d,y,m){return function(x,S){var _=S;return _=_.replace(/\n\n/g,`
+`),_=_.replace(/^\n/,""),_=_.replace(/\n+$/g,""),_=`
+
+\xA8K`+(m.gHtmlBlocks.push(_)-1)+`K
+
+`,_}}),r.subParser("hashHTMLBlocks",function(d,y,m){d=m.converter._dispatch("hashHTMLBlocks.before",d,y,m);var x=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],S=function(M,P,L,H){var te=M;return L.search(/\bmarkdown\b/)!==-1&&(te=L+m.converter.makeHtml(P)+H),`
+
+\xA8K`+(m.gHtmlBlocks.push(te)-1)+`K
+
+`};y.backslashEscapesHTMLTags&&(d=d.replace(/\\<(\/?[^>]+?)>/g,function(M,P){return"<"+P+">"}));for(var _=0;_]*>)","im"),T="<"+x[_]+"\\b[^>]*>",R=""+x[_]+">";(C=r.helper.regexIndexOf(d,E))!==-1;){var N=r.helper.splitAtIndex(d,C),D=r.helper.replaceRecursiveRegExp(N[1],S,T,R,"im");if(D===N[1])break;d=N[0].concat(D)}return d=d.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(d,y,m)),d=r.helper.replaceRecursiveRegExp(d,function(M){return`
+
+\xA8K`+(m.gHtmlBlocks.push(M)-1)+`K
+
+`},"^ {0,3}","gm"),d=d.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(d,y,m)),d=m.converter._dispatch("hashHTMLBlocks.after",d,y,m),d}),r.subParser("hashHTMLSpans",function(d,y,m){d=m.converter._dispatch("hashHTMLSpans.before",d,y,m);function x(S){return"\xA8C"+(m.gHtmlSpans.push(S)-1)+"C"}return d=d.replace(/<[^>]+?\/>/gi,function(S){return x(S)}),d=d.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(S){return x(S)}),d=d.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(S){return x(S)}),d=d.replace(/<[^>]+?>/gi,function(S){return x(S)}),d=m.converter._dispatch("hashHTMLSpans.after",d,y,m),d}),r.subParser("unhashHTMLSpans",function(d,y,m){d=m.converter._dispatch("unhashHTMLSpans.before",d,y,m);for(var x=0;x]*>\\s*]*>","^ {0,3}
\\s*
","gim"),d=m.converter._dispatch("hashPreCodeTags.after",d,y,m),d}),r.subParser("headers",function(d,y,m){d=m.converter._dispatch("headers.before",d,y,m);var x=isNaN(parseInt(y.headerLevelStart))?1:parseInt(y.headerLevelStart),S=y.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,_=y.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;d=d.replace(S,function(T,R){var N=r.subParser("spanGamut")(R,y,m),D=y.noHeaderId?"":' id="'+E(R)+'"',M=x,P=""+N+"";return r.subParser("hashBlock")(P,y,m)}),d=d.replace(_,function(T,R){var N=r.subParser("spanGamut")(R,y,m),D=y.noHeaderId?"":' id="'+E(R)+'"',M=x+1,P=""+N+"";return r.subParser("hashBlock")(P,y,m)});var C=y.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;d=d.replace(C,function(T,R,N){var D=N;y.customizedHeaderId&&(D=N.replace(/\s?\{([^{]+?)}\s*$/,""));var M=r.subParser("spanGamut")(D,y,m),P=y.noHeaderId?"":' id="'+E(N)+'"',L=x-1+R.length,H=""+M+"";return r.subParser("hashBlock")(H,y,m)});function E(T){var R,N;if(y.customizedHeaderId){var D=T.match(/\{([^{]+?)}\s*$/);D&&D[1]&&(T=D[1])}return R=T,r.helper.isString(y.prefixHeaderId)?N=y.prefixHeaderId:y.prefixHeaderId===!0?N="section-":N="",y.rawPrefixHeaderId||(R=N+R),y.ghCompatibleHeaderId?R=R.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():y.rawHeaderId?R=R.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"\xA8").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():R=R.replace(/[^\w]/g,"").toLowerCase(),y.rawPrefixHeaderId&&(R=N+R),m.hashLinkCounts[R]?R=R+"-"+m.hashLinkCounts[R]++:m.hashLinkCounts[R]=1,R}return d=m.converter._dispatch("headers.after",d,y,m),d}),r.subParser("horizontalRule",function(d,y,m){d=m.converter._dispatch("horizontalRule.before",d,y,m);var x=r.subParser("hashBlock")("
",y,m);return d=d.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,x),d=d.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,x),d=d.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,x),d=m.converter._dispatch("horizontalRule.after",d,y,m),d}),r.subParser("images",function(d,y,m){d=m.converter._dispatch("images.before",d,y,m);var x=/!\[([^\]]*?)][ \t]*()\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,S=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,_=/!\[([^\]]*?)][ \t]*()\([ \t]?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,C=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,E=/!\[([^\[\]]+)]()()()()()/g;function T(N,D,M,P,L,H,te,q){return P=P.replace(/\s/g,""),R(N,D,M,P,L,H,te,q)}function R(N,D,M,P,L,H,te,q){var ae=m.gUrls,ge=m.gTitles,_e=m.gDimensions;if(M=M.toLowerCase(),q||(q=""),N.search(/\(\s*>? ?(['"].*['"])?\)$/m)>-1)P="";else if(P===""||P===null)if((M===""||M===null)&&(M=D.toLowerCase().replace(/ ?\n/g," ")),P="#"+M,!r.helper.isUndefined(ae[M]))P=ae[M],r.helper.isUndefined(ge[M])||(q=ge[M]),r.helper.isUndefined(_e[M])||(L=_e[M].width,H=_e[M].height);else return N;D=D.replace(/"/g,""").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),P=P.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var I='",I}return d=d.replace(C,R),d=d.replace(_,T),d=d.replace(S,R),d=d.replace(x,R),d=d.replace(E,R),d=m.converter._dispatch("images.after",d,y,m),d}),r.subParser("italicsAndBold",function(d,y,m){d=m.converter._dispatch("italicsAndBold.before",d,y,m);function x(S,_,C){return _+S+C}return y.literalMidWordUnderscores?(d=d.replace(/\b___(\S[\s\S]*?)___\b/g,function(S,_){return x(_,"","")}),d=d.replace(/\b__(\S[\s\S]*?)__\b/g,function(S,_){return x(_,"","")}),d=d.replace(/\b_(\S[\s\S]*?)_\b/g,function(S,_){return x(_,"","")})):(d=d.replace(/___(\S[\s\S]*?)___/g,function(S,_){return/\S$/.test(_)?x(_,"",""):S}),d=d.replace(/__(\S[\s\S]*?)__/g,function(S,_){return/\S$/.test(_)?x(_,"",""):S}),d=d.replace(/_([^\s_][\s\S]*?)_/g,function(S,_){return/\S$/.test(_)?x(_,"",""):S})),y.literalMidWordAsterisks?(d=d.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(S,_,C){return x(C,_+"","")}),d=d.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(S,_,C){return x(C,_+"","")}),d=d.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(S,_,C){return x(C,_+"","")})):(d=d.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(S,_){return/\S$/.test(_)?x(_,"",""):S}),d=d.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(S,_){return/\S$/.test(_)?x(_,"",""):S}),d=d.replace(/\*([^\s*][\s\S]*?)\*/g,function(S,_){return/\S$/.test(_)?x(_,"",""):S})),d=m.converter._dispatch("italicsAndBold.after",d,y,m),d}),r.subParser("lists",function(d,y,m){function x(C,E){m.gListLevel++,C=C.replace(/\n{2,}$/,`
+`),C+="\xA80";var T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,R=/\n[ \t]*\n(?!¨0)/.test(C);return y.disableForced4SpacesIndentedSublists&&(T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),C=C.replace(T,function(N,D,M,P,L,H,te){te=te&&te.trim()!=="";var q=r.subParser("outdent")(L,y,m),ae="";return H&&y.tasklists&&(ae=' class="task-list-item" style="list-style-type: none;"',q=q.replace(/^[ \t]*\[(x|X| )?]/m,function(){var ge='",ge})),q=q.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(ge){return"\xA8A"+ge}),D||q.search(/\n{2,}/)>-1?(q=r.subParser("githubCodeBlocks")(q,y,m),q=r.subParser("blockGamut")(q,y,m)):(q=r.subParser("lists")(q,y,m),q=q.replace(/\n$/,""),q=r.subParser("hashHTMLBlocks")(q,y,m),q=q.replace(/\n\n+/g,`
+
+`),R?q=r.subParser("paragraphs")(q,y,m):q=r.subParser("spanGamut")(q,y,m)),q=q.replace("\xA8A",""),q=""+q+`
+`,q}),C=C.replace(/¨0/g,""),m.gListLevel--,E&&(C=C.replace(/\s+$/,"")),C}function S(C,E){if(E==="ol"){var T=C.match(/^ *(\d+)\./);if(T&&T[1]!=="1")return' start="'+T[1]+'"'}return""}function _(C,E,T){var R=y.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,N=y.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,D=E==="ul"?R:N,M="";if(C.search(D)!==-1)(function L(H){var te=H.search(D),q=S(C,E);te!==-1?(M+=`
+
+<`+E+q+`>
+`+x(H.slice(0,te),!!T)+""+E+`>
+`,E=E==="ul"?"ol":"ul",D=E==="ul"?R:N,L(H.slice(te))):M+=`
+
+<`+E+q+`>
+`+x(H,!!T)+""+E+`>
+`})(C);else{var P=S(C,E);M=`
+
+<`+E+P+`>
+`+x(C,!!T)+""+E+`>
+`}return M}return d=m.converter._dispatch("lists.before",d,y,m),d+="\xA80",m.gListLevel?d=d.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,E,T){var R=T.search(/[*+-]/g)>-1?"ul":"ol";return _(E,R,!0)}):d=d.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,E,T,R){var N=R.search(/[*+-]/g)>-1?"ul":"ol";return _(T,N,!1)}),d=d.replace(/¨0/,""),d=m.converter._dispatch("lists.after",d,y,m),d}),r.subParser("metadata",function(d,y,m){if(!y.metadata)return d;d=m.converter._dispatch("metadata.before",d,y,m);function x(S){m.metadata.raw=S,S=S.replace(/&/g,"&").replace(/"/g,"""),S=S.replace(/\n {4}/g," "),S.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(_,C,E){return m.metadata.parsed[C]=E,""})}return d=d.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(S,_,C){return x(C),"\xA8M"}),d=d.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(S,_,C){return _&&(m.metadata.format=_),x(C),"\xA8M"}),d=d.replace(/¨M/g,""),d=m.converter._dispatch("metadata.after",d,y,m),d}),r.subParser("outdent",function(d,y,m){return d=m.converter._dispatch("outdent.before",d,y,m),d=d.replace(/^(\t|[ ]{1,4})/gm,"\xA80"),d=d.replace(/¨0/g,""),d=m.converter._dispatch("outdent.after",d,y,m),d}),r.subParser("paragraphs",function(d,y,m){d=m.converter._dispatch("paragraphs.before",d,y,m),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,"");for(var x=d.split(/\n{2,}/g),S=[],_=x.length,C=0;C<_;C++){var E=x[C];E.search(/¨(K|G)(\d+)\1/g)>=0?S.push(E):E.search(/\S/)>=0&&(E=r.subParser("spanGamut")(E,y,m),E=E.replace(/^([ \t]*)/g,""),E+="
",S.push(E))}for(_=S.length,C=0;C<_;C++){for(var T="",R=S[C],N=!1;/¨(K|G)(\d+)\1/.test(R);){var D=RegExp.$1,M=RegExp.$2;D==="K"?T=m.gHtmlBlocks[M]:N?T=r.subParser("encodeCode")(m.ghCodeBlocks[M].text,y,m):T=m.ghCodeBlocks[M].codeblock,T=T.replace(/\$/g,"$$$$"),R=R.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,T),/^]*>\s*]*>/.test(R)&&(N=!0)}S[C]=R}return d=S.join(`
+`),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,""),m.converter._dispatch("paragraphs.after",d,y,m)}),r.subParser("runExtension",function(d,y,m,x){if(d.filter)y=d.filter(y,x.converter,m);else if(d.regex){var S=d.regex;S instanceof RegExp||(S=new RegExp(S,"g")),y=y.replace(S,d.replace)}return y}),r.subParser("spanGamut",function(d,y,m){return d=m.converter._dispatch("spanGamut.before",d,y,m),d=r.subParser("codeSpans")(d,y,m),d=r.subParser("escapeSpecialCharsWithinTagAttributes")(d,y,m),d=r.subParser("encodeBackslashEscapes")(d,y,m),d=r.subParser("images")(d,y,m),d=r.subParser("anchors")(d,y,m),d=r.subParser("autoLinks")(d,y,m),d=r.subParser("simplifiedAutoLinks")(d,y,m),d=r.subParser("emoji")(d,y,m),d=r.subParser("underline")(d,y,m),d=r.subParser("italicsAndBold")(d,y,m),d=r.subParser("strikethrough")(d,y,m),d=r.subParser("ellipsis")(d,y,m),d=r.subParser("hashHTMLSpans")(d,y,m),d=r.subParser("encodeAmpsAndAngles")(d,y,m),y.simpleLineBreaks?/\n\n¨K/.test(d)||(d=d.replace(/\n+/g,`
+`)):d=d.replace(/ +\n/g,`
+`),d=m.converter._dispatch("spanGamut.after",d,y,m),d}),r.subParser("strikethrough",function(d,y,m){function x(S){return y.simplifiedAutoLink&&(S=r.subParser("simplifiedAutoLinks")(S,y,m)),""+S+""}return y.strikethrough&&(d=m.converter._dispatch("strikethrough.before",d,y,m),d=d.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(S,_){return x(_)}),d=m.converter._dispatch("strikethrough.after",d,y,m)),d}),r.subParser("stripLinkDefinitions",function(d,y,m){var x=/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,S=/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;d+="\xA80";var _=function(C,E,T,R,N,D,M){return E=E.toLowerCase(),d.toLowerCase().split(E).length-1<2?C:(T.match(/^data:.+?\/.+?;base64,/)?m.gUrls[E]=T.replace(/\s/g,""):m.gUrls[E]=r.subParser("encodeAmpsAndAngles")(T,y,m),D?D+M:(M&&(m.gTitles[E]=M.replace(/"|'/g,""")),y.parseImgDimensions&&R&&N&&(m.gDimensions[E]={width:R,height:N}),""))};return d=d.replace(S,_),d=d.replace(x,_),d=d.replace(/¨0/,""),d}),r.subParser("tables",function(d,y,m){if(!y.tables)return d;var x=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,S=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function _(N){return/^:[ \t]*--*$/.test(N)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(N)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(N)?' style="text-align:center;"':""}function C(N,D){var M="";return N=N.trim(),(y.tablesHeaderId||y.tableHeaderId)&&(M=' id="'+N.replace(/ /g,"_").toLowerCase()+'"'),N=r.subParser("spanGamut")(N,y,m),""+N+` |
+`}function E(N,D){var M=r.subParser("spanGamut")(N,y,m);return""+M+` |
+`}function T(N,D){for(var M=`
+
+
+`,P=N.length,L=0;L
+
+
+`,L=0;L
+`;for(var H=0;H
+`}return M+=`
+
+`,M}function R(N){var D,M=N.split(`
+`);for(D=0;D"+S+"
"}),d=d.replace(/\b__(\S[\s\S]*?)__\b/g,function(x,S){return""+S+""})):(d=d.replace(/___(\S[\s\S]*?)___/g,function(x,S){return/\S$/.test(S)?""+S+"":x}),d=d.replace(/__(\S[\s\S]*?)__/g,function(x,S){return/\S$/.test(S)?""+S+"":x})),d=d.replace(/(_)/g,r.helper.escapeCharactersCallback),d=m.converter._dispatch("underline.after",d,y,m)),d}),r.subParser("unescapeSpecialChars",function(d,y,m){return d=m.converter._dispatch("unescapeSpecialChars.before",d,y,m),d=d.replace(/¨E(\d+)E/g,function(x,S){var _=parseInt(S);return String.fromCharCode(_)}),d=m.converter._dispatch("unescapeSpecialChars.after",d,y,m),d}),r.subParser("makeMarkdown.blockquote",function(d,y){var m="";if(d.hasChildNodes())for(var x=d.childNodes,S=x.length,_=0;_ "+m.split(`
+`).join(`
+> `),m}),r.subParser("makeMarkdown.codeBlock",function(d,y){var m=d.getAttribute("language"),x=d.getAttribute("precodenum");return"```"+m+`
+`+y.preList[x]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(d){return"`"+d.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(d,y){var m="";if(d.hasChildNodes()){m+="*";for(var x=d.childNodes,S=x.length,_=0;_",d.hasAttribute("width")&&d.hasAttribute("height")&&(y+=" ="+d.getAttribute("width")+"x"+d.getAttribute("height")),d.hasAttribute("title")&&(y+=' "'+d.getAttribute("title")+'"'),y+=")"),y}),r.subParser("makeMarkdown.links",function(d,y){var m="";if(d.hasChildNodes()&&d.hasAttribute("href")){var x=d.childNodes,S=x.length;m="[";for(var _=0;_",d.hasAttribute("title")&&(m+=' "'+d.getAttribute("title")+'"'),m+=")"}return m}),r.subParser("makeMarkdown.list",function(d,y,m){var x="";if(!d.hasChildNodes())return"";for(var S=d.childNodes,_=S.length,C=d.getAttribute("start")||1,E=0;E<_;++E)if(!(typeof S[E].tagName=="undefined"||S[E].tagName.toLowerCase()!=="li")){var T="";m==="ol"?T=C.toString()+". ":T="- ",x+=T+r.subParser("makeMarkdown.listItem")(S[E],y),++C}return x+=`
+
+`,x.trim()}),r.subParser("makeMarkdown.listItem",function(d,y){for(var m="",x=d.childNodes,S=x.length,_=0;_
+
+`;if(d.nodeType!==1)return"";var S=d.tagName.toLowerCase();switch(S){case"h1":m||(x=r.subParser("makeMarkdown.header")(d,y,1)+`
+
+`);break;case"h2":m||(x=r.subParser("makeMarkdown.header")(d,y,2)+`
+
+`);break;case"h3":m||(x=r.subParser("makeMarkdown.header")(d,y,3)+`
+
+`);break;case"h4":m||(x=r.subParser("makeMarkdown.header")(d,y,4)+`
+
+`);break;case"h5":m||(x=r.subParser("makeMarkdown.header")(d,y,5)+`
+
+`);break;case"h6":m||(x=r.subParser("makeMarkdown.header")(d,y,6)+`
+
+`);break;case"p":m||(x=r.subParser("makeMarkdown.paragraph")(d,y)+`
+
+`);break;case"blockquote":m||(x=r.subParser("makeMarkdown.blockquote")(d,y)+`
+
+`);break;case"hr":m||(x=r.subParser("makeMarkdown.hr")(d,y)+`
+
+`);break;case"ol":m||(x=r.subParser("makeMarkdown.list")(d,y,"ol")+`
+
+`);break;case"ul":m||(x=r.subParser("makeMarkdown.list")(d,y,"ul")+`
+
+`);break;case"precode":m||(x=r.subParser("makeMarkdown.codeBlock")(d,y)+`
+
+`);break;case"pre":m||(x=r.subParser("makeMarkdown.pre")(d,y)+`
+
+`);break;case"table":m||(x=r.subParser("makeMarkdown.table")(d,y)+`
+
+`);break;case"code":x=r.subParser("makeMarkdown.codeSpan")(d,y);break;case"em":case"i":x=r.subParser("makeMarkdown.emphasis")(d,y);break;case"strong":case"b":x=r.subParser("makeMarkdown.strong")(d,y);break;case"del":x=r.subParser("makeMarkdown.strikethrough")(d,y);break;case"a":x=r.subParser("makeMarkdown.links")(d,y);break;case"img":x=r.subParser("makeMarkdown.image")(d,y);break;default:x=d.outerHTML+`
+
+`}return x}),r.subParser("makeMarkdown.paragraph",function(d,y){var m="";if(d.hasChildNodes())for(var x=d.childNodes,S=x.length,_=0;_"+y.preList[m]+""}),r.subParser("makeMarkdown.strikethrough",function(d,y){var m="";if(d.hasChildNodes()){m+="~~";for(var x=d.childNodes,S=x.length,_=0;_tr>th"),_=d.querySelectorAll("tbody>tr"),C,E;for(C=0;CL&&(L=H)}for(C=0;C/g,"\\$1>"),y=y.replace(/^#/gm,"\\#"),y=y.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),y=y.replace(/^( {0,3}\d+)\./gm,"$1\\."),y=y.replace(/^( {0,3})([+-])/gm,"$1\\$2"),y=y.replace(/]([\s]*)\(/g,"\\]$1\\("),y=y.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),y});var A=this;e.exports?e.exports=r:A.showdown=r}).call(qm)})(ky);var oR=ky.exports;se([]);const n6={name:"Tooltip",components:{Popover:K3},props:{hoverDelay:{default:.5},placement:{default:"top"},text:{type:String,default:null}}},r6={key:0,class:"rounded bg-gray-900 px-2 py-1 text-xs text-white shadow-xl"},i6={class:"py-px"};function o6(e,t,n,r,i,o){const s=_n("Popover");return ue(),An(s,{trigger:"hover",hoverDelay:n.hoverDelay,placement:n.placement},{target:ln(()=>[St(e.$slots,"default")]),body:ln(()=>[St(e.$slots,"body",{},()=>[n.text?(ue(),ve("div",r6,[ie("div",i6,on(n.text),1)])):kt("",!0)])]),_:3},8,["hoverDelay","placement"])}var sR=Ie(n6,[["render",o6]]);let s6=document.querySelector('link[rel="icon"]');s6.href;function Sy(e){let t=Object.assign({},e);if(!t.url)throw new Error("[request] options.url is required");t.transformRequest&&(t=t.transformRequest(e)),t.responseType||(t.responseType="json"),t.method||(t.method="GET");let n=t.url,r;if(t.params)if(t.method==="GET"){let i=new URLSearchParams;for(let o in t.params)i.append(o,t.params[o]);n=t.url+"?"+i.toString()}else r=JSON.stringify(t.params);return fetch(n,{method:t.method||"GET",headers:t.headers,body:r}).then(i=>{if(t.transformResponse)return t.transformResponse(i,t);if(i.status>=200&&i.status<300)return t.responseType==="json"?i.json():i;{let o=new Error(i.statusText);throw o.response=i,o}})}function vf(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function a6(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=vf(n);return(i,o)=>r.then(s=>o(s.transaction(t,i).objectStore(t)))}let bf;function Cy(){return bf||(bf=a6("keyval-store","keyval")),bf}function l6(e,t=Cy()){return t("readonly",n=>vf(n.get(e)))}function c6(e,t,n=Cy()){return n("readwrite",r=>(r.put(t,e),vf(r.transaction)))}function wf(e,t){return typeof indexedDB=="undefined"?Promise.resolve(null):e?c6(e,JSON.stringify(t)):Promise.resolve()}function xf(e){return typeof indexedDB=="undefined"?Promise.resolve(null):l6(e).then(t=>t&&JSON.parse(t))}let _y={};function aR(e,t){_y[e]=t}function u6(e){return _y[e]||null}let Bl={};function kn(e,t){let n=null;if(e.cache){n=So(e.cache);let f=Bl[n];if(f)return f.auto&&f.reload(),f}typeof e=="string"&&(e={url:e,auto:!0});let r=e.debounce?Xm(o,e.debounce):o,i=sn({method:e.method,url:e.url,data:e.initialData||null,previousData:null,loading:!1,fetched:!1,error:null,promise:null,auto:e.auto,params:null,fetch:r,reload:r,submit:r,reset:a,update:s,setData:c});function o(p){return Ir(this,arguments,function*(f,h={}){let g=e.resourceFetcher||u6("resourceFetcher")||Sy;f instanceof Event&&(f=null),f=f||i.params,e.makeParams&&(f=e.makeParams.call(t,f)),i.params=f,i.previousData=i.data?JSON.parse(JSON.stringify(i.data)):null,i.loading=!0,i.error=null,e.onFetch&&e.onFetch.call(t,i.params);let v=[e.beforeSubmit,h.beforeSubmit];for(let d of v)d&&d.call(t,i.params);let b=h.validate||e.validate,w=[e.onError,h.onError],k=[e.onSuccess,h.onSuccess],A=[e.onData,h.onData];if(b){let d;try{if(d=yield b.call(t,i.params),d&&typeof d=="string")throw new Error(d)}catch(y){l(y,w);return}}try{i.promise=g(Me(J({},e),{params:f||e.params}));let d=yield i.promise;wf(n,d),i.data=u(d),i.fetched=!0;for(let y of k)y&&y.call(t,d);for(let y of A)y&&y.call(t,d)}catch(d){l(d,w)}return i.loading=!1,i.data})}function s({method:f,url:h,params:p,auto:g}){f&&f!==e.method&&(i.method=f),h&&h!==e.url&&(i.url=h),p&&p!==e.params&&(i.params=p),g!==void 0&&g!==i.auto&&(i.auto=g)}function a(){i.data=e.initialData||null,i.previousData=null,i.loading=!1,i.fetched=!1,i.error=null,i.params=null,i.auto=e.auto}function l(f,h){i.loading=!1,i.previousData&&(i.data=i.previousData),i.error=f;for(let p of h)p&&p.call(t,f);throw f}function c(f){typeof f=="function"&&(f=f.call(t,i.data)),i.data=u(f)}function u(f){if(e.transform){let h=e.transform.call(t,f);if(h!=null)return h}return f}return n&&!Bl[n]&&(Bl[n]=i,xf(n).then(f=>{var h;(i.loading||!i.fetched)&&f&&(c(f),(h=e.onData)==null||h.call(t,f))})),e.auto&&i.fetch(),i}function So(e){return e?(typeof e=="string"&&(e=[e]),JSON.stringify(e)):null}function d6(e){return e=So(e),Bl[e]||null}function My(e,t,n){f6(e,t),e.on("list_update",r=>{r.doctype==t&&n(r.name)})}let Ay={};function f6(e,t){Ay[t]||(e.emit("doctype_subscribe",t),Ay[t]=!0)}let kf=sn({}),Co={};function h6(e,t){var h,p,g,v,b;if(!e.doctype)throw new Error("List resource requires doctype");let n=So(e.cache);if(n){let w=kf[n];if(w)return w.auto&&w.reload(),w}let r=sn({doctype:e.doctype,fields:e.fields,filters:e.filters,orderBy:e.orderBy,start:e.start||0,pageLength:e.pageLength||20,groupBy:e.groupBy,parent:e.parent,debug:e.debug||0,originalData:null,dataMap:{},data:null,previous:c,hasPreviousPage:!1,next:u,hasNextPage:!0,auto:e.auto,list:kn({url:e.url||"frappe.client.get_list",makeParams(){return{doctype:r.doctype,fields:r.fields,filters:r.filters,order_by:r.orderBy,start:r.start,limit:r.pageLength,limit_start:r.start,limit_page_length:r.pageLength,group_by:r.groupBy,parent:r.parent,debug:r.debug}},onSuccess(w){var A;r.hasPreviousPage=!!r.start,w.length0&&(k=r.originalData.concat(w)),wf(n,k),l(k),(A=e.onSuccess)==null||A.call(t,r.data)},onError:e.onError},t),fetchOne:kn({url:"frappe.client.get_list",makeParams(w){return{doctype:r.doctype,fields:r.fields||"*",filters:{name:w}}},onSuccess(w){var k,A;if(w.length>0&&r.originalData){let d=w[0];Bs(r.doctype,d)}(A=(k=e.fetchOne)==null?void 0:k.onSuccess)==null||A.call(t,r.data)},onError:(h=e.fetchOne)==null?void 0:h.onError},t),insert:kn({url:"frappe.client.insert",makeParams(w){return{doc:J({doctype:r.doctype},w)}},onSuccess(w){var k,A;r.list.fetch(),(A=(k=e.insert)==null?void 0:k.onSuccess)==null||A.call(t,w)},onError:(p=e.insert)==null?void 0:p.onError},t),setValue:kn({url:"frappe.client.set_value",makeParams(w){let d=w,{name:k}=d,A=Ve(d,["name"]);return{doctype:r.doctype,name:k,fieldname:A}},onSuccess(w){var k,A;Bs(r.doctype,w),(A=(k=e.setValue)==null?void 0:k.onSuccess)==null||A.call(t,w)},onError:(g=e.setValue)==null?void 0:g.onError},t),delete:kn({url:"frappe.client.delete",makeParams(w){return{doctype:r.doctype,name:w}},onSuccess(w){var k,A;r.list.fetch(),(A=(k=e.delete)==null?void 0:k.onSuccess)==null||A.call(t,w)},onError:(v=e.delete)==null?void 0:v.onError},t),runDocMethod:kn({url:"run_doc_method",makeParams(d){var y=d,{method:w,name:k}=y,A=Ve(y,["method","name"]);return{dt:r.doctype,dn:k,method:w,args:JSON.stringify(A)}},onSuccess(w){var k,A;if(w.docs)for(let d of w.docs)Bs(d.doctype,d);(A=(k=e.runDocMethod)==null?void 0:k.onSuccess)==null||A.call(t,w)},onError:(b=e.runDocMethod)==null?void 0:b.onError},t),update:i,fetch:a,reload:s,setData:l,transform:o,getRow:f});function i(w){Object.assign(r,w)}function o(w){if(e.transform){let k=e.transform.call(t,w);if(k!=null)return k}return w}function s(){let w=r.start,k=r.pageLength;return r.start>0&&(r.start=0,r.pageLength=r.originalData.length),r.list.fetch().finally(()=>{r.start=w,r.pageLength=k})}function a(){s()}function l(w){if(r.originalData=w,typeof w=="function"&&(w=w.call(t,r.data)),r.data=o(w),Array.isArray(r.data)){r.dataMap={};for(let k of r.data){if(!k.name)continue;let A=k.name.toString();r.dataMap[A]=k}}}function c(){r.start=r.start-r.pageLength,r.list.fetch()}function u(){r.start=r.start+r.pageLength,r.list.fetch()}function f(w){let k=w.toString();return r.dataMap[k]}return e.realtime&&(t==null?void 0:t.$socket)&&My(t.$socket,r.doctype,w=>{var k;((k=r.originalData)==null?void 0:k.find(A=>A.name===w))&&r.fetchOne.submit(w)}),n&&(kf[n]=r,xf(n).then(w=>{(r.list.loading||!r.list.fetched)&&w&&l(w)})),e.auto&&r.list.fetch(),Co[r.doctype]=Co[r.doctype]||[],Co[r.doctype].push(r),r}function p6(e){return e=So(e),kf[e]||null}function Bs(e,t){if(!t.name)return;let n=Co[e]||[];for(let r of n)if(r.originalData){for(let i of r.originalData)if(i.name&&i.name==t.name){delete i._previousData;let o=JSON.stringify(i);for(let s in i)s in t&&(i[s]=t[s]);i._previousData=o}r.data=r.transform(r.originalData)}}function m6(e,t){let n=Co[e]||[];for(let r of n)r.originalData&&(r.originalData=r.originalData.filter(i=>i.name.toString()!==t.toString()),r.data=r.transform(r.originalData))}function g6(e,t){let n=Co[e]||[];for(let r of n)if(r.originalData){for(let i of r.originalData)if(i.name&&i.name==t.name){let o=JSON.parse(i._previousData);for(let s in i)i[s]=o[s];delete i._previousData}r.data=r.transform(r.originalData)}}let Sf=sn({});function y6(e,t){var u;if(!(e.doctype&&e.name))return;let n=So([e.doctype,e.name]),r=Sf[n];if(r)return r.auto&&r.reload(),r;let i={url:"frappe.client.set_value",makeParams(h){return{doctype:s.doctype,name:s.name,fieldname:h}},beforeSubmit(h){s.previousDoc=JSON.stringify(s.doc),Object.assign(s.doc,h.fieldname||{}),Bs(s.doctype,s.doc)},onSuccess(h){var p,g;s.doc=c(h),(g=(p=e.setValue)==null?void 0:p.onSuccess)==null||g.call(t,h)},onError(h){var p,g;s.doc=JSON.parse(s.previousDoc),(g=(p=e.setValue)==null?void 0:p.onError)==null||g.call(t,h),g6(s.doctype,s.doc)}};const o=e.auto!==void 0;let s=sn({doctype:e.doctype,name:e.name,doc:null,auto:o?e.auto:!0,get:kn({url:"frappe.client.get",makeParams(){return{doctype:s.doctype,name:s.name}},onSuccess(h){var p;wf(n,h),s.doc=c(h),(p=e.onSuccess)==null||p.call(t,s.doc)},onError:e.onError},t),setValue:kn(i,t),setValueDebounced:kn(Me(J({},i),{debounce:e.debounce||500}),t),delete:kn({url:"frappe.client.delete",makeParams(){return{doctype:s.doctype,name:s.name}},onSuccess(){var h,p;s.doc=null,(p=(h=e.delete)==null?void 0:h.onSuccess)==null||p.call(t),m6(s.doctype,s.name)},onError:(u=e.delete)==null?void 0:u.onError},t),reload:a,setDoc:l});for(let h in e.whitelistedMethods){let p=e.whitelistedMethods[h];typeof p=="string"&&(p={method:p});let f=p,{method:g,onSuccess:v}=f,b=Ve(f,["method","onSuccess"]);s[h]=kn(J({url:"run_doc_method",makeParams(w){return{dt:s.doctype,dn:s.name,method:g,args:w}},onSuccess(w){if(w.docs){for(let k of w.docs)if(k.doctype===s.doctype&&k.name.toString()===s.name.toString()){s.doc=c(k),Bs(s.doctype,s.doc);break}}v==null||v.call(t,w.message)}},b),t)}function a(){return s.get.fetch()}function l(h){typeof h=="function"&&(h=h.call(t,s.doc)),s.doc=c(h)}function c(h){if(e.transform){let p=e.transform.call(t,h);if(typeof p=="object")return p}return h}return e.realtime&&t.$socket&&My(t.$socket,s.doctype,h=>{h==s.name&&s.get.fetch()}),Sf[n]=s,xf(n).then(h=>{(s.get.loading||!s.get.fetched)&&h&&(s.doc=c(h))}),s.auto&&s.get.fetch(),s}function v6(e,t){let n=So([e,t]);return Sf[n]||null}let b6=e=>({created(){if(this.$options.resources){this._resources=sn({});for(let t in this.$options.resources){let n=this.$options.resources[t];if(typeof n=="function")Ht(()=>{try{return n.call(this)}catch(r){return console.warn(`Failed to get resource options
+
+`,r),null}},(r,i)=>{!r||!(!i||JSON.stringify(r)!==JSON.stringify(i))||(this._resources[t]=Ey(r,this))},{immediate:!0});else{let r=Ey(n,this);this._resources[t]=r}}}},methods:{$getResource(t){return d6(t)},$getDocumentResource(t,n){return v6(t,n)},$getDoc(t,n){let r=this.$getDocumentResource(t,n);return r?r.doc:null},$getListResource(t){return p6(t)},$refetchResource(t){let n=this.$getResource(t);n&&n.fetch()}},computed:{$resources(){return this._resources}}});function Ey(e,t){return e.type==="document"?y6(e,t):e.type==="list"?h6(e,t):kn(e,t)}var lR={install(e,t){let n=b6();e.mixin(n)}};function cR(e){return Sy(Me(J({},e),{transformRequest:(t={})=>{if(!t.url)throw new Error("[frappeRequest] options.url is required");let n=Object.assign({Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-Frappe-Site-Name":window.location.hostname},t.headers||{});return window.csrf_token&&window.csrf_token!=="{{ csrf_token }}"&&(n["X-Frappe-CSRF-Token"]=window.csrf_token),!t.url.startsWith("/")&&!t.url.startsWith("http")&&(t.url="/api/method/"+t.url),Me(J({},t),{method:t.method||"POST",headers:n})},transformResponse:(t,n)=>Ir(this,null,function*(){let r=n.url;if(t.ok){const i=yield t.json();if(i.docs||r==="login")return i;if(i.exc)try{console.groupCollapsed(r),console.log(n);let o=JSON.parse(i.exc);for(let s of o)console.log(s);console.groupEnd()}catch(o){console.warn("Error printing debug messages",o)}return i.message}else{let i=yield t.text(),o,s;try{o=JSON.parse(i)}catch(c){}let a=[[n.url,o.exc_type,o._error_message].filter(Boolean).join(" ")];if(o.exc){s=o.exc;try{s=JSON.parse(s)[0],console.log(s)}catch(c){}}let l=new Error(a.join(`
+`));throw l.exc_type=o.exc_type,l.exc=s,l.response=t,l.status=i.status,l.messages=o._server_messages?JSON.parse(o._server_messages):[],l.messages=l.messages.concat(o.message),l.messages=l.messages.map(c=>{try{return JSON.parse(c).message}catch(u){return c}}),l.messages=l.messages.filter(Boolean),l.messages.length||(l.messages=o._error_message?[o._error_message]:["Internal Server Error"]),n.onError&&n.onError(l),l}})}))}const Gn=Object.create(null);Gn.open="0";Gn.close="1";Gn.ping="2";Gn.pong="3";Gn.message="4";Gn.upgrade="5";Gn.noop="6";const Hl=Object.create(null);Object.keys(Gn).forEach(e=>{Hl[Gn[e]]=e});const w6={type:"error",data:"parser error"},x6=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",k6=typeof ArrayBuffer=="function",S6=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Oy=({type:e,data:t},n,r)=>x6&&t instanceof Blob?n?r(t):Ty(t,r):k6&&(t instanceof ArrayBuffer||S6(t))?n?r(t):Ty(new Blob([t]),r):r(Gn[e]+(t||"")),Ty=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)},Py="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Hs=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),u=new Uint8Array(c);for(r=0;r>4,u[i++]=(s&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},_6=typeof ArrayBuffer=="function",Ry=(e,t)=>{if(typeof e!="string")return{type:"message",data:jy(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:M6(e.substring(1),t)}:Hl[n]?e.length>1?{type:Hl[n],data:e.substring(1)}:{type:Hl[n]}:w6},M6=(e,t)=>{if(_6){const n=C6(e);return jy(n,t)}else return{base64:!0,data:e}},jy=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},Ny=String.fromCharCode(30),A6=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Oy(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Ny))})})},E6=(e,t)=>{const n=e.split(Ny),r=[];for(let i=0;itypeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function Dy(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const T6=Sn.setTimeout,P6=Sn.clearTimeout;function zl(e,t){t.useNativeTimers?(e.setTimeoutFn=T6.bind(Sn),e.clearTimeoutFn=P6.bind(Sn)):(e.setTimeoutFn=Sn.setTimeout.bind(Sn),e.clearTimeoutFn=Sn.clearTimeout.bind(Sn))}const R6=1.33;function j6(e){return typeof e=="string"?N6(e):Math.ceil((e.byteLength||e.size)*R6)}function N6(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class L6 extends Error{constructor(t,n,r){super(t);this.description=n,this.context=r,this.type="TransportError"}}class Iy extends dt{constructor(t){super();this.writable=!1,zl(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new L6(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Ry(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}}const $y="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Cf=64,D6={};let By=0,Fl=0,Hy;function zy(e){let t="";do t=$y[e%Cf]+t,e=Math.floor(e/Cf);while(e>0);return t}function Fy(){const e=zy(+new Date);return e!==Hy?(By=0,Hy=e):e+"."+zy(By++)}for(;Fl{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};E6(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,A6(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Fy()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=Vy(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Yn(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Yn extends dt{constructor(t,n){super();zl(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=Dy(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new Uy(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch(r){}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{n.setRequestHeader("Accept","*/*")}catch(r){}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document!="undefined"&&(this.index=Yn.requestsCount++,Yn.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.xhr.onreadystatechange=B6,t)try{this.xhr.abort()}catch(n){}typeof document!="undefined"&&delete Yn.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Yn.requestsCount=0;Yn.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Ky);else if(typeof addEventListener=="function"){const e="onpagehide"in Sn?"pagehide":"unload";addEventListener(e,Ky,!1)}}function Ky(){for(let e in Yn.requests)Yn.requests.hasOwnProperty(e)&&Yn.requests[e].abort()}const qy=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Vl=Sn.WebSocket||Sn.MozWebSocket,Jy=!0,F6="arraybuffer",Gy=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class V6 extends Iy{constructor(t){super(t);this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=Gy?{}:Dy(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Jy&&!Gy?n?new Vl(t,n):new Vl(t):new Vl(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||F6,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const s={};try{Jy&&this.ws.send(o)}catch(a){}i&&qy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=Fy()),this.supportsBinary||(t.b64=1);const i=Vy(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Vl}}const W6={websocket:V6,polling:z6},U6=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,K6=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function _f(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=U6.exec(e||""),o={},s=14;for(;s--;)o[K6[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=q6(o,o.path),o.queryKey=J6(o,o.query),o}function q6(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function J6(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Lr extends dt{constructor(t,n={}){super();this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=_f(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=_f(n.host).host),zl(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=I6(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Ly,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new W6[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Lr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function o(){r||(r=!0,u(),n.close(),n=null)}const s=f=>{const h=new Error("probe error: "+f);h.transport=n.name,o(),this.emitReserved("upgradeError",h)};function a(){s("transport closed")}function l(){s("socket closed")}function c(f){n&&f.name!==n.name&&o()}const u=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",Lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Lr.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Yy=Object.prototype.toString,Q6=typeof Blob=="function"||typeof Blob!="undefined"&&Yy.call(Blob)==="[object BlobConstructor]",Z6=typeof File=="function"||typeof File!="undefined"&&Yy.call(File)==="[object FileConstructor]";function Mf(e){return Y6&&(e instanceof ArrayBuffer||X6(e))||Q6&&e instanceof Blob||Z6&&e instanceof File}function Wl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case Le.ACK:case Le.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class iP{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=tP(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var oP=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",protocol:nP,get PacketType(){return Le},Encoder:rP,Decoder:Of});function jn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const sP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Xy extends dt{constructor(t,n,r){super();this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[jn(t,"open",this.onopen.bind(this)),jn(t,"packet",this.onpacket.bind(this)),jn(t,"error",this.onerror.bind(this)),jn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(sP.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Le.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,a)=>r?s?o(s):i(a):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Le.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Le.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Le.EVENT:case Le.BINARY_EVENT:this.onevent(t);break;case Le.ACK:case Le.BINARY_ACK:this.onack(t);break;case Le.DISCONNECT:this.ondisconnect();break;case Le.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Le.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Le.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}_o.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};_o.prototype.reset=function(){this.attempts=0};_o.prototype.setMin=function(e){this.ms=e};_o.prototype.setMax=function(e){this.max=e};_o.prototype.setJitter=function(e){this.jitter=e};class Tf extends dt{constructor(t,n){var r;super();this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,zl(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new _o({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||oP;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Lr(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=jn(n,"open",function(){r.onopen(),t&&t()}),o=jn(n,"error",s=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",s),t?t(s):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const s=this._timeout;s===0&&i();const a=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},s);this.opts.autoUnref&&a.unref(),this.subs.push(function(){clearTimeout(a)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(jn(t,"ping",this.onping.bind(this)),jn(t,"data",this.ondata.bind(this)),jn(t,"error",this.onerror.bind(this)),jn(t,"close",this.onclose.bind(this)),jn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){qy(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Xy(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const zs={};function Pf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=G6(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=zs[i]&&o in zs[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Tf(r,t):(zs[i]||(zs[i]=new Tf(r,t)),l=zs[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Pf,{Manager:Tf,Socket:Xy,io:Pf,connect:Pf});export{Mo as A,ft as B,MP as C,EP as D,cP as E,lt as F,ay as G,on as H,AP as I,kt as J,OP as K,K3 as P,sR as T,Ie as _,X as a,fP as b,kn as c,dP as d,ve as e,We as f,_n as g,uP as h,lR as i,tk as j,cR as k,se as l,ie as m,je as n,ue as o,lP as p,Ho as q,sn as r,aR as s,An as t,Rt as u,St as v,ln as w,Ai as x,Gr as y,Yh as z};
diff --git a/playbook/public/frontend/favicon.png b/playbook/public/frontend/favicon.png
new file mode 100644
index 0000000..b51db82
Binary files /dev/null and b/playbook/public/frontend/favicon.png differ
diff --git a/playbook/public/frontend/index.html b/playbook/public/frontend/index.html
new file mode 100644
index 0000000..39990e3
--- /dev/null
+++ b/playbook/public/frontend/index.html
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ Frappe UI App
+
+
+
+
+
+
+
+
+
+
+
+
+
+