diff --git a/browser/browser.css b/browser/browser.css new file mode 100644 index 0000000..9a1770f --- /dev/null +++ b/browser/browser.css @@ -0,0 +1,50 @@ +* { font-family: Arial; } +a { text-decoration: none; } +body { background-color: #DDDDDD; } +h1 { + text-align: center; + font-size: 108px; + color: #363636; + margin: 2%; +} +h2 { + text-align: center; + font-size: 64px; + color: #404040; + margin: 2%; +} +h3 { + font-size: 28px; + margin: 1% 10%; +} +h4 { + font-size: 20px; + color: #202020; + margin: 1% 10%; +} +p, li { + font-size: 18px; + color: #232323; +} +li img { + height: 1em; + width: auto; +} +pre, code { font-family: Consolas; } +body > * { + margin-left: 0; + margin-right: 0; +} +#output > * { + margin-left: 10%; + margin-right: 10%; +} +textarea { + font-family: Consolas; + display: block; + width: 100%; +} +#head { + margin-left: 10%; + margin-right: 10%; +} diff --git a/browser/converter.html b/browser/converter.html new file mode 100644 index 0000000..9f93af3 --- /dev/null +++ b/browser/converter.html @@ -0,0 +1,25 @@ + + + + + + + + + margrave converter + + + +

margrave converter

+ +
+ + diff --git a/browser/converter.js b/browser/converter.js new file mode 100644 index 0000000..b14aa68 --- /dev/null +++ b/browser/converter.js @@ -0,0 +1,6428 @@ +/* Generated by the Nim Compiler v2.0.0 */ +var framePtr = null; +var excHandler = 0; +var lastJSError = null; +var NTI33555179 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI134217746 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI134217747 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI704643083 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1040187747 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1040187726 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1040187736 = {size: 0, kind: 19, base: null, node: null, finalizer: null}; +var NTI1056964612 = {size: 0, kind: 19, base: null, node: null, finalizer: null}; +var NTI1258291343 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1325400067 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1325400068 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1325400069 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400070 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400071 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1291845640 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1291845638 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1291845635 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1291845689 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1291845636 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1308623353 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1342177285 = {size: 0, kind: 19, base: null, node: null, finalizer: null}; +var NTI1308622873 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1308622872 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1308622871 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1308622870 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1308622868 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1308622863 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1308622862 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1308622861 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1308622860 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1308622859 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1308622858 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1308622857 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1342177284 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1275068422 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1275068428 = {size: 0, kind: 19, base: null, node: null, finalizer: null}; +var NTI1275068421 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1275068420 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1275068419 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1275068423 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1224736776 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI771752028 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI721420335 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1224736774 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1224736771 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1040187440 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1040187470 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1040187474 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1040187475 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI771751983 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1040187735 = {size: 0, kind: 19, base: null, node: null, finalizer: null}; +var NTI721420316 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1056964616 = {size: 0, kind: 19, base: null, node: null, finalizer: null}; +var NTI33554448 = {size: 0,kind: 2,base: null,node: null,finalizer: null}; +var NTI1056964611 = {size: 0, kind: 19, base: null, node: null, finalizer: null}; +var NTI33555173 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI33555181 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI33554449 = {size: 0,kind: 28,base: null,node: null,finalizer: null}; +var NTI33555180 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI33555177 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI33555178 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI134217750 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1224736783 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1224736795 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1224736792 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1224736789 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI771751958 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI805306371 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI771751956 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI771751953 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI771751950 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI771751939 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI771751942 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI771751940 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1224736779 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI33554435 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI33554450 = {size: 0,kind: 29,base: null,node: null,finalizer: null}; +var NTI1224736778 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1224736777 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1224736775 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI33554466 = {size: 0,kind: 1,base: null,node: null,finalizer: null}; +var NTI1224736772 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1224736773 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NNI1224736772 = {kind: 2, len: 6, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "curlyNoHtmlEscape", len: 0, typ: NTI33554466, name: "curlyNoHtmlEscape", sons: null}, +{kind: 1, offset: "insertLineBreaks", len: 0, typ: NTI33554466, name: "insertLineBreaks", sons: null}, +{kind: 1, offset: "inlineHtmlHandler", len: 0, typ: NTI1224736775, name: "inlineHtmlHandler", sons: null}, +{kind: 1, offset: "codeBlockLanguageHandler", len: 0, typ: NTI1224736777, name: "codeBlockLanguageHandler", sons: null}, +{kind: 1, offset: "setLinkHandler", len: 0, typ: NTI1224736778, name: "setLinkHandler", sons: null}, +{kind: 1, offset: "disableTextAlignExtension", len: 0, typ: NTI33554466, name: "disableTextAlignExtension", sons: null}]}; +NTI1224736772.node = NNI1224736772; +var NNI771751939 = {kind: 2, offset: 0, typ: null, name: null, len: 29, sons: {"0": {kind: 1, offset: 0, typ: NTI771751939, name: "noTag", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI771751939, name: "p", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI771751939, name: "br", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI771751939, name: "h1", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI771751939, name: "h2", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI771751939, name: "h3", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI771751939, name: "h4", len: 0, sons: null}, +"7": {kind: 1, offset: 7, typ: NTI771751939, name: "h5", len: 0, sons: null}, +"8": {kind: 1, offset: 8, typ: NTI771751939, name: "h6", len: 0, sons: null}, +"9": {kind: 1, offset: 9, typ: NTI771751939, name: "ul", len: 0, sons: null}, +"10": {kind: 1, offset: 10, typ: NTI771751939, name: "ol", len: 0, sons: null}, +"11": {kind: 1, offset: 11, typ: NTI771751939, name: "li", len: 0, sons: null}, +"12": {kind: 1, offset: 12, typ: NTI771751939, name: "blockquote", len: 0, sons: null}, +"13": {kind: 1, offset: 13, typ: NTI771751939, name: "sup", len: 0, sons: null}, +"14": {kind: 1, offset: 14, typ: NTI771751939, name: "sub", len: 0, sons: null}, +"15": {kind: 1, offset: 15, typ: NTI771751939, name: "em", len: 0, sons: null}, +"16": {kind: 1, offset: 16, typ: NTI771751939, name: "strong", len: 0, sons: null}, +"17": {kind: 1, offset: 17, typ: NTI771751939, name: "pre", len: 0, sons: null}, +"18": {kind: 1, offset: 18, typ: NTI771751939, name: "code", len: 0, sons: null}, +"19": {kind: 1, offset: 19, typ: NTI771751939, name: "u", len: 0, sons: null}, +"20": {kind: 1, offset: 20, typ: NTI771751939, name: "s", len: 0, sons: null}, +"21": {kind: 1, offset: 21, typ: NTI771751939, name: "img", len: 0, sons: null}, +"22": {kind: 1, offset: 22, typ: NTI771751939, name: "input", len: 0, sons: null}, +"23": {kind: 1, offset: 23, typ: NTI771751939, name: "a", len: 0, sons: null}, +"24": {kind: 1, offset: 24, typ: NTI771751939, name: "picture", len: 0, sons: null}, +"25": {kind: 1, offset: 25, typ: NTI771751939, name: "video", len: 0, sons: null}, +"26": {kind: 1, offset: 26, typ: NTI771751939, name: "audio", len: 0, sons: null}, +"27": {kind: 1, offset: 27, typ: NTI771751939, name: "source", len: 0, sons: null}, +"28": {kind: 1, offset: 28, typ: NTI771751939, name: "otherTag", len: 0, sons: null}}}; +NTI771751939.node = NNI771751939; +var NNI771751956 = {kind: 2, len: 4, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI805306371, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554435, name: "Field1", sons: null}, +{kind: 1, offset: "Field2", len: 0, typ: NTI33554450, name: "Field2", sons: null}, +{kind: 1, offset: "Field3", len: 0, typ: NTI33554450, name: "Field3", sons: null}]}; +NTI771751956.node = NNI771751956; +NTI771751953.base = NTI771751956; +var NNI771751950 = {kind: 2, len: 4, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "data", len: 0, typ: NTI771751953, name: "data", sons: null}, +{kind: 1, offset: "counter", len: 0, typ: NTI33554435, name: "counter", sons: null}, +{kind: 1, offset: "first", len: 0, typ: NTI33554435, name: "first", sons: null}, +{kind: 1, offset: "last", len: 0, typ: NTI33554435, name: "last", sons: null}]}; +NTI771751950.node = NNI771751950; +NTI771751958.base = NTI771751940; +var NNI771751942 = {kind: 3, offset: "isText", len: 2, typ: NTI33554466, name: "isText", sons: [[setConstr(1), {kind: 1, offset: "str", len: 0, typ: NTI33554450, name: "str", sons: null}], +[setConstr(2), {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "tag", len: 0, typ: NTI771751939, name: "tag", sons: null}, +{kind: 1, offset: "attrs", len: 0, typ: NTI771751950, name: "attrs", sons: null}, +{kind: 1, offset: "content", len: 0, typ: NTI771751958, name: "content", sons: null}]}]]}; +NTI771751942.node = NNI771751942; +NTI771751940.base = NTI771751942; +NTI1224736779.base = NTI771751940; +NTI1224736783.base = NTI771751940; +var NNI1224736795 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI805306371, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554450, name: "Field1", sons: null}, +{kind: 1, offset: "Field2", len: 0, typ: NTI1224736783, name: "Field2", sons: null}]}; +NTI1224736795.node = NNI1224736795; +NTI1224736792.base = NTI1224736795; +var NNI1224736789 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "data", len: 0, typ: NTI1224736792, name: "data", sons: null}, +{kind: 1, offset: "counter", len: 0, typ: NTI33554435, name: "counter", sons: null}]}; +NTI1224736789.node = NNI1224736789; +var NNI1224736773 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "options", len: 0, typ: NTI1224736772, name: "options", sons: null}, +{kind: 1, offset: "str", len: 0, typ: NTI33554450, name: "str", sons: null}, +{kind: 1, offset: "pos", len: 0, typ: NTI33554435, name: "pos", sons: null}, +{kind: 1, offset: "contextStack", len: 0, typ: NTI1224736779, name: "contextStack", sons: null}, +{kind: 1, offset: "linkReferrers", len: 0, typ: NTI1224736789, name: "linkReferrers", sons: null}]}; +NTI1224736773.node = NNI1224736773; +var NNI134217750 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI134217750.node = NNI134217750; +var NNI33555178 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555178.node = NNI33555178; +NTI33555180.base = NTI33555177; +NTI33555181.base = NTI33555177; +var NNI33555177 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI33555180, name: "parent", sons: null}, +{kind: 1, offset: "name", len: 0, typ: NTI33554450, name: "name", sons: null}, +{kind: 1, offset: "message", len: 0, typ: NTI33554449, name: "msg", sons: null}, +{kind: 1, offset: "trace", len: 0, typ: NTI33554449, name: "trace", sons: null}, +{kind: 1, offset: "up", len: 0, typ: NTI33555181, name: "up", sons: null}]}; +NTI33555177.node = NNI33555177; +var NNI33555173 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555173.node = NNI33555173; +NTI33555177.base = NTI33555173; +NTI33555178.base = NTI33555177; +NTI134217750.base = NTI33555178; +NTI1056964611.base = NTI33554448; +NTI1056964616.base = NTI33554448; +var NNI721420316 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI33554435, name: "a", sons: null}, +{kind: 1, offset: "b", len: 0, typ: NTI33554435, name: "b", sons: null}]}; +NTI721420316.node = NNI721420316; +NTI1040187735.base = NTI771751939; +NTI771751983.base = NTI771751940; +NTI1040187475.base = NTI771751940; +var NNI1040187470 = {kind: 2, offset: 0, typ: null, name: null, len: 3, sons: {"0": {kind: 1, offset: 0, typ: NTI1040187470, name: "frDone", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1040187470, name: "frReachedEnd", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1040187470, name: "frFailed", len: 0, sons: null}}}; +NTI1040187470.node = NNI1040187470; +var NNI1040187474 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI1040187470, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI1040187475, name: "Field1", sons: null}]}; +NTI1040187474.node = NNI1040187474; +var NNI1040187440 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554450, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554450, name: "Field1", sons: null}]}; +NTI1040187440.node = NNI1040187440; +NTI1224736774.base = NTI33554450; +var NNI1224736771 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "url", len: 0, typ: NTI33554450, name: "url", sons: null}, +{kind: 1, offset: "tip", len: 0, typ: NTI33554450, name: "tip", sons: null}, +{kind: 1, offset: "altUrls", len: 0, typ: NTI1224736774, name: "altUrls", sons: null}]}; +NTI1224736771.node = NNI1224736771; +var NNI721420335 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI33554435, name: "a", sons: null}, +{kind: 1, offset: "b", len: 0, typ: NTI33554435, name: "b", sons: null}]}; +NTI721420335.node = NNI721420335; +NTI771752028.base = NTI771751940; +var NNI1224736776 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554466, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554435, name: "Field1", sons: null}]}; +NTI1224736776.node = NNI1224736776; +var NNI1275068419 = {kind: 2, offset: 0, typ: null, name: null, len: 14, sons: {"0": {kind: 1, offset: 0, typ: NTI1275068419, name: "xmlError", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1275068419, name: "xmlEof", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1275068419, name: "xmlCharData", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1275068419, name: "xmlWhitespace", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1275068419, name: "xmlComment", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1275068419, name: "xmlPI", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI1275068419, name: "xmlElementStart", len: 0, sons: null}, +"7": {kind: 1, offset: 7, typ: NTI1275068419, name: "xmlElementEnd", len: 0, sons: null}, +"8": {kind: 1, offset: 8, typ: NTI1275068419, name: "xmlElementOpen", len: 0, sons: null}, +"9": {kind: 1, offset: 9, typ: NTI1275068419, name: "xmlAttribute", len: 0, sons: null}, +"10": {kind: 1, offset: 10, typ: NTI1275068419, name: "xmlElementClose", len: 0, sons: null}, +"11": {kind: 1, offset: 11, typ: NTI1275068419, name: "xmlCData", len: 0, sons: null}, +"12": {kind: 1, offset: 12, typ: NTI1275068419, name: "xmlEntity", len: 0, sons: null}, +"13": {kind: 1, offset: 13, typ: NTI1275068419, name: "xmlSpecial", len: 0, sons: null}}}; +NTI1275068419.node = NNI1275068419; +var NNI1275068420 = {kind: 2, offset: 0, typ: null, name: null, len: 10, sons: {"0": {kind: 1, offset: 0, typ: NTI1275068420, name: "errNone", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1275068420, name: "errEndOfCDataExpected", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1275068420, name: "errNameExpected", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1275068420, name: "errSemicolonExpected", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1275068420, name: "errQmGtExpected", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1275068420, name: "errGtExpected", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI1275068420, name: "errEqExpected", len: 0, sons: null}, +"7": {kind: 1, offset: 7, typ: NTI1275068420, name: "errQuoteExpected", len: 0, sons: null}, +"8": {kind: 1, offset: 8, typ: NTI1275068420, name: "errEndOfCommentExpected", len: 0, sons: null}, +"9": {kind: 1, offset: 9, typ: NTI1275068420, name: "errAttributeValueExpected", len: 0, sons: null}}}; +NTI1275068420.node = NNI1275068420; +var NNI1275068421 = {kind: 2, offset: 0, typ: null, name: null, len: 5, sons: {"0": {kind: 1, offset: 0, typ: NTI1275068421, name: "stateStart", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1275068421, name: "stateNormal", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1275068421, name: "stateAttr", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1275068421, name: "stateEmptyElementTag", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1275068421, name: "stateError", len: 0, sons: null}}}; +NTI1275068421.node = NNI1275068421; +var NNI1275068422 = {kind: 2, offset: 0, typ: null, name: null, len: 4, sons: {"0": {kind: 1, offset: 0, typ: NTI1275068422, name: "reportWhitespace", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1275068422, name: "reportComments", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1275068422, name: "allowUnquotedAttribs", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1275068422, name: "allowEmptyAttribs", len: 0, sons: null}}}; +NTI1275068422.node = NNI1275068422; +NTI1275068428.base = NTI1275068422; +var NNI1275068423 = {kind: 2, len: 9, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI33554449, name: "a", sons: null}, +{kind: 1, offset: "b", len: 0, typ: NTI33554449, name: "b", sons: null}, +{kind: 1, offset: "c", len: 0, typ: NTI33554449, name: "c", sons: null}, +{kind: 1, offset: "kind", len: 0, typ: NTI1275068419, name: "kind", sons: null}, +{kind: 1, offset: "err", len: 0, typ: NTI1275068420, name: "err", sons: null}, +{kind: 1, offset: "state", len: 0, typ: NTI1275068421, name: "state", sons: null}, +{kind: 1, offset: "cIsEmpty", len: 0, typ: NTI33554466, name: "cIsEmpty", sons: null}, +{kind: 1, offset: "filename", len: 0, typ: NTI33554449, name: "filename", sons: null}, +{kind: 1, offset: "options", len: 0, typ: NTI1275068428, name: "options", sons: null}]}; +NTI1275068423.node = NNI1275068423; +var NNI1308622858 = {kind: 2, len: 10, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "closeImpl", len: 0, typ: NTI1308622859, name: "closeImpl", sons: null}, +{kind: 1, offset: "atEndImpl", len: 0, typ: NTI1308622860, name: "atEndImpl", sons: null}, +{kind: 1, offset: "setPositionImpl", len: 0, typ: NTI1308622861, name: "setPositionImpl", sons: null}, +{kind: 1, offset: "getPositionImpl", len: 0, typ: NTI1308622862, name: "getPositionImpl", sons: null}, +{kind: 1, offset: "readDataStrImpl", len: 0, typ: NTI1308622863, name: "readDataStrImpl", sons: null}, +{kind: 1, offset: "readLineImpl", len: 0, typ: NTI1308622868, name: "readLineImpl", sons: null}, +{kind: 1, offset: "readDataImpl", len: 0, typ: NTI1308622870, name: "readDataImpl", sons: null}, +{kind: 1, offset: "peekDataImpl", len: 0, typ: NTI1308622871, name: "peekDataImpl", sons: null}, +{kind: 1, offset: "writeDataImpl", len: 0, typ: NTI1308622872, name: "writeDataImpl", sons: null}, +{kind: 1, offset: "flushImpl", len: 0, typ: NTI1308622873, name: "flushImpl", sons: null}]}; +NTI1308622858.node = NNI1308622858; +NTI1308622858.base = NTI33555173; +NTI1308622857.base = NTI1308622858; +NTI1342177285.base = NTI33554448; +var NNI1342177284 = {kind: 2, len: 8, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "bufpos", len: 0, typ: NTI33554435, name: "bufpos", sons: null}, +{kind: 1, offset: "buf", len: 0, typ: NTI33554449, name: "buf", sons: null}, +{kind: 1, offset: "input", len: 0, typ: NTI1308622857, name: "input", sons: null}, +{kind: 1, offset: "lineNumber", len: 0, typ: NTI33554435, name: "lineNumber", sons: null}, +{kind: 1, offset: "sentinel", len: 0, typ: NTI33554435, name: "sentinel", sons: null}, +{kind: 1, offset: "lineStart", len: 0, typ: NTI33554435, name: "lineStart", sons: null}, +{kind: 1, offset: "offsetBase", len: 0, typ: NTI33554435, name: "offsetBase", sons: null}, +{kind: 1, offset: "refillChars", len: 0, typ: NTI1342177285, name: "refillChars", sons: null}]}; +NTI1342177284.node = NNI1342177284; +NTI1342177284.base = NTI33555173; +NTI1275068423.base = NTI1342177284; +var NNI1308623353 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "data", len: 0, typ: NTI33554449, name: "data", sons: null}, +{kind: 1, offset: "pos", len: 0, typ: NTI33554435, name: "pos", sons: null}]}; +NTI1308623353.node = NNI1308623353; +NTI1308623353.base = NTI1308622858; +var NNI1291845636 = {kind: 2, offset: 0, typ: null, name: null, len: 6, sons: {"0": {kind: 1, offset: 0, typ: NTI1291845636, name: "xnText", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1291845636, name: "xnVerbatimText", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1291845636, name: "xnElement", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1291845636, name: "xnCData", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1291845636, name: "xnEntity", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1291845636, name: "xnComment", len: 0, sons: null}}}; +NTI1291845636.node = NNI1291845636; +NTI1291845640.base = NTI1291845635; +var NNI1325400068 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554449, name: "Field1", sons: null}, +{kind: 1, offset: "Field2", len: 0, typ: NTI33554466, name: "Field2", sons: null}]}; +NTI1325400068.node = NNI1325400068; +NTI1325400069.base = NTI1325400068; +var NNI1325400067 = {kind: 2, offset: 0, typ: null, name: null, len: 3, sons: {"0": {kind: 1, offset: 0, typ: NTI1325400067, name: "modeCaseSensitive", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1325400067, name: "modeCaseInsensitive", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1325400067, name: "modeStyleInsensitive", len: 0, sons: null}}}; +NTI1325400067.node = NNI1325400067; +var NNI1325400070 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "counter", len: 0, typ: NTI33554435, name: "counter", sons: null}, +{kind: 1, offset: "data", len: 0, typ: NTI1325400069, name: "data", sons: null}, +{kind: 1, offset: "mode", len: 0, typ: NTI1325400067, name: "mode", sons: null}]}; +NTI1325400070.node = NNI1325400070; +NTI1325400070.base = NTI33555173; +NTI1325400071.base = NTI1325400070; +var NNI1291845638 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 3, offset: "k", len: 6, typ: NTI1291845636, name: "k", sons: [[setConstr(0, 1, 5, 3, 4), {kind: 1, offset: "fText", len: 0, typ: NTI33554449, name: "fText", sons: null}], +[setConstr(2), {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "fTag", len: 0, typ: NTI33554449, name: "fTag", sons: null}, +{kind: 1, offset: "s", len: 0, typ: NTI1291845640, name: "s", sons: null}, +{kind: 1, offset: "fAttr", len: 0, typ: NTI1325400071, name: "fAttr", sons: null}]}]]}, +{kind: 1, offset: "fClientData", len: 0, typ: NTI33554435, name: "fClientData", sons: null}]}; +NTI1291845638.node = NNI1291845638; +NTI1291845635.base = NTI1291845638; +NTI1291845689.base = NTI1291845635; +var NNI1258291343 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554466, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554435, name: "Field1", sons: null}]}; +NTI1258291343.node = NNI1258291343; +NTI1056964612.base = NTI33554448; +NTI1040187736.base = NTI33554448; +NTI1040187726.base = NTI771751940; +NTI1040187747.base = NTI771751940; +NTI704643083.base = NTI771751940; +var NNI134217747 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI134217747.node = NNI134217747; +var NNI134217746 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI134217746.node = NNI134217746; +var NNI33555179 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555179.node = NNI33555179; +NTI33555179.base = NTI33555177; +NTI134217746.base = NTI33555179; +NTI134217747.base = NTI134217746; + +function setConstr() { + var result = {}; + for (var i = 0; i < arguments.length; ++i) { + var x = arguments[i]; + if (typeof(x) == "object") { + for (var j = x[0]; j <= x[1]; ++j) { + result[j] = true; + } + } else { + result[x] = true; + } + } + return result; + + + +} +var ConstSet1 = setConstr(17, 16, 4, 18, 27, 19, 23, 22, 21); + +function nimCopy(dest_33557268, src_33557269, ti_33557270) { + var result_33557279 = null; + + switch (ti_33557270.kind) { + case 21: + case 22: + case 23: + case 5: + if (!(isFatPointer_33557259(ti_33557270))) { + result_33557279 = src_33557269; + } + else { + result_33557279 = [src_33557269[0], src_33557269[1]]; + } + + break; + case 19: + if (dest_33557268 === null || dest_33557268 === undefined) { + dest_33557268 = {}; + } + else { + for (var key in dest_33557268) { delete dest_33557268[key]; } + } + for (var key in src_33557269) { dest_33557268[key] = src_33557269[key]; } + result_33557279 = dest_33557268; + + break; + case 18: + case 17: + if (!((ti_33557270.base == null))) { + result_33557279 = nimCopy(dest_33557268, src_33557269, ti_33557270.base); + } + else { + if ((ti_33557270.kind == 17)) { + result_33557279 = (dest_33557268 === null || dest_33557268 === undefined) ? {m_type: ti_33557270} : dest_33557268; + } + else { + result_33557279 = (dest_33557268 === null || dest_33557268 === undefined) ? {} : dest_33557268; + } + } + nimCopyAux(result_33557279, src_33557269, ti_33557270.node); + break; + case 4: + case 16: + if(ArrayBuffer.isView(src_33557269)) { + if(dest_33557268 === null || dest_33557268 === undefined || dest_33557268.length != src_33557269.length) { + dest_33557268 = new src_33557269.constructor(src_33557269); + } else { + dest_33557268.set(src_33557269, 0); + } + result_33557279 = dest_33557268; + } else { + if (src_33557269 === null) { + result_33557279 = null; + } + else { + if (dest_33557268 === null || dest_33557268 === undefined || dest_33557268.length != src_33557269.length) { + dest_33557268 = new Array(src_33557269.length); + } + result_33557279 = dest_33557268; + for (var i = 0; i < src_33557269.length; ++i) { + result_33557279[i] = nimCopy(result_33557279[i], src_33557269[i], ti_33557270.base); + } + } + } + + break; + case 24: + case 27: + if (src_33557269 === null) { + result_33557279 = null; + } + else { + if (dest_33557268 === null || dest_33557268 === undefined || dest_33557268.length != src_33557269.length) { + dest_33557268 = new Array(src_33557269.length); + } + result_33557279 = dest_33557268; + for (var i = 0; i < src_33557269.length; ++i) { + result_33557279[i] = nimCopy(result_33557279[i], src_33557269[i], ti_33557270.base); + } + } + + break; + case 28: + if (src_33557269 !== null) { + result_33557279 = src_33557269.slice(0); + } + + break; + default: + result_33557279 = src_33557269; + break; + } + + return result_33557279; + +} +var ConstSet2 = setConstr(true); + +function toJSStr(s_33556901) { + var result_33556902 = null; + + var res_33556943 = newSeq_33556919((s_33556901).length); + var i_33556944 = 0; + var j_33556945 = 0; + Label1: { + Label2: while (true) { + if (!(i_33556944 < (s_33556901).length)) break Label2; + var c_33556946 = s_33556901[i_33556944]; + if ((c_33556946 < 128)) { + res_33556943[j_33556945] = String.fromCharCode(c_33556946); + i_33556944 += 1; + } + else { + var helper_33556959 = newSeq_33556919(0); + Label3: { + Label4: while (true) { + if (!true) break Label4; + var code_33556960 = c_33556946.toString(16); + if ((((code_33556960) == null ? 0 : (code_33556960).length) == 1)) { + helper_33556959.push("%0");; + } + else { + helper_33556959.push("%");; + } + + helper_33556959.push(code_33556960);; + i_33556944 += 1; + if ((((s_33556901).length <= i_33556944) || (s_33556901[i_33556944] < 128))) { + break Label3; + } + + c_33556946 = s_33556901[i_33556944]; + } + }; +++excHandler; + try { + res_33556943[j_33556945] = decodeURIComponent(helper_33556959.join("")); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + res_33556943[j_33556945] = helper_33556959.join(""); + lastJSError = prevJSError; + } finally { + } + } + + j_33556945 += 1; + } + }; + if (res_33556943.length < j_33556945) { for (var i = res_33556943.length ; i < j_33556945 ; ++i) res_33556943.push(null); } + else { res_33556943.length = j_33556945; }; + result_33556902 = res_33556943.join(""); + + return result_33556902; + +} + +function raiseException(e_33556653, ename_33556654) { + e_33556653.name = ename_33556654; + if ((excHandler == 0)) { + unhandledException(e_33556653); + } + + throw e_33556653; + + +} + +function raiseFieldError2(f_33556854, discVal_33556855) { + raiseException({message: (f_33556854 || []).concat(discVal_33556855 || [],[39] || []), parent: null, m_type: NTI134217750, name: null, trace: [], up: null}, "FieldDefect"); + + +} + +function makeNimstrLit(c_33556895) { + var result = []; + for (var i = 0; i < c_33556895.length; ++i) { + result[i] = c_33556895.charCodeAt(i); + } + return result; + + + +} + +function mnewString(len_33557003) { + return new Array(len_33557003); + + + +} + +function nimBoolToStr(x_33556438) { + var result_33556439 = []; + + if (x_33556438) { + result_33556439 = nimCopy(null, [116,114,117,101], NTI33554449); + } + else { + result_33556439 = nimCopy(null, [102,97,108,115,101], NTI33554449); + } + + + return result_33556439; + +} + +function reprDiscriminant(e_33557614, typ_33557615) { + var Temporary1; + + var result_33557616 = []; + + switch (typ_33557615.kind) { + case 14: + Temporary1 = reprEnum(e_33557614, typ_33557615); + break; + case 1: + Temporary1 = nimBoolToStr(!((e_33557614 == 0))); + break; + default: + Temporary1 = HEX24_369098760(e_33557614); + break; + } + result_33557616 = nimCopy(null, Temporary1, NTI33554449); + + return result_33557616; + +} +var ConstSet3 = setConstr(42, 45, 43); +var ConstSet4 = setConstr(9, [11, 12], 32); + var InlineWhitespace_1040187582 = nimCopy(null, ConstSet4, NTI1056964611); +var ConstSet5 = setConstr([48, 57]); + var Digits_1056964626 = nimCopy(null, ConstSet5, NTI1056964616); +var ConstSet6 = setConstr(true); +var ConstSet7 = setConstr(true); +var ConstSet8 = setConstr(9, 10, 12); + var SpecialLineTags_1040187575 = nimCopy(null, ConstSet8, NTI1040187735); +var ConstSet9 = setConstr(true); +var ConstSet10 = setConstr(true); +var ConstSet11 = setConstr(true); +var ConstSet12 = setConstr(true); +var ConstSet13 = setConstr(true); +var ConstSet14 = setConstr(32, 9, 11, 13, 10, 12); +var ConstSet15 = setConstr(32, 9, 11, 13, 10, 12); +var ConstSet16 = setConstr(true); +var ConstSet17 = setConstr(true); +var ConstSet18 = setConstr(32, 9, 11, 13, 10, 12); + var Whitespace_1056964621 = nimCopy(null, ConstSet18, NTI1056964611); +var ConstSet19 = setConstr(true); +var ConstSet20 = setConstr([97, 122], [65, 90], [48, 57], 45, 95, 58, 46); +var ConstSet21 = setConstr(true); +var ConstSet22 = setConstr(0); +var ConstSet23 = setConstr(2, 1); +var ConstSet24 = setConstr(0); +var ConstSet25 = setConstr(2, 1); +var ConstSet26 = setConstr(0); +var ConstSet27 = setConstr(2, 1); +var ConstSet28 = setConstr(0); +var ConstSet29 = setConstr(2, 1); +var ConstSet30 = setConstr(true); +var ConstSet31 = setConstr(true); +var ConstSet32 = setConstr(9, [11, 13], 32); +var ConstSet33 = setConstr(true); + +function cstrToNimstr(c_33556898) { + var ln = c_33556898.length; + var result = new Array(ln); + var r = 0; + for (var i = 0; i < ln; ++i) { + var ch = c_33556898.charCodeAt(i); + + if (ch < 128) { + result[r] = ch; + } + else { + if (ch < 2048) { + result[r] = (ch >> 6) | 192; + } + else { + if (ch < 55296 || ch >= 57344) { + result[r] = (ch >> 12) | 224; + } + else { + ++i; + ch = 65536 + (((ch & 1023) << 10) | (c_33556898.charCodeAt(i) & 1023)); + result[r] = (ch >> 18) | 240; + ++r; + result[r] = ((ch >> 12) & 63) | 128; + } + ++r; + result[r] = ((ch >> 6) & 63) | 128; + } + ++r; + result[r] = (ch & 63) | 128; + } + ++r; + } + return result; + + + +} + +function genericReset(x_33557306, ti_33557307) { + var result_33557308 = null; + + result_33557308 = null; + switch (ti_33557307.kind) { + case 21: + case 22: + case 23: + case 5: + if (isFatPointer_33557259(ti_33557307)) { + result_33557308 = [null, 0]; + + } + + break; + case 19: + result_33557308 = {}; + + break; + case 18: + case 17: + if ((ti_33557307.kind == 17)) { + result_33557308 = {m_type: ti_33557307}; + } + else { + result_33557308 = {}; + } + + break; + case 24: + case 27: + case 28: + result_33557308 = []; + + break; + case 4: + case 16: + result_33557308 = new Array(x_33557306.length); + for (var i = 0; i < x_33557306.length; ++i) { + result_33557308[i] = genericReset(x_33557306[i], ti_33557307.base); + } + + break; + default: + break; + } + + return result_33557308; + +} +var ConstSet34 = setConstr(true); +var ConstSet35 = setConstr(true); +var ConstSet36 = setConstr(true); +var ConstSet37 = setConstr(true); +var ConstSet38 = setConstr(true); +var ConstSet39 = setConstr(true); +var ConstSet40 = setConstr(true); +var ConstSet41 = setConstr(true); +var ConstSet42 = setConstr(true); +var ConstSet43 = setConstr(true); +var ConstSet44 = setConstr(true); +var ConstSet45 = setConstr(true); +var ConstSet46 = setConstr(true); +var ConstSet47 = setConstr(true); +var ConstSet48 = setConstr(true); +var ConstSet49 = setConstr(true); +var ConstSet50 = setConstr(true); +var ConstSet51 = setConstr(true); +var ConstSet52 = setConstr(2, 1); +var ConstSet53 = setConstr(true); +var ConstSet54 = setConstr(2, 1); +var ConstSet55 = setConstr(0); +var ConstSet56 = setConstr(2, 1); +var ConstSet57 = setConstr(0, 1); +var ConstSet58 = setConstr(2, 1); +var ConstSet59 = setConstr(0); +var ConstSet60 = setConstr(2, 1); +var ConstSet61 = setConstr(0); +var ConstSet62 = setConstr(2, 1); + +function nimMin(a_33557104, b_33557105) { + var Temporary1; + + var result_33557106 = 0; + + BeforeRet: { + if ((a_33557104 <= b_33557105)) { + Temporary1 = a_33557104; + } + else { + Temporary1 = b_33557105; + } + + result_33557106 = Temporary1; + break BeforeRet; + }; + + return result_33557106; + +} + +function nimMax(a_33557108, b_33557109) { + var Temporary1; + + var result_33557110 = 0; + + BeforeRet: { + if ((b_33557109 <= a_33557108)) { + Temporary1 = a_33557108; + } + else { + Temporary1 = b_33557109; + } + + result_33557110 = Temporary1; + break BeforeRet; + }; + + return result_33557110; + +} +var ConstSet63 = setConstr(13, 10, 47); +var ConstSet64 = setConstr(2, 1); +var ConstSet65 = setConstr([65, 90], [97, 122], 95, 58, [128, 255]); + +function addChar(x_33557415, c_33557416) { + x_33557415.push(c_33557416); + + +} +var ConstSet66 = setConstr([65, 90], [97, 122], [48, 57], 46, 45, 95, 58, [128, 255]); +var ConstSet67 = setConstr([65, 90], [97, 122], 95, 58, [128, 255]); +var ConstSet68 = setConstr([48, 57]); +var ConstSet69 = setConstr(2, 4, 12); + +function eqStrings(a_33557041, b_33557042) { + if (a_33557041 == b_33557042) return true; + if (a_33557041 === null && b_33557042.length == 0) return true; + if (b_33557042 === null && a_33557041.length == 0) return true; + if ((!a_33557041) || (!b_33557042)) return false; + var alen = a_33557041.length; + if (alen != b_33557042.length) return false; + for (var i = 0; i < alen; ++i) + if (a_33557041[i] != b_33557042[i]) return false; + return true; + + + +} +var ConstSet70 = setConstr(39, 34); +var ConstSet71 = setConstr(34, 39, 96, 61, 60, 62, 32, 0, 9, 10, 12, 12); +var ConstSet72 = setConstr(2); +var ConstSet73 = setConstr(2); +var ConstSet74 = setConstr(2); +var ConstSet75 = setConstr(2); +var ConstSet76 = setConstr(0, 1, 5, 3, 4); +var ConstSet77 = setConstr(0, 1, 5, 3, 4); +var ConstSet78 = setConstr(2); +var ConstSet79 = setConstr([65, 90]); +var ConstSet80 = setConstr([65, 90]); +var ConstSet81 = setConstr([65, 90]); +var ConstSet82 = setConstr(2); +var ConstSet83 = setConstr(0, 1, 5, 3, 4); +var ConstSet84 = setConstr(0, 1, 5, 3, 4); +var ConstSet85 = setConstr(true); +var ConstSet86 = setConstr(true); +var ConstSet87 = setConstr(true); +var ConstSet88 = setConstr(true); +var ConstSet89 = setConstr([65, 90], [97, 122]); + var Letters_1056964622 = nimCopy(null, ConstSet89, NTI1056964612); +var ConstSet90 = setConstr(true); +var ConstSet91 = setConstr(true); +var ConstSet92 = setConstr(true); +var ConstSet93 = setConstr(true); +var ConstSet94 = setConstr(true); +var ConstSet95 = setConstr(12, 1); +var ConstSet96 = setConstr(true); +var ConstSet97 = setConstr(true); +var ConstSet98 = setConstr(40, 91, 123, 58); + var IdStarts_1040187576 = nimCopy(null, ConstSet98, NTI1040187736); +var ConstSet99 = setConstr([97, 122], [65, 90], [48, 57], 45, 95, 58, 46); +var ConstSet100 = setConstr(true); +var ConstSet101 = setConstr(true); +var ConstSet102 = setConstr(true); +var ConstSet103 = setConstr(true); + var defaultParserOptions_1224736805 = {curlyNoHtmlEscape: false, insertLineBreaks: false, inlineHtmlHandler: null, codeBlockLanguageHandler: null, setLinkHandler: null, disableTextAlignExtension: false}; +var ConstSet104 = setConstr(true); +var ConstSet105 = setConstr(true); +var ConstSet106 = setConstr(true); +var ConstSet107 = setConstr(true); +var ConstSet108 = setConstr(true); +var ConstSet109 = setConstr(true); +var ConstSet110 = setConstr(true); +var ConstSet111 = setConstr(true); +var objectID_805306545 = [0]; + +function input_553649823() { + var result_553649824 = null; + + result_553649824 = document.getElementById("input").value; + + return result_553649824; + +} + +function isFatPointer_33557259(ti_33557260) { + var result_33557261 = false; + + BeforeRet: { + result_33557261 = !((ConstSet1[ti_33557260.base.kind] != undefined)); + break BeforeRet; + }; + + return result_33557261; + +} + +function nimCopyAux(dest_33557272, src_33557273, n_33557274) { + switch (n_33557274.kind) { + case 0: + break; + case 1: + dest_33557272[n_33557274.offset] = nimCopy(dest_33557272[n_33557274.offset], src_33557273[n_33557274.offset], n_33557274.typ); + + break; + case 2: + for (var i = 0; i < n_33557274.sons.length; i++) { + nimCopyAux(dest_33557272, src_33557273, n_33557274.sons[i]); + } + + break; + case 3: + dest_33557272[n_33557274.offset] = nimCopy(dest_33557272[n_33557274.offset], src_33557273[n_33557274.offset], n_33557274.typ); + for (var i = 0; i < n_33557274.sons.length; ++i) { + nimCopyAux(dest_33557272, src_33557273, n_33557274.sons[i][1]); + } + + break; + } + + +} + +function initMargraveParser_1224736806(text_1224736807) { + var result_1224736808 = ({options: ({curlyNoHtmlEscape: false, insertLineBreaks: false, inlineHtmlHandler: null, codeBlockLanguageHandler: null, setLinkHandler: null, disableTextAlignExtension: false}), str: null, pos: 0, contextStack: [], linkReferrers: ({data: [], counter: 0})}); + + result_1224736808 = nimCopy(result_1224736808, {str: text_1224736807, pos: 0, options: ({curlyNoHtmlEscape: false, insertLineBreaks: false, inlineHtmlHandler: null, codeBlockLanguageHandler: null, setLinkHandler: null, disableTextAlignExtension: false}), contextStack: [], linkReferrers: ({data: [], counter: 0})}, NTI1224736773); + + return result_1224736808; + +} + +function add_33556373(x_33556374, x_33556374_Idx, y_33556375) { + if (x_33556374[x_33556374_Idx] === null) { x_33556374[x_33556374_Idx] = []; } + var off = x_33556374[x_33556374_Idx].length; + x_33556374[x_33556374_Idx].length += y_33556375.length; + for (var i = 0; i < y_33556375.length; ++i) { + x_33556374[x_33556374_Idx][off+i] = y_33556375.charCodeAt(i); + } + + + +} + +function newSeq_33556919(len_33556921) { + var result_33556922 = []; + + result_33556922 = new Array(len_33556921); for (var i = 0 ; i < len_33556921 ; ++i) { result_33556922[i] = null; } + return result_33556922; + +} + +function unhandledException(e_33556649) { + var buf_33556650 = [[]]; + if (!(((e_33556649.message).length == 0))) { + buf_33556650[0].push.apply(buf_33556650[0], [69,114,114,111,114,58,32,117,110,104,97,110,100,108,101,100,32,101,120,99,101,112,116,105,111,110,58,32]);; + buf_33556650[0].push.apply(buf_33556650[0], e_33556649.message);; + } + else { + buf_33556650[0].push.apply(buf_33556650[0], [69,114,114,111,114,58,32,117,110,104,97,110,100,108,101,100,32,101,120,99,101,112,116,105,111,110]);; + } + + buf_33556650[0].push.apply(buf_33556650[0], [32,91]);; + add_33556373(buf_33556650, 0, e_33556649.name); + buf_33556650[0].push.apply(buf_33556650[0], [93,10]);; + var cbuf_33556651 = toJSStr(buf_33556650[0]); + if (typeof(Error) !== "undefined") { + throw new Error(cbuf_33556651); + } + else { + throw cbuf_33556651; + } + + + +} + +function addChars_301990090(result_301990092, result_301990092_Idx, x_301990093, start_301990094, n_301990095) { + var Temporary1; + + var old_301990096 = (result_301990092[result_301990092_Idx]).length; + if (result_301990092[result_301990092_Idx].length < (Temporary1 = (old_301990096 + n_301990095), Temporary1)) { for (var i = result_301990092[result_301990092_Idx].length; i < Temporary1; ++i) result_301990092[result_301990092_Idx].push(0); } + else {result_301990092[result_301990092_Idx].length = Temporary1; }; + Label2: { + var iHEX60gensym4_301990110 = 0; + var i_553649928 = 0; + Label3: { + Label4: while (true) { + if (!(i_553649928 < n_301990095)) break Label4; + iHEX60gensym4_301990110 = i_553649928; + result_301990092[result_301990092_Idx][(old_301990096 + iHEX60gensym4_301990110)] = x_301990093.charCodeAt((start_301990094 + iHEX60gensym4_301990110)); + i_553649928 += 1; + } + }; + }; + + +} + +function addChars_301990086(result_301990088, result_301990088_Idx, x_301990089) { + addChars_301990090(result_301990088, result_301990088_Idx, x_301990089, 0, ((x_301990089) == null ? 0 : (x_301990089).length)); + + +} + +function addInt_301990111(result_301990112, result_301990112_Idx, x_301990113) { + addChars_301990086(result_301990112, result_301990112_Idx, ((x_301990113) + "")); + + +} + +function addInt_301990129(result_301990130, result_301990130_Idx, x_301990131) { + addInt_301990111(result_301990130, result_301990130_Idx, BigInt(x_301990131)); + + +} + +function HEX24_369098760(x_369098761) { + var result_369098762 = [[]]; + + addInt_301990129(result_369098762, 0, x_369098761); + + return result_369098762[0]; + +} + +function reprEnum(e_33557576, typ_33557577) { + var result_33557578 = []; + + var tmp_33557579 = false; + var item_33557580 = typ_33557577.node.sons[e_33557576]; + tmp_33557579 = item_33557580 !== undefined + if (tmp_33557579) { + result_33557578 = nimCopy(null, makeNimstrLit(item_33557580.name), NTI33554449); + } + else { + result_33557578 = nimCopy(null, (HEX24_369098760(e_33557576) || []).concat([32,40,105,110,118,97,108,105,100,32,100,97,116,97,33,41] || []), NTI33554449); + } + + + return result_33557578; + +} + +function anyNext_1241514494(parser_1241514495, offset_1241514496) { + var result_1241514497 = false; + + result_1241514497 = ((parser_1241514495.pos + offset_1241514496) < ((parser_1241514495.str) == null ? 0 : (parser_1241514495.str).length)); + + return result_1241514497; + +} + +function peekMatch_1241514513(parser_1241514514, pat_1241514515, offset_1241514516) { + var result_1241514517 = false; + + result_1241514517 = (anyNext_1241514494(parser_1241514514, offset_1241514516) && (pat_1241514515[parser_1241514514.str.charCodeAt((parser_1241514514.pos + offset_1241514516))] != undefined)); + + return result_1241514517; + +} + +function nextMatch_1241514623(parser_1241514624, pat_1241514625, offset_1241514626) { + var result_1241514627 = false; + + result_1241514627 = peekMatch_1241514513(parser_1241514624, pat_1241514625, offset_1241514626); + if (result_1241514627) { + parser_1241514624.pos += (offset_1241514626 + 1); + } + + + return result_1241514627; + +} + +function peekMatch_1241514508(parser_1241514509, pat_1241514510, offset_1241514511) { + var result_1241514512 = false; + + result_1241514512 = (anyNext_1241514494(parser_1241514509, offset_1241514511) && (parser_1241514509.str.charCodeAt((parser_1241514509.pos + offset_1241514511)) == pat_1241514510)); + + return result_1241514512; + +} + +function nextMatch_1241514614(parser_1241514615, pat_1241514616, offset_1241514617) { + var result_1241514618 = false; + + result_1241514618 = peekMatch_1241514508(parser_1241514615, pat_1241514616, offset_1241514617); + if (result_1241514618) { + parser_1241514615.pos += (offset_1241514617 + 1); + } + + + return result_1241514618; + +} + +function HEX5BHEX5D_721420310(c_721420311, ind_721420315) { + var result_721420316 = null; + + result_721420316 = c_721420311.substring(ind_721420315.a, (ind_721420315.b + 1)); + + return result_721420316; + +} + +function HEX2EHEX2E_1157627952(a_1157627955, b_1157627956) { + var result_1157627957 = ({a: 0, b: 0}); + + result_1157627957 = nimCopy(result_1157627957, {a: a_1157627955, b: b_1157627956}, NTI721420316); + + return result_1157627957; + +} + +function peekMatch_1241514548(parser_1241514549, pat_1241514550, offset_1241514551) { + var Temporary1; + + var result_1241514552 = false; + + if (!anyNext_1241514494(parser_1241514549, ((offset_1241514551 + (pat_1241514550).length) - 1))) Temporary1 = false; else { Temporary1 = (HEX5BHEX5D_721420310(parser_1241514549.str, HEX2EHEX2E_1157627952((parser_1241514549.pos + offset_1241514551), (((parser_1241514549.pos + offset_1241514551) + (pat_1241514550).length) - 1))) == toJSStr(pat_1241514550)); } result_1241514552 = Temporary1; + + return result_1241514552; + +} + +function nextMatch_1241514652(parser_1241514653, pat_1241514654, offset_1241514655) { + var result_1241514656 = false; + + result_1241514656 = peekMatch_1241514548(parser_1241514653, pat_1241514654, offset_1241514655); + if (result_1241514656) { + parser_1241514653.pos += (offset_1241514655 + (pat_1241514654).length); + } + + + return result_1241514656; + +} + +function HEX5BHEX5D_771754824(s_771754826, i_771754827) { + var result_771754828 = null; + var result_771754828_Idx = 0; + + result_771754828 = s_771754826; result_771754828_Idx = ((s_771754826).length - i_771754827); + + return [result_771754828, result_771754828_Idx]; + +} + +function HEX5BHEX5D_771754820(elem_771754821, i_771754822) { + var Temporary1; + var Temporary2; + + var result_771754823 = null; + + var Temporary1 = elem_771754821; + if (ConstSet7[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + result_771754823 = (Temporary2 = HEX5BHEX5D_771754824(Temporary1.content, i_771754822), Temporary2)[0][Temporary2[1]]; + + return result_771754823; + +} + +function add_771754880(elem_771754881, cont_771754882) { + var Temporary1; + + var Temporary1 = elem_771754881; + if (ConstSet11[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + Temporary1.content.push(cont_771754882);; + + +} + +function newElem_771752046(tag_771752047, content_771752052) { + var result_771752053 = null; + + result_771752053 = {isText: false, tag: tag_771752047, content: nimCopy(null, content_771752052, NTI771751983), attrs: ({data: [], counter: 0, first: 0, last: 0}), str: null}; + + return result_771752053; + +} + +function newStr_771751993(s_771751994) { + var result_771751995 = null; + + result_771751995 = {isText: true, str: s_771751994, tag: 0, attrs: ({data: [], counter: 0, first: 0, last: 0}), content: []}; + + return result_771751995; + +} + +function add_771754914(elem_771754915, str_771754916) { + var Temporary1; + + var Temporary1 = elem_771754915; + if (ConstSet12[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + Temporary1.content.push(newStr_771751993(str_771754916));; + + +} + +function addNewline_553648226(parser_553648229, elem_553648231) { + var options_553648235 = nimCopy(null, parser_553648229.options, NTI1224736772); + if (options_553648235.insertLineBreaks) { + add_771754880(elem_553648231, newElem_771752046(2, [])); + } + else { + add_771754914(elem_553648231, "\n"); + } + + + +} + +function add_771754890(x_771754892, x_771754892_Idx, y_771754893) { + var Temporary1; + + var xl_771754898 = (x_771754892[x_771754892_Idx]).length; + if (x_771754892[x_771754892_Idx].length < (Temporary1 = (xl_771754898 + (y_771754893).length), Temporary1)) { for (var i = x_771754892[x_771754892_Idx].length ; i < Temporary1 ; ++i) x_771754892[x_771754892_Idx].push(null); } + else { x_771754892[x_771754892_Idx].length = Temporary1; }; + Label2: { + var i_771754913 = 0; + var colontmp__553649931 = 0; + colontmp__553649931 = (y_771754893).length - 1; + var res_553649932 = 0; + Label3: { + Label4: while (true) { + if (!(res_553649932 <= colontmp__553649931)) break Label4; + i_771754913 = res_553649932; + x_771754892[x_771754892_Idx][(xl_771754898 + i_771754913)] = y_771754893[i_771754913]; + res_553649932 += 1; + } + }; + }; + + +} + +function add_771754887(elem_771754888, cont_771754889) { + var Temporary1; + + var Temporary1 = elem_771754888; + if (ConstSet13[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + add_771754890(Temporary1, "content", cont_771754889); + + +} + +function anyPrev_1241514498(parser_1241514499, offset_1241514500) { + var result_1241514501 = false; + + result_1241514501 = (0 <= ((parser_1241514499.pos + offset_1241514500) - 1)); + + return result_1241514501; + +} + +function peekPrevMatch_1241514588(parser_1241514590, pat_1241514591, offset_1241514592) { + var result_1241514593 = false; + + result_1241514593 = (anyPrev_1241514498(parser_1241514590, offset_1241514592) && peekMatch_1241514513(parser_1241514590, pat_1241514591, (offset_1241514592 - 1))); + + return result_1241514593; + +} + +function prevWhitespace_1241514584(parser_1241514585, offset_1241514586) { + var result_1241514587 = false; + + result_1241514587 = (!(anyPrev_1241514498(parser_1241514585, offset_1241514586)) || peekPrevMatch_1241514588(parser_1241514585, ConstSet14, offset_1241514586)); + + return result_1241514587; + +} + +function nextWhitespace_1241514594(parser_1241514595, offset_1241514596) { + var result_1241514597 = false; + + result_1241514597 = (!(anyNext_1241514494(parser_1241514595, offset_1241514596)) || peekMatch_1241514513(parser_1241514595, ConstSet15, (offset_1241514596 + 1))); + + return result_1241514597; + +} + +function surroundedWhitespace_1241514598(parser_1241514599, offset_1241514600) { + var result_1241514601 = false; + + result_1241514601 = (prevWhitespace_1241514584(parser_1241514599, offset_1241514600) && nextWhitespace_1241514594(parser_1241514599, offset_1241514600)); + + return result_1241514601; + +} + +function add_553648982(x_553648984, x_553648984_Idx) { + if (null != "*") { if (null == x_553648984[x_553648984_Idx]) x_553648984[x_553648984_Idx] = "*"; else x_553648984[x_553648984_Idx] += "*"; }; + + +} + +function onlyNextWhitespace_1241514606(parser_1241514607, offset_1241514608) { + var result_1241514609 = false; + + result_1241514609 = (!(prevWhitespace_1241514584(parser_1241514607, offset_1241514608)) && nextWhitespace_1241514594(parser_1241514607, offset_1241514608)); + + return result_1241514609; + +} + +function add_553649013(x_553649015, x_553649015_Idx) { + if (null != "_") { if (null == x_553649015[x_553649015_Idx]) x_553649015[x_553649015_Idx] = "_"; else x_553649015[x_553649015_Idx] += "_"; }; + + +} + +function add_721420296(x_721420297, x_721420297_Idx, y_721420298) { + var Temporary1; + + if (null != (Temporary1 = String.fromCharCode(y_721420298), Temporary1)) { if (null == x_721420297[x_721420297_Idx]) x_721420297[x_721420297_Idx] = Temporary1; else x_721420297[x_721420297_Idx] += Temporary1; }; + + +} + +function peekMatch_1241514522(parser_1241514523, pat_1241514524, offset_1241514525, len_1241514526) { + var Temporary1; + + var result_1241514527 = false; + + BeforeRet: { + if (anyNext_1241514494(parser_1241514523, ((offset_1241514525 + len_1241514526) - 1))) { + Label2: { + var i_1241514532 = 0; + var colontmp__553649981 = 0; + colontmp__553649981 = len_1241514526; + var i_553649982 = 0; + Label3: { + Label4: while (true) { + if (!(i_553649982 < colontmp__553649981)) break Label4; + i_1241514532 = i_553649982; + if (!((parser_1241514523.str.charCodeAt((parser_1241514523.pos + (offset_1241514525 + i_1241514532))) == pat_1241514524))) { + result_1241514527 = false; + break BeforeRet; + } + + i_553649982 += 1; + } + }; + }; + Temporary1 = true; + } + else { + Temporary1 = false; + } + + result_1241514527 = Temporary1; + }; + + return result_1241514527; + +} + +function nextMatch_1241514632(parser_1241514633, pat_1241514634, offset_1241514635, len_1241514636) { + var result_1241514637 = false; + + result_1241514637 = peekMatch_1241514522(parser_1241514633, pat_1241514634, offset_1241514635, len_1241514636); + if (result_1241514637) { + parser_1241514633.pos += (offset_1241514635 + len_1241514636); + } + + + return result_1241514637; + +} + +function parseCodeBlockStr_553649078(parser_553649080, delimChar_553649082) { + var Temporary10; + var Temporary11; + + var result_553649083 = {Field0: null, Field1: null}; + + BeforeRet: { + var colontmp__553649973 = ""; + var colontmp__553649974 = ""; + result_553649083 = nimCopy(result_553649083, {Field0: colontmp__553649973, Field1: colontmp__553649974}, NTI1040187440); + var delimLen_553649084 = 3; + Label1: { + Label2: while (true) { + if (!nextMatch_1241514614(parser_553649080, delimChar_553649082, 0)) break Label2; + delimLen_553649084 += 1; + } + }; + Label3: { + Label4: while (true) { + if (!nextMatch_1241514623(parser_553649080, Whitespace_1056964621, 0)) break Label4; + } + }; + var options_553649096 = nimCopy(null, parser_553649080.options, NTI1224736772); + if (!((options_553649096.codeBlockLanguageHandler == null))) { + Label5: { + Label6: while (true) { + var ch_553649101 = parser_553649080.str.charCodeAt((parser_553649080.pos + 0)); + if (!nextMatch_1241514623(parser_553649080, ConstSet20, 0)) break Label6; + add_721420296(result_553649083, "Field0", ch_553649101); + } + }; + } + else { + } + + Label7: { + var ch_553649102 = 0; + Label8: { + Label9: while (true) { + if (!(parser_553649080.pos < ((parser_553649080.str) == null ? 0 : (parser_553649080.str).length))) break Label9; + ch_553649102 = parser_553649080.str.charCodeAt((parser_553649080.pos + 0)); + if (nextMatch_1241514632(parser_553649080, delimChar_553649082, 0, delimLen_553649084)) { + parser_553649080.pos -= 1; + break BeforeRet; + } + else { + switch (ch_553649102) { + case 62: + Temporary10 = ">"; + break; + case 60: + Temporary10 = "<"; + break; + case 38: + Temporary10 = "&"; + break; + default: + Temporary10 = String.fromCharCode(ch_553649102); + break; + } + if (null != (Temporary11 = Temporary10, Temporary11)) { if (null == result_553649083.Field1) result_553649083.Field1 = Temporary11; else result_553649083.Field1 += Temporary11; }; + } + + parser_553649080.pos += 1; + } + }; + }; + }; + + return result_553649083; + +} + +function parseCodeBlock_553649072(parser_553649074, delimChar_553649076) { + var result_553649077 = null; + + var str_553649108 = parseCodeBlockStr_553649078(parser_553649074, delimChar_553649076); + result_553649077 = newElem_771752046(17, [newStr_771751993(str_553649108.Field1)]); + var options_553649120 = nimCopy(null, parser_553649074.options, NTI1224736772); + if (!((options_553649120.codeBlockLanguageHandler == null))) { + if (!((((str_553649108.Field0) == null ? 0 : (str_553649108.Field0).length) == 0))) { + options_553649120.codeBlockLanguageHandler(result_553649077, str_553649108.Field0); + } + + } + else { + } + + + return result_553649077; + +} + +function add_553648464(x_553648466, x_553648466_Idx) { + if (null != "(") { if (null == x_553648466[x_553648466_Idx]) x_553648466[x_553648466_Idx] = "("; else x_553648466[x_553648466_Idx] += "("; }; + + +} + +function add_553648477(x_553648479, x_553648479_Idx) { + if (null != ")") { if (null == x_553648479[x_553648479_Idx]) x_553648479[x_553648479_Idx] = ")"; else x_553648479[x_553648479_Idx] += ")"; }; + + +} + +function add_553648512(x_553648514, x_553648514_Idx) { + if (null != "\\") { if (null == x_553648514[x_553648514_Idx]) x_553648514[x_553648514_Idx] = "\\"; else x_553648514[x_553648514_Idx] += "\\"; }; + + +} + +function parseLink_553648417(parser_553648419, failOnNewline_553648421) { + var Temporary6; + + var result_553648422 = {Field0: false, Field1: ({url: null, tip: null, altUrls: []})}; + + BeforeRet: { + var state_553648432 = 0; + var delim_553648433 = 0; + var escaped_553648434 = false; + var openparens_553648435 = 1; + var urlNum_553648436 = (-1); + result_553648422.Field1.url = ""; + Label1: { + Label2: while (true) { + if (!nextMatch_1241514623(parser_553648419, ConstSet32, 0)) break Label2; + } + }; + Label3: { + var ch_553648445 = 0; + Label4: { + Label5: while (true) { + if (!(parser_553648419.pos < ((parser_553648419.str) == null ? 0 : (parser_553648419.str).length))) break Label5; + ch_553648445 = parser_553648419.str.charCodeAt((parser_553648419.pos + 0)); + switch (state_553648432) { + case 0: + switch (ch_553648445) { + case 9: + case 11: + case 12: + case 13: + case 32: + break; + case 10: + result_553648422.Field0 = failOnNewline_553648421; + break BeforeRet; + break; + default: + parser_553648419.pos -= 1; + state_553648432 = 1; + break; + } + break; + case 1: + switch (ch_553648445) { + case 9: + case 11: + case 12: + case 13: + case 32: + state_553648432 = 2; + break; + case 10: + result_553648422.Field0 = failOnNewline_553648421; + break BeforeRet; + break; + case 40: + openparens_553648435 += 1; + if ((urlNum_553648436 < 0)) { + add_553648464(result_553648422.Field1, "url"); + } + else { + add_553648464(result_553648422.Field1.altUrls, urlNum_553648436); + } + + break; + case 41: + openparens_553648435 -= 1; + if ((openparens_553648435 == 0)) { + result_553648422.Field0 = true; + break BeforeRet; + } + else { + if ((urlNum_553648436 < 0)) { + add_553648477(result_553648422.Field1, "url"); + } + else { + add_553648477(result_553648422.Field1.altUrls, urlNum_553648436); + } + + } + + break; + default: + if ((urlNum_553648436 < 0)) { + add_721420296(result_553648422.Field1, "url", ch_553648445); + } + else { + add_721420296(result_553648422.Field1.altUrls, urlNum_553648436, ch_553648445); + } + + break; + } + break; + case 2: + switch (ch_553648445) { + case 34: + case 39: + case 60: + state_553648432 = 3; + if ((ch_553648445 == 60)) { + Temporary6 = 62; + } + else { + Temporary6 = ch_553648445; + } + + delim_553648433 = Temporary6; + break; + case 124: + state_553648432 = 0; + result_553648422.Field1.altUrls.push("");; + urlNum_553648436 += 1; + break; + case 41: + result_553648422.Field0 = true; + break BeforeRet; + break; + case 10: + result_553648422.Field0 = failOnNewline_553648421; + break BeforeRet; + break; + case 9: + case 11: + case 12: + case 13: + case 32: + break; + default: + parser_553648419.pos -= 1; + state_553648432 = 3; + delim_553648433 = 41; + break; + } + break; + case 3: + if (!(escaped_553648434)) { + if ((ch_553648445 == 92)) { + escaped_553648434 = true; + } + else { + if ((ch_553648445 == delim_553648433)) { + if ((delim_553648433 == 41)) { + parser_553648419.pos -= 1; + } + + state_553648432 = 4; + } + else { + if ((ch_553648445 == 10)) { + result_553648422.Field0 = failOnNewline_553648421; + break BeforeRet; + } + else { + add_721420296(result_553648422.Field1, "tip", ch_553648445); + } + }} + } + else { + if (!((setConstr(92, delim_553648433)[ch_553648445] != undefined))) { + add_553648512(result_553648422.Field1, "tip"); + } + + add_721420296(result_553648422.Field1, "tip", ch_553648445); + escaped_553648434 = false; + } + + break; + case 4: + switch (ch_553648445) { + case 41: + result_553648422.Field0 = true; + break BeforeRet; + break; + case 10: + result_553648422.Field0 = failOnNewline_553648421; + break BeforeRet; + break; + case 9: + case 11: + case 12: + case 13: + case 32: + break; + default: + result_553648422.Field0 = false; + break BeforeRet; + break; + } + break; + } + parser_553648419.pos += 1; + } + }; + }; + result_553648422.Field0 = failOnNewline_553648421; + }; + + return result_553648422; + +} + +function nextPowerOfTwo_889192643(x_889192644) { + var result_889192645 = 0; + + result_889192645 = (x_889192644 - 1); + result_889192645 = (result_889192645 | (result_889192645 >> 16)); + result_889192645 = (result_889192645 | (result_889192645 >> 8)); + result_889192645 = (result_889192645 | (result_889192645 >> 4)); + result_889192645 = (result_889192645 | (result_889192645 >> 2)); + result_889192645 = (result_889192645 | (result_889192645 >> 1)); + result_889192645 += (1 + ((x_889192644 <= 0) ? 1 : 0)); + + return result_889192645; + +} + +function slotsNeeded_788529194(count_788529195) { + var result_788529196 = 0; + + result_788529196 = nextPowerOfTwo_889192643((Math.trunc((count_788529195 * 3) / 2) + 4)); + + return result_788529196; + +} + +function imul_805306728(a_805306729, b_805306730) { + var result_805306731 = 0; + + var mask_805306732 = 65535; + var aHi_805306737 = (((a_805306729 >>> 16) & mask_805306732) >>> 0); + var aLo_805306738 = ((a_805306729 & mask_805306732) >>> 0); + var bHi_805306743 = (((b_805306730 >>> 16) & mask_805306732) >>> 0); + var bLo_805306744 = ((b_805306730 & mask_805306732) >>> 0); + result_805306731 = ((((aLo_805306738 * bLo_805306744) >>> 0) + ((((((aHi_805306737 * bLo_805306744) >>> 0) + ((aLo_805306738 * bHi_805306743) >>> 0)) >>> 0) << 16) >>> 0)) >>> 0); + + return result_805306731; + +} + +function rotl32_805306749(x_805306750, r_805306751) { + var result_805306752 = 0; + + result_805306752 = ((((x_805306750 << r_805306751) >>> 0) | (x_805306750 >>> (32 - r_805306751))) >>> 0); + + return result_805306752; + +} + +function murmurHash_805306761(x_805306762) { + var result_805306763 = 0; + + BeforeRet: { + var size_805306772 = (x_805306762).length; + var stepSize_805306773 = 4; + var n_805306774 = Math.trunc(size_805306772 / stepSize_805306773); + var h1_805306775 = 0; + var i_805306776 = 0; + Label1: { + Label2: while (true) { + if (!(i_805306776 < (n_805306774 * stepSize_805306773))) break Label2; + var k1_805306777 = 0; + var j_805306778 = stepSize_805306773; + Label3: { + Label4: while (true) { + if (!(0 < j_805306778)) break Label4; + j_805306778 -= 1; + k1_805306777 = ((((k1_805306777 << 8) >>> 0) | x_805306762[(i_805306776 + j_805306778)]) >>> 0); + } + }; + i_805306776 += stepSize_805306773; + k1_805306777 = imul_805306728(k1_805306777, 3432918353); + k1_805306777 = rotl32_805306749(k1_805306777, 15); + k1_805306777 = imul_805306728(k1_805306777, 461845907); + h1_805306775 = ((h1_805306775 ^ k1_805306777) >>> 0); + h1_805306775 = rotl32_805306749(h1_805306775, 13); + h1_805306775 = ((((h1_805306775 * 5) >>> 0) + 3864292196) >>> 0); + } + }; + var k1_805306797 = 0; + var rem_805306798 = Math.trunc(size_805306772 % stepSize_805306773); + Label5: { + Label6: while (true) { + if (!(0 < rem_805306798)) break Label6; + rem_805306798 -= 1; + k1_805306797 = ((((k1_805306797 << 8) >>> 0) | x_805306762[(i_805306776 + rem_805306798)]) >>> 0); + } + }; + k1_805306797 = imul_805306728(k1_805306797, 3432918353); + k1_805306797 = rotl32_805306749(k1_805306797, 15); + k1_805306797 = imul_805306728(k1_805306797, 461845907); + h1_805306775 = ((h1_805306775 ^ k1_805306797) >>> 0); + h1_805306775 = ((h1_805306775 ^ size_805306772) >>> 0); + h1_805306775 = ((h1_805306775 ^ (h1_805306775 >>> 16)) >>> 0); + h1_805306775 = imul_805306728(h1_805306775, 2246822507); + h1_805306775 = ((h1_805306775 ^ (h1_805306775 >>> 13)) >>> 0); + h1_805306775 = imul_805306728(h1_805306775, 3266489909); + h1_805306775 = ((h1_805306775 ^ (h1_805306775 >>> 16)) >>> 0); + result_805306763 = Number(BigInt.asIntN(32, BigInt(h1_805306775))); + break BeforeRet; + }; + + return result_805306763; + +} + +function hash_805306866(x_805306867) { + var result_805306868 = 0; + + var xx_805306869 = cstrToNimstr(x_805306867); + result_805306868 = murmurHash_805306761((xx_805306869.slice(0, (xx_805306869).length - 1 + 1))); + + return result_805306868; + +} + +function isFilled_788529183(hcode_788529184) { + var result_788529185 = false; + + result_788529185 = !((hcode_788529184 == 0)); + + return result_788529185; + +} + +function nextTry_788529186(h_788529187, maxHash_788529188) { + var result_788529189 = 0; + + result_788529189 = ((h_788529187 + 1) & maxHash_788529188); + + return result_788529189; + +} + +function rawGet_771752666(t_771752669, key_771752670, hc_771752671, hc_771752671_Idx) { + var result_771752672 = 0; + + BeforeRet: { + hc_771752671[hc_771752671_Idx] = hash_805306866(key_771752670); + if ((hc_771752671[hc_771752671_Idx] == 0)) { + hc_771752671[hc_771752671_Idx] = 314159265; + } + + if (((t_771752669.data).length == 0)) { + result_771752672 = (-1); + break BeforeRet; + } + + var h_771752723 = (hc_771752671[hc_771752671_Idx] & (t_771752669.data).length - 1); + Label1: { + Label2: while (true) { + if (!isFilled_788529183(t_771752669.data[h_771752723].Field0)) break Label2; + if (((t_771752669.data[h_771752723].Field0 == hc_771752671[hc_771752671_Idx]) && (t_771752669.data[h_771752723].Field2 == key_771752670))) { + result_771752672 = h_771752723; + break BeforeRet; + } + + h_771752723 = nextTry_788529186(h_771752723, (t_771752669.data).length - 1); + } + }; + result_771752672 = ((-1) - h_771752723); + }; + + return result_771752672; + +} + +function mustRehash_771752993(t_771752995) { + var result_771752996 = false; + + result_771752996 = ((((t_771752995.data).length * 2) < (t_771752995.counter * 3)) || (((t_771752995.data).length - t_771752995.counter) < 4)); + + return result_771752996; + +} + +function rawInsert_771753565(t_771753568, data_771753569, data_771753569_Idx, key_771753570, val_771753571, hc_771753572, h_771753573) { + data_771753569[data_771753569_Idx][h_771753573].Field2 = key_771753570; + data_771753569[data_771753569_Idx][h_771753573].Field3 = val_771753571; + data_771753569[data_771753569_Idx][h_771753573].Field0 = hc_771753572; + data_771753569[data_771753569_Idx][h_771753573].Field1 = (-1); + if ((t_771753568.first < 0)) { + t_771753568.first = h_771753573; + } + + if ((0 <= t_771753568.last)) { + data_771753569[data_771753569_Idx][t_771753568.last].Field1 = h_771753573; + } + + t_771753568.last = h_771753573; + + +} + +function enlarge_771753154(t_771753157) { + var Temporary6; + var Temporary7; + + var n_771753160 = []; + n_771753160 = new Array(((t_771753157.data).length * 2)); for (var i = 0 ; i < ((t_771753157.data).length * 2) ; ++i) { n_771753160[i] = {Field0: 0, Field1: 0, Field2: null, Field3: null}; } var h_771753212 = t_771753157.first; + t_771753157.first = (-1); + t_771753157.last = (-1); + var Temporary1 = t_771753157.data; t_771753157.data = n_771753160; n_771753160 = Temporary1; Label2: { + Label3: while (true) { + if (!(0 <= h_771753212)) break Label3; + var nxt_771753270 = n_771753160[h_771753212].Field1; + var eh_771753324 = n_771753160[h_771753212].Field0; + if (isFilled_788529183(eh_771753324)) { + var j_771753328 = (eh_771753324 & (t_771753157.data).length - 1); + Label4: { + Label5: while (true) { + if (!isFilled_788529183(t_771753157.data[j_771753328].Field0)) break Label5; + j_771753328 = nextTry_788529186(j_771753328, (t_771753157.data).length - 1); + } + }; + Temporary6 = n_771753160[h_771753212].Field2; + n_771753160[h_771753212].Field2 = genericReset(n_771753160[h_771753212].Field2, NTI33554450); + Temporary7 = n_771753160[h_771753212].Field3; + n_771753160[h_771753212].Field3 = genericReset(n_771753160[h_771753212].Field3, NTI33554450); + rawInsert_771753565(t_771753157, t_771753157, "data", Temporary6, Temporary7, n_771753160[h_771753212].Field0, j_771753328); + } + + h_771753212 = nxt_771753270; + } + }; + + +} + +function rawGetKnownHC_771753863(t_771753866, key_771753867, hc_771753868) { + var result_771753869 = 0; + + BeforeRet: { + if (((t_771753866.data).length == 0)) { + result_771753869 = (-1); + break BeforeRet; + } + + var h_771753920 = (hc_771753868 & (t_771753866.data).length - 1); + Label1: { + Label2: while (true) { + if (!isFilled_788529183(t_771753866.data[h_771753920].Field0)) break Label2; + if (((t_771753866.data[h_771753920].Field0 == hc_771753868) && (t_771753866.data[h_771753920].Field2 == key_771753867))) { + result_771753869 = h_771753920; + break BeforeRet; + } + + h_771753920 = nextTry_788529186(h_771753920, (t_771753866.data).length - 1); + } + }; + result_771753869 = ((-1) - h_771753920); + }; + + return result_771753869; + +} + +function HEX5BHEX5DHEX3D_771752598(t_771752601, key_771752602, val_771752603) { + if (((t_771752601.data).length == 0)) { + var correctSizeHEX60gensym4_771752652 = slotsNeeded_788529194(32); + t_771752601.counter = 0; + t_771752601.data = new Array(correctSizeHEX60gensym4_771752652); for (var i = 0 ; i < correctSizeHEX60gensym4_771752652 ; ++i) { t_771752601.data[i] = {Field0: 0, Field1: 0, Field2: null, Field3: null}; } t_771752601.first = (-1); + t_771752601.last = (-1); + } + + var hc_771752657 = [0]; + var index_771752886 = rawGet_771752666(t_771752601, key_771752602, hc_771752657, 0); + if ((0 <= index_771752886)) { + t_771752601.data[index_771752886].Field3 = val_771752603; + } + else { + if (((t_771752601.data).length == 0)) { + var correctSizeHEX60gensym9_771752988 = slotsNeeded_788529194(32); + t_771752601.counter = 0; + t_771752601.data = new Array(correctSizeHEX60gensym9_771752988); for (var i = 0 ; i < correctSizeHEX60gensym9_771752988 ; ++i) { t_771752601.data[i] = {Field0: 0, Field1: 0, Field2: null, Field3: null}; } t_771752601.first = (-1); + t_771752601.last = (-1); + } + + if (mustRehash_771752993(t_771752601)) { + enlarge_771753154(t_771752601); + index_771752886 = rawGetKnownHC_771753863(t_771752601, key_771752602, hc_771752657[0]); + } + + index_771752886 = ((-1) - index_771752886); + rawInsert_771753565(t_771752601, t_771752601, "data", key_771752602, val_771752603, hc_771752657[0], index_771752886); + t_771752601.counter += 1; + } + + + +} + +function attr_771752554(elem_771752555, key_771752556, val_771752557) { + var Temporary1; + + var Temporary1 = elem_771752555; + if (ConstSet34[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'attrs\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + HEX5BHEX5DHEX3D_771752598(Temporary1.attrs, key_771752556, val_771752557); + + +} + +function attrEscaped_771754108(elem_771754109, key_771754110, val_771754111) { + var esc_771754112 = [""]; + Label1: { + var v_771754113 = 0; + var iHEX60gensym6_553649989 = 0; + var nHEX60gensym6_553649990 = ((val_771754111) == null ? 0 : (val_771754111).length); + Label2: { + Label3: while (true) { + if (!(iHEX60gensym6_553649989 < nHEX60gensym6_553649990)) break Label3; + v_771754113 = val_771754111.charCodeAt(iHEX60gensym6_553649989); + if ((v_771754113 == 34)) { + if (null != """) { if (null == esc_771754112[0]) esc_771754112[0] = """; else esc_771754112[0] += """; }; + } + else { + add_721420296(esc_771754112, 0, v_771754113); + } + + iHEX60gensym6_553649989 += 1; + } + }; + }; + attr_771752554(elem_771754109, key_771754110, esc_771754112[0]); + + +} + +function find_1241514083(a_1241514086, item_1241514087) { + var result_1241514088 = 0; + + BeforeRet: { + result_1241514088 = 0; + Label1: { + var i_1241514102 = null; + var i_553650006 = 0; + Label2: { + Label3: while (true) { + if (!(i_553650006 < (a_1241514086).length)) break Label3; + i_1241514102 = a_1241514086[i_553650006]; + if ((i_1241514102 == item_1241514087)) { + break BeforeRet; + } + + result_1241514088 += 1; + i_553650006 += 1; + } + }; + }; + result_1241514088 = (-1); + }; + + return result_1241514088; + +} + +function contains_1241514078(a_1241514080, item_1241514081) { + var result_1241514082 = false; + + BeforeRet: { + result_1241514082 = (0 <= find_1241514083(a_1241514080, item_1241514081)); + break BeforeRet; + }; + + return result_1241514082; + +} + +function HEX5BHEX5D_721420325(c_721420326, ind_721420331) { + var result_721420332 = null; + + result_721420332 = c_721420326.substring((((c_721420326) == null ? 0 : (c_721420326).length) - ind_721420331.a), ((((c_721420326) == null ? 0 : (c_721420326).length) - ind_721420331.b) + 1)); + + return result_721420332; + +} + +function HEX2EHEX2E_1241514013(a_1241514016, b_1241514017) { + var result_1241514018 = ({a: 0, b: 0}); + + result_1241514018 = nimCopy(result_1241514018, {a: a_1241514016, b: b_1241514017}, NTI721420335); + + return result_1241514018; + +} + +function del_771754222(t_771754225, key_771754226) { + var Temporary4; + var Temporary5; + + BeforeRet: { + if ((t_771754225.counter == 0)) { + break BeforeRet; + } + + var n_771754229 = []; + n_771754229 = new Array((t_771754225.data).length); for (var i = 0 ; i < (t_771754225.data).length ; ++i) { n_771754229[i] = {Field0: 0, Field1: 0, Field2: null, Field3: null}; } var h_771754281 = t_771754225.first; + t_771754225.first = (-1); + t_771754225.last = (-1); + var Temporary1 = t_771754225.data; t_771754225.data = n_771754229; n_771754229 = Temporary1; var resHEX60gensym17_771754287 = 0; + resHEX60gensym17_771754287 = hash_805306866(key_771754226); + if ((resHEX60gensym17_771754287 == 0)) { + resHEX60gensym17_771754287 = 314159265; + } + + var hc_771754288 = resHEX60gensym17_771754287; + Label2: { + Label3: while (true) { + if (!(0 <= h_771754281)) break Label3; + var nxt_771754342 = n_771754229[h_771754281].Field1; + if (isFilled_788529183(n_771754229[h_771754281].Field0)) { + if (((n_771754229[h_771754281].Field0 == hc_771754288) && (n_771754229[h_771754281].Field2 == key_771754226))) { + t_771754225.counter -= 1; + } + else { + var j_771754627 = ((-1) - rawGetKnownHC_771753863(t_771754225, n_771754229[h_771754281].Field2, n_771754229[h_771754281].Field0)); + Temporary4 = n_771754229[h_771754281].Field2; + n_771754229[h_771754281].Field2 = genericReset(n_771754229[h_771754281].Field2, NTI33554450); + Temporary5 = n_771754229[h_771754281].Field3; + n_771754229[h_771754281].Field3 = genericReset(n_771754229[h_771754281].Field3, NTI33554450); + rawInsert_771753565(t_771754225, t_771754225, "data", Temporary4, Temporary5, n_771754229[h_771754281].Field0, j_771754627); + } + + } + + h_771754281 = nxt_771754342; + } + }; + }; + + +} + +function pop_1241514231(t_1241514234, key_1241514235, val_1241514236, val_1241514236_Idx) { + var Temporary1; + + var result_1241514237 = false; + + var hc_1241514238 = [0]; + var index_1241514253 = rawGet_771752666(t_1241514234, key_1241514235, hc_1241514238, 0); + result_1241514237 = (0 <= index_1241514253); + if (result_1241514237) { + Temporary1 = t_1241514234.data[index_1241514253].Field3; + t_1241514234.data[index_1241514253].Field3 = genericReset(t_1241514234.data[index_1241514253].Field3, NTI33554450); + val_1241514236[val_1241514236_Idx] = Temporary1; + del_771754222(t_1241514234, key_1241514235); + } + + + return result_1241514237; + +} + +function insert_1241514374(x_1241514376, x_1241514376_Idx, item_1241514377, i_1241514378) { + var it_1241514398 = null; + x_1241514376[x_1241514376_Idx] = x_1241514376[x_1241514376_Idx] || []; x_1241514376[x_1241514376_Idx].splice(i_1241514378, 0, it_1241514398); + x_1241514376[x_1241514376_Idx][i_1241514378] = item_1241514377; + + +} + +function setLinkDefault_1241514007(elem_1241514008, link_1241514009) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + var Temporary5; + var Temporary6; + var Temporary7; + var Temporary8; + var Temporary9; + var Temporary13; + + var Temporary1 = elem_1241514008; + if (ConstSet36[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + switch (Temporary1.tag) { + case 23: + attrEscaped_771754108(elem_1241514008, "href", link_1241514009.url); + break; + case 21: + var firstUrl_1241514010 = link_1241514009.url; + if ((((4 <= ((firstUrl_1241514010) == null ? 0 : (firstUrl_1241514010).length)) && contains_1241514078([".mp4", ".m4v", ".mov", ".ogv"], HEX5BHEX5D_721420325(firstUrl_1241514010, HEX2EHEX2E_1241514013(4, 1)))) || ((5 <= ((firstUrl_1241514010) == null ? 0 : (firstUrl_1241514010).length)) && (HEX5BHEX5D_721420325(firstUrl_1241514010, HEX2EHEX2E_1241514013(5, 1)) == ".webm")))) { + var Temporary2 = elem_1241514008; + if (ConstSet37[Temporary2.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary2.isText, NTI33554466)); } + Temporary2.tag = 25; + } + else { + if ((((4 <= ((firstUrl_1241514010) == null ? 0 : (firstUrl_1241514010).length)) && contains_1241514078([".mp3", ".oga", ".ogg", ".wav"], HEX5BHEX5D_721420325(firstUrl_1241514010, HEX2EHEX2E_1241514013(4, 1)))) || ((5 <= ((firstUrl_1241514010) == null ? 0 : (firstUrl_1241514010).length)) && (HEX5BHEX5D_721420325(firstUrl_1241514010, HEX2EHEX2E_1241514013(5, 1)) == ".flac")))) { + var Temporary3 = elem_1241514008; + if (ConstSet38[Temporary3.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary3.isText, NTI33554466)); } + Temporary3.tag = 26; + } + } + var Temporary4 = elem_1241514008; + if (ConstSet39[Temporary4.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary4.isText, NTI33554466)); } + if (!((Temporary4.tag == 21))) { + attr_771752554(elem_1241514008, "controls", ""); + var altText_1241514190 = [null]; + var Temporary5 = elem_1241514008; + if (ConstSet40[Temporary5.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'attrs\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary5.isText, NTI33554466)); } + if (pop_1241514231(Temporary5.attrs, "alt", altText_1241514190, 0)) { + var Temporary6 = elem_1241514008; + if (ConstSet41[Temporary6.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary6.isText, NTI33554466)); } + Temporary6.content = nimCopy(null, [newStr_771751993(altText_1241514190[0])], NTI771752028); + } + + } + + if (((link_1241514009.altUrls).length == 0)) { + attrEscaped_771754108(elem_1241514008, "src", link_1241514009.url); + } + else { + var sourceAttr_1241514363 = null; + var Temporary7 = elem_1241514008; + if (ConstSet42[Temporary7.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary7.isText, NTI33554466)); } + if ((Temporary7.tag == 21)) { + var Temporary8 = elem_1241514008; + if (ConstSet43[Temporary8.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary8.isText, NTI33554466)); } + Temporary8.tag = 24; + sourceAttr_1241514363 = "srcset"; + } + else { + sourceAttr_1241514363 = "src"; + } + + var i_1241514368 = 0; + var srcElemHEX60gensym16_1241514373 = newElem_771752046(27, []); + attr_771752554(srcElemHEX60gensym16_1241514373, sourceAttr_1241514363, link_1241514009.url); + var Temporary9 = elem_1241514008; + if (ConstSet44[Temporary9.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary9.isText, NTI33554466)); } + insert_1241514374(Temporary9, "content", srcElemHEX60gensym16_1241514373, i_1241514368); + i_1241514368 += 1; + Label10: { + var alt_1241514423 = null; + var i_553650001 = 0; + var L_553650002 = (link_1241514009.altUrls).length; + Label11: { + Label12: while (true) { + if (!(i_553650001 < L_553650002)) break Label12; + alt_1241514423 = link_1241514009.altUrls[i_553650001]; + var srcElemHEX60gensym21_1241514425 = newElem_771752046(27, []); + attr_771752554(srcElemHEX60gensym21_1241514425, sourceAttr_1241514363, alt_1241514423); + var Temporary13 = elem_1241514008; + if (ConstSet45[Temporary13.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary13.isText, NTI33554466)); } + insert_1241514374(Temporary13, "content", srcElemHEX60gensym21_1241514425, i_1241514368); + i_1241514368 += 1; + i_553650001 += 1; + } + }; + }; + } + + break; + default: + attrEscaped_771754108(elem_1241514008, "src", link_1241514009.url); + break; + } + + +} + +function setLink_553648563(parser_553648565, elem_553648567, link_553648568) { + var options_553648575 = nimCopy(null, parser_553648565.options, NTI1224736772); + if (!((options_553648575.setLinkHandler == null))) { + options_553648575.setLinkHandler(elem_553648567, link_553648568); + } + else { + setLinkDefault_1241514007(elem_553648567, link_553648568); + } + + + +} + +function add_553648595(x_553648597, x_553648597_Idx) { + if (null != "[") { if (null == x_553648597[x_553648597_Idx]) x_553648597[x_553648597_Idx] = "["; else x_553648597[x_553648597_Idx] += "["; }; + + +} + +function add_553648604(x_553648606, x_553648606_Idx) { + if (null != "]") { if (null == x_553648606[x_553648606_Idx]) x_553648606[x_553648606_Idx] = "]"; else x_553648606[x_553648606_Idx] += "]"; }; + + +} + +function escapeHtmlChar_1241513991(ch_1241513992) { + var Temporary1; + + var result_1241513993 = null; + + switch (ch_1241513992) { + case 60: + Temporary1 = "<"; + break; + case 62: + Temporary1 = ">"; + break; + case 38: + Temporary1 = "&"; + break; + default: + Temporary1 = String.fromCharCode(ch_1241513992); + break; + } + result_1241513993 = Temporary1; + + return result_1241513993; + +} + +function parseReferenceName_553648581(parser_553648583, failed_553648585, failed_553648585_Idx) { + var Temporary4; + var Temporary5; + var Temporary6; + + var result_553648586 = [null]; + + BeforeRet: { + result_553648586[0] = ""; + var openbracks_553648587 = 1; + var escaped_553648588 = false; + Label1: { + var ch_553648589 = 0; + Label2: { + Label3: while (true) { + if (!(parser_553648583.pos < ((parser_553648583.str) == null ? 0 : (parser_553648583.str).length))) break Label3; + ch_553648589 = parser_553648583.str.charCodeAt((parser_553648583.pos + 0)); + if (!(escaped_553648588)) { + switch (ch_553648589) { + case 92: + escaped_553648588 = true; + break; + case 91: + openbracks_553648587 += 1; + add_553648595(result_553648586, 0); + break; + case 93: + openbracks_553648587 -= 1; + if ((openbracks_553648587 == 0)) { + break BeforeRet; + } + else { + add_553648604(result_553648586, 0); + } + + break; + case 10: + failed_553648585[failed_553648585_Idx] = true; + break BeforeRet; + break; + default: + if (null != (Temporary4 = escapeHtmlChar_1241513991(ch_553648589), Temporary4)) { if (null == result_553648586[0]) result_553648586[0] = Temporary4; else result_553648586[0] += Temporary4; }; + break; + } + } + else { + switch (ch_553648589) { + case 92: + case 91: + case 93: + Temporary5 = String.fromCharCode(ch_553648589); + break; + default: + Temporary5 = ("\\\\" + escapeHtmlChar_1241513991(ch_553648589)); + break; + } + if (null != (Temporary6 = Temporary5, Temporary6)) { if (null == result_553648586[0]) result_553648586[0] = Temporary6; else result_553648586[0] += Temporary6; }; + escaped_553648588 = false; + } + + parser_553648583.pos += 1; + } + }; + }; + failed_553648585[failed_553648585_Idx] = true; + }; + + return result_553648586[0]; + +} + +function rawGet_553648671(t_553648674, key_553648675, hc_553648676, hc_553648676_Idx) { + var result_553648677 = 0; + + BeforeRet: { + hc_553648676[hc_553648676_Idx] = hash_805306866(key_553648675); + if ((hc_553648676[hc_553648676_Idx] == 0)) { + hc_553648676[hc_553648676_Idx] = 314159265; + } + + if (((t_553648674.data).length == 0)) { + result_553648677 = (-1); + break BeforeRet; + } + + var h_553648688 = (hc_553648676[hc_553648676_Idx] & (t_553648674.data).length - 1); + Label1: { + Label2: while (true) { + if (!isFilled_788529183(t_553648674.data[h_553648688].Field0)) break Label2; + if (((t_553648674.data[h_553648688].Field0 == hc_553648676[hc_553648676_Idx]) && (t_553648674.data[h_553648688].Field1 == key_553648675))) { + result_553648677 = h_553648688; + break BeforeRet; + } + + h_553648688 = nextTry_788529186(h_553648688, (t_553648674.data).length - 1); + } + }; + result_553648677 = ((-1) - h_553648688); + }; + + return result_553648677; + +} + +function mustRehash_553648737(t_553648739) { + var result_553648740 = false; + + result_553648740 = ((((t_553648739.data).length * 2) < (t_553648739.counter * 3)) || (((t_553648739.data).length - t_553648739.counter) < 4)); + + return result_553648740; + +} + +function rawInsert_553648812(t_553648816, data_553648817, data_553648817_Idx, key_553648818, val_553648819, hc_553648820, h_553648821) { + data_553648817[data_553648817_Idx][h_553648821].Field1 = key_553648818; + data_553648817[data_553648817_Idx][h_553648821].Field2 = nimCopy(null, val_553648819, NTI1224736783); + data_553648817[data_553648817_Idx][h_553648821].Field0 = hc_553648820; + + +} + +function enlarge_553648770(t_553648773) { + var n_553648776 = []; + n_553648776 = new Array(((t_553648773.data).length * 2)); for (var i = 0 ; i < ((t_553648773.data).length * 2) ; ++i) { n_553648776[i] = {Field0: 0, Field1: null, Field2: []}; } var Temporary1 = t_553648773.data; t_553648773.data = n_553648776; n_553648776 = Temporary1; Label2: { + var i_553648800 = 0; + var colontmp__553650015 = 0; + colontmp__553650015 = (n_553648776).length - 1; + var res_553650017 = 0; + Label3: { + Label4: while (true) { + if (!(res_553650017 <= colontmp__553650015)) break Label4; + i_553648800 = res_553650017; + var eh_553648801 = n_553648776[i_553648800].Field0; + if (isFilled_788529183(eh_553648801)) { + var j_553648805 = (eh_553648801 & (t_553648773.data).length - 1); + Label5: { + Label6: while (true) { + if (!isFilled_788529183(t_553648773.data[j_553648805].Field0)) break Label6; + j_553648805 = nextTry_788529186(j_553648805, (t_553648773.data).length - 1); + } + }; + rawInsert_553648812(t_553648773, t_553648773, "data", n_553648776[i_553648800].Field1, n_553648776[i_553648800].Field2, eh_553648801, j_553648805); + } + + res_553650017 += 1; + } + }; + }; + + +} + +function rawGetKnownHC_553648822(t_553648825, key_553648826, hc_553648827) { + var result_553648828 = 0; + + BeforeRet: { + if (((t_553648825.data).length == 0)) { + result_553648828 = (-1); + break BeforeRet; + } + + var h_553648839 = (hc_553648827 & (t_553648825.data).length - 1); + Label1: { + Label2: while (true) { + if (!isFilled_788529183(t_553648825.data[h_553648839].Field0)) break Label2; + if (((t_553648825.data[h_553648839].Field0 == hc_553648827) && (t_553648825.data[h_553648839].Field1 == key_553648826))) { + result_553648828 = h_553648839; + break BeforeRet; + } + + h_553648839 = nextTry_788529186(h_553648839, (t_553648825.data).length - 1); + } + }; + result_553648828 = ((-1) - h_553648839); + }; + + return result_553648828; + +} + +function mgetOrPut_553648649(t_553648652, key_553648653, val_553648654) { + var result_553648655 = null; + var result_553648655_Idx = 0; + + if (((t_553648652.data).length == 0)) { + var correctSizeHEX60gensym29_553648665 = slotsNeeded_788529194(32); + t_553648652.counter = 0; + t_553648652.data = new Array(correctSizeHEX60gensym29_553648665); for (var i = 0 ; i < correctSizeHEX60gensym29_553648665 ; ++i) { t_553648652.data[i] = {Field0: 0, Field1: null, Field2: []}; } } + + var hc_553648670 = [0]; + var index_553648723 = rawGet_553648671(t_553648652, key_553648653, hc_553648670, 0); + if ((index_553648723 < 0)) { + if (((t_553648652.data).length == 0)) { + var correctSizeHEX60gensym34_553648732 = slotsNeeded_788529194(32); + t_553648652.counter = 0; + t_553648652.data = new Array(correctSizeHEX60gensym34_553648732); for (var i = 0 ; i < correctSizeHEX60gensym34_553648732 ; ++i) { t_553648652.data[i] = {Field0: 0, Field1: null, Field2: []}; } } + + if (mustRehash_553648737(t_553648652)) { + enlarge_553648770(t_553648652); + index_553648723 = rawGetKnownHC_553648822(t_553648652, key_553648653, hc_553648670[0]); + } + + index_553648723 = ((-1) - index_553648723); + rawInsert_553648812(t_553648652, t_553648652, "data", key_553648653, val_553648654, hc_553648670[0], index_553648723); + t_553648652.counter += 1; + } + + result_553648655 = t_553648652.data[index_553648723]; result_553648655_Idx = "Field2"; + + return [result_553648655, result_553648655_Idx]; + +} + +function parseBracket_553648364(parser_553648366, image_553648368, singleLine_553648369) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + var Temporary5; + var Temporary6; + var Temporary7; + var Temporary8; + var Temporary9; + var Temporary10; + var Temporary11; + var Temporary12; + var Temporary13; + var Temporary14; + + var result_553648370 = null; + + BeforeRet: { + var canBeSub_553648371 = (!(image_553648368) && !(prevWhitespace_1241514584(parser_553648366, (-1)))); + var firstPos_553648372 = parser_553648366.pos; + var tmpTuple_553648379 = parseDelimed_553648242(parser_553648366, [93], singleLine_553648369); + var textWorked_553648380 = tmpTuple_553648379["Field0"]; + var textElems_553648381 = nimCopy(null, tmpTuple_553648379["Field1"], NTI1040187475); + parser_553648366.pos += 1; + var secondPos_553648387 = (parser_553648366.pos - 2); + if (!((textWorked_553648380 == 0))) { + result_553648370 = newElem_771752046(0, textElems_553648381); + break BeforeRet; + } + + if (!((!(image_553648368) && ((textElems_553648381).length == 1)) && textElems_553648381[0].isText)) Temporary2 = false; else { var Temporary3 = textElems_553648381[0]; + if (ConstSet30[Temporary3.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary3.isText, NTI33554466)); } + Temporary2 = ((((Temporary4 = Temporary3.str, Temporary4)) == null ? 0 : (Temporary4).length) == 1); } if (Temporary2) { + var Temporary5 = textElems_553648381[0]; + if (ConstSet31[Temporary5.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary5.isText, NTI33554466)); } + switch ((Temporary6 = Temporary5.str, Temporary6).charCodeAt(0)) { + case 32: + Temporary7 = 1; + break; + case 120: + Temporary7 = 2; + break; + default: + Temporary7 = 0; + break; + } + Temporary1 = Temporary7; + } + else { + Temporary1 = 0; + } + + var checkMark_553648396 = Temporary1; + if ((parser_553648366.pos < ((parser_553648366.str) == null ? 0 : (parser_553648366.str).length))) { + var initialPos_553648397 = parser_553648366.pos; + if (nextMatch_1241514614(parser_553648366, 40, 0)) { + var tmpTuple_553648552 = parseLink_553648417(parser_553648366, false); + var linkWorked_553648553 = tmpTuple_553648552["Field0"]; + var link_553648554 = nimCopy(null, tmpTuple_553648552["Field1"], NTI1224736771); + if (linkWorked_553648553) { + if ((((((link_553648554.url) == null ? 0 : (link_553648554.url).length) == 0) && ((textElems_553648381).length == 1)) && textElems_553648381[0].isText)) { + var Temporary8 = textElems_553648381[0]; + if (ConstSet33[Temporary8.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary8.isText, NTI33554466)); } + link_553648554.url = Temporary8.str.trim(); + } + + if (image_553648368) { + result_553648370 = {isText: false, tag: 21, attrs: ({data: [], counter: 0, first: 0, last: 0}), content: [], str: null}; + if ((0 < (secondPos_553648387 - firstPos_553648372))) { + attrEscaped_771754108(result_553648370, "alt", HEX5BHEX5D_721420310(parser_553648366.str, HEX2EHEX2E_1157627952(firstPos_553648372, secondPos_553648387))); + } + + } + else { + result_553648370 = {isText: false, tag: 23, attrs: ({data: [], counter: 0, first: 0, last: 0}), content: [], str: null}; + var Temporary9 = result_553648370; + if (ConstSet35[Temporary9.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary9.isText, NTI33554466)); } + Temporary9.content = nimCopy(null, textElems_553648381, NTI1040187475); + } + + if (!((((link_553648554.tip) == null ? 0 : (link_553648554.tip).length) == 0))) { + attrEscaped_771754108(result_553648370, "title", link_553648554.tip); + } + + setLink_553648563(parser_553648366, result_553648370, link_553648554); + break BeforeRet; + } + else { + parser_553648366.pos = initialPos_553648397; + } + + } + else { + if (nextMatch_1241514614(parser_553648366, 91, 0)) { + var refNameFailed_553648580 = [false]; + var refName_553648608 = parseReferenceName_553648581(parser_553648366, refNameFailed_553648580, 0); + if (refNameFailed_553648580[0]) { + parser_553648366.pos = initialPos_553648397; + } + else { + if ((((refName_553648608) == null ? 0 : (refName_553648608).length) == 0)) { + refName_553648608 = HEX5BHEX5D_721420310(parser_553648366.str, HEX2EHEX2E_1157627952(firstPos_553648372, secondPos_553648387)); + } + + result_553648370 = {isText: false, tag: 0, attrs: ({data: [], counter: 0, first: 0, last: 0}), content: [], str: null}; + if (image_553648368) { + var Temporary10 = result_553648370; + if (ConstSet46[Temporary10.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary10.isText, NTI33554466)); } + Temporary10.tag = 21; + if ((0 < (secondPos_553648387 - firstPos_553648372))) { + attrEscaped_771754108(result_553648370, "alt", HEX5BHEX5D_721420310(parser_553648366.str, HEX2EHEX2E_1157627952(firstPos_553648372, secondPos_553648387))); + } + + } + else { + var Temporary11 = result_553648370; + if (ConstSet47[Temporary11.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary11.isText, NTI33554466)); } + Temporary11.tag = 23; + var Temporary12 = result_553648370; + if (ConstSet48[Temporary12.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary12.isText, NTI33554466)); } + Temporary12.content = nimCopy(null, textElems_553648381, NTI1040187475); + } + + (Temporary13 = mgetOrPut_553648649(parser_553648366.linkReferrers, refName_553648608, []), Temporary13)[0][Temporary13[1]].push(result_553648370);; + break BeforeRet; + } + + } + else { + parser_553648366.pos -= 1; + } + } + } + + if (image_553648368) { + result_553648370 = newElem_771752046(0, textElems_553648381); + } + else { + if ((checkMark_553648396 == 0)) { + if (canBeSub_553648371) { + Temporary14 = 14; + } + else { + parser_553648366.pos -= 1; + Temporary14 = 0; + } + + result_553648370 = newElem_771752046(Temporary14, textElems_553648381); + } + else { + result_553648370 = newElem_771752046(22, []); + attr_771752554(result_553648370, "type", "checkbox"); + attr_771752554(result_553648370, "disabled", ""); + if ((checkMark_553648396 == 2)) { + attr_771752554(result_553648370, "checked", ""); + } + + } + } + }; + + return result_553648370; + +} + +function add_553649189(x_553649191, x_553649191_Idx) { + if (null != "{") { if (null == x_553649191[x_553649191_Idx]) x_553649191[x_553649191_Idx] = "{"; else x_553649191[x_553649191_Idx] += "{"; }; + + +} + +function add_553649198(x_553649200, x_553649200_Idx) { + if (null != "}") { if (null == x_553649200[x_553649200_Idx]) x_553649200[x_553649200_Idx] = "}"; else x_553649200[x_553649200_Idx] += "}"; }; + + +} + +function parseCurly_553649175(parser_553649177) { + var Temporary4; + var Temporary5; + var Temporary6; + var Temporary7; + + var result_553649179 = [null]; + + BeforeRet: { + result_553649179[0] = ""; + var noHtmlEscape_553649180 = (nextMatch_1241514614(parser_553649177, 33, 0) || parser_553649177.options.curlyNoHtmlEscape); + var opencurlys_553649181 = 1; + var escaped_553649182 = false; + Label1: { + var ch_553649183 = 0; + Label2: { + Label3: while (true) { + if (!(parser_553649177.pos < ((parser_553649177.str) == null ? 0 : (parser_553649177.str).length))) break Label3; + ch_553649183 = parser_553649177.str.charCodeAt((parser_553649177.pos + 0)); + if (!(escaped_553649182)) { + switch (ch_553649183) { + case 92: + escaped_553649182 = true; + break; + case 123: + opencurlys_553649181 += 1; + add_553649189(result_553649179, 0); + break; + case 125: + opencurlys_553649181 -= 1; + if ((opencurlys_553649181 == 0)) { + break BeforeRet; + } + else { + add_553649198(result_553649179, 0); + } + + break; + default: + if (noHtmlEscape_553649180) { + Temporary4 = String.fromCharCode(ch_553649183); + } + else { + Temporary4 = escapeHtmlChar_1241513991(ch_553649183); + } + + if (null != (Temporary5 = Temporary4, Temporary5)) { if (null == result_553649179[0]) result_553649179[0] = Temporary5; else result_553649179[0] += Temporary5; }; + break; + } + } + else { + switch (ch_553649183) { + case 62: + case 60: + case 38: + Temporary6 = escapeHtmlChar_1241513991(ch_553649183); + break; + case 92: + case 125: + case 123: + Temporary6 = String.fromCharCode(ch_553649183); + break; + default: + Temporary6 = ("\\\\" + String.fromCharCode(ch_553649183)); + break; + } + if (null != (Temporary7 = Temporary6, Temporary7)) { if (null == result_553649179[0]) result_553649179[0] = Temporary7; else result_553649179[0] += Temporary7; }; + escaped_553649182 = false; + } + + parser_553649177.pos += 1; + } + }; + }; + }; + + return result_553649179[0]; + +} + +function noAdjacentWhitespace_1241514610(parser_1241514611, offset_1241514612) { + var result_1241514613 = false; + + result_1241514613 = (!(prevWhitespace_1241514584(parser_1241514611, offset_1241514612)) && !(nextWhitespace_1241514594(parser_1241514611, offset_1241514612))); + + return result_1241514613; + +} + +function onlyPrevWhitespace_1241514602(parser_1241514603, offset_1241514604) { + var result_1241514605 = false; + + result_1241514605 = (prevWhitespace_1241514584(parser_1241514603, offset_1241514604) && !(nextWhitespace_1241514594(parser_1241514603, offset_1241514604))); + + return result_1241514605; + +} + +function ssClose_1308623973(s_1308623974) { + var s_1308623975 = s_1308623974; + s_1308623975.data = nimCopy(null, [], NTI33554449); + + +} + +function ssAtEnd_1308623620(s_1308623621) { + var result_1308623622 = false; + + BeforeRet: { + var s_1308623623 = s_1308623621; + result_1308623622 = ((s_1308623623.data).length <= s_1308623623.pos); + break BeforeRet; + }; + + return result_1308623622; + +} + +function clamp_1308623660(x_1308623662, a_1308623663, b_1308623664) { + var result_1308623665 = 0; + + BeforeRet: { + if ((x_1308623662 < a_1308623663)) { + result_1308623665 = a_1308623663; + break BeforeRet; + } + + if ((b_1308623664 < x_1308623662)) { + result_1308623665 = b_1308623664; + break BeforeRet; + } + + result_1308623665 = x_1308623662; + break BeforeRet; + }; + + return result_1308623665; + +} + +function ssSetPosition_1308623656(s_1308623657, pos_1308623658) { + var s_1308623659 = s_1308623657; + s_1308623659.pos = clamp_1308623660(pos_1308623658, 0, (s_1308623659.data).length); + + +} + +function ssGetPosition_1308623666(s_1308623667) { + var result_1308623668 = 0; + + BeforeRet: { + var s_1308623669 = s_1308623667; + result_1308623668 = s_1308623669.pos; + break BeforeRet; + }; + + return result_1308623668; + +} + +function HEX5BHEX5DHEX3D_1056965773(s_1056965776, s_1056965776_Idx, x_1056965777, b_1056965778) { + var a_1056965780 = x_1056965777.a; + var L_1056965782 = ((x_1056965777.b - a_1056965780) + 1); + if ((L_1056965782 == (b_1056965778).length)) { + Label1: { + var i_1056965787 = 0; + var i_553650026 = 0; + Label2: { + Label3: while (true) { + if (!(i_553650026 < L_1056965782)) break Label3; + i_1056965787 = i_553650026; + s_1056965776[s_1056965776_Idx][(i_1056965787 + a_1056965780)] = b_1056965778[i_1056965787]; + i_553650026 += 1; + } + }; + }; + } + else { + var shiftHEX60gensym109_1056965793 = ((b_1056965778).length - nimMax(0, L_1056965782)); + var newLenHEX60gensym109_1056965794 = ((s_1056965776[s_1056965776_Idx]).length + shiftHEX60gensym109_1056965793); + if ((0 < shiftHEX60gensym109_1056965793)) { + if (s_1056965776[s_1056965776_Idx].length < newLenHEX60gensym109_1056965794) { for (var i = s_1056965776[s_1056965776_Idx].length; i < newLenHEX60gensym109_1056965794; ++i) s_1056965776[s_1056965776_Idx].push(0); } + else {s_1056965776[s_1056965776_Idx].length = newLenHEX60gensym109_1056965794; }; + Label4: { + var iHEX60gensym109_1056965800 = 0; + var colontmp__553650029 = 0; + var colontmp__553650030 = 0; + colontmp__553650029 = (newLenHEX60gensym109_1056965794 - 1); + colontmp__553650030 = (a_1056965780 + (b_1056965778).length); + var res_553650032 = colontmp__553650029; + Label5: { + Label6: while (true) { + if (!(colontmp__553650030 <= res_553650032)) break Label6; + iHEX60gensym109_1056965800 = res_553650032; + s_1056965776[s_1056965776_Idx][iHEX60gensym109_1056965800] = s_1056965776[s_1056965776_Idx][(iHEX60gensym109_1056965800 - shiftHEX60gensym109_1056965793)]; + res_553650032 -= 1; + } + }; + }; + } + else { + Label7: { + var iHEX60gensym109_1056965806 = 0; + var colontmp__553650035 = 0; + var colontmp__553650036 = 0; + colontmp__553650035 = (a_1056965780 + (b_1056965778).length); + colontmp__553650036 = (newLenHEX60gensym109_1056965794 - 1); + var res_553650037 = colontmp__553650035; + Label8: { + Label9: while (true) { + if (!(res_553650037 <= colontmp__553650036)) break Label9; + iHEX60gensym109_1056965806 = res_553650037; + s_1056965776[s_1056965776_Idx][iHEX60gensym109_1056965806] = s_1056965776[s_1056965776_Idx][(iHEX60gensym109_1056965806 - shiftHEX60gensym109_1056965793)]; + res_553650037 += 1; + } + }; + }; + if (s_1056965776[s_1056965776_Idx].length < newLenHEX60gensym109_1056965794) { for (var i = s_1056965776[s_1056965776_Idx].length; i < newLenHEX60gensym109_1056965794; ++i) s_1056965776[s_1056965776_Idx].push(0); } + else {s_1056965776[s_1056965776_Idx].length = newLenHEX60gensym109_1056965794; }; + } + + Label10: { + var iHEX60gensym109_1056965811 = 0; + var colontmp__553650040 = 0; + colontmp__553650040 = (b_1056965778).length; + var i_553650041 = 0; + Label11: { + Label12: while (true) { + if (!(i_553650041 < colontmp__553650040)) break Label12; + iHEX60gensym109_1056965811 = i_553650041; + s_1056965776[s_1056965776_Idx][(a_1056965780 + iHEX60gensym109_1056965811)] = b_1056965778[iHEX60gensym109_1056965811]; + i_553650041 += 1; + } + }; + }; + } + + + +} + +function HEX5BHEX5D_1056965881(s_1056965884, x_1056965885) { + var result_1056965886 = []; + + var a_1056965888 = x_1056965885.a; + var L_1056965890 = ((x_1056965885.b - a_1056965888) + 1); + result_1056965886 = nimCopy(null, mnewString(L_1056965890), NTI33554449); + Label1: { + var i_1056965895 = 0; + var i_553650044 = 0; + Label2: { + Label3: while (true) { + if (!(i_553650044 < L_1056965890)) break Label3; + i_1056965895 = i_553650044; + result_1056965886[i_1056965895] = s_1056965884[(i_1056965895 + a_1056965888)]; + i_553650044 += 1; + } + }; + }; + + return result_1056965886; + +} + +function ssReadDataStr_1308623670(s_1308623671, buffer_1308623672, buffer_1308623672_Idx, slice_1308623674) { + var result_1308623675 = 0; + + var s_1308623676 = s_1308623671; + result_1308623675 = nimMin(((slice_1308623674.b + 1) - slice_1308623674.a), ((s_1308623676.data).length - s_1308623676.pos)); + if ((0 < result_1308623675)) { + Label1: { + }; + HEX5BHEX5DHEX3D_1056965773(buffer_1308623672, buffer_1308623672_Idx, HEX2EHEX2E_1157627952(slice_1308623674.a, ((slice_1308623674.a + result_1308623675) - 1)), HEX5BHEX5D_1056965881(s_1308623676.data, HEX2EHEX2E_1157627952(s_1308623676.pos, ((s_1308623676.pos + result_1308623675) - 1)))); + s_1308623676.pos += result_1308623675; + } + else { + result_1308623675 = 0; + } + + + return result_1308623675; + +} + +function isNimException_33556443() { + return lastJSError && lastJSError.m_type; + + +} + +function getCurrentException() { + var result_33556446 = null; + + if (isNimException_33556443()) { + result_33556446 = lastJSError; + } + + + return result_33556446; + +} + +function ssReadData_1308623772(s_1308623773, buffer_1308623774, buffer_1308623774_Idx, bufLen_1308623775) { + var result_1308623776 = 0; + + var s_1308623777 = s_1308623773; + result_1308623776 = nimMin(bufLen_1308623775, ((s_1308623777.data).length - s_1308623777.pos)); + if ((0 < result_1308623776)) { +++excHandler; + try { + HEX5BHEX5DHEX3D_1056965773(buffer_1308623774, buffer_1308623774_Idx, HEX2EHEX2E_1157627952(0, (result_1308623776 - 1)), HEX5BHEX5D_1056965881(s_1308623777.data, HEX2EHEX2E_1157627952(s_1308623777.pos, ((s_1308623777.pos + result_1308623776) - 1)))); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseException({message: makeNimstrLit("could not read string stream, did you use a non-string buffer pointer?"), parent: getCurrentException(), m_type: NTI33555178, name: null, trace: [], up: null}, "Defect"); + lastJSError = prevJSError; + } finally { + } + s_1308623777.pos += result_1308623776; + } + else { + result_1308623776 = 0; + } + + + return result_1308623776; + +} + +function ssPeekData_1308623865(s_1308623866, buffer_1308623867, buffer_1308623867_Idx, bufLen_1308623868) { + var result_1308623869 = 0; + + var s_1308623870 = s_1308623866; + result_1308623869 = nimMin(bufLen_1308623868, ((s_1308623870.data).length - s_1308623870.pos)); + if ((0 < result_1308623869)) { +++excHandler; + try { + HEX5BHEX5DHEX3D_1056965773(buffer_1308623867, buffer_1308623867_Idx, HEX2EHEX2E_1157627952(0, (result_1308623869 - 1)), HEX5BHEX5D_1056965881(s_1308623870.data, HEX2EHEX2E_1157627952(s_1308623870.pos, ((s_1308623870.pos + result_1308623869) - 1)))); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseException({message: makeNimstrLit("could not peek string stream, did you use a non-string buffer pointer?"), parent: getCurrentException(), m_type: NTI33555178, name: null, trace: [], up: null}, "Defect"); + lastJSError = prevJSError; + } finally { + } + } + else { + result_1308623869 = 0; + } + + + return result_1308623869; + +} + +function ssWriteData_1308623917(s_1308623918, buffer_1308623919, buffer_1308623919_Idx, bufLen_1308623920) { + var Temporary1; + + BeforeRet: { + var s_1308623921 = s_1308623918; + if ((bufLen_1308623920 <= 0)) { + break BeforeRet; + } + + if (((s_1308623921.data).length < (s_1308623921.pos + bufLen_1308623920))) { + if (s_1308623921.data.length < (Temporary1 = (s_1308623921.pos + bufLen_1308623920), Temporary1)) { for (var i = s_1308623921.data.length; i < Temporary1; ++i) s_1308623921.data.push(0); } + else {s_1308623921.data.length = Temporary1; }; + } + +++excHandler; + try { + HEX5BHEX5DHEX3D_1056965773(s_1308623921, "data", HEX2EHEX2E_1157627952(s_1308623921.pos, ((s_1308623921.pos + bufLen_1308623920) - 1)), HEX5BHEX5D_1056965881(buffer_1308623919[buffer_1308623919_Idx], HEX2EHEX2E_1157627952(0, (bufLen_1308623920 - 1)))); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseException({message: makeNimstrLit("could not write to string stream, did you use a non-string buffer pointer?"), parent: getCurrentException(), m_type: NTI33555178, name: null, trace: [], up: null}, "Defect"); + lastJSError = prevJSError; + } finally { + } + s_1308623921.pos += bufLen_1308623920; + }; + + +} + +function newStringStream_1308623976(s_1308623977) { + var result_1308623978 = null; + + result_1308623978 = ({m_type: NTI1308623353, data: [], pos: 0, closeImpl: null, atEndImpl: null, setPositionImpl: null, getPositionImpl: null, readDataStrImpl: null, readLineImpl: null, readDataImpl: null, peekDataImpl: null, writeDataImpl: null, flushImpl: null}); + result_1308623978.data = nimCopy(null, s_1308623977, NTI33554449); + result_1308623978.pos = 0; + result_1308623978.closeImpl = ssClose_1308623973; + result_1308623978.atEndImpl = ssAtEnd_1308623620; + result_1308623978.setPositionImpl = ssSetPosition_1308623656; + result_1308623978.getPositionImpl = ssGetPosition_1308623666; + result_1308623978.readDataStrImpl = ssReadDataStr_1308623670; + result_1308623978.readDataImpl = ssReadData_1308623772; + result_1308623978.peekDataImpl = ssPeekData_1308623865; + result_1308623978.writeDataImpl = ssWriteData_1308623917; + + return result_1308623978; + +} + +function setPosition_1308622918(s_1308622919, pos_1308622920) { + s_1308622919.setPositionImpl(s_1308622919, pos_1308622920); + + +} + +function readData_1308622926(s_1308622927, buffer_1308622928, buffer_1308622928_Idx, bufLen_1308622929) { + var result_1308622930 = 0; + + result_1308622930 = s_1308622927.readDataImpl(s_1308622927, buffer_1308622928, buffer_1308622928_Idx, bufLen_1308622929); + + return result_1308622930; + +} + +function readDataStr_1308622932(s_1308622933, buffer_1308622934, buffer_1308622934_Idx, slice_1308622936) { + var result_1308622937 = 0; + + if (!((s_1308622933.readDataStrImpl == null))) { + result_1308622937 = s_1308622933.readDataStrImpl(s_1308622933, buffer_1308622934, buffer_1308622934_Idx, slice_1308622936); + } + else { + result_1308622937 = readData_1308622926(s_1308622933, buffer_1308622934[buffer_1308622934_Idx], slice_1308622936.a, ((slice_1308622936.b + 1) - slice_1308622936.a)); + } + + + return result_1308622937; + +} + +function fillBuffer_1342177296(L_1342177297) { + var Temporary8; + + var charsRead_1342177298 = 0; + var toCopy_1342177299 = 0; + var s_1342177300 = 0; + var oldBufLen_1342177301 = 0; + toCopy_1342177299 = ((L_1342177297.buf).length - (L_1342177297.sentinel + 1)); + if ((0 < toCopy_1342177299)) { + Label1: { + var i_1342177312 = 0; + var i_553650047 = 0; + Label2: { + Label3: while (true) { + if (!(i_553650047 < toCopy_1342177299)) break Label3; + i_1342177312 = i_553650047; + L_1342177297.buf[i_1342177312] = L_1342177297.buf[((L_1342177297.sentinel + 1) + i_1342177312)]; + i_553650047 += 1; + } + }; + }; + } + + charsRead_1342177298 = readDataStr_1308622932(L_1342177297.input, L_1342177297, "buf", HEX2EHEX2E_1157627952(toCopy_1342177299, (((toCopy_1342177299 + L_1342177297.sentinel) + 1) - 1))); + s_1342177300 = (toCopy_1342177299 + charsRead_1342177298); + if ((charsRead_1342177298 < (L_1342177297.sentinel + 1))) { + L_1342177297.buf[s_1342177300] = 0; + L_1342177297.sentinel = s_1342177300; + } + else { + s_1342177300 -= 1; + Label4: { + Label5: while (true) { + if (!true) break Label5; + Label6: { + Label7: while (true) { + if (!((0 <= s_1342177300) && !((L_1342177297.refillChars[L_1342177297.buf[s_1342177300]] != undefined)))) break Label7; + s_1342177300 -= 1; + } + }; + if ((0 <= s_1342177300)) { + L_1342177297.sentinel = s_1342177300; + break Label4; + } + else { + oldBufLen_1342177301 = (L_1342177297.buf).length; + if (L_1342177297.buf.length < (Temporary8 = ((L_1342177297.buf).length * 2), Temporary8)) { for (var i = L_1342177297.buf.length; i < Temporary8; ++i) L_1342177297.buf.push(0); } + else {L_1342177297.buf.length = Temporary8; }; + charsRead_1342177298 = readDataStr_1308622932(L_1342177297.input, L_1342177297, "buf", HEX2EHEX2E_1157627952(oldBufLen_1342177301, ((L_1342177297.buf).length - 1))); + if ((charsRead_1342177298 < oldBufLen_1342177301)) { + L_1342177297.buf[(oldBufLen_1342177301 + charsRead_1342177298)] = 0; + L_1342177297.sentinel = (oldBufLen_1342177301 + charsRead_1342177298); + break Label4; + } + + s_1342177300 = ((L_1342177297.buf).length - 1); + } + + } + }; + } + + + +} + +function skipUtf8Bom_1342177398(L_1342177399) { + if ((((L_1342177399.buf[0] == 239) && (L_1342177399.buf[1] == 187)) && (L_1342177399.buf[2] == 191))) { + L_1342177399.bufpos += 3; + L_1342177399.lineStart += 3; + } + + + +} + +function open_1342177410(L_1342177411, input_1342177412, bufLen_1342177413, refillChars_1342177414) { + L_1342177411.input = input_1342177412; + L_1342177411.bufpos = 0; + L_1342177411.offsetBase = 0; + L_1342177411.refillChars = nimCopy(L_1342177411.refillChars, refillChars_1342177414, NTI1342177285); + L_1342177411.buf = nimCopy(null, mnewString(bufLen_1342177413), NTI33554449); + L_1342177411.sentinel = (bufLen_1342177413 - 1); + L_1342177411.lineStart = 0; + L_1342177411.lineNumber = 1; + fillBuffer_1342177296(L_1342177411); + skipUtf8Bom_1342177398(L_1342177411); + + +} + +function open_1275068481(my_1275068482, input_1275068483, filename_1275068484, options_1275068485) { + open_1342177410(my_1275068482, input_1275068483, 8192, ConstSet63); + my_1275068482.filename = nimCopy(null, filename_1275068484, NTI33554449); + my_1275068482.state = 0; + my_1275068482.kind = 0; + my_1275068482.a = nimCopy(null, [], NTI33554449); + my_1275068482.b = nimCopy(null, [], NTI33554449); + my_1275068482.c = nimCopy(null, [], NTI33554449); + my_1275068482.cIsEmpty = true; + my_1275068482.options = nimCopy(my_1275068482.options, options_1275068485, NTI1275068428); + + +} + +function fillBaseLexer_1342177352(L_1342177353, pos_1342177354) { + var result_1342177355 = 0; + + if ((pos_1342177354 < L_1342177353.sentinel)) { + result_1342177355 = (pos_1342177354 + 1); + } + else { + fillBuffer_1342177296(L_1342177353); + L_1342177353.offsetBase += pos_1342177354; + L_1342177353.bufpos = 0; + result_1342177355 = 0; + } + + + return result_1342177355; + +} + +function handleRefillChar_1342177387(L_1342177388, pos_1342177389) { + var result_1342177390 = 0; + + result_1342177390 = fillBaseLexer_1342177352(L_1342177388, pos_1342177389); + + return result_1342177390; + +} + +function markError_1275068658(my_1275068659, kind_1275068660) { + my_1275068659.err = kind_1275068660; + my_1275068659.state = 4; + + +} + +function parseName_1275068745(my_1275068746, dest_1275068747, dest_1275068747_Idx) { + var pos_1275068748 = my_1275068746.bufpos; + if ((ConstSet65[my_1275068746.buf[pos_1275068748]] != undefined)) { + Label1: { + Label2: while (true) { + if (!true) break Label2; + addChar(dest_1275068747[dest_1275068747_Idx], my_1275068746.buf[pos_1275068748]);; + pos_1275068748 += 1; + if (!((ConstSet66[my_1275068746.buf[pos_1275068748]] != undefined))) { + break Label1; + } + + } + }; + my_1275068746.bufpos = pos_1275068748; + } + else { + markError_1275068658(my_1275068746, 2); + } + + + +} + +function handleCR_1342177363(L_1342177364, pos_1342177365) { + var result_1342177366 = 0; + + L_1342177364.lineNumber += 1; + result_1342177366 = fillBaseLexer_1342177352(L_1342177364, pos_1342177365); + if ((L_1342177364.buf[result_1342177366] == 10)) { + result_1342177366 = fillBaseLexer_1342177352(L_1342177364, result_1342177366); + } + + L_1342177364.lineStart = result_1342177366; + + return result_1342177366; + +} + +function handleLF_1342177375(L_1342177376, pos_1342177377) { + var result_1342177378 = 0; + + L_1342177376.lineNumber += 1; + result_1342177378 = fillBaseLexer_1342177352(L_1342177376, pos_1342177377); + L_1342177376.lineStart = result_1342177378; + + return result_1342177378; + +} + +function parseWhitespace_1275068734(my_1275068735, skip_1275068736) { + var pos_1275068737 = my_1275068735.bufpos; + Label1: { + Label2: while (true) { + if (!true) break Label2; + switch (my_1275068735.buf[pos_1275068737]) { + case 32: + case 9: + if (!(skip_1275068736)) { + addChar(my_1275068735.a, my_1275068735.buf[pos_1275068737]);; + } + + pos_1275068737 += 1; + break; + case 13: + pos_1275068737 = handleCR_1342177363(my_1275068735, pos_1275068737); + if (!(skip_1275068736)) { + addChar(my_1275068735.a, 10);; + } + + break; + case 10: + pos_1275068737 = handleLF_1342177375(my_1275068735, pos_1275068737); + if (!(skip_1275068736)) { + addChar(my_1275068735.a, 10);; + } + + break; + default: + break Label1; + break; + } + } + }; + my_1275068735.bufpos = pos_1275068737; + + +} + +function parseEndTag_1275068942(my_1275068943) { + my_1275068943.bufpos = handleRefillChar_1342177387(my_1275068943, (my_1275068943.bufpos + 1)); + parseName_1275068745(my_1275068943, my_1275068943, "a"); + parseWhitespace_1275068734(my_1275068943, true); + if ((my_1275068943.buf[my_1275068943.bufpos] == 62)) { + my_1275068943.bufpos += 1; + } + else { + markError_1275068658(my_1275068943, 5); + } + + my_1275068943.kind = 7; + + +} + +function parseCDATA_1275068677(my_1275068678) { + var pos_1275068679 = (my_1275068678.bufpos + 9); + Label1: { + Label2: while (true) { + if (!true) break Label2; + switch (my_1275068678.buf[pos_1275068679]) { + case 93: + if (((my_1275068678.buf[(pos_1275068679 + 1)] == 93) && (my_1275068678.buf[(pos_1275068679 + 2)] == 62))) { + pos_1275068679 += 3; + break Label1; + } + + addChar(my_1275068678.a, 93);; + pos_1275068679 += 1; + break; + case 0: + markError_1275068658(my_1275068678, 1); + break Label1; + break; + case 13: + pos_1275068679 = handleCR_1342177363(my_1275068678, pos_1275068679); + addChar(my_1275068678.a, 10);; + break; + case 10: + pos_1275068679 = handleLF_1342177375(my_1275068678, pos_1275068679); + addChar(my_1275068678.a, 10);; + break; + case 47: + pos_1275068679 = handleRefillChar_1342177387(my_1275068678, pos_1275068679); + addChar(my_1275068678.a, 47);; + break; + default: + addChar(my_1275068678.a, my_1275068678.buf[pos_1275068679]);; + pos_1275068679 += 1; + break; + } + } + }; + my_1275068678.bufpos = pos_1275068679; + my_1275068678.kind = 11; + + +} + +function parseComment_1275068695(my_1275068696) { + var pos_1275068697 = (my_1275068696.bufpos + 4); + Label1: { + Label2: while (true) { + if (!true) break Label2; + switch (my_1275068696.buf[pos_1275068697]) { + case 45: + if (((my_1275068696.buf[(pos_1275068697 + 1)] == 45) && (my_1275068696.buf[(pos_1275068697 + 2)] == 62))) { + pos_1275068697 += 3; + break Label1; + } + + if ((my_1275068696.options[1] != undefined)) { + addChar(my_1275068696.a, 45);; + } + + pos_1275068697 += 1; + break; + case 0: + markError_1275068658(my_1275068696, 8); + break Label1; + break; + case 13: + pos_1275068697 = handleCR_1342177363(my_1275068696, pos_1275068697); + if ((my_1275068696.options[1] != undefined)) { + addChar(my_1275068696.a, 10);; + } + + break; + case 10: + pos_1275068697 = handleLF_1342177375(my_1275068696, pos_1275068697); + if ((my_1275068696.options[1] != undefined)) { + addChar(my_1275068696.a, 10);; + } + + break; + case 47: + pos_1275068697 = handleRefillChar_1342177387(my_1275068696, pos_1275068697); + if ((my_1275068696.options[1] != undefined)) { + addChar(my_1275068696.a, 47);; + } + + break; + default: + if ((my_1275068696.options[1] != undefined)) { + addChar(my_1275068696.a, my_1275068696.buf[pos_1275068697]);; + } + + pos_1275068697 += 1; + break; + } + } + }; + my_1275068696.bufpos = pos_1275068697; + my_1275068696.kind = 4; + + +} + +function parseSpecial_1275068886(my_1275068887) { + var pos_1275068888 = (my_1275068887.bufpos + 2); + var opentags_1275068889 = 0; + Label1: { + Label2: while (true) { + if (!true) break Label2; + switch (my_1275068887.buf[pos_1275068888]) { + case 0: + markError_1275068658(my_1275068887, 5); + break Label1; + break; + case 60: + opentags_1275068889 += 1; + pos_1275068888 += 1; + addChar(my_1275068887.a, 60);; + break; + case 62: + if ((opentags_1275068889 <= 0)) { + pos_1275068888 += 1; + break Label1; + } + + opentags_1275068889 -= 1; + pos_1275068888 += 1; + addChar(my_1275068887.a, 62);; + break; + case 13: + pos_1275068888 = handleCR_1342177363(my_1275068887, pos_1275068888); + addChar(my_1275068887.a, 10);; + break; + case 10: + pos_1275068888 = handleLF_1342177375(my_1275068887, pos_1275068888); + addChar(my_1275068887.a, 10);; + break; + case 47: + pos_1275068888 = handleRefillChar_1342177387(my_1275068887, pos_1275068888); + addChar(my_1275068887.b, 47);; + break; + default: + addChar(my_1275068887.a, my_1275068887.buf[pos_1275068888]);; + pos_1275068888 += 1; + break; + } + } + }; + my_1275068887.bufpos = pos_1275068888; + my_1275068887.kind = 13; + + +} + +function parsePI_1275068863(my_1275068864) { + my_1275068864.bufpos += 2; + parseName_1275068745(my_1275068864, my_1275068864, "a"); + var pos_1275068870 = my_1275068864.bufpos; + if (my_1275068864.b.length < 0) { for (var i = my_1275068864.b.length; i < 0; ++i) my_1275068864.b.push(0); } + else {my_1275068864.b.length = 0; }; + Label1: { + Label2: while (true) { + if (!true) break Label2; + switch (my_1275068864.buf[pos_1275068870]) { + case 0: + markError_1275068658(my_1275068864, 4); + break Label1; + break; + case 63: + if ((my_1275068864.buf[(pos_1275068870 + 1)] == 62)) { + pos_1275068870 += 2; + break Label1; + } + + addChar(my_1275068864.b, 63);; + pos_1275068870 += 1; + break; + case 13: + pos_1275068870 = handleCR_1342177363(my_1275068864, pos_1275068870); + addChar(my_1275068864.b, 10);; + break; + case 10: + pos_1275068870 = handleLF_1342177375(my_1275068864, pos_1275068870); + addChar(my_1275068864.b, 10);; + break; + case 47: + pos_1275068870 = handleRefillChar_1342177387(my_1275068864, pos_1275068870); + addChar(my_1275068864.b, 47);; + break; + default: + addChar(my_1275068864.b, my_1275068864.buf[pos_1275068870]);; + pos_1275068870 += 1; + break; + } + } + }; + my_1275068864.bufpos = pos_1275068870; + my_1275068864.kind = 5; + + +} + +function parseTag_1275068920(my_1275068921) { + BeforeRet: { + my_1275068921.bufpos += 1; + parseName_1275068745(my_1275068921, my_1275068921, "a"); + if (((my_1275068921.a).length == 0)) { + my_1275068921.kind = 2; + addChar(my_1275068921.a, 60);; + break BeforeRet; + } + + parseWhitespace_1275068734(my_1275068921, true); + if ((ConstSet67[my_1275068921.buf[my_1275068921.bufpos]] != undefined)) { + my_1275068921.kind = 8; + my_1275068921.state = 2; + my_1275068921.c = nimCopy(null, my_1275068921.a, NTI33554449); + my_1275068921.cIsEmpty = false; + } + else { + my_1275068921.kind = 6; + var slash_1275068931 = (my_1275068921.buf[my_1275068921.bufpos] == 47); + if (slash_1275068931) { + my_1275068921.bufpos = handleRefillChar_1342177387(my_1275068921, my_1275068921.bufpos); + } + + if ((slash_1275068931 && (my_1275068921.buf[my_1275068921.bufpos] == 62))) { + my_1275068921.bufpos += 1; + my_1275068921.state = 3; + my_1275068921.c = nimCopy(null, [], NTI33554449); + my_1275068921.cIsEmpty = true; + } + else { + if ((my_1275068921.buf[my_1275068921.bufpos] == 62)) { + my_1275068921.bufpos += 1; + } + else { + markError_1275068658(my_1275068921, 5); + } + } + } + + }; + + +} + +function HEX3CHEX3DHEX25_33555507(x_33555508, y_33555509) { + var result_33555510 = false; + + result_33555510 = (Number(BigInt.asUintN(32, BigInt(x_33555508))) <= Number(BigInt.asUintN(32, BigInt(y_33555509)))); + + return result_33555510; + +} + +function nuctoUTF8(c_1140851095) { + var result_1140851096 = []; + + result_1140851096 = nimCopy(null, [], NTI33554449); + var iHEX60gensym21_1140851098 = c_1140851095; + if (HEX3CHEX3DHEX25_33555507(iHEX60gensym21_1140851098, 127)) { + if (result_1140851096.length < 1) { for (var i = result_1140851096.length; i < 1; ++i) result_1140851096.push(0); } + else {result_1140851096.length = 1; }; + result_1140851096[0] = iHEX60gensym21_1140851098; + } + else { + if (HEX3CHEX3DHEX25_33555507(iHEX60gensym21_1140851098, 2047)) { + if (result_1140851096.length < 2) { for (var i = result_1140851096.length; i < 2; ++i) result_1140851096.push(0); } + else {result_1140851096.length = 2; }; + result_1140851096[0] = ((iHEX60gensym21_1140851098 >> 6) | 192); + result_1140851096[1] = ((iHEX60gensym21_1140851098 & 63) | 128); + } + else { + if (HEX3CHEX3DHEX25_33555507(iHEX60gensym21_1140851098, 65535)) { + if (result_1140851096.length < 3) { for (var i = result_1140851096.length; i < 3; ++i) result_1140851096.push(0); } + else {result_1140851096.length = 3; }; + result_1140851096[0] = ((iHEX60gensym21_1140851098 >> 12) | 224); + result_1140851096[1] = (((iHEX60gensym21_1140851098 >> 6) & 63) | 128); + result_1140851096[2] = ((iHEX60gensym21_1140851098 & 63) | 128); + } + else { + if (HEX3CHEX3DHEX25_33555507(iHEX60gensym21_1140851098, 2097151)) { + if (result_1140851096.length < 4) { for (var i = result_1140851096.length; i < 4; ++i) result_1140851096.push(0); } + else {result_1140851096.length = 4; }; + result_1140851096[0] = ((iHEX60gensym21_1140851098 >> 18) | 240); + result_1140851096[1] = (((iHEX60gensym21_1140851098 >> 12) & 63) | 128); + result_1140851096[2] = (((iHEX60gensym21_1140851098 >> 6) & 63) | 128); + result_1140851096[3] = ((iHEX60gensym21_1140851098 & 63) | 128); + } + else { + if (HEX3CHEX3DHEX25_33555507(iHEX60gensym21_1140851098, 67108863)) { + if (result_1140851096.length < 5) { for (var i = result_1140851096.length; i < 5; ++i) result_1140851096.push(0); } + else {result_1140851096.length = 5; }; + result_1140851096[0] = ((iHEX60gensym21_1140851098 >> 24) | 248); + result_1140851096[1] = (((iHEX60gensym21_1140851098 >> 18) & 63) | 128); + result_1140851096[2] = (((iHEX60gensym21_1140851098 >> 12) & 63) | 128); + result_1140851096[3] = (((iHEX60gensym21_1140851098 >> 6) & 63) | 128); + result_1140851096[4] = ((iHEX60gensym21_1140851098 & 63) | 128); + } + else { + if (HEX3CHEX3DHEX25_33555507(iHEX60gensym21_1140851098, 2147483647)) { + if (result_1140851096.length < 6) { for (var i = result_1140851096.length; i < 6; ++i) result_1140851096.push(0); } + else {result_1140851096.length = 6; }; + result_1140851096[0] = ((iHEX60gensym21_1140851098 >> 30) | 252); + result_1140851096[1] = (((iHEX60gensym21_1140851098 >> 24) & 63) | 128); + result_1140851096[2] = (((iHEX60gensym21_1140851098 >> 18) & 63) | 128); + result_1140851096[3] = (((iHEX60gensym21_1140851098 >> 12) & 63) | 128); + result_1140851096[4] = (((iHEX60gensym21_1140851098 >> 6) & 63) | 128); + result_1140851096[5] = ((iHEX60gensym21_1140851098 & 63) | 128); + } + else { + } + }}}}} + + return result_1140851096; + +} + +function parseEntity_1275068762(my_1275068763, dest_1275068764, dest_1275068764_Idx) { + var pos_1275068765 = (my_1275068763.bufpos + 1); + my_1275068763.kind = 2; + if ((my_1275068763.buf[pos_1275068765] == 35)) { + var r_1275068766 = 0; + pos_1275068765 += 1; + if ((my_1275068763.buf[pos_1275068765] == 120)) { + pos_1275068765 += 1; + Label1: { + Label2: while (true) { + if (!true) break Label2; + switch (my_1275068763.buf[pos_1275068765]) { + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + r_1275068766 = (((r_1275068766 << 4) << 0 >> 0) | (my_1275068763.buf[pos_1275068765] - 48)); + break; + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + r_1275068766 = (((r_1275068766 << 4) << 0 >> 0) | ((my_1275068763.buf[pos_1275068765] - 97) + 10)); + break; + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + r_1275068766 = (((r_1275068766 << 4) << 0 >> 0) | ((my_1275068763.buf[pos_1275068765] - 65) + 10)); + break; + default: + break Label1; + break; + } + pos_1275068765 += 1; + } + }; + } + else { + Label3: { + Label4: while (true) { + if (!(ConstSet68[my_1275068763.buf[pos_1275068765]] != undefined)) break Label4; + r_1275068766 = ((r_1275068766 * 10) + (my_1275068763.buf[pos_1275068765] - 48)); + pos_1275068765 += 1; + } + }; + } + + dest_1275068764[dest_1275068764_Idx].push.apply(dest_1275068764[dest_1275068764_Idx], nuctoUTF8(((r_1275068766) | 0)));; + } + else { + if ((((my_1275068763.buf[pos_1275068765] == 108) && (my_1275068763.buf[(pos_1275068765 + 1)] == 116)) && (my_1275068763.buf[(pos_1275068765 + 2)] == 59))) { + addChar(dest_1275068764[dest_1275068764_Idx], 60);; + pos_1275068765 += 2; + } + else { + if ((((my_1275068763.buf[pos_1275068765] == 103) && (my_1275068763.buf[(pos_1275068765 + 1)] == 116)) && (my_1275068763.buf[(pos_1275068765 + 2)] == 59))) { + addChar(dest_1275068764[dest_1275068764_Idx], 62);; + pos_1275068765 += 2; + } + else { + if (((((my_1275068763.buf[pos_1275068765] == 97) && (my_1275068763.buf[(pos_1275068765 + 1)] == 109)) && (my_1275068763.buf[(pos_1275068765 + 2)] == 112)) && (my_1275068763.buf[(pos_1275068765 + 3)] == 59))) { + addChar(dest_1275068764[dest_1275068764_Idx], 38);; + pos_1275068765 += 3; + } + else { + if ((((((my_1275068763.buf[pos_1275068765] == 97) && (my_1275068763.buf[(pos_1275068765 + 1)] == 112)) && (my_1275068763.buf[(pos_1275068765 + 2)] == 111)) && (my_1275068763.buf[(pos_1275068765 + 3)] == 115)) && (my_1275068763.buf[(pos_1275068765 + 4)] == 59))) { + addChar(dest_1275068764[dest_1275068764_Idx], 39);; + pos_1275068765 += 4; + } + else { + if ((((((my_1275068763.buf[pos_1275068765] == 113) && (my_1275068763.buf[(pos_1275068765 + 1)] == 117)) && (my_1275068763.buf[(pos_1275068765 + 2)] == 111)) && (my_1275068763.buf[(pos_1275068765 + 3)] == 116)) && (my_1275068763.buf[(pos_1275068765 + 4)] == 59))) { + addChar(dest_1275068764[dest_1275068764_Idx], 34);; + pos_1275068765 += 4; + } + else { + my_1275068763.bufpos = pos_1275068765; + var name_1275068852 = [[]]; + parseName_1275068745(my_1275068763, name_1275068852, 0); + pos_1275068765 = my_1275068763.bufpos; + if ((!((my_1275068763.err == 2)) && (my_1275068763.buf[pos_1275068765] == 59))) { + my_1275068763.kind = 12; + } + else { + addChar(dest_1275068764[dest_1275068764_Idx], 38);; + } + + dest_1275068764[dest_1275068764_Idx].push.apply(dest_1275068764[dest_1275068764_Idx], name_1275068852[0]);; + } + }}}}} + if ((my_1275068763.buf[pos_1275068765] == 59)) { + pos_1275068765 += 1; + } + else { + my_1275068763.err = 3; + } + + my_1275068763.bufpos = pos_1275068765; + + +} + +function parseCharData_1275069009(my_1275069010) { + var pos_1275069011 = my_1275069010.bufpos; + Label1: { + Label2: while (true) { + if (!true) break Label2; + switch (my_1275069010.buf[pos_1275069011]) { + case 0: + case 60: + case 38: + break Label1; + break; + case 13: + pos_1275069011 = handleCR_1342177363(my_1275069010, pos_1275069011); + addChar(my_1275069010.a, 10);; + break; + case 10: + pos_1275069011 = handleLF_1342177375(my_1275069010, pos_1275069011); + addChar(my_1275069010.a, 10);; + break; + case 47: + pos_1275069011 = handleRefillChar_1342177387(my_1275069010, pos_1275069011); + addChar(my_1275069010.a, 47);; + break; + default: + addChar(my_1275069010.a, my_1275069010.buf[pos_1275069011]);; + pos_1275069011 += 1; + break; + } + } + }; + my_1275069010.bufpos = pos_1275069011; + my_1275069010.kind = 2; + + +} + +function rawGetTok_1275069017(my_1275069018) { + my_1275069018.kind = 0; + if (my_1275069018.a.length < 0) { for (var i = my_1275069018.a.length; i < 0; ++i) my_1275069018.a.push(0); } + else {my_1275069018.a.length = 0; }; + var pos_1275069019 = my_1275069018.bufpos; + switch (my_1275069018.buf[pos_1275069019]) { + case 60: + switch (my_1275069018.buf[(pos_1275069019 + 1)]) { + case 47: + parseEndTag_1275068942(my_1275069018); + break; + case 33: + if ((((((((my_1275069018.buf[(pos_1275069019 + 2)] == 91) && (my_1275069018.buf[(pos_1275069019 + 3)] == 67)) && (my_1275069018.buf[(pos_1275069019 + 4)] == 68)) && (my_1275069018.buf[(pos_1275069019 + 5)] == 65)) && (my_1275069018.buf[(pos_1275069019 + 6)] == 84)) && (my_1275069018.buf[(pos_1275069019 + 7)] == 65)) && (my_1275069018.buf[(pos_1275069019 + 8)] == 91))) { + parseCDATA_1275068677(my_1275069018); + } + else { + if (((my_1275069018.buf[(pos_1275069019 + 2)] == 45) && (my_1275069018.buf[(pos_1275069019 + 3)] == 45))) { + parseComment_1275068695(my_1275069018); + } + else { + parseSpecial_1275068886(my_1275069018); + } + } + break; + case 63: + parsePI_1275068863(my_1275069018); + break; + default: + parseTag_1275068920(my_1275069018); + break; + } + break; + case 32: + case 9: + case 13: + case 10: + parseWhitespace_1275068734(my_1275069018, false); + my_1275069018.kind = 3; + break; + case 0: + my_1275069018.kind = 1; + break; + case 38: + parseEntity_1275068762(my_1275069018, my_1275069018, "a"); + break; + default: + parseCharData_1275069009(my_1275069018); + break; + } + + +} + +function getTok_1275069027(my_1275069028) { + Label1: { + Label2: while (true) { + if (!true) break Label2; + var lastKind_1275069029 = my_1275069028.kind; + rawGetTok_1275069017(my_1275069028); + switch (my_1275069028.kind) { + case 4: + if ((my_1275069028.options[1] != undefined)) { + break Label1; + } + + break; + case 3: + if (((my_1275069028.options[0] != undefined) || (ConstSet69[lastKind_1275069029] != undefined))) { + break Label1; + } + + break; + default: + break Label1; + break; + } + } + }; + + +} + +function parseAttribute_1275068949(my_1275068950) { + BeforeRet: { + my_1275068950.kind = 9; + if (my_1275068950.a.length < 0) { for (var i = my_1275068950.a.length; i < 0; ++i) my_1275068950.a.push(0); } + else {my_1275068950.a.length = 0; }; + if (my_1275068950.b.length < 0) { for (var i = my_1275068950.b.length; i < 0; ++i) my_1275068950.b.push(0); } + else {my_1275068950.b.length = 0; }; + parseName_1275068745(my_1275068950, my_1275068950, "a"); + if (((my_1275068950.a).length == 0)) { + markError_1275068658(my_1275068950, 5); + break BeforeRet; + } + + var startPos_1275068951 = my_1275068950.bufpos; + parseWhitespace_1275068734(my_1275068950, true); + if (!((my_1275068950.buf[my_1275068950.bufpos] == 61))) { + if ((!((my_1275068950.options[3] != undefined)) || (!((my_1275068950.buf[my_1275068950.bufpos] == 62)) && (my_1275068950.bufpos == startPos_1275068951)))) { + markError_1275068658(my_1275068950, 6); + } + + break BeforeRet; + } + + my_1275068950.bufpos += 1; + parseWhitespace_1275068734(my_1275068950, true); + var pos_1275068961 = my_1275068950.bufpos; + if ((ConstSet70[my_1275068950.buf[pos_1275068961]] != undefined)) { + var quote_1275068966 = my_1275068950.buf[pos_1275068961]; + var pendingSpace_1275068967 = false; + pos_1275068961 += 1; + Label1: { + Label2: while (true) { + if (!true) break Label2; + switch (my_1275068950.buf[pos_1275068961]) { + case 0: + markError_1275068658(my_1275068950, 7); + break Label1; + break; + case 38: + if (pendingSpace_1275068967) { + addChar(my_1275068950.b, 32);; + pendingSpace_1275068967 = false; + } + + my_1275068950.bufpos = pos_1275068961; + parseEntity_1275068762(my_1275068950, my_1275068950, "b"); + my_1275068950.kind = 9; + pos_1275068961 = my_1275068950.bufpos; + break; + case 32: + case 9: + pendingSpace_1275068967 = true; + pos_1275068961 += 1; + break; + case 13: + pos_1275068961 = handleCR_1342177363(my_1275068950, pos_1275068961); + pendingSpace_1275068967 = true; + break; + case 10: + pos_1275068961 = handleLF_1342177375(my_1275068950, pos_1275068961); + pendingSpace_1275068967 = true; + break; + case 47: + pos_1275068961 = handleRefillChar_1342177387(my_1275068950, pos_1275068961); + addChar(my_1275068950.b, 47);; + break; + default: + if ((my_1275068950.buf[pos_1275068961] == quote_1275068966)) { + pos_1275068961 += 1; + break Label1; + } + else { + if (pendingSpace_1275068967) { + addChar(my_1275068950.b, 32);; + pendingSpace_1275068967 = false; + } + + addChar(my_1275068950.b, my_1275068950.buf[pos_1275068961]);; + pos_1275068961 += 1; + } + + break; + } + } + }; + } + else { + if ((my_1275068950.options[2] != undefined)) { + var startPos_1275068993 = pos_1275068961; + Label3: { + Label4: while (true) { + var c_1275068994 = my_1275068950.buf[pos_1275068961]; + if (!!((ConstSet71[c_1275068994] != undefined))) break Label4; + if ((c_1275068994 == 38)) { + my_1275068950.bufpos = pos_1275068961; + parseEntity_1275068762(my_1275068950, my_1275068950, "b"); + my_1275068950.kind = 9; + pos_1275068961 = my_1275068950.bufpos; + } + else { + if ((c_1275068994 == 47)) { + pos_1275068961 = handleRefillChar_1342177387(my_1275068950, pos_1275068961); + addChar(my_1275068950.b, 47);; + } + else { + addChar(my_1275068950.b, c_1275068994);; + pos_1275068961 += 1; + } + } + } + }; + if ((pos_1275068961 == startPos_1275068993)) { + markError_1275068658(my_1275068950, 9); + } + + } + else { + markError_1275068658(my_1275068950, 7); + Label5: { + Label6: while (true) { + if (!(!((my_1275068950.buf[pos_1275068961] == 62)) && (32 < my_1275068950.buf[pos_1275068961]))) break Label6; + addChar(my_1275068950.b, my_1275068950.buf[pos_1275068961]);; + pos_1275068961 += 1; + } + }; + } + } + my_1275068950.bufpos = pos_1275068961; + parseWhitespace_1275068734(my_1275068950, true); + }; + + +} + +function next_1275069043(my_1275069044) { + switch (my_1275069044.state) { + case 1: + getTok_1275069027(my_1275069044); + break; + case 0: + my_1275069044.state = 1; + getTok_1275069027(my_1275069044); + if (((my_1275069044.kind == 5) && eqStrings(my_1275069044.a, [120,109,108]))) { + getTok_1275069027(my_1275069044); + } + + break; + case 2: + if ((my_1275069044.buf[my_1275069044.bufpos] == 62)) { + my_1275069044.kind = 10; + my_1275069044.bufpos += 1; + my_1275069044.state = 1; + } + else { + if ((my_1275069044.buf[my_1275069044.bufpos] == 47)) { + my_1275069044.bufpos = handleRefillChar_1342177387(my_1275069044, my_1275069044.bufpos); + if ((my_1275069044.buf[my_1275069044.bufpos] == 62)) { + my_1275069044.kind = 10; + my_1275069044.bufpos += 1; + my_1275069044.state = 3; + } + else { + markError_1275068658(my_1275069044, 5); + } + + } + else { + parseAttribute_1275068949(my_1275069044); + } + } + break; + case 3: + my_1275069044.state = 1; + my_1275069044.kind = 7; + if (!(my_1275069044.cIsEmpty)) { + my_1275069044.a = nimCopy(null, my_1275069044.c, NTI33554449); + } + + break; + case 4: + my_1275069044.kind = 0; + my_1275069044.state = 1; + break; + } + + +} + +function kind_1275068591(my_1275068592) { + var result_1275068593 = 0; + + BeforeRet: { + result_1275068593 = my_1275068592.kind; + break BeforeRet; + }; + + return result_1275068593; + +} + +function newXmlNode_1291845664(kind_1291845665) { + var result_1291845666 = null; + + result_1291845666 = {k: kind_1291845665, fText: [], fTag: [], s: [], fAttr: null, fClientData: 0}; + + return result_1291845666; + +} + +function newElement_1291845728(tag_1291845729) { + var Temporary1; + var Temporary2; + + var result_1291845730 = null; + + result_1291845730 = newXmlNode_1291845664(2); + var Temporary1 = result_1291845730; + if (ConstSet72[Temporary1.k]===undefined) { raiseFieldError2(makeNimstrLit("field \'fTag\' is not accessible for type \'XmlNodeObj\' using \'k = "), reprDiscriminant(Temporary1.k, NTI1291845636)); } + Temporary1.fTag = nimCopy(null, tag_1291845729, NTI33554449); + var Temporary2 = result_1291845730; + if (ConstSet73[Temporary2.k]===undefined) { raiseFieldError2(makeNimstrLit("field \'s\' is not accessible for type \'XmlNodeObj\' using \'k = "), reprDiscriminant(Temporary2.k, NTI1291845636)); } + Temporary2.s = nimCopy(null, [], NTI1291845689); + + return result_1291845730; + +} + +function tag_1291845834(n_1291845835) { + var Temporary1; + + var result_1291845836 = []; + + var Temporary1 = n_1291845835; + if (ConstSet74[Temporary1.k]===undefined) { raiseFieldError2(makeNimstrLit("field \'fTag\' is not accessible for type \'XmlNodeObj\' using \'k = "), reprDiscriminant(Temporary1.k, NTI1291845636)); } + result_1291845836 = Temporary1["fTag"]; + + return result_1291845836; + +} + +function add_1291845910(father_1291845911, son_1291845912) { + var Temporary1; + + var Temporary1 = father_1291845911; + if (ConstSet75[Temporary1.k]===undefined) { raiseFieldError2(makeNimstrLit("field \'s\' is not accessible for type \'XmlNodeObj\' using \'k = "), reprDiscriminant(Temporary1.k, NTI1291845636)); } + Temporary1.s.push(son_1291845912);; + + +} + +function addNode_1258291206(father_1258291207, son_1258291208) { + if (!((son_1258291208 == null))) { + add_1291845910(father_1258291207, son_1258291208); + } + + + +} + +function newComment_1291845777(comment_1291845778) { + var Temporary1; + + var result_1291845779 = null; + + result_1291845779 = newXmlNode_1291845664(5); + var Temporary1 = result_1291845779; + if (ConstSet76[Temporary1.k]===undefined) { raiseFieldError2(makeNimstrLit("field \'fText\' is not accessible for type \'XmlNodeObj\' using \'k = "), reprDiscriminant(Temporary1.k, NTI1291845636)); } + Temporary1.fText = nimCopy(null, comment_1291845778, NTI33554449); + + return result_1291845779; + +} + +function newText_1291845767(text_1291845768) { + var Temporary1; + + var result_1291845769 = null; + + result_1291845769 = newXmlNode_1291845664(0); + var Temporary1 = result_1291845769; + if (ConstSet77[Temporary1.k]===undefined) { raiseFieldError2(makeNimstrLit("field \'fText\' is not accessible for type \'XmlNodeObj\' using \'k = "), reprDiscriminant(Temporary1.k, NTI1291845636)); } + Temporary1.fText = nimCopy(null, text_1291845768, NTI33554449); + + return result_1291845769; + +} + +function attrsHEX3D_1291846349(n_1291846350, attr_1291846351) { + var Temporary1; + + var Temporary1 = n_1291846350; + if (ConstSet78[Temporary1.k]===undefined) { raiseFieldError2(makeNimstrLit("field \'fAttr\' is not accessible for type \'XmlNodeObj\' using \'k = "), reprDiscriminant(Temporary1.k, NTI1291845636)); } + Temporary1.fAttr = attr_1291846351; + + +} + +function newSeq_1325400360(len_1325400362) { + var result_1325400363 = []; + + result_1325400363 = new Array(len_1325400362); for (var i = 0 ; i < len_1325400362 ; ++i) { result_1325400363[i] = {Field0: [], Field1: [], Field2: false}; } + return result_1325400363; + +} + +function nstnewStringTable(mode_1325400354) { + var result_1325400355 = null; + + result_1325400355 = {mode: mode_1325400354, counter: 0, data: newSeq_1325400360(64), m_type: NTI1325400070}; + + return result_1325400355; + +} + +function hash_805306863(x_805306864) { + var result_805306865 = 0; + + result_805306865 = murmurHash_805306761((x_805306864.slice(0, (x_805306864).length - 1 + 1))); + + return result_805306865; + +} + +function HEX21HEX26_805306371(h_805306372, val_805306373) { + var result_805306374 = 0; + + var h_805306375 = Number(BigInt.asUintN(32, BigInt(h_805306372))); + var val_805306376 = Number(BigInt.asUintN(32, BigInt(val_805306373))); + var res_805306377 = ((h_805306375 + val_805306376) >>> 0); + res_805306377 = ((res_805306377 + ((res_805306377 << 10) >>> 0)) >>> 0); + res_805306377 = ((res_805306377 ^ (res_805306377 >>> 6)) >>> 0); + result_805306374 = Number(BigInt.asIntN(32, BigInt(res_805306377))); + + return result_805306374; + +} + +function HEX21HEX24_805306386(h_805306387) { + var result_805306388 = 0; + + var h_805306389 = Number(BigInt.asUintN(32, BigInt(h_805306387))); + var res_805306394 = ((h_805306389 + ((h_805306389 << 3) >>> 0)) >>> 0); + res_805306394 = ((res_805306394 ^ (res_805306394 >>> 11)) >>> 0); + res_805306394 = ((res_805306394 + ((res_805306394 << 15) >>> 0)) >>> 0); + result_805306388 = Number(BigInt.asIntN(32, BigInt(res_805306394))); + + return result_805306388; + +} + +function hashIgnoreCase_805306942(x_805306943) { + var result_805306944 = 0; + + var h_805306945 = 0; + Label1: { + var i_805306950 = 0; + var colontmp__553650072 = 0; + colontmp__553650072 = ((x_805306943).length - 1); + var res_553650073 = 0; + Label2: { + Label3: while (true) { + if (!(res_553650073 <= colontmp__553650072)) break Label3; + i_805306950 = res_553650073; + var c_805306951 = x_805306943[i_805306950]; + if ((ConstSet79[c_805306951] != undefined)) { + c_805306951 = (c_805306951 + 32); + } + + h_805306945 = HEX21HEX26_805306371(h_805306945, c_805306951); + res_553650073 += 1; + } + }; + }; + result_805306944 = HEX21HEX24_805306386(h_805306945); + + return result_805306944; + +} + +function hashIgnoreStyle_805306875(x_805306876) { + var result_805306877 = 0; + + var h_805306878 = 0; + var i_805306879 = 0; + var xLen_805306880 = (x_805306876).length; + Label1: { + Label2: while (true) { + if (!(i_805306879 < xLen_805306880)) break Label2; + var c_805306881 = x_805306876[i_805306879]; + if ((c_805306881 == 95)) { + i_805306879 += 1; + } + else { + if ((ConstSet80[c_805306881] != undefined)) { + c_805306881 = (c_805306881 + 32); + } + + h_805306878 = HEX21HEX26_805306371(h_805306878, c_805306881); + i_805306879 += 1; + } + + } + }; + result_805306877 = HEX21HEX24_805306386(h_805306878); + + return result_805306877; + +} + +function myhash_1325400201(t_1325400202, key_1325400203) { + var result_1325400204 = 0; + + switch (t_1325400202.mode) { + case 0: + result_1325400204 = hash_805306863(key_1325400203); + break; + case 1: + result_1325400204 = hashIgnoreCase_805306942(key_1325400203); + break; + case 2: + result_1325400204 = hashIgnoreStyle_805306875(key_1325400203); + break; + } + + return result_1325400204; + +} + +function cmpStrings(a_33557033, b_33557034) { + if (a_33557033 == b_33557034) return 0; + if (!a_33557033) return -1; + if (!b_33557034) return 1; + for (var i = 0; i < a_33557033.length && i < b_33557034.length; i++) { + var result = a_33557033[i] - b_33557034[i]; + if (result != 0) return result; + } + return a_33557033.length - b_33557034.length; + + + +} + +function cmp_33555881(x_33555882, y_33555883) { + var result_33557039 = 0; + + result_33557039 = cmpStrings(x_33555882, y_33555883); + + return result_33557039; + +} + +function toLowerAscii_1191182337(c_1191182338) { + var result_1191182339 = 0; + + if ((ConstSet81[c_1191182338] != undefined)) { + result_1191182339 = (c_1191182338 + 32); + } + else { + result_1191182339 = c_1191182338; + } + + + return result_1191182339; + +} + +function nsuCmpIgnoreCase(a_1056964795, b_1056964796) { + var result_1056964797 = 0; + + BeforeRet: { + var aLenHEX60gensym20_1056964804 = (a_1056964795).length; + var bLenHEX60gensym20_1056964805 = (b_1056964796).length; + var iHEX60gensym20_1056964806 = 0; + var mHEX60gensym20_1056964807 = nimMin(aLenHEX60gensym20_1056964804, bLenHEX60gensym20_1056964805); + Label1: { + Label2: while (true) { + if (!(iHEX60gensym20_1056964806 < mHEX60gensym20_1056964807)) break Label2; + result_1056964797 = (toLowerAscii_1191182337(a_1056964795[iHEX60gensym20_1056964806]) - toLowerAscii_1191182337(b_1056964796[iHEX60gensym20_1056964806])); + if (!((result_1056964797 == 0))) { + break BeforeRet; + } + + iHEX60gensym20_1056964806 += 1; + } + }; + result_1056964797 = (aLenHEX60gensym20_1056964804 - bLenHEX60gensym20_1056964805); + }; + + return result_1056964797; + +} + +function nsuCmpIgnoreStyle(a_1056964820, b_1056964821) { + var Temporary7; + var Temporary8; + + var result_1056964822 = 0; + + BeforeRet: { + var aLenHEX60gensym24_1056964831 = (a_1056964820).length; + var bLenHEX60gensym24_1056964832 = (b_1056964821).length; + var iHEX60gensym24_1056964833 = 0; + var jHEX60gensym24_1056964834 = 0; + Label1: { + Label2: while (true) { + if (!true) break Label2; + Label3: { + Label4: while (true) { + if (!((iHEX60gensym24_1056964833 < aLenHEX60gensym24_1056964831) && (a_1056964820[iHEX60gensym24_1056964833] == 95))) break Label4; + iHEX60gensym24_1056964833 += 1; + } + }; + Label5: { + Label6: while (true) { + if (!((jHEX60gensym24_1056964834 < bLenHEX60gensym24_1056964832) && (b_1056964821[jHEX60gensym24_1056964834] == 95))) break Label6; + jHEX60gensym24_1056964834 += 1; + } + }; + if ((iHEX60gensym24_1056964833 < aLenHEX60gensym24_1056964831)) { + Temporary7 = toLowerAscii_1191182337(a_1056964820[iHEX60gensym24_1056964833]); + } + else { + Temporary7 = 0; + } + + var aaHEX60gensym24_1056964845 = Temporary7; + if ((jHEX60gensym24_1056964834 < bLenHEX60gensym24_1056964832)) { + Temporary8 = toLowerAscii_1191182337(b_1056964821[jHEX60gensym24_1056964834]); + } + else { + Temporary8 = 0; + } + + var bbHEX60gensym24_1056964846 = Temporary8; + result_1056964822 = (aaHEX60gensym24_1056964845 - bbHEX60gensym24_1056964846); + if (!((result_1056964822 == 0))) { + break BeforeRet; + } + + if ((aLenHEX60gensym24_1056964831 <= iHEX60gensym24_1056964833)) { + if ((bLenHEX60gensym24_1056964832 <= jHEX60gensym24_1056964834)) { + result_1056964822 = 0; + break BeforeRet; + } + + result_1056964822 = (-1); + break BeforeRet; + } + else { + if ((bLenHEX60gensym24_1056964832 <= jHEX60gensym24_1056964834)) { + result_1056964822 = 1; + break BeforeRet; + } + } + iHEX60gensym24_1056964833 += 1; + jHEX60gensym24_1056964834 += 1; + } + }; + }; + + return result_1056964822; + +} + +function myCmp_1325400205(t_1325400206, a_1325400207, b_1325400208) { + var result_1325400209 = false; + + switch (t_1325400206.mode) { + case 0: + result_1325400209 = (cmp_33555881(a_1325400207, b_1325400208) == 0); + break; + case 1: + result_1325400209 = (nsuCmpIgnoreCase(a_1325400207, b_1325400208) == 0); + break; + case 2: + result_1325400209 = (nsuCmpIgnoreStyle(a_1325400207, b_1325400208) == 0); + break; + } + + return result_1325400209; + +} + +function nextTry_1325400217(h_1325400218, maxHash_1325400219) { + var result_1325400220 = 0; + + result_1325400220 = ((h_1325400218 + 1) & maxHash_1325400219); + + return result_1325400220; + +} + +function rawGet_1325400221(t_1325400222, key_1325400223) { + var result_1325400224 = 0; + + BeforeRet: { + var h_1325400228 = (myhash_1325400201(t_1325400222, key_1325400223) & (t_1325400222.data).length - 1); + Label1: { + Label2: while (true) { + if (!t_1325400222.data[h_1325400228].Field2) break Label2; + if (myCmp_1325400205(t_1325400222, t_1325400222.data[h_1325400228].Field0, key_1325400223)) { + result_1325400224 = h_1325400228; + break BeforeRet; + } + + h_1325400228 = nextTry_1325400217(h_1325400228, (t_1325400222.data).length - 1); + } + }; + result_1325400224 = (-1); + }; + + return result_1325400224; + +} + +function mustRehash_1325400210(length_1325400211, counter_1325400212) { + var result_1325400213 = false; + + result_1325400213 = (((length_1325400211 * 2) < (counter_1325400212 * 3)) || ((length_1325400211 - counter_1325400212) < 4)); + + return result_1325400213; + +} + +function rawInsert_1325400276(t_1325400277, data_1325400278, data_1325400278_Idx, key_1325400279, val_1325400280) { + var h_1325400284 = (myhash_1325400201(t_1325400277, key_1325400279) & (data_1325400278[data_1325400278_Idx]).length - 1); + Label1: { + Label2: while (true) { + if (!data_1325400278[data_1325400278_Idx][h_1325400284].Field2) break Label2; + h_1325400284 = nextTry_1325400217(h_1325400284, (data_1325400278[data_1325400278_Idx]).length - 1); + } + }; + data_1325400278[data_1325400278_Idx][h_1325400284].Field0 = nimCopy(null, key_1325400279, NTI33554449); + data_1325400278[data_1325400278_Idx][h_1325400284].Field1 = nimCopy(null, val_1325400280, NTI33554449); + data_1325400278[data_1325400278_Idx][h_1325400284].Field2 = true; + + +} + +function enlarge_1325400288(t_1325400289) { + var Temporary4; + var Temporary5; + + var n_1325400290 = [[]]; + n_1325400290[0] = new Array(((t_1325400289.data).length * 2)); for (var i = 0 ; i < ((t_1325400289.data).length * 2) ; ++i) { n_1325400290[0][i] = {Field0: [], Field1: [], Field2: false}; } Label1: { + var i_1325400307 = 0; + var colontmp__553650081 = 0; + colontmp__553650081 = (t_1325400289.data).length - 1; + var res_553650082 = 0; + Label2: { + Label3: while (true) { + if (!(res_553650082 <= colontmp__553650081)) break Label3; + i_1325400307 = res_553650082; + if (t_1325400289.data[i_1325400307].Field2) { + Temporary4 = t_1325400289.data[i_1325400307].Field0; + t_1325400289.data[i_1325400307].Field0 = genericReset(t_1325400289.data[i_1325400307].Field0, NTI33554449); + Temporary5 = t_1325400289.data[i_1325400307].Field1; + t_1325400289.data[i_1325400307].Field1 = genericReset(t_1325400289.data[i_1325400307].Field1, NTI33554449); + rawInsert_1325400276(t_1325400289, n_1325400290, 0, Temporary4, Temporary5); + } + + res_553650082 += 1; + } + }; + }; + var Temporary6 = t_1325400289.data; t_1325400289.data = n_1325400290[0]; n_1325400290[0] = Temporary6; + +} + +function nstPut(t_1325400341, key_1325400342, val_1325400343) { + var index_1325400344 = rawGet_1325400221(t_1325400341, key_1325400342); + if ((0 <= index_1325400344)) { + t_1325400341.data[index_1325400344].Field1 = nimCopy(null, val_1325400343, NTI33554449); + } + else { + if (mustRehash_1325400210((t_1325400341.data).length, t_1325400341.counter)) { + enlarge_1325400288(t_1325400341); + } + + rawInsert_1325400276(t_1325400341, t_1325400341, "data", key_1325400342, val_1325400343); + t_1325400341.counter += 1; + } + + + +} + +function nstnewStringTableWithTableConstr(keyValuePairs_1325400418, mode_1325400419) { + var result_1325400420 = null; + + result_1325400420 = nstnewStringTable(mode_1325400419); + Label1: { + var key_1325400434 = []; + var val_1325400435 = []; + var i_553650068 = 0; + Label2: { + Label3: while (true) { + if (!(i_553650068 < (keyValuePairs_1325400418).length)) break Label3; + key_1325400434 = keyValuePairs_1325400418[i_553650068]["Field0"]; + val_1325400435 = keyValuePairs_1325400418[i_553650068]["Field1"]; + nstPut(result_1325400420, key_1325400434, val_1325400435); + i_553650068 += 1; + } + }; + }; + + return result_1325400420; + +} + +function attrs_1291846336(n_1291846337) { + var Temporary1; + + var result_1291846338 = null; + + var Temporary1 = n_1291846337; + if (ConstSet82[Temporary1.k]===undefined) { raiseFieldError2(makeNimstrLit("field \'fAttr\' is not accessible for type \'XmlNodeObj\' using \'k = "), reprDiscriminant(Temporary1.k, NTI1291845636)); } + result_1291846338 = Temporary1.fAttr; + + return result_1291846338; + +} + +function newCData_1291845780(cdata_1291845781) { + var Temporary1; + + var result_1291845782 = null; + + result_1291845782 = newXmlNode_1291845664(3); + var Temporary1 = result_1291845782; + if (ConstSet83[Temporary1.k]===undefined) { raiseFieldError2(makeNimstrLit("field \'fText\' is not accessible for type \'XmlNodeObj\' using \'k = "), reprDiscriminant(Temporary1.k, NTI1291845636)); } + Temporary1.fText = nimCopy(null, cdata_1291845781, NTI33554449); + + return result_1291845782; + +} + +function newEntity_1291845783(entity_1291845784) { + var Temporary1; + + var result_1291845785 = null; + + result_1291845785 = newXmlNode_1291845664(4); + var Temporary1 = result_1291845785; + if (ConstSet84[Temporary1.k]===undefined) { raiseFieldError2(makeNimstrLit("field \'fText\' is not accessible for type \'XmlNodeObj\' using \'k = "), reprDiscriminant(Temporary1.k, NTI1291845636)); } + Temporary1.fText = nimCopy(null, entity_1291845784, NTI33554449); + + return result_1291845785; + +} + +function parse_1258291213(x_1258291214, errors_1258291215, errors_1258291215_Idx) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + var Temporary7; + var Temporary8; + var Temporary9; + var Temporary10; + + var result_1258291230 = null; + + switch (kind_1275068591(x_1258291214)) { + case 4: + Temporary1 = x_1258291214.a; + x_1258291214.a = genericReset(x_1258291214.a, NTI33554449); + result_1258291230 = newComment_1291845777(Temporary1); + next_1275069043(x_1258291214); + break; + case 2: + case 3: + Temporary2 = x_1258291214.a; + x_1258291214.a = genericReset(x_1258291214.a, NTI33554449); + result_1258291230 = newText_1291845767(Temporary2); + next_1275069043(x_1258291214); + break; + case 5: + case 13: + next_1275069043(x_1258291214); + break; + case 0: + errors_1258291215[errors_1258291215_Idx] = true; + next_1275069043(x_1258291214); + break; + case 6: + Temporary3 = x_1258291214.a; + x_1258291214.a = genericReset(x_1258291214.a, NTI33554449); + result_1258291230 = newElement_1291845728(Temporary3); + next_1275069043(x_1258291214); + untilElementEnd_1258291216(x_1258291214, result_1258291230, errors_1258291215, errors_1258291215_Idx); + break; + case 7: + errors_1258291215[errors_1258291215_Idx] = true; + break; + case 8: + Temporary4 = x_1258291214.a; + x_1258291214.a = genericReset(x_1258291214.a, NTI33554449); + result_1258291230 = newElement_1291845728(Temporary4); + next_1275069043(x_1258291214); + attrsHEX3D_1291846349(result_1258291230, nstnewStringTableWithTableConstr([], 0)); + Label5: { + Label6: while (true) { + if (!true) break Label6; + switch (kind_1275068591(x_1258291214)) { + case 9: + Temporary7 = x_1258291214.a; + x_1258291214.a = genericReset(x_1258291214.a, NTI33554449); + Temporary8 = x_1258291214.b; + x_1258291214.b = genericReset(x_1258291214.b, NTI33554449); + nstPut(attrs_1291846336(result_1258291230), Temporary7, Temporary8); + next_1275069043(x_1258291214); + break; + case 10: + next_1275069043(x_1258291214); + break Label5; + break; + case 0: + errors_1258291215[errors_1258291215_Idx] = true; + next_1275069043(x_1258291214); + break Label5; + break; + default: + errors_1258291215[errors_1258291215_Idx] = true; + next_1275069043(x_1258291214); + break Label5; + break; + } + } + }; + untilElementEnd_1258291216(x_1258291214, result_1258291230, errors_1258291215, errors_1258291215_Idx); + break; + case 9: + case 10: + errors_1258291215[errors_1258291215_Idx] = true; + next_1275069043(x_1258291214); + break; + case 11: + Temporary9 = x_1258291214.a; + x_1258291214.a = genericReset(x_1258291214.a, NTI33554449); + result_1258291230 = newCData_1291845780(Temporary9); + next_1275069043(x_1258291214); + break; + case 12: + Temporary10 = x_1258291214.a; + x_1258291214.a = genericReset(x_1258291214.a, NTI33554449); + result_1258291230 = newEntity_1291845783(Temporary10); + next_1275069043(x_1258291214); + break; + case 1: + break; + } + + return result_1258291230; + +} + +function untilElementEnd_1258291216(x_1258291217, result_1258291218, errors_1258291219, errors_1258291219_Idx) { + BeforeRet: { + Label1: { + Label2: while (true) { + if (!true) break Label2; + switch (kind_1275068591(x_1258291217)) { + case 7: + if (eqStrings(x_1258291217.a, tag_1291845834(result_1258291218))) { + break BeforeRet; + } + else { + errors_1258291219[errors_1258291219_Idx] = true; + } + + break Label1; + break; + case 1: + errors_1258291219[errors_1258291219_Idx] = true; + break Label1; + break; + default: + addNode_1258291206(result_1258291218, parse_1258291213(x_1258291217, errors_1258291219, errors_1258291219_Idx)); + break; + } + } + }; + }; + + +} + +function parseXml_1258291358(text_1258291359, i_1258291360) { + var Temporary3; + + var result_1258291361 = {Field0: false, Field1: 0}; + + var errors_1258291362 = [false]; + var x_1258291363 = [({m_type: NTI1275068423, a: [], b: [], c: [], kind: 0, err: 0, state: 0, cIsEmpty: false, filename: [], options: {}, bufpos: 0, buf: [], input: null, lineNumber: 0, sentinel: 0, lineStart: 0, offsetBase: 0, refillChars: {}})]; + var stream_1258291364 = newStringStream_1308623976(text_1258291359); + setPosition_1308622918(stream_1258291364, i_1258291360); + open_1275068481(x_1258291363[0], stream_1258291364, [], ConstSet64); + next_1275069043(x_1258291363[0]); + Label1: { + Label2: while (true) { + if (!true) break Label2; + switch (kind_1275068591(x_1258291363[0])) { + case 8: + case 6: + Temporary3 = x_1258291363[0].a; + x_1258291363[0].a = genericReset(x_1258291363[0].a, NTI33554449); + var node_1258291379 = newElement_1291845728(Temporary3); + untilElementEnd_1258291216(x_1258291363[0], node_1258291379, errors_1258291362, 0); + result_1258291361["Field0"] = true; + break; + case 4: + case 13: + case 5: + case 11: + next_1275069043(x_1258291363[0]); + result_1258291361["Field0"] = true; + break; + case 7: + case 2: + case 3: + case 1: + result_1258291361["Field0"] = true; + break Label1; + break; + default: + result_1258291361["Field0"] = false; + break Label1; + break; + } + } + }; + result_1258291361["Field1"] = (i_1258291360 + x_1258291363[0].bufpos); + + return result_1258291361; + +} + +function parseAmpStr_553649270(parser_553649272) { + var Temporary1; + + var result_553649274 = [null]; + + BeforeRet: { + var initialPos_553649275 = parser_553649272.pos; + if ((initialPos_553649275 < ((parser_553649272.str) == null ? 0 : (parser_553649272.str).length))) { + Temporary1 = parser_553649272.str.charCodeAt(initialPos_553649275); + } + else { + Temporary1 = 32; + } + + var firstChar_553649276 = Temporary1; + switch (firstChar_553649276) { + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + parser_553649272.pos += 2; + result_553649274[0] = "&"; + Label2: { + var ch_553649282 = 0; + Label3: { + Label4: while (true) { + if (!(parser_553649272.pos < ((parser_553649272.str) == null ? 0 : (parser_553649272.str).length))) break Label4; + ch_553649282 = parser_553649272.str.charCodeAt((parser_553649272.pos + 0)); + add_721420296(result_553649274, 0, ch_553649282); + if ((ch_553649282 == 59)) { + break Label2; + } + else { + if (!((Letters_1056964622[ch_553649282] != undefined))) { + parser_553649272.pos = initialPos_553649275; + result_553649274[0] = "&"; + break BeforeRet; + } + } + parser_553649272.pos += 1; + } + }; + }; + break; + case 35: + parser_553649272.pos += 2; + result_553649274[0] = "&"; + Label5: { + var ch_553649292 = 0; + Label6: { + Label7: while (true) { + if (!(parser_553649272.pos < ((parser_553649272.str) == null ? 0 : (parser_553649272.str).length))) break Label7; + ch_553649292 = parser_553649272.str.charCodeAt((parser_553649272.pos + 0)); + add_721420296(result_553649274, 0, ch_553649292); + if ((ch_553649292 == 59)) { + break Label5; + } + else { + if (!((Digits_1056964626[ch_553649292] != undefined))) { + parser_553649272.pos = initialPos_553649275; + result_553649274[0] = "&"; + break BeforeRet; + } + } + parser_553649272.pos += 1; + } + }; + }; + break; + default: + result_553649274[0] = "&"; + break; + } + }; + + return result_553649274[0]; + +} + +function parseDelimed_553648242(parser_553648244, delim_553648246, singleLine_553648247) { + var Temporary5; + var Temporary6; + var Temporary7; + var Temporary8; + +function parseAux_553648273(tag_553648274, del_553648275, parser_553648276, acceptedReasons_553648277) { + var Temporary1; + var Temporary2; + + var result_553648278 = 0; + + var currentPos_553648279 = parser_553648276.pos; + var tmpTuple_553648286 = parseDelimed_553648242(parser_553648276, del_553648275, singleLine_553648247); + var finishReason_553648287 = tmpTuple_553648286["Field0"]; + var parsedElems_553648288 = nimCopy(null, tmpTuple_553648286["Field1"], NTI1040187475); + if ((acceptedReasons_553648277[finishReason_553648287] != undefined)) { + elems_553648255[0].push(newElem_771752046(tag_553648274, parsedElems_553648288));; + lastStr_553648250 = newStr_771751993(""); + elems_553648255[0].push(lastStr_553648250);; + result_553648278 = 0; + } + else { + var Temporary1 = lastStr_553648250; + if (ConstSet21[Temporary1.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + if (null != (Temporary2 = HEX5BHEX5D_721420310(parser_553648276.str, HEX2EHEX2E_1157627952(initialPos_553648272, (currentPos_553648279 - 1))), Temporary2)) { if (null == Temporary1.str) Temporary1.str = Temporary2; else Temporary1.str += Temporary2; }; + add_771754890(elems_553648255, 0, parsedElems_553648288); + lastStr_553648250 = newStr_771751993(""); + elems_553648255[0].push(lastStr_553648250);; + result_553648278 = finishReason_553648287; + } + + + return result_553648278; + + } + +function bracket_553648360(image_553648361, parser_553648362) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + + var result_553648363 = 0; + + var elem_553648938 = parseBracket_553648364(parser_553648362, image_553648361, singleLine_553648247); + var Temporary1 = elem_553648938; + if (ConstSet49[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + if ((Temporary1.tag == 0)) { + var Temporary2 = lastStr_553648250; + if (ConstSet50[Temporary2.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary2.isText, NTI33554466)); } + if (image_553648361) { + Temporary3 = "!["; + } + else { + Temporary3 = "["; + } + + if (null != Temporary3) { if (null == Temporary2.str) Temporary2.str = Temporary3; else Temporary2.str += Temporary3; }; + var Temporary4 = elem_553648938; + if (ConstSet51[Temporary4.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary4.isText, NTI33554466)); } + add_771754890(elems_553648255, 0, Temporary4.content); + lastStr_553648250 = newStr_771751993(""); + elems_553648255[0].push(lastStr_553648250);; + } + else { + elems_553648255[0].push(elem_553648938);; + lastStr_553648250 = newStr_771751993(""); + elems_553648255[0].push(lastStr_553648250);; + } + + result_553648363 = 0; + + return result_553648363; + + } + var Temporary9; + var Temporary10; + var Temporary11; + var Temporary12; + var Temporary13; + var Temporary14; + var Temporary15; + var Temporary16; + var Temporary17; + var Temporary18; + + var result_553648248 = {Field0: 0, Field1: []}; + + BeforeRet: { + var escaped_553648249 = false; + var lastStr_553648250 = newStr_771751993(""); + var elems_553648255 = [[lastStr_553648250]]; + Label1: { + var ch_553648264 = 0; + Label2: { + Label3: while (true) { + if (!(parser_553648244.pos < ((parser_553648244.str) == null ? 0 : (parser_553648244.str).length))) break Label3; + ch_553648264 = parser_553648244.str.charCodeAt((parser_553648244.pos + 0)); + Label4: { + if (!(escaped_553648249)) { + var initialPos_553648272 = parser_553648244.pos; + switch (toJSStr(delim_553648246)) { + case "": + break; + case "*": + if (nextMatch_1241514652(parser_553648244, [42,42], 0)) { + var tmpTuple_553648966 = parseDelimed_553648242(parser_553648244, [42,42], singleLine_553648247); + var finishReason_553648967 = tmpTuple_553648966["Field0"]; + var parsedElems_553648968 = nimCopy(null, tmpTuple_553648966["Field1"], NTI1040187475); + if ((finishReason_553648967 == 0)) { + elems_553648255[0].push(newElem_771752046(16, parsedElems_553648968));; + lastStr_553648250 = newStr_771751993(""); + elems_553648255[0].push(lastStr_553648250);; + break Label4; + } + else { + parser_553648244.pos = initialPos_553648272; + if (!(surroundedWhitespace_1241514598(parser_553648244, 0))) { + var colontmp__553649936 = 0; + var colontmp__553649937 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649936, Field1: nimCopy(null, colontmp__553649937, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + else { + var Temporary5 = lastStr_553648250; + if (ConstSet16[Temporary5.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary5.isText, NTI33554466)); } + add_553648982(Temporary5, "str"); + break Label4; + } + + } + + } + else { + if ((!(surroundedWhitespace_1241514598(parser_553648244, 0)) && nextMatch_1241514652(parser_553648244, [42], 0))) { + parser_553648244.pos -= 1; + var colontmp__553649938 = 0; + var colontmp__553649939 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649938, Field1: nimCopy(null, colontmp__553649939, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + } + break; + case "_": + if (nextMatch_1241514652(parser_553648244, [95,95], 0)) { + var tmpTuple_553648997 = parseDelimed_553648242(parser_553648244, [95,95], singleLine_553648247); + var finishReason_553648998 = tmpTuple_553648997["Field0"]; + var parsedElems_553648999 = nimCopy(null, tmpTuple_553648997["Field1"], NTI1040187475); + if ((finishReason_553648998 == 0)) { + elems_553648255[0].push(newElem_771752046(19, parsedElems_553648999));; + lastStr_553648250 = newStr_771751993(""); + elems_553648255[0].push(lastStr_553648250);; + break Label4; + } + else { + parser_553648244.pos = initialPos_553648272; + if (onlyNextWhitespace_1241514606(parser_553648244, 0)) { + var colontmp__553649940 = 0; + var colontmp__553649941 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649940, Field1: nimCopy(null, colontmp__553649941, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + else { + var Temporary6 = lastStr_553648250; + if (ConstSet17[Temporary6.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary6.isText, NTI33554466)); } + add_553649013(Temporary6, "str"); + break Label4; + } + + } + + } + else { + if ((onlyNextWhitespace_1241514606(parser_553648244, 0) && nextMatch_1241514652(parser_553648244, [95], 0))) { + parser_553648244.pos -= 1; + var colontmp__553649942 = 0; + var colontmp__553649943 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649942, Field1: nimCopy(null, colontmp__553649943, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + } + break; + case " ": + if ((Whitespace_1056964621[ch_553648264] != undefined)) { + parser_553648244.pos -= 1; + var colontmp__553649944 = 0; + var colontmp__553649945 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649944, Field1: nimCopy(null, colontmp__553649945, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + break; + default: + if (nextMatch_1241514652(parser_553648244, delim_553648246, 0)) { + parser_553648244.pos -= 1; + var colontmp__553649946 = 0; + var colontmp__553649947 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649946, Field1: nimCopy(null, colontmp__553649947, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + break; + } + if (((singleLine_553648247 && (nextMatch_1241514652(parser_553648244, [13,10], 0) || nextMatch_1241514652(parser_553648244, [10], 0))) || (!(singleLine_553648247) && (nextMatch_1241514652(parser_553648244, [13,10,13,10], 0) || nextMatch_1241514652(parser_553648244, [10,10], 0))))) { + if ((singleLine_553648247 && ((delim_553648246).length == 0))) { + parser_553648244.pos -= 1; + } + else { + parser_553648244.pos = initialPos_553648272; + } + + if (((delim_553648246).length == 0)) { + Temporary7 = 1; + } + else { + Temporary7 = 0; + } + + var colontmp__553649948 = Temporary7; + var colontmp__553649949 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649948, Field1: nimCopy(null, colontmp__553649949, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + else { + if ((!(singleLine_553648247) && (nextMatch_1241514652(parser_553648244, [13,10], 0) || nextMatch_1241514652(parser_553648244, [10], 0)))) { + parser_553648244.pos -= 1; + var options_553649049 = nimCopy(null, parser_553648244.options, NTI1224736772); + if (options_553649049.insertLineBreaks) { + elems_553648255[0].push(newElem_771752046(2, []));; + lastStr_553648250 = newStr_771751993(""); + elems_553648255[0].push(lastStr_553648250);; + } + else { + var Temporary8 = lastStr_553648250; + if (ConstSet19[Temporary8.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary8.isText, NTI33554466)); } + add_721420296(Temporary8, "str", ch_553648264); + } + + } + else { + if ((nextMatch_1241514652(parser_553648244, [32,32,13,10], 0) || nextMatch_1241514652(parser_553648244, [32,32,10], 0))) { + parser_553648244.pos -= 1; + elems_553648255[0].push(newElem_771752046(2, []));; + lastStr_553648250 = newStr_771751993(""); + elems_553648255[0].push(lastStr_553648250);; + } + else { + if (nextMatch_1241514652(parser_553648244, [96,96,96], 0)) { + elems_553648255[0].push(parseCodeBlock_553649072(parser_553648244, 96));; + lastStr_553648250 = newStr_771751993(""); + elems_553648255[0].push(lastStr_553648250);; + } + else { + if (nextMatch_1241514652(parser_553648244, [126,126,126], 0)) { + elems_553648255[0].push(parseCodeBlock_553649072(parser_553648244, 126));; + lastStr_553648250 = newStr_771751993(""); + elems_553648255[0].push(lastStr_553648250);; + } + else { + if (nextMatch_1241514652(parser_553648244, [94,40], 0)) { + var reasonHEX60gensym68_553649147 = parseAux_553648273(13, [41], parser_553648244, ConstSet22); + if ((ConstSet23[reasonHEX60gensym68_553649147] != undefined)) { + var colontmp__553649950 = reasonHEX60gensym68_553649147; + var colontmp__553649951 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649950, Field1: nimCopy(null, colontmp__553649951, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + } + else { + if (nextMatch_1241514652(parser_553648244, [42,42], 0)) { + var reasonHEX60gensym69_553649153 = parseAux_553648273(16, [42,42], parser_553648244, ConstSet24); + if ((ConstSet25[reasonHEX60gensym69_553649153] != undefined)) { + var colontmp__553649952 = reasonHEX60gensym69_553649153; + var colontmp__553649953 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649952, Field1: nimCopy(null, colontmp__553649953, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + } + else { + if (nextMatch_1241514652(parser_553648244, [95,95], 0)) { + var reasonHEX60gensym70_553649159 = parseAux_553648273(19, [95,95], parser_553648244, ConstSet26); + if ((ConstSet27[reasonHEX60gensym70_553649159] != undefined)) { + var colontmp__553649954 = reasonHEX60gensym70_553649159; + var colontmp__553649955 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649954, Field1: nimCopy(null, colontmp__553649955, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + } + else { + if (nextMatch_1241514652(parser_553648244, [126,126], 0)) { + var reasonHEX60gensym71_553649165 = parseAux_553648273(20, [126,126], parser_553648244, ConstSet28); + if ((ConstSet29[reasonHEX60gensym71_553649165] != undefined)) { + var colontmp__553649956 = reasonHEX60gensym71_553649165; + var colontmp__553649957 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649956, Field1: nimCopy(null, colontmp__553649957, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + } + else { + if (nextMatch_1241514652(parser_553648244, [33,91], 0)) { + var reason_553649170 = bracket_553648360(true, parser_553648244); + if ((ConstSet52[reason_553649170] != undefined)) { + var colontmp__553649958 = reason_553649170; + var colontmp__553649959 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649958, Field1: nimCopy(null, colontmp__553649959, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + } + else { + if (nextMatch_1241514614(parser_553648244, 123, 0)) { + var Temporary9 = lastStr_553648250; + if (ConstSet53[Temporary9.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary9.isText, NTI33554466)); } + if (null != (Temporary10 = parseCurly_553649175(parser_553648244), Temporary10)) { if (null == Temporary9.str) Temporary9.str = Temporary10; else Temporary9.str += Temporary10; }; + } + else { + if (nextMatch_1241514614(parser_553648244, 91, 0)) { + var reason_553649203 = bracket_553648360(false, parser_553648244); + if ((ConstSet54[reason_553649203] != undefined)) { + var colontmp__553649960 = reason_553649203; + var colontmp__553649961 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649960, Field1: nimCopy(null, colontmp__553649961, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + } + else { + if (nextMatch_1241514614(parser_553648244, 96, 0)) { + var reasonHEX60gensym76_553649209 = parseAux_553648273(18, [96], parser_553648244, ConstSet55); + if ((ConstSet56[reasonHEX60gensym76_553649209] != undefined)) { + var colontmp__553649962 = reasonHEX60gensym76_553649209; + var colontmp__553649963 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649962, Field1: nimCopy(null, colontmp__553649963, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + } + else { + if ((noAdjacentWhitespace_1241514610(parser_553648244, 0) && nextMatch_1241514614(parser_553648244, 94, 0))) { + var reasonHEX60gensym77_553649215 = parseAux_553648273(13, [32], parser_553648244, ConstSet57); + if ((ConstSet58[reasonHEX60gensym77_553649215] != undefined)) { + var colontmp__553649964 = reasonHEX60gensym77_553649215; + var colontmp__553649965 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649964, Field1: nimCopy(null, colontmp__553649965, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + } + else { + if ((!(surroundedWhitespace_1241514598(parser_553648244, 0)) && nextMatch_1241514614(parser_553648244, 42, 0))) { + var reasonHEX60gensym78_553649221 = parseAux_553648273(15, [42], parser_553648244, ConstSet59); + if ((ConstSet60[reasonHEX60gensym78_553649221] != undefined)) { + var colontmp__553649966 = reasonHEX60gensym78_553649221; + var colontmp__553649967 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649966, Field1: nimCopy(null, colontmp__553649967, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + } + else { + if ((onlyPrevWhitespace_1241514602(parser_553648244, 0) && nextMatch_1241514614(parser_553648244, 95, 0))) { + var reasonHEX60gensym79_553649227 = parseAux_553648273(15, [95], parser_553648244, ConstSet61); + if ((ConstSet62[reasonHEX60gensym79_553649227] != undefined)) { + var colontmp__553649968 = reasonHEX60gensym79_553649227; + var colontmp__553649969 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649968, Field1: nimCopy(null, colontmp__553649969, NTI1040187475)}, NTI1040187474); + break BeforeRet; + } + + } + else { + if (nextMatch_1241514614(parser_553648244, 60, 0)) { + parser_553648244.pos -= 1; + var change_553649237 = false; + var pos_553649238 = 0; + var options_553649245 = nimCopy(null, parser_553648244.options, NTI1224736772); + if (!((options_553649245.inlineHtmlHandler == null))) { + var __553649249 = nimCopy(null, options_553649245.inlineHtmlHandler(parser_553648244.str, parser_553648244.pos), NTI1224736776); + change_553649237 = __553649249["Field0"]; + pos_553649238 = __553649249["Field1"]; + } + else { + var __553649250 = nimCopy(null, parseXml_1258291358(cstrToNimstr(parser_553648244.str), parser_553648244.pos), NTI1258291343); + change_553649237 = __553649250["Field0"]; + pos_553649238 = __553649250["Field1"]; + } + + if (change_553649237) { + var Temporary11 = lastStr_553648250; + if (ConstSet85[Temporary11.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary11.isText, NTI33554466)); } + if (null != (Temporary12 = HEX5BHEX5D_721420310(parser_553648244.str, HEX2EHEX2E_1157627952(parser_553648244.pos, (pos_553649238 - 1))), Temporary12)) { if (null == Temporary11.str) Temporary11.str = Temporary12; else Temporary11.str += Temporary12; }; + parser_553648244.pos = (pos_553649238 - 1); + } + else { + var Temporary13 = lastStr_553648250; + if (ConstSet86[Temporary13.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary13.isText, NTI33554466)); } + if (null != "<") { if (null == Temporary13.str) Temporary13.str = "<"; else Temporary13.str += "<"; }; + } + + } + else { + if (nextMatch_1241514614(parser_553648244, 62, 0)) { + parser_553648244.pos -= 1; + var Temporary14 = lastStr_553648250; + if (ConstSet87[Temporary14.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary14.isText, NTI33554466)); } + if (null != ">") { if (null == Temporary14.str) Temporary14.str = ">"; else Temporary14.str += ">"; }; + } + else { + if (nextMatch_1241514614(parser_553648244, 38, 0)) { + var Temporary15 = lastStr_553648250; + if (ConstSet88[Temporary15.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary15.isText, NTI33554466)); } + if (null != (Temporary16 = parseAmpStr_553649270(parser_553648244), Temporary16)) { if (null == Temporary15.str) Temporary15.str = Temporary16; else Temporary15.str += Temporary16; }; + } + else { + if (nextMatch_1241514614(parser_553648244, 92, 0)) { + parser_553648244.pos -= 1; + escaped_553648249 = true; + } + else { + var Temporary17 = lastStr_553648250; + if (ConstSet90[Temporary17.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary17.isText, NTI33554466)); } + add_721420296(Temporary17, "str", ch_553648264); + } + }}}}}}}}}}}}}}}}}}} + } + else { + var Temporary18 = lastStr_553648250; + if (ConstSet91[Temporary18.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary18.isText, NTI33554466)); } + add_721420296(Temporary18, "str", ch_553648264); + escaped_553648249 = false; + } + + }; + parser_553648244.pos += 1; + } + }; + }; + var colontmp__553649971 = 1; + var colontmp__553649972 = nimCopy(null, elems_553648255[0], NTI1040187475); + result_553648248 = nimCopy(result_553648248, {Field0: colontmp__553649971, Field1: nimCopy(null, colontmp__553649972, NTI1040187475)}, NTI1040187474); + }; + + return result_553648248; + +} + +function parseInline_553648236(parser_553648238, singleLine_553648240) { + var result_553648241 = []; + + var tmpTuple_553649323 = parseDelimed_553648242(parser_553648238, [], singleLine_553648240); + var finishReason_553649324 = tmpTuple_553649323["Field0"]; + var elems_553649325 = nimCopy(null, tmpTuple_553649323["Field1"], NTI1040187475); + result_553648241 = nimCopy(null, elems_553649325, NTI1040187475); + + return result_553648241; + +} + +function addLine_553649334(parser_553649337, context_553649339, result_553649340, result_553649340_Idx, lastEmptyLine_553649341) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + var Temporary5; + var Temporary6; + + if (!((context_553649339 == null))) { + var Temporary1 = context_553649339; + if (ConstSet92[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + switch (Temporary1.tag) { + case 10: + case 9: + add_771754880(context_553649339, newElem_771752046(11, parseInline_553648236(parser_553649337, true))); + break; + case 12: + var c_553649359 = parseInline_553648236(parser_553649337, true); + if (!!(lastEmptyLine_553649341)) Temporary3 = false; else { var Temporary4 = context_553649339; + if (ConstSet93[Temporary4.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary4.isText, NTI33554466)); } + Temporary3 = !(((Temporary4.content).length == 0)); } if (!Temporary3) Temporary2 = false; else { var last_553649363 = HEX5BHEX5D_771754820(context_553649339, 1); + if (!!(last_553649363.isText)) Temporary5 = false; else { var Temporary6 = last_553649363; + if (ConstSet94[Temporary6.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary6.isText, NTI33554466)); } + Temporary5 = (Temporary6.tag == 1); } Temporary2 = Temporary5; } if (Temporary2) { + addNewline_553648226(parser_553649337, last_553649363); + add_771754887(last_553649363, c_553649359); + } + else { + add_771754880(context_553649339, newElem_771752046(1, c_553649359)); + } + + break; + default: + break; + } + } + else { + result_553649340[result_553649340_Idx].push(newElem_771752046(1, parseInline_553648236(parser_553649337, false)));; + } + + + +} + +function style_771754813(elem_771754814, style_771754815) { + attr_771752554(elem_771754814, "style", style_771754815); + + +} + +function parseId_1040187583(parser_1040187584, startChar_1040187585) { + var Temporary1; + + var result_1040187586 = [null]; + + switch (startChar_1040187585) { + case 40: + Temporary1 = 41; + break; + case 91: + Temporary1 = 93; + break; + case 123: + Temporary1 = 125; + break; + default: + Temporary1 = 0; + break; + } + var idDelim_1040187587 = Temporary1; + result_1040187586[0] = ""; + Label2: { + Label3: while (true) { + var ch_1040187588 = parser_1040187584.str.charCodeAt((parser_1040187584.pos + 0)); + if (!nextMatch_1241514623(parser_1040187584, ConstSet99, 0)) break Label3; + add_721420296(result_1040187586, 0, ch_1040187588); + } + }; + var _ = nextMatch_1241514614(parser_1040187584, idDelim_1040187587, 0); + + return result_1040187586[0]; + +} + +function getOrDefault_553649665(t_553649668, key_553649669, default_553649670) { + var Temporary1; + + var result_553649671 = []; + + var hcHEX60gensym113_553649674 = [0]; + var indexHEX60gensym113_553649681 = rawGet_553648671(t_553649668, key_553649669, hcHEX60gensym113_553649674, 0); + if ((0 <= indexHEX60gensym113_553649681)) { + Temporary1 = t_553649668.data[indexHEX60gensym113_553649681].Field2; + } + else { + Temporary1 = default_553649670; + } + + result_553649671 = nimCopy(null, Temporary1, NTI1224736783); + + return result_553649671; + +} + +function addLine_553649760(parser_553649763, context_553649765, result_553649766, result_553649766_Idx, lastEmptyLine_553649767) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + var Temporary5; + var Temporary6; + + if (!((context_553649765 == null))) { + var Temporary1 = context_553649765; + if (ConstSet101[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + switch (Temporary1.tag) { + case 10: + case 9: + add_771754887(context_553649765, parseInline_553648236(parser_553649763, true)); + break; + case 12: + var c_553649785 = parseInline_553648236(parser_553649763, true); + if (!!(lastEmptyLine_553649767)) Temporary3 = false; else { var Temporary4 = context_553649765; + if (ConstSet102[Temporary4.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary4.isText, NTI33554466)); } + Temporary3 = !(((Temporary4.content).length == 0)); } if (!Temporary3) Temporary2 = false; else { var last_553649789 = HEX5BHEX5D_771754820(context_553649765, 1); + if (!!(last_553649789.isText)) Temporary5 = false; else { var Temporary6 = last_553649789; + if (ConstSet103[Temporary6.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary6.isText, NTI33554466)); } + Temporary5 = (Temporary6.tag == 1); } Temporary2 = Temporary5; } if (Temporary2) { + addNewline_553648226(parser_553649763, last_553649789); + add_771754887(last_553649789, c_553649785); + } + else { + add_771754887(context_553649765, c_553649785); + } + + break; + default: + break; + } + } + else { + add_771754890(result_553649766, result_553649766_Idx, parseInline_553648236(parser_553649763, false)); + } + + + +} + +function parseTopLevel_553648148(parser_553648150) { + var Temporary8; + var Temporary17; + var Temporary18; + var Temporary19; + var Temporary20; + var Temporary21; + var Temporary22; + var Temporary23; + var Temporary24; + var Temporary25; + var Temporary26; + var Temporary29; + var Temporary30; + var Temporary33; + var Temporary36; + var Temporary37; + + var result_553648152 = [[]]; + + var lastEmptyLine_553648153 = false; + Label1: { + var firstCh_553648154 = 0; + Label2: { + Label3: while (true) { + if (!(parser_553648150.pos < ((parser_553648150.str) == null ? 0 : (parser_553648150.str).length))) break Label3; + firstCh_553648154 = parser_553648150.str.charCodeAt((parser_553648150.pos + 0)); + Label4: { + var context_553648155 = null; + Label5: { + var i_553648156 = 0; + Label6: { + Label7: while (true) { + if (!(i_553648156 < (parser_553648150.contextStack).length)) break Label7; + var c_553648160 = parser_553648150.contextStack[i_553648156]; + var Temporary8 = c_553648160; + if (ConstSet2[Temporary8.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary8.isText, NTI33554466)); } + switch (Temporary8.tag) { + case 9: + if (nextMatch_1241514623(parser_553648150, ConstSet3, 0)) { + Label9: { + Label10: while (true) { + if (!nextMatch_1241514623(parser_553648150, InlineWhitespace_1040187582, 0)) break Label10; + } + }; + } + else { + break Label6; + } + + break; + case 10: + var originalPos_553648161 = parser_553648150.pos; + Label11: { + Label12: while (true) { + if (!nextMatch_1241514623(parser_553648150, Digits_1056964626, 0)) break Label12; + } + }; + if (nextMatch_1241514614(parser_553648150, 46, 0)) { + Label13: { + Label14: while (true) { + if (!nextMatch_1241514623(parser_553648150, InlineWhitespace_1040187582, 0)) break Label14; + } + }; + } + else { + parser_553648150.pos = originalPos_553648161; + break Label6; + } + + break; + case 12: + if (nextMatch_1241514614(parser_553648150, 62, 0)) { + Label15: { + Label16: while (true) { + if (!nextMatch_1241514623(parser_553648150, InlineWhitespace_1040187582, 0)) break Label16; + } + }; + } + else { + break Label6; + } + + break; + default: + break; + } + context_553648155 = c_553648160; + i_553648156 += 1; + } + }; + if (parser_553648150.contextStack.length < i_553648156) { for (var i = parser_553648150.contextStack.length ; i < i_553648156 ; ++i) parser_553648150.contextStack.push(null); } + else { parser_553648150.contextStack.length = i_553648156; }; + }; + switch (parser_553648150.str.charCodeAt((parser_553648150.pos + 0))) { + case 13: + case 10: + var _ = (nextMatch_1241514652(parser_553648150, [13,10], 0) || nextMatch_1241514652(parser_553648150, [10], 0)); + parser_553648150.pos -= 1; + lastEmptyLine_553648153 = true; + break Label4; + break; + case 9: + case 11: + case 12: + case 32: + if (!!((context_553648155 == null))) Temporary18 = false; else { var Temporary19 = context_553648155; + if (ConstSet6[Temporary19.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary19.isText, NTI33554466)); } + Temporary18 = !(((Temporary19.content).length == 0)); } if (Temporary18) { + Temporary17 = HEX5BHEX5D_771754820(context_553648155, 1); + } + else { + if (!(((result_553648152[0]).length == 0))) { + Temporary17 = (Temporary20 = HEX5BHEX5D_771754824(result_553648152[0], 1), Temporary20)[0][Temporary20[1]]; + } + else { + Temporary17 = null; + } + } + var last_553648213 = Temporary17; + if (!(!((last_553648213 == null)) && !(last_553648213.isText))) Temporary22 = false; else { var Temporary23 = last_553648213; + if (ConstSet9[Temporary23.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary23.isText, NTI33554466)); } + Temporary22 = (SpecialLineTags_1040187575[Temporary23.tag] != undefined); } if (!Temporary22) Temporary21 = false; else { var last2_553648222 = HEX5BHEX5D_771754820(last_553648213, 1); + var Temporary24 = last2_553648222; + if (ConstSet10[Temporary24.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary24.isText, NTI33554466)); } + Temporary21 = !(((Temporary24.content).length == 0)); } if (Temporary21) { + addNewline_553648226(parser_553648150, last2_553648222); + add_771754887(last2_553648222, parseInline_553648236(parser_553648150, false)); + } + else { + addLine_553649334(parser_553648150, context_553648155, result_553648152, 0, lastEmptyLine_553648153); + } + + break; + case 35: + if ((context_553648155 == null)) Temporary25 = true; else { var Temporary26 = context_553648155; + if (ConstSet96[Temporary26.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary26.isText, NTI33554466)); } + Temporary25 = (ConstSet95[Temporary26.tag] != undefined); } if (Temporary25) { + Label27: { + Label28: while (true) { + if (!!((context_553648155 == null))) Temporary29 = false; else { var Temporary30 = context_553648155; + if (ConstSet97[Temporary30.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary30.isText, NTI33554466)); } + Temporary29 = (Temporary30.tag == 1); } if (!Temporary29) break Label28; + var last_553649400 = ((parser_553648150.contextStack).length - 1); + context_553648155 = parser_553648150.contextStack[last_553649400]; + if (parser_553648150.contextStack.length < last_553649400) { for (var i = parser_553648150.contextStack.length ; i < last_553649400 ; ++i) parser_553648150.contextStack.push(null); } + else { parser_553648150.contextStack.length = last_553649400; }; + if ((last_553649400 == 0)) { + break Label27; + } + + } + }; + var level_553649405 = 1; + Label31: { + Label32: while (true) { + if (!((level_553649405 < 6) && peekMatch_1241514508(parser_553648150, 35, level_553649405))) break Label32; + level_553649405 += 1; + } + }; + parser_553648150.pos += level_553649405; + var header_553649415 = newElem_771752046((2 + level_553649405), []); + if (nextMatch_1241514614(parser_553648150, 124, 0)) { + style_771754813(header_553649415, "text-align:center"); + } + else { + if (nextMatch_1241514614(parser_553648150, 60, 0)) { + style_771754813(header_553649415, "text-align:left"); + } + else { + if (nextMatch_1241514614(parser_553648150, 62, 0)) { + style_771754813(header_553649415, "text-align:right"); + } + }} + var ch_553649416 = parser_553648150.str.charCodeAt((parser_553648150.pos + 0)); + if (nextMatch_1241514623(parser_553648150, IdStarts_1040187576, 0)) { + attr_771752554(header_553649415, "id", parseId_1040187583(parser_553648150, ch_553649416)); + } + + add_771754887(header_553649415, parseInline_553648236(parser_553648150, true)); + var elHEX60gensym96_553649423 = header_553649415; + if (!((context_553648155 == null))) { + add_771754880(context_553648155, elHEX60gensym96_553649423); + } + else { + result_553648152[0].push(elHEX60gensym96_553649423);; + } + + } + else { + addLine_553649334(parser_553648150, context_553648155, result_553648152, 0, lastEmptyLine_553648153); + } + + break; + case 42: + case 45: + case 43: + if (nextMatch_1241514623(parser_553648150, InlineWhitespace_1040187582, 1)) { + var elHEX60gensym98_553649442 = newElem_771752046(9, []); + var elHEX60gensym99_553649444 = elHEX60gensym98_553649442; + if (!((context_553648155 == null))) { + add_771754880(context_553648155, elHEX60gensym99_553649444); + } + else { + result_553648152[0].push(elHEX60gensym99_553649444);; + } + + parser_553648150.contextStack.push(elHEX60gensym98_553649442);; + context_553648155 = elHEX60gensym98_553649442; + addLine_553649334(parser_553648150, context_553648155, result_553648152, 0, lastEmptyLine_553648153); + } + else { + if (nextMatch_1241514623(parser_553648150, IdStarts_1040187576, 1)) { + var list_553649466 = newElem_771752046(9, []); + var item_553649467 = newElem_771752046(11, []); + attr_771752554(item_553649467, "id", parseId_1040187583(parser_553648150, parser_553648150.str.charCodeAt((parser_553648150.pos + (-1))))); + var Temporary33 = item_553649467; + if (ConstSet100[Temporary33.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary33.isText, NTI33554466)); } + Temporary33.content = nimCopy(null, parseInline_553648236(parser_553648150, true), NTI1040187726); + add_771754880(list_553649466, item_553649467); + var elHEX60gensym102_553649474 = list_553649466; + var elHEX60gensym103_553649476 = elHEX60gensym102_553649474; + if (!((context_553648155 == null))) { + add_771754880(context_553648155, elHEX60gensym103_553649476); + } + else { + result_553648152[0].push(elHEX60gensym103_553649476);; + } + + parser_553648150.contextStack.push(elHEX60gensym102_553649474);; + context_553648155 = elHEX60gensym102_553649474; + } + else { + addLine_553649334(parser_553648150, context_553648155, result_553648152, 0, lastEmptyLine_553648153); + } + } + break; + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + var originalPos_553649498 = parser_553648150.pos; + parser_553648150.pos += 1; + Label34: { + Label35: while (true) { + if (!nextMatch_1241514623(parser_553648150, Digits_1056964626, 0)) break Label35; + } + }; + if (nextMatch_1241514614(parser_553648150, 46, 0)) { + var list_553649504 = newElem_771752046(10, []); + var item_553649505 = newElem_771752046(11, []); + var ch_553649506 = parser_553648150.str.charCodeAt((parser_553648150.pos + 0)); + if (nextMatch_1241514623(parser_553648150, IdStarts_1040187576, 0)) { + attr_771752554(item_553649505, "id", parseId_1040187583(parser_553648150, ch_553649506)); + } + + add_771754887(item_553649505, parseInline_553648236(parser_553648150, true)); + add_771754880(list_553649504, item_553649505); + var elHEX60gensym106_553649513 = list_553649504; + var elHEX60gensym107_553649515 = elHEX60gensym106_553649513; + if (!((context_553648155 == null))) { + add_771754880(context_553648155, elHEX60gensym107_553649515); + } + else { + result_553648152[0].push(elHEX60gensym107_553649515);; + } + + parser_553648150.contextStack.push(elHEX60gensym106_553649513);; + context_553648155 = elHEX60gensym106_553649513; + } + else { + parser_553648150.pos = originalPos_553649498; + addLine_553649334(parser_553648150, context_553648155, result_553648152, 0, lastEmptyLine_553648153); + } + + break; + case 62: + var quote_553649537 = newElem_771752046(12, []); + parser_553648150.pos += 1; + var ch_553649543 = parser_553648150.str.charCodeAt((parser_553648150.pos + 0)); + if (nextMatch_1241514623(parser_553648150, IdStarts_1040187576, 0)) { + attr_771752554(quote_553649537, "id", parseId_1040187583(parser_553648150, ch_553649543)); + } + + var elHEX60gensym110_553649545 = quote_553649537; + var elHEX60gensym111_553649547 = elHEX60gensym110_553649545; + if (!((context_553648155 == null))) { + add_771754880(context_553648155, elHEX60gensym111_553649547); + } + else { + result_553648152[0].push(elHEX60gensym111_553649547);; + } + + parser_553648150.contextStack.push(elHEX60gensym110_553649545);; + context_553648155 = elHEX60gensym110_553649545; + addLine_553649334(parser_553648150, context_553648155, result_553648152, 0, lastEmptyLine_553648153); + break; + case 91: + var initialPos_553649569 = parser_553648150.pos; + parser_553648150.pos += 1; + var refNameFailed_553649575 = [false]; + var refName_553649581 = parseReferenceName_553648581(parser_553648150, refNameFailed_553649575, 0); + if (!!(refNameFailed_553649575[0])) Temporary37 = false; else { parser_553648150.pos += 1; + Temporary37 = nextMatch_1241514614(parser_553648150, 58, 0); } if (!Temporary37) Temporary36 = false; else { var tmpTuple_553649592 = parseLink_553648417(parser_553648150, true); + var correct_553649593 = tmpTuple_553649592["Field0"]; + var link_553649594 = nimCopy(null, tmpTuple_553649592["Field1"], NTI1224736771); + Temporary36 = correct_553649593; } if (Temporary36) { + Label38: { + var el_553649685 = null; + var colontmp__553649916 = []; + colontmp__553649916 = getOrDefault_553649665(parser_553648150.linkReferrers, refName_553649581, []); + var i_553649917 = 0; + var L_553649918 = (colontmp__553649916).length; + Label39: { + Label40: while (true) { + if (!(i_553649917 < L_553649918)) break Label40; + el_553649685 = colontmp__553649916[i_553649917]; + if (!((((link_553649594.tip) == null ? 0 : (link_553649594.tip).length) == 0))) { + attrEscaped_771754108(el_553649685, "title", link_553649594.tip); + } + + setLink_553648563(parser_553648150, el_553649685, link_553649594); + i_553649917 += 1; + } + }; + }; + } + else { + parser_553648150.pos = initialPos_553649569; + addLine_553649334(parser_553648150, context_553648155, result_553648152, 0, lastEmptyLine_553648153); + } + + break; + case 124: + if ((parser_553648150.options.disableTextAlignExtension || !((context_553648155 == null)))) { + addLine_553649334(parser_553648150, context_553648155, result_553648152, 0, lastEmptyLine_553648153); + } + else { + parser_553648150.pos += 1; + var align_553649720 = []; + if (nextMatch_1241514614(parser_553648150, 60, 0)) { + align_553649720 = nimCopy(null, [116,101,120,116,45,97,108,105,103,110,58,108,101,102,116], NTI33554449); + } + else { + if (nextMatch_1241514614(parser_553648150, 62, 0)) { + align_553649720 = nimCopy(null, [116,101,120,116,45,97,108,105,103,110,58,114,105,103,104,116], NTI33554449); + } + else { + align_553649720 = nimCopy(null, [116,101,120,116,45,97,108,105,103,110,58,99,101,110,116,101,114], NTI33554449); + } + } + var el_553649726 = newElem_771752046(1, parseInline_553648236(parser_553648150, false)); + style_771754813(el_553649726, toJSStr(align_553649720)); + result_553648152[0].push(el_553649726);; + } + + break; + default: + if (nextMatch_1241514652(parser_553648150, [96,96,96], 0)) { + var elHEX60gensym117_553649737 = parseCodeBlock_553649072(parser_553648150, 96); + if (!((context_553648155 == null))) { + add_771754880(context_553648155, elHEX60gensym117_553649737); + } + else { + result_553648152[0].push(elHEX60gensym117_553649737);; + } + + } + else { + if (nextMatch_1241514652(parser_553648150, [126,126,126], 0)) { + var elHEX60gensym118_553649751 = parseCodeBlock_553649072(parser_553648150, 126); + if (!((context_553648155 == null))) { + add_771754880(context_553648155, elHEX60gensym118_553649751); + } + else { + result_553648152[0].push(elHEX60gensym118_553649751);; + } + + } + else { + if (peekMatch_1241514548(parser_553648150, [123,33], 0)) { + addLine_553649760(parser_553648150, context_553648155, result_553648152, 0, lastEmptyLine_553648153); + } + else { + addLine_553649334(parser_553648150, context_553648155, result_553648152, 0, lastEmptyLine_553648153); + } + }} + break; + } + lastEmptyLine_553648153 = false; + }; + parser_553648150.pos += 1; + } + }; + }; + + return result_553648152[0]; + +} + +function parseMargrave_553648143(parser_553648145) { + var result_553648147 = []; + + result_553648147 = nimCopy(null, parseTopLevel_553648148(parser_553648145), NTI1040187747); + + return result_553648147; + +} + +function parseMargrave_553648136(text_553648138, options_553648139) { + var result_553648141 = []; + + var parser_553648142 = [initMargraveParser_1224736806(text_553648138)]; + parser_553648142[0].options = nimCopy(parser_553648142[0].options, options_553648139, NTI1224736772); + result_553648141 = nimCopy(null, parseMargrave_553648143(parser_553648142[0]), NTI704643083); + + return result_553648141; + +} + +function isEmpty_771751990(tag_771751991) { + var Temporary1; + + var result_771751992 = false; + + switch (tag_771751991) { + case 0: + case 2: + case 21: + case 22: + case 27: + case 28: + Temporary1 = true; + break; + default: + Temporary1 = false; + break; + } + result_771751992 = Temporary1; + + return result_771751992; + +} + +function hasKey_771754158(t_771754161, key_771754162) { + var result_771754163 = false; + + var hc_771754164 = [0]; + result_771754163 = (0 <= rawGet_771752666(t_771754161, key_771754162, hc_771754164, 0)); + + return result_771754163; + +} + +function hasAttr_771754114(elem_771754115, key_771754116) { + var Temporary1; + + var result_771754117 = false; + + var Temporary1 = elem_771754115; + if (ConstSet107[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'attrs\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + result_771754117 = hasKey_771754158(Temporary1.attrs, key_771754116); + + return result_771754117; + +} + +function rawGet_771752192(t_771752195, key_771752196, hc_771752197, hc_771752197_Idx) { + var result_771752198 = 0; + + BeforeRet: { + hc_771752197[hc_771752197_Idx] = hash_805306866(key_771752196); + if ((hc_771752197[hc_771752197_Idx] == 0)) { + hc_771752197[hc_771752197_Idx] = 314159265; + } + + if (((t_771752195.data).length == 0)) { + result_771752198 = (-1); + break BeforeRet; + } + + var h_771752250 = (hc_771752197[hc_771752197_Idx] & (t_771752195.data).length - 1); + Label1: { + Label2: while (true) { + if (!isFilled_788529183(t_771752195.data[h_771752250].Field0)) break Label2; + if (((t_771752195.data[h_771752250].Field0 == hc_771752197[hc_771752197_Idx]) && (t_771752195.data[h_771752250].Field2 == key_771752196))) { + result_771752198 = h_771752250; + break BeforeRet; + } + + h_771752250 = nextTry_788529186(h_771752250, (t_771752195.data).length - 1); + } + }; + result_771752198 = ((-1) - h_771752250); + }; + + return result_771752198; + +} + +function raiseKeyError_771752498(key_771752500) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32] || []).concat(cstrToNimstr(key_771752500) || []), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + + +} + +function HEX5BHEX5D_771752185(t_771752188, key_771752189) { + var result_771752190 = null; + var result_771752190_Idx = 0; + + var hcHEX60gensym89_771752191 = [0]; + var indexHEX60gensym89_771752444 = rawGet_771752192(t_771752188, key_771752189, hcHEX60gensym89_771752191, 0); + if ((0 <= indexHEX60gensym89_771752444)) { + result_771752190 = t_771752188.data[indexHEX60gensym89_771752444]; result_771752190_Idx = "Field3"; + } + else { + raiseKeyError_771752498(key_771752189); + } + + + return [result_771752190, result_771752190_Idx]; + +} + +function attr_771752128(elem_771752129, key_771752130) { + var Temporary1; + var Temporary2; + + var result_771752131 = null; + + var Temporary1 = elem_771752129; + if (ConstSet108[Temporary1.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'attrs\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + result_771752131 = (Temporary2 = HEX5BHEX5D_771752185(Temporary1.attrs, key_771752130), Temporary2)[0][Temporary2[1]]; + + return result_771752131; + +} + +function toCstring_771754926(x_771754928) { + var result_771754929 = null; + + switch (x_771754928) { + case 0: + result_771754929 = "noTag"; + break; + case 1: + result_771754929 = "p"; + break; + case 2: + result_771754929 = "br"; + break; + case 3: + result_771754929 = "h1"; + break; + case 4: + result_771754929 = "h2"; + break; + case 5: + result_771754929 = "h3"; + break; + case 6: + result_771754929 = "h4"; + break; + case 7: + result_771754929 = "h5"; + break; + case 8: + result_771754929 = "h6"; + break; + case 9: + result_771754929 = "ul"; + break; + case 10: + result_771754929 = "ol"; + break; + case 11: + result_771754929 = "li"; + break; + case 12: + result_771754929 = "blockquote"; + break; + case 13: + result_771754929 = "sup"; + break; + case 14: + result_771754929 = "sub"; + break; + case 15: + result_771754929 = "em"; + break; + case 16: + result_771754929 = "strong"; + break; + case 17: + result_771754929 = "pre"; + break; + case 18: + result_771754929 = "code"; + break; + case 19: + result_771754929 = "u"; + break; + case 20: + result_771754929 = "s"; + break; + case 21: + result_771754929 = "img"; + break; + case 22: + result_771754929 = "input"; + break; + case 23: + result_771754929 = "a"; + break; + case 24: + result_771754929 = "picture"; + break; + case 25: + result_771754929 = "video"; + break; + case 26: + result_771754929 = "audio"; + break; + case 27: + result_771754929 = "source"; + break; + case 28: + result_771754929 = "otherTag"; + break; + } + + return result_771754929; + +} + +function add_771754959(x_771754961, x_771754961_Idx) { + if (null != "<") { if (null == x_771754961[x_771754961_Idx]) x_771754961[x_771754961_Idx] = "<"; else x_771754961[x_771754961_Idx] += "<"; }; + + +} + +function len_771755011(t_771755014) { + var result_771755015 = 0; + + result_771755015 = t_771755014.counter; + + return result_771755015; + +} + +function add_771755301(x_771755303, x_771755303_Idx) { + if (null != " ") { if (null == x_771755303[x_771755303_Idx]) x_771755303[x_771755303_Idx] = " "; else x_771755303[x_771755303_Idx] += " "; }; + + +} + +function add_771755305(x_771755307, x_771755307_Idx) { + if (null != "/") { if (null == x_771755307[x_771755307_Idx]) x_771755307[x_771755307_Idx] = "/"; else x_771755307[x_771755307_Idx] += "/"; }; + + +} + +function add_771755309(x_771755311, x_771755311_Idx) { + if (null != ">") { if (null == x_771755311[x_771755311_Idx]) x_771755311[x_771755311_Idx] = ">"; else x_771755311[x_771755311_Idx] += ">"; }; + + +} + +function toNativeString_771754921(elem_771754922) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + var Temporary6; + var Temporary10; + var Temporary13; + + var result_771754923 = [null]; + + if (elem_771754922.isText) { + var Temporary1 = elem_771754922; + if (ConstSet104[Temporary1.isText]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary1.isText, NTI33554466)); } + result_771754923[0] = Temporary1.str; + } + else { + var Temporary2 = elem_771754922; + if (ConstSet105[Temporary2.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary2.isText, NTI33554466)); } + var empty_771754924 = isEmpty_771751990(Temporary2.tag); + var tag_771754925 = null; + var Temporary3 = elem_771754922; + if (ConstSet106[Temporary3.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary3.isText, NTI33554466)); } + switch (Temporary3.tag) { + case 0: + break; + case 28: + if (hasAttr_771754114(elem_771754922, "tag")) { + tag_771754925 = attr_771752128(elem_771754922, "tag"); + empty_771754924 = hasAttr_771754114(elem_771754922, "emptyTag"); + } + + break; + default: + var Temporary4 = elem_771754922; + if (ConstSet109[Temporary4.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'tag\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary4.isText, NTI33554466)); } + tag_771754925 = toCstring_771754926(Temporary4.tag); + break; + } + if (!((((tag_771754925) == null ? 0 : (tag_771754925).length) == 0))) { + add_771754959(result_771754923, 0); + if (null != tag_771754925) { if (null == result_771754923[0]) result_771754923[0] = tag_771754925; else result_771754923[0] += tag_771754925; }; + Label5: { + var attrName_771755299 = null; + var attrValue_771755300 = null; + var colontmp__553650091 = ({data: [], counter: 0, first: 0, last: 0}); + var Temporary6 = elem_771754922; + if (ConstSet110[Temporary6.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'attrs\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary6.isText, NTI33554466)); } + colontmp__553650091 = nimCopy(colontmp__553650091, Temporary6.attrs, NTI771751950); + var L_553650093 = len_771755011(colontmp__553650091); + if ((0 < colontmp__553650091.counter)) { + var h_553650094 = colontmp__553650091.first; + Label7: { + Label8: while (true) { + if (!(0 <= h_553650094)) break Label8; + var nxt_553650096 = colontmp__553650091.data[h_553650094].Field1; + if (isFilled_788529183(colontmp__553650091.data[h_553650094].Field0)) { + attrName_771755299 = colontmp__553650091.data[h_553650094].Field2; + attrValue_771755300 = colontmp__553650091.data[h_553650094].Field3; + add_771755301(result_771754923, 0); + if (null != attrName_771755299) { if (null == result_771754923[0]) result_771754923[0] = attrName_771755299; else result_771754923[0] += attrName_771755299; }; + if (!((((attrValue_771755300) == null ? 0 : (attrValue_771755300).length) == 0))) { + if (null != "=\"") { if (null == result_771754923[0]) result_771754923[0] = "=\""; else result_771754923[0] += "=\""; }; + if (null != attrValue_771755300) { if (null == result_771754923[0]) result_771754923[0] = attrValue_771755300; else result_771754923[0] += attrValue_771755300; }; + if (null != "\"") { if (null == result_771754923[0]) result_771754923[0] = "\""; else result_771754923[0] += "\""; }; + } + + } + + h_553650094 = nxt_553650096; + } + }; + } + + }; + if (empty_771754924) { + add_771755305(result_771754923, 0); + } + + add_771755309(result_771754923, 0); + } + + Label9: { + var cont_771755332 = null; + var colontmp__553650098 = []; + var Temporary10 = elem_771754922; + if (ConstSet111[Temporary10.isText]!==undefined) { raiseFieldError2(makeNimstrLit("field \'content\' is not accessible for type \'MargraveElement\' using \'isText = "), reprDiscriminant(Temporary10.isText, NTI33554466)); } + colontmp__553650098 = Temporary10.content; + var i_553650099 = 0; + var L_553650100 = (colontmp__553650098).length; + Label11: { + Label12: while (true) { + if (!(i_553650099 < L_553650100)) break Label12; + cont_771755332 = colontmp__553650098[i_553650099]; + if (null != (Temporary13 = toNativeString_771754921(cont_771755332), Temporary13)) { if (null == result_771754923[0]) result_771754923[0] = Temporary13; else result_771754923[0] += Temporary13; }; + i_553650099 += 1; + } + }; + }; + if (!(empty_771754924)) { + if (null != " + + + + + + + Margrave Reference + + + + +

this page is a bit broken right now

+
+
+
+To escape use \\
+
+# Heading1
+## Heading2
+### Heading3
+#### Heading4
+##### Heading5
+###### Heading6
+
+####{heading-id} Heading (new, makes heading-id the id of this heading)
+
+* Bullet points
++ Plus
+- Minus
+
+1. Numbered list
+2. Can be
+4. Any number
+.  or just a dot (new),
+    can also indent
+
+> Blockquotes
+>
+> can _be_ **formatted**
+
+```
+Code blocks
+Have no formatting
+
+HTML & chars < automatically > escaped
+```
+
+Inline formatting:
+
+Link: [text](url)
+      [text **can have formatting**](url "tooltip text")
+Image: ![](url)
+        ![alt text (image doesnt load)](url "tooltip text")
+Superscript (new): 4^(3) = 64
+Subscript (new): a[n] = 2n + 1
+Bold: **text**
+Underline: __text__
+italic: *text* _text_
+Strikethrough: ~~text~~
+Inline code (has formatting!): `text`
+Checkboxes anywhere in the document, not just lists: [ ] [x]
+Raw text with curly braces (new): {aaaa **aa** <span>angle brackets not escaped for raw HTML</span>}
+Nested curly braces: {aa {bb} cc {dd {ee}} ff}
+Inline code without formatting, can escape HTML chars: `{1 \< 3 ? _ * 3 + 3 * _ + 2 ** 2 ** 2 : 4 \& 2}`
+
+Inline HTML (no formatting inside): <table>
+  <tbody>
+    <tr>
+      <td>a 1</td>
+      <td>a 2</td>
+    </tr>
+    <tr>
+      <td>b 1</td>
+      <td>b 2</td>
+    </tr>
+  </tbody>
+</table>
+
+
+
+

To escape use \

+

Heading1

+

Heading2

+

Heading3

+

Heading4

+
Heading5
+
Heading6
+

Heading (new, makes heading-id the id of this heading)

+ +
  1. Numbered list
  2. Can be
  3. Any number
  4. or just a dot (new), + can also indent
+

Blockquotes

+ +

can be formatted

+
Code blocks
+      Have no formatting
+
+      HTML & chars < automatically > escaped
+      
+

Inline formatting:

+

Link: text + text can have formatting + Image: + alt text (image doesnt load) + Superscript (new): 43 = 64 + Subscript (new): an = 2n + 1 + Bold: text + Underline: text + italic: text text + Strikethrough: text + Inline code (has formatting!): text + Checkboxes anywhere in the document, not just lists: + Raw text with curly braces (new): aaaa **aa** angle brackets not escaped for raw HTML + Nested curly braces: aa {bb} cc {dd {ee}} ff + Inline code without formatting, can escape HTML chars: 1 < 3 ? _ * 3 + 3 * _ + 2 ** 2 ** 2 : 4 & 2

+

Inline HTML (no formatting inside): + + + + + + + + + + +
a 1a 2
b 1b 2
+

+
+
+ + diff --git a/docs/common.html b/docs/common.html new file mode 100644 index 0000000..c10546e --- /dev/null +++ b/docs/common.html @@ -0,0 +1,278 @@ + + + + + + + +margrave/common + + + + + + + + + + + + +
+
+

margrave/common

+
+
+
+ + +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+
+ Source   +Edit   + +
+ +

+
+

Types

+
+
+
NativeString = string
+
+ + Most convenient string type to use for each backend. cstring on JS. + Source   +Edit   + +
+
+ +
+
+
+

Consts

+
+
+
margraveCurlyNoHtmlEscape {.booldefine.} = false
+
+ + The default compile time value of MargraveOptions.curlyNoHtmlEscape. + Source   +Edit   + +
+
+
+
margraveDelimedUseSubstrs {.booldefine.} = false
+
+ + Possible minor optimization. Not guaranteed to be faster. + Source   +Edit   + +
+
+
+
margraveNoDefaultHtmlHandler {.booldefine.} = false
+
+ + Define this to disable inline HTML at compile time completely, to circumvent the standard library XML parser dependency. This is overriden by MargraveParser.inlineHtmlHandler. + Source   +Edit   + +
+
+
+
margraveSingleLineStaticBool {.booldefine.} = false
+
+ + Possible minor optimization. Not guaranteed to be faster. + Source   +Edit   + +
+
+ +
+
+
+

Procs

+
+
+
+
func contains[I](arr: static array[I, string]; x: string): bool {.inline.}
+
+ + More efficient version of contains for static arrays of strings using case + Source   +Edit   + +
+
+ +
+
+
+
func toCstring[T: enum](x: T): cstring
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+
+

Templates

+
+
+
+
template moveCompat(x: untyped): untyped
+
+ + Compatibility replacement for move + Source   +Edit   + +
+
+ +
+
+
+
template toNativeString(x: char): NativeString
+
+ + + Source   +Edit   + +
+
+
+
template toNativeString(x: cstring): NativeString
+
+ + + Source   +Edit   + +
+
+
+
template toNativeString(x: string): NativeString
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+ +
+
+ + +
+
+ + + + + + diff --git a/docs/defs.html b/docs/defs.html new file mode 100644 index 0000000..eeed492 --- /dev/null +++ b/docs/defs.html @@ -0,0 +1,287 @@ + + + + + + + +margrave/parser/defs + + + + + + + + + + + + +
+
+

margrave/parser/defs

+
+
+
+ + +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+
+ Source   +Edit   + +
+ +

+
+

Imports

+
+ common, element +
+
+
+

Types

+
+ +
+
MargraveOptions {.byref.} = object
+  curlyNoHtmlEscape*: bool ## Define this to disable HTML escaping inside curly brackets
+                           ## (normally only formatting is disabled).
+                           ## 
+                           ## `true` value at compile time overrides runtime value.
+  insertLineBreaks*: bool    ## Inserts <br> on newlines.
+                             ## 
+                             ## `true` value at compile time overrides runtime value.
+  inlineHtmlHandler*: proc (str: NativeString; i: int): (bool, int) {.nimcall,
+      ...gcsafe.} ## Should parse a single HTML element starting at `i` in `str`,
+               ## returning `(true, pos)` if an HTML element has been correctly parsed
+               ## and `pos` is the immediate index after it or `(false, _)` if it has
+               ## not been correctly parsed.
+               ## 
+               ## Not nil value at compile time overrides runtime value.
+               ## 
+               ## See `singlexml.parseXml <singlexml.html#parseXml,string,int>`_.
+  codeBlockLanguageHandler*: proc (codeBlock: MargraveElement;
+                                   language: NativeString) {.nimcall, ...gcsafe.} ## Callback to use when a code block has a language attached.
+                                                                               ## `codeBlock` is modifiable.
+                                                                               ## 
+                                                                               ## If nil, any language name will be passed directly to the code block.
+                                                                               ## 
+                                                                               ## Not nil value at compile time overrides runtime value.
+  setLinkHandler*: proc (element: MargraveElement; link: Link) {.nimcall, ...gcsafe.} ## Handles when an element gets a link. `element` is modifiable.
+                                                                                   ## 
+                                                                                   ## Covers []() and ![]() syntax. If nil, `setLinkDefault` is called.
+                                                                                   ## 
+                                                                                   ## Not nil value at compile time overrides runtime value.
+  disableTextAlignExtension*: bool ## Disables non-standard text align extension for paragraphs.
+                                   ## 
+                                   ## `true` value at compile time overrides runtime value.
+  
+
+ + + Source   +Edit   + +
+
+
+
MargraveParser {.byref.} = object
+  options*: MargraveOptions  ## Runtime options for the parser.
+                             ## Overriden by compile time options.
+  str*: NativeString
+  pos*: int
+  contextStack*: seq[MargraveElement] ## Stack of current top level contexts,
+                                      ## like lists or blockquotes.
+  linkReferrers*: Table[NativeString, seq[MargraveElement]] ## Table of link references to elements that use the reference.
+                                                            ## During parsing, when a reference link is found, it will modify
+                                                            ## elements that use the reference and add them the link.
+                                                            ## After parsing is done, if there are elements left in this table,
+                                                            ## then some references were left unset.
+  
+
+ + A parser object. + Source   +Edit   + +
+
+ +
+
+
+

Consts

+
+
+
defaultParserOptions = (curlyNoHtmlEscape: false, insertLineBreaks: false,
+                        inlineHtmlHandler: nil, codeBlockLanguageHandler: nil,
+                        setLinkHandler: nil, disableTextAlignExtension: false)
+
+ + + Source   +Edit   + +
+
+ +
+
+
+

Procs

+
+
+
+
func initMargraveParser(text: sink NativeString): MargraveParser {.inline,
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+ +
+
+ + +
+
+ + + + + + diff --git a/docs/element.html b/docs/element.html new file mode 100644 index 0000000..678125e --- /dev/null +++ b/docs/element.html @@ -0,0 +1,540 @@ + + + + + + + +margrave/element + + + + + + + + + + + + +
+
+

margrave/element

+
+
+
+ + +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+
+ Source   +Edit   + +
+ +

+
+

Imports

+
+ common +
+
+
+

Types

+
+
+
KnownTags = enum
+  noTag, p, br, h1, h2, h3, h4, h5, h6, ul, ol, li, blockquote, sup, sub, em,
+  strong, pre, code, u, s, img, input, a, picture, video, audio, source,
+  otherTag
+
+ + Enum of tags used in this library. + Source   +Edit   + +
+
+
+
MargraveElement {.acyclic.} = ref object
+  case isText*: bool
+  of true:
+      str*: NativeString     ## Text of a text element.
+                             ## Can contain HTML, escaping chars must be done beforehand.
+    
+  else:
+      tag*: KnownTags ## The tag of an HTML element.
+                      ## 
+                      ## If equal to `otherTag`, the `tag` attribute is used.
+                      ## Such elements can also indicate having no ending tag
+                      ## with the `emptyTag` attribute.
+      attrs*: OrderedTable[NativeString, NativeString] ## Attributes of an HTML element.
+      content*: seq[MargraveElement] ## Inner HTML elements of an HTML element.
+    
+  
+
+ +

An individual node.

+

Can be text, or an HTML element.

+

HTML element contains tag, attributes, and sequence of nodes.

+ + Source   +Edit   + +
+
+ +
+
+
+

Consts

+
+
+
EmptyTags = {noTag, br, img, input, source, otherTag}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+

Procs

+
+
+
+
func `$`(elem: MargraveElement): string {....raises: [KeyError], tags: [],
+    forbids: [].}
+
+ + Outputs a margrave element as HTML. + Source   +Edit   + +
+
+ +
+
+
+
func `[]`(elem: MargraveElement; i: BackwardsIndex): MargraveElement {.
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func `[]`(elem: MargraveElement; i: int): MargraveElement {....raises: [],
+    tags: [], forbids: [].}
+
+ + Indexes elem.content. + Source   +Edit   + +
+
+ +
+
+
+
func `[]=`(elem: MargraveElement; i: BackwardsIndex; el: MargraveElement) {.
+    ...raises: [], tags: [], forbids: [].}
+
+ + Indexes elem.content. + Source   +Edit   + +
+
+
+
func `[]=`(elem: MargraveElement; i: int; el: MargraveElement) {....raises: [],
+    tags: [], forbids: [].}
+
+ + Indexes elem.content. + Source   +Edit   + +
+
+ +
+
+
+
func add(elem, cont: MargraveElement) {....raises: [], tags: [], forbids: [].}
+
+ + Adds to elem.content. + Source   +Edit   + +
+
+
+
func add(elem: MargraveElement; cont: seq[MargraveElement]) {....raises: [],
+    tags: [], forbids: [].}
+
+ + Appends nodes to elem.content. + Source   +Edit   + +
+
+
+
func add(elem: MargraveElement; str: NativeString) {....raises: [], tags: [],
+    forbids: [].}
+
+ + Adds a text node to elem.content. + Source   +Edit   + +
+
+ +
+
+
+
proc attr(elem: MargraveElement; key, val: NativeString) {....raises: [], tags: [],
+    forbids: [].}
+
+ + Adds attribute to element + Source   +Edit   + +
+
+
+
proc attr(elem: MargraveElement; key: NativeString): NativeString {.
+    ...raises: [KeyError], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
proc attrEscaped(elem: MargraveElement; key, val: NativeString) {....raises: [],
+    tags: [], forbids: [].}
+
+ + Adds attribute to element escaped + Source   +Edit   + +
+
+ +
+
+
+
proc delAttr(elem: MargraveElement; key: NativeString) {....raises: [], tags: [],
+    forbids: [].}
+
+ + Deletes attribute of element + Source   +Edit   + +
+
+ +
+
+
+
proc hasAttr(elem: MargraveElement; key: NativeString): bool {....raises: [],
+    tags: [], forbids: [].}
+
+ + Checks if element has attribute + Source   +Edit   + +
+
+ +
+
+
+
func newElem(tag: KnownTags; content: seq[MargraveElement] = @[]): MargraveElement {.
+    ...raises: [], tags: [], forbids: [].}
+
+ + Creates a new element node with tag tag and content nodes content. + Source   +Edit   + +
+
+ +
+
+
+
func newStr(s: NativeString): MargraveElement {....raises: [], tags: [],
+    forbids: [].}
+
+ + Creates a new text node with text s. + Source   +Edit   + +
+
+ +
+
+
+
func paragraphIfText(elem: MargraveElement): MargraveElement {....raises: [],
+    tags: [], forbids: [].}
+
+ + If elem is a text node, turns it into a <p> element. Otherwise returns elem. + Source   +Edit   + +
+
+ +
+
+
+
proc style(elem: MargraveElement; style: NativeString) {....raises: [], tags: [],
+    forbids: [].}
+
+ + Adds style to element + Source   +Edit   + +
+
+ +
+
+
+
func toCstring(elem: MargraveElement): cstring {....raises: [KeyError], tags: [],
+    forbids: [].}
+
+ + Outputs a margrave element as HTML as a cstring, mostly for JS. + Source   +Edit   + +
+
+ +
+
+
+
func toNativeString(elem: MargraveElement): NativeString {....raises: [KeyError],
+    tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+
+

Templates

+
+
+
+
template isEmpty(tag: KnownTags): bool
+
+ + Returns true if tag is an empty tag, i.e. it has no ending tag. + Source   +Edit   + +
+
+ +
+ +
+
+ +
+
+ + +
+
+ + + + + + diff --git a/docs/margrave.html b/docs/margrave.html new file mode 100644 index 0000000..d9abe16 --- /dev/null +++ b/docs/margrave.html @@ -0,0 +1,329 @@ + + + + + + + +margrave + + + + + + + + + + + + +
+
+

margrave

+
+ +
+ Source   +Edit   + +
+ +

Dialect of Markdown. +

Example

To escape use \\
+
+# Heading1
+## Heading2
+### Heading3
+#### Heading4
+##### Heading5
+###### Heading6
+
+####{heading-id} Heading (new, makes heading-id the id of this heading)
+
+* Bullet points
++ Plus
+- Minus
+
+1. Numbered list
+2. Can be
+4. Any number
+.  or just a dot (new),
+   can also indent
+
+> Blockquotes
+>
+> can _be_ **formatted**
+
+```
+Code blocks
+Have no formatting
+
+HTML & chars < automatically > escaped
+```
+
+Inline formatting:
+
+Link: [text](url)
+      [text **can have formatting**](url "tooltip text")
+Image: ![](url)
+       ![alt text (image doesnt load)](url "tooltip text")
+Superscript (new): 4^(3) = 64
+Subscript (new): a[n] = 2n + 1
+Bold: **text**
+Underline: __text__
+italic: *text* _text_
+Strikethrough: ~~text~~
+Inline code (has formatting!): `text`
+Checkboxes anywhere in the document, not just lists: [ ] [x]
+Unformatted text with curly braces (new): {aaa **aaa** __aaa__}
+Raw curly braces (HTML chars left unescaped): {! foo <span>bar</span>}
+Nested curly braces: {aa {bb} cc {dd {ee}} ff}
+Inline code without formatting: `{1 < 3 ? _ * 3 + 3 * _ + 2 ** 2 ** 2 : 4 & 2}`
+
+Inline HTML (no formatting inside, raw curly braces might be better): <table>
+  <tbody>
+    <tr>
+      <td>a 1</td>
+      <td>a 2</td>
+    </tr>
+    <tr>
+      <td>b 1</td>
+      <td>b 2</td>
+    </tr>
+  </tbody>
+</table>
+
+

turns into HTML:

+
<p>To escape use \</p>
+<h1> Heading1</h1>
+<h2> Heading2</h2>
+<h3> Heading3</h3>
+<h4> Heading4</h4>
+<h5> Heading5</h5>
+<h6> Heading6</h6>
+<h4 id="heading-id"> Heading (new, makes heading-id the id of this heading)</h4>
+<ul><li>Bullet points</li><li>Plus</li><li>Minus</li></ul>
+<ol><li> Numbered list</li><li>Can be</li><li>Any number</li><li>or just a dot (new),
+   can also indent</li></ol>
+<blockquote><p> Blockquotes</p><p>can <em>be</em> <strong>formatted</strong></p></blockquote>
+<pre>Code blocks
+Have no formatting
+
+HTML &amp; chars &lt; automatically &gt; escaped
+</pre>
+<p>Inline formatting:</p>
+<p>Link: <a href="url">text</a>
+      <a title="tooltip text" href="url">text <strong>can have formatting</strong></a>
+Image: <img src="url"/>
+       <img alt="alt text (image doesnt load)" title="tooltip text" src="url"/>
+Superscript (new): 4<sup>3</sup> = 64
+Subscript (new): a<sub>n</sub> = 2n + 1
+Bold: <strong>text</strong>
+Underline: <u>text</u>
+italic: <em>text</em> <em>text</em>
+Strikethrough: <s>text</s>
+Inline code (has formatting!): <code>text</code>
+Checkboxes anywhere in the document, not just lists: <input type="checkbox" disabled/> <input type="checkbox" disabled checked/>
+Unformatted text with curly braces (new): aaa **aaa** __aaa__
+Raw curly braces (HTML chars left unescaped):  foo <span>bar</span>
+Nested curly braces: aa {bb} cc {dd {ee}} ff
+Inline code without formatting: <code>1 &lt; 3 ? _ * 3 + 3 * _ + 2 ** 2 ** 2 : 4 &amp; 2</code></p>
+<p>Inline HTML (no formatting inside, raw curly braces might be better): <table>
+  <tbody>
+    <tr>
+      <td>a 1</td>
+      <td>a 2</td>
+    </tr>
+    <tr>
+      <td>b 1</td>
+      <td>b 2</td>
+    </tr>
+  </tbody>
+</table>
+</p>
+
+ +

Inline HTML note

Note: Nim's XML parser used for inline HTML uses StringStream from the streams module which does not work in JS for Nim version 1.2.x and earlier. To work around this, you can disable use of the XML parser, therefore disable inline HTML, by passing -d:margraveNoInlineHtml. This switch is available on all backends. You can still embed HTML inside curly braces.

+

+ +
+

Procs

+
+
+
+
proc parseMargrave(parser: ref MargraveParser;
+                   staticOptions: static MargraveOptions = defaultParserOptions): seq[
+    MargraveElement]
+
+ + Parses margrave with a reference to an already initialized parser. + Source   +Edit   + +
+
+
+
proc parseMargrave(parser: var MargraveParser;
+                   staticOptions: static MargraveOptions = defaultParserOptions): seq[
+    MargraveElement]
+
+ + Parses margrave with an already initialized parser. + Source   +Edit   + +
+
+
+
proc parseMargrave(text: sink (string | cstring);
+                   options: MargraveOptions = defaultParserOptions;
+                   staticOptions: static MargraveOptions = defaultParserOptions): seq[
+    MargraveElement]
+
+ + Alias of parseMargrave that takes any string as the argument. + Source   +Edit   + +
+
+
+
proc parseMargrave(text: sink NativeString;
+                   options: MargraveOptions = defaultParserOptions;
+                   staticOptions: static MargraveOptions = defaultParserOptions): seq[
+    MargraveElement]
+
+ + Parses a string of text in margrave and translates it to HTML line by line. Result is a sequence of MargraveElements, to simply generate HTML with no need for readability turn these all into strings with $ and join them with "". + Source   +Edit   + +
+
+
+
proc parseMargrave(text: sink openArray[char];
+                   options: MargraveOptions = defaultParserOptions;
+                   staticOptions: static MargraveOptions = defaultParserOptions): seq[
+    MargraveElement]
+
+ +

Alias of parseMargrave that takes openarraychar as the argument.

+

Currently copies.

+ + Source   +Edit   + +
+
+ +
+ +
+
+ + +
+
+ + +
+
+ + + + + + diff --git a/docs/nimdoc.out.css b/docs/nimdoc.out.css new file mode 100644 index 0000000..1417d9e --- /dev/null +++ b/docs/nimdoc.out.css @@ -0,0 +1,1026 @@ +/* +Stylesheet for use with Docutils/rst2html. + +See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to +customize this style sheet. + +Modified from Chad Skeeters' rst2html-style +https://bitbucket.org/cskeeters/rst2html-style/ + +Modified by Boyd Greenfield and narimiran +*/ + +:root { + --primary-background: #fff; + --secondary-background: ghostwhite; + --third-background: #e8e8e8; + --info-background: #50c050; + --warning-background: #c0a000; + --error-background: #e04040; + --border: #dde; + --text: #222; + --anchor: #07b; + --anchor-focus: #607c9f; + --input-focus: #1fa0eb; + --strong: #3c3c3c; + --hint: #9A9A9A; + --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN4AAAA9CAYAAADCt9ebAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMD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lrRfgmQWuYn0F91xJEQYxVuDnMcOrQAWJi2EI72ErQviwqLEQpQ+5XBEIqzi3YWLwF+BMiMcjshEqYR1Gdk1KmxBsaR9SQviSDdRFK8fxVU+YliWZmcbcq7vSFoQR/qJWvuxD0WgLDYoSzPzAqowtjVhORwDhEaKru4GPoliGgcyy4Hj0DLT4TBCo9WO88jQ8Bns97lLghvRTOfqqDiMYqrM+HyUYdBtaLykeRmlK12C9rQOh1FM1vd/HqUIzaT5e+LVoh/VxByHShs6HFaw0VjjHhTxP5d0LT+fRnu5q3HuAodlbHW02Q5cDByM+sw1642cRylCx6PeZiuTFScUFxK+f19QovaRS+t4tsasxhvABbZbSfUCV6CM7qtQl6Fm4E1U22UqcAYqvZ42fgJMxH6vdYc5nkBlSW6Pq4fbS6hb6jg0u9yGug7FyS5U1+UcVBbwbFSuMM1sQ1bXK4A9CcviqM0e9H80HdUxCpwIa4McygA/GfgAcCJqmGKKXUixupEv7nHsLc2agWNQ0d9OzC+PHNHIo1XeLCoe8kkqXiUtwKFoWXoEKqk3BpWLaC8cXsV8HT1J+tFTZKvn+DMqFZi1knvtyKg1O2lBHADcCVxEedNSAP4HJcsr0NNWHVUAAAAASUVORK5CYII="); + + --keyword: #5e8f60; + --identifier: #222; + --comment: #484a86; + --operator: #155da4; + --punctuation: black; + --other: black; + --escapeSequence: #c4891b; + --number: #252dbe; + --literal: #a4255b; + --program: #6060c0; + --option: #508000; + --raw-data: #a4255b; + + --clipboard-image-normal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: black' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E %3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2' /%3E %3C/svg%3E"); + --clipboard-image-selected: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: black' viewBox='0 0 20 20' fill='currentColor'%3E %3Cpath d='M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z' /%3E %3Cpath d='M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z' /%3E %3C/svg%3E"); + --clipboard-image: var(--clipboard-image-normal) +} + +[data-theme="dark"] { + --primary-background: #171921; + --secondary-background: #1e202a; + --third-background: #2b2e3b; + --info-background: #008000; + --warning-background: #807000; + --error-background: #c03000; + --border: #0e1014; + --text: #fff; + --anchor: #8be9fd; + --anchor-focus: #8be9fd; + --input-focus: #8be9fd; + --strong: #bd93f9; + --hint: #7A7C85; + --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAABMCAYAAABOBlMuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rv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bIrVkcEkONiIh4jcvlvu7s7OxLo9GmVe7QVCgUCujq6oKGhoaCioqKo9XV1WeM3YDMVPDik1gpyas+XrVyeaKXl8czjyANjbcgI/MNmkg49Q4ECPOH3NyC4RUr+M8IcHt7B1y9WlKRl3/5kElKnD1sfXEoJCzueEBAQGJYWFgGk8nk2djYAIFAgLm4pTw6Ogqjo6Mgl8vhxo0b50tLS4/U19fnLvS2FIWXfxEDQNLmLW9ueW1TxtchHDaQyWRTm4VgYkZHR6G+vhF+/NfP+y5e+vVjiVgwZpKVydOwF0dZW1lZOTGZTD6bzU4LCAiIptPp8HTDL1MwOjoKLS0tUFdXd1IsFudIpdKKgYGB7tloJTrX4MUnsVJTEj9etzY10dHRAQAAGm81wcsZW5CVyQInL69gNCGBjwcAGBx8ANnncypOnTr3H9nn/reD55wovvrQpyIHAHFUzIocGo3mQaPRfBwdHVlubm7bXF1dgcFgABqNNvruglwuh7t374JMJoOOjo7P79y5I+ru7m7q7e1tXQi7MzOh8PIv4pCw2DdaWtte37Au7aPIyCWAxWABjUbPif9HCMbjURtKiaQBfvr5zH9evlJ0uLQ4r/nJMXNiZTIRrMAlJAcHB18HBweWo6Mjy8rKajeJRAJLS0uwtLQECwsLoFAogMfjAYvFgpmZ2XNXMyqVCoaHh2FoaAiGh4cfvwYGBqCvrw+6u7vfvnfvXlNvb29rT09Pq0QsUM7S6c4rNqS/lrZ5U+YPRBKR9M7u9xwqBUUvtNAudH766XSLE8PR49ixE78/8tVnX403Zk7fUR46NUUAIPIPCMdTKJTdNjY2QKPRgE6nA51OB1tbWyCRSIDD4YBAIAAejwcCgfDYUajVakGlUoFarQadTvfY79HX1wf9/f0gl8tBLpfDvXv3HvXw+dxQPYYXMj+d+P7Mmzv+5OHr6/OJWq1GBHeB09TcUiKuq/coKS3/eqIx/wPkiIXC3w6YjAAAAABJRU5ErkJggg=="); + + --keyword: #ff79c6; + --identifier: #f8f8f2; + --comment: #6272a4; + --operator: #ff79c6; + --punctuation: #f8f8f2; + --other: #f8f8f2; + --escapeSequence: #bd93f9; + --number: #bd93f9; + --literal: #f1fa8c; + --program: #9090c0; + --option: #90b010; + --raw-data: #8be9fd; + + --clipboard-image-normal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E %3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2' /%3E %3C/svg%3E"); + --clipboard-image-selected: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' viewBox='0 0 20 20' fill='currentColor'%3E %3Cpath d='M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z' /%3E %3Cpath d='M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z' /%3E %3C/svg%3E"); + --clipboard-image: var(--clipboard-image-normal); +} + +@media (prefers-color-scheme: dark) { + [data-theme="auto"] { + --primary-background: #171921; + --secondary-background: #1e202a; + --third-background: #2b2e3b; + --info-background: #008000; + --warning-background: #807000; + --error-background: #c03000; + --border: #0e1014; + --text: #fff; + --anchor: #8be9fd; + --anchor-focus: #8be9fd; + --input-focus: #8be9fd; + --strong: #bd93f9; + --hint: #7A7C85; + --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAABMCAYAAABOBlMuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpucz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mZ2XNXMyqVCoaHh2FoaAiGh4cfvwYGBqCvrw+6u7vfvnfvXlNvb29rT09Pq0QsUM7S6c4rNqS/lrZ5U+YPRBKR9M7u9xwqBUUvtNAudH766XSLE8PR49ixE78/8tVnX403Zk7fUR46NUUAIPIPCMdTKJTdNjY2QKPRgE6nA51OB1tbWyCRSIDD4YBAIAAejwcCgfDYUajVakGlUoFarQadTvfY79HX1wf9/f0gl8tBLpfDvXv3HvXw+dxQPYYXMj+d+P7Mmzv+5OHr6/OJWq1GBHeB09TcUiKuq/coKS3/eqIx/wPkiIXC3w6YjAAAAABJRU5ErkJggg=="); + + --keyword: #ff79c6; + --identifier: #f8f8f2; + --comment: #6272a4; + --operator: #ff79c6; + --punctuation: #f8f8f2; + --other: #f8f8f2; + --escapeSequence: #bd93f9; + --number: #bd93f9; + --literal: #f1fa8c; + --program: #9090c0; + --option: #90b010; + --raw-data: #8be9fd; + + --clipboard-image-normal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E %3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2' /%3E %3C/svg%3E"); + --clipboard-image-selected: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' viewBox='0 0 20 20' fill='currentColor'%3E %3Cpath d='M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z' /%3E %3Cpath d='M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z' /%3E %3C/svg%3E"); + --clipboard-image: var(--clipboard-image-normal); + } +} + +.theme-select-wrapper { + display: flex; + align-items: center; +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; } + +body { + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-weight: 400; + font-size: 1.125em; + line-height: 1.5; + color: var(--text); + background-color: var(--primary-background); } + +/* Skeleton grid */ +.container { + position: relative; + width: 100%; + max-width: 1050px; + margin: 0 auto; + padding: 0; + box-sizing: border-box; } + +.column, .columns { + width: 100%; + float: left; + box-sizing: border-box; + margin-left: 1%; } + +@media print { + #global-links, .link-seesrc, .theme-switch-wrapper, #searchInputDiv, .search-groupby { + display:none; + } + .columns { + width:100% !important; + } +} + +.column:first-child, .columns:first-child { + margin-left: 0; } + +.container .row { + display: flex; } + +.three.columns { + width: 25.0%; + height: 100vh; + position: sticky; + top: 0px; + overflow-y: auto; + padding: 2px; +} + +.nine.columns { + width: 75.0%; + padding-left: 1.5em; } + +.twelve.columns { + width: 100%; + margin-left: 0; } + +@media screen and (max-width: 860px) { + .three.columns { + display: none; + } + .nine.columns { + width: 98.0%; + } + body { + font-size: 1em; + line-height: 1.35; + } +} + +cite { + font-style: italic !important; } + + +/* Nim search input */ +div#searchInputDiv { + margin-bottom: 1em; +} +input#searchInput { + width: 80%; +} + +/* + * Some custom formatting for input forms. + * This also fixes input form colors on Firefox with a dark system theme on Linux. + */ +input { + -moz-appearance: none; + background-color: var(--secondary-background); + color: var(--text); + border: 1px solid var(--border); + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} + +input:focus { + border: 1px solid var(--input-focus); + box-shadow: 0 0 3px var(--input-focus); +} + +select { + -moz-appearance: none; + background-color: var(--secondary-background); + color: var(--text); + border: 1px solid var(--border); + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} + +select:focus { + border: 1px solid var(--input-focus); + box-shadow: 0 0 3px var(--input-focus); +} + +/* Docgen styles */ + +:target { + border: 2px solid #B5651D; + border-style: dotted; +} + +/* Links */ +a { + color: var(--anchor); + text-decoration: none; +} + +a span.Identifier { + text-decoration: underline; + text-decoration-color: #aab; +} + +a.reference-toplevel { + font-weight: bold; +} + +a.nimdoc { + word-spacing: 0.3em; +} + +a.toc-backref { + text-decoration: none; + color: var(--text); +} + +a.link-seesrc { + color: #607c9f; + font-size: 0.9em; + font-style: italic; +} + +a:hover, a:focus { + color: var(--anchor-focus); + text-decoration: underline; +} + +a:hover span.Identifier { + color: var(--anchor); +} + + +sub, sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; } + +sup { + top: -0.5em; } + +sub { + bottom: -0.25em; } + +img { + width: auto; + height: auto; + max-width: 100%; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; } + +@media print { + * { + color: black !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; } + + a, a:visited { + text-decoration: underline; } + + a[href]:after { + content: " (" attr(href) ")"; } + + abbr[title]:after { + content: " (" attr(title) ")"; } + + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; } + + pre, blockquote { + border: 1px solid #999; + page-break-inside: avoid; } + + thead { + display: table-header-group; } + + tr, img { + page-break-inside: avoid; } + + img { + max-width: 100% !important; } + + @page { + margin: 0.5cm; } + + h1 { + page-break-before: always; } + + h1.title { + page-break-before: avoid; } + + p, h2, h3 { + orphans: 3; + widows: 3; } + + h2, h3 { + page-break-after: avoid; } +} + + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; } + +small { + font-size: 85%; } + +strong { + font-weight: 600; + font-size: 0.95em; + color: var(--strong); } + +em { + font-style: italic; } + +h1 { + font-size: 1.8em; + font-weight: 400; + padding-bottom: .25em; + border-bottom: 6px solid var(--third-background); + margin-top: 2.5em; + margin-bottom: 1em; + line-height: 1.2em; } + +h1.title { + padding-bottom: 1em; + border-bottom: 0px; + font-size: 2.5em; + text-align: center; + font-weight: 900; + margin-top: 0.75em; + margin-bottom: 0em; } + +h2 { + font-size: 1.3em; + margin-top: 2em; } + +h2.subtitle { + margin-top: 0em; + text-align: center; } + +h3 { + font-size: 1.125em; + font-style: italic; + margin-top: 1.5em; } + +h4 { + font-size: 1.125em; + margin-top: 1em; } + +h5 { + font-size: 1.125em; + margin-top: 0.75em; } + +h6 { + font-size: 1.1em; } + + +ul, ol { + padding: 0; + margin-top: 0.5em; + margin-left: 0.75em; } + +ul ul, ul ol, ol ol, ol ul { + margin-bottom: 0; + margin-left: 1.25em; } + +ul.simple > li { + list-style-type: circle; } + +ul.simple-boot li { + list-style-type: none; + margin-left: 0em; + margin-bottom: 0.5em; } + +ol.simple > li, ul.simple > li { + margin-bottom: 0.2em; + margin-left: 0.4em } + +ul.simple.simple-toc > li { + margin-top: 1em; } + +ul.simple-toc { + list-style: none; + font-size: 0.9em; + margin-left: -0.3em; + margin-top: 1em; } + +ul.simple-toc > li { + list-style-type: none; } + +ul.simple-toc-section { + list-style-type: circle; + margin-left: 0.8em; + color: #6c9aae; } + +ul.nested-toc-section { + list-style-type: circle; + margin-left: -0.75em; + color: var(--text); } + +ul.nested-toc-section > li { + margin-left: 1.25em; } + + +ol.arabic { + list-style: decimal; } + +ol.loweralpha { + list-style: lower-alpha; } + +ol.upperalpha { + list-style: upper-alpha; } + +ol.lowerroman { + list-style: lower-roman; } + +ol.upperroman { + list-style: upper-roman; } + +ul.auto-toc { + list-style-type: none; } + + +dl { + margin-bottom: 1.5em; } + +dt { + margin-bottom: -0.5em; + margin-left: 0.0em; } + +dd { + margin-left: 2.0em; + margin-bottom: 3.0em; + margin-top: 0.5em; } + + +hr { + margin: 2em 0; + border: 0; + border-top: 1px solid #aaa; } + +hr.footnote { + width: 25%; + border-top: 0.15em solid #999; + margin-bottom: 0.15em; + margin-top: 0.15em; +} +div.footnote-group { + margin-left: 1em; +} +div.footnote-label { + display: inline-block; + min-width: 1.7em; +} + +div.option-list { + border: 0.1em solid var(--border); +} +div.option-list-item { + padding-left: 12em; + padding-right: 0; + padding-bottom: 0.3em; + padding-top: 0.3em; +} +div.odd { + background-color: var(--secondary-background); +} +div.option-list-label { + margin-left: -11.5em; + margin-right: 0em; + min-width: 11.5em; + display: inline-block; + vertical-align: top; +} +div.option-list-description { + width: calc(100% - 1em); + padding-left: 1em; + padding-right: 0; + display: inline-block; +} + +blockquote { + font-size: 0.9em; + font-style: italic; + padding-left: 0.5em; + margin-left: 0; + border-left: 5px solid #bbc; +} + +blockquote.markdown-quote { + font-size: 0.9rem; /* use rem to avoid recursion */ + font-style: normal; +} + +.pre, span.tok { + font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; + font-weight: 500; + font-size: 0.85em; + color: var(--text); + background-color: var(--third-background); + padding-left: 3px; + padding-right: 3px; + border-radius: 4px; +} + +span.tok { + border: 1px solid #808080; + padding-bottom: 0.1em; + margin-right: 0.2em; +} + +.copyToClipBoard { + position: relative; +} + +pre { + font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; + color: var(--text); + font-weight: 500; + display: inline-block; + box-sizing: border-box; + min-width: 100%; + padding: 0.5em; + margin-top: 0.5em; + margin-bottom: 0.5em; + font-size: 0.85em; + white-space: pre !important; + overflow-y: hidden; + overflow-x: visible; + background-color: var(--secondary-background); + border: 1px solid var(--border); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.copyToClipBoardBtn { + visibility: hidden; + position: absolute; + width: 24px; + border-radius: 4px; + background-image: var(--clipboard-image); + right: 5px; + top: 13px; + background-color: var(--secondary-background); + padding: 11px; + border: 0; +} + +.copyToClipBoard:hover .copyToClipBoardBtn { + visibility: visible; +} + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; } + + +/* Nim line-numbered tables */ +.line-nums-table { + width: 100%; + table-layout: fixed; } + +table.line-nums-table { + border-radius: 4px; + border: 1px solid #cccccc; + background-color: ghostwhite; + border-collapse: separate; + margin-top: 15px; + margin-bottom: 25px; } + +.line-nums-table tbody { + border: none; } + +.line-nums-table td pre { + border: none; + background-color: transparent; } + +.line-nums-table td.blob-line-nums { + width: 28px; } + +.line-nums-table td.blob-line-nums pre { + color: #b0b0b0; + -webkit-filter: opacity(75%); + filter: opacity(75%); + text-align: right; + border-color: transparent; + background-color: transparent; + padding-left: 0px; + margin-left: 0px; + padding-right: 0px; + margin-right: 0px; } + + +table { + max-width: 100%; + background-color: transparent; + margin-top: 0.5em; + margin-bottom: 1.5em; + border-collapse: collapse; + border-color: var(--third-background); + border-spacing: 0; + font-size: 0.9em; +} + +table th, table td { + padding: 0px 0.5em 0px; + border-color: var(--third-background); +} + +table th { + background-color: var(--third-background); + border-color: var(--third-background); + font-weight: bold; } + +table th.docinfo-name { + background-color: transparent; + text-align: right; +} + +table tr:hover { + background-color: var(--third-background); } + + +/* rst2html default used to remove borders from tables and images */ +.borderless, table.borderless td, table.borderless th { + border: 0; } + +table.borderless td, table.borderless th { + /* Override padding for "table.docutils td" with "! important". + The right padding separates the table cells. */ + padding: 0 0.5em 0 0 !important; } + +.admonition { + padding: 0.3em; + background-color: var(--secondary-background); + border-left: 0.4em solid #7f7f84; + margin-bottom: 0.5em; + -webkit-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); + -moz-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); + box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); +} +.admonition-info { + border-color: var(--info-background); +} +.admonition-info-text { + color: var(--info-background); +} +.admonition-warning { + border-color: var(--warning-background); +} +.admonition-warning-text { + color: var(--warning-background); +} +.admonition-error { + border-color: var(--error-background); +} +.admonition-error-text { + color: var(--error-background); +} + +.first { + /* Override more specific margin styles with "! important". */ + margin-top: 0 !important; } + +.last, .with-subtitle { + margin-bottom: 0 !important; } + +.hidden { + display: none; } + +blockquote.epigraph { + margin: 2em 5em; } + +dl.docutils dd { + margin-bottom: 0.5em; } + +object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { + overflow: hidden; } + + +div.figure { + margin-left: 2em; + margin-right: 2em; } + +div.footer, div.header { + clear: both; + text-align: center; + color: #666; + font-size: smaller; } + +div.footer { + padding-top: 5em; } + +div.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; } + +div.line-block div.line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; } + +div.topic { + margin: 2em; } + +div.search_results { + background-color: var(--third-background); + margin: 3em; + padding: 1em; + border: 1px solid #4d4d4d; } + +div#global-links ul { + margin-left: 0; + list-style-type: none; } + +div#global-links > simple-boot { + margin-left: 3em; } + +hr.docutils { + width: 75%; } + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; } + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; } + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; } + +.align-left { + text-align: left; } + +.align-center { + clear: both; + text-align: center; } + +.align-right { + text-align: right; } + +/* reset inner alignment in figures */ +div.align-right { + text-align: inherit; } + +p.attribution { + text-align: right; + margin-left: 50%; } + +p.caption { + font-style: italic; } + +p.credits { + font-style: italic; + font-size: smaller; } + +p.label { + white-space: nowrap; } + +p.rubric { + font-weight: bold; + font-size: larger; + color: maroon; + text-align: center; } + +p.topic-title { + font-weight: bold; } + +pre.address { + margin-bottom: 0; + margin-top: 0; + font: inherit; } + +pre.literal-block, pre.doctest-block, pre.math, pre.code { + margin-left: 2em; + margin-right: 2em; } + +pre.code .ln { + color: grey; } + +/* line numbers */ +pre.code, code { + background-color: #eeeeee; } + +pre.code .comment, code .comment { + color: #5c6576; } + +pre.code .keyword, code .keyword { + color: #3B0D06; + font-weight: bold; } + +pre.code .literal.string, code .literal.string { + color: #0c5404; } + +pre.code .name.builtin, code .name.builtin { + color: #352b84; } + +pre.code .deleted, code .deleted { + background-color: #DEB0A1; } + +pre.code .inserted, code .inserted { + background-color: #A3D289; } + +span.classifier { + font-style: oblique; } + +span.classifier-delimiter { + font-weight: bold; } + +span.problematic { + color: #b30000; } + +span.section-subtitle { + /* font-size relative to parent (h1..h6 element) */ + font-size: 80%; } + +span.DecNumber { + color: var(--number); } + +span.BinNumber { + color: var(--number); } + +span.HexNumber { + color: var(--number); } + +span.OctNumber { + color: var(--number); } + +span.FloatNumber { + color: var(--number); } + +span.Identifier { + color: var(--identifier); } + +span.Keyword { + font-weight: 600; + color: var(--keyword); } + +span.StringLit { + color: var(--literal); } + +span.LongStringLit { + color: var(--literal); } + +span.CharLit { + color: var(--literal); } + +span.EscapeSequence { + color: var(--escapeSequence); } + +span.Operator { + color: var(--operator); } + +span.Punctuation { + color: var(--punctuation); } + +span.Comment, span.LongComment { + font-style: italic; + font-weight: 400; + color: var(--comment); } + +span.RegularExpression { + color: darkviolet; } + +span.TagStart { + color: darkviolet; } + +span.TagEnd { + color: darkviolet; } + +span.Key { + color: #252dbe; } + +span.Value { + color: #252dbe; } + +span.RawData { + color: var(--raw-data); } + +span.Assembler { + color: #252dbe; } + +span.Preprocessor { + color: #252dbe; } + +span.Directive { + color: #252dbe; } + +span.option { + font-weight: bold; + font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; + color: var(--option); } + +span.Prompt { + font-weight: bold; + color: red; } + +span.ProgramOutput { + font-weight: bold; + color: #808080; } + +span.program { + font-weight: bold; + color: var(--program); + text-decoration: underline; + text-decoration-color: var(--hint); + text-decoration-thickness: 0.05em; + text-underline-offset: 0.15em; } + +span.Command, span.Rule, span.Hyperlink, +span.Label, span.Reference, span.Other { + color: var(--other); } + +/* Pop type, const, proc, and iterator defs in nim def blocks */ +dt pre > span.Identifier, dt pre > span.Operator { + color: var(--identifier); + font-weight: 700; } + +dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier, +dt pre > span.Operator ~ span.Identifier, dt pre > span.Other ~ span.Identifier { + color: var(--identifier); + font-weight: inherit; } + +/* Nim sprite for the footer (taken from main page favicon) */ +.nim-sprite { + display: inline-block; + width: 51px; + height: 14px; + background-position: 0 0; + background-size: 51px 14px; + -webkit-filter: opacity(50%); + filter: opacity(50%); + background-repeat: no-repeat; + background-image: var(--nim-sprite-base64); + margin-bottom: 5px; } + +span.pragmadots { + /* Position: relative frees us up to make the dots + look really nice without fucking up the layout and + causing bulging in the parent container */ + position: relative; + /* 1px down looks slightly nicer */ + top: 1px; + padding: 2px; + background-color: var(--third-background); + border-radius: 4px; + margin: 0 2px; + cursor: pointer; + font-size: 0.8em; } + +span.pragmadots:hover { + background-color: var(--hint); } + +span.pragmawrap { + display: none; } + +span.attachedType { + display: none; + visibility: hidden; } diff --git a/docs/parser.html b/docs/parser.html new file mode 100644 index 0000000..d89e1b1 --- /dev/null +++ b/docs/parser.html @@ -0,0 +1,442 @@ + + + + + + + +margrave/parser + + + + + + + + + + + + +
+
+

margrave/parser

+
+
+
+ + +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+
+ Source   +Edit   + +
+ +

+ +
+

Types

+
+
+
DelimFinishReason = enum
+  frDone, frReachedEnd, frFailed
+
+ + + Source   +Edit   + +
+
+ +
+
+
+

Consts

+
+
+
IdStarts = {'(', '[', '{', ':'}
+
+ + + Source   +Edit   + +
+
+
+
InlineWhitespace = {'\t', '\v'..'\f', ' '}
+
+ + + Source   +Edit   + +
+
+
+
LegalId = {'a'..'z', 'A'..'Z', '0'..'9', '-', '_', ':', '.'}
+
+ + + Source   +Edit   + +
+
+
+
SpecialLineTags = {ul, ol, blockquote}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+

Procs

+
+
+
+
proc parseAmpStr(parser; options: options:type): NativeString
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
proc parseBracket(parser; options: options:type; image: bool;
+                  singleLine: SingleLineBool): MargraveElement
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
proc parseCodeBlock(parser; options: options:type; delimChar: char): MargraveElement {.
+    inline.}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
proc parseCodeBlockStr(parser; options: options:type; delimChar: char): tuple[
+    language, code: NativeString]
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
proc parseCurly(parser; options: options:type): NativeString
+
+ +

Parses a curly bracket element.

+

If -d:margraveCurlyNoHtmlEscape is defined, initial ! characters are ignored and no HTML chars are escaped.

+ + Source   +Edit   + +
+
+ +
+
+
+
proc parseDelimed(parser; options: options:type; delim: string;
+                  singleLine: SingleLineBool): (DelimFinishReason,
+    seq[MargraveElement]) {....gcsafe.}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
proc parseId(parser; startChar: char): NativeString {....raises: [], tags: [],
+    forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
proc parseInline(parser; options: options:type; singleLine: SingleLineBool): seq[
+    MargraveElement] {.inline.}
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+
proc parseReferenceName(parser; options: options:type; failed: var bool): NativeString
+
+ + Does not reset position after failing. + Source   +Edit   + +
+
+ +
+
+
+
proc parseTopLevel(parser; options: options:type): seq[MargraveElement]
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+
+

Templates

+
+
+
+
template parseLine(parser; options): seq[MargraveElement]
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
template parseSingleLine(parser; options): seq[MargraveElement]
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+ +
+
+ + +
+
+ + + + + + diff --git a/docs/singlexml.html b/docs/singlexml.html new file mode 100644 index 0000000..fb5aaab --- /dev/null +++ b/docs/singlexml.html @@ -0,0 +1,119 @@ + + + + + + + +margrave/singlexml + + + + + + + + + + + + +
+
+

margrave/singlexml

+
+
+
+ + +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+
+ Source   +Edit   + +
+ +

Parses a single XML node using Nim's parsexml. Works for JS in versions >= 1.3. -d:margraveNoInlineHtml to not use this module in the parser.

+
+

Imports

+
+ common +
+
+
+

Procs

+
+
+
+
proc parseXml(text: string; i: int): (bool, int) {.
+    ...raises: [IOError, OSError, Exception], tags: [ReadIOEffect, RootEffect],
+    forbids: [].}
+
+ + Parse text starting with index i as a single XML node and return a tuple with a boolean indicating success and an integer indicating the index where parsing XML failed, or ended (so not inclusive). + Source   +Edit   + +
+
+ +
+ +
+
+ +
+
+ + +
+
+ + + + + + diff --git a/docs/utils.html b/docs/utils.html new file mode 100644 index 0000000..1c1da73 --- /dev/null +++ b/docs/utils.html @@ -0,0 +1,757 @@ + + + + + + + +margrave/parser/utils + + + + + + + + + + + + +
+
+

margrave/parser/utils

+
+
+
+ + +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+
+ Source   +Edit   + +
+ +

+
+

Imports

+
+ common, element, defs +
+
+
+

Types

+
+
+
MargraveParserVarMatcher = distinct var MargraveParser
+
+ + + Source   +Edit   + +
+
+ +
+
+
+

Procs

+
+
+
+
proc addNewline(parser: MargraveParser; options: static MargraveOptions;
+                elem: MargraveElement | seq[MargraveElement])
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
func anyNext(parser: MargraveParser; offset: int = 0): bool {.inline,
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
func anyPrev(parser: MargraveParser; offset: int = 0): bool {.inline,
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
func escapeHtmlChar(ch: char): NativeString {....raises: [], tags: [], forbids: [].}
+
+ + Escapes &, < and > for html. + Source   +Edit   + +
+
+ +
+
+
+
func nextMatch(parser: var MargraveParser; pat: char; offset: int = 0): bool {.
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func nextMatch(parser: var MargraveParser; pat: char; offset: int = 0; len: int): bool {.
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func nextMatch(parser: var MargraveParser; pat: openArray[string];
+               offset: int = 0): bool {....raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func nextMatch(parser: var MargraveParser; pat: set[char]; offset: int = 0): bool {.
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func nextMatch(parser: var MargraveParser; pat: set[char]; offset: int = 0;
+               len: int): bool {....raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func nextMatch(parser: var MargraveParser; pat: string; offset: int = 0): bool {.
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
func nextWhitespace(parser: MargraveParser; offset: int = 0): bool {.inline,
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
func noAdjacentWhitespace(parser: MargraveParser; offset: int = 0): bool {.
+    inline, ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
func onlyNextWhitespace(parser: MargraveParser; offset: int = 0): bool {.inline,
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
func onlyPrevWhitespace(parser: MargraveParser; offset: int = 0): bool {.inline,
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
func peekMatch(parser: MargraveParser; pat: char; offset: int = 0): bool {.
+    inline, ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func peekMatch(parser: MargraveParser; pat: char; offset: int = 0; len: Natural): bool {.
+    inline, ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func peekMatch(parser: MargraveParser; pat: openArray[string]; offset: int = 0): bool {.
+    inline, ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func peekMatch(parser: MargraveParser; pat: set[char]; offset: int = 0): bool {.
+    inline, ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func peekMatch(parser: MargraveParser; pat: set[char]; offset: int = 0;
+               len: Natural): bool {.inline, ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+
+
func peekMatch(parser: MargraveParser; pat: string; offset: int = 0): bool {.
+    inline, ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
func peekPrevMatch(parser: MargraveParser; pat: char | set[char];
+                   offset: int = 0): bool {.inline.}
+
+ + + Source   +Edit   + +
+
+
+
func peekPrevMatch(parser: MargraveParser; pat: string; offset: int = 0): bool {.
+    inline, ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
func prevWhitespace(parser: MargraveParser; offset: int = 0): bool {.inline,
+    ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+ +
+ + +
+
+
+
func surroundedWhitespace(parser: MargraveParser; offset: int = 0): bool {.
+    inline, ...raises: [], tags: [], forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+
+

Iterators

+
+
+
+
iterator nextChars(parser: var MargraveParser): char {....raises: [], tags: [],
+    forbids: [].}
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+
+

Macros

+
+
+
+
macro match(parserMatcher: MargraveParserVarMatcher): untyped
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
macro matchNext(parser: var MargraveParser; branches: varargs[untyped])
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+
+

Templates

+
+
+
+
template `case`(parserMatcher: MargraveParserVarMatcher): untyped
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
template get(parser: MargraveParser; offset: int = 0): char
+
+ + + Source   +Edit   + +
+
+
+
template get(parser: MargraveParser; offset: int = 0; len: int): NativeString
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
template nextMatch(parser: var MargraveParser): MargraveParserVarMatcher
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
template noNext(parser: MargraveParser; offset: int = 0): bool
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
template noPrev(parser: MargraveParser; offset: int = 0): bool
+
+ + + Source   +Edit   + +
+
+ +
+
+
+
template withOptions(parser: MargraveParser;
+                     compileTimeOptions: static MargraveOptions; cond, body): untyped
+
+ + + Source   +Edit   + +
+
+
+
template withOptions(parser: MargraveParser;
+                     compileTimeOptions: static MargraveOptions;
+                     cond, body, elseBody): untyped
+
+ + + Source   +Edit   + +
+
+ +
+ +
+
+ +
+
+ + +
+
+ + + + + +