/* Generated by the Nim Compiler v1.0.4 */
/*   (c) 2019 Andreas Rumpf */

var framePtr = null;
var excHandler = 0;
var lastJSError = null;
if (typeof Int8Array === 'undefined') Int8Array = Array;
if (typeof Int16Array === 'undefined') Int16Array = Array;
if (typeof Int32Array === 'undefined') Int32Array = Array;
if (typeof Uint8Array === 'undefined') Uint8Array = Array;
if (typeof Uint16Array === 'undefined') Uint16Array = Array;
if (typeof Uint32Array === 'undefined') Uint32Array = Array;
if (typeof Float32Array === 'undefined') Float32Array = Array;
if (typeof Float64Array === 'undefined') Float64Array = Array;
var NTI44032 = {size: 0,kind: 1,base: null,node: null,finalizer: null};
var NTI204074 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI47462 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI206578 = {size: 0,kind: 24,base: null,node: null,finalizer: null};
var NTI86448 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86444 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86440 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86436 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86432 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86428 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86424 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86420 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86416 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86412 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86408 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86404 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86400 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86396 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86392 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86388 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86384 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86380 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86376 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86372 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI86205 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI86283 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI86281 = {size: 0,kind: 22,base: null,node: null,finalizer: null};
var NTI86227 = {size: 0, kind: 14, base: null, node: null, finalizer: null};
var NTI86565 = {size: 0,kind: 24,base: null,node: null,finalizer: null};
var NTI86563 = {size: 0,kind: 24,base: null,node: null,finalizer: null};
var NTI86561 = {size: 0,kind: 24,base: null,node: null,finalizer: null};
var NTI86231 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI86229 = {size: 0,kind: 22,base: null,node: null,finalizer: null};
var NTI88305 = {size: 0,kind: 24,base: null,node: null,finalizer: null};
var NTI47450 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI47458 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI44006 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
var NTI65156 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI47408 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI47514 = {size: 0,kind: 22,base: null,node: null,finalizer: null};
var NTI44016 = {size: 0,kind: 40,base: null,node: null,finalizer: null};
var NTI44040 = {size: 0,kind: 28,base: null,node: null,finalizer: null};
var NTI44042 = {size: 0,kind: 29,base: null,node: null,finalizer: null};
var NTI47508 = {size: 0,kind: 22,base: null,node: null,finalizer: null};
var NTI47426 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI47428 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI47442 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI47446 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NNI47446 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI47446.node = NNI47446;
var NNI47442 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI47442.node = NNI47442;
var NNI47428 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI47428.node = NNI47428;
NTI47508.base = NTI47426;
NTI47514.base = NTI47426;
var NNI47426 = {kind: 2, len: 6, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI47508, name: "parent", sons: null}, 
{kind: 1, offset: "name", len: 0, typ: NTI44042, name: "name", sons: null}, 
{kind: 1, offset: "message", len: 0, typ: NTI44040, name: "msg", sons: null}, 
{kind: 1, offset: "trace", len: 0, typ: NTI44040, name: "trace", sons: null}, 
{kind: 1, offset: "raiseId", len: 0, typ: NTI44016, name: "raiseId", sons: null}, 
{kind: 1, offset: "up", len: 0, typ: NTI47514, name: "up", sons: null}]};
NTI47426.node = NNI47426;
var NNI47408 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI47408.node = NNI47408;
NTI47426.base = NTI47408;
NTI47428.base = NTI47426;
NTI47442.base = NTI47428;
NTI47446.base = NTI47442;
var NNI65156 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI44042, name: "Field0", sons: null}, 
{kind: 1, offset: "Field1", len: 0, typ: NTI44006, name: "Field1", sons: null}]};
NTI65156.node = NNI65156;
var NNI47458 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI47458.node = NNI47458;
NTI47458.base = NTI47428;
var NNI47450 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI47450.node = NNI47450;
NTI47450.base = NTI47428;
NTI86561.base = NTI86229;
NTI86563.base = NTI86229;
NTI86565.base = NTI86229;
var NNI86227 = {kind: 2, offset: 0, typ: null, name: null, len: 12, sons: {"1": {kind: 1, offset: 1, typ: NTI86227, name: "ElementNode", len: 0, sons: null}, 
"2": {kind: 1, offset: 2, typ: NTI86227, name: "AttributeNode", len: 0, sons: null}, 
"3": {kind: 1, offset: 3, typ: NTI86227, name: "TextNode", len: 0, sons: null}, 
"4": {kind: 1, offset: 4, typ: NTI86227, name: "CDATANode", len: 0, sons: null}, 
"5": {kind: 1, offset: 5, typ: NTI86227, name: "EntityRefNode", len: 0, sons: null}, 
"6": {kind: 1, offset: 6, typ: NTI86227, name: "EntityNode", len: 0, sons: null}, 
"7": {kind: 1, offset: 7, typ: NTI86227, name: "ProcessingInstructionNode", len: 0, sons: null}, 
"8": {kind: 1, offset: 8, typ: NTI86227, name: "CommentNode", len: 0, sons: null}, 
"9": {kind: 1, offset: 9, typ: NTI86227, name: "DocumentNode", len: 0, sons: null}, 
"10": {kind: 1, offset: 10, typ: NTI86227, name: "DocumentTypeNode", len: 0, sons: null}, 
"11": {kind: 1, offset: 11, typ: NTI86227, name: "DocumentFragmentNode", len: 0, sons: null}, 
"12": {kind: 1, offset: 12, typ: NTI86227, name: "NotationNode", len: 0, sons: null}}};
NTI86227.node = NNI86227;
var NNI86283 = {kind: 2, len: 92, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "background", len: 0, typ: NTI44042, name: "background", sons: null}, 
{kind: 1, offset: "backgroundAttachment", len: 0, typ: NTI44042, name: "backgroundAttachment", sons: null}, 
{kind: 1, offset: "backgroundColor", len: 0, typ: NTI44042, name: "backgroundColor", sons: null}, 
{kind: 1, offset: "backgroundImage", len: 0, typ: NTI44042, name: "backgroundImage", sons: null}, 
{kind: 1, offset: "backgroundPosition", len: 0, typ: NTI44042, name: "backgroundPosition", sons: null}, 
{kind: 1, offset: "backgroundRepeat", len: 0, typ: NTI44042, name: "backgroundRepeat", sons: null}, 
{kind: 1, offset: "border", len: 0, typ: NTI44042, name: "border", sons: null}, 
{kind: 1, offset: "borderBottom", len: 0, typ: NTI44042, name: "borderBottom", sons: null}, 
{kind: 1, offset: "borderBottomColor", len: 0, typ: NTI44042, name: "borderBottomColor", sons: null}, 
{kind: 1, offset: "borderBottomStyle", len: 0, typ: NTI44042, name: "borderBottomStyle", sons: null}, 
{kind: 1, offset: "borderBottomWidth", len: 0, typ: NTI44042, name: "borderBottomWidth", sons: null}, 
{kind: 1, offset: "borderColor", len: 0, typ: NTI44042, name: "borderColor", sons: null}, 
{kind: 1, offset: "borderLeft", len: 0, typ: NTI44042, name: "borderLeft", sons: null}, 
{kind: 1, offset: "borderLeftColor", len: 0, typ: NTI44042, name: "borderLeftColor", sons: null}, 
{kind: 1, offset: "borderLeftStyle", len: 0, typ: NTI44042, name: "borderLeftStyle", sons: null}, 
{kind: 1, offset: "borderLeftWidth", len: 0, typ: NTI44042, name: "borderLeftWidth", sons: null}, 
{kind: 1, offset: "borderRight", len: 0, typ: NTI44042, name: "borderRight", sons: null}, 
{kind: 1, offset: "borderRightColor", len: 0, typ: NTI44042, name: "borderRightColor", sons: null}, 
{kind: 1, offset: "borderRightStyle", len: 0, typ: NTI44042, name: "borderRightStyle", sons: null}, 
{kind: 1, offset: "borderRightWidth", len: 0, typ: NTI44042, name: "borderRightWidth", sons: null}, 
{kind: 1, offset: "borderStyle", len: 0, typ: NTI44042, name: "borderStyle", sons: null}, 
{kind: 1, offset: "borderTop", len: 0, typ: NTI44042, name: "borderTop", sons: null}, 
{kind: 1, offset: "borderTopColor", len: 0, typ: NTI44042, name: "borderTopColor", sons: null}, 
{kind: 1, offset: "borderTopStyle", len: 0, typ: NTI44042, name: "borderTopStyle", sons: null}, 
{kind: 1, offset: "borderTopWidth", len: 0, typ: NTI44042, name: "borderTopWidth", sons: null}, 
{kind: 1, offset: "borderWidth", len: 0, typ: NTI44042, name: "borderWidth", sons: null}, 
{kind: 1, offset: "bottom", len: 0, typ: NTI44042, name: "bottom", sons: null}, 
{kind: 1, offset: "captionSide", len: 0, typ: NTI44042, name: "captionSide", sons: null}, 
{kind: 1, offset: "clear", len: 0, typ: NTI44042, name: "clear", sons: null}, 
{kind: 1, offset: "clip", len: 0, typ: NTI44042, name: "clip", sons: null}, 
{kind: 1, offset: "color", len: 0, typ: NTI44042, name: "color", sons: null}, 
{kind: 1, offset: "cursor", len: 0, typ: NTI44042, name: "cursor", sons: null}, 
{kind: 1, offset: "direction", len: 0, typ: NTI44042, name: "direction", sons: null}, 
{kind: 1, offset: "display", len: 0, typ: NTI44042, name: "display", sons: null}, 
{kind: 1, offset: "emptyCells", len: 0, typ: NTI44042, name: "emptyCells", sons: null}, 
{kind: 1, offset: "cssFloat", len: 0, typ: NTI44042, name: "cssFloat", sons: null}, 
{kind: 1, offset: "font", len: 0, typ: NTI44042, name: "font", sons: null}, 
{kind: 1, offset: "fontFamily", len: 0, typ: NTI44042, name: "fontFamily", sons: null}, 
{kind: 1, offset: "fontSize", len: 0, typ: NTI44042, name: "fontSize", sons: null}, 
{kind: 1, offset: "fontStretch", len: 0, typ: NTI44042, name: "fontStretch", sons: null}, 
{kind: 1, offset: "fontStyle", len: 0, typ: NTI44042, name: "fontStyle", sons: null}, 
{kind: 1, offset: "fontVariant", len: 0, typ: NTI44042, name: "fontVariant", sons: null}, 
{kind: 1, offset: "fontWeight", len: 0, typ: NTI44042, name: "fontWeight", sons: null}, 
{kind: 1, offset: "height", len: 0, typ: NTI44042, name: "height", sons: null}, 
{kind: 1, offset: "left", len: 0, typ: NTI44042, name: "left", sons: null}, 
{kind: 1, offset: "letterSpacing", len: 0, typ: NTI44042, name: "letterSpacing", sons: null}, 
{kind: 1, offset: "lineHeight", len: 0, typ: NTI44042, name: "lineHeight", sons: null}, 
{kind: 1, offset: "listStyle", len: 0, typ: NTI44042, name: "listStyle", sons: null}, 
{kind: 1, offset: "listStyleImage", len: 0, typ: NTI44042, name: "listStyleImage", sons: null}, 
{kind: 1, offset: "listStylePosition", len: 0, typ: NTI44042, name: "listStylePosition", sons: null}, 
{kind: 1, offset: "listStyleType", len: 0, typ: NTI44042, name: "listStyleType", sons: null}, 
{kind: 1, offset: "margin", len: 0, typ: NTI44042, name: "margin", sons: null}, 
{kind: 1, offset: "marginBottom", len: 0, typ: NTI44042, name: "marginBottom", sons: null}, 
{kind: 1, offset: "marginLeft", len: 0, typ: NTI44042, name: "marginLeft", sons: null}, 
{kind: 1, offset: "marginRight", len: 0, typ: NTI44042, name: "marginRight", sons: null}, 
{kind: 1, offset: "marginTop", len: 0, typ: NTI44042, name: "marginTop", sons: null}, 
{kind: 1, offset: "maxHeight", len: 0, typ: NTI44042, name: "maxHeight", sons: null}, 
{kind: 1, offset: "maxWidth", len: 0, typ: NTI44042, name: "maxWidth", sons: null}, 
{kind: 1, offset: "minHeight", len: 0, typ: NTI44042, name: "minHeight", sons: null}, 
{kind: 1, offset: "minWidth", len: 0, typ: NTI44042, name: "minWidth", sons: null}, 
{kind: 1, offset: "opacity", len: 0, typ: NTI44042, name: "opacity", sons: null}, 
{kind: 1, offset: "overflow", len: 0, typ: NTI44042, name: "overflow", sons: null}, 
{kind: 1, offset: "padding", len: 0, typ: NTI44042, name: "padding", sons: null}, 
{kind: 1, offset: "paddingBottom", len: 0, typ: NTI44042, name: "paddingBottom", sons: null}, 
{kind: 1, offset: "paddingLeft", len: 0, typ: NTI44042, name: "paddingLeft", sons: null}, 
{kind: 1, offset: "paddingRight", len: 0, typ: NTI44042, name: "paddingRight", sons: null}, 
{kind: 1, offset: "paddingTop", len: 0, typ: NTI44042, name: "paddingTop", sons: null}, 
{kind: 1, offset: "pageBreakAfter", len: 0, typ: NTI44042, name: "pageBreakAfter", sons: null}, 
{kind: 1, offset: "pageBreakBefore", len: 0, typ: NTI44042, name: "pageBreakBefore", sons: null}, 
{kind: 1, offset: "pointerEvents", len: 0, typ: NTI44042, name: "pointerEvents", sons: null}, 
{kind: 1, offset: "position", len: 0, typ: NTI44042, name: "position", sons: null}, 
{kind: 1, offset: "right", len: 0, typ: NTI44042, name: "right", sons: null}, 
{kind: 1, offset: "scrollbar3dLightColor", len: 0, typ: NTI44042, name: "scrollbar3dLightColor", sons: null}, 
{kind: 1, offset: "scrollbarArrowColor", len: 0, typ: NTI44042, name: "scrollbarArrowColor", sons: null}, 
{kind: 1, offset: "scrollbarBaseColor", len: 0, typ: NTI44042, name: "scrollbarBaseColor", sons: null}, 
{kind: 1, offset: "scrollbarDarkshadowColor", len: 0, typ: NTI44042, name: "scrollbarDarkshadowColor", sons: null}, 
{kind: 1, offset: "scrollbarFaceColor", len: 0, typ: NTI44042, name: "scrollbarFaceColor", sons: null}, 
{kind: 1, offset: "scrollbarHighlightColor", len: 0, typ: NTI44042, name: "scrollbarHighlightColor", sons: null}, 
{kind: 1, offset: "scrollbarShadowColor", len: 0, typ: NTI44042, name: "scrollbarShadowColor", sons: null}, 
{kind: 1, offset: "scrollbarTrackColor", len: 0, typ: NTI44042, name: "scrollbarTrackColor", sons: null}, 
{kind: 1, offset: "tableLayout", len: 0, typ: NTI44042, name: "tableLayout", sons: null}, 
{kind: 1, offset: "textAlign", len: 0, typ: NTI44042, name: "textAlign", sons: null}, 
{kind: 1, offset: "textDecoration", len: 0, typ: NTI44042, name: "textDecoration", sons: null}, 
{kind: 1, offset: "textIndent", len: 0, typ: NTI44042, name: "textIndent", sons: null}, 
{kind: 1, offset: "textTransform", len: 0, typ: NTI44042, name: "textTransform", sons: null}, 
{kind: 1, offset: "transform", len: 0, typ: NTI44042, name: "transform", sons: null}, 
{kind: 1, offset: "top", len: 0, typ: NTI44042, name: "top", sons: null}, 
{kind: 1, offset: "verticalAlign", len: 0, typ: NTI44042, name: "verticalAlign", sons: null}, 
{kind: 1, offset: "visibility", len: 0, typ: NTI44042, name: "visibility", sons: null}, 
{kind: 1, offset: "width", len: 0, typ: NTI44042, name: "width", sons: null}, 
{kind: 1, offset: "wordSpacing", len: 0, typ: NTI44042, name: "wordSpacing", sons: null}, 
{kind: 1, offset: "zIndex", len: 0, typ: NTI44006, name: "zIndex", sons: null}]};
NTI86283.node = NNI86283;
NTI86283.base = NTI47408;
NTI86281.base = NTI86283;
var NNI86231 = {kind: 2, len: 14, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "attributes", len: 0, typ: NTI86561, name: "attributes", sons: null}, 
{kind: 1, offset: "childNodes", len: 0, typ: NTI86563, name: "childNodes", sons: null}, 
{kind: 1, offset: "children", len: 0, typ: NTI86565, name: "children", sons: null}, 
{kind: 1, offset: "data", len: 0, typ: NTI44042, name: "data", sons: null}, 
{kind: 1, offset: "firstChild", len: 0, typ: NTI86229, name: "firstChild", sons: null}, 
{kind: 1, offset: "lastChild", len: 0, typ: NTI86229, name: "lastChild", sons: null}, 
{kind: 1, offset: "nextSibling", len: 0, typ: NTI86229, name: "nextSibling", sons: null}, 
{kind: 1, offset: "nodeName", len: 0, typ: NTI44042, name: "nodeName", sons: null}, 
{kind: 1, offset: "nodeType", len: 0, typ: NTI86227, name: "nodeType", sons: null}, 
{kind: 1, offset: "nodeValue", len: 0, typ: NTI44042, name: "nodeValue", sons: null}, 
{kind: 1, offset: "parentNode", len: 0, typ: NTI86229, name: "parentNode", sons: null}, 
{kind: 1, offset: "previousSibling", len: 0, typ: NTI86229, name: "previousSibling", sons: null}, 
{kind: 1, offset: "innerHTML", len: 0, typ: NTI44042, name: "innerHTML", sons: null}, 
{kind: 1, offset: "style", len: 0, typ: NTI86281, name: "style", sons: null}]};
NTI86231.node = NNI86231;
var NNI86205 = {kind: 2, len: 20, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "onabort", len: 0, typ: NTI86372, name: "onabort", sons: null}, 
{kind: 1, offset: "onblur", len: 0, typ: NTI86376, name: "onblur", sons: null}, 
{kind: 1, offset: "onchange", len: 0, typ: NTI86380, name: "onchange", sons: null}, 
{kind: 1, offset: "onclick", len: 0, typ: NTI86384, name: "onclick", sons: null}, 
{kind: 1, offset: "ondblclick", len: 0, typ: NTI86388, name: "ondblclick", sons: null}, 
{kind: 1, offset: "onerror", len: 0, typ: NTI86392, name: "onerror", sons: null}, 
{kind: 1, offset: "onfocus", len: 0, typ: NTI86396, name: "onfocus", sons: null}, 
{kind: 1, offset: "onkeydown", len: 0, typ: NTI86400, name: "onkeydown", sons: null}, 
{kind: 1, offset: "onkeypress", len: 0, typ: NTI86404, name: "onkeypress", sons: null}, 
{kind: 1, offset: "onkeyup", len: 0, typ: NTI86408, name: "onkeyup", sons: null}, 
{kind: 1, offset: "onload", len: 0, typ: NTI86412, name: "onload", sons: null}, 
{kind: 1, offset: "onmousedown", len: 0, typ: NTI86416, name: "onmousedown", sons: null}, 
{kind: 1, offset: "onmousemove", len: 0, typ: NTI86420, name: "onmousemove", sons: null}, 
{kind: 1, offset: "onmouseout", len: 0, typ: NTI86424, name: "onmouseout", sons: null}, 
{kind: 1, offset: "onmouseover", len: 0, typ: NTI86428, name: "onmouseover", sons: null}, 
{kind: 1, offset: "onmouseup", len: 0, typ: NTI86432, name: "onmouseup", sons: null}, 
{kind: 1, offset: "onreset", len: 0, typ: NTI86436, name: "onreset", sons: null}, 
{kind: 1, offset: "onselect", len: 0, typ: NTI86440, name: "onselect", sons: null}, 
{kind: 1, offset: "onsubmit", len: 0, typ: NTI86444, name: "onsubmit", sons: null}, 
{kind: 1, offset: "onunload", len: 0, typ: NTI86448, name: "onunload", sons: null}]};
NTI86205.node = NNI86205;
NTI86205.base = NTI47408;
NTI86231.base = NTI86205;
NTI86229.base = NTI86231;
NTI88305.base = NTI86229;
NTI206578.base = NTI44042;
var NNI47462 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI47462.node = NNI47462;
NTI47462.base = NTI47428;
var NNI204074 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI44006, name: "Field0", sons: null}, 
{kind: 1, offset: "Field1", len: 0, typ: NTI44032, name: "Field1", sons: null}]};
NTI204074.node = NNI204074;

function makeNimstrLit(c_67270) {
		  var ln = c_67270.length;
  var result = new Array(ln);
  for (var i = 0; i < ln; ++i) {
    result[i] = c_67270.charCodeAt(i);
  }
  return result;
  

	
}

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_68827, src_68828, ti_68829) {
	var result_69019 = null;

		switch (ti_68829.kind) {
		case 21:
		case 22:
		case 23:
		case 5:
			if (!(is_fat_pointer_68801(ti_68829))) {
			result_69019 = src_68828;
			}
			else {
				result_69019 = [src_68828[0], src_68828[1]];
			}
			
			break;
		case 19:
			      if (dest_68827 === null || dest_68827 === undefined) {
        dest_68827 = {};
      }
      else {
        for (var key in dest_68827) { delete dest_68827[key]; }
      }
      for (var key in src_68828) { dest_68827[key] = src_68828[key]; }
      result_69019 = dest_68827;
    
			break;
		case 18:
		case 17:
			if (!((ti_68829.base == null))) {
			result_69019 = nimCopy(dest_68827, src_68828, ti_68829.base);
			}
			else {
			if ((ti_68829.kind == 17)) {
			result_69019 = (dest_68827 === null || dest_68827 === undefined) ? {m_type: ti_68829} : dest_68827;
			}
			else {
				result_69019 = (dest_68827 === null || dest_68827 === undefined) ? {} : dest_68827;
			}
			}
			nimCopyAux(result_69019, src_68828, ti_68829.node);
			break;
		case 24:
		case 4:
		case 27:
		case 16:
			      if (src_68828 === null) {
        result_69019 = null;
      }
      else {
        if (dest_68827 === null || dest_68827 === undefined) {
          dest_68827 = new Array(src_68828.length);
        }
        else {
          dest_68827.length = src_68828.length;
        }
        result_69019 = dest_68827;
        for (var i = 0; i < src_68828.length; ++i) {
          result_69019[i] = nimCopy(result_69019[i], src_68828[i], ti_68829.base);
        }
      }
    
			break;
		case 28:
			      if (src_68828 !== null) {
        result_69019 = src_68828.slice(0);
      }
    
			break;
		default: 
			result_69019 = src_68828;
			break;
		}

	return result_69019;

}

function arrayConstr(len_69086, value_69087, typ_69088) {
		    var result = new Array(len_69086);
    for (var i = 0; i < len_69086; ++i) result[i] = nimCopy(null, value_69087, typ_69088);
    return result;
  

	
}

function cstrToNimstr(c_67287) {
		  var ln = c_67287.length;
  var result = new Array(ln);
  var r = 0;
  for (var i = 0; i < ln; ++i) {
    var ch = c_67287.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_67287.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 toJSStr(s_67304) {
										var Tmp5;
						var Tmp7;

	var result_67305 = null;

		var res_67363 = new_seq_67336((s_67304 != null ? s_67304.length : 0));
		var i_67365 = 0;
		var j_67367 = 0;
		L1: do {
				L2: while (true) {
				if (!(i_67365 < (s_67304 != null ? s_67304.length : 0))) break L2;
					var c_67368 = s_67304[i_67365];
					if ((c_67368 < 128)) {
					res_67363[j_67367] = String.fromCharCode(c_67368);
					i_67365 += 1;
					}
					else {
						var helper_67391 = new_seq_67336(0);
						L3: do {
								L4: while (true) {
								if (!true) break L4;
									var code_67392 = c_67368.toString(16);
									if (((code_67392 != null ? code_67392.length : 0) == 1)) {
									if (helper_67391 != null) { helper_67391.push("%0"); } else { helper_67391 = ["%0"]; };
									}
									else {
									if (helper_67391 != null) { helper_67391.push("%"); } else { helper_67391 = ["%"]; };
									}
									
									if (helper_67391 != null) { helper_67391.push(code_67392); } else { helper_67391 = [code_67392]; };
									i_67365 += 1;
										if (((s_67304 != null ? s_67304.length : 0) <= i_67365)) Tmp5 = true; else {											Tmp5 = (s_67304[i_67365] < 128);										}									if (Tmp5) {
									break L3;
									}
									
									c_67368 = s_67304[i_67365];
								}
						} while(false);
++excHandler;
						Tmp7 = framePtr;
						try {
						res_67363[j_67367] = decodeURIComponent(helper_67391.join(""));
--excHandler;
} catch (EXC) {
 var prevJSError = lastJSError;
 lastJSError = EXC;
 --excHandler;
						framePtr = Tmp7;
						res_67363[j_67367] = helper_67391.join("");
						lastJSError = prevJSError;
						} finally {
						framePtr = Tmp7;
						}
					}
					
					j_67367 += 1;
				}
		} while(false);
		if (res_67363 === null) res_67363 = [];
               if (res_67363.length < j_67367) { for (var i=res_67363.length;i<j_67367;++i) res_67363.push(null); }
               else { res_67363.length = j_67367; };
		result_67305 = res_67363.join("");

	return result_67305;

}

function raiseException(e_65618, ename_65619) {
		e_65618.name = ename_65619;
		if ((excHandler == 0)) {
		unhandledException(e_65618);
		}
		
		e_65618.trace = nimCopy(null, raw_write_stack_trace_65468(), NTI44040);
		throw e_65618;

	
}

function addInt(a_67803, b_67804) {
		    var result = a_67803 + b_67804;
    if (result > 2147483647 || result < -2147483648) raiseOverflow();
    return result;
  

	
}

function chckIndx(i_69105, a_69106, b_69107) {
			var Tmp1;

	var result_69108 = 0;

	BeforeRet: do {
			if (!(a_69106 <= i_69105)) Tmp1 = false; else {				Tmp1 = (i_69105 <= b_69107);			}		if (Tmp1) {
		result_69108 = i_69105;
		break BeforeRet;
		}
		else {
		raiseIndexError(i_69105, a_69106, b_69107);
		}
		
	} while (false);

	return result_69108;

}

function subInt(a_67821, b_67822) {
		    var result = a_67821 - b_67822;
    if (result > 2147483647 || result < -2147483648) raiseOverflow();
    return result;
  

	
}
var ConstSet2 = setConstr([65, 90]);

function chckRange(i_69124, a_69125, b_69126) {
			var Tmp1;

	var result_69127 = 0;

	BeforeRet: do {
			if (!(a_69125 <= i_69124)) Tmp1 = false; else {				Tmp1 = (i_69124 <= b_69126);			}		if (Tmp1) {
		result_69127 = i_69124;
		break BeforeRet;
		}
		else {
		raiseRangeError();
		}
		
	} while (false);

	return result_69127;

}
var ConstSet3 = setConstr(95, 32, 46);
var ConstSet4 = setConstr(95, 32, 46);

function mulInt(a_67839, b_67840) {
		    var result = a_67839 * b_67840;
    if (result > 2147483647 || result < -2147483648) raiseOverflow();
    return result;
  

	
}
var ConstSet5 = setConstr([97, 122]);
var ConstSet6 = setConstr([65, 90], [97, 122]);
var ConstSet7 = setConstr([97, 122]);
var ConstSet8 = setConstr([65, 90]);

function nimMax(a_68221, b_68222) {
		var Tmp1;

	var result_68223 = 0;

	BeforeRet: do {
		if ((b_68222 <= a_68221)) {
		Tmp1 = a_68221;
		}
		else {
		Tmp1 = b_68222;
		}
		
		result_68223 = Tmp1;
		break BeforeRet;
	} while (false);

	return result_68223;

}

function nimMin(a_68203, b_68204) {
		var Tmp1;

	var result_68205 = 0;

	BeforeRet: do {
		if ((a_68203 <= b_68204)) {
		Tmp1 = a_68203;
		}
		else {
		Tmp1 = b_68204;
		}
		
		result_68205 = Tmp1;
		break BeforeRet;
	} while (false);

	return result_68205;

}
var nim_program_result = 0;
var global_raise_hook_62618 = [null];
var local_raise_hook_62623 = [null];
var out_of_mem_hook_62626 = [null];
  if (!Math.trunc) {
    Math.trunc = function(v) {
      v = +v;
      if (!isFinite(v)) return v;

      return (v - v % 1)   ||   (v < 0 ? -0 : v === 0 ? v : 0);
    };
  }
var alternative_206319 = [null];

function is_fat_pointer_68801(ti_68803) {
	var result_68804 = false;

	BeforeRet: do {
		result_68804 = !((ConstSet1[ti_68803.base.kind] != undefined));
		break BeforeRet;
	} while (false);

	return result_68804;

}

function nimCopyAux(dest_68832, src_68833, n_68835) {
		switch (n_68835.kind) {
		case 0:
			break;
		case 1:
			      dest_68832[n_68835.offset] = nimCopy(dest_68832[n_68835.offset], src_68833[n_68835.offset], n_68835.typ);
    
			break;
		case 2:
			    for (var i = 0; i < n_68835.sons.length; i++) {
      nimCopyAux(dest_68832, src_68833, n_68835.sons[i]);
    }
    
			break;
		case 3:
			      dest_68832[n_68835.offset] = nimCopy(dest_68832[n_68835.offset], src_68833[n_68835.offset], n_68835.typ);
      for (var i = 0; i < n_68835.sons.length; ++i) {
        nimCopyAux(dest_68832, src_68833, n_68835.sons[i][1]);
      }
    
			break;
		}

	
}

function add_62638(x_62641, x_62641_Idx, y_62642) {
		      if (x_62641[x_62641_Idx] === null) { x_62641[x_62641_Idx] = []; }
      var off = x_62641[x_62641_Idx].length;
      x_62641[x_62641_Idx].length += y_62642.length;
      for (var i = 0; i < y_62642.length; ++i) {
        x_62641[x_62641_Idx][off+i] = y_62642.charCodeAt(i);
      }
    

	
}

function aux_write_stack_trace_65151(f_65153) {
					var Tmp3;

	var result_65154 = [null];

		var it_65162 = f_65153;
		var i_65164 = 0;
		var total_65166 = 0;
		var temp_frames_65173 = arrayConstr(64, {Field0: null, Field1: 0}, NTI65156);
		L1: do {
				L2: while (true) {
					if (!!((it_65162 == null))) Tmp3 = false; else {						Tmp3 = (i_65164 <= 63);					}				if (!Tmp3) break L2;
					temp_frames_65173[i_65164].Field0 = it_65162.procname;
					temp_frames_65173[i_65164].Field1 = it_65162.line;
					i_65164 += 1;
					total_65166 += 1;
					it_65162 = it_65162.prev;
				}
		} while(false);
		L4: do {
				L5: while (true) {
				if (!!((it_65162 == null))) break L5;
					total_65166 += 1;
					it_65162 = it_65162.prev;
				}
		} while(false);
		result_65154[0] = nimCopy(null, [], NTI44040);
		if (!((total_65166 == i_65164))) {
		if (result_65154[0] != null) { result_65154[0] = (result_65154[0]).concat(makeNimstrLit("(")); } else { result_65154[0] = makeNimstrLit("("); };
		if (result_65154[0] != null) { result_65154[0] = (result_65154[0]).concat(cstrToNimstr(((total_65166 - i_65164))+"")); } else { result_65154[0] = cstrToNimstr(((total_65166 - i_65164))+"").slice(); };
		if (result_65154[0] != null) { result_65154[0] = (result_65154[0]).concat(makeNimstrLit(" calls omitted) ...\x0A")); } else { result_65154[0] = makeNimstrLit(" calls omitted) ...\x0A"); };
		}
		
		L6: do {
			var j_65421 = 0;
			var colontmp__206466 = 0;
			colontmp__206466 = (i_65164 - 1);
			var res_206471 = colontmp__206466;
			L7: do {
					L8: while (true) {
					if (!(0 <= res_206471)) break L8;
						j_65421 = res_206471;
						add_62638(result_65154, 0, temp_frames_65173[j_65421].Field0);
						if ((0 < temp_frames_65173[j_65421].Field1)) {
						if (result_65154[0] != null) { result_65154[0] = (result_65154[0]).concat(makeNimstrLit(", line: ")); } else { result_65154[0] = makeNimstrLit(", line: "); };
						if (result_65154[0] != null) { result_65154[0] = (result_65154[0]).concat(cstrToNimstr((temp_frames_65173[j_65421].Field1)+"")); } else { result_65154[0] = cstrToNimstr((temp_frames_65173[j_65421].Field1)+"").slice(); };
						}
						
						if (result_65154[0] != null) { result_65154[0] = (result_65154[0]).concat(makeNimstrLit("\x0A")); } else { result_65154[0] = makeNimstrLit("\x0A"); };
						res_206471 -= 1;
					}
			} while(false);
		} while(false);

	return result_65154[0];

}

function raw_write_stack_trace_65468() {
	var result_65470 = null;

		if (!((framePtr == null))) {
		result_65470 = nimCopy(null, (makeNimstrLit("Traceback (most recent call last)\x0A") || []).concat(aux_write_stack_trace_65151(framePtr) || []), NTI44040);
		}
		else {
			result_65470 = nimCopy(null, makeNimstrLit("No stack traceback available\x0A"), NTI44040);
		}
		

	return result_65470;

}

function new_seq_67336(len_67339) {
	var result_67341 = null;

	var F={procname:"newSeq.newSeq",prev:framePtr,filename:"system.nim",line:0};
	framePtr = F;
		F.line = 997;
		result_67341 = new Array(len_67339); for (var i=0;i<len_67339;++i) {result_67341[i]=null;}	framePtr = F.prev;

	return result_67341;

}

function unhandledException(e_65529) {
		var buf_65530 = [[]];
		if (!(((e_65529.message != null ? e_65529.message.length : 0) == 0))) {
		if (buf_65530[0] != null) { buf_65530[0] = (buf_65530[0]).concat(makeNimstrLit("Error: unhandled exception: ")); } else { buf_65530[0] = makeNimstrLit("Error: unhandled exception: "); };
		if (buf_65530[0] != null) { buf_65530[0] = (buf_65530[0]).concat(e_65529.message); } else { buf_65530[0] = e_65529.message.slice(); };
		}
		else {
		if (buf_65530[0] != null) { buf_65530[0] = (buf_65530[0]).concat(makeNimstrLit("Error: unhandled exception")); } else { buf_65530[0] = makeNimstrLit("Error: unhandled exception"); };
		}
		
		if (buf_65530[0] != null) { buf_65530[0] = (buf_65530[0]).concat(makeNimstrLit(" [")); } else { buf_65530[0] = makeNimstrLit(" ["); };
		add_62638(buf_65530, 0, e_65529.name);
		if (buf_65530[0] != null) { buf_65530[0] = (buf_65530[0]).concat(makeNimstrLit("]\x0A")); } else { buf_65530[0] = makeNimstrLit("]\x0A"); };
		if (buf_65530[0] != null) { buf_65530[0] = (buf_65530[0]).concat(raw_write_stack_trace_65468()); } else { buf_65530[0] = raw_write_stack_trace_65468().slice(); };
		var cbuf_65601 = toJSStr(buf_65530[0]);
		framePtr = null;
		  if (typeof(Error) !== "undefined") {
    throw new Error(cbuf_65601);
  }
  else {
    throw cbuf_65601;
  }
  

	
}

function raiseOverflow() {
		var eHEX60gensym66058_66203 = null;
		eHEX60gensym66058_66203 = {m_type: NTI47446, parent: null, name: null, message: null, trace: null, raiseId: 0, up: null};
		eHEX60gensym66058_66203.message = nimCopy(null, makeNimstrLit("over- or underflow"), NTI44040);
		eHEX60gensym66058_66203.parent = null;
		raiseException(eHEX60gensym66058_66203, "OverflowError");

	
}

function is_whitespace_205654(text_205656) {
		     return !/[^\s]/.test(text_205656);
  

	
}

function is_whitespace_205671(x_205673) {
		var Tmp1;
		var Tmp2;

	var result_205674 = false;

	var F={procname:"dochack.isWhitespace",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		F.line = 134;
		if (!(x_205673.nodeName == "#text")) Tmp2 = false; else {			Tmp2 = is_whitespace_205654(x_205673.textContent);		}		if (Tmp2) Tmp1 = true; else {			Tmp1 = (x_205673.nodeName == "#comment");		}		result_205674 = Tmp1;
	framePtr = F.prev;

	return result_205674;

}

function raiseIndexError(i_66655, a_66656, b_66657) {
		var Tmp1;

		var eHEX60gensym66802_67003 = null;
		eHEX60gensym66802_67003 = {m_type: NTI47458, parent: null, name: null, message: null, trace: null, raiseId: 0, up: null};
		if ((b_66657 < a_66656)) {
		Tmp1 = makeNimstrLit("index out of bounds, the container is empty");
		}
		else {
		Tmp1 = (makeNimstrLit("index ") || []).concat(cstrToNimstr((i_66655)+"") || [],makeNimstrLit(" not in ") || [],cstrToNimstr((a_66656)+"") || [],makeNimstrLit(" .. ") || [],cstrToNimstr((b_66657)+"") || []);
		}
		
		eHEX60gensym66802_67003.message = nimCopy(null, Tmp1, NTI44040);
		eHEX60gensym66802_67003.parent = null;
		raiseException(eHEX60gensym66802_67003, "IndexError");

	
}

function to_toc_205688(x_205690, father_205691) {
								var Tmp5;
						var Tmp6;
						var Tmp7;
						var Tmp8;
			var Tmp15;

	var F={procname:"dochack.toToc",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		if ((x_205690.nodeName == "UL")) {
		F.line = 139;
		var f_205712 = {heading: null, kids: [], sortId: (father_205691.kids != null ? father_205691.kids.length : 0), doSort: false};
		F.line = 140;
		var i_205714 = 0;
		L1: do {
			F.line = 141;
				L2: while (true) {
				if (!(i_205714 < x_205690.childNodes.length)) break L2;
					F.line = 142;
					var nxt_205715 = addInt(i_205714, 1);
					L3: do {
						F.line = 143;
							L4: while (true) {
								if (!(nxt_205715 < x_205690.childNodes.length)) Tmp5 = false; else {									Tmp5 = is_whitespace_205671(x_205690.childNodes[nxt_205715]);								}							if (!Tmp5) break L4;
								F.line = 144;
								nxt_205715 = addInt(nxt_205715, 1);
							}
					} while(false);
						if (!(nxt_205715 < x_205690.childNodes.length)) Tmp8 = false; else {							Tmp8 = (x_205690.childNodes[i_205714].nodeName == "LI");						}						if (!Tmp8) Tmp7 = false; else {							Tmp7 = (x_205690.childNodes[i_205714].childNodes.length == 1);						}						if (!Tmp7) Tmp6 = false; else {							Tmp6 = (x_205690.childNodes[nxt_205715].nodeName == "UL");						}					if (Tmp6) {
					F.line = 147;
					var e_205742 = {heading: x_205690.childNodes[i_205714].childNodes[0], kids: [], sortId: (f_205712.kids != null ? f_205712.kids.length : 0), doSort: false};
					F.line = 148;
					var it_205743 = x_205690.childNodes[nxt_205715];
					L9: do {
						F.line = 149;
						var j_205751 = 0;
						F.line = 2737;
						var colontmp__206442 = 0;
						F.line = 149;
						colontmp__206442 = it_205743.childNodes.length;
						F.line = 2739;
						var i_206443 = 0;
						L10: do {
							F.line = 2740;
								L11: while (true) {
								if (!(i_206443 < colontmp__206442)) break L11;
									F.line = 149;
									j_205751 = i_206443;
									F.line = 150;
									to_toc_205688(it_205743.childNodes[j_205751], e_205742);
									F.line = 2742;
									i_206443 = addInt(i_206443, 1);
								}
						} while(false);
					} while(false);
					F.line = 151;
					if (f_205712.kids != null) { f_205712.kids.push(e_205742); } else { f_205712.kids = [e_205742]; };
					F.line = 152;
					i_205714 = addInt(nxt_205715, 1);
					}
					else {
						F.line = 154;
						to_toc_205688(x_205690.childNodes[i_205714], f_205712);
						F.line = 155;
						i_205714 = addInt(i_205714, 1);
					}
					
				}
		} while(false);
		F.line = 156;
		if (father_205691.kids != null) { father_205691.kids.push(f_205712); } else { father_205691.kids = [f_205712]; };
		}
		else {
		if (is_whitespace_205671(x_205690)) {
		}
		else {
		if ((x_205690.nodeName == "LI")) {
		F.line = 160;
		var idx_205788 = [];
		L12: do {
			F.line = 161;
			var i_205796 = 0;
			F.line = 2737;
			var colontmp__206447 = 0;
			F.line = 161;
			colontmp__206447 = x_205690.childNodes.length;
			F.line = 2739;
			var i_206448 = 0;
			L13: do {
				F.line = 2740;
					L14: while (true) {
					if (!(i_206448 < colontmp__206447)) break L14;
						F.line = 161;
						i_205796 = i_206448;
						if (!(is_whitespace_205671(x_205690.childNodes[i_205796]))) {
						F.line = 162;
						if (idx_205788 != null) { idx_205788.push(i_205796); } else { idx_205788 = [i_205796]; };
						}
						
						F.line = 2742;
						i_206448 = addInt(i_206448, 1);
					}
			} while(false);
		} while(false);
			if (!((idx_205788 != null ? idx_205788.length : 0) == 2)) Tmp15 = false; else {				Tmp15 = (x_205690.childNodes[idx_205788[chckIndx(1, 0, (idx_205788 != null ? idx_205788.length : 0)+0-1)-0]].nodeName == "UL");			}		if (Tmp15) {
		F.line = 164;
		var e_205829 = {heading: x_205690.childNodes[idx_205788[chckIndx(0, 0, (idx_205788 != null ? idx_205788.length : 0)+0-1)-0]], kids: [], sortId: (father_205691.kids != null ? father_205691.kids.length : 0), doSort: false};
		F.line = 166;
		var it_205830 = x_205690.childNodes[idx_205788[chckIndx(1, 0, (idx_205788 != null ? idx_205788.length : 0)+0-1)-0]];
		L16: do {
			F.line = 167;
			var j_205838 = 0;
			F.line = 2737;
			var colontmp__206453 = 0;
			F.line = 167;
			colontmp__206453 = it_205830.childNodes.length;
			F.line = 2739;
			var i_206454 = 0;
			L17: do {
				F.line = 2740;
					L18: while (true) {
					if (!(i_206454 < colontmp__206453)) break L18;
						F.line = 167;
						j_205838 = i_206454;
						F.line = 168;
						to_toc_205688(it_205830.childNodes[j_205838], e_205829);
						F.line = 2742;
						i_206454 = addInt(i_206454, 1);
					}
			} while(false);
		} while(false);
		F.line = 169;
		if (father_205691.kids != null) { father_205691.kids.push(e_205829); } else { father_205691.kids = [e_205829]; };
		}
		else {
			L19: do {
				F.line = 171;
				var i_205853 = 0;
				F.line = 2737;
				var colontmp__206458 = 0;
				F.line = 171;
				colontmp__206458 = x_205690.childNodes.length;
				F.line = 2739;
				var i_206459 = 0;
				L20: do {
					F.line = 2740;
						L21: while (true) {
						if (!(i_206459 < colontmp__206458)) break L21;
							F.line = 171;
							i_205853 = i_206459;
							F.line = 172;
							to_toc_205688(x_205690.childNodes[i_205853], father_205691);
							F.line = 2742;
							i_206459 = addInt(i_206459, 1);
						}
				} while(false);
			} while(false);
		}
		
		}
		else {
			F.line = 174;
		if (father_205691.kids != null) { father_205691.kids.push({heading: x_205690, kids: [], sortId: (father_205691.kids != null ? father_205691.kids.length : 0), doSort: false}); } else { father_205691.kids = [{heading: x_205690, kids: [], sortId: (father_205691.kids != null ? father_205691.kids.length : 0), doSort: false}]; };
		}
		}}
	framePtr = F.prev;

	
}

function extract_items_205339(x_205341, heading_205342, items_205345, items_205345_Idx) {
			var Tmp1;

	var F={procname:"dochack.extractItems",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
	BeforeRet: do {
		if ((x_205341 == null)) {
		F.line = 81;
		break BeforeRet;
		}
		
			if (!!((x_205341.heading == null))) Tmp1 = false; else {				Tmp1 = (x_205341.heading.textContent == heading_205342);			}		if (Tmp1) {
		L2: do {
			F.line = 83;
			var i_205374 = 0;
			F.line = 2737;
			var colontmp__206487 = 0;
			F.line = 83;
			colontmp__206487 = (x_205341.kids != null ? x_205341.kids.length : 0);
			F.line = 2739;
			var i_206488 = 0;
			L3: do {
				F.line = 2740;
					L4: while (true) {
					if (!(i_206488 < colontmp__206487)) break L4;
						F.line = 83;
						i_205374 = i_206488;
						F.line = 84;
						if (items_205345[items_205345_Idx] != null) { items_205345[items_205345_Idx].push(x_205341.kids[chckIndx(i_205374, 0, (x_205341.kids != null ? x_205341.kids.length : 0)+0-1)-0].heading); } else { items_205345[items_205345_Idx] = [x_205341.kids[chckIndx(i_205374, 0, (x_205341.kids != null ? x_205341.kids.length : 0)+0-1)-0].heading]; };
						F.line = 2742;
						i_206488 = addInt(i_206488, 1);
					}
			} while(false);
		} while(false);
		}
		else {
			L5: do {
				F.line = 86;
				var i_205394 = 0;
				F.line = 2737;
				var colontmp__206492 = 0;
				F.line = 86;
				colontmp__206492 = (x_205341.kids != null ? x_205341.kids.length : 0);
				F.line = 2739;
				var i_206493 = 0;
				L6: do {
					F.line = 2740;
						L7: while (true) {
						if (!(i_206493 < colontmp__206492)) break L7;
							F.line = 86;
							i_205394 = i_206493;
							F.line = 87;
							var it_205395 = x_205341.kids[chckIndx(i_205394, 0, (x_205341.kids != null ? x_205341.kids.length : 0)+0-1)-0];
							F.line = 88;
							extract_items_205339(it_205395, heading_205342, items_205345, items_205345_Idx);
							F.line = 2742;
							i_206493 = addInt(i_206493, 1);
						}
				} while(false);
			} while(false);
		}
		
	} while (false);
	framePtr = F.prev;

	
}

function tree_205020(tag_205022, kids_205024) {
	var result_205025 = null;

	var F={procname:"dochack.tree",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		F.line = 11;
		result_205025 = document.createElement(toJSStr(tag_205022));
		L1: do {
			F.line = 12;
			var k_205056 = null;
			F.line = 3;
			var i_206510 = 0;
			L2: do {
				F.line = 4;
					L3: while (true) {
					if (!(i_206510 < (kids_205024 != null ? kids_205024.length : 0))) break L3;
						F.line = 12;
						k_205056 = kids_205024[chckIndx(i_206510, 0, (kids_205024 != null ? kids_205024.length : 0)+0-1)-0];
						F.line = 13;
						result_205025.appendChild(k_205056);
						F.line = 6;
						i_206510 = addInt(i_206510, 1);
					}
			} while(false);
		} while(false);
	framePtr = F.prev;

	return result_205025;

}

function text_205152(s_205154) {
	var result_205155 = null;

	var F={procname:"dochack.text",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		F.line = 27;
		result_205155 = document.createTextNode(s_205154);
	framePtr = F.prev;

	return result_205155;

}

function sys_fatal_58862(message_58866) {
	var F={procname:"sysFatal.sysFatal",prev:framePtr,filename:"fatal.nim",line:0};
	framePtr = F;
		F.line = 34;
		var e_59003 = null;
		F.line = 37;
		e_59003 = {m_type: NTI47450, parent: null, name: null, message: null, trace: null, raiseId: 0, up: null};
		F.line = 38;
		e_59003.message = nimCopy(null, message_58866, NTI44040);
		F.line = 39;
		raiseException(e_59003, "AssertionError");
	framePtr = F.prev;

	
}

function raise_assert_58858(msg_58860) {
	var F={procname:"assertions.raiseAssert",prev:framePtr,filename:"assertions.nim",line:0};
	framePtr = F;
		F.line = 20;
		sys_fatal_58862(msg_58860);
	framePtr = F.prev;

	
}

function failed_assert_impl_59066(msg_59068) {
	var F={procname:"assertions.failedAssertImpl",prev:framePtr,filename:"assertions.nim",line:0};
	framePtr = F;
		F.line = 27;
		raise_assert_58858(msg_59068);
	framePtr = F.prev;

	
}

function uncovered_205950(x_205952) {
			var Tmp1;
		var Tmp2;

	var result_205953 = null;

	var F={procname:"dochack.uncovered",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
	BeforeRet: do {
			if (!((x_205952.kids != null ? x_205952.kids.length : 0) == 0)) Tmp1 = false; else {				Tmp1 = !((x_205952.heading == null));			}		if (Tmp1) {
		F.line = 194;
		if (!(x_205952.heading.hasOwnProperty('__karaxMarker__'))) {
		Tmp2 = x_205952;
		}
		else {
		Tmp2 = null;
		}
		
		result_205953 = Tmp2;
		break BeforeRet;
		}
		
		F.line = 195;
		result_205953 = {heading: x_205952.heading, kids: [], sortId: x_205952.sortId, doSort: x_205952.doSort};
		L3: do {
			F.line = 197;
			var i_205994 = 0;
			F.line = 2737;
			var colontmp__206522 = 0;
			F.line = 197;
			colontmp__206522 = (x_205952.kids != null ? x_205952.kids.length : 0);
			F.line = 2739;
			var i_206523 = 0;
			L4: do {
				F.line = 2740;
					L5: while (true) {
					if (!(i_206523 < colontmp__206522)) break L5;
						F.line = 197;
						i_205994 = i_206523;
						F.line = 198;
						var y_205995 = uncovered_205950(x_205952.kids[chckIndx(i_205994, 0, (x_205952.kids != null ? x_205952.kids.length : 0)+0-1)-0]);
						if (!((y_205995 == null))) {
						F.line = 199;
						if (result_205953.kids != null) { result_205953.kids.push(y_205995); } else { result_205953.kids = [y_205995]; };
						}
						
						F.line = 2742;
						i_206523 = addInt(i_206523, 1);
					}
			} while(false);
		} while(false);
		if (((result_205953.kids != null ? result_205953.kids.length : 0) == 0)) {
		F.line = 200;
		result_205953 = null;
		}
		
	} while (false);
	framePtr = F.prev;

	return result_205953;

}

function merge_tocs_206029(orig_206031, news_206032) {
	var result_206033 = null;

	var F={procname:"dochack.mergeTocs",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		F.line = 203;
		result_206033 = uncovered_205950(orig_206031);
		if ((result_206033 == null)) {
		F.line = 205;
		result_206033 = news_206032;
		}
		else {
			L1: do {
				F.line = 207;
				var i_206054 = 0;
				F.line = 2737;
				var colontmp__206516 = 0;
				F.line = 207;
				colontmp__206516 = (news_206032.kids != null ? news_206032.kids.length : 0);
				F.line = 2739;
				var i_206517 = 0;
				L2: do {
					F.line = 2740;
						L3: while (true) {
						if (!(i_206517 < colontmp__206516)) break L3;
							F.line = 207;
							i_206054 = i_206517;
							F.line = 208;
							if (result_206033.kids != null) { result_206033.kids.push(news_206032.kids[chckIndx(i_206054, 0, (news_206032.kids != null ? news_206032.kids.length : 0)+0-1)-0]); } else { result_206033.kids = [news_206032.kids[chckIndx(i_206054, 0, (news_206032.kids != null ? news_206032.kids.length : 0)+0-1)-0]]; };
							F.line = 2742;
							i_206517 = addInt(i_206517, 1);
						}
				} while(false);
			} while(false);
		}
		
	framePtr = F.prev;

	return result_206033;

}

function build_toc_206075(orig_206077, types_206079, procs_206080) {
	var result_206081 = null;

	var F={procname:"dochack.buildToc",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		F.line = 211;
		var new_stuff_206097 = {heading: null, kids: [], doSort: true, sortId: 0};
		L1: do {
			F.line = 212;
			var t_206214 = null;
			F.line = 184;
			var i_206505 = 0;
			F.line = 185;
			var l_206506 = (types_206079 != null ? types_206079.length : 0);
			L2: do {
				F.line = 186;
					L3: while (true) {
					if (!(i_206505 < l_206506)) break L3;
						F.line = 212;
						t_206214 = types_206079[chckIndx(i_206505, 0, (types_206079 != null ? types_206079.length : 0)+0-1)-0];
						F.line = 213;
						var c_206230 = {heading: t_206214.cloneNode(true), kids: [], doSort: true, sortId: 0};
						F.line = 214;
						t_206214.__karaxMarker__ = true;
						L4: do {
							F.line = 215;
							var p_206237 = null;
							F.line = 184;
							var i_206502 = 0;
							F.line = 185;
							var l_206503 = (procs_206080 != null ? procs_206080.length : 0);
							L5: do {
								F.line = 186;
									L6: while (true) {
									if (!(i_206502 < l_206503)) break L6;
										F.line = 215;
										p_206237 = procs_206080[chckIndx(i_206502, 0, (procs_206080 != null ? procs_206080.length : 0)+0-1)-0];
										if (!(p_206237.hasOwnProperty('__karaxMarker__'))) {
										F.line = 217;
										var xx_206238 = p_206237.parentNode.getElementsByClassName("attachedType");
										if ((((xx_206238 != null ? xx_206238.length : 0) == 1) && (xx_206238[chckIndx(0, 0, (xx_206238 != null ? xx_206238.length : 0)+0-1)-0].textContent == t_206214.textContent))) {
										F.line = 220;
										var q_206246 = tree_205020(makeNimstrLit("A"), [text_205152(p_206237.title)]);
										F.line = 221;
										q_206246.setAttribute("href", p_206237.getAttribute("href"));
										F.line = 222;
										if (c_206230.kids != null) { c_206230.kids.push({heading: q_206246, kids: [], sortId: 0, doSort: false}); } else { c_206230.kids = [{heading: q_206246, kids: [], sortId: 0, doSort: false}]; };
										F.line = 223;
										p_206237.__karaxMarker__ = true;
										}
										
										}
										
										F.line = 188;
										i_206502 = addInt(i_206502, 1);
										if (!(((procs_206080 != null ? procs_206080.length : 0) == l_206503))) {
										F.line = 189;
										failed_assert_impl_59066(makeNimstrLit("/Users/travis/build/nim-lang/nightlies/nim/c8998c498f5e2a0874846eb31309e1d1630faca6/lib/system/iterators.nim(189, 11) `len(a) == L` the length of the seq changed while iterating over it"));
										}
										
									}
							} while(false);
						} while(false);
						F.line = 224;
						if (new_stuff_206097.kids != null) { new_stuff_206097.kids.push(c_206230); } else { new_stuff_206097.kids = [c_206230]; };
						F.line = 188;
						i_206505 = addInt(i_206505, 1);
						if (!(((types_206079 != null ? types_206079.length : 0) == l_206506))) {
						F.line = 189;
						failed_assert_impl_59066(makeNimstrLit("/Users/travis/build/nim-lang/nightlies/nim/c8998c498f5e2a0874846eb31309e1d1630faca6/lib/system/iterators.nim(189, 11) `len(a) == L` the length of the seq changed while iterating over it"));
						}
						
					}
			} while(false);
		} while(false);
		F.line = 225;
		result_206081 = merge_tocs_206029(orig_206077, new_stuff_206097);
	framePtr = F.prev;

	return result_206081;

}

function add_205085(parent_205087, kid_205088) {
			var Tmp1;
				var Tmp2;

	var F={procname:"dochack.add",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
			if (!(parent_205087.nodeName == "TR")) Tmp1 = false; else {				if ((kid_205088.nodeName == "TD")) Tmp2 = true; else {					Tmp2 = (kid_205088.nodeName == "TH");				}				Tmp1 = Tmp2;			}		if (Tmp1) {
		F.line = 18;
		var k_205089 = document.createElement("TD");
		F.line = 19;
		k_205089.appendChild(kid_205088);
		F.line = 20;
		parent_205087.appendChild(k_205089);
		}
		else {
			F.line = 22;
		parent_205087.appendChild(kid_205088);
		}
		
	framePtr = F.prev;

	
}

function set_class_205103(e_205105, value_205106) {
	var F={procname:"dochack.setClass",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		F.line = 25;
		e_205105.setAttribute("class", toJSStr(value_205106));
	framePtr = F.prev;

	
}

function to_html_205424(x_205426, is_root_205427) {
			var Tmp1;

		function HEX3Aanonymous_205467(a_205469, b_205470) {
					var Tmp1;

			var result_205471 = 0;

			var F={procname:"toHtml.:anonymous",prev:framePtr,filename:"dochack.nim",line:0};
			framePtr = F;
			BeforeRet: do {
					if (!!((a_205469.heading == null))) Tmp1 = false; else {						Tmp1 = !((b_205470.heading == null));					}				if (Tmp1) {
				F.line = 106;
				var x_205488 = a_205469.heading.textContent;
				F.line = 107;
				var y_205489 = b_205470.heading.textContent;
				if ((x_205488 < y_205489)) {
				F.line = 108;
				result_205471 = -1;
				break BeforeRet;
				}
				
				if ((y_205489 < x_205488)) {
				F.line = 109;
				result_205471 = 1;
				break BeforeRet;
				}
				
				F.line = 110;
				result_205471 = 0;
				break BeforeRet;
				}
				else {
					F.line = 113;
					result_205471 = subInt(a_205469.sortId, b_205470.sortId);
					break BeforeRet;
				}
				
			} while (false);
			framePtr = F.prev;

			return result_205471;

		}

	var result_205428 = null;

	var F={procname:"dochack.toHtml",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
	BeforeRet: do {
		if ((x_205426 == null)) {
		F.line = 91;
		result_205428 = null;
		break BeforeRet;
		}
		
		if (((x_205426.kids != null ? x_205426.kids.length : 0) == 0)) {
		if ((x_205426.heading == null)) {
		F.line = 93;
		result_205428 = null;
		break BeforeRet;
		}
		
		F.line = 94;
		result_205428 = x_205426.heading.cloneNode(true);
		break BeforeRet;
		}
		
		F.line = 95;
		result_205428 = tree_205020(makeNimstrLit("DIV"), []);
			if (!!((x_205426.heading == null))) Tmp1 = false; else {				Tmp1 = !(x_205426.heading.hasOwnProperty('__karaxMarker__'));			}		if (Tmp1) {
		F.line = 97;
		add_205085(result_205428, x_205426.heading.cloneNode(true));
		}
		
		F.line = 98;
		var ul_205464 = tree_205020(makeNimstrLit("UL"), []);
		if (is_root_205427) {
		F.line = 100;
		set_class_205103(ul_205464, makeNimstrLit("simple simple-toc"));
		}
		else {
			F.line = 102;
		set_class_205103(ul_205464, makeNimstrLit("simple"));
		}
		
		if (x_205426.doSort) {
		F.line = 104;
		x_205426.kids.sort(HEX3Aanonymous_205467);
		}
		
		L2: do {
			F.line = 115;
			var k_205614 = null;
			F.line = 182;
			var colontmp__206529 = null;
			F.line = 115;
			colontmp__206529 = x_205426.kids;
			F.line = 184;
			var i_206531 = 0;
			F.line = 185;
			var l_206532 = (colontmp__206529 != null ? colontmp__206529.length : 0);
			L3: do {
				F.line = 186;
					L4: while (true) {
					if (!(i_206531 < l_206532)) break L4;
						F.line = 115;
						k_205614 = colontmp__206529[chckIndx(i_206531, 0, (colontmp__206529 != null ? colontmp__206529.length : 0)+0-1)-0];
						F.line = 116;
						var y_205615 = to_html_205424(k_205614, false);
						if (!((y_205615 == null))) {
						F.line = 118;
						add_205085(ul_205464, tree_205020(makeNimstrLit("LI"), [y_205615]));
						}
						
						F.line = 188;
						i_206531 = addInt(i_206531, 1);
						if (!(((colontmp__206529 != null ? colontmp__206529.length : 0) == l_206532))) {
						F.line = 189;
						failed_assert_impl_59066(makeNimstrLit("/Users/travis/build/nim-lang/nightlies/nim/c8998c498f5e2a0874846eb31309e1d1630faca6/lib/system/iterators.nim(189, 11) `len(a) == L` the length of the seq changed while iterating over it"));
						}
						
					}
			} while(false);
		} while(false);
		if (!((ul_205464.childNodes.length == 0))) {
		F.line = 119;
		add_205085(result_205428, ul_205464);
		}
		
		if ((result_205428.childNodes.length == 0)) {
		F.line = 120;
		result_205428 = null;
		}
		
	} while (false);
	framePtr = F.prev;

	return result_205428;

}

function replace_by_id_205172(id_205174, new_tree_205175) {
	var F={procname:"dochack.replaceById",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		F.line = 32;
		var x_205176 = document.getElementById(id_205174);
		F.line = 33;
		x_205176.parentNode.replaceChild(new_tree_205175, x_205176);
		F.line = 34;
		new_tree_205175.id = id_205174;
	framePtr = F.prev;

	
}

function togglevis_206333(d_206335) {
	var F={procname:"dochack.togglevis",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		F.line = 230;
		    if (d_206335.style.display == 'none')
      d_206335.style.display = 'inline';
    else
      d_206335.style.display = 'none';
  
	framePtr = F.prev;

	
}

function groupBy(value_206351) {
	var F={procname:"dochack.groupBy",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		F.line = 238;
		var toc_206352 = document.getElementById("toc-list");
		if ((alternative_206319[0] == null)) {
		F.line = 240;
		var tt_206373 = {heading: null, kids: [], sortId: 0, doSort: false};
		F.line = 241;
		to_toc_205688(toc_206352, tt_206373);
		F.line = 242;
		tt_206373 = tt_206373.kids[chckIndx(0, 0, (tt_206373.kids != null ? tt_206373.kids.length : 0)+0-1)-0];
		F.line = 244;
		var types_206390 = [[]];
		F.line = 245;
		var procs_206407 = [[]];
		F.line = 247;
		extract_items_205339(tt_206373, "Types", types_206390, 0);
		F.line = 248;
		extract_items_205339(tt_206373, "Procs", procs_206407, 0);
		F.line = 249;
		extract_items_205339(tt_206373, "Converters", procs_206407, 0);
		F.line = 250;
		extract_items_205339(tt_206373, "Methods", procs_206407, 0);
		F.line = 251;
		extract_items_205339(tt_206373, "Templates", procs_206407, 0);
		F.line = 252;
		extract_items_205339(tt_206373, "Macros", procs_206407, 0);
		F.line = 253;
		extract_items_205339(tt_206373, "Iterators", procs_206407, 0);
		F.line = 255;
		var ntoc_206415 = build_toc_206075(tt_206373, types_206390[0], procs_206407[0]);
		F.line = 256;
		var x_206416 = to_html_205424(ntoc_206415, true);
		F.line = 257;
		alternative_206319[0] = tree_205020(makeNimstrLit("DIV"), [x_206416]);
		}
		
		if ((value_206351 == "type")) {
		F.line = 259;
		replace_by_id_205172("tocRoot", alternative_206319[0]);
		}
		else {
			F.line = 261;
		replace_by_id_205172("tocRoot", tree_205020(makeNimstrLit("DIV"), []));
		}
		
		F.line = 262;
		togglevis_206333(document.getElementById("toc-list"));
	framePtr = F.prev;

	
}
var db_206535 = [null];
var contents_206537 = [null];
var oldtoc_206961 = [null];
var timer_206962 = [null];

function raiseRangeError() {
		var eHEX60gensym66457_66603 = null;
		eHEX60gensym66457_66603 = {m_type: NTI47462, parent: null, name: null, message: null, trace: null, raiseId: 0, up: null};
		eHEX60gensym66457_66603.message = nimCopy(null, makeNimstrLit("value out of range"), NTI44040);
		eHEX60gensym66457_66603.parent = null;
		raiseException(eHEX60gensym66457_66603, "RangeError");

	
}

function nsuToLowerAsciiChar(c_193380) {
	var result_193381 = 0;

	var F={procname:"strutils.toLowerAscii",prev:framePtr,filename:"strutils.nim",line:0};
	framePtr = F;
		if ((ConstSet2[c_193380] != undefined)) {
		F.line = 222;
		result_193381 = chckRange(addInt(c_193380, 32), 0, 255);
		}
		else {
			F.line = 224;
			result_193381 = c_193380;
		}
		
	framePtr = F.prev;

	return result_193381;

}

function fuzzy_match_204070(pattern_204072, str_204073) {
							var Tmp4;
							var Tmp5;
								var Tmp6;

	var result_204077 = {Field0: 0, Field1: false};

	var F={procname:"fuzzysearch.fuzzyMatch",prev:framePtr,filename:"fuzzysearch.nim",line:0};
	framePtr = F;
		F.line = 37;
		var score_state_204078 = -100;
		F.line = 38;
		var header_matched_204079 = false;
		F.line = 39;
		var unmatched_leading_char_count_204081 = 0;
		F.line = 40;
		var consecutive_match_count_204083 = 0;
		F.line = 41;
		var str_index_204085 = 0;
		F.line = 42;
		var pat_index_204087 = 0;
		F.line = 43;
		var score_204089 = 0;
		L1: do {
			F.line = 49;
				L2: while (true) {
				if (!((str_index_204085 < (str_204073 != null ? str_204073.length : 0)) && (pat_index_204087 < (pattern_204072 != null ? pattern_204072.length : 0)))) break L2;
					L3: do {
						F.line = 51;
						var pattern_char_204095 = nsuToLowerAsciiChar(pattern_204072.charCodeAt(chckIndx(pat_index_204087, 0, (pattern_204072 != null ? pattern_204072.length : 0)+0-1)-0));
						F.line = 52;
						var str_char_204096 = nsuToLowerAsciiChar(str_204073.charCodeAt(chckIndx(str_index_204085, 0, (str_204073 != null ? str_204073.length : 0)+0-1)-0));
						if ((ConstSet3[pattern_char_204095] != undefined)) {
						F.line = 56;
						pat_index_204087 = addInt(pat_index_204087, 1);
						F.line = 57;
						break L3;
						}
						
						if ((ConstSet4[str_char_204096] != undefined)) {
						F.line = 59;
						str_index_204085 = addInt(str_index_204085, 1);
						F.line = 60;
						break L3;
						}
						
						if ((!(header_matched_204079) && (str_char_204096 == 58))) {
						F.line = 65;
						header_matched_204079 = true;
						F.line = 66;
						score_state_204078 = -100;
						F.line = 67;
						score_204089 = ((Math.floor((5.0000000000000000e-01 * score_204089)))|0);
						F.line = 68;
						pat_index_204087 = 0;
						F.line = 69;
						str_index_204085 = addInt(str_index_204085, 1);
						F.line = 70;
						break L3;
						}
						
						if ((str_char_204096 == pattern_char_204095)) {
						F.line = 73;
						switch (score_state_204078) {
						case -100:
						case 20:
							F.line = 75;
							score_state_204078 = 10;
							break;
						case 0:
							F.line = 78;
							score_state_204078 = 5;
							F.line = 78;
							score_204089 = addInt(score_204089, score_state_204078);
							break;
						case 10:
						case 5:
							F.line = 81;
							consecutive_match_count_204083 = addInt(consecutive_match_count_204083, 1);
							F.line = 82;
							score_state_204078 = 5;
							F.line = 83;
							score_204089 = addInt(score_204089, mulInt(5, consecutive_match_count_204083));
							if ((score_state_204078 == 10)) {
							F.line = 86;
							score_204089 = addInt(score_204089, 10);
							}
							
							F.line = 88;
							var on_boundary_204171 = (pat_index_204087 == (pattern_204072 != null ? (pattern_204072.length-1) : -1));
							if ((!(on_boundary_204171) && (str_index_204085 < (str_204073 != null ? (str_204073.length-1) : -1)))) {
							F.line = 91;
							var next_pattern_char_204172 = nsuToLowerAsciiChar(pattern_204072.charCodeAt(chckIndx(addInt(pat_index_204087, 1), 0, (pattern_204072 != null ? pattern_204072.length : 0)+0-1)-0));
							F.line = 92;
							var next_str_char_204173 = nsuToLowerAsciiChar(str_204073.charCodeAt(chckIndx(addInt(str_index_204085, 1), 0, (str_204073 != null ? str_204073.length : 0)+0-1)-0));
							F.line = 95;
							if (!!((ConstSet5[next_str_char_204173] != undefined))) Tmp4 = false; else {								Tmp4 = !((next_str_char_204173 == next_pattern_char_204172));							}							on_boundary_204171 = Tmp4;
							}
							
							if (on_boundary_204171) {
							F.line = 100;
							score_state_204078 = 20;
							F.line = 100;
							score_204089 = addInt(score_204089, score_state_204078);
							}
							
							break;
						case -1:
						case -3:
							F.line = 103;
							if (!((ConstSet6[str_204073.charCodeAt(chckIndx(subInt(str_index_204085, 1), 0, (str_204073 != null ? str_204073.length : 0)+0-1)-0)] != undefined))) Tmp5 = true; else {								if (!(ConstSet7[str_204073.charCodeAt(chckIndx(subInt(str_index_204085, 1), 0, (str_204073 != null ? str_204073.length : 0)+0-1)-0)] != undefined)) Tmp6 = false; else {									Tmp6 = (ConstSet8[str_204073.charCodeAt(chckIndx(str_index_204085, 0, (str_204073 != null ? str_204073.length : 0)+0-1)-0)] != undefined);								}								Tmp5 = Tmp6;							}							var is_leading_char_204211 = Tmp5;
							if (is_leading_char_204211) {
							F.line = 110;
							score_state_204078 = 10;
							}
							else {
								F.line = 114;
								score_state_204078 = 0;
								F.line = 114;
								score_204089 = addInt(score_204089, score_state_204078);
							}
							
							break;
						}
						F.line = 115;
						pat_index_204087 = addInt(pat_index_204087, 1);
						}
						else {
							F.line = 118;
							switch (score_state_204078) {
							case -100:
								F.line = 120;
								score_state_204078 = -3;
								F.line = 120;
								score_204089 = addInt(score_204089, score_state_204078);
								break;
							case 5:
								F.line = 123;
								score_state_204078 = -1;
								F.line = 123;
								score_204089 = addInt(score_204089, score_state_204078);
								F.line = 124;
								consecutive_match_count_204083 = 0;
								break;
							case -3:
								if ((unmatched_leading_char_count_204081 < 3)) {
								F.line = 128;
								score_state_204078 = -3;
								F.line = 128;
								score_204089 = addInt(score_204089, score_state_204078);
								}
								
								F.line = 129;
								unmatched_leading_char_count_204081 = addInt(unmatched_leading_char_count_204081, 1);
								break;
							default: 
								F.line = 132;
								score_state_204078 = -1;
								F.line = 132;
								score_204089 = addInt(score_204089, score_state_204078);
								break;
							}
						}
						
						F.line = 134;
						str_index_204085 = addInt(str_index_204085, 1);
					} while(false);
				}
		} while(false);
		F.line = 137;
		var colontmp__207067 = nimMax(0, score_204089);
		F.line = 138;
		var colontmp__207068 = (0 < score_204089);
		F.line = 136;
		nimCopy(result_204077, {Field0: colontmp__207067, Field1: colontmp__207068}, NTI204074);
	framePtr = F.prev;

	return result_204077;

}

function text_205120(s_205122) {
	var result_205123 = null;

	var F={procname:"dochack.text",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		F.line = 26;
		result_205123 = document.createTextNode(toJSStr(s_205122));
	framePtr = F.prev;

	return result_205123;

}

function dosearch_206554(value_206556) {

		function HEX3Aanonymous_206873(a_206882, b_206883) {
			var result_206887 = 0;

			var F={procname:"dosearch.:anonymous",prev:framePtr,filename:"dochack.nim",line:0};
			framePtr = F;
				F.line = 305;
				result_206887 = subInt(b_206883["Field1"], a_206882["Field1"]);
			framePtr = F.prev;

			return result_206887;

		}

	var result_206557 = null;

	var F={procname:"dochack.dosearch",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		if (((db_206535[0] != null ? db_206535[0].length : 0) == 0)) {
		F.line = 272;
		var stuff_206563 = null;
		F.line = 273;
		    var request = new XMLHttpRequest();
    request.open("GET", "theindex.html", false);
    request.send(null);

    var doc = document.implementation.createHTMLDocument("theindex");
    doc.documentElement.innerHTML = request.responseText;

    //parser=new DOMParser();
    //doc=parser.parseFromString("<html></html>", "text/html");

    stuff_206563 = doc.documentElement;
    
		F.line = 286;
		db_206535[0] = nimCopy(null, stuff_206563.getElementsByClassName("reference"), NTI88305);
		F.line = 287;
		contents_206537[0] = nimCopy(null, [], NTI206578);
		L1: do {
			F.line = 288;
			var ahref_206814 = null;
			F.line = 184;
			var i_207045 = 0;
			F.line = 185;
			var l_207046 = (db_206535[0] != null ? db_206535[0].length : 0);
			L2: do {
				F.line = 186;
					L3: while (true) {
					if (!(i_207045 < l_207046)) break L3;
						F.line = 288;
						ahref_206814 = db_206535[0][chckIndx(i_207045, 0, (db_206535[0] != null ? db_206535[0].length : 0)+0-1)-0];
						F.line = 289;
						if (contents_206537[0] != null) { contents_206537[0].push(ahref_206814.getAttribute("data-doc-search-tag")); } else { contents_206537[0] = [ahref_206814.getAttribute("data-doc-search-tag")]; };
						F.line = 188;
						i_207045 = addInt(i_207045, 1);
						if (!(((db_206535[0] != null ? db_206535[0].length : 0) == l_207046))) {
						F.line = 189;
						failed_assert_impl_59066(makeNimstrLit("/Users/travis/build/nim-lang/nightlies/nim/c8998c498f5e2a0874846eb31309e1d1630faca6/lib/system/iterators.nim(189, 11) `len(a) == L` the length of the seq changed while iterating over it"));
						}
						
					}
			} while(false);
		} while(false);
		}
		
		F.line = 290;
		var ul_206825 = tree_205020(makeNimstrLit("UL"), []);
		F.line = 291;
		result_206557 = tree_205020(makeNimstrLit("DIV"), []);
		F.line = 292;
		set_class_205103(result_206557, makeNimstrLit("search_results"));
		F.line = 293;
		var matches_206846 = [];
		L4: do {
			F.line = 294;
			var i_206859 = 0;
			F.line = 2737;
			var colontmp__207052 = 0;
			F.line = 294;
			colontmp__207052 = (db_206535[0] != null ? db_206535[0].length : 0);
			F.line = 2739;
			var i_207053 = 0;
			L5: do {
				F.line = 2740;
					L6: while (true) {
					if (!(i_207053 < colontmp__207052)) break L6;
						F.line = 294;
						i_206859 = i_207053;
						L7: do {
							F.line = 295;
							var c_206860 = contents_206537[0][chckIndx(i_206859, 0, (contents_206537[0] != null ? contents_206537[0].length : 0)+0-1)-0];
							if (((c_206860 == "Examples") || (c_206860 == "PEG construction"))) {
							F.line = 300;
							break L7;
							}
							
							F.line = 301;
							var colontmp__207062 = {Field0: 0, Field1: false};
							F.line = 301;
							var score_206861 = 0;
							F.line = 301;
							var matched_206862 = false;
							F.line = 301;
							nimCopy(colontmp__207062, fuzzy_match_204070(value_206556, c_206860), NTI204074);
							F.line = 301;
							score_206861 = colontmp__207062["Field0"];
							F.line = 301;
							matched_206862 = colontmp__207062["Field1"];
							if (matched_206862) {
							F.line = 303;
							if (matches_206846 != null) { matches_206846.push({Field0: db_206535[0][chckIndx(i_206859, 0, (db_206535[0] != null ? db_206535[0].length : 0)+0-1)-0], Field1: score_206861}); } else { matches_206846 = [{Field0: db_206535[0][chckIndx(i_206859, 0, (db_206535[0] != null ? db_206535[0].length : 0)+0-1)-0], Field1: score_206861}]; };
							}
							
						} while(false);
						F.line = 2742;
						i_207053 = addInt(i_207053, 1);
					}
			} while(false);
		} while(false);
		F.line = 305;
		matches_206846.sort(HEX3Aanonymous_206873);
		L8: do {
			F.line = 306;
			var i_206926 = 0;
			F.line = 2737;
			var colontmp__207058 = 0;
			F.line = 306;
			colontmp__207058 = nimMin((matches_206846 != null ? matches_206846.length : 0), 19);
			F.line = 2739;
			var i_207059 = 0;
			L9: do {
				F.line = 2740;
					L10: while (true) {
					if (!(i_207059 < colontmp__207058)) break L10;
						F.line = 306;
						i_206926 = i_207059;
						F.line = 307;
						matches_206846[chckIndx(i_206926, 0, (matches_206846 != null ? matches_206846.length : 0)+0-1)-0]["Field0"].innerHTML = matches_206846[chckIndx(i_206926, 0, (matches_206846 != null ? matches_206846.length : 0)+0-1)-0]["Field0"].getAttribute("data-doc-search-tag");
						F.line = 308;
						add_205085(ul_206825, tree_205020(makeNimstrLit("LI"), [matches_206846[chckIndx(i_206926, 0, (matches_206846 != null ? matches_206846.length : 0)+0-1)-0]["Field0"]]));
						F.line = 2742;
						i_207059 = addInt(i_207059, 1);
					}
			} while(false);
		} while(false);
		if ((ul_206825.childNodes.length == 0)) {
		F.line = 310;
		add_205085(result_206557, tree_205020(makeNimstrLit("B"), [text_205120(makeNimstrLit("no search results"))]));
		}
		else {
			F.line = 312;
			add_205085(result_206557, tree_205020(makeNimstrLit("B"), [text_205120(makeNimstrLit("search results"))]));
			F.line = 313;
			add_205085(result_206557, ul_206825);
		}
		
	framePtr = F.prev;

	return result_206557;

}

function search() {

		function wrapper_206993() {
			var F={procname:"search.wrapper",prev:framePtr,filename:"dochack.nim",line:0};
			framePtr = F;
				F.line = 320;
				var elem_206995 = document.getElementById("searchInput");
				F.line = 321;
				var value_206996 = elem_206995.value;
				if (!(((value_206996 != null ? value_206996.length : 0) == 0))) {
				if ((oldtoc_206961[0] == null)) {
				F.line = 324;
				oldtoc_206961[0] = document.getElementById("tocRoot");
				}
				
				F.line = 325;
				var results_207002 = dosearch_206554(value_206996);
				F.line = 326;
				replace_by_id_205172("tocRoot", results_207002);
				}
				else {
				if (!((oldtoc_206961[0] == null))) {
				F.line = 328;
				replace_by_id_205172("tocRoot", oldtoc_206961[0]);
				}
				}
			framePtr = F.prev;

			
		}

	var F={procname:"dochack.search",prev:framePtr,filename:"dochack.nim",line:0};
	framePtr = F;
		if (!((timer_206962[0] == null))) {
		F.line = 330;
		clearTimeout(timer_206962[0]);
		}
		
		F.line = 331;
		timer_206962[0] = setTimeout(wrapper_206993, 400);
	framePtr = F.prev;

	
}
