1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="520fad17-a97d-b4da-59ac-b8d6560652a2")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,361183,270225,755453,952660,401191,411036,e=>{"use strict";for(var t,n,r,i,o,s,l,a,c,h,u,d,p,f=e.i(191788),m=e.i(730943),g=e.i(872196),k=e.i(391398),y=e.i(524617),b=e.i(150215),v=e.i(175863),x=e.i(308822),w=e.i(932118),C=e.i(615505),S={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:"'"},A={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},M="u">typeof navigator&&/Mac/.test(navigator.platform),E="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),_=0;_<10;_++)S[48+_]=S[96+_]=String(_);for(var _=1;_<=24;_++)S[_+111]="F"+_;for(var _=65;_<=90;_++)S[_]=String.fromCharCode(_+32),A[_]=String.fromCharCode(_);for(var T in S)A.hasOwnProperty(T)||(A[T]=S[T]);let D="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),O="u">typeof navigator&&/Win/.test(navigator.platform);function N(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function I(e){return new v.Plugin({props:{handleKeyDown:L(e)}})}function L(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let e=0;e<o.length-1;e++){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))D?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+s)}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}(n)]=e[n];return t}(e);return function(e,n){var r;let i=("Esc"==(r=!(M&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||E&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?A:S)[n.keyCode]||n.key||"Unidentified")&&(r="Escape"),"Del"==r&&(r="Delete"),"Left"==r&&(r="ArrowLeft"),"Up"==r&&(r="ArrowUp"),"Right"==r&&(r="ArrowRight"),"Down"==r&&(r="ArrowDown"),r),o,s=t[N(i,n)];if(s&&s(e.state,e.dispatch,e))return!0;if(1==i.length&&" "!=i){if(n.shiftKey){let r=t[N(i,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(O&&n.ctrlKey&&n.altKey)&&(o=S[n.keyCode])&&o!=i){let r=t[N(o,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}e.s(["keydownHandler",0,L,"keymap",0,I],270225);var F=Object.defineProperty,R=(e,t)=>{for(var n in t)F(e,n,{get:t[n],enumerable:!0})};function z(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),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}}}var P=class{get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(e=>{let[t,n]=e;var s=this;return[t,function(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];let a=n(...t)(o);return i.getMeta("preventDispatch")||s.hasCustomState||r.dispatch(i),a}]}))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s=[],l=!!e,a=e||i.tr,c=()=>(l||!t||a.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(a),s.every(e=>!0===e)),h={...Object.fromEntries(Object.entries(n).map(e=>{let[n,r]=e;var i=this;return[n,function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];let l=i.buildProps(a,t),c=r(...n)(l);return s.push(c),h}]})),run:c};return h}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(e=>{let[t,n]=e;return[t,function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n(...t)({...i,dispatch:void 0})}]})),chain:()=>this.createChain(r,!1)}}buildProps(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s={tr:e,editor:r,view:o,state:z({state:i,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(e=>{let[t,n]=e;return[t,function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n(...t)(s)}]}))}};return s}constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}},B={};R(B,{blur:()=>$,clearContent:()=>j,clearNodes:()=>q,command:()=>V,createParagraphNear:()=>H,cut:()=>W,deleteCurrentNode:()=>U,deleteNode:()=>J,deleteRange:()=>Z,deleteSelection:()=>G,enter:()=>Q,exitCode:()=>X,extendMarkRange:()=>eo,first:()=>es,focus:()=>ed,forEach:()=>ep,insertContent:()=>ef,insertContentAt:()=>ey,joinBackward:()=>ex,joinDown:()=>ev,joinForward:()=>ew,joinItemBackward:()=>eC,joinItemForward:()=>eS,joinTextblockBackward:()=>eA,joinTextblockForward:()=>eM,joinUp:()=>eb,keyboardShortcut:()=>e_,lift:()=>eD,liftEmptyBlock:()=>eO,liftListItem:()=>eN,newlineInCode:()=>eI,resetAttributes:()=>eR,scrollIntoView:()=>ez,selectAll:()=>eP,selectNodeBackward:()=>eB,selectNodeForward:()=>e$,selectParentNode:()=>ej,selectTextblockEnd:()=>eq,selectTextblockStart:()=>eV,setContent:()=>eW,setMark:()=>tx,setMeta:()=>tw,setNode:()=>tC,setNodeSelection:()=>tS,setTextDirection:()=>tA,setTextSelection:()=>tM,sinkListItem:()=>tE,splitBlock:()=>tT,splitListItem:()=>tD,toggleList:()=>tI,toggleMark:()=>tL,toggleNode:()=>tF,toggleWrap:()=>tR,undoInputRule:()=>tz,unsetAllMarks:()=>tP,unsetMark:()=>tB,unsetTextDirection:()=>t$,updateAttributes:()=>tj,wrapIn:()=>tq,wrapInList:()=>tV});var $=()=>e=>{let{editor:t,view:n}=e;return requestAnimationFrame(()=>{var e;t.isDestroyed||(n.dom.blur(),null==(e=null==window?void 0:window.getSelection())||e.removeAllRanges())}),!0},j=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return t=>{let{commands:n}=t;return n.setContent("",{emitUpdate:e})}},q=()=>e=>{let{state:t,tr:n,dispatch:r}=e,{selection:i}=n,{ranges:o}=i;
2return!r||(o.forEach(e=>{let{$from:r,$to:i}=e;t.doc.nodesBetween(r.pos,i.pos,(e,t)=>{if(e.type.isText)return;let{doc:r,mapping:i}=n,o=r.resolve(i.map(t)),s=r.resolve(i.map(t+e.nodeSize)),l=o.blockRange(s);if(!l)return;let a=(0,y.liftTarget)(l);if(e.type.isTextblock){let{defaultType:e}=o.parent.contentMatchAt(o.index());n.setNodeMarkup(l.start,e)}(a||0===a)&&n.lift(l,a)})}),!0)},V=e=>t=>e(t),H=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.createParagraphNear)(t,n)},W=(e,t)=>n=>{let{editor:r,tr:i}=n,{state:o}=r,s=o.doc.slice(e.from,e.to);i.deleteRange(e.from,e.to);let l=i.mapping.map(t);return i.insert(l,s.content),i.setSelection(new v.TextSelection(i.doc.resolve(Math.max(l-1,0)))),!0},U=()=>e=>{let{tr:t,dispatch:n}=e,{selection:r}=t,i=r.$anchor.node();if(i.content.size>0)return!1;let o=t.selection.$anchor;for(let e=o.depth;e>0;e-=1)if(o.node(e).type===i.type){if(n){let n=o.before(e),r=o.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1};function K(e,t){if("string"==typeof e){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}var J=e=>t=>{let{tr:n,state:r,dispatch:i}=t,o=K(e,r.schema),s=n.selection.$anchor;for(let e=s.depth;e>0;e-=1)if(s.node(e).type===o){if(i){let t=s.before(e),r=s.after(e);n.delete(t,r).scrollIntoView()}return!0}return!1},Z=e=>t=>{let{tr:n,dispatch:r}=t,{from:i,to:o}=e;return r&&n.delete(i,o),!0},G=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.deleteSelection)(t,n)},Q=()=>e=>{let{commands:t}=e;return t.keyboardShortcut("Enter")},X=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.exitCode)(t,n)};function Y(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function ee(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{strict:!0},r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:Y(t[r])?t[r].test(e[r]):t[r]===e[r])}function et(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.find(e=>e.type===t&&ee(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function en(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return!!et(e,t,n)}function er(e,t,n){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(r.node&&r.node.marks.some(e=>e.type===t)||(r=e.parent.childBefore(e.parentOffset)),!r.node||!r.node.marks.some(e=>e.type===t))return;if(!n){let e=r.node.marks.find(e=>e.type===t);e&&(n=e.attrs)}if(!et([...r.node.marks],t,n))return;let i=r.index,o=e.start()+r.offset,s=i+1,l=o+r.node.nodeSize;for(;i>0&&en([...e.parent.child(i-1).marks],t,n);)i-=1,o-=e.parent.child(i).nodeSize;for(;s<e.parent.childCount&&en([...e.parent.child(s).marks],t,n);)l+=e.parent.child(s).nodeSize,s+=1;return{from:o,to:l}}function ei(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var eo=(e,t)=>n=>{let{tr:r,state:i,dispatch:o}=n,s=ei(e,i.schema),{doc:l,selection:a}=r,{$from:c,from:h,to:u}=a;if(o){let e=er(c,s,t);if(e&&e.from<=h&&e.to>=u){let t=v.TextSelection.create(l,e.from,e.to);r.setSelection(t)}}return!0},es=e=>t=>{let n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1};function el(e){return e instanceof v.TextSelection}function ea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(e,t),n)}function ec(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;let n=v.Selection.atStart(e),r=v.Selection.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;let i=n.from,o=r.to;return"all"===t?v.TextSelection.create(e,ea(0,i,o),ea(e.content.size,i,o)):v.TextSelection.create(e,ea(t,i,o),ea(t,i,o))}function eh(){return"Android"===navigator.platform||/android/i.test(navigator.userAgent)}function eu(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}var ed=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{editor:r,view:i,tr:o,dispatch:s}=n;t={scrollIntoView:!0,...t};let l=()=>{(eu()||eh())&&i.dom.focus(),"u">typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!eu()&&!eh()&&i.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{!r.isDestroyed&&(i.focus(),(null==t?void 0:t.scrollIntoView)&&r.commands.scrollIntoView())})};try{if(i.hasFocus()&&null===e||!1===e)return!0}catch{return!1}if(s&&null===e&&!el(r.state.selection))return l(),!0;let a=ec(o.doc,e)||r.state.selection,c=r.state.selection.eq(a);return s&&(c||o.setSelection(a),c&&o.storedMarks&&o.setStoredMarks(o.storedMarks),l()),!0}},ep=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),ef=(e,t)=>n=>{let{tr:r,commands:i}=n;return i.insertContentAt({from:r.selection.from,to:r.selection.to},e,t)},em=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):1===r.nodeType&&em(r)}return e};function eg(e){if("u"<typeof window)throw Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`<body>${e}</body>`;return em(new window.DOMParser().parseFromString(t,"text/html").body)}function ek(e,t,n){if(e instanceof x.Node||e instanceof x.Fragment)return e;n={slice:!0,parseOptions:{},...n};let r="object"==typeof e&&null!==e,i="string"==typeof e;if(r)try{if(Array.isArray(e)&&e.length>0)return x.Fragment.fromArray(e.map(e=>t.nodeFromJSON(e)));let r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw Error("[tiptap error]: Invalid JSON content",{cause:r});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),ek("",t,n)}if(i){if(n.errorOnInvalidContent){let r=!1,i="",o=new x.Schema({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:e=>(r=!0,i="string"==typeof e?e:e.outerHTML,null)}]}})});if(n.slice?x.DOMParser.fromSchema(o).parseSlice(eg(e),n.parseOptions):x.DOMParser.fromSchema(o).parse(eg(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error("[tiptap error]: Invalid HTML content",{cause:Error(`Invalid element found: ${i}`)})}let r=x.DOMParser.fromSchema(t);return n.slice?r.parseSlice(eg(e),n.parseOptions).content:r.parse(eg(e),n.parseOptions)}return ek("",t,n)}var ey=(e,t,n)=>r=>{var i;
2let{tr:o,dispatch:s,editor:l}=r;if(s){let r,s;n={parseOptions:l.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a=e=>{l.emit("contentError",{editor:l,error:e,disableCollaboration:()=>{"collaboration"in l.storage&&"object"==typeof l.storage.collaboration&&l.storage.collaboration&&(l.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!l.options.enableContentCheck&&l.options.emitContentError)try{ek(t,l.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(e){a(e)}try{r=ek(t,l.schema,{parseOptions:c,errorOnInvalidContent:null!=(i=n.errorOnInvalidContent)?i:l.options.enableContentCheck})}catch(e){return a(e),!1}let{from:h,to:u}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},d=!0,p=!0;if((!("type"in r)?r:[r]).forEach(e=>{e.check(),d=!!d&&e.isText&&0===e.marks.length,p=!!p&&e.isBlock}),h===u&&p){let{parent:e}=o.doc.resolve(h);!e.isTextblock||e.type.spec.code||e.childCount||(h-=1,u+=1)}if(d){if(Array.isArray(t))s=t.map(e=>e.text||"").join("");else if(t instanceof x.Fragment){let e="";t.forEach(t=>{t.text&&(e+=t.text)}),s=e}else s="object"==typeof t&&t&&t.text?t.text:t;o.insertText(s,h,u)}else{s=r;let e=o.doc.resolve(h),t=e.node(),n=0===e.parentOffset,i=t.isText||t.isTextblock,l=t.content.size>0;n&&i&&l&&(h=Math.max(0,h-1)),o.replaceWith(h,u,s)}n.updateSelection&&function(e,t){let n=e.steps.length-1;if(n<t)return;let r=e.steps[n];if(!(r instanceof y.ReplaceStep||r instanceof y.ReplaceAroundStep))return;let i=e.mapping.maps[n],o=0;i.forEach((e,t,n,r)=>{0===o&&(o=r)}),e.setSelection(v.Selection.near(e.doc.resolve(o),-1))}(o,o.steps.length-1),n.applyInputRules&&o.setMeta("applyInputRules",{from:h,text:s}),n.applyPasteRules&&o.setMeta("applyPasteRules",{from:h,text:s})}return!0},eb=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.joinUp)(t,n)},ev=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.joinDown)(t,n)},ex=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.joinBackward)(t,n)},ew=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.joinForward)(t,n)},eC=()=>e=>{let{state:t,dispatch:n,tr:r}=e;try{let e=(0,y.joinPoint)(t.doc,t.selection.$from.pos,-1);if(null==e)return!1;return r.join(e,2),n&&n(r),!0}catch{return!1}},eS=()=>e=>{let{state:t,dispatch:n,tr:r}=e;try{let e=(0,y.joinPoint)(t.doc,t.selection.$from.pos,1);if(null==e)return!1;return r.join(e,2),n&&n(r),!0}catch{return!1}},eA=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.joinTextblockBackward)(t,n)},eM=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.joinTextblockForward)(t,n)};function eE(){return"u">typeof navigator&&/Mac/.test(navigator.platform)}var e_=e=>t=>{let{editor:n,view:r,tr:i,dispatch:o}=t,s=(function(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"===s&&(s=" ");for(let e=0;e<o.length-1;e+=1){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))eu()||eE()?i=!0:n=!0;else throw Error(`Unrecognized modifier name: ${s}`)}return t&&(s=`Alt-${s}`),n&&(s=`Ctrl-${s}`),i&&(s=`Meta-${s}`),r&&(s=`Shift-${s}`),s})(e).split(/-(?!$)/),l=s.find(e=>!["Alt","Ctrl","Meta","Shift"].includes(e)),a=new KeyboardEvent("keydown",{key:"Space"===l?" ":l,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),c=n.captureTransaction(()=>{r.someProp("handleKeyDown",e=>e(r,a))});return null==c||c.steps.forEach(e=>{let t=e.map(i.mapping);t&&o&&i.maybeStep(t)}),!0};function eT(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{from:r,to:i,empty:o}=e.selection,s=t?K(t,e.schema):null,l=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),o=Math.min(i,t+e.nodeSize);l.push({node:e,from:n,to:o})});let a=i-r,c=l.filter(e=>!s||s.name===e.node.type.name).filter(e=>ee(e.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((e,t)=>e+t.to-t.from,0)>=a}var eD=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{state:r,dispatch:i}=n,o=K(e,r.schema);return!!eT(r,o,t)&&(0,b.lift)(r,i)}},eO=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.liftEmptyBlock)(t,n)},eN=e=>t=>{let{state:n,dispatch:r}=t,i=K(e,n.schema);return(0,w.liftListItem)(i)(n,r)},eI=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.newlineInCode)(t,n)};function eL(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function eF(e,t){let n="string"==typeof t?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}var eR=(e,t)=>n=>{let{tr:r,state:i,dispatch:o}=n,s=null,l=null,a=eL("string"==typeof e?e:e.name,i.schema);if(!a)return!1;"node"===a&&(s=K(e,i.schema)),"mark"===a&&(l=ei(e,i.schema));let c=!1;
2return r.selection.ranges.forEach(e=>{i.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,n)=>{s&&s===e.type&&(c=!0,o&&r.setNodeMarkup(n,void 0,eF(e.attrs,t))),l&&e.marks.length&&e.marks.forEach(i=>{l===i.type&&(c=!0,o&&r.addMark(n,n+e.nodeSize,l.create(eF(i.attrs,t))))})})}),c},ez=()=>e=>{let{tr:t,dispatch:n}=e;return n&&t.scrollIntoView(),!0},eP=()=>e=>{let{tr:t,dispatch:n}=e;if(n){let e=new v.AllSelection(t.doc);t.setSelection(e)}return!0},eB=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.selectNodeBackward)(t,n)},e$=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.selectNodeForward)(t,n)},ej=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.selectParentNode)(t,n)},eq=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.selectTextblockEnd)(t,n)},eV=()=>e=>{let{state:t,dispatch:n}=e;return(0,b.selectTextblockStart)(t,n)};function eH(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return ek(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var eW=function(e){let{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i=>{let{editor:o,tr:s,dispatch:l,commands:a}=i,{doc:c}=s;if("full"!==r.preserveWhitespace){let i=eH(e,o.schema,r,{errorOnInvalidContent:null!=t?t:o.options.enableContentCheck});return l&&s.replaceWith(0,c.content.size,i).setMeta("preventUpdate",!n),!0}return l&&s.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:null!=t?t:o.options.enableContentCheck})}};function eU(e,t){let n=ei(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,e=>{s.push(...e.marks)});let l=s.find(e=>e.type.name===n.name);return l?{...l.attrs}:{}}function eK(e,t){let n=new y.Transform(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function eJ(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(e,t)=>{n(e)&&r.push({node:e,pos:t})}),r}function eZ(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function eG(e){return t=>eZ(t.$from,e)}function eQ(e,t,n){return void 0===e.config[t]&&e.parent?eQ(e.parent,t,n):"function"==typeof e.config[t]?e.config[t].bind({...n,parent:e.parent?eQ(e.parent,t,n):null}):e.config[t]}function eX(e){return e.map(e=>{let t={name:e.name,options:e.options,storage:e.storage},n=eQ(e,"addExtensions",t);return n?[e,...eX(n())]:e}).flat(10)}function eY(e,t){let n=x.DOMSerializer.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function e0(e){return"function"==typeof e}function e1(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e0(e)?t?e.bind(t)(...r):e(...r):e}function e2(e){let t=e.filter(e=>"extension"===e.type);return{baseExtensions:t,nodeExtensions:e.filter(e=>"node"===e.type),markExtensions:e.filter(e=>"mark"===e.type)}}function e3(e){let t=[],{nodeExtensions:n,markExtensions:r}=e2(e),i=[...n,...r],o={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(e=>"text"!==e.name).map(e=>e.name),l=r.map(e=>e.name),a=[...s,...l];return e.forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage,extensions:i},r=eQ(e,"addGlobalAttributes",n);r&&r().forEach(e=>{(Array.isArray(e.types)?e.types:"*"===e.types?a:"nodes"===e.types?s:"marks"===e.types?l:[]).forEac
2h(n=>{Object.entries(e.attributes).forEach(e=>{let[r,i]=e;t.push({type:n,name:r,attribute:{...o,...i}})})})})}),i.forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage},r=eQ(e,"addAttributes",n);r&&Object.entries(r()).forEach(n=>{let[r,i]=n,s={...o,...i};"function"==typeof(null==s?void 0:s.default)&&(s.default=s.default()),(null==s?void 0:s.isRequired)&&(null==s?void 0:s.default)===void 0&&delete s.default,t.push({type:e.name,name:r,attribute:s})})}),t}function e5(e){let t=[],n=function(e){let t=[],n="",r=!1,i=!1,o=0,s=e.length;for(let l=0;l<s;l+=1){let s=e[l];if("'"===s&&!i){r=!r,n+=s;continue}if('"'===s&&!r){i=!i,n+=s;continue}if(!r&&!i){if("("===s){o+=1,n+=s;continue}if(")"===s&&o>0){o-=1,n+=s;continue}if(";"===s&&0===o){t.push(n),n="";continue}}n+=s}return n&&t.push(n),t}(e||""),r=n.length;for(let e=0;e<r;e+=1){let r=n[e],i=r.indexOf(":");if(-1===i)continue;let o=r.slice(0,i).trim(),s=r.slice(i+1).trim();o&&s&&t.push([o,s])}return t}function e4(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(e=>{let[t,r]=e;if(!n[t]){n[t]=r;return}if("class"===t){let e=r?String(r).split(" "):[],i=n[t]?n[t].split(" "):[],o=e.filter(e=>!i.includes(e));n[t]=[...i,...o].join(" ")}else if("style"===t){let e=new Map([...e5(n[t]),...e5(r)]);n[t]=Array.from(e.entries()).map(e=>{let[t,n]=e;return`${t}: ${n}`}).join("; ")}else n[t]=r}),n},{})}function e6(e,t){return t.filter(t=>t.type===e.type.name).filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>e4(e,t),{})}function e9(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;let i=t.reduce((e,t)=>{var r;let i=t.attribute.parseHTML?t.attribute.parseHTML(n):"string"!=typeof(r=n.getAttribute(t.name))?r:r.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(r):"true"===r||"false"!==r&&r;return null==i?e:{...e,[t.name]:i}},{});return{...r,...i}}}}function e8(e){return Object.fromEntries(Object.entries(e).filter(e=>{let[t,n]=e;return!("attrs"===t&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length&&e.constructor===Object}(n))&&null!=n}))}function e7(e){var t,n;let r={};return!(null==(t=null==e?void 0:e.attribute)?void 0:t.isRequired)&&"default"in((null==e?void 0:e.attribute)||{})&&(r.default=e.attribute.default),(null==(n=null==e?void 0:e.attribute)?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function te(e){return e.sort((e,t)=>{let n=eQ(e,"priority")||100,r=eQ(t,"priority")||100;return n>r?-1:+(n<r)})}function tt(e){var t;let n=te(eX(e)),r=Array.from(new Set((t=n.map(e=>e.name)).filter((e,n)=>t.indexOf(e)!==n)));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(e=>`'${e}'`).join(", ")}]. This can lead to issues.`),n}function tn(e,t,n){let{from:r,to:i}=t,{blockSeparator:o="\n\n",textSerializers:s={}}=n||{},l="";return e.nodesBetween(r,i,(e,n,a,c)=>{var h;e.isBlock&&n>r&&(l+=o);let u=null==s?void 0:s[e.type.name];if(u)return a&&(l+=u({node:e,pos:n,parent:a,index:c,range:t})),!1;e.isText&&(l+=null==(h=null==e?void 0:e.text)?void 0:h.slice(Math.max(r,n)-n,i-n))}),l}function tr(e){return Object.fromEntries(Object.entries(e.nodes).filter(e=>{let[,t]=e;return t.spec.toText}).map(e=>{let[t,n]=e;return[t,n.spec.toText]}))}function ti(e,t){let n=eL("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){let n=K(t,e.schema),{from:r,to:i}=e.selection,o=[];e.doc.nodesBetween(r,i,e=>{o.push(e)});let s=o.reverse().find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}(e,t):"mark"===n?eU(e,t):{}}function to(e){let t,{mapping:n,steps:r}=e,i=[];return n.maps.forEach((e,t)=>{let o=[];if(e.ranges.length)e.forEach((e,t)=>{o.push({from:e,to:t})});else{let{from:e,to:n}=r[t];if(void 0===e||void 0===n)return;o.push({from:e,to:n})}o.forEach(e=>{let{from:r,to:o}=e,s=n.slice(t).map(r,-1),l=n.slice(t).map(o),a=n.invert().map(s,-1),c=n.invert().map(l);i.push({oldRange:{from:a,to:c},newRange:{from:s,to:l}})})}),1===(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON.stringify,n={};return e.filter(e=>{let r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)})}
2(i)).length?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}function ts(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=er(n.resolve(e),t.type);i&&r.push({mark:t,...i})}):n.nodesBetween(e,t,(e,t)=>{e&&(null==e?void 0:e.nodeSize)!==void 0&&r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}var tl=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:20,i=e.doc.resolve(n),o=r,s=null;for(;o>0&&null===s;){let e=i.node(o);(null==e?void 0:e.type.name)===t?s=e:o-=1}return[s,o]};function ta(e,t){return t.nodes[e]||t.marks[e]||null}function tc(e,t,n){return Object.fromEntries(Object.entries(n).filter(n=>{let[r]=n,i=e.find(e=>e.type===t&&e.name===r);return!!i&&i.attribute.keepOnSplit}))}var th=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,o)=>{var s,l;let a=(null==(l=(s=e.type.spec).toText)?void 0:l.call(s,{node:e,pos:t,parent:i,index:o}))||e.textContent||"%leaf%";n+=e.isAtom&&!e.isText?a:a.slice(0,Math.max(0,r-t))}),n};function tu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{empty:r,ranges:i}=e.selection,o=t?ei(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!o||o.name===e.type.name).find(e=>ee(e.attrs,n,{strict:!1}));let s=0,l=[];
2if(i.forEach(t=>{let{$from:n,$to:r}=t,i=n.pos,a=r.pos;e.doc.nodesBetween(i,a,(e,t)=>{if(o&&e.inlineContent&&!e.type.allowsMarkType(o))return!1;if(!e.isText&&!e.marks.length)return;let n=Math.max(i,t),r=Math.min(a,t+e.nodeSize);s+=r-n,l.push(...e.marks.map(e=>({mark:e,from:n,to:r})))})}),0===s)return!1;let a=l.filter(e=>!o||o.name===e.mark.type.name).filter(e=>ee(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),c=l.filter(e=>!o||e.mark.type!==o&&e.mark.type.excludes(o)).reduce((e,t)=>e+t.to-t.from,0);return(a>0?a+c:a)>=s}var td=(e,t)=>{let{$from:n,$to:r,$anchor:i}=e.selection;if(t){let n=eG(e=>e.type.name===t)(e.selection);if(!n)return!1;let r=e.doc.resolve(n.pos+1);return i.pos+1===r.end()}return!(r.parentOffset<r.parent.nodeSize-2)&&n.pos===r.pos},tp=e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0)&&t.pos===n.pos};function tf(e,t){return Array.isArray(t)?t.some(t=>("string"==typeof t?t:t.name)===e.name):t}function tm(e,t){let{nodeExtensions:n}=e2(t),r=n.find(t=>t.name===e);if(!r)return!1;let i={name:r.name,options:r.options,storage:r.storage},o=e1(eQ(r,"group",i));return"string"==typeof o&&o.split(" ").includes("list")}function tg(e){var t;let{checkChildren:n=!0,ignoreWhitespace:r=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r){if("hardBreak"===e.type.name)return!0;if(e.isText)return!/\S/.test(null!=(t=e.text)?t:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(0===e.content.childCount)return!0;if(n){let t=!0;return e.content.forEach(e=>{!1!==t&&(tg(e,{ignoreWhitespace:r,checkChildren:n})||(t=!1))}),t}return!1}function tk(e){return e instanceof v.NodeSelection}var ty=class e{static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}constructor(e){this.position=e}};function tb(e,t){let n=t.mapping.mapResult(e.position);return{position:new ty(n.pos),mapResult:n}}function tv(e){return new ty(e)}var tx=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{tr:r,state:i,dispatch:o}=n,{selection:s}=r,{empty:l,ranges:a}=s,c=ei(e,i.schema);if(o)if(l){let e=eU(i,c);r.addStoredMark(c.create({...e,...t}))}else a.forEach(e=>{let n=e.$from.pos,o=e.$to.pos;i.doc.nodesBetween(n,o,(e,i)=>{let s=Math.max(i,n),l=Math.min(i+e.nodeSize,o);e.marks.find(e=>e.type===c)?e.marks.forEach(e=>{c===e.type&&r.addMark(s,l,c.create({...e.attrs,...t}))}):r.addMark(s,l,c.create(t))})});return function(e,t,n){var r;let{selection:i}=t,o=null;
2if(el(i)&&(o=i.$cursor),o){let t=null!=(r=e.storedMarks)?r:o.marks();return o.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some(e=>e.type.excludes(n)))}let{ranges:s}=i;return s.some(t=>{let{$from:r,$to:i}=t,o=0===r.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(r.pos,i.pos,(e,t,r)=>{if(o)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),i=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));o=t&&i}return!o}),o})}(i,r,c)}},tw=(e,t)=>n=>{let{tr:r}=n;return r.setMeta(e,t),!0},tC=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let r,{state:i,dispatch:o,chain:s}=n,l=K(e,i.schema);return(i.selection.$anchor.sameParent(i.selection.$head)&&(r=i.selection.$anchor.parent.attrs),l.isTextblock)?s().command(e=>{let{commands:n}=e;return!!(0,b.setBlockType)(l,{...r,...t})(i)||n.clearNodes()}).command(e=>{let{state:n}=e;return(0,b.setBlockType)(l,{...r,...t})(n,o)}).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}},tS=e=>t=>{let{tr:n,dispatch:r}=t;if(r){let{doc:t}=n,r=ea(e,0,t.content.size),i=v.NodeSelection.create(t,r);n.setSelection(i)}return!0},tA=(e,t)=>n=>{let r,i,{tr:o,state:s,dispatch:l}=n,{selection:a}=s;return"number"==typeof t?(r=t,i=t):t&&"from"in t&&"to"in t?(r=t.from,i=t.to):(r=a.from,i=a.to),l&&o.doc.nodesBetween(r,i,(t,n)=>{t.isText||o.setNodeMarkup(n,void 0,{...t.attrs,dir:e})}),!0},tM=e=>t=>{let{tr:n,dispatch:r}=t;if(r){let{doc:t}=n,{from:r,to:i}="number"==typeof e?{from:e,to:e}:e,o=v.TextSelection.atStart(t).from,s=v.TextSelection.atEnd(t).to,l=ea(r,o,s),a=ea(i,o,s),c=v.TextSelection.create(t,l,a);n.setSelection(c)}return!0},tE=e=>t=>{let{state:n,dispatch:r}=t,i=K(e,n.schema);return(0,w.sinkListItem)(i)(n,r)};function t_(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>null==t?void 0:t.includes(e.type.name));e.tr.ensureMarks(r)}}var tT=function(){let{keepMarks:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let{tr:n,state:r,dispatch:i,editor:o}=t,{selection:s,doc:l}=n,{$from:a,$to:c}=s,h=tc(o.extensionManager.attributes,a.node().type.name,a.node().attrs);if(s instanceof v.NodeSelection&&s.node.isBlock)return!!a.parentOffset&&!!(0,y.canSplit)(l,a.pos)&&(i&&(e&&t_(r,o.extensionManager.splittableMarks),n.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;let u=c.parentOffset===c.parent.content.size,d=0===a.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(a.node(-1).contentMatchAt(a.indexAfter(-1))),p=u&&d?[{type:d,attrs:h}]:void 0,f=(0,y.canSplit)(n.doc,n.mapping.map(a.pos),1,p);if(!p&&!f&&(0,y.canSplit)(n.doc,n.mapping.map(a.pos),1,d?[{type:d}]:void 0)&&(f=!0,p=d?[{type:d,attrs:h}]:void 0),i){if(f&&(s instanceof v.TextSelection&&n.deleteSelection(),n.split(n.mapping.map(a.pos),1,p),d&&!u&&!a.parentOffset&&a.parent.type!==d)){let e=n.mapping.map(a.before()),t=n.doc.resolve(e);a.node(-1).canReplaceWith(t.index(),t.index()+1,d)&&n.setNodeMarkup(n.mapping.map(a.before()),d)}e&&t_(r,o.extensionManager.splittableMarks),n.scrollIntoView()}return f}},tD=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{var r;let{tr:i,state:o,dispatch:s,editor:l}=n,a=K(e,o.schema),{$from:c,$to:h}=o.selection,u=o.selection.node;if(u&&u.isBlock||c.depth<2||!c.sameParent(h))return!1;let d=c.node(-1);if(d.type!==a)return!1;let p=l.extensionManager.attributes;if(0===c.parent.content.size&&c.node(-1).childCount===c.indexAfter(-1)){if(2===c.depth||c.node(-3).type!==a||c.index(-2)!==c.node(-2).childCount-1)return!1;if(s){let e=x.Fragment.empty,n=c.index(-1)?1:c.index(-2)?2:3;for(let t=c.depth-n;t>=c.depth-3;t-=1)e=x.Fragment.from(c.node(t).copy(e));let o=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,s={...tc(p,c.node().type.name,c.node().attrs),...t},l=(null==(r=a.contentMatch.defaultType)?void 0:r.createAndFill(s))||void 0;e=e.append(x.Fragment.from(a.createAndFill(null,l)||void 0));let h=c.before(c.depth-(n-1));i.replace(h,c.after(-o),new x.Slice(e,4-n,0));let u=-1;i.doc.nodesBetween(h,i.doc.content.size,(e,t)=>{if(u>-1)return!1;e.isTextblock&&0===e.content.size&&(u=t+1)}),u>-1&&i.setSelection(v.TextSelection.near(i.doc.resolve(u))),i.scrollIntoView()}return!0}let f=h.pos===c.end()?d.contentMatchAt(0).defaultType:null,m={...tc(p,d.type.name,d.attrs),...t},g={...tc(p,c.node().type.name,c.node().attrs),...t};i.delete(c.pos,h.pos);let k=f?[{type:a,attrs:m},{type:f,attrs:g}]:[{type:a,attrs:m}];if(!(0,y.canSplit)(i.doc,c.pos,2))return!1;if(s){let{selection:e,storedMarks:t}=o,{splittableMarks:n}=l.extensionManager,r=t||e.$to.parentOffset&&e.$from.marks();if(i.split(c.pos,2,k).scrollIntoView(),!r||!s)return!0;let a=r.filter(e=>
2n.includes(e.type.name));i.ensureMarks(a)}return!0}},tO=(e,t)=>{let n=eG(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;let i=e.doc.nodeAt(r);return!(n.node.type===(null==i?void 0:i.type)&&(0,y.canJoin)(e.doc,n.pos))||(e.join(n.pos),!0)},tN=(e,t)=>{let n=eG(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;let i=e.doc.nodeAt(r);return!(n.node.type===(null==i?void 0:i.type)&&(0,y.canJoin)(e.doc,r))||(e.join(r),!0)},tI=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return i=>{let{editor:o,tr:s,state:l,dispatch:a,chain:c,commands:h,can:u}=i,{extensions:d,splittableMarks:p}=o.extensionManager,f=K(e,l.schema),m=K(t,l.schema),{selection:g,storedMarks:k}=l,{$from:y,$to:b}=g,v=y.blockRange(b),x=k||g.$to.parentOffset&&g.$from.marks();if(!v)return!1;let w=eG(e=>tm(e.type.name,d))(g);if(v.depth>=1&&w&&v.depth-w.depth<=1){if(w.node.type===f)return h.liftListItem(m);if(tm(w.node.type.name,d)&&f.validContent(w.node.content)&&a)return c().command(()=>(s.setNodeMarkup(w.pos,f),!0)).command(()=>tO(s,f)).command(()=>tN(s,f)).run()}return n&&x&&a?c().command(()=>{let e=u().wrapInList(f,r),t=x.filter(e=>p.includes(e.type.name));return s.ensureMarks(t),!!e||h.clearNodes()}).wrapInList(f,r).command(()=>tO(s,f)).command(()=>tN(s,f)).run():c().command(()=>!!u().wrapInList(f,r)||h.clearNodes()).wrapInList(f,r).command(()=>tO(s,f)).command(()=>tN(s,f)).run()}},tL=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r=>{let{state:i,commands:o}=r,{extendEmptyMarkRange:s=!1}=n,l=ei(e,i.schema);return tu(i,l,t)?o.unsetMark(l,{extendEmptyMarkRange:s}):o.setMark(l,t)}},tF=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r=>{let i,{state:o,commands:s}=r,l=K(e,o.schema),a=K(t,o.schema),c=eT(o,l,n);return(o.selection.$anchor.sameParent(o.selection.$head)&&(i=o.selection.$anchor.parent.attrs),c)?s.setNode(a,i):s.setNode(l,{...i,...n})}},tR=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{state:r,commands:i}=n,o=K(e,r.schema);return eT(r,o,t)?i.lift(o):i.wrapIn(o,t)}},tz=()=>e=>{let{state:t,dispatch:n}=e,r=t.plugins;for(let e=0;e<r.length;e+=1){let i,o=r[e];if(o.spec.isInputRules&&(i=o.getState(t))){if(n){let e=t.tr,n=i.transform;for(let t=n.steps.length-1;t>=0;t-=1)e.step(n.steps[t].invert(n.docs[t]));if(i.text){let n=e.doc.resolve(i.from).marks();e.replaceWith(i.from,i.to,t.schema.text(i.text,n))}else e.delete(i.from,i.to)}return!0}}return!1},tP=()=>e=>{let{tr:t,dispatch:n}=e,{selection:r}=t,{empty:i,ranges:o}=r;return!!i||(n&&o.forEach(e=>{t.removeMark(e.$from.pos,e.$to.pos)}),!0)},tB=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{var r;let{tr:i,state:o,dispatch:s}=n,{extendEmptyMarkRange:l=!1}=t,{selection:a}=i,c=ei(e,o.schema),{$from:h,empty:u,ranges:d}=a;if(!s)return!0;if(u&&l){let{from:e,to:t}=a,n=null==(r=h.marks().find(e=>e.type===c))?void 0:r.attrs,o=er(h,c,n);o&&(e=o.from,t=o.to),i.removeMark(e,t,c)}else d.forEach(e=>{i.removeMark(e.$from.pos,e.$to.pos,c)});return i.removeStoredMark(c),!0}},t$=e=>t=>{let n,r,{tr:i,state:o,dispatch:s}=t,{selection:l}=o;return"number"==typeof e?(n=e,r=e):e&&"from"in e&&"to"in e?(n=e.from,r=e.to):(n=l.from,r=l.to),s&&i.doc.nodesBetween(n,r,(e,t)=>{if(e.isText)return;let n={...e.attrs};delete n.dir,i.setNodeMarkup(t,void 0,n)}),!0},tj=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{tr:r,state:i,dispatch:o}=n,s=null,l=null,a=eL("string"==typeof e?e:e.name,i.schema);if(!a)return!1;"node"===a&&(s=K(e,i.schema)),"mark"===a&&(l=ei(e,i.schema));let c=!1;return r.selection.ranges.forEach(e=>{let n,a,h,u,d=e.$from.pos,p=e.$to.pos;r.selection.empty?i.doc.nodesBetween(d,p,(e,t)=>{s&&s===e.type&&(c=!0,h=Math.max(t,d),u=Math.min(t+e.nodeSize,p),n=t,a=e)}):i.doc.nodesBetween(d,p,(e,i)=>{i<d&&s&&s===e.type&&(c=!0,h=Math.max(i,d),u=Math.min(i+e.nodeSize,p),n=i,a=e),i>=d&&i<=p&&(s&&s===e.type&&(c=!0,o&&r.setNodeMarkup(i,void 0,{...e.attrs,...t})),l&&e.marks.length&&e.marks.forEach(n=>{if(l===n.type&&(c=!0,o)){let o=Math.max(i,d),s=Math.min(i+e.nodeSize,p);r.addMark(o,s,l.create({...n.attrs,...t}))}}))}),a&&(void 0!==n&&o&&r.setNodeMarkup(n,void 0,{...a.attrs,...t}
2),l&&a.marks.length&&a.marks.forEach(e=>{l===e.type&&o&&r.addMark(h,u,l.create({...e.attrs,...t}))}))}),c}},tq=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{state:r,dispatch:i}=n,o=K(e,r.schema);return(0,b.wrapIn)(o,t)(r,i)}},tV=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{state:r,dispatch:i}=n,o=K(e,r.schema);return(0,w.wrapInList)(o,t)(r,i)}},tH=class{on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let i=this.callbacks[e];return i&&i.forEach(e=>e.apply(this,n)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}once(e,t){var n=this;let r=function(){for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];n.off(e,r),t.apply(n,o)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}constructor(){this.callbacks={}}},tW=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=null==(t=e.undoable)||t}};function tU(e){var t;let{editor:n,from:r,to:i,text:o,rules:s,plugin:l}=e,{view:a}=n;if(a.composing)return!1;let c=a.state.doc.resolve(r);if(c.parent.type.spec.code||(null==(t=c.nodeBefore||c.nodeAfter)?void 0:t.marks.find(e=>e.type.spec.code)))return!1;let h=!1,u=th(c)+o;return s.forEach(e=>{if(h)return;let t=((e,t)=>{if(Y(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r})(u,e.find);if(!t)return;let s=a.state.tr,c=z({state:a.state,transaction:s}),d={from:r-(t[0].length-o.length),to:i}
2,{commands:p,chain:f,can:m}=new P({editor:n,state:c});null!==e.handler({state:c,range:d,match:t,commands:p,chain:f,can:m})&&s.steps.length&&(e.undoable&&s.setMeta(l,{transform:s,from:r,to:i,text:o}),a.dispatch(s),h=!0)}),h}function tK(e){return"Object"===Object.prototype.toString.call(e).slice(8,-1)&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}var tJ=class{get options(){return{...e1(eQ(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...e1(eQ(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend({...this.config,addOptions:()=>(function e(t,n){let r={...t};return tK(t)&&tK(n)&&Object.keys(n).forEach(i=>{tK(n[i])&&tK(t[i])?r[i]=e(t[i],n[i]):r[i]=n[i]}),r})(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}},tZ=class e extends tJ{static create(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e("function"==typeof t?t():t)}static handleExit(e){let{editor:t,mark:n}=e,{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){let e=i.marks();if(!e.find(e=>(null==e?void 0:e.type.name)===n.name))return!1;let o=e.find(e=>(null==e?void 0:e.type.name)===n.name);return o&&r.removeStoredMark(o),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let t="function"==typeof e?e():e;return super.extend(t)}constructor(){super(...arguments),this.type="mark"}},tG=class{constructor(e){this.find=e.find,this.handler=e.handler}},tQ=null,tX=class{get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:ta(t.name,this.schema)},r=eQ(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this;return te([...this.extensions].reverse()).flatMap(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:ta(t.name,this.schema)},r=[],i=eQ(t,"addKeyboardShortcuts",n),o={};if("mark"===t.type&&eQ(t,"exitable",n)&&(o.ArrowRight=()=>tZ.handleExit({editor:e,mark:t})),i){let t=Object.fromEntries(Object.entries(i()).map(t=>{let[n,r]=t;return[n,()=>r({editor:e})]}));o={...o,...t}}let s=I(o);r.push(s);let l=eQ(t,"addInputRules",n);if(tf(t,e.options.enableInputRules)&&l){let t=l();if(t&&t.length){let n=function(e){let{editor:t,rules:n}=e,r=new v.Plugin({state:{init:()=>null,apply(e,i,o){let s=e.getMeta(r);if(s)return s;let l=e.getMeta("applyInputRules");return l&&setTimeout(()=>{let{text:e}=l;"string"==typeof e||(e=eY(x.Fragment.from(e),o.schema));let{from:i}=l,s=i+e.length;tU({editor:t,from:i,to:s,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput:(e,i,o,s)=>tU({editor:t,from:i,to:o,text:s,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&tU({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if("Enter"!==i.key)return!1;let{$cursor:o}=e.state.selection;return!!o&&tU({editor:t,from:o.pos,to:o.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}({editor:e,rules:t}),i=Array.isArray(n)?n:[n];r.push(...i)}}let a=eQ(t,"addPasteRules",n);if(tf(t,e.options.enablePasteRules)&&a){let t=a();if(t&&t.length){let n=function(e){let t,{editor:n,rules:r}=e,i=null,o=!1,s=!1,l="u">typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{t="u">typeof DragEvent?new DragEvent("drop"):null}catch{t=null}let a=e=>{let{state:r,from:i,to:o,rule:s,pasteEvt:a}=e,c=r.tr;if(function(e){let{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:l}=e,{commands:a,chain:c,can:h}=new P({editor:t,state:n}),u=[];return n.doc.nodesBetween(r,i,(e,t)=>{var d,p,f,m,g;if((null==(p=null==(d=e.type)?void 0:d.spec)?void 0:p.code)||!(e.isText||e.isTextblock||e.isInline))return;let k=null!=(g=null!=(m=null==(f=e.content)?void 0:f.size)?m:e.nodeSize)?g:0,y=Math.max(r,t),b=Math.min(i,t+k);y>=b||((e,t,n)=>{if(Y(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n}):[]})(e.isText?e.text||"":e.textBetween(y-t,b-t,void 0,""),o.find,s).forEac
2h(e=>{if(void 0===e.index)return;let t=y+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},d=o.handler({state:n,range:i,match:e,commands:a,chain:c,can:h,pasteEvent:s,dropEvent:l});u.push(d)})}),u.every(e=>null!==e)}({editor:n,state:z({state:r,transaction:c}),from:Math.max(i-1,0),to:o.b-1,rule:s,pasteEvent:a,dropEvent:t})&&c.steps.length){try{t="u">typeof DragEvent?new DragEvent("drop"):null}catch{t=null}return l="u">typeof ClipboardEvent?new ClipboardEvent("paste"):null,c}};return r.map(e=>new v.Plugin({view(e){let t=t=>{var r;(i=(null==(r=e.dom.parentElement)?void 0:r.contains(t.target))?e.dom.parentElement:null)&&(tQ=n)},r=()=>{tQ&&(tQ=null)};return window.addEventListener("dragstart",t),window.addEventListener("dragend",r),{destroy(){window.removeEventListener("dragstart",t),window.removeEventListener("dragend",r)}}},props:{handleDOMEvents:{drop:(e,n)=>{if(s=i===e.dom.parentElement,t=n,!s){let e=tQ;(null==e?void 0:e.isEditable)&&setTimeout(()=>{let t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})},10)}return!1},paste:(e,t)=>{var n;let r=null==(n=t.clipboardData)?void 0:n.getData("text/html");return l=t,o=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(t,n,r)=>{let i=t[0],c="paste"===i.getMeta("uiEvent")&&!o,h="drop"===i.getMeta("uiEvent")&&!s,u=i.getMeta("applyPasteRules"),d=!!u;if(!c&&!h&&!d)return;if(d){var p,f;let t,{text:n}=u;"string"==typeof n||(n=eY(x.Fragment.from(n),r.schema));let{from:i}=u,o=i+n.length;return a({rule:e,state:r,from:i,to:{b:o},pasteEvt:(p=n,null==(f=(t=new ClipboardEvent("paste",{clipboardData:new DataTransfer})).clipboardData)||f.setData("text/html",p),t)})}let m=n.doc.content.findDiffStart(r.doc.content),g=n.doc.content.findDiffEnd(r.doc.content);if("number"==typeof m&&g&&m!==g.b)return a({rule:e,state:r,from:m,to:g,pasteEvt:l})}}))}({editor:e,rules:t});r.push(...n)}}let c=eQ(t,"addProseMirrorPlugins",n);if(c){let e=c();r.push(...e)}return r})}get attributes(){return e3(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=e2(this.extensions);return Object.fromEntries(t.filter(e=>!!eQ(e,"addNodeView")).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:K(t.name,this.schema)},i=eQ(t,"addNodeView",r);if(!i)return[];let o=i();return o?[t.name,(r,i,s,l,a)=>{let c=e6(r,n);return o({node:r,view:i,getPos:s,decorations:l,innerDecorations:a,editor:e,extension:t,HTMLAttributes:c})}]:[]}))}dispatchTransaction(e){let{editor:t}=this;return te([...this.extensions].reverse()).reduceRight((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:ta(n.name,this.schema)},i=eQ(n,"dispatchTransaction",r);return i?t=>{i.call(r,{transaction:t,next:e})}:e},e)}transformPastedHTML(e){let{editor:t}=this;return te([...this.extensions]).reduce((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:ta(n.name,this.schema)},i=eQ(n,"transformPastedHTML",r);return i?(t,n)=>{let o=e(t,n);return i.call(r,o)}:e},e||(e=>e))}get markViews(){let{editor:e}=this,{markExtensions:t}=e2(this.extensions);return Object.fromEntries(t.filter(e=>!!eQ(e,"addMarkView")).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:ei(t.name,this.schema)},i=eQ(t,"addMarkView",r);return i?[t.name,(r,o,s)=>{let l=e6(r,n);return i()({mark:r,view:o,inline:s,editor:e,extension:t,HTMLAttributes:l,updateAttributes:t=>{nb(r,e,t)}})}]:[]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(e=>[e.name,e.storage])),e.forEach(e=>{var t;let n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ta(e.name,this.schema)};"mark"===e.type&&(null==(t=e1(eQ(e,"keepOnSplit",n)))||t)&&this.splittableMarks.push(e.name);let r=eQ(e,"onBeforeCreate",n),i=eQ(e,"onCreate",n),o=eQ(e,"onUpdate",n),s=eQ(e,"onSelectionUpdate",n),l=eQ(e,"onTransaction",n),a=eQ(e,"onFocus",n),c=eQ(e,"onBlur",n),h=eQ(e,"onDestroy",n);r&&this.editor.on("beforeCreate",r),i&&this.editor.on("create",i),o&&this.editor.on("update",o),s&&this.editor.on("selectionUpdate",s),l&&this.editor.on("transaction",l),a&&this.editor.on("focus",a),c&&this.editor.on("blur",c),h&&this.editor.on("destroy",h)})}constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=tt(e),this.schema=function(e,t){var n;let r=e3(e),{nodeExtensions:i,markExtensions:o}=e2(e),s=null==(n=i.find(e=>eQ(e,"topNode")))?void 0:n.name,l=Object.fromEntries(i.map(n=>{let i=r.filter(e=>e.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:t},s=e8({...e.reduce((e,t)=>
2{let r=eQ(t,"extendNodeSchema",o);return{...e,...r?r(n):{}}},{}),content:e1(eQ(n,"content",o)),marks:e1(eQ(n,"marks",o)),group:e1(eQ(n,"group",o)),inline:e1(eQ(n,"inline",o)),atom:e1(eQ(n,"atom",o)),selectable:e1(eQ(n,"selectable",o)),draggable:e1(eQ(n,"draggable",o)),code:e1(eQ(n,"code",o)),whitespace:e1(eQ(n,"whitespace",o)),linebreakReplacement:e1(eQ(n,"linebreakReplacement",o)),defining:e1(eQ(n,"defining",o)),isolating:e1(eQ(n,"isolating",o)),attrs:Object.fromEntries(i.map(e7))}),l=e1(eQ(n,"parseHTML",o));l&&(s.parseDOM=l.map(e=>e9(e,i)));let a=eQ(n,"renderHTML",o);a&&(s.toDOM=e=>a({node:e,HTMLAttributes:e6(e,i)}));let c=eQ(n,"renderText",o);return c&&(s.toText=c),[n.name,s]})),a=Object.fromEntries(o.map(n=>{let i=r.filter(e=>e.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:t},s=e8({...e.reduce((e,t)=>{let r=eQ(t,"extendMarkSchema",o);return{...e,...r?r(n):{}}},{}),inclusive:e1(eQ(n,"inclusive",o)),excludes:e1(eQ(n,"excludes",o)),group:e1(eQ(n,"group",o)),spanning:e1(eQ(n,"spanning",o)),code:e1(eQ(n,"code",o)),attrs:Object.fromEntries(i.map(e7))}),l=e1(eQ(n,"parseHTML",o));l&&(s.parseDOM=l.map(e=>e9(e,i)));let a=eQ(n,"renderHTML",o);return a&&(s.toDOM=e=>a({mark:e,HTMLAttributes:e6(e,i)})),[n.name,s]}));return new x.Schema({topNode:s,nodes:l,marks:a})}(this.extensions,t),this.setupExtensions()}};tX.resolve=tt,tX.sort=te,tX.flatten=eX;var tY={};R(tY,{ClipboardTextSerializer:()=>t1,Commands:()=>t2,Delete:()=>t3,Drop:()=>t5,Editable:()=>t4,FocusEvents:()=>t9,Keymap:()=>t8,Paste:()=>t7,Tabindex:()=>ne,TextDirection:()=>nt,focusEventsPluginKey:()=>t6});var t0=class e extends tJ{static create(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e("function"==typeof t?t():t)}configure(e){return super.configure(e)}extend(e){let t="function"==typeof e?e():e;return super.extend(t)}constructor(){super(...arguments),this.type="extension"}},t1=t0.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new v.Plugin({key:new v.PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map(e=>e.$from.pos)),l=Math.max(...o.map(e=>e.$to.pos)),a=tr(n);return tn(r,{from:s,to:l},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),t2=t0.create({name:"commands",addCommands:()=>({...B})}),t3=t0.create({name:"delete",onUpdate(e){var t,n,r;let{transaction:i,appendedTransactions:o}=e,s=()=>{var e,t,n,r;if(null!=(r=null==(n=null==(t=null==(e=this.editor.options.coreExtensionOptions)?void 0:e.delete)?void 0:t.filterTransaction)?void 0:n.call(t,i))?r:i.getMeta("y-sync$"))return;let s=eK(i.before,[i,...o]);
2to(s).forEach(e=>{s.mapping.mapResult(e.oldRange.from).deletedAfter&&s.mapping.mapResult(e.oldRange.to).deletedBefore&&s.before.nodesBetween(e.oldRange.from,e.oldRange.to,(t,n)=>{let r=n+t.nodeSize-2,o=e.oldRange.from<=n&&r<=e.oldRange.to;this.editor.emit("delete",{type:"node",node:t,from:n,to:r,newFrom:s.mapping.map(n),newTo:s.mapping.map(r),deletedRange:e.oldRange,newRange:e.newRange,partial:!o,editor:this.editor,transaction:i,combinedTransform:s})})});let l=s.mapping;s.steps.forEach((e,t)=>{var n,r;if(e instanceof y.RemoveMarkStep){let o=l.slice(t).map(e.from,-1),a=l.slice(t).map(e.to),c=l.invert().map(o,-1),h=l.invert().map(a),u=o>0&&(null==(n=s.doc.nodeAt(o-1))?void 0:n.marks.some(t=>t.eq(e.mark))),d=null==(r=s.doc.nodeAt(a))?void 0:r.marks.some(t=>t.eq(e.mark));this.editor.emit("delete",{type:"mark",mark:e.mark,from:e.from,to:e.to,deletedRange:{from:c,to:h},newRange:{from:o,to:a},partial:!!(d||u),editor:this.editor,transaction:i,combinedTransform:s})}})};null==(r=null==(n=null==(t=this.editor.options.coreExtensionOptions)?void 0:t.delete)?void 0:n.async)||r?setTimeout(s,0):s()}}),t5=t0.create({name:"drop",addProseMirrorPlugins(){return[new v.Plugin({key:new v.PluginKey("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),t4=t0.create({name:"editable",addProseMirrorPlugins(){return[new v.Plugin({key:new v.PluginKey("editable"),props:{editable:()=>this.editor.options.editable}})]}}),t6=new v.PluginKey("focusEvents"),t9=t0.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new v.Plugin({key:t6,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),t8=t0.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(e=>{let{commands:t}=e;return[()=>t.undoInputRule(),()=>t.command(e=>{let{tr:n}=e,{selection:r,doc:i}=n,{empty:o,$anchor:s}=r,{pos:l,parent:a}=s,c=s.parent.isTextblock&&l>0?n.doc.resolve(l-1):s,h=c.parent.type.spec.isolating,u=s.pos-s.parentOffset,d=h&&1===c.parent.childCount?u===s.pos:v.Selection.atStart(i).from===l;return!!o&&!!a.type.isTextblock&&!a.textContent.length&&!!d&&(!d||"paragraph"!==s.parent.type.name)&&t.clearNodes()}),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()]}),t=()=>this.editor.commands.first(e=>{let{commands:t}=e;return[()=>t.deleteSelection(),()=>t.deleteCurrentNode(),()=>t.joinForward(),()=>t.selectNodeForward()]}),n={Enter:()=>this.editor.commands.first(e=>{let{commands:t}=e;return[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.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()},r={...n},i={...n,"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 eu()||eE()?i:r},addProseMirrorPlugins(){return[new v.Plugin({key:new v.PluginKey("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(e=>e.getMeta("composition")))return;let r=e.some(e=>e.docChanged)&&!t.doc.eq(n.doc),i=e.some(e=>e.getMeta("preventClearDocument"));if(!r||i)return;let{empty:o,from:s,to:l}=t.selection,a=v.Selection.atStart(t.doc).from,c=v.Selection.atEnd(t.doc).to;if(o||s!==a||l!==c||!tg(n.doc))return;let h=n.tr,u=z({state:n,transaction:h}),{commands:d}=new P({editor:this.editor,state:u});if(d.clearNodes(),h.steps.length)return h}})]}}),t7=t0.create({name:"paste",addProseMirrorPlugins(){return[new v.Plugin({key:new v.PluginKey("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),ne=t0.create({name:"tabindex",addProseMirrorPlugins(){return[new v.Plugin({key:new v.PluginKey("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),nt=t0.create({name:"textDirection",addOptions:()=>({direction:void 0}),addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=e2(this.extensions);return[{types:e.filter(e=>"text"!==e.name).map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute("dir");return t&&("ltr"===t||"rtl"===t||"auto"===t)?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new v.Plugin({key:new v.PluginKey("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}
2),nn=class e{get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return null!=(e=this.actualDepth)?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+ +!this.node.isText}get parent(){if(0===this.depth)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1);return new e(this.resolvedPos.doc.resolve(t),this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let i=n.isBlock&&!n.isTextblock,o=n.isAtom&&!n.isText,s=n.isInline,l=this.pos+r+ +!o;if(l<0||l>this.resolvedPos.doc.nodeSize-2)return;let a=this.resolvedPos.doc.resolve(l);if(!i&&!s&&a.depth<=this.depth)return;let c=new e(a,this.editor,i,i||s?n:null);i&&(c.actualDepth=this.depth+1),t.push(c)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e)if(Object.keys(t).length>0){let e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==t[i])break}}else n=r;r=r.parent}return n}querySelector(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];if(!this.children||0===this.children.length)return r;let i=Object.keys(t);return this.children.forEach(o=>{n&&r.length>0||(o.node.type.name===e&&i.every(e=>t[e]===o.node.attrs[e])&&r.push(o),n&&r.length>0||(r=r.concat(o.querySelectorAll(e,t,n))))}),r}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}},nr=`.ProseMirror { 3 position: relative; 4} 5 6.ProseMirror { 7 word-wrap: break-word; 8 white-space: pre-wrap; 9 white-space: break-spaces; 10 -webkit-font-variant-ligatures: none; 11 font-variant-ligatures: none; 12 font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ 13} 14 15.ProseMirror [contenteditable="false"] { 16 white-space: normal; 17} 18 19.ProseMirror [contenteditable="false"] [contenteditable="true"] { 20 white-space: pre-wrap; 21} 22 23.ProseMirror pre { 24 white-space: pre-wrap; 25} 26 27img.ProseMirror-separator { 28 display: inline !important; 29 border: none !important; 30 margin: 0 !important; 31 width: 0 !important; 32 height: 0 !important; 33} 34 35.ProseMirror-gapcursor { 36 display: none; 37 pointer-events: none; 38 position: absolute; 39 margin: 0; 40} 41 42.ProseMirror-gapcursor:after { 43 content: ""; 44 display: block; 45 position: absolute; 46 top: -2px; 47 width: 20px; 48 border-top: 1px solid black; 49 animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; 50} 51 52@keyframes ProseMirror-cursor-blink { 53 to { 54 visibility: hidden; 55 } 56} 57 58.ProseMirror-hideselection *::selection { 59 background: transparent; 60} 61 62.ProseMirror-hideselection *::-moz-selection { 63 background: transparent; 64} 65 66.ProseMirror-hideselection * { 67 caret-color: transparent; 68} 69 70.ProseMirror-focused .ProseMirror-gapcursor { 71 display: block; 72}`,ni=class extends tH{mount(e){if("u"<typeof document)throw Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");
72this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(!1!==this.options.autofocus&&null!==this.options.autofocus&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;(null==e?void 0:e.editor)&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{"function"==typeof this.css.remove?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&"u">typeof document&&(this.css=function(e,t){let n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;let r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}(nr,this.options.injectNonce))}setOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options={...this.options,...e},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if("state"===t)return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=e0(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(e=>{let t="string"==typeof e?`${e}$`:e.key;n=n.filter(e=>!e.key.startsWith(t))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let n=[...this.options.enableCoreExtensions?[t4,t1.configure({blockSeparator:null==(t=null==(e=this.options.coreExtensionOptions)?void 0:e.clipboardTextSerializer)?void 0:t.blockSeparator}),t2,t9,t8,ne,t5,t7,t3,nt.configure({direction:this.options.textDirection})].filter(e=>"object"!=typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[e.name]):[],...this.options.extensions].filter(e=>["extension","node","mark"].includes(null==e?void 0:e.type));this.extensionManager=new tX(n,this)}createCommandManager(){this.commandManager=new P({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=eH(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&"object"==typeof this.storage.collaboration&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(e=>"collaboration"!==e.name),this.createExtensionManager()}}),e=eH(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,r=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,o=t.transformPastedHTML,s=this.extensionManager.transformPastedHTML(o);this.editorView=new C.EditorView(e,{...t,attributes:{role:"textbox",...null==t?void 0:t.attributes},dispatchTransaction:i,transformPastedHTML:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let l=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(l),this.prependClass(),this.injectCSS(),this.view.dom.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}
72e.steps.forEach(e=>{var t;return null==(t=this.capturedTransaction)?void 0:t.step(e)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),i=n.includes(e),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!i)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let s=n.findLast(e=>e.getMeta("focus")||e.getMeta("blur")),l=null==s?void 0:s.getMeta("focus"),a=null==s?void 0:s.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:s}),a&&this.emit("blur",{editor:this,event:a.event,transaction:s}),e.getMeta("preventUpdate")||!n.some(e=>e.docChanged)||o.doc.eq(t.doc)||this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return ti(this.state,e)}isActive(e,t){let n="string"==typeof e?e:null,r="string"==typeof e?t:e;return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return eT(e,null,n)||tu(e,null,n);let r=eL(t,e.schema);return"node"===r?eT(e,t,n):"mark"===r&&tu(e,t,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return eY(this.state.doc.content,this.schema)}getText(e){var t,n;let r,{blockSeparator:i="\n\n",textSerializers:o={}}=e||{};return t=this.state.doc,n={blockSeparator:i,textSerializers:{...tr(this.schema),...o}},r={from:0,to:t.content.size},tn(t,r,n)}get isEmpty(){return tg(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return null==(t=null==(e=this.editorView)?void 0:e.isDestroyed)||t}$node(e,t){var n;return(null==(n=this.$doc)?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return(null==(n=this.$doc)?void 0:n.querySelectorAll(e,t))||null}$pos(e){return new nn(this.state.doc.resolve(e),this)}get $doc(){return this.$pos(0)}constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:"u">typeof document?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:e=>{let{error:t}=e;throw t},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:tb,createMappablePosition:tv},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",e=>{let{event:t,slice:n,moved:r}=e;return this.options.onDrop(t,n,r)}),this.on("paste",e=>{let{event:t,slice:n}=e;return this.options.onPaste(t,n)}),this.on("delete",this.options.onDelete);const t=this.createDoc(),n=ec(t,this.options.autofocus);this.editorState=v.EditorState.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}};function no(e){return new tW({find:e.find,handler:t=>{let{state:n,range:r,match:i}=t,o=e1(e.getAttributes,void 0,i);if(!1===o||null===o)return null;let{tr:s}=n,l=i[i.length-1],a=i[0];if(l){let t=a.search(/\S/),i=r.from+a.indexOf(l),c=i+l.length;if(ts(r.from,r.to,n.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>i).length)return null;c<r.to&&s.delete(c,r.to),i>r.from&&s.delete(r.from+t,i);let h=r.from+t+l.length;s.addMark(r.from+t,h,e.type.create(o||{})),s.removeStoredMark(e.type)}},undoable:e.undoable})}function ns(e){return new tW({find:e.find,handler:t=>{let{state:n,range:r,match:i}=t,o=e1(e.getAttributes,void 0,i)||{},{tr:s}=n,l=r.from,a=r.to,c=e.type.create(o);if(i[1]){let e=l+i[0].lastIndexOf(i[1]);e>a?e=a:a=e+i[1].length;let t=i[0][i[0].length-1];s.insertText(t,l+i[0].length-1),s.replaceWith(e,a,c)}else if(i[0]){let t=e.type.isInline?l:l-1;s.insert(t,e.type.create(o)).delete(s.mapping.map(l),s.mapping.map(a))}s.scrollIntoView()},undoable:e.undoable})}function nl(e){return new tW({find:e.find,handler:t=>{let{state:n,range:r,match:i}=t,o=n.doc.resolve(r.from),s=e1(e.getAttributes,void 0,i)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;n.tr.delete(r.from,r.to).setBlockType(r.from,r.from,e.type,s)},undoable:e.undoable})}function na(e){return new tW({find:e.find,handler:t=>{let{state:n,range:r,match:i,chain:o}=t,s=e1(e.getAttributes,void 0,i)||{},l=n.tr.delete(r.from,r.to),a=l.doc.resolve(r.from).blockRange(),c=a&&(0,y.findWrapping)(a,e.type,s);if(!c)return null;if(l.wrap(a,c),e.keepMarks&&e.editor){let{selection:t,storedMarks:r}=n,{splittableMarks:i}=e.editor.extensionManager,o=r||t.$to.parentOffset&&t.$from.marks();if(o){let e=o.filter(e=>
72i.includes(e.type.name));l.ensureMarks(e)}}if(e.keepAttributes){let t="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";o().updateAttributes(t,s).run()}let h=l.doc.resolve(r.from-1).nodeBefore;h&&h.type===e.type&&(0,y.canJoin)(l.doc,r.from-1)&&(!e.joinPredicate||e.joinPredicate(i,h))&&l.join(r.from-1)},undoable:e.undoable})}function nc(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof v.NodeSelection){let e=r.index();return r.parent.canReplaceWith(e,e+1,t)}let i=r.depth;for(;i>=0;){let e=r.index(i);if(r.node(i).contentMatchAt(e).matchType(t))return!0;i-=1}return!1}function nh(e){if(!(null==e?void 0:e.trim()))return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,e=>(n.push(e),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);i&&(t.class=i.map(e=>e.trim().slice(1)).join(" "));let o=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);o&&(t.id=o[1]),Array.from(r.matchAll(/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g)).forEach(e=>{var r;let[,i,o]=e,s=n[parseInt((null==(r=o.match(/__QUOTED_(\d+)__/))?void 0:r[1])||"0",10)];s&&(t[i]=s.slice(1,-1))});let s=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return s&&s.split(/\s+/).filter(Boolean).forEach(e=>
72{e.match(/^[a-zA-Z][\w-]*$/)&&(t[e]=!0)}),t}function nu(e){if(!e||0===Object.keys(e).length)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(e=>t.push(`.${e}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(e=>{let[n,r]=e;"class"!==n&&"id"!==n&&(!0===r?t.push(n):!1!==r&&null!=r&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function nd(e){let{nodeName:t,name:n,parseAttributes:r=nh,serializeAttributes:i=nu,defaultAttributes:o={},requiredAttributes:s=[],allowedAttributes:l}=e,a=n||t;return{parseMarkdown:(e,n)=>{let r={...o,...e.attributes};return n.createNode(t,r,[])},markdownTokenizer:{name:t,level:"block",start(e){var t;let n=RegExp(`^:::${a}(?:\\s|$)`,"m"),r=null==(t=e.match(n))?void 0:t.index;return void 0!==r?r:-1},tokenize(e,n,i){let o=RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),l=e.match(o);if(!l)return;let c=r(l[1]||"");if(!s.find(e=>!(e in c)))return{type:t,raw:l[0],attributes:c}}},renderMarkdown:e=>{let t=i((e=>{if(!l)return e;let t={};return l.forEach(n=>{n in e&&(t[n]=e[n])}),t})(e.attrs||{})),n=t?` {${t}}`:"";return`:::${a}${n} :::`}}}function np(e){let{nodeName:t,name:n,getContent:r,parseAttributes:i=nh,serializeAttributes:o=nu,defaultAttributes:s={},content:l="block",allowedAttributes:a}=e,c=n||t;return{parseMarkdown:(e,n)=>{let i;if(r){let t=r(e);i="string"==typeof t?[{type:"text",text:t}]:t}else i="block"===l?n.parseChildren(e.tokens||[]):n.parseInline(e.tokens||[]);let o={...s,...e.attributes};return n.createNode(t,o,i)},markdownTokenizer:{name:t,level:"block",start(e){var t;let n=RegExp(`^:::${c}`,"m"),r=null==(t=e.match(n))?void 0:t.index;return void 0!==r?r:-1},tokenize(e,n,r){var o;let s=RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),a=e.match(s);if(!a)return;let[h,u=""]=a,d=i(u),p=1,f=h.length,m="",g=/^:::([\w-]*)(\s.*)?/gm,k=e.slice(f);for(g.lastIndex=0;;){let n=g.exec(k);if(null===n)break;let i=n.index,s=n[1];if(null==(o=n[2])||!o.endsWith(":::")){if(s)p+=1;else if(0==(p-=1)){let o=k.slice(0,i);m=o.trim();let s=e.slice(0,f+i+n[0].length),a=[];if(m)if("block"===l)for((a=r.blockTokens(o)).forEach(e=>{e.text&&(!e.tokens||0===e.tokens.length)&&(e.tokens=r.inlineTokens(e.text))});a.length>0;){let e=a[a.length-1];if("paragraph"!==e.type||e.text&&""!==e.text.trim())break;a.pop()}else a=r.inlineTokens(m);return{type:t,raw:s,attributes:d,content:m,tokens:a}}}}}},renderMarkdown:(e,t)=>{let n=o((e=>{if(!a)return e;let t={};return a.forEach(n=>{n in e&&(t[n]=e[n])}),t})(e.attrs||{})),r=n?` {${n}}`:"",i=t.renderChildren(e.content||[],"\n\n");return`:::${c}${r} 73 74${i} 75 76:::`}}}function nf(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;null!==r;){let[,i,o,s]=r;t[i]=o||s,r=n.exec(e)}return t}function nm(e){return Object.entries(e).filter(e=>{let[,t]=e;return null!=t}).map(e=>{let[t,n]=e;return`${t}="${n}"`}).join(" ")}function ng(e){let{nodeName:t,name:n,getContent:r,parseAttributes:i=nf,serializeAttributes:o=nm,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:a}=e,c=n||t,h=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(e,n)=>{let i={...s,...e.attributes};if(l)return n.createNode(t,i);let o=r?r(e):e.content||"";return o?n.createNode(t,i,[n.createTextNode(o)]):n.createNode(t,i,[])},markdownTokenizer:{name:t,level:"inline",start(e){let t=l?RegExp(`\\[${h}\\s*[^\\]]*\\]`):RegExp(`\\[${h}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${h}\\]`),n=e.match(t),r=null==n?void 0:n.index;return void 0!==r?r:-1},tokenize(e,n,r){let o=l?RegExp(`^\\[${h}\\s*([^\\]]*)\\]`):RegExp(`^\\[${h}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${h}\\]`),s=e.match(o);if(!s)return;let a="",c="";if(l){let[,e]=s;c=e}else{let[,e,t]=s;c=e,a=t||""}let u=i(c.trim());return{type:t,raw:s[0],content:a.trim(),attributes:u}}},renderMarkdown:e=>{let t="";r?t=r(e):e.content&&e.content.length>0&&(t=e.content.filter(e=>"text"===e.type).map(e=>e.text).join(""));let n=o((e=>{if(!a)return e;let t={};return a.forEach(n=>{let r="string"==typeof n?n:n.name,i="string"==typeof n?void 0:n.skipIfDefault;if(r in e){let n=e[r];if(void 0!==i&&n===i)return;t[r]=n}}),t})(e.attrs||{})),i=n?` ${n}`:"";return l?`[${c}${i}]`:`[${c}${i}]${t}[/${c}]`}}}function nk(e,t,n){var r,i,o,s;let l=e.split("\n"),a=[],c="",h=0,u=t.baseIndentSize||2;for(;h<l.length;){let e,d=l[h],p=d.match(t.itemPattern);if(!p)if(a.length>0)break;else{if(""!==d.trim())return;h+=1,c=`${c}${d} 77`;continue}let f=t.extractItemData(p),{indentLevel:m,mainContent:g}=f;c=`${c}${d} 78`;let k=[g];for(h+=1;h<l.length;){let e=l[h];if(""===e.trim()){let t=l.slice(h+1).findIndex(e=>""!==e.trim());if(-1===t)break;
78if(((null==(i=null==(r=l[h+1+t].match(/^(\s*)/))?void 0:r[1])?void 0:i.length)||0)>m){k.push(e),c=`${c}${e} 79`,h+=1;continue}break}if(((null==(s=null==(o=e.match(/^(\s*)/))?void 0:o[1])?void 0:s.length)||0)>m)k.push(e),c=`${c}${e} 80`,h+=1;else break}let y=k.slice(1);if(y.length>0){let r=y.map(e=>e.slice(m+u)).join("\n");r.trim()&&(e=t.customNestedParser?t.customNestedParser(r):n.blockTokens(r))}let b=t.createToken(f,e);a.push(b)}if(0!==a.length)return{items:a,raw:c}}function ny(e,t,n,r){if(!e||!Array.isArray(e.content))return"";let i="function"==typeof n?n(r):n,[o,...s]=e.content,l=t.renderChildren([o]),a=`${i}${l}`;return s&&s.length>0&&s.forEach((e,n)=>{var r,i;let o=null!=(i=null==(r=t.renderChild)?void 0:r.call(t,e,n+1))?i:t.renderChildren([e]);if(null!=o){let n=o.split("\n").map(e=>e?t.indent(e):t.indent("")).join("\n");a+="paragraph"===e.type?` 81 82${n}`:` 83${n}`}}),a}function nb(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{state:r}=t,{doc:i,tr:o}=r;i.descendants((t,r)=>{let i=o.mapping.map(r),s=o.mapping.map(r)+t.nodeSize,l=null;if(t.marks.forEach(t=>{if(t!==e)return!1;l=t}),!l)return;let a=!1;if(Object.keys(n).forEach(e=>{n[e]!==l.attrs[e]&&(a=!0)}),a){let t=e.type.create({...e.attrs,...n});o.removeMark(i,s,e.type),o.addMark(i,s,t)}}),o.docChanged&&t.view.dispatch(o)}R({},{createAtomBlockMarkdownSpec:()=>nd,createBlockMarkdownSpec:()=>np,createInlineMarkdownSpec:()=>ng,parseAttributes:()=>nh,parseIndentedBlocks:()=>nk,renderNestedMarkdownContent:()=>ny,serializeAttributes:()=>nu});var nv=class{get dom(){return this.editor.view.dom}get contentDOM(){return null}updateAttributes(e,t){nb(t||this.mark,this.editor,e)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&(eu()||eh())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable))&&(this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)))}constructor(e,t,n){this.component=e,this.editor=t.editor,this.options={...n},this.mark=t.mark,this.HTMLAttributes=t.HTMLAttributes}},nx=class e extends tJ{static create(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e("function"==typeof t?t():t)}configure(e){return super.configure(e)}extend(e){let t="function"==typeof e?e():e;return super.extend(t)}constructor(){super(...arguments),this.type="node"}},nw=class{mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,i,o,s,l;let{view:a}=this.editor,c=e.target,h=3===c.nodeType?null==(t=c.parentElement)?void 0:t.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(null==(n=this.contentDOM)?void 0:n.contains(c))||!h)return;let u=0,d=0;if(this.dom!==h){let t=this.dom.getBoundingClientRect(),n=h.getBoundingClientRect(),l=null!=(i=e.offsetX)?i:null==(r=e.nativeEvent)?void 0:r.offsetX,a=null!=(s=e.offsetY)?s:null==(o=e.nativeEvent)?void 0:o.offsetY;u=n.x-t.x+l,d=n.y-t.y+a}let p=this.dom.cloneNode(!0);try{let e=this.dom.getBoundingClientRect();p.style.width=`${Math.round(e.width)}px`,p.style.height=`${Math.round(e.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let f=null;try{(f=document.createElement("div")).style.position="absolute",f.style.top="-9999px",f.style.left="-9999px",f.style.pointerEvents="none",f.appendChild(p),document.body.appendChild(f),null==(l=e.dataTransfer)||l.setDragImage(p,u,d)}finally{f&&setTimeout(()=>{try{null==f||f.remove()}catch{}},0)}let m=this.getPos();if("number"!=typeof m)return;let g=v.NodeSelection.create(a.state.doc,m),k=a.state.tr.setSelection(g);a.dispatch(k)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!(null==(t=this.contentDOM)?void 0:t.contains(n))))return!1;let r=e.type.startsWith("drag"),i="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!r)return!0;let{isEditable:o}=this.editor,{isDragging:s}=this,l=!!this.node.type.spec.draggable,a=v.NodeSelection.isSelectable(this.node),c="copy"===e.type,h="paste"===e.type,u="cut"===e.type,d="mousedown"===e.type;if(!l&&a&&r&&e.target===this.dom&&e.preventDefault(),l&&r&&!s&&e.target===this.dom)return e.preventDefault(),!1;if(l&&o&&!s&&d){let e=n.closest("[data-drag-handle]");e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!s&&!i&&!c&&!h&&!u&&(!d||!a)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!!this.node.isLeaf||!!this.node.isAtom||!("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&(eu()||eh())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes
83)].every(e=>e.isContentEditable))&&(this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)))}updateAttributes(e){this.editor.commands.command(t=>{let{tr:n}=t,r=this.getPos();return"number"==typeof r&&(n.setNodeMarkup(r,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if("number"!=typeof e)return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}};function nC(e){return new tG({find:e.find,handler:t=>{let{state:n,range:r,match:i,pasteEvent:o}=t,s=e1(e.getAttributes,void 0,i,o);if(!1===s||null===s)return null;let{tr:l}=n,a=i[i.length-1],c=i[0],h=r.to;if(a){let t=c.search(/\S/),i=r.from+c.indexOf(a),o=i+a.length;if(ts(r.from,r.to,n.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>i).length)return null;o<r.to&&l.delete(o,r.to),i>r.from&&l.delete(r.from+t,i),h=r.from+t+a.length,l.addMark(r.from+t,h,e.type.create(s||{})),l.removeStoredMark(e.type)}}})}e.s(["Editor",0,ni,"Extension",0,t0,"Mark",0,tZ,"MarkView",0,nv,"Node",0,nx,"NodeView",0,nw,"callOrReturn",0,e1,"canInsertNode",0,nc,"combineTransactionSteps",0,eK,"createInlineMarkdownSpec",0,ng,"escapeForRegEx",0,function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},"extensions",0,tY,"findChildrenInRange",0,eJ,"findParentNodeClosestToPos",0,eZ,"getAttributes",0,ti,"getChangedRanges",0,to,"getExtensionField",0,eQ,"getHTMLFromFragment",0,eY,"getMarksBetween",0,ts,"getNodeAtPosition",0,tl,"getNodeType",0,K,"getRenderedAttributes",0,e6,"isAtEndOfNode",0,td,"isAtStartOfNode",0,tp,"isNodeActive",0,eT,"isNodeEmpty",0,tg,"isNodeSelection",0,tk,"markInputRule",0,no,"markPasteRule",0,nC,"mergeAttributes",0,e4,"nodeInputRule",0,ns,"parseIndentedBlocks",0,nk,"renderNestedMarkdownContent",0,ny,"textblockTypeInputRule",0,nl,"wrappingInputRule",0,na],755453);let{getOwnPropertyNames:nS,getOwnPropertySymbols:nA}=Object,{hasOwnProperty:nM}=Object.prototype;function nE(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function n_(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);let{cache:i}=r,o=i.get(t),s=i.get(n);if(o&&s)return o===n&&s===t;i.set(t,n),i.set(n,t);let l=e(t,n,r);return i.delete(t),i.delete(n),l}}function nT(e){return nS(e).concat(nA(e))}let nD=Object.hasOwn||((e,t)=>nM.call(e,t));function nO(e,t){return e===t||!e&&!t&&e!=e&&t!=t}let{getOwnPropertyDescriptor:nN,keys:nI}=Object;function nL(e,t){return e.byteLength===t.byteLength&&nU(new Uint8Array(e),new Uint8Array(t))}function nF(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function nR(e,t){return e.byteLength===t.byteLength&&nU(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function nz(e,t){return nO(e.getTime(),t.getTime())}function nP(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function nB(e,t){return e===t}function n$(e,t,n){let r,i,o=e.size;if(o!==t.size)return!1;if(!o)return!0;let s=Array(o),l=e.entries(),a=0;for(;(r=l.next())&&!r.done;){let o=t.entries(),l=!1,c=0;for(;(i=o.next())&&!i.done;){if(s[c]){c++;continue}let o=r.value,h=i.value;if(n.equals(o[0],h[0],a,c,e,t,n)&&n.equals(o[1],h[1],o[0],h[0],e,t,n)){l=s[c]=!0;break}c++}if(!l)return!1;a++}return!0}function nj(e,t,n){let r=nI(e),i=r.length;if(nI(t).length!==i)return!1;for(;i-- >0;)if(!nJ(e,t,n,r[i]))return!1;return!0}function nq(e,t,n){let r,i,o,s=nT(e),l=s.length;if(nT(t).length!==l)return!1;for(;l-- >0;)if(!nJ(e,t,n,r=s[l])||(i=nN(e,r),o=nN(t,r),(i||o)&&(!i||!o||i.configurable!==o.configurable||i.enumerable!==o.enumerable||i.writable!==o.writable)))return!1;return!0}function nV(e,t){return nO(e.valueOf(),t.valueOf())}function nH(e,t){return e.source===t.source&&e.flags===t.flags}function nW(e,t,n){let r,i,o=e.size;if(o!==t.size)return!1;if(!o)return!0;let s=Array(o),l=e.values();for(;(r=l.next())&&!r.done;){let o=t.values(),l=!1,a=0;for(;(i=o.next())&&!i.done;){if(!s[a]&&n.equals(r.value,i.value,r.value,i.value,e,t,n)){l=s[a]=!0;break}a++}if(!l)return!1}return!0}function nU(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function nK(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function nJ(e,t,n,r){return("_owner"===r||"__o"===r||"__v"===r)&&(!!e.$$typeof||!!t.$$typeof)||nD(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}let nZ={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array
83]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},nG=Object.prototype.toString,nQ=nX();function nX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=function(e){let{areArrayBuffersEqual:t,areArraysEqual:n,areDataViewsEqual:r,areDatesEqual:i,areErrorsEqual:o,areFunctionsEqual:s,areMapsEqual:l,areNumbersEqual:a,areObjectsEqual:c,arePrimitiveWrappersEqual:h,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:f,unknownTagComparators:m}=e;return function(e,g,k){if(e===g)return!0;if(null==e||null==g)return!1;let y=typeof e;if(y!==typeof g)return!1;if("object"!==y)return"number"===y?a(e,g,k):"function"===y&&s(e,g,k);let b=e.constructor;if(b!==g.constructor)return!1;if(b===Object)return c(e,g,k);if(Array.isArray(e))return n(e,g,k);if(b===Date)return i(e,g,k);if(b===RegExp)return u(e,g,k);if(b===Map)return l(e,g,k);if(b===Set)return d(e,g,k);let v=nG.call(e);if("[object Date]"===v)return i(e,g,k);if("[object RegExp]"===v)return u(e,g,k);if("[object Map]"===v)return l(e,g,k);if("[object Set]"===v)return d(e,g,k);if("[object Object]"===v)return"function"!=typeof e.then&&"function"!=typeof g.then&&c(e,g,k);if("[object URL]"===v)return f(e,g,k);if("[object Error]"===v)return o(e,g,k);if("[object Arguments]"===v)return c(e,g,k);if(nZ[v])return p(e,g,k);if("[object ArrayBuffer]"===v)return t(e,g,k);if("[object DataView]"===v)return r(e,g,k);if("[object Boolean]"===v||"[object Number]"===v||"[object String]"===v)return h(e,g,k);if(m){let t=m[v];if(!t){let n=null!=e?e[Symbol.toStringTag]:void 0;n&&(t=m[n])}if(t)return t(e,g,k)}return!1}}(function(e){let{circular:t,createCustomConfig:n,strict:r}=e,i={areArrayBuffersEqual:nL,areArraysEqual:r?nq:nF,areDataViewsEqual:nR,areDatesEqual:nz,areErrorsEqual:nP,areFunctionsEqual:nB,areMapsEqual:r?nE(n$,nq):n$,areNumbersEqual:nO,areObjectsEqual:r?nq:nj,arePrimitiveWrappersEqual:nV,areRegExpsEqual:nH,areSetsEqual:r?nE(nW,nq):nW,areTypedArraysEqual:r?nE(nU,nq):nU,areUrlsEqual:nK,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),t){let e=n_(i.areArraysEqual),t=n_(i.areMapsEqual),n=n_(i.areObjectsEqual),r=n_(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:r})}return i}(e)),s=n?n(o):function(e,t,n,r,i,s,l){return o(e,t,l)};return function(e){let{circular:t,comparator:n,createState:r,equals:i,strict:o}=e;if(r)return function(e,s){let{cache:l=t?new WeakMap:void 0,meta:a}=r();return n(e,s,{cache:l,equals:i,meta:a,strict:o})};if(t)return function(e,t){return n(e,t,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};let s={cache:void 0,equals:i,meta:void 0,strict:o};return function(e,t){return n(e,t,s)}}({circular:t,comparator:o,createState:r,equals:s,strict:i})}nX({strict:!0}),nX({circular:!0}),nX({circular:!0,strict:!0}),nX({createInternalComparator:()=>nO}),nX({strict:!0,createInternalComparator:()=>nO}),nX({circular:!0,createInternalComparator:()=>nO}),nX({circular:!0,createInternalComparator:()=>nO,strict:!0});var nY=e.i(763868),n0=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})}},n1=e=>{let{contentComponent:t}=e,n=(0,g.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getServerSnapshot);return(0,k.jsx)(k.Fragment,{children:Object.values(n)})},n2=class extends f.default.Component{componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&(null==(e=t.view.dom)?void 0:e.parentNode)){let e,n;if(t.contentComponent)return;let r=this.editorContentRef.current;r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r}),e=new Set,n={},t.contentComponent={subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>n,getServerSnapshot:()=>n,setRenderer(t,r){n={...n,[t]:m.default.createPortal(r.reactElement,r.element,t)},e.forEach(e=>e())},removeRenderer(t){let r={...n};delete r[t],n=r,e.forEach(e=>e())}},this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("div",{ref:n0(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&(0,k.jsx)(n1,{contentComponent:e.contentComponent})]})}constructor(e){var t;super(e),this.editorContentRef=f.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null==(t=e.editor)?void 0:t.contentComponent)}}},n3=(0,f.forwardRef)((e,t)=>{let n=f.default.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return f.default.createElement(n2,{key:n,innerRef:t,...e})}),n5=f.default.memo(n3),n4="u">typeof window?f.useLayoutEffect:f.useEffect,n6=class{getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>
83{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}},n9="u"<typeof window,n8=n9||!!("u">typeof window&&window.next),n7=class e{setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){return void 0===this.options.current.immediatelyRender?n9||n8?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender)?this.createEditor():null}createEditor(){var e=this;return new ni({...this.options.current,onBeforeCreate:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onBeforeCreate)?void 0:n.call(t,...i)},onBlur:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onBlur)?void 0:n.call(t,...i)},onCreate:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onCreate)?void 0:n.call(t,...i)},onDestroy:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onDestroy)?void 0:n.call(t,...i)},onFocus:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onFocus)?void 0:n.call(t,...i)},onSelectionUpdate:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onSelectionUpdate)?void 0:n.call(t,...i)},onTransaction:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onTransaction)?void 0:n.call(t,...i)},onUpdate:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onUpdate)?void 0:n.call(t,...i)},onContentError:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onContentError)?void 0:n.call(t,...i)},onDrop:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onDrop)?void 0:n.call(t,...i)},onPaste:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onPaste)?void 0:n.call(t,...i)},onDelete:function(){for(var t,n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return null==(n=(t=e.options.current).onDelete)?void 0:n.call(t,...i)}})}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>{var r;return e===(null==(r=t.extensions)?void 0:r[n])}):e[n]===t[n]))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))}
83,1)}constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}},re=(0,f.createContext)({editor:null});re.Consumer;var rt=(0,f.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});function rn(e){return!!("function"==typeof e&&e.prototype&&e.prototype.isReactComponent)}function rr(e){return!!("object"==typeof e&&e.$$typeof&&("Symbol(react.forward_ref)"===e.$$typeof.toString()||"react.forward_ref"===e.$$typeof.description))}f.default.forwardRef((e,t)=>{let{onDragStart:n}=(0,f.useContext)(rt),r=e.as||"div";return(0,k.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});var ri=class{render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,r=this.editor,i=function(){try{if(f.version)return parseInt(f.version.split(".")[0],10)>=19}catch{}return!1}(),o=function(e){if(rn(e)||rr(e))return!0;if("object"==typeof e&&e.$$typeof&&("Symbol(react.memo)"===e.$$typeof.toString()||"react.memo"===e.$$typeof.description)){let t=e.type;if(t)return rn(t)||rr(t)}return!1}(t),s={...n};s.ref&&!(i||o)&&delete s.ref,!s.ref&&(i||o)&&(s.ref=e=>{this.ref=e}),this.reactElement=(0,k.jsx)(t,{...s}),null==(e=null==r?void 0:r.contentComponent)||e.setRenderer(this.id,this)}updateProps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.destroyed||(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0;let t=this.editor;null==(e=null==t?void 0:t.contentComponent)||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}constructor(e,{editor:t,props:n={},as:r="div",className:i=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(0xffffffff*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?(0,m.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}};f.default.createContext({markViewContentRef:()=>{}});var ro=(0,f.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});function rs(e){let{editor:t,instance:n,children:r}=e,i=null!=t?t:n;if(!i)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let o=(0,f.useMemo)(()=>({editor:i}),[i]),s=(0,f.useMemo)(()=>({editor:i}),[i]);return(0,k.jsx)(re.Provider,{value:s,children:(0,k.jsx)(ro.Provider,{value:o,children:r})})}function rl(e){let{...t}=e,{editor:n}=(0,f.useContext)(ro);return(0,k.jsx)(n5,{editor:n,...t})}ro.displayName="TiptapContext",rs.displayName="Tiptap",rl.displayName="Tiptap.Content",Object.assign(rs,{Content:rl}),e.s(["EditorContent",0,n5,"ReactRenderer",0,ri,"useEditor",0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,f.useRef)(e);n.current=e;let[r]=(0,f.useState)(()=>new n7(n)),i=(0,g.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,f.useDebugValue)(i),(0,f.useEffect)(r.onRender(t)),!function(e){var t;let[n]=(0,f.useState)(()=>new n6(e.editor)),r=(0,nY.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:nQ);n4(()=>n.watch(e.editor),[e.editor,n]),(0,f.useDebugValue)(r)}({editor:i,selector:t=>{let{transactionNumber:n}=t;return!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===n?0:n+1}}),i}],361183);var ra=(e,t)=>{if("slot"===e)return 0;if(e instanceof Function)return e(t);let{children:n,...r}=null!=t?t:{};if("svg"===e)throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]},rc=/^\s*>\s$/,rh=nx.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML(e){let{HTMLAttributes:t}=e;return ra("blockquote",{...e4(this.options.HTMLAttributes,t),children:ra("slot",{})})},parseMarkdown:(e,t)=>{var n;let r=null!=(n=t.parseBlockChildren)?n:t.parseChildren;return t.createNode("blockquote",void 0,r(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let n=[];return e.content.forEach((e,r)=>{var i,o;let s=(null!=(o=null==(i=t.renderChild)?void 0:i.call(t,e,r))?o:t.renderChildren([e])).split("\n").map(e=>""===e.trim()?">":`> ${e}`);n.push(s.join("\n"))}),n.join(` 84> 85`)},addCommands(){return{setBlockquote:()=>e=>{let{commands:t}=e;return t.wrapIn(this.name)},toggleBlockquote:()=>e=>{let{commands:t}=e;return t.toggleWrap(this.name)},unsetBlockquote:()=>e=>{let{commands:t}=e;return t.lift(this.name)}}}
85,addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[na({find:rc,type:this.type})]}}),ru=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,rd=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,rp=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,rf=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,rm=tZ.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML(e){let{HTMLAttributes:t}=e;return ra("strong",{...e4(this.options.HTMLAttributes,t),children:ra("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>e=>{let{commands:t}=e;return t.setMark(this.name)},toggleBold:()=>e=>{let{commands:t}=e;return t.toggleMark(this.name)},unsetBold:()=>e=>{let{commands:t}=e;return t.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[no({find:ru,type:this.type}
85),no({find:rp,type:this.type})]},addPasteRules(){return[nC({find:rd,type:this.type}),nC({find:rf,type:this.type})]}}),rg=/(^|[^`])`([^`]+)`(?!`)$/,rk=/(^|[^`])`([^`]+)`(?!`)/g,ry=tZ.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML(e){let{HTMLAttributes:t}=e;return["code",e4(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>e=>{let{commands:t}=e;return t.setMark(this.name)},toggleCode:()=>e=>{let{commands:t}=e;return t.toggleMark(this.name)},unsetCode:()=>e=>{let{commands:t}=e;return t.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[no({find:rg,type:this.type})]},addPasteRules(){return[nC({find:rk,type:this.type})]}}),rb=/^```([a-z]+)?[\s\n]$/,rv=/^~~~([a-z]+)?[\s\n]$/,rx=nx.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let r=[...(null==(t=e.firstElementChild)?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["pre",e4(this.options.HTMLAttributes,n),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,r;return(null==(n=e.raw)?void 0:n.startsWith("```"))===!1&&(null==(r=e.raw)?void 0:r.startsWith("~~~"))===!1&&"indented"!==e.codeBlockStyle?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.language)||"";return e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join("\n"):`\`\`\`${r} 86 87\`\`\``},addCommands(){return{setCodeBlock:e=>t=>{let{commands:n}=t;return n.setNode(this.name,e)},toggleCodeBlock:e=>t=>{let{commands:n}=t;return n.toggleNode(this.name,"paragraph",e)}}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Tab:e=>{var t;let{editor:n}=e;if(!this.options.enableTabIndentation)return!1;let r=null!=(t=this.options.tabSize)?t:4,{state:i}=n,{selection:o}=i,{$from:s,empty:l}=o;if(s.parent.type!==this.type)return!1;let a=" ".repeat(r);return l?n.commands.insertContent(a):n.commands.command(e=>{let{tr:t}=e,{from:n,to:r}=o,s=i.doc.textBetween(n,r,"\n","\n").split("\n").map(e=>a+e).join("\n");return t.replaceWith(n,r,i.schema.text(s)),!0})},"Shift-Tab":e=>{var t;let{editor:n}=e;if(!this.options.enableTabIndentation)return!1;let r=null!=(t=this.options.tabSize)?t:4,{state:i}=n,{selection:o}=i,{$from:s,empty:l}=o;return s.parent.type===this.type&&(l?n.commands.command(e=>{var t;let{tr:n}=e,{pos:o}=s,l=s.start(),a=s.end(),c=i.doc.textBetween(l,a,"\n","\n").split("\n"),h=0,u=0,d=o-l;for(let e=0;e<c.length;e+=1){if(u+c[e].length>=d){h=e;break}u+=c[e].length+1}let p=Math.min(((null==(t=c[h].match(/^ */))?void 0:t[0])||"").length,r);if(0===p)return!0;let f=l;for(let e=0;e<h;e+=1)f+=c[e].length+1;return n.delete(f,f+p),o-f<=p&&n.setSelection(v.TextSelection.create(n.doc,f)),!0}):n.commands.command(e=>{let{tr:t}=e,{from:n,to:s}=o,l=i.doc.textBetween(n,s,"\n","\n").split("\n").map(e=>{var t;let n=Math.min(((null==(t=e.match(/^ */))?void 0:t[0])||"").length,r);return e.slice(n)}).join("\n");return t.replaceWith(n,s,i.schema.text(l)),!0}))},Enter:e=>{let{editor:t}=e;if(!this.options.exitOnTripleEnter)return!1;let{state:n}=t,{selection:r}=n,{$from:i,empty:o}=r;if(!o||i.parent.type!==this.type)return!1;let s=i.parentOffset===i.parent.nodeSize-2,l=i.parent.textContent.endsWith("\n\n");return!!s&&!!l&&t.chain().command(e=>{let{tr:t}=e;return t.delete(i.pos-2,i.pos),!0}).exitCode().run()},ArrowDown:e=>{let{editor:t}=e;if(!this.options.exitOnArrowDown)return!1;let{state:n}=t,{selection:r,doc:i}=n,{$from:o,empty:s}=r;if(!s||o.parent.type!==this.type||o.parentOffset!==o.parent.nodeSize-2)return!1;let l=o.after();return void 0!==l&&(i.nodeAt(l)?t.commands.command(e=>{let{tr:t}=e;return t.setSelection(v.Selection.near(i.resolve(l))),!0}):t.commands.exitCode())}}}
87,addInputRules(){return[nl({find:rb,type:this.type,getAttributes:e=>({language:e[1]})}),nl({find:rv,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new v.Plugin({key:new v.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;let{tr:s,schema:l}=e.state,a=l.text(n.replace(/\r\n?/g,"\n"));return s.replaceSelectionWith(this.type.create({language:o},a)),s.selection.$from.parent.type!==this.type&&s.setSelection(v.TextSelection.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),rw=nx.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n\n"):""}),rC=nx.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML(e){let{HTMLAttributes:t}=e;return["br",e4(this.options.HTMLAttributes,t)]},renderText:()=>"\n",renderMarkdown:()=>` 88`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>e=>{let{commands:t,chain:n,state:r,editor:i}=e;return t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:e,storedMarks:t}=r;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:s}=i.extensionManager,l=t||e.$to.parentOffset&&e.$from.marks();return n().insertContent({type:this.name}).command(e=>{let{tr:t,dispatch:n}=e;if(n&&l&&o){let e=l.filter(e=>s.includes(e.type.name));t.ensureMarks(e)}return!0}).run()})])}}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),rS=nx.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML(e){let{node:t,HTMLAttributes:n}=e,r=this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0];return[`h${r}`,e4(this.options.HTMLAttributes,n),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.level)?parseInt(e.attrs.level,10):1,i="#".repeat(r);return e.content?`${i} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>t=>{let{commands:n}=t;return!!this.options.levels.includes(e.level)&&n.setNode(this.name,e)},toggleHeading:e=>t=>{let{commands:n}=t;return!!this.options.levels.includes(e.level)&&n.toggleNode(this.name,"paragraph",e)}}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,...{[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}}),{})},addInputRules(){return this.options.levels.map(e=>nl({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}}
88)\\s$`),type:this.type,getAttributes:{level:e}}))}}),rA=nx.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML(e){let{HTMLAttributes:t}=e;return["hr",e4(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>e=>{let{chain:t,state:n}=e;if(!nc(n,n.schema.nodes[this.name]))return!1;let{selection:r}=n,{$to:i}=r,o=t();return tk(r)?o.insertContentAt(i.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(e=>{let{state:t,tr:n,dispatch:r}=e;if(r){let{$to:e}=n.selection,r=e.end();if(e.nodeAfter)e.nodeAfter.isTextblock?n.setSelection(v.TextSelection.create(n.doc,e.pos+1)):e.nodeAfter.isBlock?n.setSelection(v.NodeSelection.create(n.doc,e.pos)):n.setSelection(v.TextSelection.create(n.doc,e.pos));else{let i=t.schema.nodes[this.options.nextNodeType]||e.parent.type.contentMatch.defaultType,o=null==i?void 0:i.create();o&&(n.insert(r,o),n.setSelection(v.TextSelection.create(n.doc,r+1)))}n.scrollIntoView()}return!0}).run()}}},addInputRules(){return[ns({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
88ype})]}}),rM=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,rE=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,r_=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,rT=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,rD=tZ.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML(e){let{HTMLAttributes:t}=e;return["em",e4(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>e=>{let{commands:t}=e;return t.setMark(this.name)},toggleItalic:()=>e=>{let{commands:t}=e;return t.toggleMark(this.name)},unsetItalic:()=>e=>{let{commands:t}=e;return t.unsetMark(this.name)}}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}}
88,addInputRules(){return[no({find:rM,type:this.type}),no({find:r_,type:this.type})]},addPasteRules(){return[nC({find:rE,type:this.type}),nC({find:rT,type:this.type})]}});let rO="numeric",rN="ascii",rI="alpha",rL="asciinumeric",rF="alphanumeric",rR="domain",rz="emoji",rP="whitespace";function rB(e,t,n){for(let r in t[rO]&&(t[rL]=!0,t[rF]=!0),t[rN]&&(t[rL]=!0,t[rI]=!0),t[rL]&&(t[rF]=!0),t[rI]&&(t[rF]=!0),t[rF]&&(t[rR]=!0),t[rz]&&(t[rR]=!0),t){let t=(r in n||(n[r]=[]),n[r]);0>t.indexOf(e)&&t.push(e)}}function r$(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.j={},this.jr=[],this.jd=null,this.t=e}r$.groups={},r$.prototype={accepts(){return!!this.t},go(e){let t=this.j[e];if(t)return t;for(let t=0;t<this.jr.length;t++){let n=this.jr[t][0],r=this.jr[t][1];if(r&&n.test(e))return r}return this.jd},has(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||r$.groups,t&&t.j?i=t:(i=new r$(t),n&&r&&rB(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,o=e.length;if(!o)return i;for(let t=0;t<o-1;t++)i=i.tt(e[t]);return i.tt(e[o-1],t,n,r)},tt(e,t,n,r){if(r=r||r$.groups,t&&t.j)return this.j[e]=t,t;let i,o=this.go(e);return o?(Object.assign((i=new r$).j,o.j),i.jr.push.apply(i.jr,o.jr),i.jd=o.jd,i.t=o.t):i=new r$,t&&(r&&(i.t&&"string"==typeof i.t?rB(t,Object.assign(function(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(i.t,r),n),r):n&&rB(t,n,r)),i.t=t),this.j[e]=i,i}};let rj=(e,t,n,r,i)=>e.ta(t,n,r,i),rq=(e,t,n,r,i)=>e.tr(t,n,r,i),rV=(e,t,n,r,i)=>e.ts(t,n,r,i),rH=(e,t,n,r,i)=>e.tt(t,n,r,i),rW="WORD",rU="UWORD",rK="ASCIINUMERICAL",rJ="ALPHANUMERICAL",rZ="LOCALHOST",rG="UTLD",rQ="SCHEME",rX="SLASH_SCHEME",rY="OPENBRACE",r0="CLOSEBRACE",r1="OPENBRACKET",r2="CLOSEBRACKET",r3="OPENPAREN",r5="CLOSEPAREN",r4="OPENANGLEBRACKET",r6="CLOSEANGLEBRACKET",r9="FULLWIDTHLEFTPAREN",r8="FULLWIDTHRIGHTPAREN",r7="LEFTCORNERBRACKET",ie="RIGHTCORNERBRACKET",it="LEFTWHITECORNERBRACKET",ir="RIGHTWHITECORNERBRACKET",ii="FULLWIDTHLESSTHAN",io="FULLWIDTHGREATERTHAN",is="AMPERSAND",il="APOSTROPHE",ia="ASTERISK",ic="BACKSLASH",ih="BACKTICK",iu="CARET",id="COLON",ip="COMMA",im="DOLLAR",ig="EQUALS",ik="EXCLAMATION",iy="HYPHEN",ib="PERCENT",iv="PIPE",ix="PLUS",iw="POUND",iC="QUERY",iS="QUOTE",iA="FULLWIDTHMIDDLEDOT",iM="SEMI",iE="SLASH",i_="TILDE",iT="UNDERSCORE",iD="EMOJI";var iO=Object.freeze({__proto__:null,ALPHANUMERICAL:rJ,AMPERSAND:is,APOSTROPHE:il,ASCIINUMERICAL:rK,ASTERISK:ia,AT:"AT",BACKSLASH:ic,BACKTICK:ih,CARET:iu,CLOSEANGLEBRACKET:r6,CLOSEBRACE:r0,CLOSEBRACKET:r2,CLOSEPAREN:r5,COLON:id,COMMA:ip,DOLLAR:im,DOT:"DOT",EMOJI:iD,EQUALS:ig,EXCLAMATION:ik,FULLWIDTHGREATERTHAN:io,FULLWIDTHLEFTPAREN:r9,FULLWIDTHLESSTHAN:ii,FULLWIDTHMIDDLEDOT:iA,FULLWIDTHRIGHTPAREN:r8,HYPHEN:iy,LEFTCORNERBRACKET:r7,LEFTWHITECORNERBRACKET:it,LOCALHOST:rZ,NL:"NL",NUM:"NUM",OPENANGLEBRACKET:r4,OPENBRACE:rY,OPENBRACKET:r1,OPENPAREN:r3,PERCENT:ib,PIPE:iv,PLUS:ix,POUND:iw,QUERY:iC,QUOTE:iS,RIGHTCORNERBRACKET:ie,RIGHTWHITECORNERBRACKET:ir,SCHEME:rQ,SEMI:iM,SLASH:iE,SLASH_SCHEME:rX,SYM:"SYM",TILDE:i_,TLD:"TLD",UNDERSCORE:iT,UTLD:rG,UWORD:rU,WORD:rW,WS:"WS"});let iN=/[a-z]/,iI=/\p{L}/u,iL=/\p{Emoji}/u,iF=/\d/,iR=/\s/,iz=null,iP=null;function iB(e,t){let n=function(e){let t=[],n=e.length,r=0;for(;r<n;){let i,o=e.charCodeAt(r),s=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],o=0,s=0;for(;s<r;){let l=e,a=null,c=0,h=null,u=-1,d=-1;for(;s<r&&(a=l.go(n[s]));)(l=a).accepts()?(u=0,d=0,h=l):u>=0&&(u+=n[s].length,d++),c+=n[s].length,o+=n[s].length,s++;o-=u,s-=d,c-=u,i.push({t:h.t,v:t.slice(o-c,o),s:o-c,e:o})}return i}function i$(e,t,n,r,i){let o,s=t.length;for(let n=0;n<s-1;n++){let s=t[n];e.j[s]?o=e.j[s]:((o=new r$(r)).jr=i.slice(),e.j[s]=o),e=o}return(o=new r$(n)).jr=i.slice(),e.j[t[s-1]]=o,o}function ij(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;"0123456789".indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}let iq={defaultProtocol:"http",events:null,format:iH,formatHref:iH,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function iV(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object.assign({},iq);e&&(n=Object.assign(n,e instanceof iV?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function iH(e){return e}function iW(e,t){this.t="token",this.v=e,this.tk=t}
88function iU(e,t){class n extends iW{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}iV.prototype={o:iq,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:iq[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n))),i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},iW.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"â¦":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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iq.defaultProtocol;return{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){let t=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",t,this),r=e.get("tagName",t,this),i=this.toFormattedString(e),o={},s=e.get("className",t,this),l=e.get("target",t,this),a=e.get("rel",t,this),c=e.getObj("attributes",t,this),h=e.getObj("events",t,this);return o.href=n,s&&(o.class=s),l&&(o.target=l),a&&(o.rel=a),c&&Object.assign(o,c),{tagName:r,attributes:o,content:i,eventListeners:h}}};let iK=iU("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),iJ=iU("text"),iZ=iU("nl"),iG=iU("url",{isLink:!0,toHref(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iq.defaultProtocol;return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==rZ&&e[1].t===id}}),iQ=e=>new r$(e);function iX(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}let iY="u">typeof console&&console&&console.warn||(()=>{}),i0={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function i1(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i0.initialized&&iY(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format. 891. Must only contain digits, lowercase ASCII letters or "-" 902. Cannot start or end with "-" 913. "-" cannot repeat`);i0.customSchemes.push([e,t])}function i2(e){return i0.initialized||function(){i0.scanner=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={};r$.groups=t;let n=new r$;null==iz&&(iz=ij("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
91ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==iP&&(iP=ij("ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мÐ
91ºÐ´2он1Ñква6онлайн5Ñг3ÑÑÑ2Ñ2ÑайÑ3Ñб3ÑкÑ3Òаз3Õ°Õ¡Õµ3×שר××5×§××3Ø§Ø¨ÙØ¸Ø¨Ù5راÙ
ÙÙ5ÙØ§Ø±Ø¯Ù4Ø¨ØØ±ÙÙ5جزائر5Ø³Ø¹ÙØ¯ÙØ©6عÙÙØ§Ù5Ù
غرب5Ù
ارات5ÛØ±Ø§Ù5بارت2زار4ÙØªÙ3ھارت5تÙÙØ³4Ø³ÙØ¯Ø§Ù3Ø±ÙØ©5Ø´Ø¨ÙØ©4عراÙ2ب2Ù
اÙ4ÙÙØ³Ø·ÙÙ6ÙØ·Ø±3ÙØ§Ø«ÙÙÙÙ6ÙÙ
3Ù
صر2ÙÙØ³Ùا5ÙØ±ÙتاÙÙØ§7ÙØ¹4ÙÙ
راÙ5پاکستاÙ7ÚØ§Ø±Øª4à¤à¥à¤®3नà¥à¤3à¤à¤¾à¤°à¤¤0मà¥3à¥à¤¤5सà¤à¤à¤ न5বাà¦à¦²à¦¾5à¦à¦¾à¦°à¦¤2ৰত4à¨à¨¾à¨°à¨¤4àªàª¾àª°àª¤4à¬à¬¾à¬°à¬¤4à®à®¨à¯à®¤à®¿à®¯à®¾6லà®à¯à®à¯6à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯11à°à°¾à°°à°¤à±5à²à²¾à²°à²¤4à´à´¾à´°à´¤à´5à¶½à¶à¶à·4à¸à¸à¸¡3à¹à¸à¸¢3ລາວ3áá2ã¿ããª3ã¢ãã¾ã³4ã¯ã©ã¦ã4ã°ã¼ã°ã«4ã³ã 2ã¹ãã¢3ã»ã¼ã«3ãã¡ãã·ã§ã³6ãã¤ã³ã4ä¸ç2ä¸ä¿¡1å½1å1æç½3äºé©¬é3ä¼ä¸2ä½å±±2ä¿¡æ¯2å¥åº·2å
«å¦2å
¬å¸1ç2å°æ¹¾1ç£2åå1åº1æ 2åé0大é
åº5å¨çº¿2大æ¿2天主æ3娱ä¹2å®¶é»2广ä¸2å¾®å2æ
å2æç±ä½ 3ææº2æè2æ¿å¡1åº2æ°å å¡2é»2æ¶å°2æ¸ç±2æºæ2淡马é¡3游æ2æ¾³é2ç¹ç2ç§»å¨2ç»ç»æºæ4ç½å1åº1ç«1ç»2èé2è°·æ2è´ç©2é販2éå¢2é»è¨çç§4é£å©æµ¦3é£å2é¤å
2馿 ¼éæ3港2ë·ë·1ì»´2ì¼ì±2íêµ2")),rH(n,"'",il),rH(n,"{",rY),rH(n,"}",r0),rH(n,"[",r1),rH(n,"]",r2),rH(n,"(",r3),rH(n,")",r5),rH(n,"<",r4),rH(n,">",r6),rH(n,"ï¼",r9),rH(n,"ï¼",r8),rH(n,"ã",r7),rH(n,"ã",ie),rH(n,"ã",it),rH(n,"ã",ir),rH(n,"ï¼",ii),rH(n,"ï¼",io),rH(n,"&",is),rH(n,"*",ia),rH(n,"@","AT"),rH(n,"`",ih),rH(n,"^",iu),rH(n,":",id),rH(n,",",ip),rH(n,"$",im),rH(n,".","DOT"),rH(n,"=",ig),rH(n,"!",ik),rH(n,"-",iy),rH(n,"%",ib),rH(n,"|",iv),rH(n,"+",ix),rH(n,"#",iw),rH(n,"?",iC),rH(n,'"',iS),rH(n,"/",iE),rH(n,";",iM),rH(n,"~",i_),rH(n,"_",iT),rH(n,"\\",ic),rH(n,"ã»",iA);let r=rq(n,iF,"NUM",{[rO]:!0});rq(r,iF,r);let i=rq(r,iN,rK,{[rL]:!0}
91),o=rq(r,iI,rJ,{[rF]:!0}),s=rq(n,iN,rW,{[rN]:!0});rq(s,iF,i),rq(s,iN,s),rq(i,iF,i),rq(i,iN,i);let l=rq(n,iI,rU,{[rI]:!0});rq(l,iN),rq(l,iF,o),rq(l,iI,l),rq(o,iF,o),rq(o,iN),rq(o,iI,o);let a=rH(n,"\n","NL",{[rP]:!0}),c=rH(n,"\r","WS",{[rP]:!0}),h=rq(n,iR,"WS",{[rP]:!0});rH(n,"",h),rH(c,"\n",a),rH(c,"",h),rq(c,iR,h),rH(h,"\r"),rH(h,"\n"),rq(h,iR,h),rH(h,"",h);let u=rq(n,iL,iD,{[rz]:!0});rH(u,"#"),rq(u,iL,u),rH(u,"ï¸",u);let d=rH(u,"â");rH(d,"#"),rq(d,iL,u);let p=[[iN,s],[iF,i]],f=[[iN,null],[iI,l],[iF,o]];for(let e=0;e<iz.length;e++)i$(n,iz[e],"TLD",rW,p);for(let e=0;e<iP.length;e++)i$(n,iP[e],rG,rU,f);rB("TLD",{tld:!0,ascii:!0},t),rB(rG,{utld:!0,alpha:!0},t),i$(n,"file",rQ,rW,p),i$(n,"mailto",rQ,rW,p),i$(n,"http",rX,rW,p),i$(n,"https",rX,rW,p),i$(n,"ftp",rX,rW,p),i$(n,"ftps",rX,rW,p),rB(rQ,{scheme:!0,ascii:!0},t),rB(rX,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?i[rR]=!0:iN.test(r)?iF.test(r)?i[rL]=!0:i[rN]=!0:i[rO]=!0,rV(n,r,r,i)}return rV(n,"localhost",rZ,{ascii:!0}),n.jd=new r$("SYM"),{start:n,tokens:Object.assign({groups:t},iO)}}(i0.customSchemes);for(let e=0;e<i0.tokenQueue.length;e++)i0.tokenQueue[e][1]({scanner:i0.scanner});i0.parser=function(e){let{groups:t}=e,n=t.domain.concat([is,ia,"AT",ic,ih,iu,im,ig,iy,"NUM",ib,iv,ix,iw,iE,"SYM",i_,iT]),r=[il,id,ip,"DOT",ik,ib,iC,iS,iM,r4,r6,rY,r0,r2,r1,r3,r5,r9,r8,r7,ie,it,ir,ii,io],i=[is,il,ia,ic,ih,iu,im,ig,iy,rY,r0,ib,iv,ix,iw,iC,iE,"SYM",i_,iT],o=iQ(),s=rH(o,i_);rj(s,i,s),rj(s,t.domain,s);let l=iQ(),a=iQ(),c=iQ();rj(o,t.domain,l),rj(o,t.scheme,a),rj(o,t.slashscheme,c),rj(l,i,s),rj(l,t.domain,l);let h=rH(l,"AT");rH(s,"AT",h),rH(a,"AT",h),rH(c,"AT",h);let u=rH(s,"DOT");rj(u,i,s),rj(u,t.domain,s);let d=iQ();rj(h,t.domain,d),rj(d,t.domain,d);let p=rH(d,"DOT");rj(p,t.domain,d);let f=iQ(iK);rj(p,t.tld,f),rj(p,t.utld,f),rH(h,rZ,f);let m=rH(d,iy);rH(m,iy,m),rj(m,t.domain,d),rj(f,t.domain,d),rH(f,"DOT",p),rH(f,iy,m),rj(rH(f,id),t.numeric,iK);let g=rH(l,iy),k=rH(l,"DOT");rH(g,iy,g),rj(g,t.domain,l),rj(k,i,s),rj(k,t.domain,l);let y=iQ(iG);rj(k,t.tld,y),rj(k,t.utld,y),rj(y,t.domain,l),rj(y,i,s),rH(y,"DOT",k),rH(y,iy,g),rH(y,"AT",h);let b=rH(y,id),v=iQ(iG);rj(b,t.numeric,v);let x=iQ(iG),w=iQ();rj(x,n,x),rj(x,r,w),rj(w,n,x),rj(w,r,w),rH(y,iE,x),rH(v,iE,x);let C=rH(a,id),S=rH(c,id),A=rH(S,iE),M=rH(A,iE);rj(a,t.domain,l),rH(a,"DOT",k),rH(a,iy,g),rj(c,t.domain,l),rH(c,"DOT",k),rH(c,iy,g),rj(C,t.domain,x),rH(C,iE,x),rH(C,iC,x),rj(M,t.domain,x),rj(M,n,x),rH(M,iE,x);let E=[[rY,r0],[r1,r2],[r3,r5],[r4,r6],[r9,r8],[r7,ie],[it,ir],[ii,io]];for(let e=0;e<E.length;e++){let[t,i]=E[e],o=rH(x,t);rH(w,t,o),rH(o,i,x);let s=iQ(iG);rj(o,n,s);let l=iQ();rj(o,r),rj(s,n,s),rj(s,r,l),rj(l,n,s),rj(l,r,l),rH(s,i,x),rH(l,i,x)}return rH(o,rZ,y),rH(o,"NL",iZ),{start:o,tokens:iO}}(i0.scanner.tokens);for(let e=0;e<i0.pluginQueue.length;e++)i0.pluginQueue[e][1]({scanner:i0.scanner,parser:i0.parser});i0.initialized=!0}(),function(e,t,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let l=e,a=null,c=null,h=0,u=null,d=-1;for(;i<r&&!(a=l.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=a||l.go(n[i].t));)a=null,(l=c).accepts()?(d=0,u=l):d>=0&&d++,i++,h++;if(d<0)(i-=h)<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(iX(iJ,t,s)),s=[]),i-=d,h-=d;let e=u.t,r=n.slice(i-h,i);o.push(iX(e,t,r))}}return s.length>0&&o.push(iX(iJ,t,s)),o}(i0.parser.start,e,iB(i0.scanner.start,e))}function i3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new iV(n),i=i2(e),o=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&o.push(n.toFormattedObject(r))}return o}i2.scan=iB;var i5="[\0-  áá â-\u2029âã]",i4=new RegExp(i5),i6=RegExp(`${i5}$`),i9=RegExp(i5,"g");function i8(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(e=>{let t="string"==typeof e?e:e.scheme;t&&n.push(t)}),!e||e.replace(i9,"").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var i7=tZ.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `val
91idate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{"string"==typeof e?i1(e):i1(e.scheme,e.optionalSlashes)})},onDestroy(){r$.groups={},i0.scanner=null,i0.parser=null,i0.tokenQueue=[],i0.pluginQueue=[],i0.customSchemes=[],i0.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!i8(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!t&&!!this.options.isAllowedUri(t,{defaultValidate:e=>!!i8(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML(e){let{HTMLAttributes:t}=e;return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!i8(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",e4(this.options.HTMLAttributes,t),0]:["a",e4(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,o;let s=null!=(r=null==(n=e.attrs)?void 0:n.href)?r:"",l=null!=(o=null==(i=e.attrs)?void 0:i.title)?o:"",a=t.renderChildren(e);return l?`[${a}](${s} "${l}")`:`[${a}](${s})`},addCommands(){return{setLink:e=>t=>{let{chain:n}=t,{href:r}=e;return!!this.options.isAllowedUri(r,{defaultValidate:e=>!!i8(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&n().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:e=>t=>{let{chain:n}=t,{href:r}=e||{};return(!r||!!this.options.isAllowedUri(r,{defaultValidate:e=>!!i8(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&n().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>e=>{let{chain:t}=e;return t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}},addPasteRules(){return[nC({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,i=i3(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!i8(e,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t}
91,type:this.type,getAttributes:e=>{var t;return{href:null==(t=e.data)?void 0:t.href}}})]},addProseMirrorPlugins(){var e,t,n;let r=[],{protocols:i,defaultProtocol:o}=this.options;return this.options.autolink&&r.push((e={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!i8(e,i),protocols:i,defaultProtocol:o}),shouldAutoLink:this.options.shouldAutoLink},new v.Plugin({key:new v.PluginKey("autolink"),appendTransaction:(t,n,r)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),o=t.some(e=>e.getMeta("preventAutolink"));if(!i||o)return;let{tr:s}=r;if(to(eK(n.doc,[...t])).forEach(t=>{let n,i,{newRange:o}=t,l=eJ(r.doc,o,e=>e.isTextblock);if(l.length>1)n=l[0],i=r.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ");else if(l.length){let e=r.doc.textBetween(o.from,o.to," "," ");if(!i6.test(e))return;n=l[0],i=r.doc.textBetween(n.pos,o.to,void 0," ")}if(n&&i){let t=i.split(i4).filter(Boolean);if(t.length<=0)return!1;let o=t[t.length-1],l=n.pos+i.lastIndexOf(o);if(!o)return!1;let a=i2(o).map(t=>t.toObject(e.defaultProtocol));if(!(1===a.length?a[0].isLink:3===a.length&&!!a[1].isLink&&["()","[]"].includes(a[0].value+a[2].value)))return!1;a.filter(e=>e.isLink).map(e=>({...e,from:l+e.start+1,to:l+e.end+1})).filter(e=>!r.schema.marks.code||!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{ts(t.from,t.to,r.doc).some(t=>t.mark.type===e.type)||s.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),s.steps.length)return s}}))),r.push((t={type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection},new v.Plugin({key:new v.PluginKey("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,o;if(0!==r.button||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{let e=r.target;if(!e)return!1;let n=t.editor.view.dom;(s=e.closest("a"))&&!n.contains(s)&&(s=null)}if(!s)return!1;let l=!1;if(t.enableClickSelection&&(l=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){let n=ti(e.state,t.type.name),r=null!=(i=s.href)?i:n.href,a=null!=(o=s.target)?o:n.target;r&&(window.open(r,a),l=!0)}return l}}}))),this.options.linkOnPaste&&r.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink},new v.Plugin({key:new v.PluginKey("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{shouldAutoLink:i}=n,{state:o}=e,{selection:s}=o,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(e=>{a+=e.textContent});let c=i3(a,{defaultProtocol:n.defaultProtocol}).find(e=>e.isLink&&e.value===a);return!!a&&!!c&&(void 0===i||!!i(c.value))&&n.editor.commands.setMark(n.type,{href:c.href})}}}))),r}});e.s(["Link",0,i7],952660);var oe=Object.defineProperty,ot="textStyle",on=/^\s*([-+*])\s$/,or=nx.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML(e){let{HTMLAttributes:t}=e;return["ul",e4(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>"list"!==e.type||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>e=>{let{commands:t,chain:n}=e;return this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(ot)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}}
91,addInputRules(){let e=na({find:on,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=na({find:on,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(ot),editor:this.editor})),[e]}}),oi=nx.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML(e){let{HTMLAttributes:t}=e;return["li",e4(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n;if("list_item"!==e.type)return[];let r=null!=(n=t.parseBlockChildren)?n:t.parseChildren,i=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(e=>"paragraph"===e.type))i=r(e.tokens);else{let n=e.tokens[0];if(n&&"text"===n.type&&n.tokens&&n.tokens.length>0){if(i=[{type:"paragraph",content:t.parseInline(n.tokens)}],e.tokens.length>1){let t=r(e.tokens.slice(1));i.push(...t)}}else i=r(e.tokens)}return 0===i.length&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(e,t,n)=>ny(e,t,e=>{var t,n;if("bulletList"===e.parentType)return"- ";if("orderedList"===e.parentType){let r=(null==(n=null==(t=e.meta)?void 0:t.parentAttrs)?void 0:n.start)||1;return`${r+e.index}. `}return"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),oo={},ol={findListItemPos:()=>oc,getNextListDepth:()=>oh,handleBackspace:()=>of,handleDelete:()=>ok,hasListBefore:()=>ou,hasListItemAfter:()=>oy,hasListItemBefore:()=>od,listItemHasSubList:()=>
91op,nextListIsDeeper:()=>om,nextListIsHigher:()=>og};for(var oa in ol)oe(oo,oa,{get:ol[oa],enumerable:!0});var oc=(e,t)=>{let{$from:n}=t.selection,r=K(e,t.schema),i=n.depth,o=n.pos,s=null;for(;i>0&&null===s;)n.node(i).type===r?s=i:(i-=1,o-=1);return null===s?null:{$pos:t.doc.resolve(o),depth:s}},oh=(e,t)=>{let n=oc(e,t);if(!n)return!1;let[,r]=tl(t,e,n.$pos.pos+4);return r},ou=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),o=e.doc.resolve(i).node();return!!o&&!!n.includes(o.type.name)},od=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-2);return 0!==i.index()&&(null==(n=i.nodeBefore)?void 0:n.type.name)===e},op=(e,t,n)=>{if(!n)return!1;let r=K(e,t.schema),i=!1;return n.descendants(e=>{e.type===r&&(i=!0)}),i},of=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!eT(e.state,t)&&ou(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let o=i.at(-1);if(!o)return!1;let s=e.state.doc.resolve(r.start()+o.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},s.end()).joinForward().run()}if(!eT(e.state,t)||!tp(e.state))return!1;let r=oc(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=op(t,e.state,i);return od(t,e.state)&&!o?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},om=(e,t)=>{let n=oh(e,t),r=oc(e,t);return!!r&&!!n&&n>r.depth},og=(e,t)=>{let n=oh(e,t),r=oc(e,t);return!!r&&!!n&&n<r.depth},ok=(e,t)=>{if(!eT(e.state,t)||!td(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!(!n.empty&&r.sameParent(i))&&(om(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():og(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward())},oy=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-r.parentOffset-2);return i.index()!==i.parent.childCount-1&&(null==(n=i.nodeAfter)?void 0:n.type.name)===e},ob=t0.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:e=>{let{editor:t}=e,n=!1;return this.options.listTypes.forEach(e=>{let{itemName:r}=e;void 0!==t.state.schema.nodes[r]&&ok(t,r)&&(n=!0)}),n},"Mod-Delete":e=>{let{editor:t}=e,n=!1;return this.options.listTypes.forEach(e=>{let{itemName:r}=e;void 0!==t.state.schema.nodes[r]&&ok(t,r)&&(n=!0)}),n},Backspace:e=>{let{editor:t}=e,n=!1;return this.options.listTypes.forEach(e=>{let{itemName:r,wrapperNames:i}=e;void 0!==t.state.schema.nodes[r]&&of(t,r,i)&&(n=!0)}),n},"Mod-Backspace":e=>{let{editor:t}=e,n=!1;return this.options.listTypes.forEach(e=>{let{itemName:r,wrapperNames:i}=e;void 0!==t.state.schema.nodes[r]&&of(t,r,i)&&(n=!0)}),n}}}}),ov=/^(\s*)(\d+)\.\s+(.*)$/,ox=/^\s/,ow="textStyle",oC=/^(\d+)\.\s$/,oS=nx.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML(e){let{HTMLAttributes:t}=e,{start:n,...r}=t;return 1===n?["ol",e4(this.options.HTMLAttributes,r),0]:["ol",e4(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{var n;if("list"!==e.type||!e.ordered)return[];let r=e.start||1,i=e.items?(n=e.items,n.map(e=>{if("list_item"!==e.type)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if("paragraph"===e.type||"list"===e.type||"blockquote"===e.type||"code"===e.type)n.push(...t.parseChildren([e]));else if("text"===e.type&&e.tokens){let r=t.parseChildren([e]);n.push({type:"paragraph",content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}})):[];return 1!==r?{type:"orderedList",attrs:{start:r},content:i}:{type:"orderedList",content:i}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),n=null==t?void 0:t.index;return void 0!==n?n:-1}
91,tokenize:(e,t,n)=>{var r;let i=e.split("\n"),[o,s]=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],o=i.match(ov);if(!o)break;let[,s,l,a]=o,c=s.length,h=a,u=n+1,d=[i];for(;u<e.length;){let t=e[u];if(t.match(ov))break;if(""===t.trim())d.push(t),h+="\n",u+=1;else if(t.match(ox))d.push(t),h+=` 92${t.slice(c+2)}`,u+=1;else break}t.push({indent:c,number:parseInt(l,10),content:h.trim(),raw:d.join("\n")}),r=u,n=u}return[t,r]}(i);if(0===o.length)return;let l=function e(t,n,r){var i;let o=[],s=0;for(;s<t.length;){let l=t[s];if(l.indent===n){let a=l.content.split("\n"),c=(null==(i=a[0])?void 0:i.trim())||"",h=[];c&&h.push({type:"paragraph",raw:c,tokens:r.inlineTokens(c)});let u=a.slice(1).join("\n").trim();if(u){let e=r.blockTokens(u);h.push(...e)}let d=s+1,p=[];for(;d<t.length&&t[d].indent>n;)p.push(t[d]),d+=1;if(p.length>0){let t=Math.min(...p.map(e=>e.indent)),n=e(p,t,r);h.push({type:"list",ordered:!0,start:p[0].number,items:n,raw:p.map(e=>e.raw).join("\n")})}o.push({type:"list_item",raw:l.raw,tokens:h}),s=d}else s+=1}return o}(o,0,n);if(0!==l.length)return{type:"list",ordered:!0,start:(null==(r=o[0])?void 0:r.number)||1,items:l,raw:i.slice(0,s).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>e=>{let{commands:t,chain:n}=e;return this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(ow)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}}
92,addInputRules(){let e=na({find:oC,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=na({find:oC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(ow)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),oA=/^\s*(\[([( |x])?\])\s$/,oM=nx.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return""===t||"true"===t},renderHTML:e=>({"data-checked":e.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["li",e4(this.options.HTMLAttributes,n,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.checked)?"x":" ";return ny(e,t,`- [${r}] `)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return e=>{let{node:t,HTMLAttributes:n,getPos:r,editor:i}=e,o=document.createElement("li"),s=document.createElement("label"),l=document.createElement("span"),a=document.createElement("input"),c=document.createElement("div"),h=e=>{var t,n;a.ariaLabel=(null==(n=null==(t=this.options.a11y)?void 0:t.checkboxLabel)?void 0:n.call(t,e,a.checked))||`Task item checkbox for ${e.textContent||"empty task item"}`};h(t),s.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",e=>e.preventDefault()),a.addEventListener("change",e=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}let{checked:n}=e.target;i.isEditable&&"function"==typeof r&&i.chain().focus(void 0,{scrollIntoView:!1}).command(e=>{let{tr:t}=e,i=r();if("number"!=typeof i)return!1;let o=t.doc.nodeAt(i);return t.setNodeMarkup(i,void 0,{...null==o?void 0:o.attrs,checked:n}),!0}).run(),i.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(t,n)||(a.checked=!a.checked)}),Object.entries(this.options.HTMLAttributes).forEach(e=>{let[t,n]=e;o.setAttribute(t,n)}),o.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,s.append(a,l),o.append(s,c),Object.entries(n).forEach(e=>{let[t,n]=e;o.setAttribute(t,n)});let u=new Set(Object.keys(n));return{dom:o,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;o.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,h(e);let t=e6(e,i.extensionManager.attributes),n=new Set(Object.keys(t)),r=this.options.HTMLAttributes;return u.forEach(e=>{n.has(e)||(e in r?o.setAttribute(e,r[e]):o.removeAttribute(e))}),Object.entries(t).forEach(e=>{let[t,n]=e;null==n?t in r?o.setAttribute(t,r[t]):o.removeAttribute(t):o.setAttribute(t,n)}),u=n,!0}}}},addInputRules(){return[na({find:oA,type:this.type,getAttributes:e=>({checked:"x"===e[e.length-1]})})]}}),oE=nx.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML(e){let{HTMLAttributes:t}=e;return["ul",e4(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=null==(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:t.index;return void 0!==n?n:-1},tokenize(e,t,n){let r=e=>{let t=nk(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:"taskList",raw:t.raw,items:t.items}]:n.blockTokens(e)},i=nk(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>e=>{let{commands:t}=e;return t.toggleList(this.name,this.options.itemTypeName)}}}
92,addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});t0.create({name:"listKit",addExtensions(){let e=[];return!1!==this.options.bulletList&&e.push(or.configure(this.options.bulletList)),!1!==this.options.listItem&&e.push(oi.configure(this.options.listItem)),!1!==this.options.listKeymap&&e.push(ob.configure(this.options.listKeymap)),!1!==this.options.orderedList&&e.push(oS.configure(this.options.orderedList)),!1!==this.options.taskItem&&e.push(oM.configure(this.options.taskItem)),!1!==this.options.taskList&&e.push(oE.configure(this.options.taskList)),e}});var o_=" ",oT=nx.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML(e){let{HTMLAttributes:t}=e;return["p",e4(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(1===n.length&&"image"===n[0].type)return t.parseChildren([n[0]]);let r=t.parseInline(n);return 1===n.length&&"text"===n[0].type&&(n[0].raw===o_||n[0].text===o_||"Â "===n[0].raw||"Â "===n[0].text)&&1===r.length&&"text"===r[0].type&&(r[0].text===o_||"Â "===r[0].text)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{var r,i;if(!e)return"";let o=Array.isArray(e.content)?e.content:[];if(0===o.length){let e=Array.isArray(null==(r=null==n?void 0:n.previousNode)?void 0:r.content)?n.previousNode.content:[];return(null==(i=null==n?void 0:n.previousNode)?void 0:i.type)==="paragraph"&&0===e.length?o_:""}return t.renderChildren(o)},addCommands(){return{setParagraph:()=>e=>{let{commands:t}=e;return t.setNode(this.name)}}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),oD=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,oO=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,oN=tZ.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML(e){let{HTMLAttributes:t}=e;return["s",e4(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>e=>{let{commands:t}=e;return t.setMark(this.name)},toggleStrike:()=>e=>{let{commands:t}=e;return t.toggleMark(this.name)},unsetStrike:()=>e=>{let{commands:t}=e;return t.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}}
92,addInputRules(){return[no({find:oD,type:this.type})]},addPasteRules(){return[nC({find:oO,type:this.type})]}}),oI=nx.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),oL=tZ.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML(e){let{HTMLAttributes:t}=e;return["u",e4(this.options.HTMLAttributes,t),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown:(e,t)=>`++${t.renderChildren(e)}++`,markdownTokenizer:{name:"underline",level:"inline",start:e=>e.indexOf("++"),tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>e=>{let{commands:t}=e;return t.setMark(this.name)},toggleUnderline:()=>e=>{let{commands:t}=e;return t.toggleMark(this.name)},unsetUnderline:()=>e=>{let{commands:t}=e;return t.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});class oF{destroy(){this.handlers.forEach(e=>{let{name:t,handler:n}=e;return this.editorView.dom.removeEventListener(t,n)})}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i,o=this.editorView.dom,s=o.getBoundingClientRect(),l=s.width/o.offsetWidth,a=s.height/o.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),o=e?r.bottom:r.top;e&&t&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*a;i={left:r.left,right:r.right,top:o-s,bottom:o+s}}}}if(!i){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*l;i={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let c=this.editorView.dom.offsetParent;if(!this.element&&(this.element=c.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",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),c&&(c!=document.body||"static"!=getComputedStyle(c).position)){let n=c.getBoundingClientRect(),r=n.width/c.offsetWidth,i=n.height/c.offsetHeight;e=n.left-c.scrollLeft*r,t=n.top-c.scrollTop*i}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(i.left-e)/l+"px",this.element.style.top=(i.top-t)/a+"px",this.element.style.width=(i.right-i.left)/l+"px",this.element.style.height=(i.bottom-i.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,y.dropPoint)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}}var oR=v;class oz extends oR.Selection{map(e,t){let n=e.resolve(t.map(this.head));return oz.valid(n)?new oz(n):oR.Selection.near(n)}content(){return x.Slice.empty}eq(e){return e instanceof oz&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new oz(e.resolve(t.pos))}getBookmark(){return new oP(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||oB(e.type))return!0;
92if(e.inlineContent)return!1}}return!0}(e)||!function(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 e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||oB(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e:for(;;){if(!n&&oz.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){i=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(oz.valid(s))return s}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!oR.NodeSelection.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue e}break}i=o,r+=t;let s=e.doc.resolve(r);if(oz.valid(s))return s}return null}}constructor(e){super(e,e)}}oz.prototype.visible=!1,oz.findFrom=oz.findGapCursorFrom,oR.Selection.jsonID("gapcursor",oz);class oP{map(e){return new oP(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return oz.valid(t)?new oz(t):oR.Selection.near(t)}constructor(e){this.pos=e}}function oB(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}let o$=L({ArrowLeft:oj("horiz",-1),ArrowRight:oj("horiz",1),ArrowUp:oj("vert",-1),ArrowDown:oj("vert",1)});function oj(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let o=e.selection,s=t>0?o.$to:o.$from,l=o.empty;if(o instanceof oR.TextSelection){if(!i.endOfTextblock(n)||0==s.depth)return!1;l=!1,s=e.doc.resolve(t>0?s.after():s.before())}let a=oz.findGapCursorFrom(s,t,l);return!!a&&(r&&r(e.tr.setSelection(new oz(a))),!0)}}function oq(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!oz.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&oR.NodeSelection.isSelectable(e.state.doc.nodeAt(i.inside)))&&(e.dispatch(e.state.tr.setSelection(new oz(r))),!0)}function oV(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof oz))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=x.Fragment.empty;for(let e=r.length-1;e>=0;e--)i=x.Fragment.from(r[e].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new x.Slice(i,0,0));return o.setSelection(oR.TextSelection.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function oH(e){if(!(e.selection instanceof oz))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",C.DecorationSet.create(e.doc,[C.Decoration.widget(e.selection.head,t,{key:"gapcursor"})])}var oW=function(){};oW.prototype.append=function(e){return e.length?(e=oW.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},oW.prototype.prepend=function(e){return e.length?oW.from(e).append(this):this},oW.prototype.appendInner=function(e){return new oK(this,e)},oW.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?oW.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},oW.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},oW.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},oW.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},oW.from=function(e){return e instanceof oW?e:e&&e.length?new oU(e):oW.empty};var oU=function(e){function t(t){e.call(this),this.values=t}t.__proto__=e,t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(oW);oW.empty=new oU([]);var oK=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return t.__proto__=e,t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(oW);class oJ{popEvent(e,t){let n,r,i,o;if(0==this.eventCount)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}t&&(r=(n=this.remapping(s,this.items.length)).maps.length);let l=e.tr,a=[],c=[];
92return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(s,t+1)).maps.length),r--,c.push(e);return}if(n){c.push(new oZ(e.map));let t=e.step.map(n.slice(r)),i;t&&l.maybeStep(t).doc&&(i=l.mapping.maps[l.mapping.maps.length-1],a.push(new oZ(i,void 0,void 0,a.length+c.length))),r--,i&&n.appendMap(i,r)}else l.maybeStep(e.step);if(e.selection)return i=n?e.selection.map(n.slice(r)):e.selection,o=new oJ(this.items.slice(0,s).append(c.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:o,transform:l,selection:i}}addTransform(e,t,n,r){var i,o;let s,l=[],a=this.eventCount,c=this.items,h=!r&&c.length?c.get(c.length-1):null;for(let n=0;n<e.steps.length;n++){let i=e.steps[n].invert(e.docs[n]),o=new oZ(e.mapping.maps[n],i,t),s;(s=h&&h.merge(o))&&(o=s,n?l.pop():c=c.slice(0,c.length-1)),l.push(o),t&&(a++,t=void 0),r||(h=o)}let u=a-n.depth;return u>oQ&&(i=c,o=u,i.forEach((e,t)=>{if(e.selection&&0==o--)return s=t,!1}),c=i.slice(s),a-=u),new oJ(c.append(l),a)}remapping(e,t){let n=new y.Mapping;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new oJ(this.items.append(e.map(e=>new oZ(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},r);let l=t;this.items.forEach(t=>{let r=i.getMirror(--l);if(null==r)return;o=Math.min(o,r);let a=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(l+1,r));c&&s++,n.push(new oZ(a,o,c))}else n.push(new oZ(a))},r);let a=[];for(let e=t;e<o;e++)a.push(new oZ(i.maps[e]));let c=new oJ(this.items.slice(0,r).append(a).append(n),s);return c.emptyItemCount()>500&&(c=c.compress(this.items.length-n.length)),c}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((o,s)=>{if(s>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let l=o.selection&&o.selection.map(t.slice(n));l&&i++;let a=new oZ(s.invert(),e,l),c,h=r.length-1;(c=r.length&&r[h].merge(a))?r[h]=c:r.push(a)}}else o.map&&n--},this.items.length,0),new oJ(oW.from(r.reverse()),i)}constructor(e,t){this.items=e,this.eventCount=t}}oJ.empty=new oJ(oW.empty,0);class oZ{merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new oZ(t.getMap().invert(),t,this.selection)}}constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}}class oG{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let oQ=20;function oX(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function oY(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}let o0=!1,o1=null;function o2(e){let t=e.plugins;if(o1!=t){o0=!1,o1=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){o0=!0;break}}return o0}let o3=new v.PluginKey("history"),o5=new v.PluginKey("closeHistory");function o4(e,t){return(n,r)=>{let i=o3.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(r){let o=function(e,t,n){let r=o2(t),i=o3.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),l=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),i,r),a=new oG(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(s).setMeta(o3,{redo:n,historyState:a})}(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}let o6=o4(!1,!0),o9=o4(!0,!0);o4(!1,!1),o4(!0,!1),t0.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new v.Plugin({key:new v.PluginKey("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(null==i||0===i){e=!0;return}let o=this.storage.characters({node:r.doc});if(o>i){console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let t=r.tr.deleteRange(0,o-i);return e=!0,t}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;
92if(r>n&&i>n&&i>r||!e.getMeta("paste"))return!1;let o=e.selection.$head.pos;return e.deleteRange(o-(i-n),o),!(this.storage.characters({node:e.doc})>n)}})]}});var o8=t0.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new v.Plugin({view:t=>new oF(t,e)})}(this.options)]}});t0.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new v.Plugin({key:new v.PluginKey("focus"),props:{decorations:e=>{let{doc:t,selection:n}=e,{isEditable:r,isFocused:i}=this.editor,{anchor:o}=n,s=[];if(!r||!i)return C.DecorationSet.create(t,[]);let l=0;"deepest"===this.options.mode&&t.descendants((e,t)=>{if(!e.isText){if(!(o>=t&&o<=t+e.nodeSize-1))return!1;l+=1}});let a=0;return t.descendants((e,t)=>!e.isText&&!!(o>=t&&o<=t+e.nodeSize-1)&&((a+=1,"deepest"===this.options.mode&&l-a>0||"shallowest"===this.options.mode&&a>1)?"deepest"===this.options.mode:void s.push(C.Decoration.node(t,t+e.nodeSize,{class:this.options.className})))),C.DecorationSet.create(t,s)}}})]}});var o7=t0.create({name:"gapCursor",addProseMirrorPlugins:()=>[new oR.Plugin({props:{decorations:oH,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&oz.valid(n)?new oz(n):null,handleClick:oq,handleKeyDown:o$,handleDOMEvents:{beforeinput
92:oV}}})],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=e1(eQ(e,"allowGapCursor",n)))?t:null}}}),se="placeholder";function st(e){let{types:t,node:n}=e;return n&&Array.isArray(t)&&t.includes(n.type)||(null==n?void 0:n.type)===t}t0.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:se,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${this.options.dataAttribute.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}`:`data-${se}`;return[new v.Plugin({key:new v.PluginKey("placeholder"),props:{decorations:t=>{let{doc:n,selection:r}=t,i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=r,s=[];if(!i)return null;let l=this.editor.isEmpty;return n.descendants((t,n)=>{let r=o>=n&&o<=n+t.nodeSize,i=!t.isLeaf&&tg(t);if(!t.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&i){let i=[this.options.emptyNodeClass];l&&i.push(this.options.emptyEditorClass);let o=C.Decoration.node(n,n+t.nodeSize,{class:i.join(" "),[e]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:r}):this.options.placeholder});s.push(o)}return this.options.includeChildren}),C.DecorationSet.create(n,s)}}})]}}),t0.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new v.Plugin({key:new v.PluginKey("selection"),props:{decorations:n=>n.selection.empty||e.isFocused||!e.isEditable||tk(n.selection)||e.view.dragging?null:C.DecorationSet.create(n.doc,[C.Decoration.inline(n.selection.from,n.selection.to,{class:t.className})])}})]}});var sn=t0.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new v.PluginKey(this.name),n=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(e=>{let[,t]=e;return t}).filter(e=>(this.options.notAfter||[]).concat(n).includes(e.name));return[new v.Plugin({key:t,appendTransaction:(e,r,i)=>{let{doc:o,tr:s,schema:l}=i,a=t.getState(i),c=o.content.size,h=l.nodes[n];if(!e.some(e=>e.getMeta("skipTrailingNode"))&&a)return s.insert(c,h.create())},state:{init:(e,t)=>!st({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!st({node:e.doc.lastChild,types:r})}})]}}),sr=t0.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>e=>{let{state:t,dispatch:n}=e;return o6(t,n)},redo:()=>e=>{let{state:t,dispatch:n}=e;return o9(t,n)}}),addProseMirrorPlugins(){return[function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new v.Plugin({key:o3,state:{init:()=>new oG(oJ.empty,oJ.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let i=n.getMeta(o3),o;if(i)return i.historyState;n.getMeta(o5)&&(e=new oG(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(o3))if(s.getMeta(o3).redo)return new oG(e.done.addTransform(n,void 0,r,o2(t)),e.undone,oX(n.mapping.maps),e.prevTime,e.prevComposition);else return new oG(e.done,e.undone.addTransform(n,void 0,r,o2(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))if(o=n.getMeta("rebased"))return new oG(e.done.rebased(n,o),e.undone.rebased(n,o),oY(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new oG(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),oY(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),o=0==e.prevTime||!s&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;
92return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}(n,e.prevRanges)),l=s?oY(e.prevRanges,n.mapping):oX(n.mapping.maps);return new oG(e.done.addTransform(n,o?t.selection.getBookmark():void 0,r,o2(t)),oJ.empty,l,n.time,null==i?e.prevComposition:i)}})(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?o6:"historyRedo"==n?o9:null;return!!r&&!!e.editable&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}}),si=t0.create({name:"starterKit",addExtensions(){var e,t,n,r;let i=[];return!1!==this.options.bold&&i.push(rm.configure(this.options.bold)),!1!==this.options.blockquote&&i.push(rh.configure(this.options.blockquote)),!1!==this.options.bulletList&&i.push(or.configure(this.options.bulletList)),!1!==this.options.code&&i.push(ry.configure(this.options.code)),!1!==this.options.codeBlock&&i.push(rx.configure(this.options.codeBlock)),!1!==this.options.document&&i.push(rw.configure(this.options.document)),!1!==this.options.dropcursor&&i.push(o8.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&i.push(o7.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&i.push(rC.configure(this.options.hardBreak)),!1!==this.options.heading&&i.push(rS.configure(this.options.heading)),!1!==this.options.undoRedo&&i.push(sr.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&i.push(rA.configure(this.options.horizontalRule)),!1!==this.options.italic&&i.push(rD.configure(this.options.italic)),!1!==this.options.listItem&&i.push(oi.configure(this.options.listItem)),!1!==this.options.listKeymap&&i.push(ob.configure(null==(e=this.options)?void 0:e.listKeymap)),!1!==this.options.link&&i.push(i7.configure(null==(t=this.options)?void 0:t.link)),!1!==this.options.orderedList&&i.push(oS.configure(this.options.orderedList)),!1!==this.options.paragraph&&i.push(oT.configure(this.options.paragraph)),!1!==this.options.strike&&i.push(oN.configure(this.options.strike)),!1!==this.options.text&&i.push(oI.configure(this.options.text)),!1!==this.options.underline&&i.push(oL.configure(null==(n=this.options)?void 0:n.underline)),!1!==this.options.trailingNode&&i.push(sn.configure(null==(r=this.options)?void 0:r.trailingNode)),i}});e.s(["default",0,si],401191);let so={};function ss(e,t){"string"!=typeof t&&(t=ss.defaultChars);let n=function(e){let t=so[e];if(t)return t;t=so[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t="";for(let r=0,i=e.length;r<i;r+=3){let o=parseInt(e.slice(r+1,r+3),16);if(o<128){t+=n[o];continue}if((224&o)==192&&r+3<i){let n=parseInt(e.slice(r+4,r+6),16);if((192&n)==128){let e=o<<6&1984|63&n;e<128?t+="��":t+=String.fromCharCode(e),r+=3;continue}}if((240&o)==224&&r+6<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if((192&n)==128&&(192&i)==128){let e=o<<12&61440|n<<6&4032|63&i;e<2048||e>=55296&&e<=57343?t+="���":t+=String.fromCharCode(e),r+=6;continue}}if((248&o)==240&&r+9<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),s=parseInt(e.slice(r+10,r+12),16);if((192&n)==128&&(192&i)==128&&(192&s)==128){let e=o<<18&1835008|n<<12&258048|i<<6&4032|63&s;e<65536||e>1114111?t+="����":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),r+=9;continue}}t+="�"}return t})}ss.defaultChars=";/?:@&=+$,#",ss.componentChars="";let sl={};function sa(e,t,n){"string"!=typeof t&&(n=t,t=sa.defaultChars),void 0===n&&(n=!0);let r=function(e){let t=sl[e];if(t)return t;t=sl[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}(t),i="";for(let t=0,o=e.length;t<o;t++){let s=e.charCodeAt(t);if(n&&37===s&&t+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3))){i+=e.slice(t,t+3),t+=2;continue}if(s<128){i+=r[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&t+1<o){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[t])}return i}function sc(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}function sh(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}sa.defaultChars=";/?:@&=+$,-_.!~*'()#",sa.componentChars="-_.!~*'()";let su=/^([a-z0-9.+-]+:)/i,sd=/:[0-9]*$/,sp=/^(\/\/?(?!\/)[^\?\s]
92*)(\?[^\s]*)?$/,sf=["%","/","?",";","#"].concat(["'"].concat(["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n"," "]))),sm=["/","?","#"],sg=/^[+a-z0-9A-Z_-]{0,63}$/,sk=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,sy={javascript:!0,"javascript:":!0},sb={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};sh.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&1===e.split("#").length){let e=sp.exec(o);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let s=su.exec(o);if(s&&(n=(s=s[0]).toLowerCase(),this.protocol=s,o=o.substr(s.length)),(t||s||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===o.substr(0,2))&&!(s&&sy[s])&&(o=o.substr(2),this.slashes=!0),!sy[s]&&(i||s&&!sb[s])){let e,t,n=-1;for(let e=0;e<sm.length;e++)-1!==(r=o.indexOf(sm[e]))&&(-1===n||r<n)&&(n=r);-1!==(t=-1===n?o.lastIndexOf("@"):o.lastIndexOf("@",n))&&(e=o.slice(0,t),o=o.slice(t+1),this.auth=e),n=-1;for(let e=0;e<sf.length;e++)-1!==(r=o.indexOf(sf[e]))&&(-1===n||r<n)&&(n=r);-1===n&&(n=o.length),":"===o[n-1]&&n--;let i=o.slice(0,n);o=o.slice(n),this.parseHost(i),this.hostname=this.hostname||"";let s="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!s){let e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n&&!n.match(sg)){let r="";for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+="x":r+=n[e];if(!r.match(sg)){let r=e.slice(0,t),i=e.slice(t+1),s=n.match(sk);s&&(r.push(s[1]),i.unshift(s[2])),i.length&&(o=i.join(".")+o),this.hostname=r.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),s&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let l=o.indexOf("#");-1!==l&&(this.hash=o.substr(l),o=o.slice(0,l));let a=o.indexOf("?");return -1!==a&&(this.search=o.substr(a),o=o.slice(0,a)),o&&(this.pathname=o),sb[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},sh.prototype.parseHost=function(e){let t=sd.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};let sv=function(e,t){if(e&&e instanceof sh)return e;let n=new sh;return n.parse(e,t),n};e.s([],419),e.i(419),e.s(["decode",0,ss,"encode",0,sa,"format",0,sc,"parse",0,sv],863530);var sx=e.i(863530);let sw=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,sC=/[\0-\x1F\x7F-\x9F]/,sS=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,sA=/[\$\+<->
92\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,sM=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;e.s([],944694),e.i(944694),e.s(["Any",0,sw,"Cc",0,sC,"Cf",0,/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,"P",0,sS,"S",0,sA,"Z",0,sM],560380);var sE=e.i(560380);let s_=new Uint16Array('
vendor: 8,301 bytes, line 92
92áµ<ÃıÊÒÕ»×ÙµÛÞ¢ßà à©àªà¶¡à¹à¼à¼¦áá¨á¡ááááá¥\0\0\0\0\0\0á«áá¦á°á·á½¾â â°âââ»ââ ¤â¤â´â¹â¿ããºã¹ã¬ã£¾ã¨¨ã©±ã« 㬮à EMabcfglmnoprstu\\bfms�¦³¹ÃÃligè»ÃäPè»&ä¦cuteè»Ãäreve;äÄiyx}rcè»Ãä;är;ìðraveè»Ãäpha;äacr;äd;æ©Ägp¡on;äf;ìð¸plyFunction;æ¡ingè»Ã
ä
Äcs¾Ãr;ìðign;æildeè»Ãämlè»ÃäÐaceforsuåûþÄÄĢħĪÄcrêòkslash;æÅ¶Ã¶Ã¸;æ«§ed;æy;äÆcrtÄ
ÄÄause;æµnoullis;æ¬a;är;ìð
pf;ìð¹eve;äcòÄmpeq;æÜHOacdefhilorsuÅÅÅÆÆÆ¢ÆµÆ·ÆºÇÈɳɸɾcy;ä§PYè»Â©ä©ÆcpyÅŢźute;äÄ;iŧŨætalDifferentialD;æ
leys;æÈaeioÆÆÆÆron;ädilè»Ãärc;änint;æ°ot;äÄdnƧÆilla;ä¸terDot;ä·Ã²Å¿i;ä§rcleÈDMPTÇÇÇÇot;æinus;ælus;æimes;æoÄcsǢǸkwiseContourIntegral;æ²eCurlyÄDQÈÈoubleQuote;æuote;æÈlnpuÈȨÉÉonÄ;eȥȦæ·;æ©´ÆgitȯȶȺruent;æ¡nt;æ¯ourIntegral;æ®ÄfrÉÉ;æoduct;ænterClockwiseContourIntegral;æ³oss;樯cr;ìðpÄ;CÊÊ
æap;æÖDJSZacefiosÊ Ê¬Ê°Ê´Ê¸ËËˡ˦̳ÒÄ;oŹʥtrahd;æ¤cy;äcy;ä
cy;äÆgrsÊ¿ËËger;æ¡r;æ¡hv;櫤ÄayËËron;ä;älÄ;tËËæa;är;ìðÄaf˫̧Äcm˰̢riticalÈADGTÌÌÌÌcute;ä´oÅ´ÌÌ;äbleAcute;ärave;ä ilde;äond;æferentialD;æ
Ѱ̽\0\0\0ÍÍ\0Ð
f;ìð»Æ;DEÍÍÍä¨ot;æqual;æbleÌCDLRUVͣͲÎÏϢϸontourIntegraìȹoɴ͹\0\0ͻ»ÍnArrow;æÄeoÎΤftÆARTÎÎΡrrow;æightArrow;æeÃ¥ËngÄLRΫÏeftÄARγιrrow;æ¸ightArrow;æºightArrow;æ¹ightÄATÏÏrrow;æee;æ¨pÉÏ©\0\0ϯrrow;æownArrow;æerticalBar;æ¥nÌABLRTaÐЪаÑѿͼrrowÆ;BUÐÐТæar;æ¤pArrow;æµreve;äeftËк\0Ñ\0ÑightVector;æ¥eeVector;æ¥ectorÄ;BÑÑæ½ar;æ¥ightÇѧ\0ѱeeVector;æ¥ectorÄ;BѺѻæar;æ¥eeÄ;AÒÒæ¤rrow;æ§ÄctÒÒr;ìðrok;äà NTacdfglmopqstuxÒ½ÓÓÓÓÓ¢Ó§Ó®ÓµÔ¡Ô¯Ô¶ÕÕÕ Õ¥G;ä
Hè»Ãäcuteè»ÃäÆaiyÓÓÓron;ärcè»Ãä;äot;är;ìðraveè»Ãäement;æÄapÓºÓ¾cr;ätyÉÔ\0\0ÔmallSquare;æ»erySmallSquare;æ«ÄgpÔ¦Ôªon;äf;ìð¼silon;äuÄaiÔ¼ÕlÄ;TÕÕæ©µilde;ælibrium;æÄciÕÕr;æ°m;橳a;ämlè»ÃäÄipÕªÕ¯sts;æonentialE;æ
ÊcfiosÖ
ÖÖÖ²×y;ä¤r;ìðlledÉÖ\0\0Ö£mallSquare;æ¼erySmallSquare;æªÍ°Öº\0Ö¿\0\0×f;ìð½All;æriertrf;æ±cÃ²×ØJTabcdfgorst×¨×¬×¯×ºØØØØØØ£Ù¬Ù²cy;äè»>ä¾mmaÄ;d׷׸ä;äreve;äÆeiyØØØdil;ä¢rc;ä;äot;ä r;ìð;æpf;ìð¾eaterÌEFGLSTصÙÙÙÙÙ¦qualÄ;Lؾؿæ¥ess;æullEqual;æ§reater;檢ess;æ·lantEqual;橾ilde;æ³cr;ìð¢;æ«ÐAacfiosuÚ
ÚÚÚÚÚªÚ¾ÛRDcy;äªÄctÚÚek;ä;äirc;ä¤r;ælbertSpace;æÇ°Ú¯\0Ú²f;æizontalLine;æÄctÛÛ
òکrok;ä¦mpÅÛÛownHumðįqual;æÜEJOacdfgmnostuÛºÛ¾ÜÜÜÜÜܡܨÝݸÞÞÞcy;älig;ä²cy;äcuteè»ÃäÄiyÜÜrcè»Ãä;äot;ä°r;æraveè»ÃäÆ;apÜ Ü¯Ü¿ÄcgÜ´Ü·r;äªinaryI;æ
lieóÏÇ´Ý\0Ý¢Ä;eÝÝæ¬ÄgrÝÝral;æ«section;æisibleÄCTݬݲomma;æ£imes;æ¢ÆgptÝ¿ÞÞon;ä®f;ìða;äcr;æilde;ä¨Ç«Þ\0Þcy;älè»ÃäÊcfosuÞ¬Þ·Þ¼ßßÄiyÞ±Þµrc;ä´;är;ìðpf;ìðÇ£ß\0ßr;ìð¥rcy;äkcy;äÎHJacfosߤߨ߽߬߱à à cy;ä¥cy;äppa;äÄeyß¶ß»dil;ä¶;är;ìðpf;ìðcr;ìð¦ÖJTaceflmostà ¥à ©à ¬à¡à¡£à¦³à¦¸à§à§à¨·à©cy;äè»<ä¼Êcmnprà ·à ¼à¡à¡à¡ute;ä¹bda;äg;æªlacetrf;ær;æÆaeyà¡à¡à¡¡ron;ä½dil;ä»;äÄfsࡨ॰tÔACDFRTUVarࡾࢩࢱࣦ࣠ࣼयà¥Î४Änrà¢à¢gleBracket;æ¨rowÆ;BRà¢à¢à¢æar;æ¤ightArrow;æeiling;æoǵࢷ\0à£bleBracket;æ¦nÇà£\0à£eeVector;楡ectorÄ;Bà£à£æar;æ¥loor;æightÄAV࣯ࣵrrow;æector;æ¥Äerà¤à¤eÆ;AVà¤à¤à¤æ£rrow;æ¤ector;æ¥iangleÆ;BEतथऩæ²ar;æ§qual;æ´pÆDTVषà¥à¥ownVector;æ¥eeVector;æ¥ ectorÄ;Bà¥à¥æ¿ar;æ¥ectorÄ;B॥०æ¼ar;æ¥ightáÎsÌEFGLSTॾà¦à¦à¦à¦¢à¦qualGreater;æullEqual;æ¦reater;æ¶ess;檡lantEqual;橽ilde;æ²r;ìðÄ;eঽাæftarrow;æidot;ä¿Ænpwà§à¨à¨gÈLRlrà§à§·à¨à¨eftÄAR০৬rrow;æµightArrow;æ·ightArrow;æ¶eftÄarγà¨ightáοightáÏf;ìðerÄLRਢਬeftArrow;æightArrow;æÆchtਾà©à©Ã²à¡;æ°rok;ä
;æªÐacefiosuà©à©à© ੷੼àª
àªàªp;æ¤
y;äÄdl੥੯iumSpace;ælintrf;æ³r;ìðnusPlus;æpf;ìðcò੶;äÒJacefostuણધàªà«à¬à¬à¶à¶à¶cy;äcute;ä
Æaey઴હાron;ä
dil;ä
;äÆgswà«à«°à¬ativeÆMTVà«à«à«¨ediumSpace;æhiÄcn૦à«Ã«à«eryThiîà«tedÄGL૸à¬reaterGreateòٳessLesóà©Line;är;ìðÈBnptଢନଷ଺reak;æ BreakingSpace;ä f;æÚ;CDEGHLNPRSTVàààªà¼à®¡à¯«à°à±à²à²¦à³àµ¡à¶
櫬Äouàà¤ngruent;æ¢pCap;æoubleVerticalBar;æ¦Ælqxà®à®à®ement;æualÄ;Tà®à®æ ilde;ìâ̸ists;æreaterÎ;EFGLSTஶஷ஽à¯à¯à¯à¯¥æ¯qual;æ±ullEqual;ìâ§Ì¸reater;ìâ«Ì¸ess;æ¹lantEqual;ì⩾̸ilde;æµumpÅ௲௽ownHump;ìâ̸qual;ìâ̸eÄfsà°à°§tTriangleÆ;BEà°à°à°¡æªar;ìâ§Ì¸qual;æ¬sÌ;EGLSTవశ఼à±à±à±æ®qual;æ°reater;æ¸ess;ìâªÌ¸lantEqual;ì⩽̸ilde;æ´estedÄGL౨౹reaterGreater;ì⪢̸essLess;ì⪡̸recedesÆ;ESà²à²à²æqual;ì⪯̸lantEqual;æ ÄeiಫಹverseElement;æghtTriangleÆ;BEà³à³à³æ«ar;ìâ§Ì¸qual;æÄquà³à´uareSuÄbp೨೹setÄ;Eà³°à³³ìâ̸qual;æ¢ersetÄ;Eà´à´ìâ̸qual;æ£Æbcpà´à´¤àµsetÄ;Eà´à´ìââqual;æceedsÈ;ESTà´²à´³à´»àµæqual;ì⪰̸lantEqual;æ¡ilde;ìâ¿Ì¸ersetÄ;Eàµàµìââqual;æildeÈ;EFT൮൯൵ൿæqual;æullEqual;æilde;æerticalBar;æ¤cr;ìð©ildeè»Ãä;äÜEacdfgmoprstuvà¶½à·à·à·à·à· à·§à·¼à¸à¸ ยา฿à¹lig;ä
cuteè»ÃäÄiyà·à·rcè»Ãä;äblac;ä
r;ìðraveè»ÃäÆaei෮ෲ෶cr;ä
ga;ä©cron;äpf;ìðenCurlyÄDQà¸à¸oubleQuote;æuote;æ;æ©Äclวฬr;ìðªashè»ÃäiŬื฼deè»Ãäes;樷mlè»ÃäerÄBPà¹à¹ Äarà¹à¹r;æ¾acÄekà¹à¹;æet;æ´arenthesis;æÒacfhilors๿àºàºàºàºàºàºàº°à»¼rtialD;æy;är;ìði;ä¦;ä usMinus;ä±ÄipຢàºncareplanÃ¥Úf;æÈ;eio຺ູ໠໤檻cedesÈ;ESTà»à»à»à»æºqual;檯lantEqual;æ¼ilde;æ¾me;æ³Ädp໩໮uct;æortionÄ;aȥ໹l;æÄcià¼à¼r;ìð«;ä¨ÈUfosà¼à¼à¼à¼OTè»"ä¢r;ìðpf;æcr;ìð¬ØBEacefhiorsu༾à½à½à½ ཱིྦྷྪà¾áá©á´á¾arr;æ¤Gè»Â®ä®Æcnrà½à½à½ute;ä
g;æ«rÄ;tà½à½æ l;æ¤Æaeyཧཬཱron;ä
dil;ä
;ä Ä;vླྀཹæerseÄEUà¾à¾Älqà¾à¾ement;æuilibrium;æpEquilibrium;楯r»ཹo;ä¡ghtÐACDFTUVaà¿à¿«à¿³á¢á¨ááÏÄnrà¿à¿gleBracket;æ©rowÆ;BLà¿à¿à¿¡æar;æ¥eftArrow;æeiling;æoǵ࿹\0á
bleBracket;æ§nÇá\0áeeVector;æ¥ectorÄ;Bááæar;æ¥loor;æÄerááeÆ;AVáµá¶á¼æ¢rrow;æ¦ector;æ¥iangleÆ;BEáááæ³ar;æ§qual;æµpÆDTVá£á®á¸ownVector;æ¥eeVector;æ¥ectorÄ;Bááæ¾ar;æ¥ectorÄ;Bááæar;æ¥Äpuááf;ændImplies;楰ightarrow;æÄchá¹á¼r;æ;æ±leDelayed;æ§´ÚHOacfhimoqstuá¤á±á·á½ááá
á
á
¡á
§áµá»á¿ÄCcá©á®Hcy;ä©y;ä¨FTcy;ä¬cute;ä
Ê;aeiyáááááæª¼ron;ä
dil;ä
rc;ä
;ä¡r;ìðortÈDLRUáªá´á¾á
ownArrow»ÐeftArrow»à¢ightArrow»à¿pArrow;ægma;ä£allCircle;æpf;ìðɲá
\0\0á
°t;æareÈ;ISUá
ȇ
¼áá¯æ¡ntersection;æuÄbpáásetÄ;Eááæqual;æersetÄ;Eá¨á©æqual;ænion;æcr;ìð®ar;æÈbcmpááááÄ;sááæetÄ;Eááqual;æÄchá á
eedsÈ;ESTáá®á´á¿æ»qual;檰lantEqual;æ½ilde;æ¿Tháà¾;æÆ;esááá£ærsetÄ;Eááæqual;æet»áÖHRSacfhiorsá¾ááááá±á¶ááááORNè»ÃäADE;æ¢ÄHcáácy;äy;ä¦Äbuáá;ä;䤯aeyá¥áªá¯ron;ä
¤dil;ä
¢;ä¢r;ìðÄeiá»áDzá\0áefore;æ´a;äÄcnáákSpace;ìââSpace;ældeÈ;EFTá«á¬á²á¼æ¼qual;æullEqual;æ
ilde;æpf;ìðipleDot;æÄctáár;ìð¯rok;ä
¦à«¡á·ááá¦\0á¬á±\0\0\0\0\0á¸á½á·á
\0á¿áááÄcrá»áuteè»ÃärÄ;oááæcir;æ¥rÇ£á\0áy;äve;ä
¬Äiyáá£rcè»Ãä;ä£blac;ä
°r;ìðraveè»Ãäacr;ä
ªÄdiáá©erÄBPááÄaráár;äacÄekáá;æet;æµarenthesis;æonÄ;Pá°á±ælus;æÄgpá»á¿on;ä
²f;ìðÐADETadpsáá®á¸áϨááá³rrowÆ;BDá
á á¤ar;æ¤ownArrow;æ
ownArrow;æquilibrium;楮eeÄ;Aááæ¥rrow;æ¥ownáϳerÄLRáá¨eftArrow;æightArrow;æiÄ;lá¹áºäon;ä¥ing;ä
®cr;ìð°ilde;ä
¨mlè»ÃäÒDbcdefosvá§á¬á°á³á¾á
áááash;æ«ar;æ««y;äashÄ;lá»á¼æ©;櫦Äeráá
;æÆbtyáááºar;æÄ;iáácalÈBLSTá¡á¥áªá´ar;æ£ine;ä¼eparator;æilde;æThinSpace;ær;ìðpf;ìðcr;ìð±dash;æªÊcefosá§á¬á±á¶á¼irc;ä
´dge;ær;
vendor: 7,828 bytes, line 92
92ìðpf;ìðcr;ìð²Èfiosáááár;ìð;äpf;ìðcr;ìð³ÒAIUacfosuá±áµá¹á½ááááá cy;ä¯cy;äcy;ä®cuteè»ÃäÄiyáárc;ä
¶;ä«r;ìðpf;ìðcr;ìð´ml;ä
¸ÐHacdefosáµá¹á¿áááá á¤cy;äcute;ä
¹Äayááron;ä
½;äot;ä
»Ç²á\0áoWidtèà«a;är;æ¨pf;æ¤cr;ìðµà¯¡ááá\0á°á¶á¿\0\0\0\0ááá«áá\0ááá²á¹\0á¾cuteè»Ã¡ä¡reve;äÌ;Ediuyááá¡á£á¨áæ¾;ìâ¾Ì³;æ¿rcè»Ã¢ä¢teè»Â´Ì;ä°ligè»Ã¦ä¦Ä;r²áº;ìðraveè»Ã ä ÄepááÄfpáásym;æµÃ¨áha;ä±ÄapácÄclá¤á§r;äg;樿ɤá°\0\0áÊ;adsváºá»á¿ááæ§nd;æ©;æ©lope;æ©;æ©Î;elmrszááááá¿ááæ ;榤e»ásdÄ;aá¥á¦æ¡Ñ¡á°á²á´á¶á¸áºá¼á¾;榨;榩;榪;榫;榬;æ¦;榮;榯tÄ;vá
áæbÄ;dááæ¾;æ¦Äptááh;æ¢Â»Â¹arr;æ¼Ägpá£á§on;ä
f;ìðÎ;Eaeiopáá»á½áááá;æ©°cir;橯;æd;æs;ä§roxÄ;eááñáingè»Ã¥ä¥Æctyá¡á¦á¨r;ìð¶;äªmpÄ;eáá¯Ã±Êildeè»Ã£ä£mlè»Ã¤ä¤Äciááoninôɲnt;æ¨à Nabcdefiklnoprsuáá±á°á¼ááá¸á½á á¦á ¹á¡á᤽á¥á¥°ot;æ«Äcrá¶ákÈcepsáá
ááong;æpsilon;ä¶rime;æµimÄ;eááæ½q;æÅ¶á¢á¦ee;æ½edÄ;gá¬áæ
e»árkÄ;táá·brk;æ¶Äoyáá;ä±quo;æÊcmprtááá¡á¤á¨ausÄ;eÄÄptyv;榰séánoÃµÄÆahwá¯á±á³;ä²;æ¶een;æ¬r;ìðgÎcostuvwááá³ááááÆaiuáááÃ°Ý rc;æ¯pÂ»á±Ædptá¤á¨áot;æ¨lus;æ¨imes;æ¨É±á¹\0\0á¾cup;æ¨ar;æ
riangleÄduááown;æ½p;æ³plus;æ¨eÃ¥áÃ¥áarow;æ¤Æakoáá ¦á µÄcná²á £kÆlstáºÖ«á ozenge;æ§«riangleÈ;dlrá á á á æ´own;æ¾eft;æight;æ¸k;æ£Æ±á «\0á ³Æ²á ¯\0á ±;æ;æ4;æck;æÄeoá ¾á¡Ä;qá¡á¡ì=â¥uiv;ìâ¡â¥t;æÈptwxá¡á¡á¡§á¡¬f;ìðÄ;táá¡£om»átie;æØDHUVbdhmptuvá¢
á¢á¢ªá¢»á£á£á£¬á£¿á¤
á¤á¤á¤¡ÈLRlrá¢á¢á¢á¢;æ;æ;æ;æÊ;DUduᢡᢢᢤᢦᢨæ;æ¦;æ©;æ¤;æ§ÈLRlrᢳᢵᢷᢹ;æ;æ;æ;æÎ;HLRhlrá£á£á£á£á£á£á£æ;æ¬;æ£;æ ;æ«;æ¢;æox;æ§ÈLRlrᣤᣦᣨᣪ;æ;æ;æ;æÊ;DUduڽ᣷᣹᣻᣽;æ¥;æ¨;æ¬;æ´inus;ælus;æimes;æ ÈLRlrá¤á¤á¤á¤;æ;æ;æ;æÎ;HLRhlrᤰᤱᤳᤵᤷ᤻᤹æ;æª;æ¡;æ;æ¼;æ¤;æÄevÄ£á¥barè»Â¦ä¦Èceioá¥á¥á¥á¥ r;ìð·mi;æmÄ;eáálÆ;bhᥨᥩᥫä;æ§
sub;æÅ¬á¥´á¥¾lÄ;e᥹᥺æ¢t»᥺pÆ;Eeįá¦
á¦;檮Ä;qÛÛೡᦧ\0᧨á¨á¨á¨²\0ᨷá©\0\0᪴\0\0á«\0\0ᬡᬮáá\0᯽\0á°Æcprá¦á¦²á§ute;äÌ;abcdsᦿá§á§á§á§á§æ©nd;æ©rcup;æ©Äauá§á§p;æ©p;æ©ot;æ©;ìâ©ï¸Äeo᧢᧥t;æÃ®ÚÈaeiuá§°á§»á¨á¨
ǰ᧵\0᧸s;æ©on;ädilè»Ã§ä§rc;äpsÄ;sá¨á¨æ©m;æ©ot;äÆdmná¨á¨ ᨦilè»Â¸Æptyv;榲tè¢;eá¨á¨®ä¢räƲr;ìð Æceiᨽá©á©y;äckÄ;má©á©æark»á©;ärÎ;Ecefmsá©á© ᩢᩫ᪤᪪᪮æ;æ§Æ;elᩩᩪá©äq;æeɡᩴ\0\0áªrrowÄlr᩼áªeft;æºight;æ»ÊRSacdáªáªáªáªáªÂ»à½;æst;æirc;æash;ænint;æ¨id;櫯cir;æ§ubsÄ;u᪻᪼æ£it»᪼ˬá«á«á«º\0á¬onÄ;eá«á«äºÄ;qÃÃÉá«\0\0á«¢aÄ;tá«á«ä¬;äÆ;fl᫨᫩᫫æÃ®á
eÄmx᫱᫶ent»᫩eóÉǧ᫾\0á¬Ä;dá»á¬ot;æ©nÃ´ÉÆfryá¬á¬á¬;ìðoäÉè©;sÅá¬r;æÄaoᬥᬩrr;æµss;æÄcuᬲᬷr;ìð¸ÄbpᬼáÄ;eááæ«;æ«Ä;eááæ«;æ«dot;æ¯Îdelprvwá á¬á·á®á®¬á¯á¯¹arrÄlrá¨áª;椸;椵ɰá²\0\0áµr;æc;æarrÄ;pá¿á®æ¶;椽Ì;bcdosá®á®á®á®¡á®¥á®¨æªrcap;æ©Äauá®á®p;æ©p;æ©ot;ær;æ©
;ìâªï¸Èalrv᮵ᮿá¯á¯£rrÄ;mᮼᮽæ·;椼yÆevwá¯á¯á¯qɰá¯\0\0á¯reãá³uãáµee;æedge;æenè»Â¤ä¤earrowÄlrᯮ᯳eft»á®ight»ᮽeäá¯Äciá°á°oninôǷnt;æ±lcty;æà¦AHabcdefhijlorstuwz᰸᰻᰿á±á±©á±µá²á²á²¬á²·á³»á³¿á´áµ»á¶á¶«á¶»á·á·ròÎar;楥Èglrsá±á±á±á±ger;æ eth;æ¸Ã²á³hÄ;vá±á±æÂ»à¤Å«á±¡á±§arow;æ¤aãÌÄayᱮᱳron;ä;ä´Æ;ao̲ᱼá²ÄgrÊ¿á²r;ætseq;æ©·Æglmá²á²á²è»Â°ä°ta;ä´ptyv;榱ÄirᲣᲨsht;楿;ìð¡arÄlrᲳᲵ»à£Â»áÊaegsvá³Í¸á³á³á³ mÆ;oșá³á³ndÄ;șá³uit;æ¦amma;äin;æ²Æ;io᳧᳨᳸ä·deè÷;oá³§á³°ntimes;ænø᳷cy;äcɯá´\0\0á´rn;æop;æÊlptuwá´á´á´¢áµáµlar;ä¤f;ìðÊ;empsÌá´á´·á´½áµqÄ;dÍá´³ot;æinus;æ¸lus;æquare;æ¡blebarwedgåúnÆadhá®áµáµ§ownarrowóá²arpoonÄlrᵲᵶefôᲴighôᲶŢᵿá¶
karo÷à½É¯á¶\0\0á¶rn;æop;æÆcotá¶á¶£á¶¦Äryá¶á¶¡;ìð¹;äl;æ§¶rok;äÄdrá¶°á¶´ot;æ±iÄ;fá¶ºá æ¿Äahá·á·ròЩaòྦangle;榦Äciá·á·y;ägrarr;æ¿à¤Dacdefglmnopqrstuxá¸á¸á¸á¸¸Õ¸á¸¼á¹á¹¡á¹¾áº¥áº¯áº½á»¡á¼ªá¼·á½á½á½ÄDoá¸á´´oôá²Äcsá¸á¸uteè»Ã©ä©ter;æ©®ÈaioyḢḧḱḶron;ärÄ;cá¸á¸®æè»Ãªäªlon;æ;äot;äÄDrá¹á¹
ot;æ;ìð¢Æ;rsá¹á¹á¹æªaveè»Ã¨ä¨Ä;dá¹á¹æªot;æªÈ;ilsṪṫṲṴæªnters;æ§;æÄ;dṹṺæªot;æªÆapsáº
áºáºcr;ätyÆ;sváºáºáºæ
et»áºpÄ1;áºáº¤Ä³áº¡áº£;æ;æ
æÄgsẪẬ;ä
p;æÄgpẴẸon;äf;ìðÆalsá»á»á»rÄ;sá»á»æl;æ§£us;橱iÆ;lvá»á»á»äµon»á»;äµÈcsuvỪỳá¼á¼£Äioữḱrc»Ḯɩỹ\0\0á»»ÃÕantÄglá¼á¼tr»á¹ess»ṺÆaeiá¼á¼á¼ls;ä½st;ævÄ;DȵἠD;橸parsl;æ§¥ÄDaἯἳot;ærr;楱Æcdiá¼¾á½á»¸r;æ¯oôÍÄahá½á½;ä·è»Ã°ä°Ämrá½á½lè»Ã«ä«o;æ¬Æcipὡὤὧl;ä¡sôծÄeoὬὴctatioîÕnentialåչৡá¾\0á¾\0ᾡᾧ\0\0á¿á¿\0á¿\0ῦῪâ\0ââllingdotseñá¹y;ämale;æÆilrá¾á¾³á¿lig;èï¬É©á¾¹\0\0á¾½g;èï¬ig;èï¬;ìð£lig;èï¬lig;ìfjÆaltá¿á¿á¿¡t;æig;èï¬ns;æ±of;äǰ΅\0ῳf;ìðÄakÖ¿á¿·Ä;vῼ´æ;æ«artint;æ¨ÄaoââÄcsââαââ°â¸â
â\0âβâ¢â¥â§âªâ¬\0â®è»Â½ä½;æ
è»Â¼ä¼;æ
;æ
;æ
Ƴâ´\0â¶;æ
;æ
Ê´â¾â\0\0âè»Â¾ä¾;æ
;æ
5;æ
ƶâ\0â;æ
;æ
8;æ
l;æwn;æ¢cr;ìð»à¢Eabcdefgijlnorstvââââ¥â°â´â°âµâºâ¿âââ¸Ìâ¾â
âÄ;lÙâ;æªÆcmpâââute;äµmaÄ;dâá³ä³;æªreve;äÄiyâªâ®rc;ä;ä³ot;ä¡È;lqsؾÙâ½âÆ;qsؾÙâlanô٥È;cdlÙ¥âââ¥c;檩otÄ;oââæªÄ;lâ¢â£æª;æªÄ;eâªâìâï¸s;æªr;ìð¤Ä;gÙ³Ømel;æ·cy;äÈ;EajÙâââ;æª;檥;檤ÈEaesâââ©â´;æ©pÄ;pâ£â¤æªrox»â¤Ä;qâ®â¯æªÄ;qâ®âim;æ§pf;ìðÄciâ
â
r;æmÆ;elÙ«â
â
;æª;æªè>;cdlqr×®â
â
ªâ
®â
³â
¹Äciâ
¥â
§;檧r;橺ot;æPar;æ¦uest;橼Êadelsââ
ªâÙâǰâ\0âproøâr;楸qÄlqØ¿âlesóâiÃÙ«Äenâ£ârtneqq;ìâ©ï¸Ã
âªÔAabcefkosyâââ±âµâºâââ¯â¨â½ròΠÈilmrâââârsðáf»â¤ilôکÄdrâ â¤cy;äÆ;cwࣴâ«â¯ir;æ¥;æar;æirc;䥯alrââârtsÄ;uââæ¥it»âlip;æ¦con;æ¹r;ìð¥sÄewâ£â©arow;椥arow;椦Êamoprâºâ¾âââ£rr;æ¿tht;æ»kÄlrââeftarrow;æ©ightarrow;æªf;ìðbar;æÆcltâ¯â´â¸r;ìð½asèâ´rok;ä§Äbpââull;æhen»á±à«¡â£\0âª\0â¸â
â\0ââ³\0\0â¸â¢â§â¢â¿\0ââªâ´cuteè»ÃäÆ;iyݱâ°âµrcè»Ã®ä®;ä¸Äcxâ¼â¿y;äµclè»Â¡ä¡ÄfrÎâ;ìð¦raveè»Ã¬ä¬È;inoܾââ©â®Äinâ¢â¦nt;æ¨t;æfin;æ§ta;æ©lig;䳯aopâ¾ââÆcgtâ
ââr;䫯elpÜââinÃ¥ÞarÃ´Ü h;ä±f;æ·ed;äµÊ;cfotÓ´â¬â±â½âare;æ
inÄ;tâ¸â¹æie;æ§doôâÊ;celpÝââââ¡al;æºÄgrââeróá£Ã£âarhk;æ¨rod;樼Ècgptâ¯â²â¶â»y;äon;ä¯f;ìða;ä¹uestè»Â¿ä¿Äciââr;ìð¾nÊ;EdsvÓ´âââ¡Ó³;æ¹ot;æµÄ;vâ¦â§æ´;æ³Ä;iÝ·â®lde;ä©Ç«â¸\0â¼cy;älè»Ã¯ä¯Ìcfmosuââââ¡â§âµÄiyâârc;äµ;ä¹r;ìð§ath;ä·pf;ìðÇ£â¬\0â±r;ìð¿rcy;äkcy;äÐacfghjosâââ¢â§ââ±âµâ»ppaÄ;vââäº;ä°Äeyââ dil;ä·;äºr;ìð¨reen;ä¸cy;ä
cy;äpf;ìðcr;ìðà®ABEHabcdefghjlmnoprstuvâ°ââââââ½âââââ¥â¹â½ââ²âââ¨âââ â Æartâ·âºâ¼ròà§Ã²Îail;æ¤arr;æ¤Ä;gà¦â;æªar;楢ॣâ¥\0âª\0â±\0\0\0\0\0âµâº\0âââ\0â¹ute;äºmptyv;榴raîà¡bda;ä»gÆ;dlà¢ââ;æ¦Ã¥à¢;æª
uoè»Â«ä«rÐ;bfhlpstà¢ââ¦â©â«â®â±âµÄ;fà¢â£s;æ¤s;æ¤Ã«âp;æ«l;椹im;楳l;æ¢Æ;aeâ¿ââæª«il;æ¤Ä;sââæª;ìâªï¸Æabrââârr;æ¤rk;æ²Äakâ¢â¬cÄekâ¨âª;ä»;äÄesâ±â³;æ¦lÄduâ¹â»;æ¦;æ¦Èaeuyââââron;ä¾Ädiââil;ä¼Ã¬à¢°Ã¢â©;
vendor: 4,294 bytes, line 92
92ä»Ècqrsâ£â¦ââ½a;椶uoÄ;rà¸áÄduâ²â·har;楧shar;æ¥h;æ²Ê;fgqsââà¦â³â¿æ¤tÊahlrtââ¤â·ââ¨rrowÄ;tà¢â¡aéâ¶arpoonÄduâ¯â´own»Ñp»०eftarrows;æightÆahsââârrowÄ;sࣴࢧarpoonóà¾quigarro÷â°hreetimes;æÆ;qsâà¦âºlanôবÊ;cdgsবââââ¨c;檨otÄ;oââæ©¿Ä;rââæª;æªÄ;eâ¢â¥ìâï¸s;æªÊadegsâ³â¹â½ââpproøâot;æqÄgqââ
ôà¦gtòâôà¦iÃলÆilrâ࣡âsht;楼;ìð©Ä;Eà¦â£;æªÅ¡â©â¶rÄduâ²â®Ä;l॥â³;楪lk;æcy;äÊ;achtà©ââââròâorneòá´ard;楫ri;æºÄioââ¤dot;ä
ustÄ;aâ¬âæ°che»âÈEaesâ»â½ââ;æ¨pÄ;pââæªrox»âÄ;qââæªÄ;qââ»im;æ¦Ðabnoptwzâ©â´â·ââ¯âââÄnrâ®â±g;æ¬r;æ½rëà£gÆlmrâ¿ââeftÄar০âightá৲apsto;æ¼ightá৽parrowÄlrâ¥â©efôâight;æ¬Æaflâ¶â¹â½r;æ¦
;ìðus;æ¨imes;樴šââst;æÃ¡áÆ;efââá ænge»âarÄ;lâ¤â¥ä¨t;æ¦Êachmtâ³â¶â¼â
âròࢨorneòá¶arÄ;dà¾â;æ¥;æri;æ¿Ìachiqtââà©â¢â®â»quo;æ¹r;ìðmÆ;egলâªâ¬;æª;æªÄbuâªâ³oÄ;rà¸â¹;ærok;ä
è<;cdhilqrà «ââ¹ââ â¥âªâ°Äciââ;檦r;橹reÃ¥â²mes;æarr;楶uest;æ©»ÄPiâµâ¹ar;æ¦Æ;efâ à¤á ærÄduâ â shar;æ¥har;楦Äenâ â ¡rtneqq;ìâ¨ï¸Ã
â ÜDacdefhilnopsuâ¡â¡
â¢â¢â¢â¢ ⢥⢨â£â£¢â£¤àªâ£³â¤Dot;æºÈclprâ¡â¡â¡£â¡½rè»Â¯ä¯Äetâ¡â¡;æÄ;eâ¡â¡æ se»â¡Ä;sá»â¡¨toÈ;dluá»â¡³â¡·â¡»owîÒefôà¤Ã°áker;æ®Äoyâ¢â¢mma;権;ä¼ash;æasuredangle»á¦r;ìðªo;æ§Æcdn⢯⢴â£roè»ÂµäµÈ;acdá¤â¢½â£â£sôá§ir;æ«°otè»Â·ÆµusÆ;bdâ£á¤â£æÄ;uá´¼â£;横ţâ£â£¡p;æ«Ã²âðàªÄdp⣩⣮els;æ§f;ìðÄct⣸⣽r;ìðpos»áÆ;lmâ¤â¤â¤ä¼timap;æ¸à°GLRVabcdefghijlmoprstuvwâ¥â¥â¥¾â¦â¦â§â§©â¨â¨â©â©âªâªâª¤âª¨â¬â¬ââ¿â®®â°´â±§â±¼â³©Ägtâ¥â¥;ìâ̸Ä;vâ¥à¯ìâ«âÆeltâ¥â¥²â¥¶ftÄar⥡⥧rrow;æightarrow;æ;ìâ̸Ä;v⥻à±ìâªâightarrow;æÄDdâ¦â¦ash;æ¯ash;æ®Êbcnpt⦣⦧⦬⦱â§la»Ëute;ä
g;ìâ âÊ;Eiopà¶â¦¼â§â§
â§;ì⩰̸d;ìâ̸s;ä
roøà¶urÄ;aâ§â§æ®lÄ;sâ§à¬¸Ç³â§\0â§£pè»Â ଷmpÄ;e௹à°Êaeouyâ§´â§¾â¨â¨â¨Ç°â§¹\0â§»;æ©on;ä
dil;ä
ngÄ;dൾâ¨ot;ìâ©Ì¸p;æ©;ä½ash;æÎ;Aadqsxà®â¨©â¨â¨»â©â©
â©rr;ærÄhr⨳⨶k;椤Ä;oá²á°ot;ìâ̸uiöà£Äeiâ©â©ar;椨Ãà®istÄ;sà® à®r;ìð«ÈEestà¯
⩦⩹⩼Æ;qs஼â©à¯¡Æ;qs஼à¯
â©´lanô௢iÃ௪Ä;rà®¶âªÂ»à®·ÆAapâªâªâªrò⥱rr;æ®ar;櫲Æ;svà¾âªà¾Ä;d⪡⪢æ¼;æºcy;äÎAEadest⪷⪺⪾â«â«
⫶⫹rò⥦;ìâ¦Ì¸rr;ær;æ¥È;fqsà°»â«â«£â«¯tÄarâ«â«rro÷â«ightarroÃ·âªÆ;qs఻⪺⫪lanôà±Ä;sà±â«´Â»à°¶iÃà±Ä;rవ⫾iÄ;eà°à°¥iäà¶Äptâ¬â¬f;ìðè¬;inâ¬â¬â¬¶ä¬nÈ;Edvà®â¬¤â¬¨â¬®;ìâ¹Ì¸ot;ìâµÌ¸Ç¡à®â¬³â¬µ;æ·;æ¶iÄ;vಸ⬼ǡಸââ;æ¾;æ½Æaorââ£â©rÈ;astà»âââlleìà»l;ì⫽â¥;ìâ̸lint;æ¨Æ;ceà²â°â³uåಥÄ;cà²â¸Ä;eà²â½Ã±à²ÈAaitâ®â®â®â®§ròâ¦rrÆ;cwâ®â®â®æ;ì⤳̸;ìâ̸ghtarrow»â®riÄ;eà³à³Îchimpqu⮽â¯â¯â¬à¸â¯¤â¯¯È;cerà´²â¯à´·â¯uÃ¥àµ
;ìðortÉâ¬
\0\0â¯aráâmÄ;e൮â¯Ä;q൴൳suÄbp⯫â¯Ã¥à³¸Ã¥à´Æbcp⯶â°â°È;Ees⯿â°à´¢â°æ;ìâ«
̸etÄ;eà´â°qÄ;qà´£â°cÄ;eà´²â°Ã±à´¸È;EesⰢⰣàµâ°§æ
;ìâ«Ì¸etÄ;eàµâ°®qÄ;qൠⰣÈgilrⰽⰿâ±
â±Ã¬à¯ldeè»Ã±ä±Ã§à±iangleÄlrâ±â±eftÄ;eà°â±Ã±à°¦ightÄ;eà³â±¥Ã±à³Ä;mⱬâ±ä½Æ;esⱴⱵⱹä£ro;æp;æÒDHadgilrsâ²â²â²â²â²£â²°â²¶â³â³£ash;æarr;æ¤p;ìââash;æ¬ÄetⲨⲬ;ìâ¥â;ì>ânfin;æ§ÆAetâ²½â³â³
rr;æ¤;ìâ¤âÄ;râ³â³ì<âie;ìâ´âÄAtâ³â³rr;æ¤rie;ìâµâim;ìâ¼âÆAanâ³°â³´â´rr;ærÄhr⳺⳽k;椣Ä;oá§á¥ear;椧ááª\0\0\0\0\0\0\0\0\0\0\0\0\0â´\0â´¸âµâµ ⵥ⵲â¶á¬\0\0â¶â¶«\0â·â·\0â·â¸â¸«â¸¾â¹Äcsâ´±áªuteè»Ã³ä³Äiyâ´¼âµ
rÄ;cáªâµè»Ã´ä´;ä¾Êabios᪠âµâµÇâµlac;ä
v;樸old;榼lig;ä
Äcr⵩âµir;榿;ìð¬Í¯âµ¹\0\0âµ¼\0â¶n;äaveè»Ã²ä²;æ§Äbmâ¶à·´ar;榵Èacitâ¶â¶â¶¥â¶¨ròáªÄirâ¶â¶ r;榾oss;榻nÃ¥à¹;æ§Æaeiⶱⶵⶹcr;ä
ga;äÆcdnâ·â·
Çron;ä¿;榶pf;ìð Æaelâ·â·Çr;榷rp;榹Î;adiosvⷪⷫⷮâ¸â¸â¸â¸æ¨ròáªÈ;efmâ··â·¸â¸â¸
æ©rÄ;oⷾⷿæ´f»ⷿè»Âªäªè»Âºäºgof;æ¶r;æ©lope;æ©;æ©Æcloâ¸â¸¡â¸§Ã²â¸ashè»Ã¸ä¸l;æiŬⸯ⸴deè»ÃµäµesÄ;aÇ⸺s;樶mlè»Ã¶ä¶bar;æ½à«¡â¹\0â¹½\0âºâº\0⺢⺹\0\0â»àº\0â¼\0\0⼫⾼\0â¿rÈ;
vendor: 6,210 bytes, line 92
92astÐâ¹§â¹²àº
è¶;lâ¹â¹®ä¶leìÐɩ⹸\0\0â¹»m;櫳;櫽y;ä¿rÊcimptâºâºâºá¡¥âºnt;ä¥od;ä®il;æ°enk;æ±r;ìðÆimo⺨⺰⺴Ä;vâºâº®ä;ämaô੶ne;æÆ;tv⺿â»â»ächfork»´;äÄauâ»â»nÄckâ»â»kÄ;hâ´â»;æÃ¶â´sÒ;abcdemst⻳⻴á¤â»¹â»½â¼â¼â¼â¼ä«cir;樣ir;樢Äouáµâ¼;樥;橲nè»Â±àºim;樦wo;樧Æipuâ¼â¼ â¼¥ntint;æ¨f;ìð¡ndè»Â£ä£Ô;Eaceinosuà»â¼¿â½â½â½â¾â¾â¾â½¾â¾¶;檳p;檷uÃ¥à»Ä;cà»â½Ì;acensà»â½â½â½¦â½¨â½¾pproøâ½urlyeñà»Ã±à»Æaes⽯⽶⽺pprox;檹qq;檵im;æ¨iÃà»meÄ;sâ¾àº®æ²ÆEas⽸â¾â½ºÃ°â½µÆdfp໬â¾â¾¯Æals⾠⾥⾪lar;æ®ine;æurf;æÄ;t໻⾴ï໻rel;æ°Äciâ¿â¿
r;ìð
;äncsp;æÌfiopsuâ¿â¢â¿â¿¥â¿«â¿±r;ìð®pf;ìð¢rime;æcr;ìðÆaeo⿸ããtÄei⿾ã
rnionóڰnt;æ¨stÄ;eããä¿Ã±á¼Ã´à¼àªABHabcdefhilmnoprstuxããããã ãã«ã
ã
¢ã
²ãããã¤ã©ãã®ã²ãã°ã·Æartãããròá³Ã²Ïail;æ¤aròᱥar;楤Îcdenqrtã¨ãµã¸ã¿ãããÄeuãã±;ìâ½Ì±te;ä
iãá
®mptyv;榳gÈ;delà¿ããã;æ¦;榥åà¿uoè»Â»ä»rÖ;abcfhlpstwà¿ã¬ã¯ã·ã¹ã¼ã¾ããããp;極Ä;fà¿ ã´s;æ¤ ;椳s;æ¤Ã«âðâ®l;æ¥
im;楴l;æ£;æÄaiããil;æ¤oÄ;nããæ¶alÃ³à¼Æabrã§ãªã®ròá¥rk;æ³Äakã³ã½cÄekã¹ã»;ä½;äÄesãã;æ¦lÄduãã;æ¦;æ¦Èaeuyããã§ã©ron;ä
Ädiã¡ã¥il;ä
ì࿲âãº;äÈclqsã´ã·ã½ã
a;椷dhar;楩uoÄ;rÈÈh;æ³Æacgã
ã
à½lÈ;ipsླྀã
ã
ánÃ¥á»arôྩt;æÆilrã
©á£ã
®sht;楽;ìð¯Äaoã
·ãrÄduã
½ã
¿Â»Ñ»Ä;láã;楬Ä;vããä;䱯gnsãã¹ã¼htÌahlrstã¤ã°ããã¤ã®rrowÄ;tà¿ãaéãarpoonÄduã»ã¿owîã
¾p»áeftÄahããrrowó࿪arpoonóÕightarrows;æquigarro÷ãhreetimes;æg;äingdotseñἲÆahmãããrò࿪aòÕ;æoustÄ;aããæ±che»ãmid;æ«®Èabptã²ã½ããÄnrã·ãºg;ær;æ¾rëáÆaflãããr;æ¦;ìð£us;樮imes;樵Äapãã§rÄ;gã£ã¤ä©t;æ¦olint;æ¨aròã£Èachqã»ãá¼ã
quo;æºr;ìðÄbuã»ãoÄ;rÈÈÆhirããã reÃ¥ã¸mes;æiÈ;eflãªáá ¡ã«æ¹tri;æ§luhar;楨;æàµ¡ãããã¬ã¸ã±\0ãºã¤\0\0ã¬ã°\0ã¨ãããã±ãã±\0ã\0\0ã³cute;ä
quïâºÔ;Eaceinpsyáã³ãµã¿ããããã¦ã©;檴ǰãº\0ã¼;檸on;ä
¡uÃ¥á¾Ä;dá³ãil;ä
rc;ä
ÆEasããã;檶p;檺im;æ©olint;æ¨iÃá;äotÆ;beã´áµãµæ
;橦ÎAacmstxãããããã£ãrr;ærÄhrããëâ¨Ä;oਸ਼਴tè»Â§ä§i;ä»war;椩mÄinã©Ã°nuóñt;æ¶rÄ;oã¶âìð°Èacoyãããã rp;æ¯Ähyããcy;ä;ärtÉã\0\0ãiäá¤araì⹯è»ÂäÄgmã¨ã´maÆ;fvã±ã²ã²ä;äÐ;deglnprá«ã
ããããã¡ã¦ot;橪Ä;qá±á°Ä;Eããæª;æª Ä;Eããæª;æªe;ælus;樤arr;楲aròá½Èaeitã¸ãããÄlsã½ãlsetméãªhp;樳parsl;槤Ädlá£ãe;æ£Ä;eããæªªÄ;sã¢ã£æª¬;ìâª¬ï¸Æflpã®ã³ãtcy;äÄ;bã¸ã¹ä¯Ä;aã¾ã¿æ§r;æ¿f;ìð¤aÄdrãÐesÄ;uããæ it»ãÆcsuã ã¹ãÄauã¥ã¯pÄ;sáã«;ìâï¸pÄ;sá´ãµ;ìâï¸uÄbpã¿ãÆ;esááãetÄ;eáãñáÆ;esá¨áãetÄ;eá¨ãÃ±á®Æ;afá
»ã¦Ö°rÅ¥ã«Ö±Â»á
¼aròá
Ècemtã¹ã¾ãã
r;ìðtmîñiìãaræá¾ÄarããrÄ;fãá¿æÄanããightÄepã£ãªpsiloîỠhé⺯s»â¡Êbcmnpã»ãáããÒ;Edemnprsãããããã£ã¬ã±ã¶æ;æ«
ot;檽Ä;dáãot;æ«ult;æ«ÄEeã¨ãª;æ«;ælus;檿arr;楹Æeiuã½ããtÆ;enãã
ãqÄ;qáãeqÄ;qã«ã¨m;æ«Äbpãã;æ«;æ«cÌ;acensáã¬ã²ã¹ã»ã¦pproøãºurlyeñá¾Ã±á³Æaesãããpproøãqñãg;æªÚ123;Edehlmnpsã©ã¬ã¯áã²ã´ãããããã¨ãè»Â¹ä¹è»Â²ä²è»Â³ä³;æ«Äosã¹ã¼t;檾ub;æ«Ä;dá¢ã
ot;æ«sÄouããl;æb;æ«arr;楻ult;æ«ÄEeã¤ã¦;æ«;ælus;æ«Æeiuã´ããtÆ;enáã¼ãqÄ;qá¢ã²eqÄ;qã§ã¤m;æ«Äbpãã;æ«;æ«ÆAanãã ãrr;ærÄhrã¦ã¨Ã«â®Ä;oਫ਩war;椪ligè»Ãä௡ããã áã³ã¹\0ã¾ã\0\0\0\0\0ãã\0ãã¬\0\0\0ãɲã\0\0ãget;æ;ärÃ«à¹Æaeyã¦ã«ã°ron;ä
¥dil;ä
£;älrec;ær;ìð±Èeikoãããµã¼Ç²ã\0ãeÄ4fááaÆ;svãããä¸ym;äÄcnã¢ã²kÄasã¨ã®pproøáim»á¬sðáÄasãºã®Ã°árnè»Ã¾ä¾Ç¬Ìãâ§esèÃ;bdãããäÄ;aá¤ãr;樱;樰Æepsã¡ã£ãáâ©È;bcfÒã¬ã°ã´ot;æ¶ir;櫱Ä;oã¹ã¼ìð¥rk;æ«Ã¡ã¢rime;æ´Æaipããã¤dÃ¥áÎadempstã¡ããããããngleÊ;dlqrã°ã±ã¶ããæµown»ᶻeftÄ;eâ ã¾Ã±à¤®;æightÄ;eãªãñáot;æ¬inus;樺lus;樹b;æ§ime;樻ezium;æ¢Æchtã²ã½ãÄryã·ã»;ìð;äcy;ärok;ä
§Äioããxôá·headÄlrãã eftarro÷à¡ightarrow»à½à¤AHabcdfghlmoprstuwãããã¤ã°ã¼ã ã 㠣㠴ã¡ã¡ã¡«ã¢©ã£ã£ã£ªã£¶ròÏar;楣Äcrãã¢uteè»ÃºäºÃ²á
rÇ£ãª\0ãy;äve;ä
Äiyãµãºrcè»Ã»ä»;äÆabhã ã ã ròálac;ä
±aòáÄirã ã sht;楾;ìð²raveè»Ã¹ä¹Å¡ã §ã ±rÄlr㠬㠮»à¥Â»álk;æÄctã ¹ã¡É¯ã ¿\0\0ã¡rnÄ;eã¡
ã¡ær»ã¡op;æri;æ¸Äalã¡ã¡cr;ä
«è»Â¨ÍÄgp㡢㡦on;ä
³f;ìð¦Ìadhlsuá
㡸㡽á²ã¢ã¢ ownáá³arpoonÄlrã¢ã¢efôã ighô㠯iÆ;hlã¢ã¢ã¢ä
»áºon»ã¢parrows;æÆcit㢰ã£ã£É¯ã¢¶\0\0ã£rnÄ;e㢼㢽ær»㢽op;æng;ä
¯ri;æ¹cr;ìðÆdirã£ã£ã£¢ot;æ°lde;ä
©iÄ;fã°ã£¨Â»á Äam㣯㣲rò㢨lè»Ã¼ä¼angle;榧ÞABDacdeflnoprszã¤ã¤ã¤©ã¤ã¦µã¦¸ã¦½ã§ã§¤ã§¨ã§³ã§¹ã§½ã¨ã¨ ròϷarÄ;v㤦㤧櫨;æ«©asèϡÄnr㤲㤷grt;æ¦Îeknprstã£ã¥ã¥ã¥ã¥ã¥¤ã¦appáâothinÃ§áºÆhirã«â»ã¥opô⾵Ä;há·ã¥¢Ã¯ãÄiu㥩ã¥gmáã³Äbp㥲ã¦setneqÄ;q㥽ã¦ìâï¸;ìâ«ï¸setneqÄ;qã¦ã¦ìâï¸;ìâ«ï¸Ährã¦ã¦etáãiangleÄlr㦪㦯eft»थight»áy;ä²ashÂ»á¶Æelrã§ã§ã§Æ;beâ·ªã§ã§ar;æ»q;ælip;æ®Äbtã§á¨aòá©r;ìð³tré㦮suÄbp㧯㧱»à´Â»àµpf;ìð§roð໻tré㦴Äcuã¨ã¨r;ìðÄbpã¨ã¨nÄEeã¦ã¨Â»ã¥¾nÄEeã¦ã¨Â»ã¦igzag;æ¦Îcefoprs㨶㨻ã©ã©ã©ã©¡ã©ªirc;ä
µÄdiã©ã©Äbgã©
ã©ar;æ©eÄ;qáºã©;æerp;ær;ìð´pf;ìð¨Ä;eá¹ã©¦atèá¹cr;ìðà«£áãª\0ãª\0ãªãª\0\0ãªãª¨ãª«ãª¯\0\0ã«ã«\0ã«áátréár;ìðµÄAaãªãªròÏrò৶;ä¾ÄAa㪡㪤ròθrò৫aðâis;æ»Ædptá¤ãªµãª¾Äfl㪺á©;ìð©imÃ¥á²ÄAaã«ã«ròÏròà¨Äcqã«á¸r;ìðÄptáã«réáÐacefiosu㫰㫽ã¬ã¬ã¬ã¬ã¬ã¬¡cÄuyã«¶ã«»teè»Ã½ä½;äÄiyã¬ã¬rc;ä
·;änè»Â¥ä¥r;ìð¶cy;äpf;ìðªcr;ìðÄcm㬦㬩y;älè»Ã¿ä¿Ôacdefhioswããããã¤ã©ãã´ãºã®cute;ä
ºÄayããron;ä
¾;ä·ot;ä
¼Äetãã¡træáa;ä¶r;ìð·cy;ä¶grarr;æpf;ìð«cr;ìðÄjnã®
ã®;æj;æ
92'.split("").map(e=>e.charCodeAt(0))),sT=new Uint16Array("Èaglq \x15\x18\x1bÉ\x0f\0\0\x12p;ä¦os;ä§t;ä¾t;ä¼uot;ä¢".split("").map(e=>e.charCodeAt(0))),sD=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),sO=null!=(l=String.fromCodePoint)?l:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};function sN(e){return e>=a.ZERO&&e<=a.NINE}(t=a||(a={}))[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z",(n=c||(c={}))[n.VALUE_LENGTH=49152]="VALUE_LENGTH",n[n.BRANCH_LENGTH=16256]="BRANCH_LENGTH",n[n.JUMP_TABLE=127]="JUMP_TABLE",(r=h||(h={}))[r.EntityStart=0]="EntityStart",r[r.NumericStart=1]="NumericStart",r[r.NumericDecimal=2]="NumericDecimal",r[r.NumericHex=3]="NumericHex",r[r.NamedEntity=4]="NamedEntity",(i=u||(u={}))[i.Legacy=0]="Legacy",i[i.Strict=1]="Strict",i[i.Attribute=2]="Attribute";class sI{startEntity(e){this.decodeMode=e,this.state=h.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case h.EntityStart:if(e.charCodeAt(t)===a.NUM)return this.state=h.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1);return this.state=h.NamedEntity,this.stateNamedEntity(e,t);case h.NumericStart:return this.stateNumericStart(e,t);case h.NumericDecimal:return this.stateNumericDecimal(e,t);case h.NumericHex:return this.stateNumericHex(e,t);case h.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===a.LOWER_X?(this.state=h.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=h.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*Math.pow(r,i)+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){var r;let i=e.charCodeAt(t);if(!sN(i)&&(!((r=i)>=a.UPPER_A)||!(r<=a.UPPER_F))&&(!(r>=a.LOWER_A)||!(r<=a.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(!sN(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n,r,i;if(this.consumed<=t)return null==(n=this.errors)||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===a.SEMI)this.consumed+=1;else if(this.decodeMode===u.Strict)return 0;return this.emitCodePoint((r=this.result)>=55296&&r<=57343||r>1114111?65533:null!=(i=sD.get(r))?i:r,this.consumed),this.errors&&(e!==a.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&c.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let o=e.charCodeAt(t);if(this.treeIndex=function(e,t,n,r){let i=(t&c.BRANCH_LENGTH)>>7,o=t&c.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){let t=r-o;return t<0||t>=i?-1:e[n+t]-1}let s=n,l=s+i-1;for(;s<=l;){let t=s+l>>>1,n=e[t];if(n<r)s=t+1;else{if(!(n>r))return e[t+i];l=t-1}}return -1}(n,r,this.treeIndex+Math.max(1,i),o),this.treeIndex<0)return 0===this.result||this.decodeMode===u.Attribute&&(0===i||function(e){var t;return e===a.EQUALS||(t=e)>=a.UPPER_A&&t<=a.UPPER_Z||t>=a.LOWER_A&&t<=a.LOWER_Z||sN(t)}(o))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((r=n[this.treeIndex])&c.VALUE_LENGTH)>>14)){if(o===a.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==u.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return -1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&c.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null==(e=this.errors)||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~c.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case h.NamedEntity:return 0!==this.result&&(this.decodeMode!==u.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case h.NumericDecimal:return this.emitNumericEntity(0,2);case h.NumericHex:return this.emitNumericEntity(0,3);case h.NumericStart:return null==(e=this.errors)||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case h.EntityStart:return 0}}constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=h.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=u.Strict}}function sL(e){let t="",n=new sI(e,e=>t+=sO(e));return function(e,r){let i=0,o=0;for(;(o=e.indexOf("&",o))>=0;){t+=e.slice(i,o),n.startEntity(r);let s=n.write(e,o+1);if(s<0){i=o+n.end();break}i=o+s,o=0===s?i+1:i}let s=t+e.slice(i);return t="",s}}let sF=sL(s_);function sR(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Legacy;return sF(e,t)}sL(sT);let sz=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function sP(e,t){return function(n){let r,i=0,o="";for(;r=e.exec(n);
92)i!==r.index&&(o+=n.substring(i,r.index)),o+=t.get(r[0].charCodeAt(0)),i=r.index+1;return o+n.substring(i)}}String.prototype.codePointAt,sP(/[&<>'"]/g,sz),sP(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),sP(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),(o=d||(d={}))[o.XML=0]="XML",o[o.HTML=1]="HTML",(s=p||(p={}))[s.UTF8=0]="UTF8",s[s.ASCII=1]="ASCII",s[s.Extensive=2]="Extensive",s[s.Attribute=3]="Attribute",s[s.Text=4]="Text";let sB=Object.prototype.hasOwnProperty;function s$(e){let t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){if(t){if("object"!=typeof t)throw TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function sj(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function sq(e){return(!(e>=55296)||!(e<=57343))&&(!(e>=64976)||!(e<=65007))&&(65535&e)!=65535&&(65535&e)!=65534&&(!(e>=0)||!(e<=8))&&11!==e&&(!(e>=14)||!(e<=31))&&(!(e>=127)||!(e<=159))&&!(e>1114111)&&!0}function sV(e){return e>65535?String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e)):String.fromCharCode(e)}let sH=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,sW=RegExp(sH.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),sU=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function sK(e){return 0>e.indexOf("\\")&&0>e.indexOf("&")?e:e.replace(sW,function(e,t,n){if(t)return t;if(35===n.charCodeAt(0)&&sU.test(n)){let t="x"===n[1].toLowerCase()?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return sq(t)?sV(t):e}let r=sR(e);return r!==e?r:e})}let sJ=/[&<>"]/,sZ=/[&<>"]/g,sG={"&":"&","<":"<",">":">",'"':"""};function sQ(e){return sG[e]}function sX(e){return sJ.test(e)?e.replace(sZ,sQ):e}let sY=/[.?*+^$[\]\\(){}|-]/g;function s0(e){switch(e){case 9:case 32:return!0}return!1}function s1(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function s2(e){return sS.test(e)||sA.test(e)}function s3(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function s5(e){return(e=e.trim().replace(/\s+/g," ")).toLowerCase().toUpperCase()}e.s(["arrayReplaceAt",0,sj,"assign",0,s$,"escapeHtml",0,sX,"escapeRE",0,function(e){return e.replace(sY,"\\$&")},"fromCodePoint",0,sV,"has",0,function(e,t){return sB.call(e,t)},"isMdAsciiPunct",0,s3,"isPunctChar",0,s2,"isSpace",0,s0,"isString",0,function(e){return"[object String]"===Object.prototype.toString.call(e)},"isValidEntityCode",0,sq,"isWhiteSpace",0,s1,"lib",0,{mdurl:sx,ucmicro:sE},"normalizeReference",0,s5,"unescapeAll",0,sK,"unescapeMd",0,function(e){return 0>e.indexOf("\\")?e:e.replace(sH,"$1")}],141242);var s4=e.i(141242);e.s([],596285),e.i(596285),e.s(["parseLinkDestination",0,function(e,t,n){let r,i=t,o={ok:!1,pos:0,str:""};if(60===e.charCodeAt(i)){for(i++;i<n&&10!==(r=e.charCodeAt(i))&&60!==r;){if(62===r){o.pos=i+1,o.str=sK(e.slice(t+1,i)),o.ok=!0;break}if(92===r&&i+1<n){i+=2;continue}i++}return o}let s=0;for(;i<n&&32!==(r=e.charCodeAt(i))&&!(r<32)&&127!==r;){if(92===r&&i+1<n){if(32===e.charCodeAt(i+1))break;i+=2;continue}if(40===r&&++s>32)return o;if(41===r){if(0===s)break;s--}i++}return t===i||0!==s||(o.str=sK(e.slice(t,i)),o.pos=i,o.ok=!0),o},"parseLinkLabel",0,function(e,t,n){let r,i,o,s,l=e.posMax,a=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(o=e.src.charCodeAt(e.pos))&&0==--r){i=!0;break}if(s=e.pos,e.md.inline.skipToken(e),91===o){if(s===e.pos-1)r++;else if(n)return e.pos=a,-1}}let c=-1;return i&&(c=e.pos),e.pos=a,c},"parseLinkTitle",0,function(e,t,n,r){let i,o=t,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(o>=n)return s;let r=e.charCodeAt(o);if(34!==r&&39!==r&&40!==r)return s;t++,o++,40===r&&(r=41),s.marker=r}for(;o<n;){if((i=e.charCodeAt(o))===s.marker)return s.pos=o+1,s.str+=sK(e.slice(t,o)),s.ok=!0,s;if(40===i&&41===s.marker)return s;92===i&&o+1<n&&o++,o++}return s.can_continue=!0,s.str+=sK(e.slice(t,o)),s}],246377);var s6=e.i(246377);let s9={};function s8(){this.rules=s$({},s9)}function s7(){this.__rules__=[],this.__cache__=null}function le(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}function lt(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}s9.code_inline=function(e,t,n,r,i){let o=e[t];return"<code"+i.renderAttrs(o)+">
92"+sX(o.content)+"</code>"},s9.code_block=function(e,t,n,r,i){let o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+sX(e[t].content)+"</code></pre>\n"},s9.fence=function(e,t,n,r,i){let o,s=e[t],l=s.info?sK(s.info).trim():"",a="",c="";if(l){let e=l.split(/(\s+)/g);a=e[0],c=e.slice(2).join("")}if(0===(o=n.highlight&&n.highlight(s.content,a,c)||sX(s.content)).indexOf("<pre"))return o+"\n";if(l){let e=s.attrIndex("class"),t=s.attrs?s.attrs.slice():[];return e<0?t.push(["class",n.langPrefix+a]):(t[e]=t[e].slice(),t[e][1]+=" "+n.langPrefix+a),`<pre><code${i.renderAttrs({attrs:t})}>${o}</code></pre> 93`}return`<pre><code${i.renderAttrs(s)}>${o}</code></pre> 94`},s9.image=function(e,t,n,r,i){let o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},s9.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},s9.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},s9.text=function(e,t){return sX(e[t].content)},s9.html_block=function(e,t){return e[t].content},s9.html_inline=function(e,t){return e[t].content},s8.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return"";for(t=0,r="",n=e.attrs.length;t<n;t++)r+=" "+sX(e.attrs[t][0])+'="'+sX(e.attrs[t][1])+'"';return r},s8.prototype.renderToken=function(e,t,n){let r=e[t],i="";if(r.hidden)return"";r.block&&-1!==r.nesting&&t&&e[t-1].hidden&&(i+="\n"),i+=(-1===r.nesting?"</":"<")+r.tag,i+=this.renderAttrs(r),0===r.nesting&&n.xhtmlOut&&(i+=" /");let o=!1;if(r.block&&(o=!0,1===r.nesting&&t+1<e.length)){let n=e[t+1];"inline"===n.type||n.hidden?o=!1:-1===n.nesting&&n.tag===r.tag&&(o=!1)}return i+(o?">\n":">")},s8.prototype.renderInline=function(e,t,n){let r="",i=this.rules;for(let o=0,s=e.length;o<s;o++){let s=e[o].type;void 0!==i[s]?r+=i[s](e,o,t,n,this):r+=this.renderToken(e,o,t)}return r},s8.prototype.renderInlineAsText=function(e,t,n){let r="";for(let i=0,o=e.length;i<o;i++)switch(e[i].type){case"text":case"html_inline":case"html_block":r+=e[i].content;break;case"image":r+=this.renderInlineAsText(e[i].children,t,n);break;case"softbreak":case"hardbreak":r+="\n"}return r},s8.prototype.render=function(e,t,n){let r="",i=this.rules;for(let o=0,s=e.length;o<s;o++){let s=e[o].type;"inline"===s?r+=this.renderInline(e[o].children,t,n):void 0!==i[s]?r+=i[s](e,o,t,n,this):r+=this.renderToken(e,o,t,n)}return r},s7.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return -1},s7.prototype.__compile__=function(){let e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){0>t.indexOf(e)&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){!n.enabled||t&&0>n.alt.indexOf(t)||e.__cache__[t].push(n.fn)})})},s7.prototype.at=function(e,t,n){let r=this.__find__(e);if(-1===r)throw Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=(n||{}).alt||[],this.__cache__=null},s7.prototype.before=function(e,t,n,r){let i=this.__find__(e);if(-1===i)throw Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:(r||{}).alt||[]}),this.__cache__=null},s7.prototype.after=function(e,t,n,r){let i=this.__find__(e);if(-1===i)throw Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:(r||{}).alt||[]}),this.__cache__=null},s7.prototype.push=function(e,t,n){this.__rules__.push({name:e,enabled:!0,fn:t,alt:(n||{}).alt||[]}),this.__cache__=null},s7.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)},this),this.__cache__=null,n},s7.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},s7.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)},this),this.__cache__=null,n},s7.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},le.prototype.attrIndex=function(e){if(!this.attrs)return -1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return -1},le.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},le.prototype.attrSet=function(e,t){let n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},le.prototype.attrGet=function(e){let t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},le.prototype.attrJoin=function(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},lt.prototype.Token=le;let ln=/\r\n?|\n/g,lr=/\0/g,li=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,lo=/\((c|tm|r)\)/i,ls=/\((c|tm|r)\)/ig,ll={c:"©",r:"®",tm:"â¢"};function la(e,t){return ll[t.toLowerCase()]}let lc=/['"]/,lh=/['"]/g;function lu(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}let ld=[["normalize",function(e){let t;t=(t=e.src.replace(ln,"\n")).replace(lr,"�"),e.src=t}],["block",function(e){let t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}],["linkify",function(e){let t=e.tokens;if(e.md.options.linkify)for(let i=0,o=t.length;i<o;i++){if("inline"!==t[i].type||!e.md.linkify.pretest(t[i].content))continue;let o=t[i].children,s=0;for(let l=o.length-1;l>=0;l--){let a=o[l];if("link_close"===a.type){for(l--;o[l].level!==a.level&&"link_open"!==o[l].type;)l--;continue}if("html_inline"===a.type){var n,r;n=a.content,/^<a[>\s]/i.test(n)&&s>0&&s--,r=a.content,/^<\/a\s*>/i.test(r)&&s++}if(!(s>0)&&"text"===a.type&&e.md.linkify.test(a.content)){let n=a.content,r=e.md.linkify.match(n),s=[],c=a.level,h=0;r.length>0&&0===r[0].index&&l>0&&"text_special"===o[l-1].type&&(r=r.slice(1));for(let t=0;t<r.length;t++){let i=r[t].url,o=e.md.normalizeLink(i);if(!e.md.validateLink(o))continue;let l=r[t].text;l=r[t].schema?"mailto:"!==r[t].schema||/^mailto:/i.test(l)?e.md.normalizeLinkText(l):e.md.normalizeLinkText("mailto:"+l).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+l).replace(/^http:\/\//,"");let a=r[t].index;if(a>h){let t=new e.Token("text","",0);t.content=n.slice(h,a),t.level=c,s.push(t)}let u=new e.Token("link_open","a",1);u.attrs=[["href",o]],u.level=c++,u.markup="linkify",u.info="auto",s.push(u);let d=new e.Token("text","",0);
94d.content=l,d.level=c,s.push(d);let p=new e.Token("link_close","a",-1);p.level=--c,p.markup="linkify",p.info="auto",s.push(p),h=r[t].lastIndex}if(h<n.length){let t=new e.Token("text","",0);t.content=n.slice(h),t.level=c,s.push(t)}t[i].children=o=sj(o,l,s)}}}}],["replacements",function(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(lo.test(e.tokens[t].content)&&function(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];"text"!==r.type||t||(r.content=r.content.replace(ls,la)),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}(e.tokens[t].children),li.test(e.tokens[t].content)&&function(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];"text"===r.type&&!t&&li.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"â¦").replace(/([?!])â¦/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1â").replace(/(^|\s)--(?=\s|$)/mg,"$1â").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1â")),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}(e.tokens[t].children))}],["smartquotes",function(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&lc.test(e.tokens[t].content)&&function(e,t){let n,r=[];for(let i=0;i<e.length;i++){let o=e[i],s=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=s);n--);if(r.length=n+1,"text"!==o.type)continue;let l=o.content,a=0,c=l.length;t:for(;a<c;){lh.lastIndex=a;let h=lh.exec(l);if(!h)break;let u=!0,d=!0;a=h.index+1;let p="'"===h[0],f=32;if(h.index-1>=0)f=l.charCodeAt(h.index-1);else for(n=i-1;n>=0&&"softbreak"!==e[n].type&&"hardbreak"!==e[n].type;n--)if(e[n].content){f=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(a<c)m=l.charCodeAt(a);else for(n=i+1;n<e.length&&"softbreak"!==e[n].type&&"hardbreak"!==e[n].type;n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}let g=s3(f)||s2(String.fromCharCode(f)),k=s3(m)||s2(String.fromCharCode(m)),y=s1(f),b=s1(m);if(b?u=!1:k&&!(y||g)&&(u=!1),y?d=!1:g&&!(b||k)&&(d=!1),34===m&&'"'===h[0]&&f>=48&&f<=57&&(d=u=!1),u&&d&&(u=g,d=k),!u&&!d){p&&(o.content=lu(o.content,h.index,"â"));continue}if(d)for(n=r.length-1;n>=0;n--){let u=r[n];if(r[n].level<s)break;if(u.single===p&&r[n].level===s){let s,d;u=r[n],p?(s=t.md.options.quotes[2],d=t.md.options.quotes[3]):(s=t.md.options.quotes[0],d=t.md.options.quotes[1]),o.content=lu(o.content,h.index,d),e[u.token].content=lu(e[u.token].content,u.pos,s),a+=d.length-1,u.token===i&&(a+=s.length-1),c=(l=o.content).length,r.length=n;continue t}}u?r.push({token:i,pos:h.index,single:p,level:s}):d&&p&&(o.content=lu(o.content,h.index,"â"))}}}(e.tokens[t].children,e)}],["text_join",function(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if("inline"!==r[e].type)continue;let i=r[e].children,o=i.length;for(t=0;t<o;t++)"text_special"===i[t].type&&(i[t].type="text");for(t=n=0;t<o;t++)"text"===i[t].type&&t+1<o&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}]];function lp(){this.ruler=new s7;for(let e=0;e<ld.length;e++)this.ruler.push(ld[e][0],ld[e][1])}function lf(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;let i=this.src;for(let e=0,t=0,n=0,r=0,o=i.length,s=!1;t<o;t++){let l=i.charCodeAt(t);if(!s)if(s0(l)){n++,9===l?r+=4-r%4:r++;continue}else s=!0;(10===l||t===o-1)&&(10!==l&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),s=!1,n=0,r=0,e=t+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}function lm(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function lg(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),o=!1,s=0,l="";for(;r<n;)124===i&&(o?(l+=e.substring(s,r-1),s=r):(t.push(l+e.substring(s,r)),l="",s=r+1)),o=92===i,r++,i=e.charCodeAt(r);return t.push(l+e.substring(s)),t}function lk(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCo
94deAt(r++);return 42!==i&&45!==i&&43!==i||r<n&&!s0(e.src.charCodeAt(r))?-1:r}function ly(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return -1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return -1;for(;;){if(i>=r)return -1;if((o=e.src.charCodeAt(i++))>=48&&o<=57){if(i-n>=10)return -1;continue}if(41===o||46===o)break;return -1}return i<r&&!s0(o=e.src.charCodeAt(i))?-1:i}lp.prototype.process=function(e){let t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},lp.prototype.State=lt,lf.prototype.push=function(e,t,n){let r=new le(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},lf.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},lf.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},lf.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t&&s0(this.src.charCodeAt(e));e++);return e},lf.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!s0(this.src.charCodeAt(--e)))return e+1;return e},lf.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},lf.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},lf.prototype.getLines=function(e,t,n,r){if(e>=t)return"";let i=Array(t-e);for(let o=0,s=e;s<t;s++,o++){let e,l=0,a=this.bMarks[s],c=a;for(e=s+1<t||r?this.eMarks[s]+1:this.eMarks[s];c<e&&l<n;){let e=this.src.charCodeAt(c);if(s0(e))9===e?l+=4-(l+this.bsCount[s])%4:l++;else if(c-a<this.tShift[s])l++;else break;c++}l>n?i[o]=Array(l-n+1).join(" ")+this.src.slice(c,e):i[o]=this.src.slice(c,e)}return i.join("")},lf.prototype.Token=le;let lb="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",lv="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",lx=RegExp("^(?:"+lb+"|"+lv+"|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),lw=RegExp("^(?:"+lb+"|"+lv+")"),lC=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp("^</?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?=(\\s|/?>|$))","i"),/^$/,!0],[RegExp(lw.source+"\\s*$"),/^$/,!1]],lS=[["table",function(e,t,n,r){let i;if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let s=e.bMarks[o]+e.tShift[o];if(s>=e.eMarks[o])return!1;let l=e.src.charCodeAt(s++);if(124!==l&&45!==l&&58!==l||s>=e.eMarks[o])return!1;let a=e.src.charCodeAt(s++);if(124!==a&&45!==a&&58!==a&&!s0(a)||45===l&&s0(a))return!1;for(;s<e.eMarks[o];){let t=e.src.charCodeAt(s);if(124!==t&&45!==t&&58!==t&&!s0(t))return!1;s++}let c=lm(e,t+1),h=c.split("|"),u=[];for(let e=0;e<h.length;e++){let t=h[e].trim();if(!t)if(0===e||e===h.length-1)continue;else return!1;if(!/^:?-+:?$/.test(t))return!1;58===t.charCodeAt(t.length-1)?u.push(58===t.charCodeAt(0)?"center":"right"):58===t.charCodeAt(0)?u.push("left"):u.push("")}if(-1===(c=lm(e,t).trim()).indexOf("|")||e.sCount[t]-e.blkIndent>=4)return!1;(h=lg(c)).length&&""===h[0]&&h.shift(),h.length&&""===h[h.length-1]&&h.pop();let d=h.length;if(0===d||d!==u.length)return!1;if(r)return!0;let p=e.parentType;e.parentType="table";let f=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),g=[t,0];m.map=g,e.push("thead_open","thead",1).map=[t,t+1],e.push("tr_open","tr",1).map=[t,t+1];for(let t=0;t<h.length;t++){let n=e.push("th_open","th",1);u[t]&&(n.attrs=[["style","text-align:"+u[t]]]);let r=e.push("inline","",0);r.content=h[t].trim(),r.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let k=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let r=!1;for(let t=0,i=f.length;t<i;t++)if(f[t](e,o,n,!0)){r=!0;break}if(r||!(c=lm(e,o).trim())||e.sCount[o]-e.blkIndent>=4||((h=lg(c)).length&&""===h[0]&&h.shift(),h.length&&""===h[h.length-1]&&h.pop(),(k+=d-h.length)>65536))break;o===t+2&&(e.push("tbody_open","tbody",1).map=i=[t+2,0]),e.push("tr_open","tr",1).map=[o,o+1];for(let t=0;t<d;t++){let n=e.push("td_open","td",1);u[t]&&(n.attrs=[["style","text-align:"+u[t]]]);let r=e.push("inline","",0);r.content=h[t]?h[t].trim():"",r.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return i&&(e.push("tbody_close","tbody",-1),i[1]=o),e.push("table_close","table",-1),g[1]=o,e.parentType=p,e.line=o,!0},["paragraph","reference"]],["code",function(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){i=++r;continue}break}e.line=i;let o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}],["fence",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;
94let s=e.src.charCodeAt(i);if(126!==s&&96!==s)return!1;let l=i,a=(i=e.skipChars(i,s))-l;if(a<3)return!1;let c=e.src.slice(l,i),h=e.src.slice(i,o);if(96===s&&h.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let u=t,d=!1;for(;!(++u>=n)&&(!((i=l=e.bMarks[u]+e.tShift[u])<(o=e.eMarks[u]))||!(e.sCount[u]<e.blkIndent));){;if(!(e.src.charCodeAt(i)!==s||e.sCount[u]-e.blkIndent>=4||(i=e.skipChars(i,s))-l<a)&&!((i=e.skipSpaces(i))<o)){d=!0;break}}a=e.sCount[t],e.line=u+ +!!d;let p=e.push("fence","code",0);return p.info=h,p.content=e.getLines(t+1,u,a,!0),p.markup=c,p.map=[t,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,t,n,r){let i,o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||62!==e.src.charCodeAt(o))return!1;if(r)return!0;let a=[],c=[],h=[],u=[],d=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let f=!1;for(i=t;i<n;i++){let t=e.sCount[i]<e.blkIndent;if((o=e.bMarks[i]+e.tShift[i])>=(s=e.eMarks[i]))break;if(62===e.src.charCodeAt(o++)&&!t){let t,n,r=e.sCount[i]+1;32===e.src.charCodeAt(o)?(o++,r++,n=!1,t=!0):9===e.src.charCodeAt(o)?(t=!0,(e.bsCount[i]+r)%4==3?(o++,r++,n=!1):n=!0):t=!1;let l=r;
94for(a.push(e.bMarks[i]),e.bMarks[i]=o;o<s;){let t=e.src.charCodeAt(o);if(s0(t))9===t?l+=4-(l+e.bsCount[i]+ +!!n)%4:l++;else break;o++}f=o>=s,c.push(e.bsCount[i]),e.bsCount[i]=e.sCount[i]+1+ +!!t,h.push(e.sCount[i]),e.sCount[i]=l-r,u.push(e.tShift[i]),e.tShift[i]=o-e.bMarks[i];continue}if(f)break;let r=!1;for(let t=0,o=d.length;t<o;t++)if(d[t](e,i,n,!0)){r=!0;break}if(r){e.lineMax=i,0!==e.blkIndent&&(a.push(e.bMarks[i]),c.push(e.bsCount[i]),u.push(e.tShift[i]),h.push(e.sCount[i]),e.sCount[i]-=e.blkIndent);break}a.push(e.bMarks[i]),c.push(e.bsCount[i]),u.push(e.tShift[i]),h.push(e.sCount[i]),e.sCount[i]=-1}let m=e.blkIndent;e.blkIndent=0;let g=e.push("blockquote_open","blockquote",1);g.markup=">";let k=[t,0];g.map=k,e.md.block.tokenize(e,t,i),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=l,e.parentType=p,k[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=a[n],e.tShift[n+t]=u[n],e.sCount[n+t]=h[n],e.bsCount[n+t]=c[n];return e.blkIndent=m,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(o++);if(42!==s&&45!==s&&95!==s)return!1;let l=1;for(;o<i;){let t=e.src.charCodeAt(o++);if(t!==s&&!s0(t))return!1;t===s&&l++}if(l<3)return!1;if(r)return!0;e.line=t+1;let a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=Array(l+1).join(String.fromCharCode(s)),!0},["paragraph","reference","blockquote","list"]],["list",function(e,t,n,r){let i,o,s,l,a,c,h,u=t,d=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let p=!1;if(r&&"paragraph"===e.parentType&&e.sCount[u]>=e.blkIndent&&(p=!0),(h=ly(e,u))>=0){if(a=!0,s=e.bMarks[u]+e.tShift[u],c=Number(e.src.slice(s,h-1)),p&&1!==c)return!1}else{if(!((h=lk(e,u))>=0))return!1;a=!1}if(p&&e.skipSpaces(h)>=e.eMarks[u])return!1;if(r)return!0;let f=e.src.charCodeAt(h-1),m=e.tokens.length;a?(l=e.push("ordered_list_open","ol",1),1!==c&&(l.attrs=[["start",c]])):l=e.push("bullet_list_open","ul",1);let g=[u,0];l.map=g,l.markup=String.fromCharCode(f);let k=!1,y=e.md.block.ruler.getRules("list"),b=e.parentType;for(e.parentType="list";u<n;){let t;o=h,i=e.eMarks[u];let r=e.sCount[u]+h-(e.bMarks[u]+e.tShift[u]),c=r;for(;o<i;){let t=e.src.charCodeAt(o);if(9===t)c+=4-(c+e.bsCount[u])%4;else if(32===t)c++;else break;o++}let p=o;(t=p>=i?1:c-r)>4&&(t=1);let m=r+t;(l=e.push("list_item_open","li",1)).markup=String.fromCharCode(f);let g=[u,0];l.map=g,a&&(l.info=e.src.slice(s,h-1));let b=e.tight,v=e.tShift[u],x=e.sCount[u],w=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=m,e.tight=!0,e.tShift[u]=p-e.bMarks[u],e.sCount[u]=c,p>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||k)&&(d=!1),k=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[u]=v,e.sCount[u]=x,e.tight=b,(l=e.push("list_item_close","li",-1)).markup=String.fromCharCode(f),u=e.line,g[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let C=!1;for(let t=0,r=y.length;t<r;t++)if(y[t](e,u,n,!0)){C=!0;break}if(C)break;if(a){if((h=ly(e,u))<0)break;s=e.bMarks[u]+e.tShift[u]}else if((h=lk(e,u))<0)break;if(f!==e.src.charCodeAt(h-1))break}return(l=a?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(f),g[1]=u,e.line=u,e.parentType=b,d&&function(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}(e,m),!0},["paragraph","reference","blockquote"]],["reference",function(e,t,n,r){let i,o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l=t+1;if(e.sCount[t]-e.blkIndent>=4||91!==e.src.charCodeAt(o))return!1;function a(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let o=!1;for(let i=0,s=r.length;i<s;i++)if(r[i](e,t,n,!0)){o=!0;break}if(e.parentType=i,o)return null}let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(i,o+1)}let c=e.src.slice(o,s+1);s=c.length;let h=-1;for(o=1;o<s;
94o++){let e=c.charCodeAt(o);if(91===e)return!1;if(93===e){h=o;break}if(10===e){let e=a(l);null!==e&&(c+=e,s=c.length,l++)}else if(92===e&&++o<s&&10===c.charCodeAt(o)){let e=a(l);null!==e&&(c+=e,s=c.length,l++)}}if(h<0||58!==c.charCodeAt(h+1))return!1;for(o=h+2;o<s;o++){let e=c.charCodeAt(o);if(10===e){let e=a(l);null!==e&&(c+=e,s=c.length,l++)}else if(s0(e));else break}let u=e.md.helpers.parseLinkDestination(c,o,s);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;let p=o=u.pos,f=l,m=o;for(;o<s;o++){let e=c.charCodeAt(o);if(10===e){let e=a(l);null!==e&&(c+=e,s=c.length,l++)}else if(s0(e));else break}let g=e.md.helpers.parseLinkTitle(c,o,s);for(;g.can_continue;){let t=a(l);if(null===t)break;c+=t,o=s,s=c.length,l++,g=e.md.helpers.parseLinkTitle(c,o,s,g)}for(o<s&&m!==o&&g.ok?(i=g.str,o=g.pos):(i="",o=p,l=f);o<s&&s0(c.charCodeAt(o));)o++;if(o<s&&10!==c.charCodeAt(o)&&i)for(i="",o=p,l=f;o<s&&s0(c.charCodeAt(o));)o++;if(o<s&&10!==c.charCodeAt(o))return!1;let k=s5(c.slice(1,h));return!!k&&(!!r||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[k]&&(e.env.references[k]={title:i,href:d}),e.line=l,!0))}],["html_block",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||60!==e.src.charCodeAt(i))return!1;let s=e.src.slice(i,o),l=0;for(;l<lC.length&&!lC[l][0].test(s);l++);if(l===lC.length)return!1;if(r)return lC[l][2];let a=t+1;if(!lC[l][1].test(s)){for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(i=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],s=e.src.slice(i,o),lC[l][1].test(s)){0!==s.length&&a++;break}}e.line=a;let c=e.push("html_block","",0);return c.map=[t,a],c.content=e.getLines(t,a,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(i);if(35!==s||i>=o)return!1;let l=1;for(s=e.src.charCodeAt(++i);35===s&&i<o&&l<=6;)l++,s=e.src.charCodeAt(++i);if(l>6||i<o&&!s0(s))return!1;if(r)return!0;o=e.skipSpacesBack(o,i);let a=e.skipCharsBack(o,35,i);a>i&&s0(e.src.charCodeAt(a-1))&&(o=a),e.line=t+1;let c=e.push("heading_open","h"+String(l),1);c.markup="########".slice(0,l),c.map=[t,e.line];let h=e.push("inline","",0);return h.content=e.src.slice(i,o).trim(),h.map=[t,e.line],h.children=[],e.push("heading_close","h"+String(l),-1).markup="########".slice(0,l),!0},["paragraph","reference","blockquote"]],["lheading",function(e,t,n){let r,i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let s=0,l=t+1;for(;l<n&&!e.isEmpty(l);l++){if(e.sCount[l]-e.blkIndent>3)continue;if(e.sCount[l]>=e.blkIndent){let t=e.bMarks[l]+e.tShift[l],n=e.eMarks[l];if(t<n&&(45===(r=e.src.charCodeAt(t))||61===r)&&(t=e.skipChars(t,r),(t=e.skipSpaces(t))>=n)){s=61===r?1:2;break}}if(e.sCount[l]<0)continue;let t=!1;for(let r=0,o=i.length;r<o;r++)if(i[r](e,l,n,!0)){t=!0;break}if(t)break}if(!s)return!1;let a=e.getLines(t,l,e.blkIndent,!1).trim();e.line=l+1;let c=e.push("heading_open","h"+String(s),1);c.markup=String.fromCharCode(r),c.map=[t,e.line];let h=e.push("inline","",0);return h.content=a,h.map=[t,e.line-1],h.children=[],e.push("heading_close","h"+String(s),-1).markup=String.fromCharCode(r),e.parentType=o,!0}],["paragraph",function(e,t,n){let r=e.md.block.ruler.getRules("paragraph"),i=e.parentType,o=t+1;for(e.parentType="paragraph";o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let t=!1;for(let i=0,s=r.length;i<s;i++)if(r[i](e,o,n,!0)){t=!0;break}if(t)break}let s=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o,e.push("paragraph_open","p",1).map=[t,e.line];let l=e.push("inline","",0);return l.content=s,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}]];function lA(){this.ruler=new s7;for(let e=0;e<lS.length;e++)this.ruler.push(lS[e][0],lS[e][1],{alt:(lS[e][2]||[]).slice()})}function lM(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}lA.prototype.tokenize=function(e,t,n){let r=this.ruler.getRules(""),i=r.length,o=e.md.options.maxNesting,s=t,l=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n)&&!(e.sCount[s]<e.blkIndent));){if(e.level>=o){e.line=n;break}let t=e.line,a=!1;for(let o=0;o<i;o++)if(a=r[o](e,s,n,!1)){if(t>=e.line)throw Error("block rule didn't increment state.line");break}if(!a)throw Error("none of the block rules matched");e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),(s=e.line)<n&&e.isEmpty(s)&&(l=!0,e.line=++s)}},lA.prototype.parse=function(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)},lA.prototype.State=lf,lM.prototype.pushPending=function(){let e=new le("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},lM.prototype.push=function(e,t,n){this.pending&&this.pushPending();let r=new le(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r}
94,lM.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32,o=e;for(;o<n&&this.src.charCodeAt(o)===r;)o++;let s=o-e,l=o<n?this.src.charCodeAt(o):32,a=s3(i)||s2(String.fromCharCode(i)),c=s3(l)||s2(String.fromCharCode(l)),h=s1(i),u=s1(l),d=!u&&(!c||h||a),p=!h&&(!a||u||c);return{can_open:d&&(t||!p||a),can_close:p&&(t||!d||c),length:s}},lM.prototype.Token=le;let lE=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,l_=[];for(let e=0;e<256;e++)l_.push(0);function lT(e,t){let n,r=[],i=t.length;for(let o=0;o<i;o++){let i=t[o];if(126!==i.marker||-1===i.end)continue;let s=t[i.end];(n=e.tokens[i.token]).type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",(n=e.tokens[s.token]).type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&r.push(s.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&"s_close"===e.tokens[i].type;)i++;t!==--i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){l_[e.charCodeAt(0)]=1});function lD(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(95!==n.marker&&42!==n.marker||-1===n.end)continue;let i=t[n.end],o=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,s=String.fromCharCode(n.marker),l=e.tokens[n.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?s+s:s,l.content="";let a=e.tokens[i.token];a.type=o?"strong_close":"em_close",a.tag=o?"strong":"em",a.nesting=-1,a.markup=o?s+s:s,a.content="",o&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--)}}let lO=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,lN=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/,lI=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,lL=/^&([a-z][a-z0-9]{1,31});/i;function lF(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,o=[];for(let s=0;s<n;s++){let n=e[s];if(o.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=s),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let l=t[n.marker][3*!!n.open+n.length%3],a=r-o[r]-1,c=a;for(;a>l;a-=o[a]+1){let t=e[a];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=a>0&&!e[a-1].open?o[a-1]+1:0;o[s]=s-a+r,o[a]=r,n.open=!1,t.end=s,t.close=!1,c=-1,i=-2;break}}}-1!==c&&(t[n.marker][3*!!n.open+(n.length||0)%3]=c)}}let lR=[["text",function(e,t){let n=e.pos;for(;n<e.posMax&&!function(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}],["linkify",function(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos;if(n+3>e.posMax||58!==e.src.charCodeAt(n)||47!==e.src.charCodeAt(n+1)||47!==e.src.charCodeAt(n+2))return!1;let r=e.pending.match(lE);if(!r)return!1;let i=r[1],o=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!o)return!1;let s=o.url;if(s.length<=i.length)return!1;let l=s.length;for(;l>0&&42===s.charCodeAt(l-1);)l--;l!==s.length&&(s=s.slice(0,l));let a=e.md.normalizeLink(s);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);let t=e.push("link_open","a",1);t.attrs=[["href",a]],t.markup="linkify",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(s);let n=e.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return e.pos+=s.length-i.length,!0}],["newline",function(e,t){let n=e.pos;if(10!==e.src.charCodeAt(n))return!1;let r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&32===e.pending.charCodeAt(r))if(r>=1&&32===e.pending.charCodeAt(r-1)){let t=r-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;
94n<i&&s0(e.src.charCodeAt(n));)n++;return e.pos=n,!0}],["escape",function(e,t){let n=e.pos,r=e.posMax;if(92!==e.src.charCodeAt(n)||++n>=r)return!1;let i=e.src.charCodeAt(n);if(10===i){for(t||e.push("hardbreak","br",0),n++;n<r&&s0(i=e.src.charCodeAt(n));)n++;return e.pos=n,!0}let o=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(o+=e.src[n+1],n++)}let s="\\"+o;if(!t){let t=e.push("text_special","",0);i<256&&0!==l_[i]?t.content=o:t.content=s,t.markup=s,t.info="escape"}return e.pos=n+1,!0}],["backticks",function(e,t){let n,r=e.pos;if(96!==e.src.charCodeAt(r))return!1;let i=r;r++;let o=e.posMax;for(;r<o&&96===e.src.charCodeAt(r);)r++;let s=e.src.slice(i,r),l=s.length;if(e.backticksScanned&&(e.backticks[l]||0)<=i)return t||(e.pending+=s),e.pos+=l,!0;let a=r;for(;-1!==(n=e.src.indexOf("`",a));){for(a=n+1;a<o&&96===e.src.charCodeAt(a);)a++;let i=a-n;if(i===l){if(!t){let t=e.push("code_inline","code",0);t.markup=s,t.content=e.src.slice(r,n).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=a,!0}e.backticks[i]=n}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=l,!0}],["strikethrough",function(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||126!==r)return!1;let i=e.scanDelims(e.pos,!0),o=i.length,s=String.fromCharCode(r);if(o<2)return!1;o%2&&(e.push("text","",0).content=s,o--);for(let t=0;t<o;t+=2)e.push("text","",0).content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}],["emphasis",function(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||95!==r&&42!==r)return!1;let i=e.scanDelims(e.pos,42===r);for(let t=0;t<i.length;t++)e.push("text","",0).content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}],["link",function(e,t){let n,r,i,o,s="",l="",a=e.pos,c=!0;if(91!==e.src.charCodeAt(e.pos))return!1;let h=e.pos,u=e.posMax,d=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let f=p+1;if(f<u&&40===e.src.charCodeAt(f)){for(c=!1,f++;f<u&&(s0(n=e.src.charCodeAt(f))||10===n);f++);if(f>=u)return!1;if(a=f,(i=e.md.helpers.parseLinkDestination(e.src,f,e.posMax)).ok){for(s=e.md.normalizeLink(i.str),e.md.validateLink(s)?f=i.pos:s="",a=f;f<u&&(s0(n=e.src.charCodeAt(f))||10===n);f++);if(i=e.md.helpers.parseLinkTitle(e.src,f,e.posMax),f<u&&a!==f&&i.ok)for(l=i.str,f=i.pos;f<u&&(s0(n=e.src.charCodeAt(f))||10===n);f++);}(f>=u||41!==e.src.charCodeAt(f))&&(c=!0),f++}if(c){if(void 0===e.env.references)return!1;if(f<u&&91===e.src.charCodeAt(f)?(a=f+1,(f=e.md.helpers.parseLinkLabel(e,f))>=0?r=e.src.slice(a,f++):f=p+1):f=p+1,r||(r=e.src.slice(d,p)),!(o=e.env.references[s5(r)]))return e.pos=h,!1;s=o.href,l=o.title}if(!t){e.pos=d,e.posMax=p;let t=e.push("link_open","a",1),n=[["href",s]];t.attrs=n,l&&n.push(["title",l]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=f,e.posMax=u,!0}],["image",function(e,t){let n,r,i,o,s,l,a,c,h="",u=e.pos,d=e.posMax;if(33!==e.src.charCodeAt(e.pos)||91!==e.src.charCodeAt(e.pos+1))return!1;let p=e.pos+2,f=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(f<0)return!1;if((o=f+1)<d&&40===e.src.charCodeAt(o)){for(o++;o<d&&(s0(n=e.src.charCodeAt(o))||10===n);o++);if(o>=d)return!1;for(c=o,(l=e.md.helpers.parseLinkDestination(e.src,o,e.posMax)).ok&&(h=e.md.normalizeLink(l.str),e.md.validateLink(h)?o=l.pos:h=""),c=o;o<d&&(s0(n=e.src.charCodeAt(o))||10===n);o++);if(l=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<d&&c!==o&&l.ok)for(a=l.str,o=l.pos;o<d&&(s0(n=e.src.charCodeAt(o))||10===n);o++);else a="";if(o>=d||41!==e.src.charCodeAt(o))return e.pos=u,!1;o++}else{if(void 0===e.env.references)return!1;if(o<d&&91===e.src.charCodeAt(o)?(c=o+1,(o=e.md.helpers.parseLinkLabel(e,o))>=0?i=e.src.slice(c,o++):o=f+1):o=f+1,i||(i=e.src.slice(p,f)),!(s=e.env.references[s5(i)]))return e.pos=u,!1;h=s.href,a=s.title}if(!t){r=e.src.slice(p,f);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push("image","img",0),i=[["src",h],["alt",""]];n.attrs=i,n.children=t,n.content=r,a&&i.push(["title",a])}return e.pos=o,e.posMax=d,!0}],["autolink",function(e,t){let n=e.pos;
94if(60!==e.src.charCodeAt(n))return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(60===t)return!1;if(62===t)break}let o=e.src.slice(r+1,n);if(lN.test(o)){let n=e.md.normalizeLink(o);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);let r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=o.length+2,!0}if(lO.test(o)){let n=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);let r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=o.length+2,!0}return!1}],["html_inline",function(e,t){let n;if(!e.md.options.html)return!1;let r=e.posMax,i=e.pos;if(60!==e.src.charCodeAt(i)||i+2>=r)return!1;let o=e.src.charCodeAt(i+1);if(33!==o&&63!==o&&47!==o&&(!((n=32|o)>=97)||!(n<=122)))return!1;let s=e.src.slice(i).match(lx);if(!s)return!1;if(!t){var l,a;let t=e.push("html_inline","",0);t.content=s[0],l=t.content,/^<a[>\s]/i.test(l)&&e.linkLevel++,a=t.content,/^<\/a\s*>/i.test(a)&&e.linkLevel--}return e.pos+=s[0].length,!0}],["entity",function(e,t){let n=e.pos,r=e.posMax;if(38!==e.src.charCodeAt(n)||n+1>=r)return!1;if(35===e.src.charCodeAt(n+1)){let r=e.src.slice(n).match(lI);if(r){if(!t){let t="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push("text_special","",0);n.content=sq(t)?sV(t):sV(65533),n.markup=r[0],n.info="entity"}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(lL);if(r){let n=sR(r[0]);if(n!==r[0]){if(!t){let t=e.push("text_special","",0);t.content=n,t.markup=r[0],t.info="entity"}return e.pos+=r[0].length,!0}}}return!1}]],lz=[["balance_pairs",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;lF(e.delimiters);for(let e=0;e<n;e++)t[e]&&t[e].delimiters&&lF(t[e].delimiters)}],["strikethrough",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;lT(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&lT(e,t[r].delimiters)}],["emphasis",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;lD(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&lD(e,t[r].delimiters)}],["fragments_join",function(e){let t,n,r=0,i=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,"text"===i[t].type&&t+1<o&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}]];function lP(){this.ruler=new s7;for(let e=0;e<lR.length;e++)this.ruler.push(lR[e][0],lR[e][1]);this.ruler2=new s7;for(let e=0;e<lz.length;e++)this.ruler2.push(lz[e][0],lz[e][1])}function lB(e){let t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function l$(e){return Object.prototype.toString.call(e)}function lj(e){return"[object Function]"===l$(e)}function lq(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}lP.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(""),r=n.length,i=e.md.options.maxNesting,o=e.cache;if(void 0!==o[t]){e.pos=o[t];return}let s=!1;if(e.level<i){for(let i=0;i<r;
94i++)if(e.level++,s=n[i](e,!0),e.level--,s){if(t>=e.pos)throw Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;!s&&e.pos++,o[t]=e.pos},lP.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let o=e.pos,s=!1;if(e.level<i){for(let r=0;r<n;r++)if(s=t[r](e,!1)){if(o>=e.pos)throw Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},lP.prototype.parse=function(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let o=this.ruler2.getRules(""),s=o.length;for(let e=0;e<s;e++)o[e](i)},lP.prototype.State=lM;let lV={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},lH={"http:":{validate:function(e,t,n){let r=e.slice(t);return(n.re.http||(n.re.http=RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r))?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return(n.re.no_http||(n.re.no_http=RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r))?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return(n.re.mailto||(n.re.mailto=RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r))?r.match(n.re.mailto)[0].length:0}}},lW="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|ÑÑ".split("|");function lU(){return function(e,t){t.normalize(e)}}function lK(e){var t;let n,r,i=(t=e.__opts__,t=t||{},(n={}).src_Any=sw.source,n.src_Cc=sC.source,n.src_Z=sM.source,n.src_P=sS.source,n.src_ZPCc=[n.src_Z,n.src_P,n.src_Cc].join("|"),n.src_ZCc=[n.src_Z,n.src_Cc].join("|"),n.src_pseudo_letter="(?:(?!"+(r="[><ï½]")+"|"+n.src_ZPCc+")"+n.src_Any+")",n.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n.src_auth="(?:(?:(?!"+n.src_ZCc+"|[@/\\[\\]()]).)+@)?",n.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",n.src_host_terminator="(?=$|"+r+"|"+n.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+n.src_ZPCc+"))",n.src_path="(?:[/?#](?:(?!"+n.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+n.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+n.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+n.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+n.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+n.src_ZCc+"|[']).)+\\'|\\'(?="+n.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+n.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+n.src_ZCc+"|$)|;(?!"+n.src_ZCc+"|$)|\\!+(?!"+n.src_ZCc+"|[!]|$)|\\?(?!"+n.src_ZCc+"|[?]|$))+|\\/)?",n.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',n.src_xn="xn--[a-z0-9\\-]{1,59}",n.src_domain_root="(?:"+n.src_xn+"|"+n.src_pseudo_letter+"{1,63})",n.src_domain="(?:"+n.src_xn+"|(?:"+n.src_pseudo_letter+")|(?:"+n.src_pseudo_letter+"(?:-|"+n.src_pseudo_letter+"){0,61}"+n.src_pseudo_letter+"))",n.src_host="(?:(?:(?:(?:"+n.src_domain+")\\.)*"+n.src_domain+"))",n.tpl_host_fuzzy="(?:"+n.src_ip4+"|(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%)))",n.tpl_host_no_ip_fuzzy="(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%))",n.src_host_strict=n.src_host+n.src_host_terminator,n.tpl_host_fuzzy_strict=n.tpl_host_fuzzy+n.src_host_terminator,n.src_host_port_strict=n.src_host+n.src_port+n.src_host_terminator,n.tpl_host_port_fuzzy_strict=n.tpl_host_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_port_no_ip_fuzzy_strict=n.tpl_host_no_ip_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+n.src_ZPCc+"|>|$))",n.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+n.src_ZCc+")("+n.src_email_name+"@"+n.tpl_host_fuzzy_strict+")",n.tpl_link_fuzzy="(^|(?![.:
94/\\-_@])(?:[$+<=>^`|ï½]|"+n.src_ZPCc+"))((?![$+<=>^`|ï½])"+n.tpl_host_port_fuzzy_strict+n.src_path+")",n.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|ï½]|"+n.src_ZPCc+"))((?![$+<=>^`|ï½])"+n.tpl_host_port_no_ip_fuzzy_strict+n.src_path+")",e.re=n),o=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",i.src_tlds)}e.onCompile(),e.__tlds_replaced__||o.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),o.push(i.src_xn),i.src_tlds=o.join("|"),i.email_fuzzy=RegExp(s(i.tpl_email_fuzzy),"i"),i.link_fuzzy=RegExp(s(i.tpl_link_fuzzy),"i"),i.link_no_ip_fuzzy=RegExp(s(i.tpl_link_no_ip_fuzzy),"i"),i.host_fuzzy_test=RegExp(s(i.tpl_host_fuzzy_test),"i");let l=[];function a(e,t){throw Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){let n=e.__schemas__[t];if(null===n)return;let r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===l$(n)){if("[object RegExp]"===l$(n.validate)){var i;i=n.validate,r.validate=function(e,t){let n=e.slice(t);return i.test(n)?n.match(i)[0].length:0}}else lj(n.validate)?r.validate=n.validate:a(t,n);lj(n.normalize)?r.normalize=n.normalize:n.normalize?a(t,n):r.normalize=lU();return}"[object String]"===l$(n)?l.push(t):a(t,n)}),l.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:lU()};let c=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(lq).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><ï½]|"+i.src_ZPCc+"))("+c+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><ï½]|"+i.src_ZPCc+"))("+c+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),e.__index__=-1,e.__text_cache__=""}function lJ(e,t){let n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function lZ(e,t){let n=new lJ(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function lG(e,t){if(!(this instanceof lG))return new lG(e,t);!t&&Object.keys(e||{}).reduce(function(e,t){return e||lV.hasOwnProperty(t)},!1)&&(t=e,e={}),this.__opts__=lB({},lV,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=lB({},lH,e),this.__compiled__={},this.__tlds__=lW,this.__tlds_replaced__=!1,this.re={},lK(this)}lG.prototype.add=function(e,t){return this.__schemas__[e]=t,lK(this),this},lG.prototype.set=function(e){return this.__opts__=lB(this.__opts__,e),this},lG.prototype.test=function(e){let t,n,r,i,o,s,l,a;if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;if(this.re.schema_test.test(e)){for((l=this.re.schema_search).lastIndex=0;null!==(t=l.exec(e));)if(i=this.testSchemaAt(e,t[2],l.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(a=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||a<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=s)),this.__index__>=0},lG.prototype.pretest=function(e){return this.re.pretest.test(e)},lG.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},lG.prototype.match=function(e){let t=[],n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(lZ(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(lZ(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},lG.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;let t=this.re.schema_at_start.exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,lZ(this,0)):null},lG.prototype.tlds=function(e,t){return(e=Array.isArray(e)?e:[e],t)?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),lK(this),this},lG.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},lG.prototype.onCompile=function(){};let lQ=/^xn--/,lX=/[^\0-\x7F]/,lY=/[\x2E\u3002\uFF0E\uFF61]/g,l0={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >
94= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l1=Math.floor,l2=String.fromCharCode;function l3(e){throw RangeError(l0[e])}function l5(e,t){let n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+(function(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n})((e=e.replace(lY,".")).split("."),t).join(".")}let l4=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},l6=function(e,t,n){let r=0;for(e=n?l1(e/700):e>>1,e+=l1(e/t);e>455;r+=36)e=l1(e/35);return l1(r+36*e/(e+38))},l9=function(e){let t=[],n=e.length,r=0,i=128,o=72,s=e.lastIndexOf("-");s<0&&(s=0);for(let n=0;n<s;++n)e.charCodeAt(n)>=128&&l3("not-basic"),t.push(e.charCodeAt(n));for(let a=s>0?s+1:0;a<n;){let s=r;for(let t=1,i=36;;i+=36){var l;a>=n&&l3("invalid-input");let s=(l=e.charCodeAt(a++))>=48&&l<58?26+(l-48):l>=65&&l<91?l-65:l>=97&&l<123?l-97:36;s>=36&&l3("invalid-input"),s>l1((0x7fffffff-r)/t)&&l3("overflow"),r+=s*t;let c=i<=o?1:i>=o+26?26:i-o;if(s<c)break;let h=36-c;t>l1(0x7fffffff/h)&&l3("overflow"),t*=h}let c=t.length+1;o=l6(r-s,c,0==s),l1(r/c)>0x7fffffff-i&&l3("overflow"),i+=l1(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},l8=function(e){let t=[],n=(e=function(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(64512&r)==56320?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),n--)}else t.push(i)}return t}(e)).length,r=128,i=0,o=72;for(let n of e)n<128&&t.push(l2(n));let s=t.length,l=s;for(s&&t.push("-");l<n;){let n=0x7fffffff;for(let t of e)t>=r&&t<n&&(n=t);let a=l+1;for(let c of(n-r>l1((0x7fffffff-i)/a)&&l3("overflow"),i+=(n-r)*a,r=n,e))if(c<r&&++i>0x7fffffff&&l3("overflow"),c===r){let e=i;for(let n=36;;n+=36){let r=n<=o?1:n>=o+26?26:n-o;if(e<r)break;let i=e-r,s=36-r;t.push(l2(l4(r+i%s,0))),e=l1(i/s)}t.push(l2(l4(e,0))),o=l6(i,a,l===s),i=0,++l}++i,++r}return t.join("")},l7=function(e){return l5(e,function(e){return lX.test(e)?"xn--"+l8(e):e})},ae=function(e){return l5(e,function(e){return lQ.test(e)?l9(e.slice(4).toLowerCase()):e})},at={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},an=/^(vbscript|javascript|file|data):/,ar=/^data:image\/(gif|png|jpeg|webp);/;function ai(e){let t=e.trim().toLowerCase();return!an.test(t)||ar.test(t)}let ao=["http:","https:","mailto:"];function as(e){let t=sv(e,!0);if(t.hostname&&(!t.protocol||ao.indexOf(t.protocol)>=0))try{t.hostname=l7(t.hostname)}catch(e){}return sa(sc(t))}function al(e){let t=sv(e,!0);if(t.hostname&&(!t.protocol||ao.indexOf(t.protocol)>=0))try{t.hostname=ae(t.hostname)}catch(e){}return ss(sc(t),ss.defaultChars+"%")}function aa(e,t){if(!(this instanceof aa))return new aa(e,t);t||s4.isString(e)||(t=e||{},e="default"),this.inline=new lP,this.block=new lA,this.core=new lp,this.renderer=new s8,this.linkify=new lG,this.validateLink=ai,this.normalizeLink=as,this.normalizeLinkText=al,this.utils=s4,this.helpers=s4.assign({},s6),this.options={},this.configure(e),t&&this.set(t)}aa.prototype.set=function(e){return s4.assign(this.options,e),this},aa.prototype.configure=function(e){let t=this;if(s4.isString(e)){let t=e;if(!(e=at[t]))throw Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!e)throw Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEac
94h(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},aa.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(e){return 0>n.indexOf(e)});if(r.length&&!t)throw Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},aa.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(e){return 0>n.indexOf(e)});if(r.length&&!t)throw Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},aa.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},aa.prototype.parse=function(e,t){if("string"!=typeof e)throw Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},aa.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},aa.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},aa.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};let ac=new x.Schema({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["div",["hr"]]},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:e=>["h"+e.attrs.level,0]},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM:e=>["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")})}],toDOM:e=>["ol",{start:1==e.attrs.order?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM:e=>["ul",{"data-tight":e.attrs.tight?"true":null},0]},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:e=>({src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")})}],toDOM:e=>["img",e.attrs]},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>"em"==e.type.name}],toDOM:()=>["em"]},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!=e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>"strong"==e.type.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong"]},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),title:e.getAttribute("title")})}],toDOM:e=>["a",e.attrs]},code:{code:!0,parseDOM:[{tag:"code"}],toDOM:()=>["code"]}}});class ah{top(){return this.stack[this.stack.length-1]}push(e){this.stack.length&&this.top().content.push(e)}addText(e){if(!e)return;let t=this.top(),n=t.content,r=n[n.length-1],i=this.schema.text(e,t.marks),o;r&&(o=function(e,t){if(e.isText&&t.isText&&x.Mark.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}(r,i))?n[n.length-1]=o:n.push(i)}openMark(e){let t=this.top();t.marks=e.addToSet(t.marks)}closeMark(e){let t=this.top();t.marks=e.removeFromSet(t.marks)}parseTokens(e){for(let t=0;t<e.length;t++){let n=e[t],r=this.tokenHandlers[n.type];if(!r)throw Error("Token type `"+n.type+"` not supported by Markdown parser");r(this,n,e,t)}}addNode(e,t,n){let r=this.top(),i=e.createAndFill(t,n,r?r.marks:[]);return i?(this.push(i),i):null}openNode(e,t){this.stack.push({type:e,attrs:t,content:[],marks:x.Mark.none})}closeNode(){let e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)}constructor(e,t){this.schema=e,this.tokenHandlers=t,this.stack=[{type:e.topNodeType,attrs:null,content:[],marks:x.Mark.none}]}}function au(e,t,n,r){return e.getAttrs?e.getAttrs(t,n,r):e.attrs instanceof Function?e.attrs(t):e.attrs}function ad(e,t){return e.noCloseToken||"code_inline"==t||"code_block"==t||"fence"==t}function ap(e){return"\n"==e[e.length-1]?e.slice(0,e.length-1):e}function af(){}function am(e,t){for(;++t<e.length;)if("list_item_open"!=e[t].type)return e[t].hidden;return!1}new class{parse(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ah(this.schema,this.tokenHandlers),r;n.parseTokens(this.tokenizer.parse(e,t));do r=n.closeNode();while(n.stack.length)return r||this.schema.topNodeType.createAndFill()}constructor(e,t,n){this.schema=e,this.tokenizer=t,this.tokens=n,this.tokenHandlers=function(e,t){let n=Object.create(null);for(let r in t){let i=t[r];
94if(i.block){let t=e.nodeType(i.block);ad(i,r)?n[r]=(e,n,r,o)=>{e.openNode(t,au(i,n,r,o)),e.addText(ap(n.content)),e.closeNode()}:(n[r+"_open"]=(e,n,r,o)=>e.openNode(t,au(i,n,r,o)),n[r+"_close"]=e=>e.closeNode())}else if(i.node){let t=e.nodeType(i.node);n[r]=(e,n,r,o)=>e.addNode(t,au(i,n,r,o))}else if(i.mark){let t=e.marks[i.mark];ad(i,r)?n[r]=(e,n,r,o)=>{e.openMark(t.create(au(i,n,r,o))),e.addText(ap(n.content)),e.closeMark(t)}:(n[r+"_open"]=(e,n,r,o)=>e.openMark(t.create(au(i,n,r,o))),n[r+"_close"]=e=>e.closeMark(t))}else if(i.ignore)ad(i,r)?n[r]=af:(n[r+"_open"]=af,n[r+"_close"]=af);else throw RangeError("Unrecognized parsing spec "+JSON.stringify(i))}return n.text=(e,t)=>e.addText(t.content),n.inline=(e,t)=>e.parseTokens(t.children),n.softbreak=n.softbreak||(e=>e.addText(" ")),n}(e,n)}}(ac,aa("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(e,t,n)=>({tight:am(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:am(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}});let ag={open:"",close:"",mixable:!0},ak=new class{serialize(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Object.assign({},this.options,t);let n=new ab(this.nodes,this.marks,t);return n.renderContent(e),n.out}constructor(e,t,n={}){this.nodes=e,this.marks=t,this.options=n}}({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+"\n"),e.text(t.textContent,!1),e.write("\n"),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,i=e.repeat(" ",r+2);e.renderList(t,i,t=>{let i=String(n+t);return e.repeat(" ",r-i.length)+i+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=t.type)return void e.write("\\\n")},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open:(e,t,n,r)=>(e.inAutolink=function(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!!r.isText&&r.text==e.attrs.href&&r.marks[r.marks.length-1]==e&&(n==t.childCount-1||!e.isInSet(t.child(n+1).marks))}(t,n,r),e.inAutolink?"<":"["),close(e,t,n,r){let{inAutolink:i}=e;return e.inAutolink=void 0,i?">":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open:(e,t,n,r)=>ay(n.child(r),-1),close:(e,t,n,r)=>ay(n.child(r-1),1),escape:!1}});function ay(e,t){let n=/`+/g,r,i=0;if(e.isText)for(;r=n.exec(e.text);)i=Math.max(i,r[0].length);let o=i>0&&t>0?" `":"`";for(let e=0;e<i;e++)o+="`";return i>0&&t<0&&(o+=" "),o}class ab{flushClose(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;if(this.closed){if(this.atBlank()||(this.out+="\n"),e>1){let t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(let n=1;n<e;n++)this.out+=t+"\n"}this.closed=null}}getMark(e){let t=this.marks[e];if(!t){if(!1!==this.options.strict)throw Error(`Mark type \`${e}\` not supported by Markdown renderer`);t=ag}return t}wrapBlock(e,t,n,r){let i=this.delim;this.write(null!=t?t:e),this.delim+=e,r(),this.delim=i,this.closeBlock(n)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+="\n")}write(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}closeBlock(e){this.closed=e}text(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=e.split("\n");for(let e=0;e<n.length;e++)this.write(),!t&&"["==n[e][0]&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=t?this.esc(n[e],this.atBlockStart):n[e],e!=n.length-1&&(this.out+="\n")}render(e,t,n){if(this.nodes[e.type.name])this.nodes[e.type.name](this,e,t,n);else if(!1!==this.options.strict)throw Error("Token type `"+e.type.n
94ame+"` not supported by Markdown renderer");else!e.type.isLeaf&&(e.type.inlineContent?this.renderInline(e):this.renderContent(e),e.isBlock&&this.closeBlock(e))}renderContent(e){e.forEach((t,n,r)=>this.render(t,e,r))}renderInline(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];this.atBlockStart=t;let n=[],r="",i=(t,i,o)=>{let s=t?t.marks:[];t&&t.type.name===this.options.hardBreakNodeName&&(s=s.filter(t=>{if(o+1==e.childCount)return!1;let n=e.child(o+1);return t.isInSet(n.marks)&&(!n.isText||/\S/.test(n.text))}));let l=r;if(r="",t&&t.isText&&s.some(e=>{let t=this.getMark(e.type.name);return t&&t.expelEnclosingWhitespace&&!e.isInSet(n)})){let[e,r,i]=/^(\s*)(.*)$/m.exec(t.text);r&&(l+=r,(t=i?t.withText(i):null)||(s=n))}if(t&&t.isText&&s.some(t=>{let n=this.getMark(t.type.name);return n&&n.expelEnclosingWhitespace&&!this.isMarkAhead(e,o+1,t)})){let[e,i,o]=/^(.*?)(\s*)$/m.exec(t.text);o&&(r=o,(t=i?t.withText(i):null)||(s=n))}let a=s.length?s[s.length-1]:null,c=a&&!1===this.getMark(a.type.name).escape,h=s.length-!!c;n:for(let e=0;e<h;e++){let t=s[e];if(!this.getMark(t.type.name).mixable)break;for(let r=0;r<n.length;r++){let i=n[r];if(!this.getMark(i.type.name).mixable)break;if(t.eq(i)){e>r?s=s.slice(0,r).concat(t).concat(s.slice(r,e)).concat(s.slice(e+1,h)):r>e&&(s=s.slice(0,e).concat(s.slice(e+1,r)).concat(t).concat(s.slice(r,h)));continue n}}}let u=0;for(;u<Math.min(n.length,h)&&s[u].eq(n[u]);)++u;for(;u<n.length;)this.text(this.markString(n.pop(),!1,e,o),!1);if(l&&this.text(l),t){for(;n.length<h;){let t=s[n.length];n.push(t),this.text(this.markString(t,!0,e,o),!1),this.atBlockStart=!1}c&&t.isText?this.text(this.markString(a,!0,e,o)+t.text+this.markString(a,!1,e,o+1),!1):this.render(t,e,o),this.atBlockStart=!1}(null==t?void 0:t.isText)&&t.nodeSize>0&&(this.atBlockStart=!1)};e.forEach(i),i(null,0,e.childCount),this.atBlockStart=!1}renderList(e,t,n){this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let r=void 0!==e.attrs.tight?e.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=r,e.forEach((i,o,s)=>{s&&r&&this.flushClose(1),this.wrapBlock(t,n(s),e,()=>this.render(i,e,s))}),this.inTightList=i}esc(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e=e.replace(/[`*\\~\[\]_]/g,(t,n)=>"_"==t&&n>0&&n+1<e.length&&e[n-1].match(/\w/)&&e[n+1].match(/\w/)?t:"\\"+t),t&&(e=e.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(e=e.replace(this.options.escapeExtraCharacters,"\\$&")),e}quote(e){let t=-1==e.indexOf('"')?'""':-1==e.indexOf("'")?"''":"()";return t[0]+e+t[1]}repeat(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}markString(e,t,n,r){let i=this.getMark(e.type.name),o=t?i.open:i.close;return"string"==typeof o?o:o(this,e,n,r)}getEnclosingWhitespace(e){return{leading:(e.match(/^(\s+)/)||[void 0])[0],trailing:(e.match(/(\s+)$/)||[void 0])[0]}}isMarkAhead(e,t,n){for(;;t++){if(t>=e.childCount)return!1;let r=e.child(t);if(r.type.name!=this.options.hardBreakNodeName)return n.isInSet(r.marks);t++}}constructor(e,t,n){this.nodes=e,this.marks=t,this.options=n,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,void 0===this.options.tightLists&&(this.options.tightLists=!1),void 0===this.options.hardBreakNodeName&&(this.options.hardBreakNodeName="hard_break")}}let av=Object.prototype.hasOwnProperty;function ax(e){let t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){if(t){if("object"!=typeof t)throw TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function aw(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function aC(e){return(!(e>=55296)||!(e<=57343))&&(!(e>=64976)||!(e<=65007))&&(65535&e)!=65535&&(65535&e)!=65534&&(!(e>=0)||!(e<=8))&&11!==e&&(!(e>=14)||!(e<=31))&&(!(e>=127)||!(e<=159))&&!(e>1114111)&&!0}function aS(e){return e>65535?String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e)):String.fromCharCode(e)}let aA=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,aM=RegExp(aA.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),aE=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function a_(e){return 0>e.indexOf("\\")&&0>e.indexOf("&")?e:e.replace(aM,function(e,t,n){if(t)return t;if(35===n.charCodeAt(0)&&aE.test(n)){let t="x"===n[1].toLowerCase()?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return aC(t)?aS(t):e}let r=sR(e);return r!==e?r:e})}let aT=/[&<>"]/,aD=/[&<>"]/g,aO={"&":"&","<":"<",">":">",'"':"""};function aN(e){return aO[e]}function aI(e){return aT.test(e)?e.replace(aD,aN):e}let aL=/[.?*+^$[\]\\(){}|-]/g;function aF(e){switch(e){case 9:case 32:return!0}return!1}function aR(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function az(e){return sS.test(e)||sA.test(e)}function aP(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case
9461:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function aB(e){return(e=e.trim().replace(/\s+/g," ")).toLowerCase().toUpperCase()}e.s(["arrayReplaceAt",0,aw,"assign",0,ax,"escapeHtml",0,aI,"escapeRE",0,function(e){return e.replace(aL,"\\$&")},"fromCodePoint",0,aS,"has",0,function(e,t){return av.call(e,t)},"isMdAsciiPunct",0,aP,"isPunctChar",0,az,"isSpace",0,aF,"isString",0,function(e){return"[object String]"===Object.prototype.toString.call(e)},"isValidEntityCode",0,aC,"isWhiteSpace",0,aR,"lib",0,{mdurl:sx,ucmicro:sE},"normalizeReference",0,aB,"unescapeAll",0,a_,"unescapeMd",0,function(e){return 0>e.indexOf("\\")?e:e.replace(aA,"$1")}],681250);var a$=e.i(681250);e.s([],625604),e.i(625604),e.s(["parseLinkDestination",0,function(e,t,n){let r,i=t,o={ok:!1,pos:0,str:""};if(60===e.charCodeAt(i)){for(i++;i<n&&10!==(r=e.charCodeAt(i))&&60!==r;){if(62===r){o.pos=i+1,o.str=a_(e.slice(t+1,i)),o.ok=!0;break}if(92===r&&i+1<n){i+=2;continue}i++}return o}let s=0;for(;i<n&&32!==(r=e.charCodeAt(i))&&!(r<32)&&127!==r;){if(92===r&&i+1<n){if(32===e.charCodeAt(i+1))break;i+=2;continue}if(40===r&&++s>32)return o;if(41===r){if(0===s)break;s--}i++}return t===i||0!==s||(o.str=a_(e.slice(t,i)),o.pos=i,o.ok=!0),o},"parseLinkLabel",0,function(e,t,n){let r,i,o,s,l=e.posMax,a=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(o=e.src.charCodeAt(e.pos))&&0==--r){i=!0;break}if(s=e.pos,e.md.inline.skipToken(e),91===o){if(s===e.pos-1)r++;else if(n)return e.pos=a,-1}}let c=-1;return i&&(c=e.pos),e.pos=a,c},"parseLinkTitle",0,function(e,t,n,r){let i,o=t,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(o>=n)return s;let r=e.charCodeAt(o);if(34!==r&&39!==r&&40!==r)return s;t++,o++,40===r&&(r=41),s.marker=r}for(;o<n;){if((i=e.charCodeAt(o))===s.marker)return s.pos=o+1,s.str+=a_(e.slice(t,o)),s.ok=!0,s;if(40===i&&41===s.marker)return s;92===i&&o+1<n&&o++,o++}return s.can_continue=!0,s.str+=a_(e.slice(t,o)),s}],301584);var aj=e.i(301584);let aq={};function aV(){this.rules=ax({},aq)}function aH(){this.__rules__=[],this.__cache__=null}function aW(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}function aU(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}aq.code_inline=function(e,t,n,r,i){let o=e[t];return"<code"+i.renderAttrs(o)+">"+aI(o.content)+"</code>"},aq.code_block=function(e,t,n,r,i){let o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+aI(e[t].content)+"</code></pre>\n"},aq.fence=function(e,t,n,r,i){let o,s=e[t],l=s.info?a_(s.info).trim():"",a="",c="";if(l){let e=l.split(/(\s+)/g);a=e[0],c=e.slice(2).join("")}if(0===(o=n.highlight&&n.highlight(s.content,a,c)||aI(s.content)).indexOf("<pre"))return o+"\n";if(l){let e=s.attrIndex("class"),t=s.attrs?s.attrs.slice():[];return e<0?t.push(["class",n.langPrefix+a]):(t[e]=t[e].slice(),t[e][1]+=" "+n.langPrefix+a),`<pre><code${i.renderAttrs({attrs:t})}>${o}</code></pre> 95`}return`<pre><code${i.renderAttrs(s)}>${o}</code></pre> 96`},aq.image=function(e,t,n,r,i){let o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},aq.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},aq.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},aq.text=function(e,t){return aI(e[t].content)},aq.html_block=function(e,t){return e[t].content},aq.html_inline=function(e,t){return e[t].content},aV.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return"";for(t=0,r="",n=e.attrs.length;t<n;t++)r+=" "+aI(e.attrs[t][0])+'="'+aI(e.attrs[t][1])+'"';return r},aV.prototype.renderToken=function(e,t,n){let r=e[t],i="";if(r.hidden)return"";r.block&&-1!==r.nesting&&t&&e[t-1].hidden&&(i+="\n"),i+=(-1===r.nesting?"</":"<")+r.tag,i+=this.renderAttrs(r),0===r.nesting&&n.xhtmlOut&&(i+=" /");let o=!1;if(r.block&&(o=!0,1===r.nesting&&t+1<e.length)){let n=e[t+1];"inline"===n.type||n.hidden?o=!1:-1===n.nesting&&n.tag===r.tag&&(o=!1)}return i+(o?">\n":">")},aV.prototype.renderInline=function(e,t,n){let r="",i=this.rules;for(let o=0,s=e.length;o<s;o++){let s=e[o].type;void 0!==i[s]?r+=i[s](e,o,t,n,this):r+=this.renderToken(e,o,t)}return r},aV.prototype.renderInlineAsText=function(e,t,n){let r="";for(let i=0,o=e.length;i<o;i++)switch(e[i].type){case"text":case"html_inline":case"html_block":r+=e[i].c
96ontent;break;case"image":r+=this.renderInlineAsText(e[i].children,t,n);break;case"softbreak":case"hardbreak":r+="\n"}return r},aV.prototype.render=function(e,t,n){let r="",i=this.rules;for(let o=0,s=e.length;o<s;o++){let s=e[o].type;"inline"===s?r+=this.renderInline(e[o].children,t,n):void 0!==i[s]?r+=i[s](e,o,t,n,this):r+=this.renderToken(e,o,t,n)}return r},aH.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return -1},aH.prototype.__compile__=function(){let e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){0>t.indexOf(e)&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){!n.enabled||t&&0>n.alt.indexOf(t)||e.__cache__[t].push(n.fn)})})},aH.prototype.at=function(e,t,n){let r=this.__find__(e);if(-1===r)throw Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=(n||{}).alt||[],this.__cache__=null},aH.prototype.before=function(e,t,n,r){let i=this.__find__(e);if(-1===i)throw Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:(r||{}).alt||[]}),this.__cache__=null},aH.prototype.after=function(e,t,n,r){let i=this.__find__(e);if(-1===i)throw Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:(r||{}).alt||[]}),this.__cache__=null},aH.prototype.push=function(e,t,n){this.__rules__.push({name:e,enabled:!0,fn:t,alt:(n||{}).alt||[]}),this.__cache__=null},aH.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)},this),this.__cache__=null,n},aH.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},aH.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)},this),this.__cache__=null,n},aH.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},aW.prototype.attrIndex=function(e){if(!this.attrs)return -1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return -1},aW.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},aW.prototype.attrSet=function(e,t){let n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},aW.prototype.attrGet=function(e){let t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},aW.prototype.attrJoin=function(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},aU.prototype.Token=aW;let aK=/\r\n?|\n/g,aJ=/\0/g,aZ=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,aG=/\((c|tm|r)\)/i,aQ=/\((c|tm|r)\)/ig,aX={c:"©",r:"®",tm:"â¢"};function aY(e,t){return aX[t.toLowerCase()]}let a0=/['"]/,a1=/['"]/g;function a2(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}let a3=[["normalize",function(e){let t;t=(t=e.src.replace(aK,"\n")).replace(aJ,"�"),e.src=t}],["block",function(e){let t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}],["linkify",function(e){let t=e.tokens;if(e.md.options.linkify)for(let i=0,o=t.length;i<o;i++){if("inline"!==t[i].type||!e.md.linkify.pretest(t[i].content))continue;let o=t[i].children,s=0;for(let l=o.length-1;l>=0;l--){let a=o[l];if("link_close"===a.type){for(l--;o[l].level!==a.level&&"link_open"!==o[l].type;)l--;continue}if("html_inline"===a.type){var n,r;n=a.content,/^<a[>\s]/i.test(n)&&s>0&&s--,r=a.content,/^<\/a\s*>/i.test(r)&&s++}if(!(s>0)&&"text"===a.type&&e.md.linkify.test(a.content)){let n=a.content,r=e.md.linkify.match(n),s=[],c=a.level,h=0;r.length>0&&0===r[0].index&&l>0&&"text_special"===o[l-1].type&&(r=r.slice(1));for(let t=0;t<r.length;t++){let i=r[t].url,o=e.md.normalizeLink(i);if(!e.md.validateLink(o))continue;let l=r[t].text;l=r[t].schema?"mailto:"!==r[t].schema||/^mailto:/i.test(l)?e.md.normalizeLinkText(l):e.md.normalizeLinkText("mailto:"+l).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+l).replace(/^http:\/\//,"");let a=r[t].index;if(a>h){let t=new e.Token("text","",0);t.content=n.slice(h,a),t.level=c,s.push(t)}let u=new e.Token("link_open","a",1);u.attrs=[["href",o]],u.level=c++,u.markup="linkify",u.info="auto",s.push(u);let d=new e.Token("text","",0);
96d.content=l,d.level=c,s.push(d);let p=new e.Token("link_close","a",-1);p.level=--c,p.markup="linkify",p.info="auto",s.push(p),h=r[t].lastIndex}if(h<n.length){let t=new e.Token("text","",0);t.content=n.slice(h),t.level=c,s.push(t)}t[i].children=o=aw(o,l,s)}}}}],["replacements",function(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(aG.test(e.tokens[t].content)&&function(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];"text"!==r.type||t||(r.content=r.content.replace(aQ,aY)),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}(e.tokens[t].children),aZ.test(e.tokens[t].content)&&function(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];"text"===r.type&&!t&&aZ.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"â¦").replace(/([?!])â¦/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1â").replace(/(^|\s)--(?=\s|$)/mg,"$1â").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1â")),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}(e.tokens[t].children))}],["smartquotes",function(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&a0.test(e.tokens[t].content)&&function(e,t){let n,r=[];for(let i=0;i<e.length;i++){let o=e[i],s=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=s);n--);if(r.length=n+1,"text"!==o.type)continue;let l=o.content,a=0,c=l.length;t:for(;a<c;){a1.lastIndex=a;let h=a1.exec(l);if(!h)break;let u=!0,d=!0;a=h.index+1;let p="'"===h[0],f=32;if(h.index-1>=0)f=l.charCodeAt(h.index-1);else for(n=i-1;n>=0&&"softbreak"!==e[n].type&&"hardbreak"!==e[n].type;n--)if(e[n].content){f=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(a<c)m=l.charCodeAt(a);else for(n=i+1;n<e.length&&"softbreak"!==e[n].type&&"hardbreak"!==e[n].type;n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}let g=aP(f)||az(String.fromCharCode(f)),k=aP(m)||az(String.fromCharCode(m)),y=aR(f),b=aR(m);if(b?u=!1:k&&!(y||g)&&(u=!1),y?d=!1:g&&!(b||k)&&(d=!1),34===m&&'"'===h[0]&&f>=48&&f<=57&&(d=u=!1),u&&d&&(u=g,d=k),!u&&!d){p&&(o.content=a2(o.content,h.index,"â"));continue}if(d)for(n=r.length-1;n>=0;n--){let u=r[n];if(r[n].level<s)break;if(u.single===p&&r[n].level===s){let s,d;u=r[n],p?(s=t.md.options.quotes[2],d=t.md.options.quotes[3]):(s=t.md.options.quotes[0],d=t.md.options.quotes[1]),o.content=a2(o.content,h.index,d),e[u.token].content=a2(e[u.token].content,u.pos,s),a+=d.length-1,u.token===i&&(a+=s.length-1),c=(l=o.content).length,r.length=n;continue t}}u?r.push({token:i,pos:h.index,single:p,level:s}):d&&p&&(o.content=a2(o.content,h.index,"â"))}}}(e.tokens[t].children,e)}],["text_join",function(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if("inline"!==r[e].type)continue;let i=r[e].children,o=i.length;for(t=0;t<o;t++)"text_special"===i[t].type&&(i[t].type="text");for(t=n=0;t<o;t++)"text"===i[t].type&&t+1<o&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}]];function a5(){this.ruler=new aH;for(let e=0;e<a3.length;e++)this.ruler.push(a3[e][0],a3[e][1])}function a4(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;let i=this.src;for(let e=0,t=0,n=0,r=0,o=i.length,s=!1;t<o;t++){let l=i.charCodeAt(t);if(!s)if(aF(l)){n++,9===l?r+=4-r%4:r++;continue}else s=!0;(10===l||t===o-1)&&(10!==l&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),s=!1,n=0,r=0,e=t+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}function a6(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function a9(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),o=!1,s=0,l="";for(;r<n;)124===i&&(o?(l+=e.substring(s,r-1),s=r):(t.push(l+e.substring(s,r)),l="",s=r+1)),o=92===i,r++,i=e.charCodeAt(r);return t.push(l+e.substring(s)),t}function a8(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCo
96deAt(r++);return 42!==i&&45!==i&&43!==i||r<n&&!aF(e.src.charCodeAt(r))?-1:r}function a7(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return -1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return -1;for(;;){if(i>=r)return -1;if((o=e.src.charCodeAt(i++))>=48&&o<=57){if(i-n>=10)return -1;continue}if(41===o||46===o)break;return -1}return i<r&&!aF(o=e.src.charCodeAt(i))?-1:i}a5.prototype.process=function(e){let t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},a5.prototype.State=aU,a4.prototype.push=function(e,t,n){let r=new aW(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},a4.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},a4.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},a4.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t&&aF(this.src.charCodeAt(e));e++);return e},a4.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!aF(this.src.charCodeAt(--e)))return e+1;return e},a4.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},a4.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},a4.prototype.getLines=function(e,t,n,r){if(e>=t)return"";let i=Array(t-e);for(let o=0,s=e;s<t;s++,o++){let e,l=0,a=this.bMarks[s],c=a;for(e=s+1<t||r?this.eMarks[s]+1:this.eMarks[s];c<e&&l<n;){let e=this.src.charCodeAt(c);if(aF(e))9===e?l+=4-(l+this.bsCount[s])%4:l++;else if(c-a<this.tShift[s])l++;else break;c++}l>n?i[o]=Array(l-n+1).join(" ")+this.src.slice(c,e):i[o]=this.src.slice(c,e)}return i.join("")},a4.prototype.Token=aW;let ce="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",ct="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",cn=RegExp("^(?:"+ce+"|"+ct+"|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),cr=RegExp("^(?:"+ce+"|"+ct+")"),ci=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp("^</?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?=(\\s|/?>|$))","i"),/^$/,!0],[RegExp(cr.source+"\\s*$"),/^$/,!1]],co=[["table",function(e,t,n,r){let i;if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let s=e.bMarks[o]+e.tShift[o];if(s>=e.eMarks[o])return!1;let l=e.src.charCodeAt(s++);if(124!==l&&45!==l&&58!==l||s>=e.eMarks[o])return!1;let a=e.src.charCodeAt(s++);if(124!==a&&45!==a&&58!==a&&!aF(a)||45===l&&aF(a))return!1;for(;s<e.eMarks[o];){let t=e.src.charCodeAt(s);if(124!==t&&45!==t&&58!==t&&!aF(t))return!1;s++}let c=a6(e,t+1),h=c.split("|"),u=[];for(let e=0;e<h.length;e++){let t=h[e].trim();if(!t)if(0===e||e===h.length-1)continue;else return!1;if(!/^:?-+:?$/.test(t))return!1;58===t.charCodeAt(t.length-1)?u.push(58===t.charCodeAt(0)?"center":"right"):58===t.charCodeAt(0)?u.push("left"):u.push("")}if(-1===(c=a6(e,t).trim()).indexOf("|")||e.sCount[t]-e.blkIndent>=4)return!1;(h=a9(c)).length&&""===h[0]&&h.shift(),h.length&&""===h[h.length-1]&&h.pop();let d=h.length;if(0===d||d!==u.length)return!1;if(r)return!0;let p=e.parentType;e.parentType="table";let f=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),g=[t,0];m.map=g,e.push("thead_open","thead",1).map=[t,t+1],e.push("tr_open","tr",1).map=[t,t+1];for(let t=0;t<h.length;t++){let n=e.push("th_open","th",1);u[t]&&(n.attrs=[["style","text-align:"+u[t]]]);let r=e.push("inline","",0);r.content=h[t].trim(),r.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let k=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let r=!1;for(let t=0,i=f.length;t<i;t++)if(f[t](e,o,n,!0)){r=!0;break}if(r||!(c=a6(e,o).trim())||e.sCount[o]-e.blkIndent>=4||((h=a9(c)).length&&""===h[0]&&h.shift(),h.length&&""===h[h.length-1]&&h.pop(),(k+=d-h.length)>65536))break;o===t+2&&(e.push("tbody_open","tbody",1).map=i=[t+2,0]),e.push("tr_open","tr",1).map=[o,o+1];for(let t=0;t<d;t++){let n=e.push("td_open","td",1);u[t]&&(n.attrs=[["style","text-align:"+u[t]]]);let r=e.push("inline","",0);r.content=h[t]?h[t].trim():"",r.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return i&&(e.push("tbody_close","tbody",-1),i[1]=o),e.push("table_close","table",-1),g[1]=o,e.parentType=p,e.line=o,!0},["paragraph","reference"]],["code",function(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){i=++r;continue}break}e.line=i;let o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}],["fence",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;
96let s=e.src.charCodeAt(i);if(126!==s&&96!==s)return!1;let l=i,a=(i=e.skipChars(i,s))-l;if(a<3)return!1;let c=e.src.slice(l,i),h=e.src.slice(i,o);if(96===s&&h.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let u=t,d=!1;for(;!(++u>=n)&&(!((i=l=e.bMarks[u]+e.tShift[u])<(o=e.eMarks[u]))||!(e.sCount[u]<e.blkIndent));){;if(!(e.src.charCodeAt(i)!==s||e.sCount[u]-e.blkIndent>=4||(i=e.skipChars(i,s))-l<a)&&!((i=e.skipSpaces(i))<o)){d=!0;break}}a=e.sCount[t],e.line=u+ +!!d;let p=e.push("fence","code",0);return p.info=h,p.content=e.getLines(t+1,u,a,!0),p.markup=c,p.map=[t,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,t,n,r){let i,o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||62!==e.src.charCodeAt(o))return!1;if(r)return!0;let a=[],c=[],h=[],u=[],d=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let f=!1;for(i=t;i<n;i++){let t=e.sCount[i]<e.blkIndent;if((o=e.bMarks[i]+e.tShift[i])>=(s=e.eMarks[i]))break;if(62===e.src.charCodeAt(o++)&&!t){let t,n,r=e.sCount[i]+1;32===e.src.charCodeAt(o)?(o++,r++,n=!1,t=!0):9===e.src.charCodeAt(o)?(t=!0,(e.bsCount[i]+r)%4==3?(o++,r++,n=!1):n=!0):t=!1;let l=r;
96for(a.push(e.bMarks[i]),e.bMarks[i]=o;o<s;){let t=e.src.charCodeAt(o);if(aF(t))9===t?l+=4-(l+e.bsCount[i]+ +!!n)%4:l++;else break;o++}f=o>=s,c.push(e.bsCount[i]),e.bsCount[i]=e.sCount[i]+1+ +!!t,h.push(e.sCount[i]),e.sCount[i]=l-r,u.push(e.tShift[i]),e.tShift[i]=o-e.bMarks[i];continue}if(f)break;let r=!1;for(let t=0,o=d.length;t<o;t++)if(d[t](e,i,n,!0)){r=!0;break}if(r){e.lineMax=i,0!==e.blkIndent&&(a.push(e.bMarks[i]),c.push(e.bsCount[i]),u.push(e.tShift[i]),h.push(e.sCount[i]),e.sCount[i]-=e.blkIndent);break}a.push(e.bMarks[i]),c.push(e.bsCount[i]),u.push(e.tShift[i]),h.push(e.sCount[i]),e.sCount[i]=-1}let m=e.blkIndent;e.blkIndent=0;let g=e.push("blockquote_open","blockquote",1);g.markup=">";let k=[t,0];g.map=k,e.md.block.tokenize(e,t,i),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=l,e.parentType=p,k[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=a[n],e.tShift[n+t]=u[n],e.sCount[n+t]=h[n],e.bsCount[n+t]=c[n];return e.blkIndent=m,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(o++);if(42!==s&&45!==s&&95!==s)return!1;let l=1;for(;o<i;){let t=e.src.charCodeAt(o++);if(t!==s&&!aF(t))return!1;t===s&&l++}if(l<3)return!1;if(r)return!0;e.line=t+1;let a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=Array(l+1).join(String.fromCharCode(s)),!0},["paragraph","reference","blockquote","list"]],["list",function(e,t,n,r){let i,o,s,l,a,c,h,u=t,d=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let p=!1;if(r&&"paragraph"===e.parentType&&e.sCount[u]>=e.blkIndent&&(p=!0),(h=a7(e,u))>=0){if(a=!0,s=e.bMarks[u]+e.tShift[u],c=Number(e.src.slice(s,h-1)),p&&1!==c)return!1}else{if(!((h=a8(e,u))>=0))return!1;a=!1}if(p&&e.skipSpaces(h)>=e.eMarks[u])return!1;if(r)return!0;let f=e.src.charCodeAt(h-1),m=e.tokens.length;a?(l=e.push("ordered_list_open","ol",1),1!==c&&(l.attrs=[["start",c]])):l=e.push("bullet_list_open","ul",1);let g=[u,0];l.map=g,l.markup=String.fromCharCode(f);let k=!1,y=e.md.block.ruler.getRules("list"),b=e.parentType;for(e.parentType="list";u<n;){let t;o=h,i=e.eMarks[u];let r=e.sCount[u]+h-(e.bMarks[u]+e.tShift[u]),c=r;for(;o<i;){let t=e.src.charCodeAt(o);if(9===t)c+=4-(c+e.bsCount[u])%4;else if(32===t)c++;else break;o++}let p=o;(t=p>=i?1:c-r)>4&&(t=1);let m=r+t;(l=e.push("list_item_open","li",1)).markup=String.fromCharCode(f);let g=[u,0];l.map=g,a&&(l.info=e.src.slice(s,h-1));let b=e.tight,v=e.tShift[u],x=e.sCount[u],w=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=m,e.tight=!0,e.tShift[u]=p-e.bMarks[u],e.sCount[u]=c,p>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||k)&&(d=!1),k=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[u]=v,e.sCount[u]=x,e.tight=b,(l=e.push("list_item_close","li",-1)).markup=String.fromCharCode(f),u=e.line,g[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let C=!1;for(let t=0,r=y.length;t<r;t++)if(y[t](e,u,n,!0)){C=!0;break}if(C)break;if(a){if((h=a7(e,u))<0)break;s=e.bMarks[u]+e.tShift[u]}else if((h=a8(e,u))<0)break;if(f!==e.src.charCodeAt(h-1))break}return(l=a?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(f),g[1]=u,e.line=u,e.parentType=b,d&&function(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}(e,m),!0},["paragraph","reference","blockquote"]],["reference",function(e,t,n,r){let i,o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l=t+1;if(e.sCount[t]-e.blkIndent>=4||91!==e.src.charCodeAt(o))return!1;function a(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let o=!1;for(let i=0,s=r.length;i<s;i++)if(r[i](e,t,n,!0)){o=!0;break}if(e.parentType=i,o)return null}let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(i,o+1)}let c=e.src.slice(o,s+1);s=c.length;let h=-1;for(o=1;o<s;
96o++){let e=c.charCodeAt(o);if(91===e)return!1;if(93===e){h=o;break}if(10===e){let e=a(l);null!==e&&(c+=e,s=c.length,l++)}else if(92===e&&++o<s&&10===c.charCodeAt(o)){let e=a(l);null!==e&&(c+=e,s=c.length,l++)}}if(h<0||58!==c.charCodeAt(h+1))return!1;for(o=h+2;o<s;o++){let e=c.charCodeAt(o);if(10===e){let e=a(l);null!==e&&(c+=e,s=c.length,l++)}else if(aF(e));else break}let u=e.md.helpers.parseLinkDestination(c,o,s);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;let p=o=u.pos,f=l,m=o;for(;o<s;o++){let e=c.charCodeAt(o);if(10===e){let e=a(l);null!==e&&(c+=e,s=c.length,l++)}else if(aF(e));else break}let g=e.md.helpers.parseLinkTitle(c,o,s);for(;g.can_continue;){let t=a(l);if(null===t)break;c+=t,o=s,s=c.length,l++,g=e.md.helpers.parseLinkTitle(c,o,s,g)}for(o<s&&m!==o&&g.ok?(i=g.str,o=g.pos):(i="",o=p,l=f);o<s&&aF(c.charCodeAt(o));)o++;if(o<s&&10!==c.charCodeAt(o)&&i)for(i="",o=p,l=f;o<s&&aF(c.charCodeAt(o));)o++;if(o<s&&10!==c.charCodeAt(o))return!1;let k=aB(c.slice(1,h));return!!k&&(!!r||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[k]&&(e.env.references[k]={title:i,href:d}),e.line=l,!0))}],["html_block",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||60!==e.src.charCodeAt(i))return!1;let s=e.src.slice(i,o),l=0;for(;l<ci.length&&!ci[l][0].test(s);l++);if(l===ci.length)return!1;if(r)return ci[l][2];let a=t+1;if(!ci[l][1].test(s)){for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(i=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],s=e.src.slice(i,o),ci[l][1].test(s)){0!==s.length&&a++;break}}e.line=a;let c=e.push("html_block","",0);return c.map=[t,a],c.content=e.getLines(t,a,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(i);if(35!==s||i>=o)return!1;let l=1;for(s=e.src.charCodeAt(++i);35===s&&i<o&&l<=6;)l++,s=e.src.charCodeAt(++i);if(l>6||i<o&&!aF(s))return!1;if(r)return!0;o=e.skipSpacesBack(o,i);let a=e.skipCharsBack(o,35,i);a>i&&aF(e.src.charCodeAt(a-1))&&(o=a),e.line=t+1;let c=e.push("heading_open","h"+String(l),1);c.markup="########".slice(0,l),c.map=[t,e.line];let h=e.push("inline","",0);return h.content=e.src.slice(i,o).trim(),h.map=[t,e.line],h.children=[],e.push("heading_close","h"+String(l),-1).markup="########".slice(0,l),!0},["paragraph","reference","blockquote"]],["lheading",function(e,t,n){let r,i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let s=0,l=t+1;for(;l<n&&!e.isEmpty(l);l++){if(e.sCount[l]-e.blkIndent>3)continue;if(e.sCount[l]>=e.blkIndent){let t=e.bMarks[l]+e.tShift[l],n=e.eMarks[l];if(t<n&&(45===(r=e.src.charCodeAt(t))||61===r)&&(t=e.skipChars(t,r),(t=e.skipSpaces(t))>=n)){s=61===r?1:2;break}}if(e.sCount[l]<0)continue;let t=!1;for(let r=0,o=i.length;r<o;r++)if(i[r](e,l,n,!0)){t=!0;break}if(t)break}if(!s)return!1;let a=e.getLines(t,l,e.blkIndent,!1).trim();e.line=l+1;let c=e.push("heading_open","h"+String(s),1);c.markup=String.fromCharCode(r),c.map=[t,e.line];let h=e.push("inline","",0);return h.content=a,h.map=[t,e.line-1],h.children=[],e.push("heading_close","h"+String(s),-1).markup=String.fromCharCode(r),e.parentType=o,!0}],["paragraph",function(e,t,n){let r=e.md.block.ruler.getRules("paragraph"),i=e.parentType,o=t+1;for(e.parentType="paragraph";o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let t=!1;for(let i=0,s=r.length;i<s;i++)if(r[i](e,o,n,!0)){t=!0;break}if(t)break}let s=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o,e.push("paragraph_open","p",1).map=[t,e.line];let l=e.push("inline","",0);return l.content=s,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}]];function cs(){this.ruler=new aH;for(let e=0;e<co.length;e++)this.ruler.push(co[e][0],co[e][1],{alt:(co[e][2]||[]).slice()})}function cl(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}cs.prototype.tokenize=function(e,t,n){let r=this.ruler.getRules(""),i=r.length,o=e.md.options.maxNesting,s=t,l=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n)&&!(e.sCount[s]<e.blkIndent));){if(e.level>=o){e.line=n;break}let t=e.line,a=!1;for(let o=0;o<i;o++)if(a=r[o](e,s,n,!1)){if(t>=e.line)throw Error("block rule didn't increment state.line");break}if(!a)throw Error("none of the block rules matched");e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),(s=e.line)<n&&e.isEmpty(s)&&(l=!0,e.line=++s)}},cs.prototype.parse=function(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)},cs.prototype.State=a4,cl.prototype.pushPending=function(){let e=new aW("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},cl.prototype.push=function(e,t,n){this.pending&&this.pushPending();let r=new aW(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r}
96,cl.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32,o=e;for(;o<n&&this.src.charCodeAt(o)===r;)o++;let s=o-e,l=o<n?this.src.charCodeAt(o):32,a=aP(i)||az(String.fromCharCode(i)),c=aP(l)||az(String.fromCharCode(l)),h=aR(i),u=aR(l),d=!u&&(!c||h||a),p=!h&&(!a||u||c);return{can_open:d&&(t||!p||a),can_close:p&&(t||!d||c),length:s}},cl.prototype.Token=aW;let ca=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,cc=[];for(let e=0;e<256;e++)cc.push(0);function ch(e,t){let n,r=[],i=t.length;for(let o=0;o<i;o++){let i=t[o];if(126!==i.marker||-1===i.end)continue;let s=t[i.end];(n=e.tokens[i.token]).type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",(n=e.tokens[s.token]).type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&r.push(s.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&"s_close"===e.tokens[i].type;)i++;t!==--i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){cc[e.charCodeAt(0)]=1});function cu(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(95!==n.marker&&42!==n.marker||-1===n.end)continue;let i=t[n.end],o=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,s=String.fromCharCode(n.marker),l=e.tokens[n.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?s+s:s,l.content="";let a=e.tokens[i.token];a.type=o?"strong_close":"em_close",a.tag=o?"strong":"em",a.nesting=-1,a.markup=o?s+s:s,a.content="",o&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--)}}let cd=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,cp=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/,cf=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,cm=/^&([a-z][a-z0-9]{1,31});/i;function cg(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,o=[];for(let s=0;s<n;s++){let n=e[s];if(o.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=s),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let l=t[n.marker][3*!!n.open+n.length%3],a=r-o[r]-1,c=a;for(;a>l;a-=o[a]+1){let t=e[a];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=a>0&&!e[a-1].open?o[a-1]+1:0;o[s]=s-a+r,o[a]=r,n.open=!1,t.end=s,t.close=!1,c=-1,i=-2;break}}}-1!==c&&(t[n.marker][3*!!n.open+(n.length||0)%3]=c)}}let ck=[["text",function(e,t){let n=e.pos;for(;n<e.posMax&&!function(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}],["linkify",function(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos;if(n+3>e.posMax||58!==e.src.charCodeAt(n)||47!==e.src.charCodeAt(n+1)||47!==e.src.charCodeAt(n+2))return!1;let r=e.pending.match(ca);if(!r)return!1;let i=r[1],o=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!o)return!1;let s=o.url;if(s.length<=i.length)return!1;s=s.replace(/\*+$/,"");let l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);let t=e.push("link_open","a",1);t.attrs=[["href",l]],t.markup="linkify",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(s);let n=e.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return e.pos+=s.length-i.length,!0}],["newline",function(e,t){let n=e.pos;if(10!==e.src.charCodeAt(n))return!1;let r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&32===e.pending.charCodeAt(r))if(r>=1&&32===e.pending.charCodeAt(r-1)){let t=r-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;
96n<i&&aF(e.src.charCodeAt(n));)n++;return e.pos=n,!0}],["escape",function(e,t){let n=e.pos,r=e.posMax;if(92!==e.src.charCodeAt(n)||++n>=r)return!1;let i=e.src.charCodeAt(n);if(10===i){for(t||e.push("hardbreak","br",0),n++;n<r&&aF(i=e.src.charCodeAt(n));)n++;return e.pos=n,!0}let o=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(o+=e.src[n+1],n++)}let s="\\"+o;if(!t){let t=e.push("text_special","",0);i<256&&0!==cc[i]?t.content=o:t.content=s,t.markup=s,t.info="escape"}return e.pos=n+1,!0}],["backticks",function(e,t){let n,r=e.pos;if(96!==e.src.charCodeAt(r))return!1;let i=r;r++;let o=e.posMax;for(;r<o&&96===e.src.charCodeAt(r);)r++;let s=e.src.slice(i,r),l=s.length;if(e.backticksScanned&&(e.backticks[l]||0)<=i)return t||(e.pending+=s),e.pos+=l,!0;let a=r;for(;-1!==(n=e.src.indexOf("`",a));){for(a=n+1;a<o&&96===e.src.charCodeAt(a);)a++;let i=a-n;if(i===l){if(!t){let t=e.push("code_inline","code",0);t.markup=s,t.content=e.src.slice(r,n).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=a,!0}e.backticks[i]=n}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=l,!0}],["strikethrough",function(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||126!==r)return!1;let i=e.scanDelims(e.pos,!0),o=i.length,s=String.fromCharCode(r);if(o<2)return!1;o%2&&(e.push("text","",0).content=s,o--);for(let t=0;t<o;t+=2)e.push("text","",0).content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}],["emphasis",function(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||95!==r&&42!==r)return!1;let i=e.scanDelims(e.pos,42===r);for(let t=0;t<i.length;t++)e.push("text","",0).content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}],["link",function(e,t){let n,r,i,o,s="",l="",a=e.pos,c=!0;if(91!==e.src.charCodeAt(e.pos))return!1;let h=e.pos,u=e.posMax,d=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let f=p+1;if(f<u&&40===e.src.charCodeAt(f)){for(c=!1,f++;f<u&&(aF(n=e.src.charCodeAt(f))||10===n);f++);if(f>=u)return!1;if(a=f,(i=e.md.helpers.parseLinkDestination(e.src,f,e.posMax)).ok){for(s=e.md.normalizeLink(i.str),e.md.validateLink(s)?f=i.pos:s="",a=f;f<u&&(aF(n=e.src.charCodeAt(f))||10===n);f++);if(i=e.md.helpers.parseLinkTitle(e.src,f,e.posMax),f<u&&a!==f&&i.ok)for(l=i.str,f=i.pos;f<u&&(aF(n=e.src.charCodeAt(f))||10===n);f++);}(f>=u||41!==e.src.charCodeAt(f))&&(c=!0),f++}if(c){if(void 0===e.env.references)return!1;if(f<u&&91===e.src.charCodeAt(f)?(a=f+1,(f=e.md.helpers.parseLinkLabel(e,f))>=0?r=e.src.slice(a,f++):f=p+1):f=p+1,r||(r=e.src.slice(d,p)),!(o=e.env.references[aB(r)]))return e.pos=h,!1;s=o.href,l=o.title}if(!t){e.pos=d,e.posMax=p;let t=e.push("link_open","a",1),n=[["href",s]];t.attrs=n,l&&n.push(["title",l]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=f,e.posMax=u,!0}],["image",function(e,t){let n,r,i,o,s,l,a,c,h="",u=e.pos,d=e.posMax;if(33!==e.src.charCodeAt(e.pos)||91!==e.src.charCodeAt(e.pos+1))return!1;let p=e.pos+2,f=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(f<0)return!1;if((o=f+1)<d&&40===e.src.charCodeAt(o)){for(o++;o<d&&(aF(n=e.src.charCodeAt(o))||10===n);o++);if(o>=d)return!1;for(c=o,(l=e.md.helpers.parseLinkDestination(e.src,o,e.posMax)).ok&&(h=e.md.normalizeLink(l.str),e.md.validateLink(h)?o=l.pos:h=""),c=o;o<d&&(aF(n=e.src.charCodeAt(o))||10===n);o++);if(l=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<d&&c!==o&&l.ok)for(a=l.str,o=l.pos;o<d&&(aF(n=e.src.charCodeAt(o))||10===n);o++);else a="";if(o>=d||41!==e.src.charCodeAt(o))return e.pos=u,!1;o++}else{if(void 0===e.env.references)return!1;if(o<d&&91===e.src.charCodeAt(o)?(c=o+1,(o=e.md.helpers.parseLinkLabel(e,o))>=0?i=e.src.slice(c,o++):o=f+1):o=f+1,i||(i=e.src.slice(p,f)),!(s=e.env.references[aB(i)]))return e.pos=u,!1;h=s.href,a=s.title}if(!t){r=e.src.slice(p,f);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push("image","img",0),i=[["src",h],["alt",""]];n.attrs=i,n.children=t,n.content=r,a&&i.push(["title",a])}return e.pos=o,e.posMax=d,!0}],["autolink",function(e,t){let n=e.pos;
96if(60!==e.src.charCodeAt(n))return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(60===t)return!1;if(62===t)break}let o=e.src.slice(r+1,n);if(cp.test(o)){let n=e.md.normalizeLink(o);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);let r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=o.length+2,!0}if(cd.test(o)){let n=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);let r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=o.length+2,!0}return!1}],["html_inline",function(e,t){let n;if(!e.md.options.html)return!1;let r=e.posMax,i=e.pos;if(60!==e.src.charCodeAt(i)||i+2>=r)return!1;let o=e.src.charCodeAt(i+1);if(33!==o&&63!==o&&47!==o&&(!((n=32|o)>=97)||!(n<=122)))return!1;let s=e.src.slice(i).match(cn);if(!s)return!1;if(!t){var l,a;let t=e.push("html_inline","",0);t.content=s[0],l=t.content,/^<a[>\s]/i.test(l)&&e.linkLevel++,a=t.content,/^<\/a\s*>/i.test(a)&&e.linkLevel--}return e.pos+=s[0].length,!0}],["entity",function(e,t){let n=e.pos,r=e.posMax;if(38!==e.src.charCodeAt(n)||n+1>=r)return!1;if(35===e.src.charCodeAt(n+1)){let r=e.src.slice(n).match(cf);if(r){if(!t){let t="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push("text_special","",0);n.content=aC(t)?aS(t):aS(65533),n.markup=r[0],n.info="entity"}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(cm);if(r){let n=sR(r[0]);if(n!==r[0]){if(!t){let t=e.push("text_special","",0);t.content=n,t.markup=r[0],t.info="entity"}return e.pos+=r[0].length,!0}}}return!1}]],cy=[["balance_pairs",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;cg(e.delimiters);for(let e=0;e<n;e++)t[e]&&t[e].delimiters&&cg(t[e].delimiters)}],["strikethrough",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;ch(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ch(e,t[r].delimiters)}],["emphasis",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;cu(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&cu(e,t[r].delimiters)}],["fragments_join",function(e){let t,n,r=0,i=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,"text"===i[t].type&&t+1<o&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}]];function cb(){this.ruler=new aH;for(let e=0;e<ck.length;e++)this.ruler.push(ck[e][0],ck[e][1]);this.ruler2=new aH;for(let e=0;e<cy.length;e++)this.ruler2.push(cy[e][0],cy[e][1])}cb.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(""),r=n.length,i=e.md.options.maxNesting,o=e.cache;if(void 0!==o[t]){e.pos=o[t];return}let s=!1;if(e.level<i){for(let i=0;i<r;
96i++)if(e.level++,s=n[i](e,!0),e.level--,s){if(t>=e.pos)throw Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;!s&&e.pos++,o[t]=e.pos},cb.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let o=e.pos,s=!1;if(e.level<i){for(let r=0;r<n;r++)if(s=t[r](e,!1)){if(o>=e.pos)throw Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},cb.prototype.parse=function(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let o=this.ruler2.getRules(""),s=o.length;for(let e=0;e<s;e++)o[e](i)},cb.prototype.State=cl;let cv={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},cx=/^(vbscript|javascript|file|data):/,cw=/^data:image\/(gif|png|jpeg|webp);/;function cC(e){let t=e.trim().toLowerCase();return!cx.test(t)||cw.test(t)}let cS=["http:","https:","mailto:"];function cA(e){let t=sv(e,!0);if(t.hostname&&(!t.protocol||cS.indexOf(t.protocol)>=0))try{t.hostname=l7(t.hostname)}catch(e){}return sa(sc(t))}function cM(e){let t=sv(e,!0);if(t.hostname&&(!t.protocol||cS.indexOf(t.protocol)>=0))try{t.hostname=ae(t.hostname)}catch(e){}return ss(sc(t),ss.defaultChars+"%")}function cE(e,t){if(!(this instanceof cE))return new cE(e,t);t||a$.isString(e)||(t=e||{},e="default"),this.inline=new cb,this.block=new cs,this.core=new a5,this.renderer=new aV,this.linkify=new lG,this.validateLink=cC,this.normalizeLink=cA,this.normalizeLinkText=cM,this.utils=a$,this.helpers=a$.assign({},aj),this.options={},this.configure(e),t&&this.set(t)}cE.prototype.set=function(e){return a$.assign(this.options,e),this},cE.prototype.configure=function(e){let t=this;if(a$.isString(e)){let t=e;if(!(e=cv[t]))throw Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!e)throw Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[
96n].ruler2.enableOnly(e.components[n].rules2)}),this},cE.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(e){return 0>n.indexOf(e)});if(r.length&&!t)throw Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},cE.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(e){return 0>n.indexOf(e)});if(r.length&&!t)throw Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},cE.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},cE.prototype.parse=function(e,t){if("string"!=typeof e)throw Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},cE.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},cE.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},cE.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var c_=e.i(761211),cT=Object.defineProperty,cD=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?cT(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n};let cO=t0.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>"true"===e.getAttribute("data-tight")||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return n=>{let{editor:r,commands:i}=n;return e.options.listTypes.some(e=>(function(e){if(!r.isActive(e))return!1;let n=r.getAttributes(e);return i.updateAttributes(e,{tight:null!=t?t:!(null!=n&&n.tight)})})(e))}}}}}),cN=cE();function cI(e,t){return cN.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new cN.inline.State(e,null,null,[]).scanDelims(t,!0)}function cL(e,t,n,r){let i=e.substring(0,n)+e.substring(n+t.length);return i.substring(0,n+r)+t+i.substring(n+r)}class cF extends ab{render(e,t,n){super.render(e,t,n);let r=this.inlines[this.inlines.length-1];if(null!=r&&r.start&&null!=r&&r.end){var i;let e,{delimiter:t,start:n,end:o}=this.normalizeInline(r);this.out=(i=this.out,(e=function(e,t,n,r){let i=r,o=e;for(;i>n&&!cI(o,i).can_close;)o=cL(o,t,i,-1),i--;return{text:o,from:n,to:i}}((e=function(e,t,n,r){let i=n,o=e;for(;i<r&&!cI(o,i).can_open;)o=cL(o,t,i,1),i++;return{text:o,from:i,to:r}}((e={text:i,from:n,to:o}).text,t,e.from,e.to)).text,t,e.from,e.to)).to-e.from<t.length+1&&(e.text=e.text.substring(0,e.from)+e.text.substring(e.to+t.length)),e.text),this.inlines.pop()}}markString(e,t,n,r){let i=this.marks[e.type.name];if(i.expelEnclosingWhitespace)if(t)this.inlines.push({start:this.out.length,delimiter:i.open});else{let e=this.inlines.pop();this.inlines.push({...e,end:this.out.length})}return super.markString(e,t,n,r)}normalizeInline(e){let{start:t,end:n}=e;for(;this.out.charAt(t).match(/\s/);)t++;return{...e,start:t}}constructor(e,t,n){super(e,t,null!=n?n:{}),cD(this,"inTable",!1),this.inlines=[]}}let cR=tZ.create({name:"markdownHTMLMark",addStorage:()=>({markdown:{serialize:{open(e,t){var n,r;return this.editor.storage.markdown.options.html?null!=(n=null==(r=cz(t))?void 0:r[0])?n:"":(console.warn(`Tiptap Markdown: "${t.type.name}" mark is only available in html mode`),"")},close(e,t){var n,r;return this.editor.storage.markdown.options.html&&null!=(n=null==(r=cz(t))?void 0:r[1])?n:""}},parse:{}}})});function cz(e){let t=e.type.schema,n=t.text(" ",[e]),r=eY(x.Fragment.from(n),t).match(/^(<.*?>) (<\/.*?>)$/);return r?[r[1],r[2]]:null}function cP(e){let t=`<body>${e}</body>`;return new window.DOMParser().parseFromString(t,"text/html").body}let cB=nx.create({name:"markdownHTMLNode",addStorage:()=>({markdown:{serialize(e,t,n){var r,i;let o,s,l;this.editor.storage.markdown.options.html?e.write((r=t,i=n,o=r.type.schema,s=eY(x.Fragment.from(r),o),r.isBlock&&(i instanceof x.Fragment||i.type.name===o.topNodeType.name)?((l=cP(s).firstElementChild).innerHTML=l.innerHTML.trim()?` 97${l.innerHTML} 98`:`
99`,l.outerHTML):s)):(console.warn(`Tiptap Markdown: "${t.type.name}" node is only available in html mode`),e.write(`[${t.type.name}]`)),t.isBlock&&e.closeBlock(t)},parse:{}}})}),c$=nx.create({name:"blockquote"}).extend({addStorage:()=>({markdown:{serialize:ak.nodes.blockquote,parse:{}}})}),cj=nx.create({name:"bulletList"}).extend({addStorage:()=>({markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}})}),cq=nx.create({name:"codeBlock"}).extend({addStorage:()=>({markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+"\n"),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:null!=(t=this.options.languageClassPrefix)?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"</code></pre>")}}}})}),cV=nx.create({name:"hardBreak"}).extend({addStorage:()=>({markdown:{serialize(e,t,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=t.type)return void e.write(e.inTable?cB.storage.markdown.serialize.call(this,e,t,n):"\\\n")},parse:{}}})}),cH=nx.create({name:"heading"}).extend({addStorage:()=>({markdown:{serialize:ak.nodes.heading,parse:{}}})}),cW=nx.create({name:"horizontalRule"}).extend({addStorage:()=>({markdown:{serialize:ak.nodes.horizontal_rule,parse:{}}})}),cU=nx.create({name:"image"}).extend({addStorage:()=>({markdown:{serialize:ak.nodes.image,parse:{}}})}),cK=nx.create({name:"listItem"}).extend({addStorage:()=>({markdown:{serialize:ak.nodes.list_item,parse:{}}})}),cJ=nx.create({name:"orderedList"}).extend({addStorage:()=>({markdown:{serialize(e,t,n,r){let i=t.attrs.start||1,o=String(i+t.childCount-1).length,s=e.repeat(" ",o+2),l=function(e,t,n){let r=0;for(;n-r>0&&t.child(n-r-1).type.name===e.type.name;r++);return r}(t,n,r)%2?") ":". ";e.renderList(t,s,t=>{let n=String(i+t);return e.repeat(" ",o-n.length)+n+l})},parse:{}}})}),cZ=nx.create({name:"paragraph"}).extend({addStorage:()=>({markdown:{serialize:ak.nodes.paragraph,parse:{}}})});function cG(e){var t,n;return null!=(t=null==e||null==(n=e.content)?void 0:n.content)?t:[]}let cQ=nx.create({name:"table"}).extend({addStorage:()=>({markdown:{serialize(e,t,n){let r,i,o;(i=(r=cG(t))[0],o=r.slice(1),cG(i).some(e=>"tableHeader"!==e.type.name||cX(e)||e.childCount>1)||o.some(e=>cG(e).some(e=>"tableHeader"===e.type.name||cX(e)||e.childCount>1)))?cB.storage.markdown.serialize.call(this,e,t,n):(e.inTable=!0,t.forEach((t,n,r)=>{if(e.write("| "),t.forEach((t,n,r)=>{r&&e.write(" | ");let i=t.firstChild;i.textContent.trim()&&e.renderInline(i)}),e.write(" |"),e.ensureNewLine(),!r){let n=Array.from({length:t.childCount}).map(()=>"---").join(" | ");e.write(`| ${n} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1)},parse:{}}})});function cX(e){return e.attrs.colspan>1||e.attrs.rowspan>1}let cY=nx.create({name:"taskItem"}).extend({addStorage:()=>({markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(e=>{let t=e.querySelector("input");e.setAttribute("data-type","taskItem"),t&&(e.setAttribute("data-checked",t.checked),t.remove())})}}}})}),c0=nx.create({name:"taskList"}).extend({addStorage:()=>({markdown:{serialize:cj.storage.markdown.serialize,parse:{setup(e){e.use(c_.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(e=>{e.setAttribute("data-type","taskList")})}}}})}),c1=[c$,cj,cq,cV,cH,cW,cB,cU,cK,cJ,cZ,cQ,cY,c0,nx.create({name:"text"}).extend({addStorage:()=>({markdown:{serialize(e,t){var n;e.text(null==(n=t.text)?void 0:n.replace(/</g,"<").replace(/>/g,">"))},parse:{}}})}),tZ.create({name:"bold"}).extend({addStorage:()=>({markdown:{serialize:ak.marks.strong,parse:{}}})}),tZ.create({name:"code"}).extend({addStorage:()=>({markdown:{serialize:ak.marks.code,parse:{}}})}),cR,tZ.create({name:"italic"}).extend({addStorage:()=>({markdown:{serialize:ak.marks.em,parse:{}}})}),tZ.create({name:"link"}).extend({addStorage:()=>({markdown:{serialize:ak.marks.link,parse:{}}})}),tZ.create({name:"strike"}).extend({addStorage:()=>({markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}})})];function c2(e){var t,n;let r=null==(t=e.storage)?void 0:t.markdown,i=null==(n=c1.find(t=>t.name===e.name))?void 0:n.storage.markdown;return r||i?{...i,...r}:null}class c3{serialize(e){let t=new cF(this.nodes,this.marks,{hardBreakNodeName:cV.name});return t.renderContent(e),t.out}get nodes(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(e=>[e,this.serializeNode(cB)])),...Object.fromEntries(null!=(e=this.editor.extensionManager.extensions.filter(e=>"node"===e.type&&this.serializeNode(e)).map(e=>[e.name,this.serializeNode(e)]))?e:[])}}get marks(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(e=>[e,this.serializeMark(cR)])),...Object.fromEntries(null!=(e=this.editor.extensionManager.extensions.filter(e=>"mark"===e.type&&this.serializeMark(e)).map(e=>[e.name,this.serializeMark(e)]))?e:[])}}serializeNode(e){var t;return null==(t=c2(e))||null==(t=t.serialize)?void 0:t.bind({editor:this.editor,options:e.options})}serializeMark(e){var t;let n=null==(t=c2(e))?void 0:t.serialize;return n?{...n,open:"function"==typeof n.open?n.open.bind({editor:this.editor,options:e.options}):n.open,close:"function"==typeof n.close?n.close.bind({editor:this.editor,options:e.options}):n.close}:null}constructor(e){cD(this,"editor",null),this.editor=e}}class c5{parse(e){let{inline:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e){this.editor.extensionManager.extensions.forEach(e
99=>{var t;return null==(t=c2(e))||null==(t=t.parse)||null==(t=t.setup)?void 0:t.call({editor:this.editor,options:e.options},this.md)});let n=cP(this.md.render(e));return this.editor.extensionManager.extensions.forEach(e=>{var t;return null==(t=c2(e))||null==(t=t.parse)||null==(t=t.updateDOM)?void 0:t.call({editor:this.editor,options:e.options},n)}),this.normalizeDOM(n,{inline:t,content:e}),n.innerHTML}return e}normalizeDOM(e,t){let{inline:n,content:r}=t;return this.normalizeBlocks(e),e.querySelectorAll("*").forEach(e=>{var t;(null==(t=e.nextSibling)?void 0:t.nodeType)!==Node.TEXT_NODE||e.closest("pre")||(e.nextSibling.textContent=e.nextSibling.textContent.replace(/^\n/,""))}),n&&this.normalizeInline(e,r),e}normalizeBlocks(e){let t=Object.values(this.editor.schema.nodes).filter(e=>e.isBlock).map(e=>{var t;return null==(t=e.spec.parseDOM)?void 0:t.map(e=>e.tag)}).flat().filter(Boolean).join(",");t&&[...e.querySelectorAll(t)].forEach(e=>{e.parentElement.matches("p")&&function(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),0===t.childNodes.length&&t.remove()}(e)})}normalizeInline(e,t){var n,r,i,o,s;if(null!=(n=e.firstElementChild)&&n.matches("p")){let n=e.firstElementChild,{nextElementSibling:l}=n,a=null!=(r=null==(i=t.match(/^\s+/))?void 0:i[0])?r:"",c=l?"":null!=(o=null==(s=t.match(/\s+$/))?void 0:s[0])?o:"";if(t.match(/^\n\n/)){n.innerHTML=`${n.innerHTML}${c}`;return}let h=n.parentNode;for(;n.firstChild;)h.insertBefore(n.firstChild,n);h.removeChild(n),e.innerHTML=`${a}${e.innerHTML}${c}`}}withPatchedRenderer(e){let t=e=>function(){let t=e(...arguments);return"\n"===t?t:"\n"===t[t.length-1]?t.slice(0,-1):t};return e.renderer.rules.hardbreak=t(e.renderer.rules.hardbreak),e.renderer.rules.softbreak=t(e.renderer.rules.softbreak),e.renderer.rules.fence=t(e.renderer.rules.fence),e.renderer.rules.code_block=t(e.renderer.rules.code_block),e.renderer.renderToken=t(e.renderer.renderToken.bind(e.renderer)),e}constructor(e,t){cD(this,"editor",null),cD(this,"md",null);let{html:n,linkify:r,breaks:i}=t;this.editor=e,this.md=this.withPatchedRenderer(cE({html:n,linkify:r,breaks:i}))}}let c4=t0.create({name:"markdownClipboard",addOptions:()=>({transformPastedText:!1,transformCopiedText:!1}),addProseMirrorPlugins(){return[new v.Plugin({key:new v.PluginKey("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return x.DOMParser.fromSchema(this.editor.schema).parseSlice(cP(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),c6=t0.create({name:"markdown",priority:50,addOptions:()=>({html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}),addCommands(){let e=tY.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>i=>e.insertContentAt(t,i.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(i)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new c5(this.editor,this.options),serializer:new c3(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage:()=>({}),addExtensions(){return[cO.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),c4.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});e.s(["Markdown",0,c6],411036)},293063,(e,t,n)=>{"use strict";var r=e.r(191788),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,l=r.useLayoutEffect,a=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var h="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,h=r[1];return l(function(){i.value=n,i.getSnapshot=t,c(i)&&h({inst:i})},[e,n,t]),s(function(){return c(i)&&h({inst:i}),e(function(){c(i)&&h({inst:i})})},[e]),a(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:h},872196,(e,t,n)=>{"use strict";
99t.exports=e.r(293063)},668529,(e,t,n)=>{"use strict";var r=e.r(191788),i=e.r(872196),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,l=r.useRef,a=r.useEffect,c=r.useMemo,h=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var u=l(null);if(null===u.current){var d={hasValue:!1,value:null};u.current=d}else d=u.current;var p=s(e,(u=c(function(){function e(e){if(!a){if(a=!0,s=e,e=r(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return l=t}return l=e}if(t=l,o(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(s=e,t):(s=e,l=n)}var s,l,a=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]))[0],u[1]);return a(function(){d.hasValue=!0,d.value=p},[p]),h(p),p}},763868,(e,t,n)=>{"use strict";t.exports=e.r(668529)},761211,(e,t,n)=>{var r=!0,i=!1,o=!1;function s(e,t,n){var r=e.attrIndex(t),i=[t,n];r<0?e.attrPush(i):e.attrs[r]=i}t.exports=function(e,t){t&&(r=!t.enabled,i=!!t.label,o=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(e){for(var t=e.tokens,n=2;n<t.length;n++)(function(e,t){var n;return"inline"===e[t].type&&"paragraph_open"===e[t-1].type&&"list_item_open"===e[t-2].type&&(0===(n=e[t]).content.indexOf("[ ] ")||0===n.content.indexOf("[x] ")||0===n.content.indexOf("[X] "))})(t,n)&&(function(e,t){if(e.children.unshift(function(e,t){var n=new t("html_inline","",0),i=r?' disabled="" ':"";return 0===e.content.indexOf("[ ] ")?n.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':(0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] "))&&(n.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">'),n}(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),i)if(o){e.children.pop();var n="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(function(e,t,n){var r=new n("html_inline","",0);return r.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",r.attrs=[{for:t}],r}(e.content,n,t))}else e.children.unshift(function(e){var t=new e("html_inline","",0);return t.content="<label>",t}(t)),e.children.push(function(e){var t=new e("html_inline","",0);return t.content="</label>",t}(t))}(t[n],e.Token),s(t[n-2],"class","task-list-item"+(r?"":" enabled")),s(t[function(e,t){for(var n=e[t].level-1,r=t-1;r>=0;r--)if(e[r].level===n)return r;return -1}(t,n-2)],"class","contains-task-list"))})}},150215,932118,e=>{"use strict";var t=e.i(524617),n=e.i(308822),r=e.i(175863);let i=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function o(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let s=(e,i,s)=>{let l=o(e,s);if(!l)return!1;let c=h(l);if(!c){let n=l.blockRange(),r=n&&(0,t.liftTarget)(n);return null!=r&&(i&&i(e.tr.lift(n,r).scrollIntoView()),!0)}let u=c.nodeBefore;if(x(e,c,i,-1))return!0;if(0==l.parent.content.size&&(a(u,"end")||r.NodeSelection.isSelectable(u)))for(let o=l.depth;;o--){let s=(0,t.replaceStep)(e.doc,l.before(o),l.after(o),n.Slice.empty);if(s&&s.slice.size<s.to-s.from){if(i){let t=e.tr.step(s);t.setSelection(a(u,"end")?r.Selection.findFrom(t.doc.resolve(t.mapping.map(c.pos,-1)),-1):r.NodeSelection.create(t.doc,c.pos-u.nodeSize)),i(t.scrollIntoView())}return!0}if(1==o||l.node(o-1).childCount>1)break}return!!u.isAtom&&c.depth==l.depth-1&&(i&&i(e.tr.delete(c.pos-u.nodeSize,c.pos).scrollIntoView()),!0)};function l(e,i,o){let s=i.nodeBefore,l=i.pos-1;for(;!s.isTextblock;l--){if(s.type.spec.isolating)return!1;let e=s.lastChild;if(!e)return!1;s=e}let a=i.nodeAfter,c=i.pos+1;for(;!a.isTextblock;c++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let h=(0,t.replaceStep)(e.doc,l,c,n.Slice.empty);if(!h||h.from!=l||h instanceof t.ReplaceStep&&h.slice.size>=c-l)return!1;if(o){let t=e.tr.step(h);t.setSelection(r.TextSelection.create(t.doc,l)),o(t.scrollIntoView())}return!0}function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;
99if(n&&1!=r.childCount)break}return!1}let c=(e,t,n)=>{let{$head:i,empty:o}=e.selection,s=i;if(!o)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):i.parentOffset>0)return!1;s=h(i)}let l=s&&s.nodeBefore;return!!l&&!!r.NodeSelection.isSelectable(l)&&(t&&t(e.tr.setSelection(r.NodeSelection.create(e.doc,s.pos-l.nodeSize)).scrollIntoView()),!0)};function h(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 u(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let d=(e,i,o)=>{let s=u(e,o);if(!s)return!1;let l=f(s);if(!l)return!1;let c=l.nodeAfter;if(x(e,l,i,1))return!0;if(0==s.parent.content.size&&(a(c,"start")||r.NodeSelection.isSelectable(c))){let o=(0,t.replaceStep)(e.doc,s.before(),s.after(),n.Slice.empty);if(o&&o.slice.size<o.to-o.from){if(i){let t=e.tr.step(o);t.setSelection(a(c,"start")?r.Selection.findFrom(t.doc.resolve(t.mapping.map(l.pos)),1):r.NodeSelection.create(t.doc,t.mapping.map(l.pos))),i(t.scrollIntoView())}return!0}}return!!c.isAtom&&l.depth==s.depth-1&&(i&&i(e.tr.delete(l.pos,l.pos+c.nodeSize).scrollIntoView()),!0)},p=(e,t,n)=>{let{$head:i,empty:o}=e.selection,s=i;if(!o)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):i.parentOffset<i.parent.content.size)return!1;s=f(i)}let l=s&&s.nodeAfter;return!!l&&!!r.NodeSelection.isSelectable(l)&&(t&&t(e.tr.setSelection(r.NodeSelection.create(e.doc,s.pos)).scrollIntoView()),!0)};function f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let m=(e,t)=>
99{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function g(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let k=(e,t)=>{let{$head:n,$anchor:i}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let o=n.node(-1),s=n.indexAfter(-1),l=g(o.contentMatchAt(s));if(!l||!o.canReplaceWith(s,s,l))return!1;if(t){let i=n.after(),o=e.tr.replaceWith(i,i,l.createAndFill());o.setSelection(r.Selection.near(o.doc.resolve(i),1)),t(o.scrollIntoView())}return!0},y=(e,t)=>{let n=e.selection,{$from:i,$to:o}=n;if(n instanceof r.AllSelection||i.parent.inlineContent||o.parent.inlineContent)return!1;let s=g(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let n=(!i.parentOffset&&o.index()<o.parent.childCount?i:o).pos,l=e.tr.insert(n,s.createAndFill());l.setSelection(r.TextSelection.create(l.doc,n+1)),t(l.scrollIntoView())}return!0},b=(e,n)=>{let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let i=r.before();if((0,t.canSplit)(e.doc,i))return n&&n(e.tr.split(i).scrollIntoView()),!0}let i=r.blockRange(),o=i&&(0,t.liftTarget)(i);return null!=o&&(n&&n(e.tr.lift(i,o).scrollIntoView()),!0)},v=(e,n)=>{let{$from:i,$to:o}=e.selection;if(e.selection instanceof r.NodeSelection&&e.selection.node.isBlock)return!!i.parentOffset&&!!(0,t.canSplit)(e.doc,i.pos)&&(n&&n(e.tr.split(i.pos).scrollIntoView()),!0);if(!i.depth)return!1;let s=[],l,a,c=!1,h=!1;for(let e=i.depth;;e--){if(i.node(e).isBlock){let t;c=i.end(e)==i.pos+(i.depth-e),h=i.start(e)==i.pos-(i.depth-e),a=g(i.node(e-1).contentMatchAt(i.indexAfter(e-1)));s.unshift(t||(c&&a?{type:a}:null)),l=e;break}if(1==e)return!1;s.unshift(null)}let u=e.tr;(e.selection instanceof r.TextSelection||e.selection instanceof r.AllSelection)&&u.deleteSelection();let d=u.mapping.map(i.pos),p=(0,t.canSplit)(u.doc,d,s.length,s);if(p||(s[0]=a?{type:a}:null,p=(0,t.canSplit)(u.doc,d,s.length,s)),!p)return!1;if(u.split(d,s.length,s),!c&&h&&i.node(l).type!=a){let e=u.mapping.map(i.before(l)),t=u.doc.resolve(e);a&&i.node(l-1).canReplaceWith(t.index(),t.index()+1,a)&&u.setNodeMarkup(u.mapping.map(i.before(l)),a)}return n&&n(u.scrollIntoView()),!0};function x(e,i,o,s){let l,c,h,u=i.nodeBefore,d=i.nodeAfter,p,f,m=u.type.spec.isolating||d.type.spec.isolating;if(!m&&(l=i.nodeBefore,c=i.nodeAfter,h=i.index(),l&&c&&l.type.compatibleContent(c.type)&&(!l.content.size&&i.parent.canReplace(h-1,h)?(o&&o(e.tr.delete(i.pos-l.nodeSize,i.pos).scrollIntoView()),!0):!!i.parent.canReplace(h,h+1)&&!!(c.isTextblock||(0,t.canJoin)(e.doc,i.pos))&&(o&&o(e.tr.join(i.pos).scrollIntoView()),!0))))return!0;let g=!m&&i.parent.canReplace(i.index(),i.index()+1);if(g&&(p=(f=u.contentMatchAt(u.childCount)).findWrapping(d.type))&&f.matchType(p[0]||d.type).validEnd){if(o){let r=i.pos+d.nodeSize,s=n.Fragment.empty;for(let e=p.length-1;e>=0;e--)s=n.Fragment.from(p[e].create(null,s));s=n.Fragment.from(u.copy(s));let l=e.tr.step(new t.ReplaceAroundStep(i.pos-1,r,i.pos,r,new n.Slice(s,1,0),p.length,!0)),a=l.doc.resolve(r+2*p.length);a.nodeAfter&&a.nodeAfter.type==u.type&&(0,t.canJoin)(l.doc,a.pos)&&l.join(a.pos),o(l.scrollIntoView())}return!0}let k=d.type.spec.isolating||s>0&&m?null:r.Selection.findFrom(i,1),y=k&&k.$from.blockRange(k.$to),b=y&&(0,t.liftTarget)(y);if(null!=b&&b>=i.depth)return o&&o(e.tr.lift(y,b).scrollIntoView()),!0;if(g&&a(d,"start",!0)&&a(u,"end")){let r=u,s=[];for(;s.push(r),!r.isTextblock;)r=r.lastChild;let l=d,a=1;for(;!l.isTextblock;l=l.firstChild)a++;if(r.canReplace(r.childCount,r.childCount,l.content)){if(o){let r=n.Fragment.empty;for(let e=s.length-1;e>=0;e--)r=n.Fragment.from(s[e].copy(r));o(e.tr.step(new t.ReplaceAroundStep(i.pos-s.length,i.pos+d.nodeSize,i.pos+a,i.pos+d.nodeSize-a,new n.Slice(r,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function w(e){return function(t,n){let i=t.selection,o=e<0?i.$from:i.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return!!o.node(s).isTextblock&&(n&&n(t.tr.setSelection(r.TextSelection.create(t.doc,e<0?o.start(s):o.end(s)))),!0)}}let C=w(-1),S=w(1);function A(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}
99let M=A(i,s,c),E=A(i,d,p),_={Enter:A(m,y,b,v),"Mod-Enter":k,Backspace:M,"Mod-Backspace":M,"Shift-Backspace":M,Delete:E,"Mod-Delete":E,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new r.AllSelection(e.doc))),!0)},T={"Ctrl-h":_.Backspace,"Alt-Backspace":_["Mod-Backspace"],"Ctrl-d":_.Delete,"Ctrl-Alt-Backspace":_["Mod-Delete"],"Alt-Delete":_["Mod-Delete"],"Alt-d":_["Mod-Delete"],"Ctrl-a":C,"Ctrl-e":S};for(let e in _)T[e]=_[e];"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform(),e.s(["createParagraphNear",0,y,"deleteSelection",0,i,"exitCode",0,k,"joinBackward",0,s,"joinDown",0,(e,n)=>{let i=e.selection,o;if(i instanceof r.NodeSelection){if(i.node.isTextblock||!(0,t.canJoin)(e.doc,i.to))return!1;o=i.to}else if(null==(o=(0,t.joinPoint)(e.doc,i.to,1)))return!1;return n&&n(e.tr.join(o).scrollIntoView()),!0},"joinForward",0,d,"joinTextblockBackward",0,(e,t,n)=>{let r=o(e,n);if(!r)return!1;let i=h(r);return!!i&&l(e,i,t)},"joinTextblockForward",0,(e,t,n)=>{let r=u(e,n);if(!r)return!1;let i=f(r);return!!i&&l(e,i,t)},"joinUp",0,(e,n)=>{let i=e.selection,o=i instanceof r.NodeSelection,s;if(o){if(i.node.isTextblock||!(0,t.canJoin)(e.doc,i.from))return!1;s=i.from}else if(null==(s=(0,t.joinPoint)(e.doc,i.from,-1)))return!1;if(n){let t=e.tr.join(s);o&&t.setSelection(r.NodeSelection.create(t.doc,s-e.doc.resolve(s).nodeBefore.nodeSize)),n(t.scrollIntoView())}return!0},"lift",0,(e,n)=>{let{$from:r,$to:i}=e.selection,o=r.blockRange(i),s=o&&(0,t.liftTarget)(o);return null!=s&&(n&&n(e.tr.lift(o,s).scrollIntoView()),!0)},"liftEmptyBlock",0,b,"newlineInCode",0,m,"selectNodeBackward",0,c,"selectNodeForward",0,p,"selectParentNode",0,(e,t)=>{let{$from:n,to:i}=e.selection,o,s=n.sharedDepth(i);return 0!=s&&(o=n.before(s),t&&t(e.tr.setSelection(r.NodeSelection.create(e.doc,o))),!0)},"selectTextblockEnd",0,S,"selectTextblockStart",0,C,"setBlockType",0,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(o,s,(r,o)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(o),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];i.setBlockType(o,s,e,t)}r(i.scrollIntoView())}return!0}},"splitBlock",0,v,"wrapIn",0,function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(r,i){let{$from:o,$to:s}=r.selection,l=o.blockRange(s),a=l&&(0,t.findWrapping)(l,e,n);return!!a&&(i&&i(r.tr.wrap(l,a).scrollIntoView()),!0)}}],150215),e.s(["liftListItem",0,function(e){return function(r,i){let{$from:o,$to:s}=r.selection,l=o.blockRange(s,t=>t.childCount>0&&t.firstChild.type==e);return!!l&&(!i||(o.node(l.depth-1).type==e?function(e,r,i,o){let s=e.tr,l=o.end,a=o.$to.end(o.depth);l<a&&(s.step(new t.ReplaceAroundStep(l-1,a,l,a,new n.Slice(n.Fragment.from(i.create(null,o.parent.copy())),1,0),1,!0)),o=new n.NodeRange(s.doc.resolve(o.$from.pos),s.doc.resolve(a),o.depth));let c=(0,t.liftTarget)(o);if(null==c)return!1;s.lift(o,c);let h=s.doc.resolve(s.mapping.map(l,-1)-1);return(0,t.canJoin)(s.doc,h.pos)&&h.nodeBefore.type==h.nodeAfter.type&&s.join(h.pos),r(s.scrollIntoView()),!0}(r,i,e,l):function(e,r,i){let o=e.tr,s=i.parent;for(let e=i.end,t=i.endIndex-1,n=i.startIndex;t>n;t--)e-=s.child(t).nodeSize,o.delete(e-1,e+1);let l=o.doc.resolve(i.start),a=l.nodeAfter;if(o.mapping.map(i.end)!=i.start+l.nodeAfter.nodeSize)return!1;let c=0==i.startIndex,h=i.endIndex==s.childCount,u=l.node(-1),d=l.index(-1);if(!u.canReplace(d+ +!c,d+1,a.content.append(h?n.Fragment.empty:n.Fragment.from(s))))return!1;let p=l.pos,f=p+a.nodeSize;return o.step(new t.ReplaceAroundStep(p-!!c,f+ +!!h,p+1,f-1,new n.Slice((c?n.Fragment.empty:n.Fragment.from(s.copy(n.Fragment.empty))).append(h?n.Fragment.empty:n.Fragment.from(s.copy(n.Fragment.empty))),+!c,+!h),+!c)),r(o.scrollIntoView()),!0}(r,i,l)))}},"sinkListItem",0,function(e){return function(r,i){let{$from:o,$to:s}=r.selection,l=o.blockRange(s,t=>t.childCount>0&&t.firstChild.type==e);if(!l)return!1;let a=l.startIndex;if(0==a)return!1;let c=l.parent,h=c.child(a-1);if(h.type!=e)return!1;if(i){let o=h.lastChild&&h.lastChild.type==c.type,s=n.Fragment.from(o?e.create():null),a=new n.Slice(n.Fragment.from(e.create(null,n.Fragment.from(c.type.create(null,s)))),o?3:1,0),u=l.start,d=l.end;i(r.tr.step(new t.ReplaceAroundStep(u-(o?3:1),d,u,d,a,1,!0)).scrollIntoView())}return!0}},"splitListItem",0,function(e,i){return function(o,s){let{$from:l,$to:a,node:c}=o.selection;if(c&&c.isBlock||l.depth<2||!l.sameParent(a))return!1;let h=l.node(-1);if(h.type!=e)return!1;if(0==l.parent.content.size&&l.node(-1).childCount==l.indexAfter(-1)){if
99(3==l.depth||l.node(-3).type!=e||l.index(-2)!=l.node(-2).childCount-1)return!1;if(s){let t=n.Fragment.empty,i=l.index(-1)?1:l.index(-2)?2:3;for(let e=l.depth-i;e>=l.depth-3;e--)t=n.Fragment.from(l.node(e).copy(t));let a=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3;t=t.append(n.Fragment.from(e.createAndFill()));let c=l.before(l.depth-(i-1)),h=o.tr.replace(c,l.after(-a),new n.Slice(t,4-i,0)),u=-1;h.doc.nodesBetween(c,h.doc.content.size,(e,t)=>{if(u>-1)return!1;e.isTextblock&&0==e.content.size&&(u=t+1)}),u>-1&&h.setSelection(r.Selection.near(h.doc.resolve(u))),s(h.scrollIntoView())}return!0}let u=a.pos==l.end()?h.contentMatchAt(0).defaultType:null,d=o.tr.delete(l.pos,a.pos),p=u?[i?{type:e,attrs:i}:null,{type:u}]:void 0;return!!(0,t.canSplit)(d.doc,l.pos,2,p)&&(s&&s(d.split(l.pos,2,p).scrollIntoView()),!0)}},"wrapInList",0,function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(i,o){let{$from:s,$to:l}=i.selection,a=s.blockRange(l);if(!a)return!1;let c=o?i.tr:null;return!!function(e,r,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=!1,l=r,a=r.$from.doc;if(r.depth>=2&&r.$from.node(r.depth-1).type.compatibleContent(i)&&0==r.startIndex){if(0==r.$from.index(r.depth-1))return!1;let e=a.resolve(r.start-2);l=new n.NodeRange(e,e,r.depth),r.endIndex<r.parent.childCount&&(r=new n.NodeRange(r.$from,a.resolve(r.$to.end(r.depth)),r.depth)),s=!0}let c=(0,t.findWrapping)(l,i,o,r);return!!c&&(e&&function(e,r,i,o,s){let l=n.Fragment.empty;for(let e=i.length-1;e>=0;e--)l=n.Fragment.from(i[e].type.create(i[e].attrs,l));e.step(new t.ReplaceAroundStep(r.start-2*!!o,r.end,r.start,r.end,new n.Slice(l,0,0),i.length,!0));let a=0;for(let e=0;e<i.length;e++)i[e].type==s&&(a=e+1);let c=i.length-a,h=r.start+i.length-2*!!o,u=r.parent;for(let n=r.startIndex,i=r.endIndex,o=!0;n<i;n++,o=!1)!o&&(0,t.canSplit)(e.doc,h,c)&&(e.split(h,c),h+=2*c),h+=u.child(n).nodeSize}(e,r,c,s,i),!0)}(c,a,e,r)&&(o&&o(c.scrollIntoView()),!0)}}],932118)},175863,308822,524617,e=>{"use strict";function t(e){this.content=e}t.prototype={constructor:t,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,n,r){var i=r&&r!=e?this.remove(r):this,o=i.find(e),s=i.content.slice();return -1==o?s.push(r||e,n):(s[o+1]=n,r&&(s[o]=r)),new t(s)},remove:function(e){var n=this.find(e);if(-1==n)return this;var r=this.content.slice();return r.splice(n,2),new t(r)},addToStart:function(e,n){return new t([e,n].concat(this.remove(e).content))},addToEnd:function(e,n){var r=this.remove(e).content.slice();return r.push(e,n),new t(r)},addBefore:function(e,n,r){var i=this.remove(n),o=i.content.slice(),s=i.find(e);return o.splice(-1==s?o.length:s,0,n,r),new t(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=t.from(e)).size?new t(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=t.from(e)).size?new t(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var n=this;e=t.from(e);for(var r=0;r<e.content.length;r+=2)n=n.remove(e.content[r]);return n},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},t.from=function(e){if(e instanceof t)return e;var n=[];if(e)for(var r in e)n.push(r,e[r]);return new t(n)};class n{nodesBetween(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0;for(let o=0,s=0;s<t;o++){let l=this.content[o],a=s+l.nodeSize;if(a>e&&!1!==n(l,r+s,i||null,o)&&l.content.size){let i=s+1;l.nodesBetween(Math.max(0,e-i),Math.min(l.content.size,t-i),n,r+i)}s=a}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(s,l)=>{let a=s.isText?s.text.slice(Math.max(e,l)-l,t-l):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&a||s.isTextblock)&&n&&(o?o=!1:i+=n),i+=a},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new n(i,this.size+e.size)}cut(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size;if(0==e&&t==this.size)return this;let r=[],i=0;if(t>e)for(let n=0,o=0;o<t;n++){let s=this.content[n],l=o+s.nodeSize;l>e&&((o<e||l>t)&&(s=s.isText?s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),r.push(s),i+=s.nodeSize),o=l}return new n(r,i)}cutByIndex(e,t){return e==t?n.empty:0==e&&t==this.content.length?this:new n(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;
99let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new n(i,o)}addToStart(e){return new n([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new n(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let o=t.child(i),s=n.child(i);if(o==s){r+=o.nodeSize;continue}if(!o.sameMarkup(s))return r;if(o.isText&&o.text!=s.text){for(let e=0;o.text[e]==s.text[e];e++)r++;return r}if(o.content.size||s.content.size){let t=e(o.content,s.content,r+1);if(null!=t)return t}r+=o.nodeSize}}(this,e,t)}findDiffEnd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size;return function e(t,n,r,i){for(let o=t.childCount,s=n.childCount;;){if(0==o||0==s)return o==s?null:{a:r,b:i};let l=t.child(--o),a=n.child(--s),c=l.nodeSize;if(l==a){r-=c,i-=c;continue}if(!l.sameMarkup(a))return{a:r,b:i};if(l.isText&&l.text!=a.text){let e=0,t=Math.min(l.text.length,a.text.length);for(;e<t&&l.text[l.text.length-e-1]==a.text[a.text.length-e-1];)e++,r--,i--;return{a:r,b:i}}if(l.content.size||a.content.size){let t=e(l.content,a.content,r-1,i-1);if(t)return t}r-=c,i-=c}}(this,e,t,n)}findIndex(e){if(0==e)return i(0,e);if(e==this.size)return i(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=n+this.child(t).nodeSize;if(r>=e){if(r==e)return i(t+1,r);return i(t,n)}n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return n.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new n(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return n.empty;let t,r=0;for(let n=0;n<e.length;n++){let i=e[n];r+=i.nodeSize,n&&i.isText&&e[n-1].sameMarkup(i)?(t||(t=e.slice(0,n)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new n(t||e,r)}static from(e){if(!e)return n.empty;if(e instanceof n)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new n([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}}n.empty=new n([],0);let r={index:0,offset:0};function i(e,t){return r.index=e,r.offset=t,r}function o(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!o(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!o(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class s{addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&o(this.attrs,e.attrs)}
99toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return s.none;if(e instanceof s)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}constructor(e,t){this.type=e,this.attrs=t}}s.none=[];class l extends Error{}class a{get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i){let{index:o,offset:s}=t.findIndex(n),l=t.maybeChild(o);if(s==n||l.isText)return i&&!i.canReplace(o,o,r)?null:t.cut(0,n).append(r).append(t.cut(n));let a=e(l.content,n-s-1,r,l);return a&&t.replaceChild(o,l.copy(a))}(this.content,e+this.openStart,t);return n&&new a(n,this.openStart,this.openEnd)}removeBetween(e,t){return new a(function e(t,n,r){let{index:i,offset:o}=t.findIndex(n),s=t.maybeChild(i),{index:l,offset:a}=t.findIndex(r);if(o==n||s.isText){if(a!=r&&!t.child(l).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=l)throw RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-o-1,r-o-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return a.empty;let r=t.openStart||0,i=t.openEnd||0;if("number"!=typeof r||"number"!=typeof i)throw RangeError("Invalid input for Slice.fromJSON");return new a(n.fromJSON(e,t.content),r,i)}static maxOpen(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new a(e,n,r)}constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}}function c(e,t){if(!t.type.compatibleContent(e.type))throw new l("Cannot join "+t.type.name+" onto "+e.type.name)}function h(e,t,n){let r=e.node(n);return c(r,t.node(n)),r}function u(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function d(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(u(e.nodeAfter,r),o++));for(let e=o;e<s;e++)u(i.child(e),r);t&&t.depth==n&&t.textOffset&&u(t.nodeBefore,r)}function p(e,t){return e.type.checkContent(t),e.copy(t)}function f(e,t,r){let i=[];return d(null,e,r,i),e.depth>r&&u(p(h(e,t,r+1),f(e,t,r+1)),i),d(t,null,r,i),new n(i)}a.empty=new a(n.empty,0,0);class m{resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return s.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,t=arguments.length>1?arguments[1]:void 0;if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new b(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(i),s=i-o;if(n.push(t,e,r+o),!s||(t=t.child(e)).isText)break;
99i=s-1,r+=o+1}return new m(t,n,i)}static resolveCached(e,t){let n=y.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else y.set(e,n=new g);let r=n.elts[n.i]=m.resolve(e,t);return n.i=(n.i+1)%k,r}constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}}class g{constructor(){this.elts=[],this.i=0}}let k=12,y=new WeakMap;class b{get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}}let v=Object.create(null);class x{get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&o(this.attrs,t||e.defaultAttrs||v)&&s.sameSet(this.marks,n||s.none)}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e==this.content?this:new x(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new x(this.type,this.attrs,this.content,e)}cut(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size;return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e==t)return a.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),s=r.start(o);return new a(r.node(o).content.cut(r.pos-s,i.pos-s),r.depth-o,i.depth-o)}replace(e,t,r){var i=this.resolve(e),o=this.resolve(t);if(r.openStart>i.depth)throw new l("Inserted content deeper than insertion position");if(i.depth-r.openStart!=o.depth-r.openEnd)throw new l("Inconsistent open depths");return function e(t,r,i,o){let s=t.index(o),l=t.node(o);if(s==r.index(o)&&o<t.depth-i.openStart){let n=e(t,r,i,o+1);return l.copy(l.content.replaceChild(s,n))}if(!i.content.size)return p(l,f(t,r,o));if(i.openStart||i.openEnd||t.depth!=o||r.depth!=o){let{start:e,end:s}=function(e,t){let r=t.depth-e.openStart,i=t.node(r).copy(e.content);for(let e=r-1;e>=0;e--)i=t.node(e).copy(n.from(i));return{start:i.resolveNoCache(e.openStart+r),end:i.resolveNoCache(i.content.size-e.openEnd-r)}}(i,t);return p(l,function e(t,r,i,o,s){let l=t.depth>s&&h(t,r,s+1),a=o.depth>s&&h(i,o,s+1),m=[];return d(null,t,s,m),l&&a&&r.index(s)==i.index(s)?(c(l,a),u(p(l,e(t,r,i,o,s+1)),m)):(l&&u(p(l,f(t,r,s+1)),m),d(r,i,s,m),a&&u(p(a,f(i,o,s+1)),m)),d(o,null,s,m),new n(m)}(t,e,s,r,o))}{let e=t.parent,n=e.content;return p(e,n.cut(0,t.parentOffset).append(i.content).append(n.cut(r.parentOffset)))}}(i,o,r,0)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return m.resolveCached(this,e)}resolveNoCache(e){return m.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}
99toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),C(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.empty,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:r.childCount,s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let e=i;e<o;e++)if(!this.type.allowsMarks(r.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=s.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!s.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let r;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=n.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}constructor(e,t,r,i=s.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||n.empty}}x.prototype.text=void 0;class w extends x{toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):C(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new w(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new w(this.type,this.attrs,e,this.marks)}cut(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.text.length;return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}}function C(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class S{static parse(e,t){var n;let r,i=new A(e,t);if(null==i.next)return S.empty;let o=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=M(e),r=n;return e.eat(",")&&(r="}"!=e.next?M(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next)return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"))return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let s=(n=function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,o)),[]);if("seq"==t.type)for(let r=0;;r++){let s=e(t.exprs[r],o);if(r==t.exprs.length-1)return s;i(s,o=n())}else if("star"==t.type){let s=n();return r(o,s),i(e(t.expr,s),s),[r(s)]}else if("plus"==t.type){let s=n();return i(e(t.expr,o),s),i(e(t.expr,s),s),[r(s)]}else if("opt"==t.type)return[r(o)].concat(e(t.expr,o));else if("range"==t.type){let s=o;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,s),r),s=r}if(-1==t.max)i(e(t.expr,s),s);else for(let o=t.min;o<t.max;o++){let o=n();r(s,o),i(e(t.expr,s),o),s=o}return[r(s)]}else if("name"==t.type)return[r(o,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}
99function i(e,t){e.forEach(e=>e.to=t)}}(o),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(e=>{let t,{term:r,to:o}=e;if(r){for(let e=0;e<i.length;e++)i[e][0]==r&&(t=i[e][1]);_(n,o).forEach(e=>{t||i.push([r,t=[]]),-1==t.indexOf(e)&&t.push(e)})}})});let o=r[t.join(",")]=new S(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(E);o.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return o}(_(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,i),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.childCount,r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=[this];return function o(s,l){let a=s.matchFragment(e,r);if(a&&(!t||a.validEnd))return n.from(l.map(e=>e.createAndFill()));for(let e=0;e<s.next.length;e++){let{type:t,next:n}=s.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==i.indexOf(n)){i.push(n);let e=o(n,l.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:s}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),t[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}}S.empty=new S(!0);class A{get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}}function M(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function E(e,t){return t-e}function _(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:o}=i[e];r||-1!=n.indexOf(o)||t(o)}}(t),n.sort(E)}function T(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function D(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function O(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function N(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new L(e,r,t[r]);return n}class I{get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==S.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:D(this.attrs,e)}create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;if(this.isText)throw Error("NodeType.create can't construct text nodes");return new x(this,this.computeAttrs(e),n.from(t),s.setFrom(r))}createChecked(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return t=n.from(t),this.checkContent(t),new x(this,this.computeAttrs(e),t,s.setFrom(r))}createAndFill(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;if(e=this.computeAttrs(e),(t=n.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(n.empty,!0);return o?new x(this,e,t.append(o),s.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);
99if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){O(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:s.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new I(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=N(e,n.attrs),this.defaultAttrs=T(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}}class L{get isRequired(){return!this.hasDefault}constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(e,t,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}(e,t,n.validate):n.validate}}class F{create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!e&&this.instance?this.instance:new s(this,D(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new F(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){O(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=N(e,r.attrs),this.excluded=null;let i=T(this.attrs);this.instance=i?new s(this,i):null}}function R(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],s=o;if(o)n.push(o);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class z{parse(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new V(this,t,!1);return n.addAll(e,s.none,t.from,t.to),n.finish()}parseSlice(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new V(this,t,!0);return n.addAll(e,s.none,t.from,t.to),a.maxOpen(n.finish())}matchTag(e,t,n){for(let o=n?this.tags.indexOf(n)+1:0;o<this.tags.length;o++){var r,i;let n=this.tags[o];if(r=e,i=n.tag,(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,i)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(0==o.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(o.length>e.length)||61==o.charCodeAt(e.length)&&o.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=H(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=H(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new z(e,z.schemaRules(e)))}constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];
99t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}}let P={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},B={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},$={ol:!0,ul:!0};function j(e,t,n){return null!=t?!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&n}class q{findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(n.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=n.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(n.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!P.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}constructor(e,t,n,r,i,o){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=s.none,this.match=i||(4&o?null:e.contentMatch)}}class V{get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:o}=this.parser;if("full"===i||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(o.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(o.text(e[n]),t,!/\S/.test(e[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(o.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;$.hasOwnProperty(o)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&$.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));r:if(l?l.ignore:B.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let n,r=this.needsBlock;if(P.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break r}let s=l&&l.skip?t:this.readStyles(e,t);s&&this.addAll(e,s),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,l,n,!1===l.consuming?s:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,o;
99if(t.node)if((o=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(o.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(o,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(s)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=null==r?null:e.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,o=0;t>=0;t--){let s=this.nodes[t],l=s.findWrapping(e);if(l&&(!r||r.length>l.length+o)&&(r=l,i=s,!l.length))break;if(s.solid){if(n)break;o+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=s.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):W(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&(i=this.enterInner(e,t,n,!0,r)),i}enterInner(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=j(e,i,o.options);4&o.options&&0==o.content.length&&(l|=4);let a=s.none;return n=n.filter(t=>(o.type?!o.type.allowsMarkType(t.type):!W(t.type,e))||(a=t.addToSet(a),!1)),this.nodes.push(new q(e,t,a,r,null,l)),this.open++,n}closeExtra(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,o=(e,s)=>{for(;e>=0;e--){let l=t[e];if(""==l){if(e==t.length-1||0==e)continue;for(;s>=i;s--)if(o(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!e||e.name!=l&&!e.isInGroup(l))return!1;s--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;
99if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,o=j(null,t.preserveWhitespace,0)|4*!!n;i=r?new q(r.type,r.attrs,s.none,!0,t.topMatch||r.type.contentMatch,o):n?new q(null,null,s.none,!0,null,o):new q(e.schema.topNodeType,null,s.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}}function H(e){let t={};for(let n in e)t[n]=e[n];return t}function W(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=e=>{o.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>o.indexOf(i)&&s(i))return!0}};if(s(i.contentMatch))return!0}}function U(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function K(e){return e.document||window.document}let J=new WeakMap;function Z(e,t,n,r){let i,o,s;if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let l=t[0],a;if("string"!=typeof l)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(o=J.get(r))&&J.set(r,(s=null,!function e(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])s||(s=[]),s.push(t);else for(let n=0;n<t.length;n++)e(t[n]);else for(let n in t)e(t[n])}(r),o=s)),a=o)&&a.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let c=l.indexOf(" ");c>0&&(n=l.slice(0,c),l=l.slice(c+1));let h=n?e.createElementNS(n,l):e.createElement(l),u=t[1],d=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u)){for(let e in d=2,u)if(null!=u[e]){let t=e.indexOf(" ");t>0?h.setAttributeNS(e.slice(0,t),e.slice(t+1),u[e]):"style"==e&&h.style?h.style.cssText=u[e]:h.setAttribute(e,u[e])}}for(let o=d;o<t.length;o++){let s=t[o];if(0===s){if(o<t.length-1||o>d)throw RangeError("Content hole must be the only child of its parent node");return{dom:h,contentDOM:h}}{let{dom:t,contentDOM:o}=Z(e,s,n,r);if(h.appendChild(t),o){if(i)throw RangeError("Multiple content holes");i=o}}}return{dom:h,contentDOM:i}}e.s(["DOMParser",0,z,"DOMSerializer",0,class e{serializeFragment(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;n||(n=K(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,o=0;for(;n<i.length&&o<e.marks.length;){let t=e.marks[o];if(!this.marks[t.type.name]){o++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,o++}for(;n<i.length;)r=i.pop()[1];for(;o<e.marks.length;){let n=e.marks[o++],s=this.serializeMark(n,e.isInline,t);s&&(i.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=Z(K(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.marks[e.type.name];return r&&Z(K(n),r(e,t),null,e.attrs)}static renderSpec(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return Z(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=U(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return U(e.marks)}constructor(e,t){this.nodes=e,this.marks=t}},"Fragment",0,n,"Mark",0,s,"MarkType",0,F,"Node",0,x,"NodeRange",0,b,"ReplaceError",0,l,"Schema",0,class{node(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"==typeof e)e=this.nodeType(e);else if(e instanceof I){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new w(n,n.defaultAttrs,e,s.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let t in e)n[t]=e[t];n.nodes=t.from(e.nodes),n.marks=t.from(e.marks||{}),this.nodes=I.compile(this.spec.nodes,this),this.marks=F.compile(this.spec.marks,this);let r=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],n=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=r[n]||(r[n]=S.parse(n,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==i?null:i?R(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:R(this,n.split(" "))}this.nodeFromJSON=e=>x.fromJSON(this,e),this.markFromJSON=e=>s.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}},"Slice",0,a],308822);class G{get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}}class Q{recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}map(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;
99for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?r:0);if(l>e)break;let a=this.ranges[s+i],c=this.ranges[s+o],h=l+a;if(e<=h){let i=a?e==l?-1:e==h?1:t:t,o=l+r+(i<0?0:c);if(n)return o;let u=e==(t<0?l:h)?null:s/3+(e-l)*65536,d=e==l?2:e==h?1:4;return(t<0?e!=l:e!=h)&&(d|=8),new G(o,d,u)}r+=c-a}return n?e+r:new G(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,o=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?n:0);if(s>e)break;let l=this.ranges[t+i];if(e<=s+l&&t==3*r)return!0;n+=this.ranges[t+o]-l}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),l=o+(this.inverted?0:i),a=this.ranges[r+t],c=this.ranges[r+n];e(s,s+a,l,l+c),i+=c-a}}invert(){return new Q(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?Q.empty:new Q(e<0?[0,-e,0]:[0,0,e])}constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Q.empty)return Q.empty}}Q.empty=new Q([]);class X{get maps(){return this._maps}slice(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new X(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new X;return e.appendMappingInverted(this),e}map(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new G(e,r,null)}constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}}let Y=Object.create(null);class ee{getMap(){return Q.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=Y[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Y)throw RangeError("Duplicate use of step JSON ID "+e);return Y[e]=t,t.prototype.jsonID=e,t}}class et{static ok(e){return new et(e,null)}static fail(e){return new et(null,e)}static fromReplace(e,t,n,r){try{return et.ok(e.replace(t,n,r))}catch(e){if(e instanceof l)return et.fail(e.message);throw e}}constructor(e,t){this.doc=e,this.failed=t}}function en(e,t,r){let i=[];for(let n=0;n<e.childCount;n++){let o=e.child(n);o.content.size&&(o=o.copy(en(o.content,t,o))),o.isInline&&(o=t(o,r,n)),i.push(o)}return n.fromArray(i)}class er extends ee{apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new a(en(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,r),t.openStart,t.openEnd);return et.fromReplace(e,this.from,this.to,i)}invert(){return new ei(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new er(t.pos,n.pos,this.mark)}merge(e){return e instanceof er&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new er(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new er(t.from,t.to,e.markFromJSON(t.mark))}constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}}ee.jsonID("addMark",er);class ei extends ee{apply(e){let t=e.slice(this.from,this.to),n=new a(en(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return et.fromReplace(e,this.from,this.to,n)}invert(){return new er(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new ei(t.pos,n.pos,this.mark)}merge(e){return e instanceof ei&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ei(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ei(t.from,t.to,e.markFromJSON(t.mark))}constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}}ee.jsonID("removeMark",ei);class eo extends ee{apply(e){let t=e.nodeAt(this.pos);if(!t)return et.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return et.fromReplace(e,this.pos,this.pos+1,new a(n.from(r),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new eo(this.pos,t.marks[n]);return new eo(this.pos,this.mark)}}return new es(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new eo(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new eo(t.pos,e.markFromJSON(t.mark))}constructor(e,t){super(),this.pos=e,this.mark=t}}ee.jsonID("addNodeMark",eo);class es extends ee{apply(e){let t=e.nodeAt(this.pos);if(!t)return et.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return et.fromReplace(e,this.pos,this.pos+1,new a(n.from(r),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new eo(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new es(t.pos,this.mark)}
99toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new es(t.pos,e.markFromJSON(t.mark))}constructor(e,t){super(),this.pos=e,this.mark=t}}ee.jsonID("removeNodeMark",es);class el extends ee{apply(e){return this.structure&&ec(e,this.from,this.to)?et.fail("Structure replace would overwrite content"):et.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Q([this.from,this.to-this.from,this.slice.size])}invert(e){return new el(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&el.MAP_BIAS<0?t:e.mapResult(this.from,1);return n.deletedAcross&&t.deletedAcross?null:new el(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof el)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?a.empty:new a(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new el(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?a.empty:new a(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new el(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new el(t.from,t.to,a.fromJSON(e,t.slice),!!t.structure)}constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}}el.MAP_BIAS=1,ee.jsonID("replace",el);class ea extends ee{apply(e){if(this.structure&&(ec(e,this.from,this.gapFrom)||ec(e,this.gapTo,this.to)))return et.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return et.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?et.fromReplace(e,this.from,this.to,n):et.fail("Content does not fit in gap")}getMap(){return new Q([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new ea(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new ea(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ea(t.from,t.to,t.gapFrom,t.gapTo,a.fromJSON(e,t.slice),t.insert,!!t.structure)}constructor(e,t,n,r,i,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}}function ec(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let e=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function eh(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r.contentMatch,o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],s=e.doc.nodeAt(t),l=[],c=t+1;for(let t=0;t<s.childCount;t++){let h=s.child(t),u=c+h.nodeSize,d=i.matchType(h.type);if(d){i=d;for(let t=0;t<h.marks.length;t++)r.allowsMarkType(h.marks[t].type)||e.step(new ei(c,u,h.marks[t]));if(o&&h.isText&&"pre"!=r.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(h.text);)i||(i=new a(n.from(r.schema.text(" ",r.allowedMarks(h.marks))),0,0)),l.push(new el(c+e.index,c+e.index+e[0].length,i))}}else l.push(new el(c,u,a.empty));c=u}if(!i.validEnd){let t=i.fillBefore(n.empty,!0);
99e.replace(c,c,new a(t,0,0))}for(let t=l.length-1;t>=0;t--)e.step(l[t])}function eu(e){return{type:e,attrs:null}}function ed(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(i.text);){let i=e.mapping.slice(r).map(n+1+o+s.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function ep(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+o);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function ef(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),s=o.type==r?e.type.schema.nodes.text:o.type;if(!(n=n.matchType(s))||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}(e,t))}function em(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a.empty;if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return eg(i,o,r)?new el(t,n,r):new ek(i,o,r).fit()}function eg(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}ee.jsonID("replaceAround",ea);class ek{get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,o=n.depth,s=r.depth;for(;o&&s&&1==i.childCount;)i=i.firstChild.content,o--,s--;let l=new a(i,o,s);return e>-1?new ea(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new el(n.pos,r.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let r=1==t?e:this.unplaced.openStart;r>=0;r--){let e=null,i=(r?(e=ev(this.unplaced.content,r-1).firstChild).content:this.unplaced.content).firstChild;for(let o=this.depth;o>=0;o--){let{type:s,match:l}=this.frontier[o],a,c=null;if(1==t&&(i?l.matchType(i.type)||(c=l.fillBefore(n.from(i),!1)):e&&s.compatibleContent(e.type)))return{sliceDepth:r,frontierDepth:o,parent:e,inject:c};if(2==t&&i&&(a=l.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:o,parent:e,wrap:a};if(e&&l.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=ev(e,t);return!!r.childCount&&!r.firstChild.isLeaf&&(this.unplaced=new a(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=ev(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new a(ey(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new a(ey(e,t,1),t,n)}placeNodes(e){let{sliceDepth:t,frontierDepth:r,parent:i,inject:o,wrap:s}=e;for(;this.depth>r;)this.closeFrontierNode();if(s)for(let e=0;e<s.length;e++)this.openFrontierNode(s[e]);let l=this.unplaced,c=i?i.content:l.content,h=l.openStart-t,u=0,d=[],{match:p,type:f}=this.frontier[r];if(o){for(let e=0;e<o.childCount;e++)d.push(o.child(e));p=p.matchFragment(o)}let m=c.size+t-(l.content.size-l.openEnd);for(;u<c.childCount;){let e=c.child(u),t=p.matchType(e.type);if(!t)break;(++u>1||0==h||e.content.size)&&(p=t,d.push(function e(t,r,i){if(r<=0)return t;let o=t.content;return r>1&&(o=o.replaceChild(0,e(o.firstChild,r-1,1==o.childCount?i-1:0))),r>0&&(o=t.type.contentMatch.fillBefore(o).append(o),i<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(n.empty,!0)))),t.copy(o)}(e.mark(f.allowedMarks(e.marks)),1==u?h:0,u==c.childCount?m:-1)))}let g=u==c.childCount;g||(m=-1),this.placed=eb(this.placed,r,n.from(d)),this.frontier[r].match=p,g&&m<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=c;e<m;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=g?0==t?a.empty:new a(ey(l.content,t-1,1),t-1,m<0?l.openEnd:t-1):new a(ey(l.content,t,u),l.openStart,l.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!ex(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){i:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=ex(e,t,r,n,i);if(o){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=ex(e,n,r,t,!0);if(!i||i.childCount)continue i}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=eb(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0,i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=eb(this.placed,this.depth,n.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(n.empty,!0);e.childCount&&(this.placed=eb(this.placed,this.frontier.length,e))}constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=n.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=n.from(e.node(t).copy(this.placed))}}
99function ey(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ey(e.firstChild.content,t-1,n)))}function eb(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(eb(e.lastChild.content,t-1,n)))}function ev(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function ex(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 l=r.fillBefore(o.content,!0,s);return l&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,o.content,s)?l:null}function ew(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class eC extends ee{apply(e){let t=e.nodeAt(this.pos);if(!t)return et.fail("No node at attribute step's position");let r=Object.create(null);for(let e in t.attrs)r[e]=t.attrs[e];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return et.fromReplace(e,this.pos,this.pos+1,new a(n.from(i),0,+!t.isLeaf))}getMap(){return Q.empty}invert(e){return new eC(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new eC(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new eC(t.pos,t.attr,t.value)}constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}}ee.jsonID("attr",eC);class eS extends ee{apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return et.ok(n)}getMap(){return Q.empty}invert(e){return new eS(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new eS(t.attr,t.value)}constructor(e,t){super(),this.attr=e,this.value=t}}ee.jsonID("docAttr",eS);let eA=class extends Error{};(eA=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),eA.prototype.constructor=eA,eA.prototype.name="TransformError";class eM{get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new eA(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,o)=>{e=Math.min(e,i),t=Math.max(t,o)})}return 1e9==e?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.empty,r=em(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,r){return this.replace(e,t,new a(n.from(r),0,0))}delete(e,t){return this.replace(e,t,a.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return!function(e,t,r,i){if(!i.size)return e.deleteRange(t,r);let o=e.doc.resolve(t),s=e.doc.resolve(r);if(eg(o,s,i))return e.step(new el(t,r,i));let l=ew(o,s);0==l[l.length-1]&&l.pop();let c=-(o.depth+1);l.unshift(c);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let n=o.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;l.indexOf(e)>-1?c=e:o.before(e)==t&&l.splice(1,0,-e)}let h=l.indexOf(c),u=[],d=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(u.push(n),t==i.openStart)break;e=n.content}for(let e=d-1;e>=0;e--){var p;let t=u[e],n=(p=t.type).spec.defining||p.spec.definingForContent;if(n&&!t.sameMarkup(o.node(Math.abs(c)-1)))d=e;else if(n||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let c=(t+d+1)%(i.openStart+1),p=u[c];if(p)for(let t=0;t<l.length;t++){let u=l[(t+h)%l.length],d=!0;u<0&&(d=!1,u=-u);let f=o.node(u-1),m=o.index(u-1);if(f.canReplaceWith(m,m,p.type,p.marks))return e.replace(o.before(u),d?s.after(u):r,new a(function e(t,r,i,o,s){if
99(r<i){let n=t.firstChild;t=t.replaceChild(0,n.copy(e(n.content,r+1,i,o,n)))}if(r>o){let e=s.contentMatchAt(0),r=e.fillBefore(t).append(t);t=r.append(e.matchFragment(r).fillBefore(n.empty,!0))}return t}(i.content,0,i.openStart,c),c,i.openEnd))}}let f=e.steps.length;for(let n=l.length-1;n>=0&&(e.replace(t,r,i),!(e.steps.length>f));n--){let e=l[n];e<0||(t=o.before(e),r=s.after(e))}}(this,e,t,r),this}replaceRangeWith(e,t,r){var i=e,o=t;if(!r.isInline&&i==o&&this.doc.resolve(i).parent.content.size){let e=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(this.doc,i,r.type);null!=e&&(i=o=e)}return this.replaceRange(i,o,new a(n.from(r),0,0)),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&0==r.parentOffset&&0==i.parentOffset){let o=r.sharedDepth(n),s=!1;for(let e=r.depth;e>o;e--)r.node(e).type.spec.isolating&&(s=!0);for(let e=i.depth;e>o;e--)i.node(e).type.spec.isolating&&(s=!0);if(!s){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let o=ew(r,i);for(let t=0;t<o.length;t++){let n=o[t],s=t==o.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(t-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return e.delete(r.before(o),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,r){let{$from:i,$to:o,depth:s}=t,l=i.before(s+1),c=o.after(s+1),h=l,u=c,d=n.empty,p=0;for(let e=s,t=!1;e>r;e--)t||i.index(e)>0?(t=!0,d=n.from(i.node(e).copy(d)),p++):h--;let f=n.empty,m=0;for(let e=s,t=!1;e>r;e--)t||o.after(e+1)<o.end(e)?(t=!0,f=n.from(o.node(e).copy(f)),m++):u++;e.step(new ea(h,u,l,c,new a(d.append(f),p,m),d.size-p,!0))}(this,e,t),this}join(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return!function(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,o=e.doc.resolve(t-n),s=o.node().type;if(i&&s.inlineContent){let e="pre"==s.whitespace,t=!!s.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let l=e.steps.length;if(!1===r){let r=e.doc.resolve(t+n);ep(e,r.node(),r.before(),l)}s.inlineContent&&eh(e,t+n-1,s,o.node().contentMatchAt(o.index()),null==r);let c=e.mapping.slice(l),h=c.map(t-n);if(e.step(new el(h,c.map(t+n,-1),a.empty,!0)),!0===r){let t=e.doc.resolve(h);ed(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,r){let i=n.empty;for(let e=r.length-1;e>=0;e--){if(i.size){let t=r[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=n.from(r[e].type.create(r[e].attrs,i))}let o=t.start,s=t.end;e.step(new ea(o,s,o,s,new a(i,0,0),r.length,!0))}(this,e,t),this}setBlockType(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;var o=this;if(!r.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let s=o.steps.length;return o.doc.nodesBetween(e,t,(e,t)=>{var l,c,h;let u,d,p="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(r,p)&&(l=o.doc,c=o.mapping.slice(s).map(t),h=r,d=(u=l.resolve(c)).index(),u.parent.canReplaceWith(d,d+1,h))){let i=null;if(r.schema.linebreakReplacement){let e="pre"==r.whitespace,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&ep(o,e,t,s),eh(o,o.mapping.slice(s).map(t,1),r,void 0,null===i);let l=o.mapping.slice(s),c=l.map(t,1),h=l.map(t+e.nodeSize,1);return o.step(new ea(c,h,c+1,h-1,new a(n.from(r.create(p,null,e.marks)),0,0),1,!0)),!0===i&&ed(o,e,t,s),!1}}),this}setNodeMarkup(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;return!function(e,t,r,i,o){let s=e.doc.nodeAt(t);if(!s)throw RangeError("No node at given position");r||(r=s.type);let l=r.create(i,null,o||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,l);if(!r.validContent(s.content))throw RangeError("Invalid content for node type "+r.name);e.step(new ea(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new a(n.from(l),0,0),1,!0))}(this,e,t,r,i),this}setNodeAttribute(e,t,n){return this.step(new eC(e,t,n)),this}setDocAttribute(e,t){return this.step(new eS(e,t)),this}addNodeMark(e,t){return this.step(new eo(e,t)),this}
99removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof s)t.isInSet(n.marks)&&this.step(new es(e,t));else{let r=n.marks,i,o=[];for(;i=t.isInSet(r);)o.push(new es(e,i)),r=i.removeFromSet(r);for(let e=o.length-1;e>=0;e--)this.step(o[e])}return this}split(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;return!function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,o=e.doc.resolve(t),s=n.empty,l=n.empty;for(let e=o.depth,t=o.depth-r,a=r-1;e>t;e--,a--){s=n.from(o.node(e).copy(s));let t=i&&i[a];l=n.from(t?t.type.create(t.attrs,l):o.node(e).copy(l))}e.step(new el(t,t,new a(s.append(l),r,r),!0))}(this,e,t,r),this}addMark(e,t,n){var r;let i,o,s,l;return r=this,s=[],l=[],r.doc.nodesBetween(e,t,(r,a,c)=>{if(!r.isInline)return;let h=r.marks;if(!n.isInSet(h)&&c.type.allowsMarkType(n.type)){let c=Math.max(a,e),u=Math.min(a+r.nodeSize,t),d=n.addToSet(h);for(let e=0;e<h.length;e++)h[e].isInSet(d)||(i&&i.to==c&&i.mark.eq(h[e])?i.to=u:s.push(i=new ei(c,u,h[e])));o&&o.to==c?o.to=u:l.push(o=new er(c,u,n))}}),s.forEach(e=>r.step(e)),l.forEach(e=>r.step(e)),this}removeMark(e,t,n){var r;let i,o;return r=this,i=[],o=0,r.doc.nodesBetween(e,t,(r,s)=>{if(!r.isInline)return;o++;let l=null;if(n instanceof F){let e=r.marks,t;for(;t=n.isInSet(e);)(l||(l=[])).push(t),e=t.removeFromSet(e)}else n?n.isInSet(r.marks)&&(l=[n]):l=r.marks;if(l&&l.length){let n=Math.min(s+r.nodeSize,t);for(let t=0;t<l.length;t++){let r=l[t],a;for(let e=0;e<i.length;e++){let t=i[e];t.step==o-1&&r.eq(i[e].style)&&(a=t)}a?(a.to=n,a.step=o):i.push({style:r,from:Math.max(s,e),to:n,step:o})}}}
99),i.forEach(e=>r.step(new ei(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return eh(this,e,t,n),this}constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new X}}e.s(["Mapping",0,X,"RemoveMarkStep",0,ei,"ReplaceAroundStep",0,ea,"ReplaceStep",0,el,"Transform",0,eM,"canJoin",0,function(e,t){let n=e.resolve(t),r=n.index();return ef(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)},"canSplit",0,function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>o;e--,t--){let n=i.node(e),o=i.index(e);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),l=r&&r[t+1];l&&(s=s.replaceChild(0,l.type.create(l.attrs)));let a=r&&r[t]||n;if(!n.canReplace(o+1,n.childCount)||!a.type.validContent(s))return!1}let l=i.indexAfter(o),a=r&&r[0];return i.node(o).canReplaceWith(l,l,a?a.type:i.node(o+1).type)},"dropPoint",0,function(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,o=r.index(t)+ +(n>0),s=r.node(t),l=!1;if(1==e)l=s.canReplace(o,o,i);else{let e=s.contentMatchAt(o).findWrapping(i.firstChild.type);l=e&&s.canReplaceWith(o,o,e[0])}if(l)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null},"findWrapping",0,function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return n.canReplaceWith(r,i,s)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;l&&e<i;e++)l=l.matchType(n.child(e).type);return l&&l.validEnd?s:null}(r,t);return o?i.map(eu).concat({type:t,attrs:n}).concat(o.map(eu)):null},"joinPoint",0,function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=e.resolve(t);for(let e=r.depth;;e--){let i,o,s=r.index(e);if(e==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(e+1),s++,o=r.node(e).maybeChild(s)):(i=r.node(e).maybeChild(s-1),o=r.node(e+1)),i&&!i.isTextblock&&ef(i,o)&&r.node(e).canReplace(s,s+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}},"liftTarget",0,function(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let o=e.$from.node(n),s=e.$from.index(n)+r,l=e.$to.indexAfter(n)-i;if(n<e.depth&&o.canReplace(s,l,t))return n;if(0==n||o.type.spec.isolating||!((0==s||o.canReplace(s,o.childCount))&&(l==o.childCount||o.canReplace(0,l))))break;s&&(r=1),l<o.childCount&&(i=1)}return null},"replaceStep",0,em],524617);let eE=Object.create(null);class e_{get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.empty,n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:l,$to:c}=o[s],h=e.mapping.slice(i);e.replaceRange(h.map(l.pos),h.map(c.pos),s?a.empty:t),0==s&&eB(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],l=e.mapping.slice(n),a=l.map(o.pos),c=l.map(s.pos);i?e.deleteRange(a,c):(e.replaceRangeWith(a,c,t),eB(e,n,t.isInline?-1:1))}}static findFrom(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.parent.inlineContent?new eN(e):eP(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?eP(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):eP(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.findFrom(e,t)||this.findFrom(e,-t)||new eR(e.node(0))}static atStart(e){return eP(e,e,0,0,1)||new eR(e)}static atEnd(e){return eP(e,e,e.content.size,e.childCount,-1)||new eR(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=eE[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in eE)throw RangeError("Duplicate use of selection JSON ID "+e);return eE[e]=t,t.prototype.jsonID=e,t}getBookmark(){return eN.between(this.$anchor,this.$head).getBookmark()}constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new eT(e.min(t),e.max(t))]}}e_.prototype.visible=!0;class eT{constructor(e,t){this.$from=e,this.$to=t}}let eD=!1;function eO(e){eD||e.parent.inlineContent||(eD=!0,console.warn("TextSelection endpoint not pointing into a
99node with inline content ("+e.parent.type.name+")"))}class eN extends e_{get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return e_.near(n);let r=e.resolve(t.map(this.anchor));return new eN(r.parent.inlineContent?r:n,n)}replace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.empty;if(super.replace(e,t),t==a.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof eN&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new eI(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new eN(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=e_.findFrom(t,n,!0)||e_.findFrom(t,-n,!0);if(!e)return e_.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(e_.findFrom(e,-n,!0)||e_.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new eN(e,t)}constructor(e,t=e){eO(e),eO(t),super(e,t)}}e_.jsonID("text",eN);class eI{map(e){return new eI(e.map(this.anchor),e.map(this.head))}resolve(e){return eN.between(e.resolve(this.anchor),e.resolve(this.head))}constructor(e,t){this.anchor=e,this.head=t}}class eL extends e_{map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?e_.near(i):new eL(i)}content(){return new a(n.from(this.node),0,0)}eq(e){return e instanceof eL&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new eF(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new eL(e.resolve(t.anchor))}static create(e,t){return new eL(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}}eL.prototype.visible=!1,e_.jsonID("node",eL);class eF{map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new eI(n,n):new eF(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&eL.isSelectable(n)?new eL(t):e_.near(t)}constructor(e){this.anchor=e}}class eR extends e_{replace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.empty;if(t==a.empty){e.delete(0,e.doc.content.size);let t=e_.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new eR(e)}map(e){return new eR(e)}eq(e){return e instanceof eR}getBookmark(){return ez}constructor(e){super(e.resolve(0),e.resolve(e.content.size))}}e_.jsonID("all",eR);let ez={map(){return this},resolve:e=>new eR(e)};function eP(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t.inlineContent)return eN.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let r=t.child(s);if(r.isAtom){if(!o&&eL.isSelectable(r))return eL.create(e,n-(i<0?r.nodeSize:0))}else{let t=eP(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function eB(e,t,n){let r,i=e.steps.length-1;if(i<t)return;let o=e.steps[i];(o instanceof el||o instanceof ea)&&(e.mapping.maps[i].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(e_.near(e.doc.resolve(r),n)))}class e$ extends eM{get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return s.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||s.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(e_.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}}function ej(e,t){return t&&e?e.bind(t):e}class eq{constructor(e,t,n){this.name=e,this.init=ej(t.init,n),this.apply=ej(t.apply,n)}}let eV=[new eq("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new eq("selection",{init:(e,t)=>
99e.selection||e_.atStart(t.doc),apply:e=>e.selection}),new eq("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new eq("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class eH{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=eV.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new eq(e.key,e.spec.state,e))})}}let eW=Object.create(null);function eU(e){return e in eW?e+"$"+ ++eW[e]:(eW[e]=0,e+"$")}e.s(["AllSelection",0,eR,"EditorState",0,class e{get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let l=r?r[o].n:0,a=r?r[o].state:this,c=l<t.length&&s.spec.appendTransaction.call(s,l?t.slice(l):t,a,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<o?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),i=!0}r&&(r[o]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let n=new e(this.config),r=this.config.fields;for(let e=0;e<r.length;e++){let i=r[e];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new e$(this)}static create(t){let n=new eH(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let e=0;e<n.fields.length;e++)r[n.fields[e].name]=n.fields[e].init(t,r);return r}reconfigure(t){let n=new eH(this.schema,t.plugins),r=n.fields,i=new e(n);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(t,n,r){if(!n)throw RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw RangeError("Required config field 'schema' missing");let i=new eH(t.schema,t.plugins),o=new e(i);return i.fields.forEach(e=>{if("doc"==e.name)o.doc=x.fromJSON(t.schema,n.doc);else if("selection"==e.name)o.selection=e_.fromJSON(o.doc,n.selection);else if("storedMarks"==e.name)n.storedMarks&&(o.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let i in r){let s=r[i],l=s.spec.state;if(s.key==e.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(n,i)){o[e.name]=l.fromJSON.call(s,t,n[i],o);return}}o[e.name]=e.init(t,o)}}),o}constructor(e){this.config=e}},"NodeSelection",0,eL,"Plugin",0,class{getState(e){return e[this.key]}constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let o=t[i];o instanceof Function?o=o.bind(n):"handleDOMEvents"==i&&(o=e(o,n,{})),r[i]=o}return r}(e.props,this,this.props),this.key=e.key?e.key.key:eU("plugin")}},"PluginKey",0,class{get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}constructor(e="key"){this.key=eU(e)}},"Selection",0,e_,"SelectionRange",0,eT,"TextSelection",0,eN],175863)},615505,e=>{"use strict";var t=e.i(175863),n=e.i(308822),r=e.i(524617);let i=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},o=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},s=null,l=function(e,t,n){let r=s||(s=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},a=function(){s=null},c=function(e,t,n,r){return n&&(u(e,t,n,r,-1)||u(e,t,n,r,1))},h=/^(img|br|input|textarea|hr)$/i;function u(e,t,n,r,o){for(var s;;){if(e==n&&t==r)return!0;
99if(t==(o<0?0:d(e))){let n=e.parentNode;if(!n||1!=n.nodeType||p(e)||h.test(e.nodeName)||"false"==e.contentEditable)return!1;t=i(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;let n=e.childNodes[t+(o<0?-1:0)];if(1==n.nodeType&&"false"==n.contentEditable)if(null==(s=n.pmViewDesc)||!s.ignoreForSelection)return!1;else t+=o;else e=n,t=o<0?d(e):0}}}function d(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function p(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)}let f=function(e){return e.focusNode&&c(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function m(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}let g="u">typeof navigator?navigator:null,k="u">typeof document?document:null,y=g&&g.userAgent||"",b=/Edge\/(\d+)/.exec(y),v=/MSIE \d/.exec(y),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(y),w=!!(v||x||b),C=v?document.documentMode:x?+x[1]:b?+b[1]:0,S=!w&&/gecko\/(\d+)/i.test(y);S&&(/Firefox\/(\d+)/.exec(y)||[0,0])[1];let A=!w&&/Chrome\/(\d+)/.exec(y),M=!!A,E=A?+A[1]:0,_=!w&&!!g&&/Apple Computer/.test(g.vendor),T=_&&(/Mobile\/\w+/.test(y)||!!g&&g.maxTouchPoints>2),D=T||!!g&&/Mac/.test(g.platform),O=!!g&&/Win/.test(g.platform),N=/Android \d/.test(y),I=!!k&&"webkitFontSmoothing"in k.documentElement.style,L=I?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function F(e,t){return"number"==typeof e?e:e[t]}function R(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let l=n||e.dom;l;){if(1!=l.nodeType){l=o(l);continue}let e=l,n=e==s.body,a=n?function(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}(s):function(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}(e),c=0,h=0;if(t.top<a.top+F(r,"top")?h=-(a.top-t.top+F(i,"top")):t.bottom>a.bottom-F(r,"bottom")&&(h=t.bottom-t.top>a.bottom-a.top?t.top+F(i,"top")-a.top:t.bottom-a.bottom+F(i,"bottom")),t.left<a.left+F(r,"left")?c=-(a.left-t.left+F(i,"left")):t.right>a.right-F(r,"right")&&(c=t.right-a.right+F(i,"right")),c||h)if(n)s.defaultView.scrollBy(c,h);else{let n=e.scrollLeft,r=e.scrollTop;h&&(e.scrollTop+=h),c&&(e.scrollLeft+=c);let i=e.scrollLeft-n,o=e.scrollTop-r;t={left:t.left-i,top:t.top-o,right:t.right-i,bottom:t.bottom-o}}let u=n?"fixed":getComputedStyle(l).position;if(/^(fixed|sticky)$/.test(u))break;l="absolute"==u?l.offsetParent:o(l)}}function z(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=o(r));return t}function P(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let B=null;function $(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function j(e){return e.top<e.bottom||e.left<e.right}function q(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(j(e))return e}return Array.prototype.find.call(n,j)||e.getBoundingClientRect()}let V=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function H(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=I||S;if(3==r.nodeType)if(s&&(V.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=q(l(r,i,i),n);if(S&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=q(l(r,i-1,i-1),-1);if(t.top==e.top){let n=q(l(r,i,i+1),-1);if(n.top!=e.top)return W(n,n.left<t.left)}}return e}else{let e=i,t=i,o=n<0?1:-1;return n<0&&!i?(t++,o=-1):n>=0&&i==r.nodeValue.length?(e--,o=1):n<0?e--:t++,W(q(l(r,e,t),o),o<0)}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==d(r))){let e=r.childNodes[i-1];if(1==e.nodeType)return U(e.getBoundingClientRect(),!1)}if(null==o&&i<d(r)){let e=r.childNodes[i];if(1==e.nodeType)return U(e.getBoundingClientRect(),!0)}return U(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==d(r))){let e=r.childNodes[i-1],t=3==e.nodeType?l(e,d(e)-!s):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return W(q(t,1),!1)}if(null==o&&i<d(r)){let e=r.childNodes[i];for(;
99e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?l(e,0,+!s):1==e.nodeType?e:null:null;if(t)return W(q(t,-1),!0)}return W(q(3==r.nodeType?l(r):r,-n),n>=0)}function W(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function U(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function K(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}let J=/[\u0590-\u08ac]/,Z=null,G=null,Q=!1;class X{matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){let r;if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode))if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}else{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}if(e==this.dom&&this.contentDOM)r=t>i(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),o;if(i&&(!t||i.node))if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return i;else n=!1}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return -1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],o=t+i.size;if(o>e||i instanceof eo){r=e-t;break}t=o}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof Y&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;(e=n?this.children[n-1]:null)&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?i(e.dom)+1:0}}{let e,r=!0;for(;(e=n<this.children.length?this.children[n]:null)&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?i(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let s=n,l=0;;l++){let n=this.children[l],a=s+n.size;if(-1==r&&e<=a){let o=s+n.border;if(e>=o&&t<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=s;for(let t=l;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=i(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(a>t||l==this.children.length-1)){t=a;for(let e=l+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=i(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}s=a}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Math.min(e,t),s=Math.max(e,t);for(let i=0,l=0;i<this.children.length;i++){let a=this.children[i],c=l+a.size;if(o>l&&s<c)return a.setSelection(e-l-a.border,t-l-a.border,n,r);l=c}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),h=n.root.getSelection(),u=n.domSelectionRange(),d=!1;if((S||_)&&e==t){let{node:e,offset:t}=l;if(3==e.nodeType){if((d=!!(t&&"\n"==e.nodeValue[t-1]))&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){"BR"==n.nodeName&&(l=a={node:n.parentNode,offset:i(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];d=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(S&&u.focusNode&&u.focusNode!=a.node&&1==u.focusNode.nodeType){let e=u.focusNode.childNodes[u.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||d&&_)&&c(l.node,l.offset,u.anchorNode,u.anchorOffset)&&c(a.node,a.offset,u.focusNode,u.focusOffset))return;let p=!1;if((h.extend||e==t)&&!(d&&S)){h.collapse(l.node,l.offset);try{e!=t&&h.extend(a.node,a.offset),p=!0}catch(e){}}if(!p){if(e>t){let e=l;l=a,a=e}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let r=n+i.border,s=o-i.border;if(e>=r&&t<=s){this.dirty=e==n||t==o?2:1,e==r&&t==s&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=3:i.markDirty(e-r,t-r);return}i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}}class Y extends X{matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}constructor(e,t,n,r){let i,o=t.type.toDOM;if("function"==typeof o&&(o=o(n,()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r)),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}}class ee extends X{get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}}
99class et extends X{static create(e,t,r,i){let o=i.nodeViews[t.type.name],s=o&&o(t,i,r);return s&&s.dom||(s=n.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new et(e,t,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=et.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;t<o&&(i=eg(i,t,o,n)),e>0&&(i=eg(i,0,e,n));for(let e=0;e<i.length;e++)i[e].parent=r;return r.children=i,r}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}}class en extends X{static create(e,t,r,i,o,s){let l=o.nodeViews[t.type.name],a,c=l&&l(t,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s,r,i),h=c&&c.dom,u=c&&c.contentDOM;if(t.isText)if(h){if(3!=h.nodeType)throw RangeError("Text must be rendered as a DOM text node")}else h=document.createTextNode(t.text);else if(!h){let e=n.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs);({dom:h,contentDOM:u}=e)}u||t.isText||"BR"==h.nodeName||(h.hasAttribute("contenteditable")||(h.contentEditable="false"),t.type.spec.draggable&&(h.draggable=!0));let d=h;
99return(h=eu(h,r,t),c)?a=new es(e,t,r,i,h,u||null,d,c,o,s+1):t.isText?new ei(e,t,r,i,h,d,o):new en(e,t,r,i,h,u||null,d,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>n.Fragment.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&ed(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let r=this.node.inlineContent,i=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,l=o&&o.pos<0,a=new ef(this,s&&s.node,e);(function(e,t,n,r){let i=t.locals(e),o=0;if(0==i.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,i,t.forChild(o,s),n),o+=s.nodeSize}return}let s=0,l=[],a=null;for(let c=0;;){let h,u,d,p;for(;s<i.length&&i[s].to==o;){let e=i[s++];e.widget&&(h?(u||(u=[h])).push(e):h=e)}if(h)if(u){u.sort(em);for(let e=0;e<u.length;e++)n(u[e],c,!!a)}else n(h,c,!!a);if(a)p=-1,d=a,a=null;else if(c<e.childCount)p=c,d=e.child(c++);else break;for(let e=0;e<l.length;e++)l[e].to<=o&&l.splice(e--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)l.push(i[s++]);let f=o+d.nodeSize;if(d.isText){let e=f;s<i.length&&i[s].from<e&&(e=i[s].from);for(let t=0;t<l.length;t++)l[t].to<e&&(e=l[t].to);e<f&&(a=d.cut(e-o),d=d.cut(0,e-o),f=e,p=-1)}else for(;s<i.length&&i[s].to<f;)s++;let m=d.isInline&&!d.isLeaf?l.filter(e=>!e.inline):l.slice();r(d,m,t.forChild(o,d),p),o=f}})(this.node,this.innerDeco,(t,o,s)=>{t.spec.marks?a.syncToMarks(t.spec.marks,r,e,o):t.type.side>=0&&!s&&a.syncToMarks(o==this.node.childCount?n.Mark.none:this.node.child(o).marks,r,e,o),a.placeWidget(t,e,i)},(t,n,s,c)=>{let h;a.syncToMarks(t.marks,r,e,c),a.findNodeMatch(t,n,s,c)||l&&e.state.selection.from>i&&e.state.selection.to<i+t.nodeSize&&(h=a.findIndexWithChild(o.node))>-1&&a.updateNodeAt(t,n,s,h,e)||a.updateNextNode(t,n,s,e,c,i)||a.addNode(t,n,s,e,i),i+=t.nodeSize}),a.syncToMarks([],r,e,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),function e(t,n,r){let i=t.firstChild,o=!1;for(let s=0;s<n.length;s++){let l=n[s],a=l.dom;if(a.parentNode==t){for(;a!=i;)i=ep(i),o=!0;i=i.nextSibling}else o=!0,t.insertBefore(a,i);if(l instanceof et){let n=i?i.previousSibling:t.lastChild;e(l.contentDOM,l.children,r),i=n?n.nextSibling:t.firstChild}}for(;i;)i=ep(i),o=!0;o&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),T&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof t.TextSelection)||r<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(!this.node.inlineContent)return{node:o,pos:-1,text:""};{let e=o.nodeValue,t=function(e,t,n,r){for(let i=0,o=0;i<e.childCount&&o<=r;){let s=e.child(i++),l=o;if(o+=s.nodeSize,!s.isText)continue;let a=s.text;for(;i<e.childCount;){let t=e.child(i++);if(o+=t.nodeSize,!t.isText)break;a+=t.text}if(o>=n){if(o>=r&&a.slice(r-t.length-l,r-l)==t)return r-t.length;let e=l<r?a.lastIndexOf(t,r-l-1):-1;if(e>=0&&e+t.length+l>=n)return l+e;if(n==r&&a.length>=r+t.length-l&&a.slice(r-l,r-l+t.length)==t)return r}}return -1}(this.node.content,e,r-n,i-n);return t<0?null:{node:o,pos:t,text:e}}}protectLocalComposition(e,t){let{node:n,pos:r,text:i}=t;if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new ee(this,o,n,i);e.input.compositionNodes.push(s),this.children=eg(this.children,r,r+i.length,e,s)}update(e,t,n,r){return 3!=this.dirty&&!!e.sameMarkup(this.node)&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(ed(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=eh(this.dom,this.nodeDOM,ec(this.outerDeco,this.node,t),ec(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}constructor(e,t,n,r,i,o,s,l,a){super(e,[],i,o),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}}function er(e,t,n,r,i){eu(r,t,e);let o=new en(void 0,e,t,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class ei extends en{parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return 3!=this.dirty&&(0==this.dirty||!!this.inParent())&&!!e.sameMarkup(this.node)&&(this.updateOuterDeco(t),(0!=this.dirty||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),i=document.createTextNode(r.text);return new ei(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(0==e||t==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,null,o,s,0)}}class eo extends X{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class es extends en{update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return(!!this.contentDOM||!!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}constructor(e,t,n,r,i,o,s,l,a,c){super(e,t,n,r,i,o,s,a,c),this.spec=l}}let el=function(e){e&&(this.nodeName=e)};el.prototype=Object.create(null);let ea=[new el];function ec(e,t,n){if(0==e.length)return ea;let r=n?ea[0]:new el,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s)for(let e in s.nodeName&&i.push(r=new el(s.nodeName)),s){let o=s[e];null!=o&&(n&&1==i.length&&i.push(r=new el(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+o:"style"==e?r.style=(r.style?r.style+";":"")+o:"nodeName"!=e&&(r[e]=o))}}return i}function eh(e,t,n,r){if(n==ea&&r==ea)return t;let i=t;for(let t=0;t<r.length;t++){let o=r[t],s=n[t];if(t){let t;s&&s.nodeName==o.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==o.nodeName||((t=document.createElement(o.nodeName)).pmIsDeco=!0,t.appendChild(i),s=ea[0]),i=t}!function(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);
99if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==i.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)-1==r.indexOf(i[t])&&e.classList.add(i[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}(i,s||ea[0],o)}return i}function eu(e,t,n){return eh(e,e,ea,ec(t,n,1!=e.nodeType))}function ed(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function ep(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class ef{destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&!1!==e[i].type.spec.spanning;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let i=-1,s=this.top.children.length;r<this.preMatch.index&&(s=Math.min(this.index+3,s));for(let t=this.index;t<s;t++){let n=this.top.children[t];if(n.matchesMark(e[o])&&!this.isLocked(n.dom)){i=t;break}}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=et.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let i=-1,o;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r<o;r++){let o=this.top.children[r];if(o.matchesNode(e,t,n)&&!this.preMatch.matched.has(o)){i=r;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let o=this.top.children[r];return 3==o.dirty&&o.dom==o.contentDOM&&(o.dirty=2),!!o.update(e,t,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return -1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return -1}e=t}}updateNextNode(e,t,n,r,i,o){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof en){let a=this.preMatch.matched.get(l);if(null!=a&&a!=i)return!1;let c=l.dom,h,u=this.isLocked(c)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&3!=l.dirty&&ed(t,l.outerDeco));if(!u&&l.update(e,t,n,r))return this.destroyBetween(this.index,s),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!u&&(h=this.recreateWrapper(l,e,t,n,r,o)))return this.destroyBetween(this.index,s),this.top.children[this.index]=h,h.contentDOM&&(h.dirty=2,h.updateChildren(r,o+1),h.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,o){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!ed(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let s=en.create(this.top,t,n,r,i,o);if(s.contentDOM)for(let t of(s.children=e.children,e.children=[],s.children))t.parent=s;return e.destroy(),s}addNode(e,t,n,r,i){let o=en.create(this.top,e,t,n,r,i);o.contentDOM&&o.updateChildren(r,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new Y(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof et;)e=(t=e).children[t.children.length-1];(!e||!(e instanceof ei)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((_||M)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new eo(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}
99isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,i=e.childCount,o=new Map,s=[];n:for(;i>0;){let l;for(;;)if(r){let e=n.children[r-1];if(e instanceof et)n=e,r=e.children.length;else{l=e,r--;break}}else if(n==t)break n;else r=n.parent.children.indexOf(n),n=n.parent;let a=l.node;if(a){if(a!=e.child(i-1))break;--i,o.set(l,i),s.push(l)}}return{index:i,matched:o,matches:s.reverse()}}(e.node.content,e)}}function em(e,t){return e.type.side-t.type.side}function eg(e,t,n,r,i){let o=[];for(let s=0,l=0;s<e.length;s++){let a=e[s],c=l,h=l+=a.size;c>=n||h<=t?o.push(a):(c<t&&o.push(a.slice(0,t-c,r)),i&&(o.push(i),i=void 0),h>n&&o.push(a.slice(n-c,a.size,r)))}return o}function ek(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.domSelectionRange(),o=e.state.doc;if(!r.focusNode)return null;let s=e.docView.nearestDesc(r.focusNode),l=s&&0==s.size,a=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(a<0)return null;let c=o.resolve(a),h,u;if(f(r)){for(h=a;s&&!s.node;)s=s.parent;let e=s.node;if(s&&e.isAtom&&t.NodeSelection.isSelectable(e)&&s.parent&&!(e.isInline&&function(e,t,n){for(let r=0==t,o=t==d(e);r||o;){if(e==n)return!0;let t=i(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==d(e)}}(r.focusNode,r.focusOffset,s.dom))){let e=s.posBefore;u=new t.NodeSelection(a==e?c:o.resolve(e))}}else{if(r instanceof e.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let t=a,n=a;for(let i=0;i<r.rangeCount;i++){let o=r.getRangeAt(i);t=Math.min(t,e.docView.posFromDOM(o.startContainer,o.startOffset,1)),n=Math.max(n,e.docView.posFromDOM(o.endContainer,o.endOffset,-1))}if(t<0)return null;[h,a]=n==e.state.selection.anchor?[n,t]:[t,n],c=o.resolve(a)}else h=e.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(h<0)return null}let p=o.resolve(h);if(!u){let t="pointer"==n||e.state.selection.head<c.pos&&!l?1:-1;u=eM(e,p,c,t)}return u}function ey(e){return e.editable?e.hasFocus():e_(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function eb(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.state.selection;if(eS(e,r),ey(e)){if(!n&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&M){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&c(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r="IMG"==n.nodeName;r?t.collapse(n.parentNode,i(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&w&&C<=11&&(n.disabled=!0,n.disabled=!1)}(e);else{var o;let i,s,l,a,{anchor:c,head:h}=r,u,d;ev&&!(r instanceof t.TextSelection)&&(r.$from.parent.inlineContent||(u=ex(e,r.from)),r.empty||r.$from.parent.inlineContent||(d=ex(e,r.to))),e.docView.setSelection(c,h,e,n),ev&&(u&&eC(u),d&&eC(d)),r.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&((i=(o=e).dom.ownerDocument).removeEventListener("selectionchange",o.input.hideSelectionGuard),l=(s=o.domSelectionRange()).anchorNode,a=s.anchorOffset,i.addEventListener("selectionchange",o.input.hideSelectionGuard=()=>
99{(s.anchorNode!=l||s.anchorOffset!=a)&&(i.removeEventListener("selectionchange",o.input.hideSelectionGuard),setTimeout(()=>{(!ey(o)||o.state.selection.visible)&&o.dom.classList.remove("ProseMirror-hideselection")},20))})))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}let ev=_||M&&E<63;function ex(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(_&&i&&"false"==i.contentEditable)return ew(i);if((!i||"false"==i.contentEditable)&&(!o||"false"==o.contentEditable)){if(i)return ew(i);else if(o)return ew(o)}}function ew(e){return e.contentEditable="true",_&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function eC(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function eS(e,n){if(n instanceof t.NodeSelection){let t=e.docView.descAt(n.from);t!=e.lastSelectedViewDesc&&(eA(e),t&&t.selectNode(),e.lastSelectedViewDesc=t)}else eA(e)}function eA(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function eM(e,n,r,i){return e.someProp("createSelectionBetween",t=>t(e,n,r))||t.TextSelection.between(n,r,i)}function eE(e){return(!e.editable||!!e.hasFocus())&&e_(e)}function e_(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function eT(e,n){let{$anchor:r,$head:i}=e.selection,o=n>0?r.max(i):r.min(i),s=o.parent.inlineContent?o.depth?e.doc.resolve(n>0?o.after():o.before()):null:o;return s&&t.Selection.findFrom(s,n)}function eD(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function eO(e,n,r){let i=e.state.selection;if(i instanceof t.TextSelection){if(r.indexOf("s")>-1){let{$head:r}=i,o=r.textOffset?null:n<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=e.state.doc.resolve(r.pos+o.nodeSize*(n<0?-1:1));return eD(e,new t.TextSelection(i.$anchor,s))}else if(!i.empty)return!1;else if(e.endOfTextblock(n>0?"forward":"backward")){let r=eT(e.state,n);return!!r&&r instanceof t.NodeSelection&&eD(e,r)}else if(!(D&&r.indexOf("m")>-1)){let r=i.$head,o=r.textOffset?null:n<0?r.nodeBefore:r.nodeAfter,s;if(!o||o.isText)return!1;let l=n<0?r.pos-o.nodeSize:r.pos;return!!(o.isAtom||(s=e.docView.descAt(l))&&!s.contentDOM)&&(t.NodeSelection.isSelectable(o)?eD(e,new t.NodeSelection(n<0?e.state.doc.resolve(r.pos-o.nodeSize):r)):!!I&&eD(e,new t.TextSelection(e.state.doc.resolve(n<0?l:l+o.nodeSize))))}}else{if(i instanceof t.NodeSelection&&i.node.isInline)return eD(e,new t.TextSelection(n>0?i.$to:i.$from));let r=eT(e.state,n);return!!r&&eD(e,r)}}function eN(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function eI(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function eL(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,s,l=!1;for(S&&1==n.nodeType&&r<eN(n)&&eI(n.childNodes[r],-1)&&(l=!0);;)if(r>0)if(1!=n.nodeType)break;else{let e=n.childNodes[r-1];if(eI(e,-1))o=n,s=--r;else if(3==e.nodeType)r=(n=e).nodeValue.length;else break}else if(eF(n))break;else{let t=n.previousSibling;for(;t&&eI(t,-1);)o=n.parentNode,s=i(t),t=t.previousSibling;if(t)r=eN(n=t);else{if((n=n.parentNode)==e.dom)break;r=0}}l?eR(e,n,r):o&&eR(e,o,s)}(e):function(e){let t,n,r=e.domSelectionRange(),o=r.focusNode,s=r.focusOffset;if(!o)return;let l=eN(o);for(;;)if(s<l){if(1!=o.nodeType)break;if(eI(o.childNodes[s],1))t=o,n=++s;else break}else if(eF(o))break;else{let r=o.nextSibling;for(;r&&eI(r,1);)t=r.parentNode,n=i(r)+1,r=r.nextSibling;if(r)s=0,l=eN(o=r);else{if((o=o.parentNode)==e.dom)break;s=l=0}}t&&eR(e,t,n)}(e)}function eF(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function eR(e,t,n){if(3!=t.nodeType){let e,r;(r=function(e,t){for(;e&&t==e.childNodes.length&&!p(e);)t=i(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];
99if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=r,n=0):(e=function(e,t){for(;e&&!t&&!p(e);)t=i(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(f(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout(()=>{e.state==o&&eb(e)},50)}function ez(e,t){let n=e.state.doc.resolve(t);if(!(M||O)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function eP(e,n,r){let i=e.state.selection;if(i instanceof t.TextSelection&&!i.empty||r.indexOf("s")>-1||D&&r.indexOf("m")>-1)return!1;let{$from:o,$to:s}=i;if(!o.parent.inlineContent||e.endOfTextblock(n<0?"up":"down")){let r=eT(e.state,n);if(r&&r instanceof t.NodeSelection)return eD(e,r)}if(!o.parent.inlineContent){let r=n<0?o:s,l=i instanceof t.AllSelection?t.Selection.near(r,n):t.Selection.findFrom(r,n);return!!l&&eD(e,l)}return!1}function eB(e,n){if(!(e.state.selection instanceof t.TextSelection))return!0;let{$head:r,$anchor:i,empty:o}=e.state.selection;if(!r.sameParent(i))return!0;if(!o)return!1;if(e.endOfTextblock(n>0?"forward":"backward"))return!0;let s=!r.textOffset&&(n<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){let t=e.state.tr;return n<0?t.delete(r.pos-s.nodeSize,r.pos):t.delete(r.pos,r.pos+s.nodeSize),e.dispatch(t),!0}return!1}function e$(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function ej(e,t){e.someProp("transformCopied",n=>{t=n(t,e)});let r=[],{content:i,openStart:o,openEnd:s}=t;for(;o>1&&s>1&&1==i.childCount&&1==i.firstChild.childCount;){o--,s--;let e=i.firstChild;r.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),i=e.content}let l=e.someProp("clipboardSerializer")||n.DOMSerializer.fromSchema(e.state.schema),a=eZ(),c=a.createElement("div");c.appendChild(l.serializeFragment(i,{document:a}));let h=c.firstChild,u,d=0;for(;h&&1==h.nodeType&&(u=eK[h.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=a.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}h=c.firstChild}return h&&1==h.nodeType&&h.setAttribute("data-pm-slice",`${o} ${s}${d?` -${d}`:""} ${JSON.stringify(r)}`),{dom:c,text:e.someProp("clipboardTextSerializer",n=>n(t,e))||t.content.textBetween(0,t.content.size,"\n\n"),slice:t}}function eq(e,t,r,i,o){let s,l,a=o.parent.type.spec.code;if(!r&&!t)return null;let c=!!t&&(i||a||!r);if(c){if(e.someProp("transformPastedText",n=>{t=n(t,a||i,e)}),a)return l=new n.Slice(n.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0),e.someProp("transformPasted",t=>{l=t(l,e,!0)}),l;let r=e.someProp("clipboardTextParser",n=>n(t,o,i,e));if(r)l=r;else{let r=o.marks(),{schema:i}=e.state,l=n.DOMSerializer.fromSchema(i);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=s.appendChild(document.createElement("p"));e&&t.appendChild(l.serializeNode(i.text(e,r)))})}}else e.someProp("transformPastedHTML",t=>{r=t(r,e)}),s=function(e){var t;let n,r=/^(\s*<meta [^>]*>)*/.exec(e);r&&(e=e.slice(r[0].length));let i=eZ().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e),s;if((s=o&&eK[o[1].toLowerCase()])&&(e=s.map(e=>"<"+e+">").join("")+e+s.map(e=>"</"+e+">").reverse().join("")),i.innerHTML=(t=e,(n=window.trustedTypes)?(eG||(eG=n.defaultPolicy||n.createPolicy("ProseMirrorClipboard",{createHTML:e=>e})),eG.createHTML(t)):t),s)for(let e=0;e<s.length;e++)i=i.querySelector(s[e])||i;return i}(r),I&&function(e){let t=e.querySelectorAll(M?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&"Â "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(s);let h=s&&s.querySelector("[data-pm-slice]"),u=h&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(h.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let e=+u[3];e>0;e--){let e=s.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;s=e}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||n.DOMParser.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||u),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||eV.test(e.parentNode.nodeName)?null:{ignore:!0}})),u)l=function(e,t){if(!e.size)return e;let r=e.content.firstChild.type.schema,i;try{i=JSON.parse(t)}catch(t){return e}let{content:o,openStart:s,openEnd:l}=e;for(let e=i.length-2;e>=0;e-=2){let t=r.nodes[i[e]];if(!t||t.hasRequiredAttrs())break;o=n.Fragment.from(t.create(i[e+1],o)),s++,l++}return new n.Slice(o,s,l)}(eU(l,+u[1],+u[2]),u[4]);else if((l=n.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let i=t.node(r).contentMatchAt(t.index(r)),o,s=[];
99if(e.forEach(e=>{if(!s)return;let t=i.findWrapping(e.type),r;if(!t)return s=null;if(r=s.length&&o.length&&function e(t,r,i,o,s){if(s<t.length&&s<r.length&&t[s]==r[s]){let l=e(t,r,i,o.lastChild,s+1);if(l)return o.copy(o.content.replaceChild(o.childCount-1,l));if(o.contentMatchAt(o.childCount).matchType(s==t.length-1?i.type:t[s+1]))return o.copy(o.content.append(n.Fragment.from(eH(i,t,s+1))))}}(t,o,e,s[s.length-1],0))s[s.length-1]=r;else{s.length&&(s[s.length-1]=function e(t,r){if(0==r)return t;let i=t.content.replaceChild(t.childCount-1,e(t.lastChild,r-1)),o=t.contentMatchAt(t.childCount).fillBefore(n.Fragment.empty,!0);return t.copy(i.append(o))}(s[s.length-1],o.length));let r=eH(e,t);s.push(r),i=i.matchType(r.type),o=t}}),s)return n.Fragment.from(s)}return e}(l.content,o),!0)).openStart||l.openEnd){let e=0,t=0;for(let t=l.content.firstChild;e<l.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=l.content.lastChild;t<l.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);l=eU(l,e,t)}return e.someProp("transformPasted",t=>{l=t(l,e,c)}),l}let eV=/^(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 eH(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(let i=t.length-1;i>=r;i--)e=t[i].create(null,n.Fragment.from(e));return e}function eW(e,t,r,i,o,s){let l=t<0?e.firstChild:e.lastChild,a=l.content;return e.childCount>1&&(s=0),o<i-1&&(a=eW(a,t,r,i,o+1,s)),o>=r&&(a=t<0?l.contentMatchAt(0).fillBefore(a,s<=o).append(a):a.append(l.contentMatchAt(l.childCount).fillBefore(n.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,l.copy(a))}function eU(e,t,r){return t<e.openStart&&(e=new n.Slice(eW(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),r<e.openEnd&&(e=new n.Slice(eW(e.content,1,r,e.openEnd,0,0),e.openStart,r)),e}let eK={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},eJ=null;function eZ(){return eJ||(eJ=document.implementation.createHTMLDocument("title"))}let eG=null,eQ={},eX={},eY={touchstart:!0,touchmove:!0};class e0{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function e1(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function e2(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>e3(e,t))})}function e3(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function e5(e){return{left:e.clientX,top:e.clientY}}function e4(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,t=>r>o.depth?t(e,n,o.nodeAfter,o.before(r),i,!0):t(e,n,o.node(r),o.before(r),i,!1)))return!0;return!1}function e6(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}eX.keydown=(e,t)=>{if((e.input.shiftKey=16==t.keyCode||t.shiftKey,!e7(e,t))&&(e.input.lastKeyCode=t.keyCode,e.input.lastKeyCodeTime=Date.now(),!N||!M||13!=t.keyCode))if(229!=t.keyCode&&e.domObserver.forceFlush(),!T||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",n=>n(e,t))||function(e,t){let n,r=t.keyCode,i=(n="",t.ctrlKey&&(n+="c"),t.metaKey&&(n+="m"),t.altKey&&(n+="a"),t.shiftKey&&(n+="s"),n);if(8==r||D&&72==r&&"c"==i)return eB(e,-1)||eL(e,-1);if(46==r&&!t.shiftKey||D&&68==r&&"c"==i)return eB(e,1)||eL(e,1);if(13==r||27==r)return!0;
99if(37==r||D&&66==r&&"c"==i){let t=37==r?"ltr"==ez(e,e.state.selection.from)?-1:1:-1;return eO(e,t,i)||eL(e,t)}if(39==r||D&&70==r&&"c"==i){let t=39==r?"ltr"==ez(e,e.state.selection.from)?1:-1:1;return eO(e,t,i)||eL(e,t)}else if(38==r||D&&80==r&&"c"==i)return eP(e,-1,i)||eL(e,-1);else if(40==r||D&&78==r&&"c"==i)return function(e){if(!_||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;e$(e,n,"true"),setTimeout(()=>e$(e,n,"false"),20)}return!1}(e)||eP(e,1,i)||eL(e,1);else if(i==(D?"m":"c")&&(66==r||73==r||89==r||90==r))return!0;return!1}(e,t)?t.preventDefault():e1(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",t=>t(e,m(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},eX.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},eX.keypress=(e,n)=>{if(e7(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||D&&n.metaKey)return;if(e.someProp("handleKeyPress",t=>t(e,n)))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof t.TextSelection)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();/[\r\n]/.test(t)||e.someProp("handleTextInput",n=>n(e,r.$from.pos,r.$to.pos,t,i))||e.dispatch(i()),n.preventDefault()}};let e9=D?"metaKey":"ctrlKey";eQ.mousedown=(e,n)=>{var r;let i,o;e.input.shiftKey=n.shiftKey;let s=tr(e),l=Date.now(),a="singleClick";l-e.input.lastClick.time<500&&(i=(r=e.input.lastClick).x-n.clientX)*i+(o=r.y-n.clientY)*o<100&&!n[e9]&&e.input.lastClick.button==n.button&&("singleClick"==e.input.lastClick.type?a="doubleClick":"doubleClick"==e.input.lastClick.type&&(a="tripleClick")),e.input.lastClick={time:l,x:n.clientX,y:n.clientY,type:a,button:n.button};let c=e.posAtCoords(e5(n));c&&("singleClick"==a?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new e8(e,c,n,!!s)):("doubleClick"==a?function(e,t,n,r){return e4(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",n=>n(e,t,r))}:function(e,n,r,i){return e4(e,"handleTripleClickOn",n,r,i)||e.someProp("handleTripleClick",t=>t(e,n,i))||function(e,n,r){if(0!=r.button)return!1;let i=e.state.doc;if(-1==n)return!!i.inlineContent&&(e6(e,t.TextSelection.create(i,0,i.content.size),"pointer"),!0);let o=i.resolve(n);for(let n=o.depth+1;n>0;n--){let r=n>o.depth?o.nodeAfter:o.node(n),s=o.before(n);if(r.inlineContent)e6(e,t.TextSelection.create(i,s+1,s+1+r.content.size),"pointer");else{if(!t.NodeSelection.isSelectable(r))continue;e6(e,t.NodeSelection.create(i,s),"pointer")}return!0}}(e,r,i)})(e,c.pos,c.inside,n)?n.preventDefault():e1(e,"pointer"))};class e8{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(()=>eb(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;if(this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(e5(e))),this.updateAllowDefault(e),this.allowDefault||!n)e1(this.view,"pointer");else{var r,i,o,s;(r=this.view,i=n.pos,o=n.inside,s=this.selectNode,e4(r,"handleClickOn",i,o,e)||r.someProp("handleClick",t=>t(r,i,e))||(s?function(e,n){if(-1==n)return!1;let r=e.state.selection,i,o;r instanceof t.NodeSelection&&(i=r.node);let s=e.state.doc.resolve(n);for(let e=s.depth+1;e>0;e--){let n=e>s.depth?s.nodeAfter:s.node(e);if(t.NodeSelection.isSelectable(n)){o=i&&r.$from.depth>0&&e>=r.$from.depth&&s.before(r.$from.depth+1)==r.$from.pos?s.before(r.$from.depth):s.before(e);break}}return null!=o&&(e6(e,t.NodeSelection.create(e.state.doc,o),"pointer"),!0)}(r,o):function(e,n){if(-1==n)return!1;let r=e.state.doc.resolve(n),i=r.nodeAfter;return!!(i&&i.isAtom&&t.NodeSelection.isSelectable(i))&&(e6(e,new t.NodeSelection(r),"pointer"),
99!0)}(r,o)))?e.preventDefault():0==e.button&&(this.flushed||_&&this.mightDrag&&!this.mightDrag.node.isAtom||M&&!this.view.state.selection.visible&&2>=Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to)))?(e6(this.view,t.Selection.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):e1(this.view,"pointer")}}move(e){this.updateAllowDefault(e),e1(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}constructor(e,n,r,i){let o,s;if(this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[e9],this.allowDefault=r.shiftKey,n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let t=e.state.doc.resolve(n.pos);o=t.parent,s=t.depth?t.before():0}const l=i?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&1==a.nodeDOM.nodeType?a.nodeDOM:null;let{selection:c}=e.state;(0==r.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof t.NodeSelection&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&S&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),e1(e,"pointer")}}function e7(e,t){return!!e.composing||!!(_&&500>Math.abs(t.timeStamp-e.input.compositionEndedAt))&&(e.input.compositionEndedAt=-2e8,!0)}eQ.touchstart=e=>{e.input.lastTouch=Date.now(),tr(e),e1(e,"pointer")},eQ.touchmove=e=>{e.input.lastTouch=Date.now(),e1(e,"pointer")},eQ.contextmenu=e=>tr(e);let te=N?5e3:-1;function tt(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>tr(e),t))}function tn(e){let t;for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=((t=document.createEvent("Event")).initEvent("event",!0,!0),t.timeStamp));e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function tr(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!N||!(e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),tn(e),t||e.docView&&e.docView.dirty){let n=ek(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}eX.compositionstart=eX.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:n}=e,r=n.selection.$to;if(n.selection instanceof t.TextSelection&&(n.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)||M&&O&&function(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||1!=t.nodeType||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return 1==r.nodeType&&"false"==r.contentEditable}(e)))e.markCursor=e.state.storedMarks||r.marks(),tr(e,!0),e.markCursor=null;else if(tr(e,!n.selection.empty),S&&n.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}tt(e,te)},eX.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>
99e.domObserver.flush()),e.input.compositionID++,tt(e,20))};let ti=w&&C<15||T&&L<604;function to(e,t,r,i,o){let s=eq(e,t,r,i,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,o,s||n.Slice.empty)))return!0;if(!s)return!1;let l=0==s.openStart&&0==s.openEnd&&1==s.content.childCount?s.content.firstChild:null,a=l?e.state.tr.replaceSelectionWith(l,i):e.state.tr.replaceSelection(s);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function ts(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}eQ.copy=eX.cut=(e,t)=>{let n=e.state.selection,r="cut"==t.type;if(n.empty)return;let i=ti?null:t.clipboardData,{dom:o,text:s}=ej(e,n.content());i?(t.preventDefault(),i.clearData(),i.setData("text/html",o.innerHTML),i.setData("text/plain",s)):function(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)}(e,o),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},eX.paste=(e,t)=>{if(e.composing&&!N)return;let n=ti?null:t.clipboardData,r=e.input.shiftKey&&45!=e.input.lastKeyCode;n&&to(e,ts(n),n.getData("text/html"),r,t)?t.preventDefault():function(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();let i=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?to(e,r.value,null,i,t):to(e,r.textContent,r.innerHTML,i,t)},50)}(e,t)};class tl{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}let ta=D?"altKey":"ctrlKey";function tc(e,t){let n=e.someProp("dragCopies",e=>!e(t));return null!=n?n:!t[ta]}for(let e in eQ.dragstart=(e,n)=>{let r,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let o=e.state.selection,s=o.empty?null:e.posAtCoords(e5(n));if(s&&s.pos>=o.from&&s.pos<=(o instanceof t.NodeSelection?o.to-1:o.to));else if(i&&i.mightDrag)r=t.NodeSelection.create(e.state.doc,i.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let i=e.docView.nearestDesc(n.target,!0);i&&i.node.type.spec.draggable&&i!=e.docView&&(r=t.NodeSelection.create(e.state.doc,i.posBefore))}let l=(r||e.state.selection).content(),{dom:a,text:c,slice:h}=ej(e,l);n.dataTransfer.files.length&&M&&!(E>120)||n.dataTransfer.clearData(),n.dataTransfer.setData(ti?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",ti||n.dataTransfer.setData("text/plain",c),e.dragging=new tl(h,tc(e,n),r)},eQ.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},eX.dragover=eX.dragenter=(e,t)=>t.preventDefault(),eX.drop=(e,i)=>{try{!function(e,i,o){if(!i.dataTransfer)return;let s=e.posAtCoords(e5(i));if(!s)return;let l=e.state.doc.resolve(s.pos),a=o&&o.slice;a?e.someProp("transformPasted",t=>{a=t(a,e,!1)}):a=eq(e,ts(i.dataTransfer),ti?null:i.dataTransfer.getData("text/html"),!1,l);let c=!!(o&&tc(e,i));if(e.someProp("handleDrop",t=>t(e,i,a||n.Slice.empty,c)))return i.preventDefault();if(!a)return;i.preventDefault();let h=a?(0,r.dropPoint)(e.state.doc,l.pos,a):l.pos;null==h&&(h=l.pos);let u=e.state.tr;if(c){let{node:e}=o;e?e.replace(u):u.deleteSelection()}let d=u.mapping.map(h),p=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,f=u.doc;if(p?u.replaceRangeWith(d,d,a.content.firstChild):u.replaceRange(d,d,a),u.doc.eq(f))return;let m=u.doc.resolve(d);if(p&&t.NodeSelection.isSelectable(a.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new t.NodeSelection(m));else{let t=u.mapping.map(h);u.mapping.maps[u.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),u.setSelection(eM(e,m,u.doc.resolve(t)))}
99e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))}(e,i,e.dragging)}finally{e.dragging=null}},eQ.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())&&eb(e)},20))},eQ.blur=(e,t)=>{e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},eQ.beforeinput=(e,t)=>{if(M&&N&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,m(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}},eX)eQ[e]=eX[e];function th(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 tu{map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new tf(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof tu&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&th(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}constructor(e,t){this.toDOM=e,this.spec=t||tg,this.side=this.spec.side||0}}class td{map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new tf(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof td&&th(this.attrs,e.attrs)&&th(this.spec,e.spec)}static is(e){return e.type instanceof td}destroy(){}constructor(e,t){this.attrs=e,this.spec=t||tg}}class tp{map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new tf(i.pos-n,o.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(e){return this==e||e instanceof tp&&th(this.attrs,e.attrs)&&th(this.spec,e.spec)}destroy(){}constructor(e,t){this.attrs=e,this.spec=t||tg}}class tf{copy(e,t){return new tf(e,t,this.type)}eq(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new tf(e,e,new tu(t,n))}static inline(e,t,n,r){return new tf(e,t,new td(n,r))}static node(e,t,n,r){return new tf(e,t,new tp(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof td}get widget(){return this.type instanceof tu}constructor(e,t,n){this.from=e,this.to=t,this.type=n}}let tm=[],tg={};class tk{static create(e,t){return t.length?tC(t,e,0,tg):ty}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==ty||0==e.maps.length?this:this.mapInner(e,t,0,0,n||tg)}mapInner(e,t,n,r,i){let o;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(e,n,r);l&&l.type.valid(t,l)?(o||(o=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,i,o,s){let l=e.slice();for(let e=0,t=o;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,o)=>{let s=o-i-(n-e);for(let i=0;i<l.length;i+=3){let o=l[i+1];if(o<0||e>o+t-r)continue;let a=l[i]+t-r;n>=a?l[i+1]=e<=a?-2:-1:e>=t&&s&&(l[i]+=s,l[i+1]+=s)}r+=s}),t=n.maps[e].map(t,-1)}let a=!1;for(let t=0;t<l.length;t+=3)if(l[t+1]<0){if(-2==l[t+1]){a=!0,l[t+1]=-1;continue}let c=n.map(e[t]+o),h=c-i;if(h<0||h>=r.content.size){a=!0;continue}let u=n.map(e[t+1]+o,-1)-i,{index:d,offset:p}=r.content.findIndex(h),f=r.maybeChild(d);if(f&&p==h&&p+f.nodeSize==u){let r=l[t+2].mapInner(n,f,c+1,e[t]+o+1,s);r!=ty?(l[t]=h,l[t+1]=u,l[t+2]=r):(l[t+1]=-2,a=!0)}else a=!0}if(a){let a=tC(function(e,t,n,r,i,o,s){for(let l=0;l<e.length;l+=3)-1==e[l+1]&&function e(t,o){for(let e=0;e<t.local.length;e++){let l=t.local[e].map(r,i,o);l?n.push(l):s.onRemove&&s.onRemove(t.local[e].spec)}for(let n=0;n<t.children.length;n+=3)e(t.children[n+2],t.children[n]+o+1)}(e[l+2],t[l]+o+1);return n}(l,e,t,n,i,o,s),r,0,s);t=a.local;for(let e=0;e<l.length;e+=3)l[e+1]<0&&(l.splice(e,3),e-=3);for(let e=0,t=0;e<a.children.length;e+=3){let n=a.children[e];for(;t<l.length&&l[t]<n;)t+=3;l.splice(t,0,a.children[e],a.children[e+1],a.children[e+2])}}return new tk(t.sort(tS),l)}(this.children,o||[],e,t,n,r,i):o?new tk(o.sort(tS),tm):ty}add(e,t){return t.length?this==ty?tk.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach((e,o)=>{let s=o+n,l;if(l=tx(t,e,s)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,l,s+1):r.splice(i,0,o,o+e.nodeSize,tC(l,e,s+1,tg)),i+=3}});let o=tv(i?tw(t):t,-n);for(let t=0;t<o.length;t++)o[t].type.valid(e,o[t])||o.splice(t--,1);return new tk(o.length?this.local.concat(o).sort(tS):this.local,r||this.children)}remove(e){return 0==e.length||this==ty?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+t,s=n[r+1]+t;for(let t=0,n;t<e.length;t++)(n=e[t])&&n.from>o&&n.to<s&&(e[t]=null,(i||(i=[])).push(n));if(!i)continue;n==this.children&&(n=this.children.slice());let l=n[r+2].removeInner(i,o+1);l!=ty?n[r+2]=l:(n.splice(r,3),r-=3)}if(r.length){for(let n=0,i;n<e.length;n++)if(i=e[n])for(let e=0;e<r.length;e++)r[e].eq(i,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1))}return n==this.children&&r==this.local?this:r.length||n.length?new tk(r,n):ty}forChild(e,t){let n,r;if(this==ty)return this;if(t.isLeaf)return tk.empty;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let i=e+1,o=i+t.content.size;
99for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>i&&t.type instanceof td){let e=Math.max(i,t.from)-i,n=Math.min(o,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new tk(r.sort(tS),tm);return n?new tb([e,n]):e}return n||ty}eq(e){if(this==e)return!0;if(!(e instanceof tk)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return tA(this.localsInner(e))}localsInner(e){if(this==ty)return tm;if(e.inlineContent||!this.local.some(td.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof td||t.push(this.local[e]);return t}forEachSet(e){e(this)}constructor(e,t){this.local=e.length?e:tm,this.children=t.length?t:tm}}tk.empty=new tk([],[]),tk.removeOverlap=tA;let ty=tk.empty;class tb{map(e,t){let n=this.members.map(n=>n.map(e,t,tg));return tb.from(n)}forChild(e,t){if(t.isLeaf)return tk.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=ty&&(i instanceof tb?n=n.concat(i.members):n.push(i))}return tb.from(n)}eq(e){if(!(e instanceof tb)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?tA(n?t:t.sort(tS)):tm}static from(e){switch(e.length){case 0:return ty;case 1:return e[0];default:return new tb(e.every(e=>e instanceof tk)?e:e.reduce((e,t)=>e.concat(t instanceof tk?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}constructor(e){this.members=e}}function tv(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new tf(i.from+t,i.to+t,i.type))}return n}function tx(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,o;t<e.length;t++)(o=e[t])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),e[t]=null);return i}function tw(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function tC(e,t,n,r){let i=[],o=!1;t.forEach((t,s)=>{let l=tx(e,t,s+n);if(l){o=!0;let e=tC(l,t,n+s+1,r);e!=ty&&i.push(s,s+t.nodeSize,e)}});let s=tv(o?tw(e):e,-n).sort(tS);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||i.length?new tk(s,i):ty}function tS(e,t){return e.from-t.from||e.to-t.to}function tA(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from==r.from){o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),tM(t,i+1,o.copy(r.to,o.to)));continue}o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),tM(t,i,r.copy(o.from,r.to)));break}}return t}function tM(e,t,n){for(;t<e.length&&tS(n,e[t])>0;)t++;e.splice(t,0,n)}function tE(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=ty&&t.push(r)}),e.cursorWrapper&&t.push(tk.create(e.state.doc,[e.cursorWrapper.deco])),tb.from(t)}let t_={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},tT=w&&C<=11;class tD{set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}}class tO{flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,t_)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(eE(this.view)){if(this.suppressingSelectionUpdates)return eb(this.view);if(w&&C<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&c(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=o(n))t.add(n);for(let r=e.anchorNode;r;r=o(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:"selection",target:3==n.nodeType?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){var e;let{view:n}=this;if(!n.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let i=n.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&eE(n)&&!this.ignoreSelectionChange(i),s=-1,l=-1,a=!1,c=[];if(n.editable)for(let e=0;e<r.length;e++){let t=this.registerMutation(r[e],c);t&&(s=s<0?t.from:Math.min(t.from,s),l=l<0?t.to:Math.max(t.to,l),t.typeOver&&(a=!0))}if(c.some(e=>"BR"==e.nodeName)&&(8==n.input.lastKeyCode||46==n.input.lastKeyCode)){for(let e of c)if("BR"==e.nodeName&&e.parentNode){let t=e.nextSibling;for(;t&&1==t.nodeType;){if("false"==t.contentEditable){e.parentNode.removeChild(e);break}t=t.firstChild}}}else if(S&&c.length){let e=c.filter(e=>"BR"==e.nodeName);if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:t}=this.currentSelection;for(let r of e){let e=r.parentNode;e&&"LI"==e.nodeName&&(!t||function(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}(n,t)!=e)&&r.remove()}}}let h=null;s<0&&o&&n.input.lastFocus>
99Date.now()-200&&Math.max(n.input.lastTouch,n.input.lastClick.time)<Date.now()-300&&f(i)&&(h=ek(n))&&h.eq(t.Selection.near(n.state.doc.resolve(0),1))?(n.input.lastFocus=0,eb(n),this.currentSelection.set(i),n.scrollToSelection()):(s>-1||o)&&(s>-1&&(n.docView.markDirty(s,l),e=n,!tN.has(e)&&(tN.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))&&(e.requiresGeckoHackNode=S,tI||(console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),tI=!0))),n.input.badSafariComposition&&(n.input.badSafariComposition=!1,function(e,t){var n;let{focusNode:r,focusOffset:i}=e.domSelectionRange();for(let o of t)if((null==(n=o.parentNode)?void 0:n.nodeName)=="TR"){let t=o.nextSibling;for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.nextSibling;if(t){let n=t;for(;;){let e=n.firstChild;if(!e||1!=e.nodeType||"false"==e.contentEditable||/^(BR|IMG)$/.test(e.nodeName))break;n=e}n.insertBefore(o,n.firstChild),r==o&&e.domSelection().collapse(o,i)}else o.parentNode.removeChild(o)}}(n,c)),this.handleDOMChange(s,l,a,c),n.docView&&n.docView.dirty?n.updateState(n.state):this.currentSelection.eq(i)||eb(n),this.currentSelection.set(i))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),3==r.nodeType&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,o=e.nextSibling;if(w&&C<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:i}=e.addedNodes[t];(!n||0>Array.prototype.indexOf.call(e.addedNodes,n))&&(r=n),(!i||0>Array.prototype.indexOf.call(e.addedNodes,i))&&(o=i)}let s=r&&r.parentNode==e.target?i(r)+1:0,l=n.localPosFromDOM(e.target,s,-1),a=o&&o.parentNode==e.target?i(o):e.target.childNodes.length;return{from:l,to:n.localPosFromDOM(e.target,a,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new tD,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);w&&C<=11&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():_&&e.composing&&t.some(e=>"childList"==e.type&&"TR"==e.target.nodeName)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),tT&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}}let tN=new WeakMap,tI=!1;function tL(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return c(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function tF(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(_&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}else if(e.parentNode.lastChild==e||_&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}let tR=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
99function tz(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:eM(e,t.resolve(n.anchor),t.resolve(n.head))}function tP(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function tB(e){if(2!=e.length)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class t${get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;for(let t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&e2(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(tW),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];for(let n in t.state=this.state,e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n,r,o;let s=this.state,l=!1,a=!1;e.storedMarks&&this.composing&&(tn(this),a=!0),this.state=e;let h=s.plugins!=e.plugins||this._props.plugins!=t.plugins;if(h||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=tH(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,l=!0)}(h||t.handleDOMEvents!=this._props.handleDOMEvents)&&e2(this),this.editable=tV(this),tq(this);let u=tE(this),f=tj(this),m=s.plugins==e.plugins||s.doc.eq(e.doc)?e.scrollToSelection>s.scrollToSelection?"to selection":"preserve":"reset",g=l||!this.docView.matchesNode(e.doc,f,u);(g||!e.selection.eq(s.selection))&&(a=!0);let k="preserve"==m&&a&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(o,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let l=r.getBoundingClientRect();if(l.top>=i-20){t=r,n=l.top;break}}return{refDOM:t,refTop:n,stack:z(e.dom)}}(this);if(a){let t,n,a;this.domObserver.stop();let h=g&&(w||M)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&(r=s.selection,o=e.selection,a=Math.min(r.$anchor.sharedDepth(r.head),o.$anchor.sharedDepth(o.head)),r.$anchor.start(a)!=o.$anchor.start(a));if(g){let t=M?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=function(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(e,t){for(;;){if(3==e.nodeType&&t)return e;if(1==e.nodeType&&t>0){if("false"==e.contentEditable)return null;t=d(e=e.childNodes[t-1])}else{if(!e.parentNode||p(e))return null;t=i(e),e=e.parentNode}}}(t.focusNode,t.focusOffset),r=function(e,t){for(;;){if(3==e.nodeType&&t<e.nodeValue.length)return e;if(1==e.nodeType&&t<e.childNodes.length){if("false"==e.contentEditable)return null;e=e.childNodes[t],t=0}else{if(!e.parentNode||p(e))return null;t=i(e)+1,e=e.parentNode}}}(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(!(!e||!e.isText(n.nodeValue)))return r}}return n||r}(this)),(l||!this.docView.update(e.doc,f,u,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=er(e.doc,f,u,this.dom,this)),!t||this.trackWrites&&this.dom.contains(this.trackWrites)||(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&(t=this.docView.domFromPos(this.state.selection.anchor,0),n=this.domSelectionRange(),c(t.node,t.offset,n.anchorNode,n.anchorOffset)))?eb(this,h):(eS(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),(null==(n=this.dragging)?void 0:n.node)&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),"reset"==m?this.dom.scrollTop=0:"to selection"==m?this.scrollToSelection():k&&function(e){let{refDOM:t,refTop:n,stack:r}=e,i=t?t.getBoundingClientRect().top:0;P(r,0==i?0:i-n)}(k)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(1==e.nodeType?e:e.parentNode))if(this.someProp("handleScrollToSelection",e=>e(this)));else if(this.state.selection instanceof t.NodeSelection){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&R(this,t.getBoundingClientRect(),e)}else R(this,this.coordsAtPos(this.state.selection.head,1),e)}
99destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}updateDraggedNode(e,n){let r=e.node,i=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let e=r.from+(this.state.doc.content.size-n.doc.content.size);(e>0&&e<this.state.doc.content.size&&this.state.doc.nodeAt(e))==r.node&&(i=e)}this.dragging=new tl(e.slice,e.move,i<0?void 0:t.NodeSelection.create(this.state.doc,i))}someProp(e,t){let n=this._props&&this._props[e],r;if(null!=n&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(null!=i&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let o=i[n].props[e];if(null!=o&&(r=t?t(o):o))return r}}hasFocus(){if(w){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(B)return e.focus(B);let t=z(e);e.focus(null==B?{get preventScroll(){return B={preventScroll:!0},!0}}:void 0),B||(B=!1,P(t,0))}(this.dom),eb(this),this.domObserver.start()}get root(){let e=this._root;if(null==e){for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return function(e,t){var n;let r,i,s=e.dom.ownerDocument,a,c=0,h=function(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(d(r.offsetNode),r.offset)}}catch(e){}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(d(r.startContainer),r.startOffset)}}}(s,t.left,t.top);h&&({node:a,offset:c}=h);let u=(e.root.elementFromPoint?e.root:s).elementFromPoint(t.left,t.top);if(!u||!e.dom.contains(1!=u.nodeType?u.parentNode:u)){let n=e.dom.getBoundingClientRect();if(!$(t,n)||!(u=function e(t,n,r){let i=t.childNodes.length;if(i&&r.top<r.bottom)for(let o=Math.max(0,Math.min(i-1,Math.floor(i*(n.top-r.top)/(r.bottom-r.top))-2)),s=o;;){let r=t.childNodes[s];if(1==r.nodeType){let t=r.getClientRects();for(let i=0;i<t.length;i++){let o=t[i];if($(n,o))return e(r,n,o)}}if((s=(s+1)%i)==o)break}return t}(e.dom,t,n)))return null}if(_)for(let e=u;a&&e;e=o(e))e.draggable&&(a=void 0);if(u=(r=(n=u).parentNode)&&/^li$/i.test(r.nodeName)&&t.left<n.getBoundingClientRect().left?r:n,a){let n;if(S&&1==a.nodeType&&(c=Math.min(c,a.childNodes.length))<a.childNodes.length){let e=a.childNodes[c],n;"IMG"==e.nodeName&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&c++}I&&c&&1==a.nodeType&&1==(n=a.childNodes[c-1]).nodeType&&"false"==n.contentEditable&&n.getBoundingClientRect().top>=t.top&&c--,a==e.dom&&c==a.childNodes.length-1&&1==a.lastChild.nodeType&&t.top>a.lastChild.getBoundingClientRect().bottom?i=e.state.doc.content.size:(0==c||1!=a.nodeType||"BR"!=a.childNodes[c-1].nodeName)&&(i=function(e,t,n,r){let i=-1;for(let n=t,o=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),s;if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((s=t.dom.getBoundingClientRect()).width||s.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!o&&s.left>r.left||s.top>
99r.top?i=t.posBefore:(!o&&s.right<r.left||s.bottom<r.top)&&(i=t.posAfter),o=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(s.top+s.bottom)/2:r.left<(s.left+s.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}(e,a,c,t))}null==i&&(i=function(e,t,n){let{node:r,offset:i}=function e(t,n){let r,i,o,s=2e8,a,c=0,h=n.top,u=n.top;for(let e=t.firstChild,d=0;e;e=e.nextSibling,d++){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=l(e).getClientRects()}for(let l=0;l<t.length;l++){let p=t[l];if(p.top<=h&&p.bottom>=u){h=Math.max(p.bottom,h),u=Math.min(p.top,u);let t=p.left>n.left?p.left-n.left:p.right<n.left?n.left-p.right:0;if(t<s){o=e,s=t,a=t&&3==o.nodeType?{left:p.right<n.left?p.right:p.left,top:n.top}:n,1==e.nodeType&&t&&(c=d+ +(n.left>=(p.left+p.right)/2));continue}}else p.top>n.top&&!r&&p.left<=n.left&&p.right>=n.left&&(r=e,i={left:Math.max(p.left,Math.min(p.right,n.left)),top:p.top});!o&&(n.left>=p.right&&n.top>=p.top||n.left>=p.left&&n.top>=p.bottom)&&(c=d+1)}}return(!o&&r&&(o=r,a=i,s=0),o&&3==o.nodeType)?function(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=q(r,1);if(n.top!=n.bottom&&$(t,n)){i={node:e,offset:o+ +(t.left>=(n.left+n.right)/2)};break}}return r.detach(),i||{node:e,offset:0}}(o,a):!o||s&&1==o.nodeType?{node:t,offset:c}:e(o,a)}(t,n),o=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();o=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}(e,u,t));let p=e.docView.nearestDesc(u,!0);return{pos:i,inside:p?p.posAtStart-p.border:-1}}(this,e)}coordsAtPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return H(this,e,t)}domAtPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=this.docView.posFromDOM(e,t,n);if(null==r)throw RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){let r,i;return Z==t&&G==n?Q:(Z=t,G=n,Q="up"==n||"down"==n?(r=t.selection,i="up"==n?r.$from:r.$to,K(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=H(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=l(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=i==r.parent.content.size,s=e.domSelection();return s?J.test(r.parent.textContent)&&s.modify?K(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:o,anchorOffset:l}=e.domSelectionRange(),a=s.caretBidiLevel;s.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:h,focusOffset:u}=e.domSelectionRange(),d=h&&!c.contains(1==h.nodeType?h:h.parentNode)||t==h&&i==u;try{s.collapse(o,l),t&&(t!=o||i!=l)&&s.extend&&s.extend(t,i)}catch(e){}return null!=a&&(s.caretBidiLevel=a),d}):"left"==n||"backward"==n?!i:o:r.pos==r.start()||r.pos==r.end()}(e,t,n))}(this,t||this.state,e)}pasteHTML(e,t){return to(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return to(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return ej(this,e)}destroy(){if(this.docView){for(let e in this.domObserver.stop(),this.input.eventHandlers)this.dom.removeEventListener(e,this.input.eventHandlers[e]);clearTimeout(this.input.composingTimeout),clearTimeout(this.input.lastIOSEnterFallbackTimeout),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],tE(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,a()}}get isDestroyed(){return null==this.docView}dispatchEvent(e){!e3(this,e)&&eQ[e.type]&&(this.editable||!(e.type in eX))&&eQ[e.type](this,e)}domSelectionRange(){let e=this.domSelection();return e?_&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e,t){let n;if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return tL(e,n)}function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?tL(e,n):null}
99(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}constructor(e,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new e0,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(tW),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=tV(this),tq(this),this.nodeViews=tH(this),this.docView=er(this.state.doc,tj(this),tE(this),this.dom,this),this.domObserver=new tO(this,(e,r,i,o)=>(function(e,r,i,o,s){let l,a,c,h=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,r<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=ek(e,t);
99if(n&&!e.state.selection.eq(n)){if(M&&N&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",t=>t(e,m(13,"Enter"))))return;let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),h&&r.setMeta("composition",h),e.dispatch(r)}return}let u=e.state.doc.resolve(r),d=u.sharedDepth(i);r=u.before(d+1),i=e.state.doc.resolve(i).after(d+1);let p=e.state.selection,g=function(e,t,r){let i,{node:o,fromOffset:s,toOffset:l,from:a,to:c}=e.docView.parseRange(t,r),h=e.domSelectionRange(),u=h.anchorNode;if(u&&e.dom.contains(1==u.nodeType?u:u.parentNode)&&(i=[{node:u,offset:h.anchorOffset}],f(h)||i.push({node:h.focusNode,offset:h.focusOffset})),M&&8===e.input.lastKeyCode)for(let e=l;e>s;e--){let t=o.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){l=e;break}if(!n||n.size)break}let d=e.state.doc,p=e.someProp("domParser")||n.DOMParser.fromSchema(e.state.schema),m=d.resolve(a),g=null,k=p.parse(o,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:s,to:l,preserveWhitespace:"pre"!=m.parent.type.whitespace||"full",findPositions:i,ruleFromNode:tF,context:m});if(i&&null!=i[0].pos){let e=i[0].pos,t=i[1]&&i[1].pos;null==t&&(t=e),g={anchor:e+a,head:t+a}}return{doc:k,sel:g,from:a,to:c}}(e,r,i),k=e.state.doc,y=k.slice(g.from,g.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(l=e.state.selection.to,a="end"):(l=e.state.selection.from,a="start"),e.input.lastKeyCode=null;let b=function(e,t,n,r,i){let o=e.findDiffStart(t,n);if(null==o)return null;let{a:s,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==i){let e=Math.max(0,o-Math.min(s,l));r-=s+e-o}if(s<o&&e.size<t.size){let e=r<=o&&r>=s?o-r:0;(o-=e)&&o<t.size&&tB(t.textBetween(o-1,o+1))&&(o+=e?1:-1),l=o+(l-s),s=o}else if(l<o){let t=r<=o&&r>=l?o-r:0;(o-=t)&&o<e.size&&tB(e.textBetween(o-1,o+1))&&(o+=t?1:-1),s=o+(s-l),l=o}return{start:o,endA:s,endB:l}}(y.content,g.doc.content,g.from,l,a);if(b&&e.input.domChangeCount++,(T&&e.input.lastIOSEnter>Date.now()-225||N)&&s.some(e=>1==e.nodeType&&!tR.test(e.nodeName))&&(!b||b.endA>=b.endB)&&e.someProp("handleKeyDown",t=>t(e,m(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!b)if(o&&p instanceof t.TextSelection&&!p.empty&&p.$head.sameParent(p.$anchor)&&!e.composing&&!(g.sel&&g.sel.anchor!=g.sel.head))b={start:p.from,endA:p.to,endB:p.to};else{if(g.sel){let t=tz(e,e.state.doc,g.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);h&&n.setMeta("composition",h),e.dispatch(n)}}return}e.state.selection.from<e.state.selection.to&&b.start==b.endB&&e.state.selection instanceof t.TextSelection&&(b.start>e.state.selection.from&&b.start<=e.state.selection.from+2&&e.state.selection.from>=g.from?b.start=e.state.selection.from:b.endA<e.state.selection.to&&b.endA>=e.state.selection.to-2&&e.state.selection.to<=g.to&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),w&&C<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>g.from&&" Â "==g.doc.textBetween(b.start-g.from-1,b.start-g.from+1)&&(b.start--,b.endA--,b.endB--);let v=g.doc.resolveNoCache(b.start-g.from),x=g.doc.resolveNoCache(b.endB-g.from),S=k.resolve(b.start),A=v.sameParent(x)&&v.parent.inlineContent&&S.end()>=b.endA;if((T&&e.input.lastIOSEnter>Date.now()-225&&(!A||s.some(e=>"DIV"==e.nodeName||"P"==e.nodeName))||!A&&v.pos<g.doc.content.size&&(!v.sameParent(x)||!v.parent.inlineContent)&&v.pos<x.pos&&!/\S/.test(g.doc.textBetween(v.pos,x.pos,"","")))&&e.someProp("handleKeyDown",t=>t(e,m(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>b.start&&function(e,t,n,r,i){if(n-t<=i.pos-r.pos||tP(r,!0,!1)<i.pos)return!1;let o=e.resolve(t);if(!r.parent.isTextblock){let e=o.nodeAfter;return null!=e&&n==t+e.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(tP(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||tP(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(k,b.start,b.endA,v,x)&&e.someProp("handleKeyDown",t=>t(e,m(8,"Backspace")))){N&&M&&e.domObserver.suppressSelectionUpdates();return}
99M&&b.endB==b.start&&(e.input.lastChromeDelete=Date.now()),N&&!A&&v.start()!=x.start()&&0==x.parentOffset&&v.depth==x.depth&&g.sel&&g.sel.anchor==g.sel.head&&g.sel.head==b.endA&&(b.endB-=2,x=g.doc.resolveNoCache(b.endB-g.from),setTimeout(()=>{e.someProp("handleKeyDown",function(t){return t(e,m(13,"Enter"))})},20));let E=b.start,_=b.endA,D=t=>{let n=t||e.state.tr.replace(E,_,g.doc.slice(b.start-g.from,b.endB-g.from));if(g.sel){let t=tz(e,n.doc,g.sel);t&&!(M&&e.composing&&t.empty&&(b.start!=b.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==E||t.head==n.mapping.map(_)-1)||w&&t.empty&&t.head==E)&&n.setSelection(t)}return h&&n.setMeta("composition",h),n.scrollIntoView()};if(A)if(v.pos==x.pos){w&&C<=11&&0==v.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>eb(e),20));let t=D(e.state.tr.delete(E,_)),n=k.resolve(b.start).marksAcross(k.resolve(b.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(b.endA==b.endB&&(c=function(e,t){let r=e.firstChild.marks,i=t.firstChild.marks,o=r,s=i,l,a,c;for(let e=0;e<i.length;e++)o=i[e].removeFromSet(o);for(let e=0;e<r.length;e++)s=r[e].removeFromSet(s);if(1==o.length&&0==s.length)a=o[0],l="add",c=e=>e.mark(a.addToSet(e.marks));else{if(0!=o.length||1!=s.length)return null;a=s[0],l="remove",c=e=>e.mark(a.removeFromSet(e.marks))}let h=[];for(let e=0;e<t.childCount;e++)h.push(c(t.child(e)));if(n.Fragment.from(h).eq(e))return{mark:a,type:l}}(v.parent.content.cut(v.parentOffset,x.parentOffset),S.parent.content.cut(S.parentOffset,b.endA-S.start())))){let t=D(e.state.tr);"add"==c.type?t.addMark(E,_,c.mark):t.removeMark(E,_,c.mark),e.dispatch(t)}else if(v.parent.child(v.index()).isText&&v.index()==x.index()-!x.textOffset){let t=v.parent.textBetween(v.parentOffset,x.parentOffset),n=()=>D(e.state.tr.insertText(t,E,_));e.someProp("handleTextInput",r=>r(e,E,_,t,n))||e.dispatch(n())}else e.dispatch(D());else e.dispatch(D())})(this,e,r,i,o)),this.domObserver.start(),function(e){for(let t in eQ){let n=eQ[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||e3(e,t)||!e.editable&&t.type in eX||n(e,t)},eY[t]?{passive:!0}:void 0)}_&&e.dom.addEventListener("input",()=>null),e2(e)}(this),this.updatePluginViews()}}function tj(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))}),t.translate||(t.translate="no"),[tf.node(0,e.state.doc.content.size,t)]}function tq(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:tf.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function tV(e){return!e.someProp("editable",t=>!1===t(e.state))}function tH(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function tW(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}t$.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},e.s(["Decoration",0,tf,"DecorationSet",0,tk,"EditorView",0,t$])}]); 100 101//# debugId=520fad17-a97d-b4da-59ac-b8d6560652a2 102//# sourceMappingURL=1rasjkdjny24p.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.