UNPKG

code-server

Version:

Run VS Code on a remote server.

1 lines 325 kB
(()=>{var e={5887:(e,t,n)=>{"use strict";function r(e,t=!1){const n=e.length;let r=0,a="",c=0,l=16,u=0,p=0,h=0,f=0,T=0;function d(t,n){let s=0,i=0;for(;s<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)i=16*i+t-48;else if(t>=65&&t<=70)i=16*i+t-65+10;else{if(!(t>=97&&t<=102))break;i=16*i+t-97+10}r++,s++}return s<t&&(i=-1),i}function m(){if(a="",T=0,c=r,p=u,f=h,r>=n)return c=n,l=17;let t=e.charCodeAt(r);if(s(t)){do{r++,a+=String.fromCharCode(t),t=e.charCodeAt(r)}while(s(t));return l=15}if(i(t))return r++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,a+="\n"),u++,h=r,l=14;switch(t){case 123:return r++,l=1;case 125:return r++,l=2;case 91:return r++,l=3;case 93:return r++,l=4;case 58:return r++,l=6;case 44:return r++,l=5;case 34:return r++,a=function(){let t="",s=r;for(;;){if(r>=n){t+=e.substring(s,r),T=2;break}const o=e.charCodeAt(r);if(34===o){t+=e.substring(s,r),r++;break}if(92!==o){if(o>=0&&o<=31){if(i(o)){t+=e.substring(s,r),T=2;break}T=6}r++}else{if(t+=e.substring(s,r),r++,r>=n){T=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=d(4,!0);e>=0?t+=String.fromCharCode(e):T=4;break;default:T=5}s=r}}return t}(),l=10;case 47:const s=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!i(e.charCodeAt(r));)r++;return a=e.substring(s,r),l=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let o=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,o=!0;break}r++,i(t)&&(13===t&&10===e.charCodeAt(r)&&r++,u++,h=r)}return o||(r++,T=1),a=e.substring(s,r),l=13}return a+=String.fromCharCode(t),r++,l=16;case 45:if(a+=String.fromCharCode(t),r++,r===n||!o(e.charCodeAt(r)))return l=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&o(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&o(e.charCodeAt(r))))return T=3,e.substring(t,r);for(r++;r<e.length&&o(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&o(e.charCodeAt(r))){for(r++;r<e.length&&o(e.charCodeAt(r));)r++;n=r}else T=3;return e.substring(t,n)}(),l=11;default:for(;r<n&&E(t);)r++,t=e.charCodeAt(r);if(c!==r){switch(a=e.substring(c,r),a){case"true":return l=8;case"false":return l=9;case"null":return l=7}return l=16}return a+=String.fromCharCode(t),r++,l=16}}function E(e){if(s(e)||i(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,a="",c=0,l=16,T=0},getPosition:()=>r,scan:t?function(){let e;do{e=m()}while(e>=12&&e<=15);return e}:m,getToken:()=>l,getTokenValue:()=>a,getTokenOffset:()=>c,getTokenLength:()=>r-c,getTokenStartLine:()=>p,getTokenStartCharacter:()=>c-f,getTokenError:()=>T}}function s(e){return 32===e||9===e}function i(e){return 10===e||13===e}function o(e){return e>=48&&e<=57}var a,c;function l(e,t,n){let s,i,o,a,c;if(t){for(a=t.offset,c=a+t.length,o=a;o>0&&!p(e,o-1);)o--;let r=c;for(;r<e.length&&!p(e,r);)r++;i=e.substring(o,r),s=function(e,t){let n=0,r=0;const s=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(" "===t)r++;else{if("\t"!==t)break;r+=s}n++}return Math.floor(r/s)}(i,n)}else i=e,s=0,o=0,a=0,c=e.length;const l=function(e,t){for(let e=0;e<t.length;e++){const n=t.charAt(e);if("\r"===n)return e+1<t.length&&"\n"===t.charAt(e+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}(n,e);let h,f=0,T=0;h=n.insertSpaces?u(" ",n.tabSize||4):"\t";let d=r(i,!1),m=!1;function E(){return f>1?u(l,f)+u(h,s+T):l+u(h,s+T)}function _(){let e=d.scan();for(f=0;15===e||14===e;)14===e&&n.keepLines?f+=1:14===e&&(f=1),e=d.scan();return m=16===e||0!==d.getTokenError(),e}const g=[];function A(n,r,s){m||t&&!(r<c&&s>a)||e.substring(r,s)===n||g.push({offset:r,length:s-r,content:n})}let C=_();if(n.keepLines&&f>0&&A(u(l,f),0,0),17!==C){let e=d.getTokenOffset()+o;A(u(h,s),o,e)}for(;17!==C;){let e=d.getTokenOffset()+d.getTokenLength()+o,t=_(),r="",s=!1;for(;0===f&&(12===t||13===t);)A(" ",e,d.getTokenOffset()+o),e=d.getTokenOffset()+d.getTokenLength()+o,s=12===t,r=s?E():"",t=_();if(2===t)1!==C&&T--,n.keepLines&&f>0||!n.keepLines&&1!==C?r=E():n.keepLines&&(r=" ");else if(4===t)3!==C&&T--,n.keepLines&&f>0||!n.keepLines&&3!==C?r=E():n.keepLines&&(r=" ");else{switch(C){case 3:case 1:T++,r=n.keepLines&&f>0||!n.keepLines?E():" ";break;case 5:r=n.keepLines&&f>0||!n.keepLines?E():" ";break;case 12:r=E();break;case 13:f>0?r=E():s||(r=" ");break;case 6:n.keepLines&&f>0?r=E():s||(r=" ");break;case 10:n.keepLines&&f>0?r=E():6!==t||s||(r="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&f>0?r=E():12!==t&&13!==t||s?5!==t&&17!==t&&(m=!0):r=" ";break;case 16:m=!0}f>0&&(12===t||13===t)&&(r=E())}17===t&&(r=n.keepLines&&f>0?E():n.insertFinalNewline?l:""),A(r,e,d.getTokenOffset()+o),C=t}return g}function u(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function p(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function h(e,t=[],n=c.DEFAULT){let r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function s(e){"property"===r.type&&(r.length=e-r.offset,r=r.parent)}function i(e){return r.children.push(e),e}T(e,{onObjectBegin:e=>{r=i({type:"object",offset:e,length:-1,parent:r,children:[]})},onObjectProperty:(e,t,n)=>{r=i({type:"property",offset:t,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:e,offset:t,length:n,parent:r})},onObjectEnd:(e,t)=>{s(e+t),r.length=e+t-r.offset,r=r.parent,s(e+t)},onArrayBegin:(e,t)=>{r=i({type:"array",offset:e,length:-1,parent:r,children:[]})},onArrayEnd:(e,t)=>{r.length=e+t-r.offset,r=r.parent,s(e+t)},onLiteralValue:(e,t,n)=>{i({type:d(e),offset:t,length:n,parent:r,value:e}),s(t+n)},onSeparator:(e,t,n)=>{"property"===r.type&&(":"===e?r.colonOffset=t:","===e&&s(t))},onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n);const o=r.children[0];return o&&delete o.parent,o}function f(e,t){if(!e)return;let n=e;for(let e of t)if("string"==typeof e){if("object"!==n.type||!Array.isArray(n.children))return;let t=!1;for(const r of n.children)if(Array.isArray(r.children)&&r.children[0].value===e&&2===r.children.length){n=r.children[1],t=!0;break}if(!t)return}else{const t=e;if("array"!==n.type||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n}function T(e,t,n=c.DEFAULT){const s=r(e,!1),i=[];function o(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function a(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),(()=>i.slice())):()=>!0}function l(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function u(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),(()=>i.slice())):()=>!0}const p=a(t.onObjectBegin),h=u(t.onObjectProperty),f=o(t.onObjectEnd),T=a(t.onArrayBegin),d=o(t.onArrayEnd),m=u(t.onLiteralValue),E=l(t.onSeparator),_=o(t.onComment),g=l(t.onError),A=n&&n.disallowComments,C=n&&n.allowTrailingComma;function N(){for(;;){const e=s.scan();switch(s.getTokenError()){case 4:k(14);break;case 5:k(15);break;case 3:k(13);break;case 1:A||k(11);break;case 2:k(12);break;case 6:k(16)}switch(e){case 12:case 13:A?k(10):_();break;case 16:k(1);break;case 15:case 14:break;default:return e}}}function k(e,t=[],n=[]){if(g(e),t.length+n.length>0){let e=s.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){N();break}if(-1!==n.indexOf(e))break;e=N()}}}function O(e){const t=s.getTokenValue();return e?m(t):(h(t),i.push(t)),N(),!0}return N(),17===s.getToken()?!!n.allowEmptyContent||(k(4,[],[]),!1):function e(){switch(s.getToken()){case 3:return function(){T(),N();let t=!0,n=!1;for(;4!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(n||k(4,[],[]),E(","),N(),4===s.getToken()&&C)break}else n&&k(6,[],[]);t?(i.push(0),t=!1):i[i.length-1]++,e()||k(4,[],[4,5]),n=!0}return d(),t||i.pop(),4!==s.getToken()?k(8,[4],[]):N(),!0}();case 1:return function(){p(),N();let t=!1;for(;2!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(t||k(4,[],[]),E(","),N(),2===s.getToken()&&C)break}else t&&k(6,[],[]);(10!==s.getToken()?(k(3,[],[2,5]),0):(O(!1),6===s.getToken()?(E(":"),N(),e()||k(4,[],[2,5])):k(5,[],[2,5]),i.pop(),1))||k(4,[],[2,5]),t=!0}return f(),2!==s.getToken()?k(7,[2],[]):N(),!0}();case 10:return O(!0);default:return function(){switch(s.getToken()){case 11:const e=s.getTokenValue();let t=Number(e);isNaN(t)&&(k(2),t=0),m(t);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return N(),!0}()}}()?(17!==s.getToken()&&k(9,[],[]),!0):(k(4,[],[]),!1)}function d(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":return e?Array.isArray(e)?"array":"object":"null";default:return"null"}}function m(e,t,n){if(!n.formattingOptions)return[t];let r=E(e,t),s=t.offset,i=t.offset+t.content.length;if(0===t.length||0===t.content.length){for(;s>0&&!p(r,s-1);)s--;for(;i<r.length&&!p(r,i);)i++}const o=l(r,{offset:s,length:i-s},{...n.formattingOptions,keepLines:!1});for(let e=o.length-1;e>=0;e--){const t=o[e];r=E(r,t),s=Math.min(s,t.offset),i=Math.max(i,t.offset+t.length),i+=t.content.length-t.length}return[{offset:s,length:e.length-(r.length-i)-s,content:r.substring(s,i)}]}function E(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}n.r(t),n.d(t,{ParseErrorCode:()=>I,ScanError:()=>g,SyntaxKind:()=>A,applyEdits:()=>P,createScanner:()=>_,findNodeAtLocation:()=>O,findNodeAtOffset:()=>S,format:()=>y,getLocation:()=>C,getNodePath:()=>L,getNodeValue:()=>v,modify:()=>D,parse:()=>N,parseTree:()=>k,printParseErrorCode:()=>M,stripComments:()=>R,visit:()=>b}),function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(a||(a={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(c||(c={}));const _=r;var g,A;!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(g||(g={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(A||(A={}));const C=function(e,t){const n=[],r=new Object;let s;const i={value:{},offset:0,length:0,type:"object",parent:void 0};let o=!1;function a(e,t,n,r){i.value=e,i.offset=t,i.length=n,i.type=r,i.colonOffset=void 0,s=i}try{T(e,{onObjectBegin:(e,i)=>{if(t<=e)throw r;s=void 0,o=t>e,n.push("")},onObjectProperty:(e,s,i)=>{if(t<s)throw r;if(a(e,s,i,"property"),n[n.length-1]=e,t<=s+i)throw r},onObjectEnd:(e,i)=>{if(t<=e)throw r;s=void 0,n.pop()},onArrayBegin:(e,i)=>{if(t<=e)throw r;s=void 0,n.push(0)},onArrayEnd:(e,i)=>{if(t<=e)throw r;s=void 0,n.pop()},onLiteralValue:(e,n,s)=>{if(t<n)throw r;if(a(e,n,s,d(e)),t<=n+s)throw r},onSeparator:(e,i,a)=>{if(t<=i)throw r;if(":"===e&&s&&"property"===s.type)s.colonOffset=i,o=!1,s=void 0;else if(","===e){const e=n[n.length-1];"number"==typeof e?n[n.length-1]=e+1:(o=!0,n[n.length-1]=""),s=void 0}}})}catch(e){if(e!==r)throw e}return{path:n,previousNode:s,isAtPropertyKey:o,matches:e=>{let t=0;for(let r=0;t<e.length&&r<n.length;r++)if(e[t]===n[r]||"*"===e[t])t++;else if("**"!==e[t])return!1;return t===e.length}}},N=function(e,t=[],n=c.DEFAULT){let r=null,s=[];const i=[];function o(e){Array.isArray(s)?s.push(e):null!==r&&(s[r]=e)}return T(e,{onObjectBegin:()=>{const e={};o(e),i.push(s),s=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{s=i.pop()},onArrayBegin:()=>{const e=[];o(e),i.push(s),s=e,r=null},onArrayEnd:()=>{s=i.pop()},onLiteralValue:o,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),s[0]},k=h,O=f,S=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){const s=t.children;if(Array.isArray(s))for(let t=0;t<s.length&&s[t].offset<=n;t++){const i=e(s[t],n,r);if(i)return i}return t}},L=function e(t){if(!t.parent||!t.parent.children)return[];const n=e(t.parent);if("property"===t.parent.type){const e=t.parent.children[0].value;n.push(e)}else if("array"===t.parent.type){const e=t.parent.children.indexOf(t);-1!==e&&n.push(e)}return n},v=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const n=Object.create(null);for(let r of t.children){const t=r.children[1];t&&(n[r.children[0].value]=e(t))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}},b=T,R=function(e,t){let n,s,i=r(e),o=[],a=0;do{switch(s=i.getPosition(),n=i.scan(),n){case 12:case 13:case 17:a!==s&&o.push(e.substring(a,s)),void 0!==t&&o.push(i.getTokenValue().replace(/[^\r\n]/g,t)),a=i.getPosition()}}while(17!==n);return o.join("")};var I;function M(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function y(e,t,n){return l(e,t,n)}function D(e,t,n,r){return function(e,t,n,r){const s=t.slice(),i=h(e,[]);let o,a;for(;s.length>0&&(a=s.pop(),o=f(i,s),void 0===o&&void 0!==n);)n="string"==typeof a?{[a]:n}:[n];if(o){if("object"===o.type&&"string"==typeof a&&Array.isArray(o.children)){const t=f(o,[a]);if(void 0!==t){if(void 0===n){if(!t.parent)throw new Error("Malformed AST");const n=o.children.indexOf(t.parent);let s,i=t.parent.offset+t.parent.length;if(n>0){let e=o.children[n-1];s=e.offset+e.length}else s=o.offset+1,o.children.length>1&&(i=o.children[1].offset);return m(e,{offset:s,length:i-s,content:""},r)}return m(e,{offset:t.offset,length:t.length,content:JSON.stringify(n)},r)}{if(void 0===n)return[];const t=`${JSON.stringify(a)}: ${JSON.stringify(n)}`,s=r.getInsertionIndex?r.getInsertionIndex(o.children.map((e=>e.children[0].value))):o.children.length;let i;if(s>0){let e=o.children[s-1];i={offset:e.offset+e.length,length:0,content:","+t}}else i=0===o.children.length?{offset:o.offset+1,length:0,content:t}:{offset:o.offset+1,length:0,content:t+","};return m(e,i,r)}}if("array"===o.type&&"number"==typeof a&&Array.isArray(o.children)){const t=a;if(-1===t){const t=`${JSON.stringify(n)}`;let s;if(0===o.children.length)s={offset:o.offset+1,length:0,content:t};else{const e=o.children[o.children.length-1];s={offset:e.offset+e.length,length:0,content:","+t}}return m(e,s,r)}if(void 0===n&&o.children.length>=0){const t=a,n=o.children[t];let s;if(1===o.children.length)s={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===t){let e=o.children[t-1],n=e.offset+e.length;s={offset:n,length:o.offset+o.length-2-n,content:""}}else s={offset:n.offset,length:o.children[t+1].offset-n.offset,content:""};return m(e,s,r)}if(void 0!==n){let t;const s=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&o.children.length>a){const e=o.children[a];t={offset:e.offset,length:e.length,content:s}}else if(0===o.children.length||0===a)t={offset:o.offset+1,length:0,content:0===o.children.length?s:s+","};else{const e=a>o.children.length?o.children.length:a,n=o.children[e-1];t={offset:n.offset+n.length,length:0,content:","+s}}return m(e,t,r)}throw new Error(`Can not ${void 0===n?"remove":r.isArrayInsertion?"insert":"modify"} Array index ${t} as length is not sufficient`)}throw new Error(`Can not add ${"number"!=typeof a?"index":"property"} to parent of type ${o.type}`)}if(void 0===n)throw new Error("Can not delete in empty document");return m(e,{offset:i?i.offset:0,length:i?i.length:0,content:JSON.stringify(n)},r)}(e,t,n,r)}function P(e,t){let n=t.slice(0).sort(((e,t)=>{const n=e.offset-t.offset;return 0===n?e.length-t.length:n})),r=e.length;for(let t=n.length-1;t>=0;t--){let s=n[t];if(!(s.offset+s.length<=r))throw new Error("Overlapping edit");e=E(e,s),r=s.offset}return e}!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(I||(I={}))},2833:(e,t,n)=>{"use strict";function r(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function s(e){return Object.prototype.toString.call(e)}function i(e){return"[object Function]"===s(e)}function o(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var a={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},c={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},l="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function p(e){var t=e.re=n(2879)(e.__opts__),r=e.__tlds__.slice();function a(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(l),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(a(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(a(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(a(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(a(t.tpl_host_fuzzy_test),"i");var c=[];function u(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===s(n))return"[object RegExp]"!==s(n.validate)?i(n.validate)?r.validate=n.validate:u(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(i(n.normalize)?r.normalize=n.normalize:n.normalize?u(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===s(e)}(n)?u(t,n):c.push(t)}})),c.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var p=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(o).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+p+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+p+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function h(e,t){var n=e.__index__,r=e.__last_index__,s=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=s,this.text=s,this.url=s}function f(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function T(e,t){if(!(this instanceof T))return new T(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||a.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},a,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},c,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},p(this)}T.prototype.add=function(e,t){return this.__schemas__[e]=t,p(this),this},T.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},T.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,s,i,o,a,c;if(this.re.schema_test.test(e))for((a=this.re.schema_search).lastIndex=0;null!==(t=a.exec(e));)if(s=this.testSchemaAt(e,t[2],a.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||c<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=o)),this.__index__>=0},T.prototype.pretest=function(e){return this.re.pretest.test(e)},T.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},T.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(f(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(f(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},T.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),p(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,p(this),this)},T.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},T.prototype.onCompile=function(){},e.exports=T},2879:(e,t,n)=>{"use strict";e.exports=function(e){var t={};t.src_Any=n(6027).source,t.src_Cc=n(592).source,t.src_Z=n(3978).source,t.src_P=n(2828).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},2922:(e,t,n)=>{"use strict";e.exports=n(1246)},8359:(e,t,n)=>{"use strict";e.exports=n(4374)},1358:e=>{"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},6557:e=>{"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+t+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),s=new RegExp("^(?:"+t+"|"+n+")");e.exports.l=r,e.exports.p=s},9963:(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty;function s(e,t){return r.call(e,t)}function i(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||!(65535&~e&&65534!=(65535&e))||e>=0&&e<=8||11===e||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function o(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(8359),p=/[&<>"]/,h=/[&<>"]/g,f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function T(e){return f[e]}var d=/[.?*+^$[\]\\(){}|-]/g,m=n(2828);t.lib={},t.lib.mdurl=n(6781),t.lib.ucmicro=n(9295),t.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=s,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(a,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(c,(function(e,t,n){return t||function(e,t){var n=0;return s(u,t)?u[t]:35===t.charCodeAt(0)&&l.test(t)&&i(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?o(n):e}(e,n)}))},t.isValidEntityCode=i,t.fromCodePoint=o,t.escapeHtml=function(e){return p.test(e)?e.replace(h,T):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return m.test(e)},t.escapeRE=function(e){return e.replace(d,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},3592:(e,t,n)=>{"use strict";t.parseLinkLabel=n(1947),t.parseLinkDestination=n(8949),t.parseLinkTitle=n(7311)},8949:(e,t,n)=>{"use strict";var r=n(9963).unescapeAll;e.exports=function(e,t,n){var s,i,o=t,a={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(s=e.charCodeAt(t)))return a;if(60===s)return a;if(62===s)return a.pos=t+1,a.str=r(e.slice(o+1,t)),a.ok=!0,a;92===s&&t+1<n?t+=2:t++}return a}for(i=0;t<n&&32!==(s=e.charCodeAt(t))&&!(s<32||127===s);)if(92===s&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===s&&++i>32)return a;if(41===s){if(0===i)break;i--}t++}return o===t||0!==i||(a.str=r(e.slice(o,t)),a.lines=0,a.pos=t,a.ok=!0),a}},1947:e=>{"use strict";e.exports=function(e,t,n){var r,s,i,o,a=-1,c=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<c;){if(93===(i=e.src.charCodeAt(e.pos))&&0==--r){s=!0;break}if(o=e.pos,e.md.inline.skipToken(e),91===i)if(o===e.pos-1)r++;else if(n)return e.pos=l,-1}return s&&(a=e.pos),e.pos=l,a}},7311:(e,t,n)=>{"use strict";var r=n(9963).unescapeAll;e.exports=function(e,t,n){var s,i,o=0,a=t,c={ok:!1,pos:0,lines:0,str:""};if(t>=n)return c;if(34!==(i=e.charCodeAt(t))&&39!==i&&40!==i)return c;for(t++,40===i&&(i=41);t<n;){if((s=e.charCodeAt(t))===i)return c.pos=t+1,c.lines=o,c.str=r(e.slice(a+1,t)),c.ok=!0,c;if(40===s&&41===i)return c;10===s?o++:92===s&&t+1<n&&(t++,10===e.charCodeAt(t)&&o++),t++}return c}},1246:(e,t,n)=>{"use strict";var r=n(9963),s=n(3592),i=n(4847),o=n(6321),a=n(1525),c=n(3171),l=n(2833),u=n(6781),p=n(4876),h={default:n(5092),zero:n(4719),commonmark:n(73)},f=/^(vbscript|javascript|file|data):/,T=/^data:image\/(gif|png|jpeg|webp);/;function d(e){var t=e.trim().toLowerCase();return!f.test(t)||!!T.test(t)}var m=["http:","https:","mailto:"];function E(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||m.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function _(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||m.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function g(e,t){if(!(this instanceof g))return new g(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new c,this.block=new a,this.core=new o,this.renderer=new i,this.linkify=new l,this.validateLink=d,this.normalizeLink=E,this.normalizeLinkText=_,this.utils=r,this.helpers=r.assign({},s),this.options={},this.configure(e),t&&this.set(t)}g.prototype.set=function(e){return r.assign(this.options,e),this},g.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=h[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},g.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},g.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},g.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},g.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},g.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},g.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},g.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=g},1525:(e,t,n)=>{"use strict";var r=n(2378),s=[["table",n(4752),["paragraph","reference"]],["code",n(5711)],["fence",n(2373),["paragraph","reference","blockquote","list"]],["blockquote",n(2941),["paragraph","reference","blockquote","list"]],["hr",n(8e3),["paragraph","reference","blockquote","list"]],["list",n(6686),["paragraph","reference","blockquote"]],["reference",n(6897)],["html_block",n(1857),["paragraph","reference","blockquote"]],["heading",n(634),["paragraph","reference","blockquote"]],["lheading",n(9648)],["paragraph",n(7046)]];function i(){this.ruler=new r;for(var e=0;e<s.length;e++)this.ruler.push(s[e][0],s[e][1],{alt:(s[e][2]||[]).slice()})}i.prototype.tokenize=function(e,t,n){for(var r,s=this.ruler.getRules(""),i=s.length,o=t,a=!1,c=e.md.options.maxNesting;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n))&&!(e.sCount[o]<e.blkIndent);){if(e.level>=c){e.line=n;break}for(r=0;r<i&&!s[r](e,o,n,!1);r++);e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),(o=e.line)<n&&e.isEmpty(o)&&(a=!0,o++,e.line=o)}},i.prototype.parse=function(e,t,n,r){var s;e&&(s=new this.State(e,t,n,r),this.tokenize(s,s.line,s.lineMax))},i.prototype.State=n(7759),e.exports=i},6321:(e,t,n)=>{"use strict";var r=n(2378),s=[["normalize",n(803)],["block",n(3437)],["inline",n(3547)],["linkify",n(986)],["replacements",n(203)],["smartquotes",n(5260)]];function i(){this.ruler=new r;for(var e=0;e<s.length;e++)this.ruler.push(s[e][0],s[e][1])}i.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},i.prototype.State=n(1839),e.exports=i},3171:(e,t,n)=>{"use strict";var r=n(2378),s=[["text",n(2015)],["newline",n(2534)],["escape",n(1231)],["backticks",n(6757)],["strikethrough",n(7141).q],["emphasis",n(3898).q],["link",n(6552)],["image",n(3707)],["autolink",n(6955)],["html_inline",n(961)],["entity",n(8103)]],i=[["balance_pairs",n(5940)],["strikethrough",n(7141).g],["emphasis",n(3898).g],["text_collapse",n(7729)]];function o(){var e;for(this.ruler=new r,e=0;e<s.length;e++)this.ruler.push(s[e][0],s[e][1]);for(this.ruler2=new r,e=0;e<i.length;e++)this.ruler2.push(i[e][0],i[e][1])}o.prototype.skipToken=function(e){var t,n,r=e.pos,s=this.ruler.getRules(""),i=s.length,o=e.md.options.maxNesting,a=e.cache;if(void 0===a[r]){if(e.level<o)for(n=0;n<i&&(e.level++,t=s[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,a[r]=e.pos}else e.pos=a[r]},o.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),s=r.length,i=e.posMax,o=e.md.options.maxNesting;e.pos<i;){if(e.level<o)for(n=0;n<s&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},o.prototype.parse=function(e,t,n,r){var s,i,o,a=new this.State(e,t,n,r);for(this.tokenize(a),o=(i=this.ruler2.getRules("")).length,s=0;s<o;s++)i[s](a)},o.prototype.State=n(979),e.exports=o},73:e=>{"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},5092:e=>{"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},4719:e=>{"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},4847:(e,t,n)=>{"use strict";var r=n(9963).assign,s=n(9963).unescapeAll,i=n(9963).escapeHtml,o={};function a(){this.rules=r({},o)}o.code_inline=function(e,t,n,r,s){var o=e[t];return"<code"+s.renderAttrs(o)+">"+i(e[t].content)+"</code>"},o.code_block=function(e,t,n,r,s){var o=e[t];return"<pre"+s.renderAttrs(o)+"><code>"+i(e[t].content)+"</code></pre>\n"},o.fence=function(e,t,n,r,o){var a,c,l,u,p,h=e[t],f=h.info?s(h.info).trim():"",T="",d="";return f&&(T=(l=f.split(/(\s+)/g))[0],d=l.slice(2).join("")),0===(a=n.highlight&&n.highlight(h.content,T,d)||i(h.content)).indexOf("<pre")?a+"\n":f?(c=h.attrIndex("class"),u=h.attrs?h.attrs.slice():[],c<0?u.push(["class",n.langPrefix+T]):(u[c]=u[c].slice(),u[c][1]+=" "+n.langPrefix+T),p={attrs:u},"<pre><code"+o.renderAttrs(p)+">"+a+"</code></pre>\n"):"<pre><code"+o.renderAttrs(h)+">"+a+"</code></pre>\n"},o.image=function(e,t,n,r,s){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=s.renderInlineAsText(i.children,n,r),s.renderToken(e,t,n)},o.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},o.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},o.text=function(e,t){return i(e[t].content)},o.html_block=function(e,t){return e[t].content},o.html_inline=function(e,t){return e[t].content},a.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+i(e.attrs[t][0])+'="'+i(e.attrs[t][1])+'"';return r},a.prototype.renderToken=function(e,t,n){var r,s="",i=!1,o=e[t];return o.hidden?"":(o.block&&-1!==o.nesting&&t&&e[t-1].hidden&&(s+="\n"),s+=(-1===o.nesting?"</":"<")+o.tag,s+=this.renderAttrs(o),0===o.nesting&&n.xhtmlOut&&(s+=" /"),o.block&&(i=!0,1===o.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===o.tag)&&(i=!1)),s+=i?">\n":">")},a.prototype.renderInline=function(e,t,n){for(var r,s="",i=this.rules,o=0,a=e.length;o<a;o++)void 0!==i[r=e[o].type]?s+=i[r](e,o,t,n,this):s+=this.renderToken(e,o,t);return s},a.prototype.renderInlineAsText=function(e,t,n){for(var r="",s=0,i=e.length;s<i;s++)"text"===e[s].type?r+=e[s].content:"image"===e[s].type?r+=this.renderInlineAsText(e[s].children,t,n):"softbreak"===e[s].type&&(r+="\n");return r},a.prototype.render=function(e,t,n){var r,s,i,o="",a=this.rules;for(r=0,s=e.length;r<s;r++)"inline"===(i=e[r].type)?o+=this.renderInline(e[r].children,t,n):void 0!==a[i]?o+=a[e[r].type](e,r,t,n,this):o+=this.renderToken(e,r,t,n);return o},e.exports=a},2378:e=>{"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},t.prototype.at=function(e,t,n){var r=this.__find__(e),s=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=s.alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,r){var s=this.__find__(e),i=r||{};if(-1===s)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,r){var s=this.__find__(e),i=r||{};if(-1===s)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},2941:(e,t,n)=>{"use strict";var r=n(9963).isSpace;e.exports=function(e,t,n,s){var i,o,a,c,l,u,p,h,f,T,d,m,E,_,g,A,C,N,k,O,S=e.lineMax,L=e.bMarks[t]+e.tShift[t],v=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(L++))return!1;if(s)return!0;for(c=f=e.sCount[t]+1,32===e.src.charCodeAt(L)?(L++,c++,f++,i=!1,A=!0):9===e.src.charCodeAt(L)?(A=!0,(e.bsCount[t]+f)%4==3?(L++,c++,f++,i=!1):i=!0):A=!1,T=[e.bMarks[t]],e.bMarks[t]=L;L<v&&(o=e.src.charCodeAt(L),r(o));)9===o?f+=4-(f+e.bsCount[t]+(i?1:0))%4:f++,L++;for(d=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(A?1:0),u=L>=v,_=[e.sCount[t]],e.sCount[t]=f-c,g=[e.tShift[t]],e.tShift[t]=L-e.bMarks[t],N=e.md.block.ruler.getRules("blockquote"),E=e.parentType,e.parentType="blockquote",h=t+1;h<n&&(O=e.sCount[h]<e.blkIndent,!((L=e.bMarks[h]+e.tShift[h])>=(v=e.eMarks[h])));h++)if(62!==e.src.charCodeAt(L++)||O){if(u)break;for(C=!1,a=0,l=N.length;a<l;a++)if(N[a](e,h,n,!0)){C=!0;break}if(C){e.lineMax=h,0!==e.blkIndent&&(T.push(e.bMarks[h]),d.push(e.bsCount[h]),g.push(e.tShift[h]),_.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}T.push(e.bMarks[h]),d.push(e.bsCount[h]),g.push(e.tShift[h]),_.push(e.sCount[h]),e.sCount[h]=-1}else{for(c=f=e.sCount[h]+1,32===e.src.charCodeAt(L)?(L++,c++,f++,i=!1,A=!0):9===e.src.charCodeAt(L)?(A=!0,(e.bsCount[h]+f)%4==3?(L++,c++,f++,i=!1):i=!0):A=!1,T.push(e.bMarks[h]),e.bMarks[h]=L;L<v&&(o=e.src.charCodeAt(L),r(o));)9===o?f+=4-(f+e.bsCount[h]+(i?1:0))%4:f++,L++;u=L>=v,d.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(A?1:0),_.push(e.sCount[h]),e.sCount[h]=f-c,g.push(e.tShift[h]),e.tShift[h]=L-e.bMarks[h]}for(m=e.blkIndent,e.blkIndent=0,(k=e.push("blockquote_open","blockquote",1)).markup=">",k.map=p=[t,0],e.md.block.tokenize(e,t,h),(k=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=E,p[1]=e.line,a=0;a<g.length;a++)e.bMarks[a+t]=T[a],e.tShift[a+t]=g[a],e.sCount[a+t]=_[a],e.bsCount[a+t]=d[a];return e.blkIndent=m,!0}},5711:e=>{"use strict";e.exports=function(e,t,n){var r,s,i;if(e.sCount[t]-e.blkIndent<4)return!1;for(s=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;s=++r}return e.line=s,(i=e.push("code_block","code",0)).content=e.getLines(t,s,4+e.blkIndent,!1)+"\n",i.map=[t,e.line],!0}},2373:e=>{"use strict";e.exports=function(e,t,n,r){var s,i,o,a,c,l,u,p=!1,h=e.bMarks[t]+e.tShift[t],f=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(h+3>f)return!1;if(126!==(s=e.src.charCodeAt(h))&&96!==s)return!1;if(c=h,(i=(h=e.skipChars(h,s))-c)<3)return!1;if(u=e.src.slice(c,h),o=e.src.slice(h,f),96===s&&o.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;for(a=t;!(++a>=n||(h=c=e.bMarks[a]+e.tShift[a])<(f=e.eMarks[a])&&e.sCount[a]<e.blkIndent);)if(e.src.charCodeAt(h)===s&&!(e.sCount[a]-e.blkIndent>=4||(h=e.skipChars(h,s))-c<i||(h=e.skipSpaces(h))<f)){p=!0;break}return i=e.sCount[t],e.line=a+(p?1:0),(l=e.push("fence","code",0)).info=o,l.content=e.getLines(t+1,a,i,!0),l.markup=u,l.map=[t,e.line],!0}},634:(e,t,n)=>{"use strict";var r=n(9963).isSpace;e.exports=function(e,t,n,s){var i,o,a,c,l=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(i=e.src.charCodeAt(l))||l>=u)return!1;for(o=1,i=e.src.charCodeAt(++l);35===i&&l<u&&o<=6;)o++,i=e.src.charCodeAt(++l);return!(o>6||l<u&&!r(i)||(s||(u=e.skipSpacesBack(u,l),(a=e.skipCharsBack(u,35,l))>l&&r(e.src.charCodeAt(a-1))&&(u=a),e.line=t+1,(c=e.push("heading_open","h"+String(o),1)).markup="########".slice(0,o),c.map=[t,e.line],(c=e.push("inline","",0)).content=e.src.slice(l,u).trim(),c.map=[t,e.line],c.children=[],(c=e.push("heading_close","h"+String(o),-1)).markup="########".slice(0,o)),0))}},8e3:(e,t,n)=>{"use strict";var r=n(9963).isSpace;e.exports=function(e,t,n,s){var i,o,a,c,l=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(i=e.src.charCodeAt(l++))&&45!==i&&95!==i)return!1;for(o=1;l<u;){if((a=e.src.charCodeAt(l++))!==i&&!r(a))return!1;a===i&&o++}return!(o<3||(s||(e.line=t+1,(c=e.push("hr","hr",0)).map=[t,e.line],c.markup=Array(o+1).join(String.fromCharCode(i))),0))}},1857:(e,t,n)=>{"use strict";var r=n(1358),s=n(6557).p,i=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(s.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var s,o,a,c,l=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(c=e.src.slice(l,u),s=0;s<i.length&&!i[s][0].test(c);s++);if(s===i.length)return!1;if(r)return i[s][2];if(o=t+1,!i[s][1].test(c))for(;o<n&&!(e.sCount[o]<e.blkIndent);o++)if(l=e.bMarks[o]+e.tShift[o],u=e.eMarks[o],c=e.src.slice(l,u),i[s][1].test(c)){0!==c.length&&o++;break}return e.line=o,(a=e.push("html_block","",0)).map=[t,o],a.content=e.getLines(t,o,e.blkIndent,!0),!0}},9648:e=>{"use strict";e.exports=function(e,t,n){var r,s,i,o,a,c,l,u,p,h,f=t+1,T=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(h=e.parentType,e.parentType="paragraph";f<n&&!e.isEmpty(f);f++)if(!(e.sCount[f]-e.blkIndent>3)){if(e.sCount[f]>=e.blkIndent&&(c=e.bMarks[f]+e.tShift[f])<(l=e.eMarks[f])&&(45===(p=e.src.charCodeAt(c))||61===p)&&(c=e.skipChars(c,p),(c=e.skipSpaces(c))>=l)){u=61===p?1:2;break}if(!(e.sCount[f]<0)){for(s=!1,i=0,o=T.length;i<o;i++)if(T[i](e,f,n,!0)){s=!0;break}if(s)break}}return!!u&&(r=e.getLines(t,f,e.blkIndent,!1).trim(),e.line=f+1,(a=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),a.map=[t,e.line],(a=e.push("inline","",0)).content=r,a.map=[t,e.line-1],a.children=[],(a=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=h,!0)}},6686:(e,t,n)=>{"use strict";var r=n(9963).isSpace;function s(e,t){var n,s,i,o;return s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],42!==(n=e.src.charCodeAt(s++))&&45!==n&&43!==n||s<i&&(o=e.src.charCodeAt(s),!r(o))?-1:s}function i(e,t){var n,s=e.bMarks[t]+e.tShift[t],i=s,o=e.eMarks[t];if(i+1>=o)retur