96 lines
324 KiB
JavaScript
96 lines
324 KiB
JavaScript
|
(self.webpackChunk=self.webpackChunk||[]).push([["easymde"],{"./node_modules/codemirror-spell-checker/src/js/spell-checker.js":function(ct,_e,ye){"use strict";var W=ye("./node_modules/typo-js/typo.js");function Q(B){if(B=B||{},typeof B.codeMirrorInstance!="function"||typeof B.codeMirrorInstance.defineMode!="function"){console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`");return}String.prototype.includes||(String.prototype.includes=function(){"use strict";return String.prototype.indexOf.apply(this,arguments)!==-1}),B.codeMirrorInstance.defineMode("spell-checker",function(R){if(!Q.aff_loading){Q.aff_loading=!0;var L=new XMLHttpRequest;L.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),L.onload=function(){L.readyState===4&&L.status===200&&(Q.aff_data=L.responseText,Q.num_loaded++,Q.num_loaded==2&&(Q.typo=new W("en_US",Q.aff_data,Q.dic_data,{platform:"any"})))},L.send(null)}if(!Q.dic_loading){Q.dic_loading=!0;var A=new XMLHttpRequest;A.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),A.onload=function(){A.readyState===4&&A.status===200&&(Q.dic_data=A.responseText,Q.num_loaded++,Q.num_loaded==2&&(Q.typo=new W("en_US",Q.aff_data,Q.dic_data,{platform:"any"})))},A.send(null)}var N='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',Y={token:function(G){var P=G.peek(),oe="";if(N.includes(P))return G.next(),null;for(;(P=G.peek())!=null&&!N.includes(P);)oe+=P,G.next();return Q.typo&&!Q.typo.check(oe)?"spell-error":null}},V=B.codeMirrorInstance.getMode(R,R.backdrop||"text/plain");return B.codeMirrorInstance.overlayMode(V,Y,!0)})}Q.num_loaded=0,Q.aff_loading=!1,Q.dic_loading=!1,Q.aff_data="",Q.dic_data="",Q.typo,ct.exports=Q},"./node_modules/codemirror/addon/display/autorefresh.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("autoRefresh",!1,function(R,L){R.state.autoRefresh&&(B(R,R.state.autoRefresh),R.state.autoRefresh=null),L&&R.display.wrapper.offsetHeight==0&&Q(R,R.state.autoRefresh={delay:L.delay||250})});function Q(R,L){function A(){R.display.wrapper.offsetHeight?(B(R,L),R.display.lastWrapHeight!=R.display.wrapper.clientHeight&&R.refresh()):L.timeout=setTimeout(A,L.delay)}L.timeout=setTimeout(A,L.delay),L.hurry=function(){clearTimeout(L.timeout),L.timeout=setTimeout(A,50)},W.on(window,"mouseup",L.hurry),W.on(window,"keyup",L.hurry)}function B(R,L){clearTimeout(L.timeout),W.off(window,"mouseup",L.hurry),W.off(window,"keyup",L.hurry)}})},"./node_modules/codemirror/addon/display/fullscreen.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("fullScreen",!1,function(R,L,A){A==W.Init&&(A=!1),!A!=!L&&(L?Q(R):B(R))});function Q(R){var L=R.getWrapperElement();R.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:L.style.width,height:L.style.height},L.style.width="",L.style.height="auto",L.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",R.refresh()}function B(R){var L=R.getWrapperElement();L.className=L.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var A=R.state.fullScreenRestore;L.style.width=A.width,L.style.height=A.height,window.scrollTo(A.scrollLeft,A.scrollTop),R.refresh()}})},"./node_modules/codemirror/addon/display/placeholder.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){W.defineOption("placeholder","",function(Y,V,G){var P=G&&G!=W.Init;if(V&&!P)Y.on("blur",L),Y.on("change",A),Y.on("swapDoc",A),W.on(Y.getInputField(),"compositionupdate",Y.state.placeholderCompose=function(){R(Y)}),A(Y);else if(!V&&P){Y.off("blur",L),Y.off("change",A),Y.off("swapDoc",A),W.off(Y.getInputField(),"compositionupdate",Y.state.placeholderCompose),Q(Y);var oe=Y.getWrapperElement();oe.className=oe.className.replace(" CodeMirror-empty","")}V&&!Y.hasFocus()&&L(Y)});function Q(Y){Y.state.placeholder&&(
|
||
|
`}else{var te=be[1],X=be[5],ue=!(R.test(be[2])||be[2].indexOf(">")>=0),ie=ue?parseInt(be[3],10)+1+be[4]:be[2].replace("x"," ");Y[V]=`
|
||
|
`+te+ie+X,ue&&L(A,G)}}A.replaceSelections(Y)};function L(A,N){var Y=N.line,V=0,G=0,P=Q.exec(A.getLine(Y)),oe=P[1];do{V+=1;var pe=Y+V,Ee=A.getLine(pe),me=Q.exec(Ee);if(me){var be=me[1],H=parseInt(P[3],10)+V-G,U=parseInt(me[3],10),j=U;if(oe===be&&!isNaN(U))H===U&&(j=U+1),H>U&&(j=H+1),A.replaceRange(Ee.replace(Q,be+j+me[4]+me[5]),{line:pe,ch:0},{line:pe,ch:Ee.length});else{if(oe.length>be.length||oe.length<be.length&&V===1)return;G+=1}}}while(me)}})},"./node_modules/codemirror/addon/mode/overlay.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.overlayMode=function(Q,B,R){return{startState:function(){return{base:W.startState(Q),overlay:W.startState(B),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(L){return{base:W.copyState(Q,L.base),overlay:W.copyState(B,L.overlay),basePos:L.basePos,baseCur:null,overlayPos:L.overlayPos,overlayCur:null}},token:function(L,A){return(L!=A.streamSeen||Math.min(A.basePos,A.overlayPos)<L.start)&&(A.streamSeen=L,A.basePos=A.overlayPos=L.start),L.start==A.basePos&&(A.baseCur=Q.token(L,A.base),A.basePos=L.pos),L.start==A.overlayPos&&(L.pos=L.start,A.overlayCur=B.token(L,A.overlay),A.overlayPos=L.pos),L.pos=Math.min(A.basePos,A.overlayPos),A.overlayCur==null?A.baseCur:A.baseCur!=null&&A.overlay.combineTokens||R&&A.overlay.combineTokens==null?A.baseCur+" "+A.overlayCur:A.overlayCur},indent:Q.indent&&function(L,A,N){return Q.indent(L.base,A,N)},electricChars:Q.electricChars,innerMode:function(L){return{state:L.base,mode:Q}},blankLine:function(L){var A,N;return Q.blankLine&&(A=Q.blankLine(L.base)),B.blankLine&&(N=B.blankLine(L.overlay)),N==null?A:R&&A!=null?A+" "+N:N}}}})},"./node_modules/codemirror/addon/search/searchcursor.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";var Q=W.Pos;function B(H){var U=H.flags;return U??(H.ignoreCase?"i":"")+(H.global?"g":"")+(H.multiline?"m":"")}function R(H,U){for(var j=B(H),te=j,X=0;X<U.length;X++)te.indexOf(U.charAt(X))==-1&&(te+=U.charAt(X));return j==te?H:new RegExp(H.source,te)}function L(H){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(H.source)}function A(H,U,j){U=R(U,"g");for(var te=j.line,X=j.ch,ue=H.lastLine();te<=ue;te++,X=0){U.lastIndex=X;var ie=H.getLine(te),ge=U.exec(ie);if(ge)return{from:Q(te,ge.index),to:Q(te,ge.index+ge[0].length),match:ge}}}function N(H,U,j){if(!L(U))return A(H,U,j);U=R(U,"gm");for(var te,X=1,ue=j.line,ie=H.lastLine();ue<=ie;){for(var ge=0;ge<X&&!(ue>ie);ge++){var Te=H.getLine(ue++);te=te==null?Te:te+`
|
||
|
`+Te}X=X*2,U.lastIndex=j.ch;var Z=U.exec(te);if(Z){var Ae=te.slice(0,Z.index).split(`
|
||
|
`),J=Z[0].split(`
|
||
|
`),Re=j.line+Ae.length-1,_=Ae[Ae.length-1].length;return{from:Q(Re,_),to:Q(Re+J.length-1,J.length==1?_+J[0].length:J[J.length-1].length),match:Z}}}}function Y(H,U,j){for(var te,X=0;X<=H.length;){U.lastIndex=X;var ue=U.exec(H);if(!ue)break;var ie=ue.index+ue[0].length;if(ie>H.length-j)break;(!te||ie>te.index+te[0].length)&&(te=ue),X=ue.index+1}return te}function V(H,U,j){U=R(U,"g");for(var te=j.line,X=j.ch,ue=H.firstLine();te>=ue;te--,X=-1){var ie=H.getLine(te),ge=Y(ie,U,X<0?0:ie.length-X);if(ge)return{from:Q(te,ge.index),to:Q(te,ge.index+ge[0].length),match:ge}}}function G(H,U,j){if(!L(U))return V(H,U,j);U=R(U,"gm");for(var te,X=1,ue=H.getLine(j.line).length-j.ch,ie=j.line,ge=H.firstLine();ie>=ge;){for(var Te=0;Te<X&&ie>=ge;Te++){var Z=H.getLine(ie--);te=te==null?Z:Z+`
|
||
|
`+te}X*=2;var Ae=Y(te,U,ue);if(Ae){var J=te.slice(0,Ae.index).split(`
|
||
|
`),Re=Ae[0].split(`
|
||
|
`),_=ie+J.length,le=J[J.length-1].length;return{from:Q(_,le),to:Q(_+Re.length-1,Re.length==1?le+Re[0].length:Re[Re.length-1].length),match:Ae}}}}var P,oe;String.prototype.normalize?(P=function(H){return H.normalize("NFD").toLowerCase()},oe=function(H){return H.normalize("NFD")}):(P=function(H){return H.toLowerCase()},oe=function(H){return H});function pe(H,U,j,te){if(H.length==U.length)return j;for(var X=0,ue=j+Math.max(0,H.length-U.length);;){if(X==ue)return X;var ie=X+ue>>1,ge=te(H.slice(0,ie)).length;if(ge==j)return ie;ge>j?ue=ie:X=ie+1}}function Ee(H,U,j,te){if(!U.length)return null;var X=te?P:oe,ue=X(U).split(/\r|\n\r?/);e:for(var ie=j.line,ge=j.ch,Te=H.lastLine()+1-ue.length;ie<=Te;ie++,ge=0){var Z=H.getLine(ie).slice(ge),Ae=X(Z);if(ue.length==1){var J=Ae.indexOf(ue[0]);if(J==-1)continue e;var j=pe(Z,Ae,J,X)+ge;return{from:Q(ie,pe(Z,Ae,J,X)+ge),to:Q(ie,pe(Z,Ae,J+ue[0].length,X)+ge)}}else{var Re=Ae.length-ue[0].length;if(Ae.slice(Re)!=ue[0])continue e;for(var _=1;_<ue.length-1;_++)if(X(H.getLine(ie+_))!=ue[_])continue e;var le=H.getLine(ie+ue.length-1),$=X(le),Ce=ue[ue.length-1];if($.slice(0,Ce.length)!=Ce)continue e;return{from:Q(ie,pe(Z,Ae,Re,X)+ge),to:Q(ie+ue.length-1,pe(le,$,Ce.length,X))}}}}function me(H,U,j,te){if(!U.length)return null;var X=te?P:oe,ue=X(U).split(/\r|\n\r?/);e:for(var ie=j.line,ge=j.ch,Te=H.firstLine()-1+ue.length;ie>=Te;ie--,ge=-1){var Z=H.getLine(ie);ge>-1&&(Z=Z.slice(0,ge));var Ae=X(Z);if(ue.length==1){var J=Ae.lastIndexOf(ue[0]);if(J==-1)continue e;return{from:Q(ie,pe(Z,Ae,J,X)),to:Q(ie,pe(Z,Ae,J+ue[0].length,X))}}else{var Re=ue[ue.length-1];if(Ae.slice(0,Re.length)!=Re)continue e;for(var _=1,j=ie-ue.length+1;_<ue.length-1;_++)if(X(H.getLine(j+_))!=ue[_])continue e;var le=H.getLine(ie+1-ue.length),$=X(le);if($.slice($.length-ue[0].length)!=ue[0])continue e;return{from:Q(ie+1-ue.length,pe(le,$,le.length-ue[0].length,X)),to:Q(ie,pe(Z,Ae,Re.length,X))}}}}function be(H,U,j,te){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=H,j=j?H.clipPos(j):Q(0,0),this.pos={from:j,to:j};var X;typeof te=="object"?X=te.caseFold:(X=te,te=null),typeof U=="string"?(X==null&&(X=!1),this.matches=function(ue,ie){return(ue?me:Ee)(H,U,ie,X)}):(U=R(U,"gm"),!te||te.multiline!==!1?this.matches=function(ue,ie){return(ue?G:N)(H,U,ie)}:this.matches=function(ue,ie){return(ue?V:A)(H,U,ie)})}be.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(H){var U=this.doc.clipPos(H?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(U=Q(U.line,U.ch),H?(U.ch--,U.ch<0&&(U.line--,U.ch=(this.doc.getLine(U.line)||"").length)):(U.ch++,U.ch>(this.doc.getLine(U.line)||"").length&&(U.ch=0,U.line++)),W.cmpPos(U,this.doc.clipPos(U))!=0))return this.atOccurrence=!1;var j=this.matches(H,U);if(this.afterEmptyMatch=j&&W.cmpPos(j.from,j.to)==0,j)return this.pos=j,this.atOccurrence=!0,this.pos.match||!0;var te=Q(H?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:te,to:te},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(H,U){if(this.atOccurrence){var j=W.splitLines(H);this.doc.replaceRange(j,this.pos.from,this.pos.to,U),this.pos.to=Q(this.pos.from.line+j.length-1,j[j.length-1].length+(j.length==1?this.pos.from.ch:0))}}},W.defineExtension("getSearchCursor",function(H,U,j){return new be(this.doc,H,U,j)}),W.defineDocExtension("getSearchCursor",function(H,U,j){return new be(this,H,U,j)}),W.defineExtension("selectMatches",function(H,U){for(var j=[],te=this.getSearchCursor(H,this.getCursor("from"),U);te.findNext()&&!(W.cmpPos(te.to(),this.getCursor("to"))>0);)j.push({anchor:te.from(),head:te.to()});j.length&&this.setSelections(j,0)})})},"./node_modules/codemirror/addon/selection/mark-selection.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("styleSelectedText",!1,function(P,oe,pe){var Ee=pe&&pe!=W.Init;oe&&!Ee?(P.state.markedSelection=[],P.state.markedSelectionStyle=typ
|
||
|
|
||
|
b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var n=e.indexOf(`
|
||
|
`,t);n==-1&&(n=e.length);var a=e.slice(t,e.charAt(n-1)=="\r"?n-1:n),o=a.indexOf("\r");o!=-1?(i.push(a.slice(0,o)),t+=o+1):(i.push(a),t=n+1)}return i}:function(e){return e.split(/\r\n?|\n/)},Li=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},fn=function(){var e=J("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),yr=null;function cn(e){if(yr!=null)return yr;var t=Ae(e,J("span","x")),i=t.getBoundingClientRect(),r=_(t,0,1).getBoundingClientRect();return yr=Math.abs(i.left-r.left)>1}var ei={},rt={};function ur(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ei[e]=t}function qt(e,t){rt[e]=t}function Ht(e){if(typeof e=="string"&&rt.hasOwnProperty(e))e=rt[e];else if(e&&typeof e.name=="string"&&rt.hasOwnProperty(e.name)){var t=rt[e.name];typeof t=="string"&&(t={name:t}),e=Pe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ht("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ht("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Gt(e,t){t=Ht(t);var i=ei[t.name];if(!i)return Gt(e,"text/plain");var r=i(e,t);if(Ut.hasOwnProperty(t.name)){var n=Ut[t.name];for(var a in n)n.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=n[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var Ut={};function Ti(e,t){var i=Ut.hasOwnProperty(e)?Ut[e]:Ut[e]={};Le(t,i)}function tr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var n=t[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}function Ir(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function sa(e,t,i){return e.startState?e.startState(t,i):!0}var ut=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};ut.prototype.eol=function(){return this.pos>=this.string.length},ut.prototype.sol=function(){return this.pos==this.lineStart},ut.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ut.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ut.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},ut.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},ut.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ut.prototype.skipToEnd=function(){this.pos=this.string.length},ut.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ut.prototype.backUp=function(e){this.pos-=e},ut.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ge(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ge(this.string,this.lineStart,this.tabSize):0)},ut.prototype.indentation=function(){return Ge(this.string,null,this.tabSize)-(this.lineStart?Ge(this.string,this.lineStart,this.tabSize):0)},ut.prototype.match=function(e,t,i){if(typeof e=="string"){var r=function(o){return i?o.toLowerCase():o},n=this.string.substr(this.pos,e.length);if(r(n)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},ut.prototype.current=function(){return this.string.slice(this.start,this.pos)},ut.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ut.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ut.
|
||
|
`?(q=v.appendChild(J("span",M[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),q.setAttribute("cm-text",M[0]),e.col+=1):(q=e.cm.options.specialCharPlaceholder(M[0]),q.setAttribute("cm-text",M[0]),L&&A<9?v.appendChild(J("span",[q])):v.appendChild(q),e.col+=1);e.map.push(e.pos,e.pos+1,q),e.pos++}}if(e.trailingSpace=u.charCodeAt(t.length-1)==32,i||r||n||f||a||o){var de=i||"";r&&(de+=r),n&&(de+=n);var fe=J("span",[v],de,a);if(o)for(var ve in o)o.hasOwnProperty(ve)&&ve!="style"&&ve!="class"&&fe.setAttribute(ve,o[ve]);return e.content.appendChild(fe)}e.content.appendChild(v)}}function Ll(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,r="",n=0;n<e.length;n++){var a=e.charAt(n);a==" "&&i&&(n==e.length-1||e.charCodeAt(n+1)==32)&&(a="\xA0"),r+=a,i=a==" "}return r}function Tl(e,t){return function(i,r,n,a,o,u,s){n=n?n+" cm-force-border":"cm-force-border";for(var f=i.pos,v=f+r.length;;){for(var x=void 0,M=0;M<t.length&&(x=t[M],!(x.to>f&&x.from<=f));M++);if(x.to>=v)return e(i,r,n,a,o,u,s);e(i,r.slice(0,x.to-f),n,a,null,u,s),a=null,r=r.slice(x.to-f),f=x.to}}}function La(e,t,i,r){var n=!r&&i.widgetNode;n&&e.map.push(e.pos,e.pos+t,n),!r&&e.cm.display.input.needsContentAttribute&&(n||(n=e.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",i.id)),n&&(e.cm.display.input.setUneditable(n),e.content.appendChild(n)),e.pos+=t,e.trailingSpace=!1}function Bl(e,t,i){var r=e.markedSpans,n=e.text,a=0;if(!r){for(var o=1;o<i.length;o+=2)t.addToken(t,n.slice(a,a=i[o]),Aa(i[o+1],t.cm.options));return}for(var u=n.length,s=0,f=1,v="",x,M,E=0,z,q,ae,se,de;;){if(E==s){z=q=ae=M="",de=null,se=null,E=1/0;for(var fe=[],ve=void 0,Fe=0;Fe<r.length;++Fe){var Se=r[Fe],He=Se.marker;if(He.type=="bookmark"&&Se.from==s&&He.widgetNode)fe.push(He);else if(Se.from<=s&&(Se.to==null||Se.to>s||He.collapsed&&Se.to==s&&Se.from==s)){if(Se.to!=null&&Se.to!=s&&E>Se.to&&(E=Se.to,q=""),He.className&&(z+=" "+He.className),He.css&&(M=(M?M+";":"")+He.css),He.startStyle&&Se.from==s&&(ae+=" "+He.startStyle),He.endStyle&&Se.to==E&&(ve||(ve=[])).push(He.endStyle,Se.to),He.title&&((de||(de={})).title=He.title),He.attributes)for(var Ze in He.attributes)(de||(de={}))[Ze]=He.attributes[Ze];He.collapsed&&(!se||yn(se.marker,He)<0)&&(se=Se)}else Se.from>s&&E>Se.from&&(E=Se.from)}if(ve)for(var vt=0;vt<ve.length;vt+=2)ve[vt+1]==E&&(q+=" "+ve[vt]);if(!se||se.from==s)for(var tt=0;tt<fe.length;++tt)La(t,0,fe[tt]);if(se&&(se.from||0)==s){if(La(t,(se.to==null?u+1:se.to)-s,se.marker,se.from==null),se.to==null)return;se.to==s&&(se=!1)}}if(s>=u)break;for(var Rt=Math.min(u,E);;){if(v){var Tt=s+v.length;if(!se){var st=Tt>Rt?v.slice(0,Rt-s):v;t.addToken(t,st,x?x+z:z,ae,s+st.length==E?q:"",M,de)}if(Tt>=Rt){v=v.slice(Rt-s),s=Rt;break}s=Tt,ae=""}v=n.slice(a,a=i[f++]),x=Aa(i[f++],t.cm.options)}}}function Ta(e,t,i){this.line=t,this.rest=Cl(t),this.size=this.rest?Xe(Oe(this.rest))-i+1:1,this.node=this.text=null,this.hidden=sr(e,t)}function zi(e,t,i){for(var r=[],n,a=t;a<i;a=n){var o=new Ta(e.doc,we(e.doc,a),a);n=a+o.size,r.push(o)}return r}var Hr=null;function Ml(e){Hr?Hr.ops.push(e):e.ownsGroup=Hr={ops:[e],delayedCallbacks:[]}}function Nl(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var r=0;r<e.ops.length;r++){var n=e.ops[r];if(n.cursorActivityHandlers)for(;n.cursorActivityCalled<n.cursorActivityHandlers.length;)n.cursorActivityHandlers[n.cursorActivityCalled++].call(null,n.cm)}}while(i<t.length)}function Il(e,t){var i=e.ownsGroup;if(i)try{Nl(i)}finally{Hr=null,t(i)}}var ni=null;function dt(e,t){var i=b(e,t);if(i.length){var r=Array.prototype.slice.call(arguments,2),n;Hr?n=Hr.delayedCallbacks:ni?n=ni:(n=ni=[],setTimeout(Ol,0));for(var a=function(u){n.push(function(){return i[u].apply(null,r)})},o=0;o<i.length;++o)a(o)}}function Ol(){var e=ni;ni=null;for(var t=0;t<e.length;++t)e[t]()}function Ba(e,t,i,r){for(var n=0;n<t.changes.length;n++){var a=t.changes[n];a=="text"?_l(e,t):a=="gutter"?Na(e,t,i,r):a=="class"?kn(e,t):a=="widget"&&Rl(e,t,r)}t.changes=null}function ai(e){return e.node==e.text&&(e.node=J("div",null,null,"position: relative"),e.text.pare
|
||
|
top: `+ve+"px; width: "+(Fe??s-fe)+`px;
|
||
|
height: `+(Se-ve)+"px"))}function x(fe,ve,Fe){var Se=we(n,fe),He=Se.text.length,Ze,vt;function tt(st,Bt){return Ui(e,re(fe,st),"div",Se,Bt)}function Rt(st,Bt,Dt){var ht=Ya(e,Se,null,st),ft=Bt=="ltr"==(Dt=="after")?"left":"right",it=Dt=="after"?ht.begin:ht.end-(/\s/.test(Se.text.charAt(ht.end-1))?2:1);return tt(it,ft)[ft]}var Tt=y(Se,n.direction);return D(Tt,ve||0,Fe??He,function(st,Bt,Dt,ht){var ft=Dt=="ltr",it=tt(st,ft?"left":"right"),Mt=tt(Bt-1,ft?"right":"left"),$r=ve==null&&st==0,mr=Fe==null&&Bt==He,Ct=ht==0,er=!Tt||ht==Tt.length-1;if(Mt.top-it.top<=3){var mt=(f?$r:mr)&&Ct,la=(f?mr:$r)&&er,lr=mt?u:(ft?it:Mt).left,Tr=la?s:(ft?Mt:it).right;v(lr,it.top,Tr-lr,it.bottom)}else{var Br,Ft,Vr,ua;ft?(Br=f&&$r&&Ct?u:it.left,Ft=f?s:Rt(st,Dt,"before"),Vr=f?u:Rt(Bt,Dt,"after"),ua=f&&mr&&er?s:Mt.right):(Br=f?Rt(st,Dt,"before"):u,Ft=!f&&$r&&Ct?s:it.right,Vr=!f&&mr&&er?u:Mt.left,ua=f?Rt(Bt,Dt,"after"):s),v(Br,it.top,Ft-Br,it.bottom),it.bottom<Mt.top&&v(u,it.bottom,null,Mt.top),v(Vr,Mt.top,ua-Vr,Mt.bottom)}(!Ze||qi(it,Ze)<0)&&(Ze=it),qi(Mt,Ze)<0&&(Ze=Mt),(!vt||qi(it,vt)<0)&&(vt=it),qi(Mt,vt)<0&&(vt=Mt)}),{start:Ze,end:vt}}var M=t.from(),E=t.to();if(M.line==E.line)x(M.line,M.ch,E.ch);else{var z=we(n,M.line),q=we(n,E.line),ae=Kt(z)==Kt(q),se=x(M.line,M.ch,ae?z.text.length+1:null).end,de=x(E.line,ae?0:null,E.ch).start;ae&&(se.top<de.top-2?(v(se.right,se.top,null,se.bottom),v(u,de.top,de.left,de.bottom)):v(se.right,se.top,de.left-se.right,se.bottom)),se.bottom<de.top&&v(u,se.bottom,null,de.top)}i.appendChild(a)}function On(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Pr(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function $a(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||_n(e))}function Hn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Pr(e))},100)}function _n(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(C(e,"focus",e,t),e.state.focused=!0,Ce(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),N&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),On(e))}function Pr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(C(e,"blur",e,t),e.state.focused=!1,Te(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Gi(e){for(var t=e.display,i=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),n=t.lineDiv.getBoundingClientRect().top,a=0,o=0;o<t.view.length;o++){var u=t.view[o],s=e.options.lineWrapping,f=void 0,v=0;if(!u.hidden){if(n+=u.line.height,L&&A<8){var x=u.node.offsetTop+u.node.offsetHeight;f=x-i,i=x}else{var M=u.node.getBoundingClientRect();f=M.bottom-M.top,!s&&u.text.firstChild&&(v=u.text.firstChild.getBoundingClientRect().right-M.left-1)}var E=u.line.height-f;if((E>.005||E<-.005)&&(n<r&&(a-=E),Qt(u.line,f),Va(u.line),u.rest))for(var z=0;z<u.rest.length;z++)Va(u.rest[z]);if(v>e.display.sizerWidth){var q=Math.ceil(v/zr(e.display));q>e.display.maxLineLength&&(e.display.maxLineLength=q,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Va(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],r=i.node.parentNode;r&&(i.height=r.offsetHeight)}}function Ki(e,t,i){var r=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;r=Math.floor(r-Pi(e));var n=i&&i.bottom!=null?i.bottom:r+e.wrapper.clientHeight,a=br(t,r),o=br(t,n);if(i&&i.ensure){var u=i.ensure.from.line,s=i.ensure.to.line;u<a?(a=u,o=br(t,ir(we(t,u))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=o&&(a=br(t,ir(we(t,s))-e.wrapper.clientHeight),o=s)}ret
|
||
|
top: `+(t.top-i.viewOffset-Pi(e.display))+`px;
|
||
|
height: `+(t.bottom-t.top+$t(e)+i.barHeight)+`px;
|
||
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(n),e.display.lineSpace.removeChild(o)}}}function $l(e,t,i,r){r==null&&(r=0);var n;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?re(t.line,t.ch+1,"before"):t,t=t.ch?re(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var o=!1,u=Xt(e,t),s=!i||i==t?u:Xt(e,i);n={left:Math.min(u.left,s.left),top:Math.min(u.top,s.top)-r,right:Math.max(u.left,s.left),bottom:Math.max(u.bottom,s.bottom)+r};var f=Rn(e,n),v=e.doc.scrollTop,x=e.doc.scrollLeft;if(f.scrollTop!=null&&(fi(e,f.scrollTop),Math.abs(e.doc.scrollTop-v)>1&&(o=!0)),f.scrollLeft!=null&&(Fr(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-x)>1&&(o=!0)),!o)break}return n}function Vl(e,t){var i=Rn(e,t);i.scrollTop!=null&&fi(e,i.scrollTop),i.scrollLeft!=null&&Fr(e,i.scrollLeft)}function Rn(e,t){var i=e.display,r=Rr(e.display);t.top<0&&(t.top=0);var n=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,a=Sn(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var u=e.doc.height+wn(i),s=t.top<r,f=t.bottom>u-r;if(t.top<n)o.scrollTop=s?0:t.top;else if(t.bottom>n+a){var v=Math.min(t.top,(f?u:t.bottom)-a);v!=n&&(o.scrollTop=v)}var x=e.options.fixedGutter?0:i.gutters.offsetWidth,M=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-x,E=Cr(e)-i.gutters.offsetWidth,z=t.right-t.left>E;return z&&(t.right=t.left+E),t.left<10?o.scrollLeft=0:t.left<M?o.scrollLeft=Math.max(0,t.left+x-(z?0:10)):t.right>E+M-3&&(o.scrollLeft=t.right+(z?0:10)-E),o}function zn(e,t){t!=null&&(Xi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Wr(e){Xi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,i){(t!=null||i!=null)&&Xi(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function eu(e,t){Xi(e),e.curOp.scrollToPos=t}function Xi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=Ka(e,t.from),r=Ka(e,t.to);eo(e,i,r,t.margin)}}function eo(e,t,i,r){var n=Rn(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-r,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+r});si(e,n.scrollLeft,n.scrollTop)}function fi(e,t){Math.abs(e.doc.scrollTop-t)<2||(W||Wn(e,{top:t}),to(e,t,!0),W&&Wn(e),di(e,100))}function to(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Fr(e,t,i,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,oo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function ci(e){var t=e.display,i=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:r,scrollHeight:r+$t(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Ar=function(e,t,i){this.cm=i;var r=this.vert=J("div",[J("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=J("div",[J("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=n.tabIndex=-1,e(r),e(n),S(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),S(n,"scroll",function(){n.clientWidth&&t(n.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,L&&A<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ar.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var n=e.viewHeight-(t?r:0);this.vert.firstChild.style.h
|
||
|
`},setDirection:gt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&vu(this.cm))})}),Lt.prototype.eachLine=Lt.prototype.iter;var Ro=0;function Lu(e){var t=this;if(zo(t),!(ee(t,e)||nr(t.display,e))){ce(e),L&&(Ro=+new Date);var i=wr(t,e,!0),r=e.dataTransfer.files;if(!(!i||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var n=r.length,a=Array(n),o=0,u=function(){++o==n&&pt(t,function(){i=Ne(t.doc,i);var E={from:i,to:i,text:t.doc.splitLines(a.filter(function(z){return z!=null}).join(t.doc.lineSeparator())),origin:"paste"};Gr(t.doc,E),ko(t.doc,hr(Ne(t.doc,i),Ne(t.doc,dr(E))))})()},s=function(E,z){if(t.options.allowDropFileTypes&&je(t.options.allowDropFileTypes,E.type)==-1){u();return}var q=new FileReader;q.onerror=function(){return u()},q.onload=function(){var ae=q.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ae)){u();return}a[z]=ae,u()},q.readAsText(E)},f=0;f<r.length;f++)s(r[f],f);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var v=e.dataTransfer.getData("Text");if(v){var x;if(t.state.draggingText&&!t.state.draggingText.copy&&(x=t.listSelections()),Vi(t.doc,hr(i,i)),x)for(var M=0;M<x.length;++M)Kr(t.doc,"",x[M].anchor,x[M].head,"drag");t.replaceSelection(v,"around","paste"),t.display.input.focus()}}catch{}}}}function Tu(e,t){if(L&&(!e.state.draggingText||+new Date-Ro<100)){Be(t);return}if(!(ee(e,t)||nr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!oe)){var i=J("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",P&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),P&&i.parentNode.removeChild(i)}}function Bu(e,t){var i=wr(e,t);if(i){var r=document.createDocumentFragment();In(e,i,r),e.display.dragCursor||(e.display.dragCursor=J("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Ae(e.display.dragCursor,r)}}function zo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Po(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),i=[],r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&i.push(n)}i.length&&i[0].operation(function(){for(var a=0;a<i.length;a++)e(i[a])})}}var Wo=!1;function Mu(){Wo||(Nu(),Wo=!0)}function Nu(){var e;S(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Po(Iu)},100))}),S(window,"blur",function(){return Po(Pr)})}function Iu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var vr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ci=0;Ci<10;Ci++)vr[Ci+48]=vr[Ci+96]=String(Ci);for(var rn=65;rn<=90;rn++)vr[rn]=String.fromCharCode(rn);for(var ki=1;ki<=12;ki++)vr[ki+111]=vr[ki+63235]="F"+ki;var or={};or.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},or.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z"
|
||
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Go(e,t){var i=we(e.doc,t),r=Kt(i);return r!=i&&(t=Xe(r)),Vn(!0,e,r,t,1)}function Ru(e,t){var i=we(e.doc,t),r=bl(i);return r!=i&&(t=Xe(r)),Vn(!0,e,i,t,-1)}function Ko(e,t){var i=Go(e,t.line),r=we(e.doc,i.line),n=y(r,e.doc.direction);if(!n||n[0].level==0){var a=Math.max(i.ch,r.text.search(/\S/)),o=t.line==i.line&&t.ch<=a&&t.ch;return re(i.line,o?0:a,i.sticky)}return i}function an(e,t,i){if(typeof t=="string"&&(t=wi[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),n=t(e)!=lt}finally{e.display.shift=r,e.state.suppressEdits=!1}return n}function zu(e,t,i){for(var r=0;r<e.state.keyMaps.length;r++){var n=Yr(t,e.state.keyMaps[r],i,e);if(n)return n}return e.options.extraKeys&&Yr(t,e.options.extraKeys,i,e)||Yr(t,e.options.keyMap,i,e)}var Pu=new Qe;function Si(e,t,i,r){var n=e.state.keySeq;if(n){if(Uo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Pu.set(50,function(){e.state.keySeq==n&&(e.state.keySeq=null,e.display.input.reset())}),Xo(e,n+" "+t,i,r))return!0}return Xo(e,t,i,r)}function Xo(e,t,i,r){var n=zu(e,t,r);return n=="multi"&&(e.state.keySeq=t),n=="handled"&&dt(e,"keyHandled",e,t,i),(n=="handled"||n=="multi")&&(ce(i),On(e)),!!n}function Yo(e,t){var i=qo(t,!0);return i?t.shiftKey&&!e.state.keySeq?Si(e,"Shift-"+i,t,function(r){return an(e,r,!0)})||Si(e,i,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return an(e,r)}):Si(e,i,t,function(r){return an(e,r)}):!1}function Wu(e,t,i){return Si(e,"'"+i+"'",t,function(r){return an(e,r,!0)})}var ea=null;function Zo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=$(k(t)),!ee(t,e))){L&&A<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var r=Yo(t,e);P&&(ea=r?i:null,!r&&i==88&&!fn&&(U?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),W&&!U&&!r&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Uu(t)}}function Uu(e){var t=e.display.lineDiv;Ce(t,"CodeMirror-crosshair");function i(r){(r.keyCode==18||!r.altKey)&&(Te(t,"CodeMirror-crosshair"),w(document,"keyup",i),w(document,"mouseover",i))}S(document,"keyup",i),S(document,"mouseover",i)}function Qo(e){e.keyCode==16&&(this.doc.sel.shift=!1),ee(this,e)}function Jo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(nr(t.display,e)||ee(t,e)||e.ctrlKey&&!e.altKey||U&&e.metaKey)){var i=e.keyCode,r=e.charCode;if(P&&i==ea){ea=null,ce(e);return}if(!(P&&(!e.which||e.which<10)&&Yo(t,e))){var n=String.fromCharCode(r??i);n!="\b"&&(Wu(t,e,n)||t.display.input.onKeyPress(e))}}}var ju=400,ta=function(e,t,i){this.time=e,this.pos=t,this.button=i};ta.prototype.compare=function(e,t,i){return this.time+ju>e&&Me(t,this.pos)==0&&i==this.button};var Fi,Ai;function qu(e,t){var i=+new Date;return Ai&&Ai.compare(i,e,t)?(Fi=Ai=null,"triple"):Fi&&Fi.compare(i,e,t)?(Ai=new ta(i,e,t),Fi=null,"double"):(Fi=new ta(i,e,t),Ai=null,"single")}function $o(e){var t=this,i=t.display;if(!(ee(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,nr(i,e)){N||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!ra(t,e)){var r=wr(t,e),n=$e(e),a=r?qu(r,n):"single";K(t).focus(),n==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Gu(t,n,r,a,e))&&(n==1?r?Xu(t,r,a,e):ze(e)==i.scroller&&ce(e):n==2?(r&&$i(t.doc,r),setTimeout(function(){return i.input.focus()},20)):n==3&&(ie?t.display.input.onContextMenu(e):Hn(t)))}}}function Gu(e,t,i,r,n){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Si(e,jo(a,n),n,function(o){if(typeof o=="string"&&(o=wi[o]),!o)return!1;var u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),u=o(e,i)!=lt}finally{e.state.suppressEdits=!1}return u})}function Ku(e,t,i){var r=e.getOption("configureMouse"),n=r?r(e,t,i):{};if(n.unit==nul
|
||
|
`)==t){if(r.ranges.length%Zt.text.length==0){f=[];for(var v=0;v<Zt.text.length;v++)f.push(a.splitLines(Zt.text[v]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(f=It(s,function(se){return[se]}));for(var x=e.curOp.updateInput,M=r.ranges.length-1;M>=0;M--){var E=r.ranges[M],z=E.from(),q=E.to();E.empty()&&(i&&i>0?z=re(z.line,z.ch-i):e.state.overwrite&&!u?q=re(q.line,Math.min(we(a,q.line).text.length,q.ch+Oe(s).length)):u&&Zt&&Zt.lineWise&&Zt.text.join(`
|
||
|
`)==s.join(`
|
||
|
`)&&(z=q=re(z.line,0)));var ae={from:z,to:q,text:f?f[M%f.length]:s,origin:n||(u?"paste":e.state.cutIncoming>o?"cut":"+input")};Gr(e.doc,ae),dt(e,"inputRead",e,ae)}t&&!u&&al(e,t),Wr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=x),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function nl(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&_t(t,function(){return na(t,i,0,null,"paste")}),!0}function al(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,r=i.ranges.length-1;r>=0;r--){var n=i.ranges[r];if(!(n.head.ch>100||r&&i.ranges[r-1].head.line==n.head.line)){var a=e.getModeAt(n.head),o=!1;if(a.electricChars){for(var u=0;u<a.electricChars.length;u++)if(t.indexOf(a.electricChars.charAt(u))>-1){o=Ei(e,n.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(we(e.doc,n.head.line).text.slice(0,n.head.ch))&&(o=Ei(e,n.head.line,"smart"));o&&dt(e,"electricInput",e,n.head.line)}}}function ol(e){for(var t=[],i=[],r=0;r<e.doc.sel.ranges.length;r++){var n=e.doc.sel.ranges[r].head.line,a={anchor:re(n,0),head:re(n+1,0)};i.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:i}}function aa(e,t,i,r){e.setAttribute("autocorrect",i?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function ll(){var e=J("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=J("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return N?e.style.width="1000px":e.setAttribute("wrap","off"),me&&(e.style.border="1px solid black"),t}function rs(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){K(this).focus(),this.display.input.focus()},setOption:function(r,n){var a=this.options,o=a[r];a[r]==n&&r!="mode"||(a[r]=n,t.hasOwnProperty(r)&&pt(this,t[r])(this,n,o),C(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,n){this.state.keyMaps[n?"push":"unshift"](nn(r))},removeKeyMap:function(r){for(var n=this.state.keyMaps,a=0;a<n.length;++a)if(n[a]==r||n[a].name==r)return n.splice(a,1),!0},addOverlay:St(function(r,n){var a=r.token?r:e.getMode(this.options,r);if(a.startState)throw new Error("Overlays may not be stateful.");xt(this.state.overlays,{mode:a,modeSpec:r,opaque:n&&n.opaque,priority:n&&n.priority||0},function(o){return o.priority}),this.state.modeGen++,Et(this)}),removeOverlay:St(function(r){for(var n=this.state.overlays,a=0;a<n.length;++a){var o=n[a].modeSpec;if(o==r||typeof r=="string"&&o.name==r){n.splice(a,1),this.state.modeGen++,Et(this);return}}}),indentLine:St(function(r,n,a){typeof n!="string"&&typeof n!="number"&&(n==null?n=this.options.smartIndent?"smart":"prev":n=n?"add":"subtract"),ti(this.doc,r)&&Ei(this,r,n,a)}),indentSelection:St(function(r){for(var n=this.doc.sel.ranges,a=-1,o=0;o<n.length;o++){var u=n[o];if(u.empty())u.head.line>a&&(Ei(this,u.head.line,r,!0),a=u.head.line,o==this.doc.sel.primIndex&&Wr(this));else{var s=u.from(),f=u.to(),v=Math.max(a,s.line);a=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var x=v;x<a;++x)Ei(this,x,r);var M=this.doc.sel.ranges;s.ch==0&&n.length==M.length&&M[o].from().ch>0&&Qn(this.doc,o,new Ke(s,M[o].to()),Ie)}}}),getTokenAt:function(r,n){return va(this,r,n)},getLineTokens:function(r,n){return va(this,re(r),n,!0)},getTokenTypeAt:function(r){r=Ne(this.doc,r);var n=da(this,we(this.doc,r.line)),a=0,o=(n.length-1)/2,u=r.ch,s;if(u==0)s=n[2];else for(;;){var f=a+o>>1;if((f?n[f*2-1]:0)>=u)o=f;else if(n[f*2+1]<u)a=f+1;else{s=n[f*2+2];break}}var v=s?s.indexOf("overlay "):-1;return v<0?s:v==0?null:s.slice(0,v-1)},getModeAt:function(r){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(r).state).mode:n},getHelper:function(r,n){return this.getHelpers(r,n)[0]},getHelpers:function(r,n){var a=[];if(!i.hasOwnProperty(n))return a;var o=i[n],u=this.getModeAt(r);if(typeof u[n]=="string")o[u[n]]&
|
||
|
`,ae=I(q,E)?"w":M&&q==`
|
||
|
`?"n":!M||/\s/.test(q)?null:"p";if(M&&!z&&!ae&&(ae="s"),x&&x!=ae){i<0&&(i=1,v(),t.sticky="after");break}if(ae&&(x=ae),i>0&&!v(!z))break}var se=en(e,t,a,o,!0);return pn(a,se)&&(se.hitSide=!0),se}function ul(e,t,i,r){var n=e.doc,a=t.left,o;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,K(e).innerHeight||n(e).documentElement.clientHeight),s=Math.max(u-.5*Rr(e.display),3);o=(i>0?t.bottom:t.top)+i*s}else r=="line"&&(o=i>0?t.bottom+3:t.top-3);for(var f;f=Ln(e,a,o),!!f.outside;){if(i<0?o<=0:o>=n.height){f.hitSide=!0;break}o+=i*5}return f}var Ye=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Qe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ye.prototype.init=function(e){var t=this,i=this,r=i.cm,n=i.div=e.lineDiv;n.contentEditable=!0,aa(n,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(u){for(var s=u.target;s;s=s.parentNode){if(s==n)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}S(n,"paste",function(u){!a(u)||ee(r,u)||nl(u,r)||A<=11&&setTimeout(pt(r,function(){return t.updateFromDOM()}),20)}),S(n,"compositionstart",function(u){t.composing={data:u.data,done:!1}}),S(n,"compositionupdate",function(u){t.composing||(t.composing={data:u.data,done:!1})}),S(n,"compositionend",function(u){t.composing&&(u.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),S(n,"touchstart",function(){return i.forceCompositionEnd()}),S(n,"input",function(){t.composing||t.readFromDOMSoon()});function o(u){if(!(!a(u)||ee(r,u))){if(r.somethingSelected())ln({lineWise:!1,text:r.getSelections()}),u.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ol(r);ln({lineWise:!0,text:s.text}),u.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ie),r.replaceSelection("",null,"cut")})}else return;if(u.clipboardData){u.clipboardData.clearData();var f=Zt.text.join(`
|
||
|
`);if(u.clipboardData.setData("Text",f),u.clipboardData.getData("Text")==f){u.preventDefault();return}}var v=ll(),x=v.firstChild;aa(x),r.display.lineSpace.insertBefore(v,r.display.lineSpace.firstChild),x.value=Zt.text.join(`
|
||
|
`);var M=$(h(n));at(x),setTimeout(function(){r.display.lineSpace.removeChild(v),M.focus(),M==n&&i.showPrimarySelection()},50)}}S(n,"copy",o),S(n,"cut",o)},Ye.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ye.prototype.prepareSelection=function(){var e=Ja(this.cm,!1);return e.focus=$(h(this.div))==this.div,e},Ye.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ye.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ye.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),n=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||n.line<t.display.viewFrom){e.removeAllRanges();return}var a=un(t,e.anchorNode,e.anchorOffset),o=un(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&o&&!o.bad&&Me(Mi(a,o),r)==0&&Me(Bi(a,o),n)==0)){var u=t.display.view,s=r.line>=t.display.viewFrom&&sl(t,r)||{node:u[0].measure.map[2],offset:0},f=n.line<t.display.viewTo&&sl(t,n);if(!f){var v=u[u.length-1].measure,x=v.maps?v.maps[v.maps.length-1]:v.map;f={node:x[x.length-1],offset:x[x.length-2]-x[x.length-3]}}if(!s||!f){e.removeAllRanges();return}var M=e.rangeCount&&e.getRangeAt(0),E;try{E=_(s.node,s.offset,f.offset,f.node)}catch{}E&&(!W&&t.state.focused?(e.collapse(s.node,s.offset),E.collapsed||(e.removeAllRanges(),e.addRange(E))):(e.removeAllRanges(),e.addRange(E)),M&&e.anchorNode==null?e.addRange(M):W&&this.startGracePeriod()),this.rememberSelection()}},Ye.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ye.prototype.showMultipleSelections=function(e){Ae(this.cm.display.cursorDiv,e.cursors),Ae(this.cm.display.selectionDiv,e.selection)},Ye.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ye.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return le(this.div,t)},Ye.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||$(h(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ye.prototype.blur=function(){this.div.blur()},Ye.prototype.getField=function(){return this.div},Ye.prototype.supportsTouch=function(){return!0},Ye.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):_t(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function i(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,i))}this.polling.set(this.cm.options.pollInterval,i)},Ye.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ye.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(be&&V&&this.cm.display.gutterSpecs.length&&is(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=un(t,e.anchorNode,e.anchorOffset),r=un(t,e.focusNode,e.focusOffset);i&&r&&_t(t,function(){bt(t.doc,hr(i,r),Ie),(i.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Ye.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),r=i.from(),n=i.to();if(r.ch==0&&r.line>e.firstLine()&&(r=re(r.line-1,we(e.doc,r.line-1).length)),n.ch==we(e.doc,n.line).
|
||
|
`),at(n))}else return;o.type=="cut"&&(r.state.cutIncoming=+new Date)}}S(n,"cut",a),S(n,"copy",a),S(e.scroller,"paste",function(o){if(!(nr(e,o)||ee(r,o))){if(!n.dispatchEvent){r.state.pasteIncoming=+new Date,i.focus();return}var u=new Event("paste");u.clipboardData=o.clipboardData,n.dispatchEvent(u)}}),S(e.lineSpace,"selectstart",function(o){nr(e,o)||ce(o)}),S(n,"compositionstart",function(){var o=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:o,range:r.markText(o,r.getCursor("to"),{className:"CodeMirror-composing"})}}),S(n,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},nt.prototype.createField=function(e){this.wrapper=ll(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;aa(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},nt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},nt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,r=Ja(e);if(e.options.moveInputWithCursor){var n=Xt(e,i.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,n.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,n.left+o.left-a.left))}return r},nt.prototype.showSelection=function(e){var t=this.cm,i=t.display;Ae(i.cursorDiv,e.cursors),Ae(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},nt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&at(this.textarea),L&&A>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",L&&A>=9&&(this.hasSelection=null));this.resetting=!1}},nt.prototype.getField=function(){return this.textarea},nt.prototype.supportsTouch=function(){return!1},nt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!H||$(h(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},nt.prototype.blur=function(){this.textarea.blur()},nt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},nt.prototype.receivedFocus=function(){this.slowPoll()},nt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},nt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},nt.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Li(i)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var n=i.value;if(n==r&&!t.somethingSelected())return!1;if(L&&A>=9&&this.hasSelection===n||U&&/[\uf700-\uf7ff]/.test(n))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=n.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,u=Math.min(r.length,n.length);o<u&&r.charCodeAt(o)==n.charCodeAt(o);)++o;return _t(t,function(){na(t,n.slice(o),r.length-o,null,e.composing?"*compose":null),n.length>1e3||n.indexOf(`
|
||
|
`)>-1?i.value=e.prevInput="":e.prevInput=n,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},nt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},nt.prototype.onKeyPress=function(){L&&A>=9&&(this.hasSelection=null),this.fastPoll()},nt.prototype.onContextMenu=function(e){var t=this,i=t.cm,r=i.display,n=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=wr(i,e),o=r.scroller.scrollTop;if(!a||P)return;var u=i.options.resetSelectionOnContextMenu;u&&i.doc.sel.contains(a)==-1&&pt(i,bt)(i.doc,hr(a),Ie);var s=n.style.cssText,f=t.wrapper.style.cssText,v=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",n.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||
|
top: `+(e.clientY-v.top-5)+"px; left: "+(e.clientX-v.left-5)+`px;
|
||
|
z-index: 1000; background: `+(L?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var x;N&&(x=n.ownerDocument.defaultView.scrollY),r.input.focus(),N&&n.ownerDocument.defaultView.scrollTo(null,x),r.input.reset(),i.somethingSelected()||(n.value=t.prevInput=" "),t.contextMenuPending=E,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll);function M(){if(n.selectionStart!=null){var q=i.somethingSelected(),ae="\u200B"+(q?n.value:"");n.value="\u21DA",n.value=ae,t.prevInput=q?"":"\u200B",n.selectionStart=1,n.selectionEnd=ae.length,r.selForContextMenu=i.doc.sel}}function E(){if(t.contextMenuPending==E&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,n.style.cssText=s,L&&A<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=o),n.selectionStart!=null)){(!L||L&&A<9)&&M();var q=0,ae=function(){r.selForContextMenu==i.doc.sel&&n.selectionStart==0&&n.selectionEnd>0&&t.prevInput=="\u200B"?pt(i,Eo)(i):q++<10?r.detectingSelectAll=setTimeout(ae,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(ae,200)}}if(L&&A>=9&&M(),ie){Be(e);var z=function(){w(window,"mouseup",z),setTimeout(E,20)};S(window,"mouseup",z)}else setTimeout(E,50)},nt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},nt.prototype.setUneditable=function(){},nt.prototype.needsContentAttribute=!1;function os(e,t){if(t=t?Le(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=$(h(e));t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function r(){e.value=u.getValue()}var n;if(e.form&&(S(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;n=a.submit;try{var o=a.submit=function(){r(),a.submit=n,a.submit(),a.submit=o}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(w(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=n))}},e.style.display="none";var u=et(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return u}function ls(e){e.off=w,e.on=S,e.wheelEventPixels=pu,e.Doc=Lt,e.splitLines=Nr,e.countColumn=Ge,e.findColumn=jt,e.isWordChar=xr,e.Pass=lt,e.signal=C,e.Line=Or,e.changeEnd=dr,e.scrollbarModel=io,e.Pos=re,e.cmpPos=Me,e.modes=ei,e.mimeModes=rt,e.resolveMode=Ht,e.getMode=Gt,e.modeExtensions=Ut,e.extendMode=Ti,e.copyState=tr,e.startState=sa,e.innerMode=Ir,e.commands=wi,e.keyMap=or,e.keyName=qo,e.isModifierKey=Uo,e.lookupKey=Yr,e.normalizeKeyMap=Hu,e.StringStream=ut,e.SharedTextMarker=bi,e.TextMarker=gr,e.LineWidget=Di,e.e_preventDefault=ce,e.e_stopPropagation=We,e.e_stop=Be,e.addClass=Ce,e.contains=le,e.rmClass=Te,e.keyNames=vr}$u(et),rs(et);var us="iter insert remove copy getEditor constructor".split(" ");for(var sn in Lt.prototype)Lt.prototype.hasOwnProperty(sn)&&je(us,sn)<0&&(et.prototype[sn]=function(e){return function(){return e.apply(this.doc,arguments)}}(Lt.prototype[sn]));return xe(Lt),et.inputStyles={textarea:nt,contenteditable:Ye},et.defineMode=function(e){!et.defaults.mode&&e!="null"&&(et.defaults.mode=e),ur.apply(this,arguments)},et.defineMIME=qt,et.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),et.defineMIME("text/plain","null"),et.defineExtension=function(e,t){et.prototype[e]=t},et.defineDocExtension=function(e,t){Lt.prototype[e]=t},et.fromTextArea=os,ls(et),et.version="5.65.16",et})},"./node_modules/codemirror/mode/gfm/gfm.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"),ye("./node_modules/codemirror/mode/markdown/markdown.js"),ye("./node_modules/codemirror/addon/mode/overlay.js"))})(function(W){"use strict";var Q=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsi
|
||
|
`,Ir=`
|
||
|
`+Ht;Ti&&Ut++,Ti&&qt.ch===0&&(Ir=Ht+`
|
||
|
`,Ut--),Ie(rt,!1,[tr,Ir]),rt.setSelection({line:Gt,ch:0},{line:Ut,ch:0})}var b=l.codemirror,w=b.getCursor("start"),C=b.getCursor("end"),ee=b.getTokenAt({line:w.line,ch:w.ch||1}),he=b.getLineHandle(w.line),ke=F(b,w.line,he,ee),xe,ce,We;if(ke==="single"){var Ue=he.text.slice(0,w.ch).replace("`",""),Be=he.text.slice(w.ch).replace("`","");b.replaceRange(Ue+Be,{line:w.line,ch:0},{line:w.line,ch:99999999999999}),w.ch--,w!==C&&C.ch--,b.setSelection(w,C),b.focus()}else if(ke==="fenced")if(w.line!==C.line||w.ch!==C.ch){for(xe=w.line;xe>=0&&(he=b.getLineHandle(xe),!m(he));xe--);var ze=b.getTokenAt({line:xe,ch:1}),$e=y(ze).fencedChars,Ve,At,yt,Wt;m(b.getLineHandle(w.line))?(Ve="",At=w.line):m(b.getLineHandle(w.line-1))?(Ve="",At=w.line-1):(Ve=$e+`
|
||
|
`,At=w.line),m(b.getLineHandle(C.line))?(yt="",Wt=C.line,C.ch===0&&(Wt+=1)):C.ch!==0&&m(b.getLineHandle(C.line+1))?(yt="",Wt=C.line+1):(yt=$e+`
|
||
|
`,Wt=C.line+1),C.ch===0&&(Wt-=1),b.operation(function(){b.replaceRange(yt,{line:Wt,ch:0},{line:Wt+(yt?0:1),ch:0}),b.replaceRange(Ve,{line:At,ch:0},{line:At+(Ve?0:1),ch:0})}),b.setSelection({line:At+(Ve?1:0),ch:0},{line:Wt+(Ve?1:-1),ch:0}),b.focus()}else{var Mr=w.line;if(m(b.getLineHandle(w.line))&&(F(b,w.line+1)==="fenced"?(xe=w.line,Mr=w.line+1):(ce=w.line,Mr=w.line-1)),xe===void 0)for(xe=Mr;xe>=0&&(he=b.getLineHandle(xe),!m(he));xe--);if(ce===void 0)for(We=b.lineCount(),ce=Mr;ce<We&&(he=b.getLineHandle(ce),!m(he));ce++);b.operation(function(){b.replaceRange("",{line:xe,ch:0},{line:xe+1,ch:0}),b.replaceRange("",{line:ce-1,ch:0},{line:ce,ch:0})}),b.focus()}else if(ke==="indented"){if(w.line!==C.line||w.ch!==C.ch)xe=w.line,ce=C.line,C.ch===0&&ce--;else{for(xe=w.line;xe>=0;xe--)if(he=b.getLineHandle(xe),!he.text.match(/^\s*$/)&&F(b,xe,he)!=="indented"){xe+=1;break}for(We=b.lineCount(),ce=w.line;ce<We;ce++)if(he=b.getLineHandle(ce),!he.text.match(/^\s*$/)&&F(b,ce,he)!=="indented"){ce-=1;break}}var Nr=b.getLineHandle(ce+1),Li=Nr&&b.getTokenAt({line:ce+1,ch:Nr.text.length-1}),fn=Li&&y(Li).indentedCode;fn&&b.replaceRange(`
|
||
|
`,{line:ce+1,ch:0});for(var yr=xe;yr<=ce;yr++)b.indentLine(yr,"subtract");b.focus()}else{var cn=w.line===C.line&&w.ch===C.ch&&w.ch===0,ei=w.line!==C.line;cn||ei?S(b,w,C,d):Ie(b,!1,["`","`"])}}function ge(l){wt(l.codemirror,"quote")}function Te(l){qe(l.codemirror,"smaller")}function Z(l){qe(l.codemirror,"bigger")}function Ae(l){qe(l.codemirror,void 0,1)}function J(l){qe(l.codemirror,void 0,2)}function Re(l){qe(l.codemirror,void 0,3)}function _(l){qe(l.codemirror,void 0,4)}function le(l){qe(l.codemirror,void 0,5)}function $(l){qe(l.codemirror,void 0,6)}function Ce(l){var d=l.codemirror,m="*";["-","+","*"].includes(l.options.unorderedListStyle)&&(m=l.options.unorderedListStyle),wt(d,"unordered-list",m)}function Je(l){wt(l.codemirror,"ordered-list")}function at(l){Nt(l.codemirror)}function kt(l){var d=l.options,m="https://";if(d.promptURLs){var y=prompt(d.promptTexts.link,m);if(!y)return!1;m=h(y)}jt(l,"link",d.insertTexts.link,m)}function k(l){var d=l.options,m="https://";if(d.promptURLs){var y=prompt(d.promptTexts.image,m);if(!y)return!1;m=h(y)}jt(l,"image",d.insertTexts.image,m)}function h(l){return encodeURI(l).replace(/([\\()])/g,"\\$1")}function K(l){l.openBrowseFileWindow()}function ne(l,d){var m=l.codemirror,y=H(m),F=l.options,S=d.substr(d.lastIndexOf("/")+1),b=S.substring(S.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg","apng","avif","webp"].includes(b))Ie(m,y.image,F.insertTexts.uploadedImage,d);else{var w=F.insertTexts.link;w[0]="["+S,Ie(m,y.link,w,d)}l.updateStatusBar("upload-image",l.options.imageTexts.sbOnUploaded.replace("#image_name#",S)),setTimeout(function(){l.updateStatusBar("upload-image",l.options.imageTexts.sbInit)},1e3)}function Le(l){var d=l.codemirror,m=H(d),y=l.options;Ie(d,m.table,y.insertTexts.table)}function Ge(l){var d=l.codemirror,m=H(d),y=l.options;Ie(d,m.image,y.insertTexts.horizontalRule)}function Qe(l){var d=l.codemirror;d.undo(),d.focus()}function je(l){var d=l.codemirror;d.redo(),d.focus()}function ot(l){var d=l.codemirror,m=d.getWrapperElement(),y=m.nextSibling,F=l.toolbarElements&&l.toolbarElements["side-by-side"],S=!1,b=m.parentNode;y.classList.contains("editor-preview-active-side")?(l.options.sideBySideFullscreen===!1&&b.classList.remove("sided--no-fullscreen"),y.classList.remove("editor-preview-active-side"),F&&F.classList.remove("active"),m.classList.remove("CodeMirror-sided")):(setTimeout(function(){d.getOption("fullScreen")||(l.options.sideBySideFullscreen===!1?b.classList.add("sided--no-fullscreen"):j(l)),y.classList.add("editor-preview-active-side")},1),F&&F.classList.add("active"),m.classList.add("CodeMirror-sided"),S=!0);var w=m.lastChild;if(w.classList.contains("editor-preview-active")){w.classList.remove("editor-preview-active");var C=l.toolbarElements.preview,ee=l.toolbar_div;C.classList.remove("active"),ee.classList.remove("disabled-for-preview")}var he=function(){var xe=l.options.previewRender(l.value(),y);xe!=null&&(y.innerHTML=xe)};if(d.sideBySideRenderingFunction||(d.sideBySideRenderingFunction=he),S){var ke=l.options.previewRender(l.value(),y);ke!=null&&(y.innerHTML=ke),d.on("update",d.sideBySideRenderingFunction)}else d.off("update",d.sideBySideRenderingFunction);d.refresh()}function lt(l){var d=l.codemirror,m=d.getWrapperElement(),y=l.toolbar_div,F=l.options.toolbar?l.toolbarElements.preview:!1,S=m.lastChild,b=d.getWrapperElement().nextSibling;if(b.classList.contains("editor-preview-active-side")&&ot(l),!S||!S.classList.contains("editor-preview-full")){if(S=document.createElement("div"),S.className="editor-preview-full",l.options.previewClass)if(Array.isArray(l.options.previewClass))for(var w=0;w<l.options.previewClass.length;w++)S.classList.add(l.options.previewClass[w]);else typeof l.options.previewClass=="string"&&S.classList.add(l.options.previewClass);m.appendChild(S)}S.classList.contains("editor-preview-active")?(S.classList.remove("editor-preview-active"),F&&(F.classList.remove("active"),y.classList.remove("disabled-for-preview"))):(setTimeout(function(){S.classList.add("editor-preview-active")},1),F&&(F.classList.add
|
||
|
|
||
|
| Column 1 | Column 2 | Column 3 |
|
||
|
| -------- | -------- | -------- |
|
||
|
| Text | Text | Text |
|
||
|
|
||
|
`],horizontalRule:["",`
|
||
|
|
||
|
-----
|
||
|
|
||
|
`]},I={link:"URL for the link:",image:"URL of the image:"},O={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},T={bold:"**",code:"```",italic:"*"},c={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},p={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#).
|
||
|
Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};function g(l){l=l||{},l.parent=this;var d=!0;if(l.autoDownloadFontAwesome===!1&&(d=!1),l.autoDownloadFontAwesome!==!0)for(var m=document.styleSheets,y=0;y<m.length;y++)m[y].href&&m[y].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(d=!1);if(d){var F=document.createElement("link");F.rel="stylesheet",F.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(F)}if(l.element)this.element=l.element;else if(l.element===null){console.log("EasyMDE: Error. No element was found.");return}if(l.toolbar===void 0){l.toolbar=[];for(var S in zt)Object.prototype.hasOwnProperty.call(zt,S)&&(S.indexOf("separator-")!=-1&&l.toolbar.push("|"),(zt[S].default===!0||l.showIcons&&l.showIcons.constructor===Array&&l.showIcons.indexOf(S)!=-1)&&l.toolbar.push(S))}if(Object.prototype.hasOwnProperty.call(l,"previewClass")||(l.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(l,"status")||(l.status=["autosave","lines","words","cursor"],l.uploadImage&&l.status.unshift("upload-image")),l.previewRender||(l.previewRender=function(w){return this.parent.markdown(w)}),l.parsingConfig=xt({highlightFormatting:!0},l.parsingConfig||{}),l.insertTexts=xt({},xr,l.insertTexts||{}),l.promptTexts=xt({},I,l.promptTexts||{}),l.blockStyles=xt({},T,l.blockStyles||{}),l.autosave!=null&&(l.autosave.timeFormat=xt({},O,l.autosave.timeFormat||{})),l.iconClassMap=xt({},Pe,l.iconClassMap||{}),l.shortcuts=xt({},N,l.shortcuts||{}),l.maxHeight=l.maxHeight||void 0,l.direction=l.direction||"ltr",typeof l.maxHeight<"u"?l.minHeight=l.maxHeight:l.minHeight=l.minHeight||"300px",l.errorCallback=l.errorCallback||function(w){alert(w)},l.uploadImage=l.uploadImage||!1,l.imageMaxSize=l.imageMaxSize||2097152,l.imageAccept=l.imageAccept||"image/png, image/jpeg, image/gif, image/avif",l.imageTexts=xt({},c,l.imageTexts||{}),l.errorMessages=xt({},p,l.errorMessages||{}),l.imagePathAbsolute=l.imagePathAbsolute||!1,l.imageCSRFName=l.imageCSRFName||"csrfmiddlewaretoken",l.imageCSRFHeader=l.imageCSRFHeader||!1,l.autosave!=null&&l.autosave.unique_id!=null&&l.autosave.unique_id!=""&&(l.autosave.uniqueId=l.autosave.unique_id),l.overlayMode&&l.overlayMode.combine===void 0&&(l.overlayMode.combine=!0),this.options=l,this.render(),l.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(l.initialValue),l.uploadImage){var b=this;this.codemirror.on("dragenter",function(w,C){b.updateStatusBar("upload-image",b.options.imageTexts.sbOnDragEnter),C.stopPropagation(),C.preventDefault()}),this.codemirror.on("dragend",function(w,C){b.updateStatusBar("upload-image",b.options.imageTexts.sbInit),C.stopPropagation(),C.preventDefault()}),this.codemirror.on("dragleave",function(w,C){b.updateStatusBar("upload-image",b.options.imageTexts.sbInit),C.stopPropagation(),C.preventDefault()}),this.codemirror.on("dragover",function(w,C){b.updateStatusBar("upload-image",b.options.imageTexts.sbOnDragEnter),C.stopPropagation(),C.preventDefault()}),this.codemirror.on("drop",function(w,C){C.stopPropagation(),C.preventDefault(),l.imageUploadFunction?b.uploadImagesUsingCustomFunction(l.imageUploadFunction,C.dataTransfer.files):b.uploadImages(C.dataTransfer.files)}),this.codemirror.on("paste",function(w,C){l.imageUploadFunction?b.uploadImagesUsingCustomFunction(l.imageUploadFunction,C.clipboardData.files):b.uploadImages(C.clipboardData.files)})}}g.prototype.uploadImages=function(l,d,m){if(l.length!==0){for(var y=[],F=0;F<l.length;F++)y.push(l[F].name),this.uploadImage(l[F],d,m);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",y.join(", ")))}},g.prototype.uploadImagesUsingCustomFunction=function(l,d){if(d.length!==0){for(var m=[],y=0;y<d.length;y++)m.push(d[y].name),this.uploadImageUsingCustomFunction(l,d[y]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",m.join(", ")))}},g.prototype.updateSta
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(I,O){if(typeof I!="object"||I===null)return I;var T=I[Symbol.toPrimitive];if(T!==void 0){var c=T.call(I,O||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(O==="string"?String:Number)(I)}function Y(I){var O=N(I,"string");return typeof O=="symbol"?O:String(O)}function V(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}_e.NT=V();function G(I){_e.NT=I}var P=/[&<>"']/,oe=new RegExp(P.source,"g"),pe=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ee=new RegExp(pe.source,"g"),me={"&":"&","<":"<",">":">",'"':""","'":"'"},be=function(O){return me[O]};function H(I,O){if(O){if(P.test(I))return I.replace(oe,be)}else if(pe.test(I))return I.replace(Ee,be);return I}var U=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function j(I){return I.replace(U,function(O,T){return T=T.toLowerCase(),T==="colon"?":":T.charAt(0)==="#"?T.charAt(1)==="x"?String.fromCharCode(parseInt(T.substring(2),16)):String.fromCharCode(+T.substring(1)):""})}var te=/(^|[^\[])\^/g;function X(I,O){I=typeof I=="string"?I:I.source,O=O||"";var T={replace:function(p,g){return g=g.source||g,g=g.replace(te,"$1"),I=I.replace(p,g),T},getRegex:function(){return new RegExp(I,O)}};return T}var ue=/[^\w:]/g,ie=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ge(I,O,T){if(I){var c;try{c=decodeURIComponent(j(T)).replace(ue,"").toLowerCase()}catch{return null}if(c.indexOf("javascript:")===0||c.indexOf("vbscript:")===0||c.indexOf("data:")===0)return null}O&&!ie.test(T)&&(T=Re(O,T));try{T=encodeURI(T).replace(/%25/g,"%")}catch{return null}return T}var Te={},Z=/^[^:]+:\/*[^/]*$/,Ae=/^([^:]+:)[\s\S]*$/,J=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Re(I,O){Te[" "+I]||(Z.test(I)?Te[" "+I]=I+"/":Te[" "+I]=$(I,"/",!0)),I=Te[" "+I];var T=I.indexOf(":")===-1;return O.substring(0,2)==="//"?T?O:I.replace(Ae,"$1")+O:O.charAt(0)==="/"?T?O:I.replace(J,"$1")+O:I+O}var _={exec:function(){}};function le(I,O){var T=I.replace(/\|/g,function(g,D,l){for(var d=!1,m=D;--m>=0&&l[m]==="\\";)d=!d;return d?"|":" |"}),c=T.split(/ \|/),p=0;if(c[0].trim()||c.shift(),c.length>0&&!c[c.length-1].trim()&&c.pop(),c.length>O)c.splice(O);else for(;c.length<O;)c.push("");for(;p<c.length;p++)c[p]=c[p].trim().replace(/\\\|/g,"|");return c}function $(I,O,T){var c=I.length;if(c===0)return"";for(var p=0;p<c;){var g=I.charAt(c-p-1);if(g===O&&!T)p++;else if(g!==O&&T)p++;else break}return I.slice(0,c-p)}function Ce(I,O){if(I.indexOf(O[1])===-1)return-1;for(var T=I.length,c=0,p=0;p<T;p++)if(I[p]==="\\")p++;else if(I[p]===O[0])c++;else if(I[p]===O[1]&&(c--,c<0))return p;return-1}function Je(I){I&&I.sanitize&&!I.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function at(I,O){if(O<1)return"";for(var T="";O>1;)O&1&&(T+=I),O>>=1,I+=I;return T+I}function kt(I,O,T,c){var p=O.href,g=O.title?H(O.title):null,D=I[1].replace(/\\([\[\]])/g,"$1");if(I[0].charAt(0)!=="!"){c.state.inLink=!0;var l={type:"link",raw:T,href:p,title:g,text:D,tokens:c.inlineTokens(D)};return c.state.inLink=!1,l}return{type:"image",raw:T,href:p,title:g,text:H(D)}}function k(I,O){var T=I.match(/^(\s+)(?:```)/);if(T===null)return O;var c=T[1];return O.split(`
|
||
|
`).map(function(p){var g=p.match(/^\s+/);if(g===null)return p;var D=g[0];return D.length>=c.length?p.slice(c.length):p}).join(`
|
||
|
`)}var h=function(){function I(T){this.options=T||_e.NT}var O=I.prototype;return O.space=function(c){var p=this.rules.block.newline.exec(c);if(p&&p[0].length>0)return{type:"space",raw:p[0]}},O.code=function(c){var p=this.rules.block.code.exec(c);if(p){var g=p[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:p[0],codeBlockStyle:"indented",text:this.options.pedantic?g:$(g,`
|
||
|
`)}}},O.fences=function(c){var p=this.rules.block.fences.exec(c);if(p){var g=p[0],D=k(g,p[3]||"");return{type:"code",raw:g,lang:p[2]?p[2].trim().replace(this.rules.inline._escapes,"$1"):p[2],text:D}}},O.heading=function(c){var p=this.rules.block.heading.exec(c);if(p){var g=p[2].trim();if(/#$/.test(g)){var D=$(g,"#");(this.options.pedantic||!D||/ $/.test(D))&&(g=D.trim())}return{type:"heading",raw:p[0],depth:p[1].length,text:g,tokens:this.lexer.inline(g)}}},O.hr=function(c){var p=this.rules.block.hr.exec(c);if(p)return{type:"hr",raw:p[0]}},O.blockquote=function(c){var p=this.rules.block.blockquote.exec(c);if(p){var g=p[0].replace(/^ *>[ \t]?/gm,""),D=this.lexer.state.top;this.lexer.state.top=!0;var l=this.lexer.blockTokens(g);return this.lexer.state.top=D,{type:"blockquote",raw:p[0],tokens:l,text:g}}},O.list=function(c){var p=this.rules.block.list.exec(c);if(p){var g,D,l,d,m,y,F,S,b,w,C,ee,he=p[1].trim(),ke=he.length>1,xe={type:"list",raw:"",ordered:ke,start:ke?+he.slice(0,-1):"",loose:!1,items:[]};he=ke?"\\d{1,9}\\"+he.slice(-1):"\\"+he,this.options.pedantic&&(he=ke?he:"[*+-]");for(var ce=new RegExp("^( {0,3}"+he+")((?:[ ][^\\n]*)?(?:\\n|$))");c&&(ee=!1,!(!(p=ce.exec(c))||this.rules.block.hr.test(c)));){if(g=p[0],c=c.substring(g.length),S=p[2].split(`
|
||
|
`,1)[0].replace(/^\t+/,function(yt){return" ".repeat(3*yt.length)}),b=c.split(`
|
||
|
`,1)[0],this.options.pedantic?(d=2,C=S.trimLeft()):(d=p[2].search(/[^ ]/),d=d>4?1:d,C=S.slice(d),d+=p[1].length),y=!1,!S&&/^ *$/.test(b)&&(g+=b+`
|
||
|
`,c=c.substring(b.length+1),ee=!0),!ee)for(var We=new RegExp("^ {0,"+Math.min(3,d-1)+"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))"),Ue=new RegExp("^ {0,"+Math.min(3,d-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),Be=new RegExp("^ {0,"+Math.min(3,d-1)+"}(?:```|~~~)"),ze=new RegExp("^ {0,"+Math.min(3,d-1)+"}#");c&&(w=c.split(`
|
||
|
`,1)[0],b=w,this.options.pedantic&&(b=b.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Be.test(b)||ze.test(b)||We.test(b)||Ue.test(c)));){if(b.search(/[^ ]/)>=d||!b.trim())C+=`
|
||
|
`+b.slice(d);else{if(y||S.search(/[^ ]/)>=4||Be.test(S)||ze.test(S)||Ue.test(S))break;C+=`
|
||
|
`+b}!y&&!b.trim()&&(y=!0),g+=w+`
|
||
|
`,c=c.substring(w.length+1),S=b.slice(d)}xe.loose||(F?xe.loose=!0:/\n *\n *$/.test(g)&&(F=!0)),this.options.gfm&&(D=/^\[[ xX]\] /.exec(C),D&&(l=D[0]!=="[ ] ",C=C.replace(/^\[[ xX]\] +/,""))),xe.items.push({type:"list_item",raw:g,task:!!D,checked:l,loose:!1,text:C}),xe.raw+=g}xe.items[xe.items.length-1].raw=g.trimRight(),xe.items[xe.items.length-1].text=C.trimRight(),xe.raw=xe.raw.trimRight();var $e=xe.items.length;for(m=0;m<$e;m++)if(this.lexer.state.top=!1,xe.items[m].tokens=this.lexer.blockTokens(xe.items[m].text,[]),!xe.loose){var Ve=xe.items[m].tokens.filter(function(yt){return yt.type==="space"}),At=Ve.length>0&&Ve.some(function(yt){return/\n.*\n/.test(yt.raw)});xe.loose=At}if(xe.loose)for(m=0;m<$e;m++)xe.items[m].loose=!0;return xe}},O.html=function(c){var p=this.rules.block.html.exec(c);if(p){var g={type:"html",raw:p[0],pre:!this.options.sanitizer&&(p[1]==="pre"||p[1]==="script"||p[1]==="style"),text:p[0]};if(this.options.sanitize){var D=this.options.sanitizer?this.options.sanitizer(p[0]):H(p[0]);g.type="paragraph",g.text=D,g.tokens=this.lexer.inline(D)}return g}},O.def=function(c){var p=this.rules.block.def.exec(c);if(p){var g=p[1].toLowerCase().replace(/\s+/g," "),D=p[2]?p[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",l=p[3]?p[3].substring(1,p[3].length-1).replace(this.rules.inline._escapes,"$1"):p[3];return{type:"def",tag:g,raw:p[0],href:D,title:l}}},O.table=function(c){var p=this.rules.block.table.exec(c);if(p){var g={type:"table",header:le(p[1]).map(function(F){return{text:F}}),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:p[3]&&p[3].trim()?p[3].replace(/\n[ \t]*$/,"").split(`
|
||
|
`):[]};if(g.header.length===g.align.length){g.raw=p[0];var D=g.align.length,l,d,m,y;for(l=0;l<D;l++)/^ *-+: *$/.test(g.align[l])?g.align[l]="right":/^ *:-+: *$/.test(g.align[l])?g.align[l]="center":/^ *:-+ *$/.test(g.align[l])?g.align[l]="left":g.align[l]=null;for(D=g.rows.length,l=0;l<D;l++)g.rows[l]=le(g.rows[l],g.header.length).map(function(F){return{text:F}});for(D=g.header.length,d=0;d<D;d++)g.header[d].tokens=this.lexer.inline(g.header[d].text);for(D=g.rows.length,d=0;d<D;d++)for(y=g.rows[d],m=0;m<y.length;m++)y[m].tokens=this.lexer.inline(y[m].text);return g}}},O.lheading=function(c){var p=this.rules.block.lheading.exec(c);if(p)return{type:"heading",raw:p[0],depth:p[2].charAt(0)==="="?1:2,text:p[1],tokens:this.lexer.inline(p[1])}},O.paragraph=function(c){var p=this.rules.block.paragraph.exec(c);if(p){var g=p[1].charAt(p[1].length-1)===`
|
||
|
`?p[1].slice(0,-1):p[1];return{type:"paragraph",raw:p[0],text:g,tokens:this.lexer.inline(g)}}},O.text=function(c){var p=this.rules.block.text.exec(c);if(p)return{type:"text",raw:p[0],text:p[0],tokens:this.lexer.inline(p[0])}},O.escape=function(c){var p=this.rules.inline.escape.exec(c);if(p)return{type:"escape",raw:p[0],text:H(p[1])}},O.tag=function(c){var p=this.rules.inline.tag.exec(c);if(p)return!this.lexer.state.inLink&&/^<a /i.test(p[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(p[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(p[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(p[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:p[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(p[0]):H(p[0]):p[0]}},O.link=function(c){var p=this.rules.inline.link.exec(c);if(p){var g=p[2].trim();if(!this.options.pedantic&&/^</.test(g)){if(!/>$/.test(g))return;var D=$(g.slice(0,-1),"\\");if((g.length-D.length)%2===0)return}else{var l=Ce(p[2],"()");if(l>-1){var d=p[0].indexOf("!")===0?5:4,m=d+p[1].length+l;p[2]=p[2].substring(0,l),p[0]=p[0].substring(0,m).trim(),p[3]=""}}var y=p[2],F="";if(this.options.pedantic){var S=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(y);S&&(y=S[1],F=S[3])}else F=p[3]?p[3].slice(1,-1):"";return y=y.trim(),/^</.test(y)&&(this.options.pedantic&&!/>$/.test(g)?y=y.slice(1):y=y.slice(1,-1)),kt(p,{href:y&&y.replace(this.rules.inline._escapes,"$1"),title:F&&F.replace(this.rules.inline._escapes,"$1")},p[0],this.lexer)}},O.reflink=function(c,p){var g;if((g=this.rules.inline.reflink.exec(c))||(g=this.rules.inline.nolink.exec(c))){var D=(g[2]||g[1]).replace(/\s+/g," ");if(D=p[D.toLowerCase()],!D){var l=g[0].charAt(0);return{type:"text",raw:l,text:l}}return kt(g,D,g[0],this.lexer)}},O.emStrong=function(c,p,g){g===void 0&&(g="");var D=this.rules.inline.emStrong.lDelim.exec(c);if(D&&!(D[3]&&g.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u10
|
||
|
]`).replace("lheading",K.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ne={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:_,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:_,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ne._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ne.punctuation=X(ne.punctuation).replace(/punctuation/g,ne._punctuation).getRegex(),ne.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,ne.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,ne._comment=X(K._comment).replace("(?:-->|$)","-->").getRegex(),ne.emStrong.lDelim=X(ne.emStrong.lDelim).replace(/punct/g,ne._punctuation).getRegex(),ne.emStrong.rDelimAst=X(ne.emStrong.rDelimAst,"g").replace(/punct/g,ne._punctuation).getRegex(),ne.emStrong.rDelimUnd=X(ne.emStrong.rDelimUnd,"g").replace(/punct/g,ne._punctuation).getRegex(),ne._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ne._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ne._email=/[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])?)+(?![-_])/,ne.autolink=X(ne.autolink).replace("scheme",ne._scheme).replace("email",ne._email).getRegex(),ne._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ne.tag=X(ne.tag).replace("comment",ne._comment).replace("attribute",ne._attribute).getRegex(),ne._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ne._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,ne._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ne.link=X(ne.link).replace("label",ne._label).replace("href",ne._href).replace("title",ne._title).getRegex(),ne.reflink=X(ne.reflink).replace("label",ne._label).replace("ref",K._label).getRegex(),ne.nolink=X(ne.nolink).replace("ref",K._label).getRegex(),ne.reflinkSearch=X(ne.reflinkSearch,"g").replace("reflink",ne.reflink).replace("nolink",ne.nolink).getRegex(),ne.normal=B({},ne),ne.pedantic=B({},ne.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:X(/^!?\[(label)\]\((.*?)\)/).replace("label",ne._label).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ne._label).getRegex()}),ne.gfm=B({},ne.normal,{escape:X(ne.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*
|
||
|
`),this.blockTokens(c,this.tokens);for(var p;p=this.inlineQueue.shift();)this.inlineTokens(p.src,p.tokens);return this.tokens},O.blockTokens=function(c,p){var g=this;p===void 0&&(p=[]),this.options.pedantic?c=c.replace(/\t/g," ").replace(/^ +$/gm,""):c=c.replace(/^( *)(\t+)/gm,function(F,S,b){return S+" ".repeat(b.length)});for(var D,l,d,m;c;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(F){return(D=F.call({lexer:g},c,p))?(c=c.substring(D.raw.length),p.push(D),!0):!1}))){if(D=this.tokenizer.space(c)){c=c.substring(D.raw.length),D.raw.length===1&&p.length>0?p[p.length-1].raw+=`
|
||
|
`:p.push(D);continue}if(D=this.tokenizer.code(c)){c=c.substring(D.raw.length),l=p[p.length-1],l&&(l.type==="paragraph"||l.type==="text")?(l.raw+=`
|
||
|
`+D.raw,l.text+=`
|
||
|
`+D.text,this.inlineQueue[this.inlineQueue.length-1].src=l.text):p.push(D);continue}if(D=this.tokenizer.fences(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.heading(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.hr(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.blockquote(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.list(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.html(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.def(c)){c=c.substring(D.raw.length),l=p[p.length-1],l&&(l.type==="paragraph"||l.type==="text")?(l.raw+=`
|
||
|
`+D.raw,l.text+=`
|
||
|
`+D.raw,this.inlineQueue[this.inlineQueue.length-1].src=l.text):this.tokens.links[D.tag]||(this.tokens.links[D.tag]={href:D.href,title:D.title});continue}if(D=this.tokenizer.table(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.lheading(c)){c=c.substring(D.raw.length),p.push(D);continue}if(d=c,this.options.extensions&&this.options.extensions.startBlock&&function(){var F=1/0,S=c.slice(1),b=void 0;g.options.extensions.startBlock.forEach(function(w){b=w.call({lexer:this},S),typeof b=="number"&&b>=0&&(F=Math.min(F,b))}),F<1/0&&F>=0&&(d=c.substring(0,F+1))}(),this.state.top&&(D=this.tokenizer.paragraph(d))){l=p[p.length-1],m&&l.type==="paragraph"?(l.raw+=`
|
||
|
`+D.raw,l.text+=`
|
||
|
`+D.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):p.push(D),m=d.length!==c.length,c=c.substring(D.raw.length);continue}if(D=this.tokenizer.text(c)){c=c.substring(D.raw.length),l=p[p.length-1],l&&l.type==="text"?(l.raw+=`
|
||
|
`+D.raw,l.text+=`
|
||
|
`+D.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):p.push(D);continue}if(c){var y="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return this.state.top=!0,p},O.inline=function(c,p){return p===void 0&&(p=[]),this.inlineQueue.push({src:c,tokens:p}),p},O.inlineTokens=function(c,p){var g=this;p===void 0&&(p=[]);var D,l,d,m=c,y,F,S;if(this.tokens.links){var b=Object.keys(this.tokens.links);if(b.length>0)for(;(y=this.tokenizer.rules.inline.reflinkSearch.exec(m))!=null;)b.includes(y[0].slice(y[0].lastIndexOf("[")+1,-1))&&(m=m.slice(0,y.index)+"["+at("a",y[0].length-2)+"]"+m.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(y=this.tokenizer.rules.inline.blockSkip.exec(m))!=null;)m=m.slice(0,y.index)+"["+at("a",y[0].length-2)+"]"+m.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(y=this.tokenizer.rules.inline.escapedEmSt.exec(m))!=null;)m=m.slice(0,y.index+y[0].length-2)+"++"+m.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;c;)if(F||(S=""),F=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(C){return(D=C.call({lexer:g},c,p))?(c=c.substring(D.raw.length),p.push(D),!0):!1}))){if(D=this.tokenizer.escape(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.tag(c)){c=c.substring(D.raw.length),l=p[p.length-1],l&&D.type==="text"&&l.type==="text"?(l.raw+=D.raw,l.text+=D.text):p.push(D);continue}if(D=this.tokenizer.link(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.reflink(c,this.tokens.links)){c=c.substring(D.raw.length),l=p[p.length-1],l&&D.type==="text"&&l.type==="text"?(l.raw+=D.raw,l.text+=D.text):p.push(D);continue}if(D=this.tokenizer.emStrong(c,m,S)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.codespan(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.br(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.del(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.autolink(c,Ge)){c=c.substring(D.raw.length),p.push(D);continue}if(!this.state.inLink&&(D=this.tokenizer.url(c,Ge))){c=c.substring(D.raw.length),p.push(D);continue}if(d=c,this.options.extensions&&this.options.extensions.startInline&&function(){var C=1/0,ee=c.slice(1),he=void 0;g.options.extensions.startInline.forEach(function(ke){he=ke.call({lexer:this},ee),typeof he=="number"&&he>=0&&(C=Math.min(C,he))}),C<1/0&&C>=0&&(d=c.substring(0,C+1))}(),D=this.tokenizer.inlineText(d,Le)){c=c.substring(D.raw.length),D.raw.slice(-1)!=="_"&&(S=D.raw.slice(-1)),F=!0,l=p[p.length-1],l&&l.type==="text"?(l.raw+=D.raw,l.text+=D.text):p.push(D);continue}if(c){var w="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw new Error(w)}}return p},Q(I,null,[{key:"rules",get:function(){return{block:K,inline:ne}}}]),I}(),je=function(){function I(T){this.options=T||_e.NT}var O=I.prototype;return O.code=function(c,p,g){var D=(p||"").match(/\S*/)[0];if(this.options.highlight){var l=this.options.highlight(c,D);l!=null&&l!==c&&(g=!0,c=l)}return c=c.replace(/\n$/,"")+`
|
||
|
`,D?'<pre><code class="'+this.options.langPrefix+H(D)+'">'+(g?c:H(c,!0))+`</code></pre>
|
||
|
`:"<pre><code>"+(g?c:H(c,!0))+`</code></pre>
|
||
|
`},O.blockquote=function(c){return`<blockquote>
|
||
|
`+c+`</blockquote>
|
||
|
`},O.html=function(c){return c},O.heading=function(c,p,g,D){if(this.options.headerIds){var l=this.options.headerPrefix+D.slug(g);return"<h"+p+' id="'+l+'">'+c+"</h"+p+`>
|
||
|
`}return"<h"+p+">"+c+"</h"+p+`>
|
||
|
`},O.hr=function(){return this.options.xhtml?`<hr/>
|
||
|
`:`<hr>
|
||
|
`},O.list=function(c,p,g){var D=p?"ol":"ul",l=p&&g!==1?' start="'+g+'"':"";return"<"+D+l+`>
|
||
|
`+c+"</"+D+`>
|
||
|
`},O.listitem=function(c){return"<li>"+c+`</li>
|
||
|
`},O.checkbox=function(c){return"<input "+(c?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},O.paragraph=function(c){return"<p>"+c+`</p>
|
||
|
`},O.table=function(c,p){return p&&(p="<tbody>"+p+"</tbody>"),`<table>
|
||
|
<thead>
|
||
|
`+c+`</thead>
|
||
|
`+p+`</table>
|
||
|
`},O.tablerow=function(c){return`<tr>
|
||
|
`+c+`</tr>
|
||
|
`},O.tablecell=function(c,p){var g=p.header?"th":"td",D=p.align?"<"+g+' align="'+p.align+'">':"<"+g+">";return D+c+("</"+g+`>
|
||
|
`)},O.strong=function(c){return"<strong>"+c+"</strong>"},O.em=function(c){return"<em>"+c+"</em>"},O.codespan=function(c){return"<code>"+c+"</code>"},O.br=function(){return this.options.xhtml?"<br/>":"<br>"},O.del=function(c){return"<del>"+c+"</del>"},O.link=function(c,p,g){if(c=ge(this.options.sanitize,this.options.baseUrl,c),c===null)return g;var D='<a href="'+c+'"';return p&&(D+=' title="'+p+'"'),D+=">"+g+"</a>",D},O.image=function(c,p,g){if(c=ge(this.options.sanitize,this.options.baseUrl,c),c===null)return g;var D='<img src="'+c+'" alt="'+g+'"';return p&&(D+=' title="'+p+'"'),D+=this.options.xhtml?"/>":">",D},O.text=function(c){return c},I}(),ot=function(){function I(){}var O=I.prototype;return O.strong=function(c){return c},O.em=function(c){return c},O.codespan=function(c){return c},O.del=function(c){return c},O.html=function(c){return c},O.text=function(c){return c},O.link=function(c,p,g){return""+g},O.image=function(c,p,g){return""+g},O.br=function(){return""},I}(),lt=function(){function I(){this.seen={}}var O=I.prototype;return O.serialize=function(c){return c.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},O.getNextSafeSlug=function(c,p){var g=c,D=0;if(this.seen.hasOwnProperty(g)){D=this.seen[c];do D++,g=c+"-"+D;while(this.seen.hasOwnProperty(g))}return p||(this.seen[c]=D,this.seen[g]=0),g},O.slug=function(c,p){p===void 0&&(p={});var g=this.serialize(c);return this.getNextSafeSlug(g,p.dryrun)},I}(),Ie=function(){function I(T){this.options=T||_e.NT,this.options.renderer=this.options.renderer||new je,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ot,this.slugger=new lt}I.parse=function(c,p){var g=new I(p);return g.parse(c)},I.parseInline=function(c,p){var g=new I(p);return g.parseInline(c)};var O=I.prototype;return O.parse=function(c,p){p===void 0&&(p=!0);var g="",D,l,d,m,y,F,S,b,w,C,ee,he,ke,xe,ce,We,Ue,Be,ze,$e=c.length;for(D=0;D<$e;D++){if(C=c[D],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[C.type]&&(ze=this.options.extensions.renderers[C.type].call({parser:this},C),ze!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(C.type))){g+=ze||"";continue}switch(C.type){case"space":continue;case"hr":{g+=this.renderer.hr();continue}case"heading":{g+=this.renderer.heading(this.parseInline(C.tokens),C.depth,j(this.parseInline(C.tokens,this.textRenderer)),this.slugger);continue}case"code":{g+=this.renderer.code(C.text,C.lang,C.escaped);continue}case"table":{for(b="",S="",m=C.header.length,l=0;l<m;l++)S+=this.renderer.tablecell(this.parseInline(C.header[l].tokens),{header:!0,align:C.align[l]});for(b+=this.renderer.tablerow(S),w="",m=C.rows.length,l=0;l<m;l++){for(F=C.rows[l],S="",y=F.length,d=0;d<y;d++)S+=this.renderer.tablecell(this.parseInline(F[d].tokens),{header:!1,align:C.align[d]});w+=this.renderer.tablerow(S)}g+=this.renderer.table(b,w);continue}case"blockquote":{w=this.parse(C.tokens),g+=this.renderer.blockquote(w);continue}case"list":{for(ee=C.ordered,he=C.start,ke=C.loose,m=C.items.length,w="",l=0;l<m;l++)ce=C.items[l],We=ce.checked,Ue=ce.task,xe="",ce.task&&(Be=this.renderer.checkbox(We),ke?ce.tokens.length>0&&ce.tokens[0].type==="paragraph"?(ce.tokens[0].text=Be+" "+ce.tokens[0].text,ce.tokens[0].tokens&&ce.tokens[0].tokens.length>0&&ce.tokens[0].tokens[0].type==="text"&&(ce.tokens[0].tokens[0].text=Be+" "+ce.tokens[0].tokens[0].text)):ce.tokens.unshift({type:"text",text:Be}):xe+=Be),xe+=this.parse(ce.tokens,ke),w+=this.renderer.listitem(xe,Ue,We);g+=this.renderer.list(w,ee,he);continue}case"html":{g+=this.renderer.html(C.text);continue}case"paragraph":{g+=this.renderer.paragraph(this.parseInline(C.tokens));continue}case"text":{for(w=C.tokens?this.parseInline(C.tokens):C.text;D+1<$e&&c[D+1].type==="text";)C=c[++D],w+=`
|
||
|
`+(C.tokens?this.parseInline(C.tokens):C.text);g+=p?this.renderer.paragraph(w):w;continue}default:{var Ve='Token with "'+C.type+'" type was not found.';if(this.options.silent){console.error(Ve);return}else throw new Error(Ve)}}}return g},O.parseInline=function(c,p){p=p||this.renderer;var g="",D,l,d,m=c.length;for(D=0;D<m;D++){if(l=c[D],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[l.type]&&(d=this.options.extensions.renderers[l.type].call({parser:this},l),d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type))){g+=d||"";continue}switch(l.type){case"escape":{g+=p.text(l.text);break}case"html":{g+=p.html(l.text);break}case"link":{g+=p.link(l.href,l.title,this.parseInline(l.tokens,p));break}case"image":{g+=p.image(l.href,l.title,l.text);break}case"strong":{g+=p.strong(this.parseInline(l.tokens,p));break}case"em":{g+=p.em(this.parseInline(l.tokens,p));break}case"codespan":{g+=p.codespan(l.text);break}case"br":{g+=p.br();break}case"del":{g+=p.del(this.parseInline(l.tokens,p));break}case"text":{g+=p.text(l.text);break}default:{var y='Token with "'+l.type+'" type was not found.';if(this.options.silent){console.error(y);return}else throw new Error(y)}}}return g},I}(),qe=function(){function I(T){this.options=T||_e.NT}var O=I.prototype;return O.preprocess=function(c){return c},O.postprocess=function(c){return c},I}();qe.passThroughHooks=new Set(["preprocess","postprocess"]);function wt(I,O,T){return function(c){if(c.message+=`
|
||
|
Please report this to https://github.com/markedjs/marked.`,I){var p="<p>An error occurred:</p><pre>"+H(c.message+"",!0)+"</pre>";if(O)return Promise.resolve(p);if(T){T(null,p);return}return p}if(O)return Promise.reject(c);if(T){T(c);return}throw c}}function jt(I,O){return function(T,c,p){typeof c=="function"&&(p=c,c=null);var g=B({},c);c=B({},De.defaults,g);var D=wt(c.silent,c.async,p);if(typeof T>"u"||T===null)return D(new Error("marked(): input parameter is undefined or null"));if(typeof T!="string")return D(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(T)+", string expected"));if(Je(c),c.hooks&&(c.hooks.options=c),p){var l=c.highlight,d;try{c.hooks&&(T=c.hooks.preprocess(T)),d=I(T,c)}catch(b){return D(b)}var m=function(w){var C;if(!w)try{c.walkTokens&&De.walkTokens(d,c.walkTokens),C=O(d,c),c.hooks&&(C=c.hooks.postprocess(C))}catch(ee){w=ee}return c.highlight=l,w?D(w):p(null,C)};if(!l||l.length<3||(delete c.highlight,!d.length))return m();var y=0;De.walkTokens(d,function(b){b.type==="code"&&(y++,setTimeout(function(){l(b.text,b.lang,function(w,C){if(w)return m(w);C!=null&&C!==b.text&&(b.text=C,b.escaped=!0),y--,y===0&&m()})},0))}),y===0&&m();return}if(c.async)return Promise.resolve(c.hooks?c.hooks.preprocess(T):T).then(function(b){return I(b,c)}).then(function(b){return c.walkTokens?Promise.all(De.walkTokens(b,c.walkTokens)).then(function(){return b}):b}).then(function(b){return O(b,c)}).then(function(b){return c.hooks?c.hooks.postprocess(b):b}).catch(D);try{c.hooks&&(T=c.hooks.preprocess(T));var F=I(T,c);c.walkTokens&&De.walkTokens(F,c.walkTokens);var S=O(F,c);return c.hooks&&(S=c.hooks.postprocess(S)),S}catch(b){return D(b)}}}function De(I,O,T){return jt(Qe.lex,Ie.parse)(I,O,T)}De.options=De.setOptions=function(I){return De.defaults=B({},De.defaults,I),G(De.defaults),De},De.getDefaults=V,De.defaults=_e.NT,De.use=function(){for(var I=De.defaults.extensions||{renderers:{},childTokens:{}},O=arguments.length,T=new Array(O),c=0;c<O;c++)T[c]=arguments[c];T.forEach(function(p){var g=B({},p);if(g.async=De.defaults.async||g.async||!1,p.extensions&&(p.extensions.forEach(function(l){if(!l.name)throw new Error("extension name required");if(l.renderer){var d=I.renderers[l.name];d?I.renderers[l.name]=function(){for(var m=arguments.length,y=new Array(m),F=0;F<m;F++)y[F]=arguments[F];var S=l.renderer.apply(this,y);return S===!1&&(S=d.apply(this,y)),S}:I.renderers[l.name]=l.renderer}if(l.tokenizer){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");I[l.level]?I[l.level].unshift(l.tokenizer):I[l.level]=[l.tokenizer],l.start&&(l.level==="block"?I.startBlock?I.startBlock.push(l.start):I.startBlock=[l.start]:l.level==="inline"&&(I.startInline?I.startInline.push(l.start):I.startInline=[l.start]))}l.childTokens&&(I.childTokens[l.name]=l.childTokens)}),g.extensions=I),p.renderer&&function(){var l=De.defaults.renderer||new je,d=function(F){var S=l[F];l[F]=function(){for(var b=arguments.length,w=new Array(b),C=0;C<b;C++)w[C]=arguments[C];var ee=p.renderer[F].apply(l,w);return ee===!1&&(ee=S.apply(l,w)),ee}};for(var m in p.renderer)d(m);g.renderer=l}(),p.tokenizer&&function(){var l=De.defaults.tokenizer||new h,d=function(F){var S=l[F];l[F]=function(){for(var b=arguments.length,w=new Array(b),C=0;C<b;C++)w[C]=arguments[C];var ee=p.tokenizer[F].apply(l,w);return ee===!1&&(ee=S.apply(l,w)),ee}};for(var m in p.tokenizer)d(m);g.tokenizer=l}(),p.hooks&&function(){var l=De.defaults.hooks||new qe,d=function(F){var S=l[F];qe.passThroughHooks.has(F)?l[F]=function(b){if(De.defaults.async)return Promise.resolve(p.hooks[F].call(l,b)).then(function(C){return S.call(l,C)});var w=p.hooks[F].call(l,b);return S.call(l,w)}:l[F]=function(){for(var b=arguments.length,w=new Array(b),C=0;C<b;C++)w[C]=arguments[C];var ee=p.hooks[F].apply(l,w);return ee===!1&&(ee=S.apply(l,w)),ee}};for(var m in p.hooks)d(m);g.hooks=l}(),p.walkTokens){var D=De.defaults.walkTokens;g.walkTokens=function(l){var d=[];return d.push(p.walkTokens.call(this,l)),D&&(d=d.concat(D.call(this,l))),d}}
|