/* Generated by the Nim Compiler v2.3.1 */ var framePtr = null; var excHandler = 0; var lastJSError = null; var NTI33554466 = {size: 0,kind: 1,base: null,node: null,finalizer: null}; var NTI721420302 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; var NTI33554435 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; var NTI956301393 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; var NTI956301400 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; var NTI251658263 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; var NTI251658253 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; var NTI251658255 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; var NTI251658257 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; var NTI33555172 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; var NTI33555180 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; var NTI33554450 = {size: 0,kind: 29,base: null,node: null,finalizer: null}; var NTI33555179 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; var NTI33555176 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; var NTI33555177 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; var NTI251658261 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; var NTI33554449 = {size: 0,kind: 28,base: null,node: null,finalizer: null}; var NNI251658261 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; NTI251658261.node = NNI251658261; var NNI33555177 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; NTI33555177.node = NNI33555177; NTI33555179.base = NTI33555176; NTI33555180.base = NTI33555176; var NNI33555176 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI33555179, 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: NTI33555180, name: "up", sons: null}]}; NTI33555176.node = NNI33555176; var NNI33555172 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; NTI33555172.node = NNI33555172; NTI33555176.base = NTI33555172; NTI33555177.base = NTI33555176; NTI251658261.base = NTI33555177; var NNI251658257 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; NTI251658257.node = NNI251658257; NTI251658257.base = NTI33555177; var NNI251658255 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; NTI251658255.node = NNI251658255; var NNI251658253 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; NTI251658253.node = NNI251658253; NTI251658253.base = NTI33555177; NTI251658255.base = NTI251658253; var NNI251658263 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; NTI251658263.node = NNI251658263; NTI251658263.base = NTI33555177; var NNI956301400 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI956301393, name: "a", sons: null}, {kind: 1, offset: "b", len: 0, typ: NTI33554435, name: "b", sons: null}]}; NTI956301400.node = NNI956301400; var NNI721420302 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554435, name: "Field0", sons: null}, {kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; NTI721420302.node = NNI721420302; 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_p0, src_p1, ti_p2) { var result_33557380 = null; switch (ti_p2.kind) { case 21: case 22: case 23: case 5: if (!(isFatPointer_u0__system(ti_p2))) { result_33557380 = src_p1; } else { result_33557380 = [src_p1[0], src_p1[1]]; } break; case 19: if (dest_p0 === null || dest_p0 === undefined) { dest_p0 = {}; } else { for (var key in dest_p0) { delete dest_p0[key]; } } for (var key in src_p1) { dest_p0[key] = src_p1[key]; } result_33557380 = dest_p0; break; case 18: case 17: if (!((ti_p2.base == null))) { result_33557380 = nimCopy(dest_p0, src_p1, ti_p2.base); } else { if ((ti_p2.kind == 17)) { result_33557380 = (dest_p0 === null || dest_p0 === undefined) ? {m_type: ti_p2} : dest_p0; } else { result_33557380 = (dest_p0 === null || dest_p0 === undefined) ? {} : dest_p0; } } nimCopyAux(result_33557380, src_p1, ti_p2.node); break; case 4: case 16: if(ArrayBuffer.isView(src_p1)) { if(dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) { dest_p0 = new src_p1.constructor(src_p1); } else { dest_p0.set(src_p1, 0); } result_33557380 = dest_p0; } else { if (src_p1 === null) { result_33557380 = null; } else { if (dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) { dest_p0 = new Array(src_p1.length); } result_33557380 = dest_p0; for (var i = 0; i < src_p1.length; ++i) { result_33557380[i] = nimCopy(result_33557380[i], src_p1[i], ti_p2.base); } } } break; case 24: case 27: if (src_p1 === null) { result_33557380 = null; } else { if (dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) { dest_p0 = new Array(src_p1.length); } result_33557380 = dest_p0; for (var i = 0; i < src_p1.length; ++i) { result_33557380[i] = nimCopy(result_33557380[i], src_p1[i], ti_p2.base); } } break; case 28: if (src_p1 !== null) { result_33557380 = src_p1.slice(0); } break; default: result_33557380 = src_p1; break; } return result_33557380; } function mnewString(len_p0) { var result = new Array(len_p0); for (var i = 0; i < len_p0; i++) {result[i] = 0;} return result; } function nimAddStrStr(x_p0, y_p1) { var L = y_p1.length; for (var i = 0; i < L; ++i) { x_p0.push(y_p1[i]); } } function isObj(obj_p0, subclass_p1) { var result_33557493 = false; BeforeRet: { var x_33557494 = obj_p0; if ((x_33557494 == subclass_p1)) { result_33557493 = true; break BeforeRet; } Label1: { Label2: while (true) { if (!!((x_33557494 == subclass_p1))) break Label2; if ((x_33557494 == null)) { result_33557493 = false; break BeforeRet; } x_33557494 = x_33557494.base; } }; result_33557493 = true; break BeforeRet; }; return result_33557493; } function toJSStr(s_p0) { var result_33556957 = null; var res_33557023 = newSeq_u9__system((s_p0).length); var i_33557024 = 0; var j_33557025 = 0; Label1: { Label2: while (true) { if (!(i_33557024 < (s_p0).length)) break Label2; var c_33557026 = s_p0[i_33557024]; if ((c_33557026 < 128)) { res_33557023[j_33557025] = String.fromCharCode(c_33557026); i_33557024 += 1; } else { var helper_33557052 = newSeq_u9__system(0); Label3: { Label4: while (true) { if (!true) break Label4; var code_33557053 = c_33557026.toString(16); if ((((code_33557053) == null ? 0 : (code_33557053).length) == 1)) { helper_33557052.push("%0");; } else { helper_33557052.push("%");; } helper_33557052.push(code_33557053);; i_33557024 += 1; if ((((s_p0).length <= i_33557024) || (s_p0[i_33557024] < 128))) { break Label3; } c_33557026 = s_p0[i_33557024]; } }; ++excHandler; try { res_33557023[j_33557025] = decodeURIComponent(helper_33557052.join("")); --excHandler; } catch (EXCEPTION) { var prevJSError = lastJSError; lastJSError = EXCEPTION; --excHandler; raiseDefect(); res_33557023[j_33557025] = helper_33557052.join(""); lastJSError = prevJSError; } finally { } } j_33557025 += 1; } }; if (res_33557023.length < j_33557025) { for (var i = res_33557023.length ; i < j_33557025 ; ++i) res_33557023.push(null); } else { res_33557023.length = j_33557025; }; result_33556957 = res_33557023.join(""); return result_33556957; } function raiseException(e_p0, ename_p1) { e_p0.name = ename_p1; if ((excHandler == 0)) { unhandledException(e_p0); } throw e_p0; } function chckIndx(i_p0, a_p1, b_p2) { var result_33557415 = 0; BeforeRet: { if (((a_p1 <= i_p0) && (i_p0 <= b_p2))) { result_33557415 = i_p0; break BeforeRet; } else { raiseIndexError(i_p0, a_p1, b_p2); } }; return result_33557415; } function makeNimstrLit(c_p0) { var result = []; for (var i = 0; i < c_p0.length; ++i) { result[i] = c_p0.charCodeAt(i); } return result; } function addInt(a_p0, b_p1) { var result = a_p0 + b_p1; checkOverflowInt(result); return result; } function subInt(a_p0, b_p1) { var result = a_p0 - b_p1; checkOverflowInt(result); return result; } function chckRange(i_p0, a_p1, b_p2) { var result_33557420 = 0; BeforeRet: { if (((a_p1 <= i_p0) && (i_p0 <= b_p2))) { result_33557420 = i_p0; break BeforeRet; } else { raiseRangeError(); } }; return result_33557420; } function cstrToNimstr(c_p0) { var ln = c_p0.length; var result = new Array(ln); var r = 0; for (var i = 0; i < ln; ++i) { var ch = c_p0.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_p0.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; } var ConstSet2 = setConstr([65, 90]); var ConstSet3 = setConstr(95, 32, 46); var ConstSet4 = setConstr(95, 32, 46); function mulInt(a_p0, b_p1) { var result = a_p0 * b_p1; checkOverflowInt(result); return result; } var ConstSet5 = setConstr([97, 122]); var ConstSet6 = setConstr([65, 90], [97, 122]); var ConstSet7 = setConstr([97, 122]); var ConstSet8 = setConstr([65, 90]); var ConstSet9 = setConstr([65, 90], [97, 122]); function nimMax(a_p0, b_p1) { var Temporary1; var result_33557207 = 0; BeforeRet: { if ((b_p1 <= a_p0)) { Temporary1 = a_p0; } else { Temporary1 = b_p1; } result_33557207 = Temporary1; break BeforeRet; }; return result_33557207; } function nimMin(a_p0, b_p1) { var Temporary1; var result_33557203 = 0; BeforeRet: { if ((a_p0 <= b_p1)) { Temporary1 = a_p0; } else { Temporary1 = b_p1; } result_33557203 = Temporary1; break BeforeRet; }; return result_33557203; } function addChar(x_p0, c_p1) { x_p0.push(c_p1); } var objectID_1174405298 = [0]; function setTheme(theme_p0) { document.documentElement.setAttribute("data-theme", theme_p0); window.localStorage.setItem("theme", theme_p0); } function isFatPointer_u0__system(ti_p0) { var result_33557362 = false; BeforeRet: { result_33557362 = !((ConstSet1[ti_p0.base.kind] != undefined)); break BeforeRet; }; return result_33557362; } function nimCopyAux(dest_p0, src_p1, n_p2) { switch (n_p2.kind) { case 0: break; case 1: dest_p0[n_p2.offset] = nimCopy(dest_p0[n_p2.offset], src_p1[n_p2.offset], n_p2.typ); break; case 2: for (var i = 0; i < n_p2.sons.length; i++) { nimCopyAux(dest_p0, src_p1, n_p2.sons[i]); } break; case 3: dest_p0[n_p2.offset] = nimCopy(dest_p0[n_p2.offset], src_p1[n_p2.offset], n_p2.typ); for (var i = 0; i < n_p2.sons.length; ++i) { nimCopyAux(dest_p0, src_p1, n_p2.sons[i][1]); } break; } } function addChars_u4__stdZprivateZdigitsutils(result_p0, result_p0_Idx, x_p1, start_p2, n_p3) { var Temporary1; var old_335544528 = (result_p0[result_p0_Idx]).length; if (result_p0[result_p0_Idx].length < (Temporary1 = (old_335544528 + n_p3), Temporary1)) { for (var i = result_p0[result_p0_Idx].length; i < Temporary1; ++i) result_p0[result_p0_Idx].push(0); } else {result_p0[result_p0_Idx].length = Temporary1; }; Label2: { var iHEX60gensym4_335544542 = 0; var i_570426535 = 0; Label3: { Label4: while (true) { if (!(i_570426535 < n_p3)) break Label4; iHEX60gensym4_335544542 = i_570426535; result_p0[result_p0_Idx][(old_335544528 + iHEX60gensym4_335544542)] = x_p1.charCodeAt((start_p2 + iHEX60gensym4_335544542)); i_570426535 += 1; } }; }; } function addChars_u3__stdZprivateZdigitsutils(result_p0, result_p0_Idx, x_p1) { addChars_u4__stdZprivateZdigitsutils(result_p0, result_p0_Idx, x_p1, 0, ((x_p1) == null ? 0 : (x_p1).length)); } function addInt_u1__stdZprivateZdigitsutils(result_p0, result_p0_Idx, x_p1) { addChars_u3__stdZprivateZdigitsutils(result_p0, result_p0_Idx, ((x_p1) + "")); } function addInt_u2__stdZprivateZdigitsutils(result_p0, result_p0_Idx, x_p1) { addInt_u1__stdZprivateZdigitsutils(result_p0, result_p0_Idx, BigInt(x_p1)); } function HEX24_u1__systemZdollars(xHEX60gensym0_p0) { var result_402653200 = [[]]; result_402653200[0] = nimCopy(null, [], NTI33554449); addInt_u2__stdZprivateZdigitsutils(result_402653200, 0, xHEX60gensym0_p0); return result_402653200[0]; } function add_u4__system(x_p0, x_p0_Idx, y_p1) { if (x_p0[x_p0_Idx] === null) { x_p0[x_p0_Idx] = []; } var off = x_p0[x_p0_Idx].length; x_p0[x_p0_Idx].length += y_p1.length; for (var i = 0; i < y_p1.length; ++i) { x_p0[x_p0_Idx][off+i] = y_p1.charCodeAt(i); } } function newSeq_u9__system(len_p0) { var result_33557002 = []; result_33557002 = new Array(len_p0); for (var i = 0 ; i < len_p0 ; ++i) { result_33557002[i] = null; } return result_33557002; } function isNimException_u0__system() { return lastJSError && lastJSError.m_type; } function getCurrentException() { var result_33556489 = null; if (isNimException_u0__system()) { result_33556489 = lastJSError; } return result_33556489; } function raiseDefect() { if (isNimException_u0__system()) { var e_33556702 = getCurrentException(); if (isObj(e_33556702.m_type, NTI33555177)) { if ((excHandler == 0)) { unhandledException(e_33556702); } throw e_33556702; } } } function unhandledException(e_p0) { var buf_33556696 = [[]]; if (!(((e_p0.message).length == 0))) { nimAddStrStr(buf_33556696[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]);; nimAddStrStr(buf_33556696[0], e_p0.message);; } else { nimAddStrStr(buf_33556696[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]);; } nimAddStrStr(buf_33556696[0], [32,91]);; add_u4__system(buf_33556696, 0, e_p0.name); nimAddStrStr(buf_33556696[0], [93,10]);; var cbuf_33556697 = toJSStr(buf_33556696[0]); if (typeof(Error) !== "undefined") { throw new Error(cbuf_33556697); } else { throw cbuf_33556697; } } function raiseIndexError(i_p0, a_p1, b_p2) { var Temporary1; if ((b_p2 < a_p1)) { Temporary1 = [105,110,100,101,120,32,111,117,116,32,111,102,32,98,111,117,110,100,115,44,32,116,104,101,32,99,111,110,116,97,105,110,101,114,32,105,115,32,101,109,112,116,121]; } else { Temporary1 = ([105,110,100,101,120,32]).concat(HEX24_u1__systemZdollars(i_p0),[32,110,111,116,32,105,110,32],HEX24_u1__systemZdollars(a_p1),[32,46,46,32],HEX24_u1__systemZdollars(b_p2)); } raiseException({message: nimCopy(null, Temporary1, NTI33554449), parent: null, m_type: NTI251658261, name: null, trace: [], up: null}, "IndexDefect"); } function sysFatal_u2__stdZassertions(message_p1) { raiseException({message: nimCopy(null, message_p1, NTI33554449), m_type: NTI251658257, parent: null, name: null, trace: [], up: null}, "AssertionDefect"); } function raiseAssert_u0__stdZassertions(msg_p0) { sysFatal_u2__stdZassertions(msg_p0); } function failedAssertImpl_u0__stdZassertions(msg_p0) { raiseAssert_u0__stdZassertions(msg_p0); } function onDOMLoaded(e_p0) { var Temporary4; function HEX3Aanonymous_u0__dochack(event_p0) { event_p0.target.parentNode.style.display = "none"; event_p0.target.parentNode.nextSibling.style.display = "inline"; } document.getElementById("theme-select").value = window.localStorage.getItem("theme"); Label1: { var pragmaDots_570425408 = null; var colontmp__570426526 = []; colontmp__570426526 = document.getElementsByClassName("pragmadots"); var i_570426528 = 0; var L_570426529 = (colontmp__570426526).length; Label2: { Label3: while (true) { if (!(i_570426528 < L_570426529)) break Label3; pragmaDots_570425408 = colontmp__570426526[chckIndx(i_570426528, 0, (colontmp__570426526).length - 1)]; Temporary4 = HEX3Aanonymous_u0__dochack.bind(null); Temporary4.ClP_0 = HEX3Aanonymous_u0__dochack; Temporary4.ClE_0 = null; pragmaDots_570425408.onclick = Temporary4; i_570426528 += 1; if (!(((colontmp__570426526).length == L_570426529))) { failedAssertImpl_u0__stdZassertions(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); } } }; }; } function raiseOverflow() { raiseException({message: [111,118,101,114,45,32,111,114,32,117,110,100,101,114,102,108,111,119], parent: null, m_type: NTI251658255, name: null, trace: [], up: null}, "OverflowDefect"); } function checkOverflowInt(a_p0) { if (a_p0 > 2147483647 || a_p0 < -2147483648) raiseOverflow(); } function isWhitespace_u1__dochack(x_p0) { var result_570425738 = false; result_570425738 = (((x_p0.nodeName == "#text") && !/\S/.test(x_p0.textContent)) || (x_p0.nodeName == "#comment")); return result_570425738; } function toToc_u0__dochack(x_p0, father_p1) { var Temporary5; var Temporary6; var Temporary7; var Temporary8; var Temporary15; if ((x_p0.nodeName == "UL")) { var f_570425749 = {heading: null, kids: [], sortId: (father_p1.kids).length, doSort: false}; var i_570425750 = 0; Label1: { Label2: while (true) { if (!(i_570425750 < x_p0.childNodes.length)) break Label2; var nxt_570425751 = addInt(i_570425750, 1); Label3: { Label4: while (true) { if (!(nxt_570425751 < x_p0.childNodes.length)) Temporary5 = false; else { Temporary5 = isWhitespace_u1__dochack(x_p0.childNodes[nxt_570425751]); } if (!Temporary5) break Label4; nxt_570425751 = addInt(nxt_570425751, 1); } }; if (!(nxt_570425751 < x_p0.childNodes.length)) Temporary8 = false; else { Temporary8 = (x_p0.childNodes[i_570425750].nodeName == "LI"); } if (!Temporary8) Temporary7 = false; else { Temporary7 = (x_p0.childNodes[i_570425750].childNodes.length == 1); } if (!Temporary7) Temporary6 = false; else { Temporary6 = (x_p0.childNodes[nxt_570425751].nodeName == "UL"); } if (Temporary6) { var e_570425764 = {heading: x_p0.childNodes[i_570425750].childNodes[0], kids: [], sortId: (f_570425749.kids).length, doSort: false}; var it_570425765 = x_p0.childNodes[nxt_570425751]; Label9: { var j_570425770 = 0; var colontmp__570426543 = 0; colontmp__570426543 = it_570425765.childNodes.length; var i_570426544 = 0; Label10: { Label11: while (true) { if (!(i_570426544 < colontmp__570426543)) break Label11; j_570425770 = i_570426544; toToc_u0__dochack(it_570425765.childNodes[j_570425770], e_570425764); i_570426544 = addInt(i_570426544, 1); } }; }; f_570425749.kids.push(e_570425764);; i_570425750 = addInt(nxt_570425751, 1); } else { toToc_u0__dochack(x_p0.childNodes[i_570425750], f_570425749); i_570425750 = addInt(i_570425750, 1); } } }; father_p1.kids.push(f_570425749);; } else { if (isWhitespace_u1__dochack(x_p0)) { } else { if ((x_p0.nodeName == "LI")) { var idx_570425788 = []; Label12: { var i_570425793 = 0; var colontmp__570426547 = 0; colontmp__570426547 = x_p0.childNodes.length; var i_570426548 = 0; Label13: { Label14: while (true) { if (!(i_570426548 < colontmp__570426547)) break Label14; i_570425793 = i_570426548; if (!(isWhitespace_u1__dochack(x_p0.childNodes[i_570425793]))) { idx_570425788.push(i_570425793);; } i_570426548 = addInt(i_570426548, 1); } }; }; if (!((idx_570425788).length == 2)) Temporary15 = false; else { Temporary15 = (x_p0.childNodes[idx_570425788[chckIndx(1, 0, (idx_570425788).length - 1)]].nodeName == "UL"); } if (Temporary15) { var e_570425809 = {heading: x_p0.childNodes[idx_570425788[chckIndx(0, 0, (idx_570425788).length - 1)]], kids: [], sortId: (father_p1.kids).length, doSort: false}; var it_570425810 = x_p0.childNodes[idx_570425788[chckIndx(1, 0, (idx_570425788).length - 1)]]; Label16: { var j_570425815 = 0; var colontmp__570426551 = 0; colontmp__570426551 = it_570425810.childNodes.length; var i_570426552 = 0; Label17: { Label18: while (true) { if (!(i_570426552 < colontmp__570426551)) break Label18; j_570425815 = i_570426552; toToc_u0__dochack(it_570425810.childNodes[j_570425815], e_570425809); i_570426552 = addInt(i_570426552, 1); } }; }; father_p1.kids.push(e_570425809);; } else { Label19: { var i_570425824 = 0; var colontmp__570426555 = 0; colontmp__570426555 = x_p0.childNodes.length; var i_570426556 = 0; Label20: { Label21: while (true) { if (!(i_570426556 < colontmp__570426555)) break Label21; i_570425824 = i_570426556; toToc_u0__dochack(x_p0.childNodes[i_570425824], father_p1); i_570426556 = addInt(i_570426556, 1); } }; }; } } else { father_p1.kids.push({heading: x_p0, kids: [], sortId: (father_p1.kids).length, doSort: false});; } }} } function extractItems_u1__dochack(x_p0, heading_p1, items_p2, items_p2_Idx) { BeforeRet: { if ((x_p0 == null)) { break BeforeRet; } if ((!((x_p0.heading == null)) && (x_p0.heading.textContent == heading_p1))) { Label1: { var i_570425547 = 0; var colontmp__570426559 = 0; colontmp__570426559 = (x_p0.kids).length; var i_570426560 = 0; Label2: { Label3: while (true) { if (!(i_570426560 < colontmp__570426559)) break Label3; i_570425547 = i_570426560; items_p2[items_p2_Idx].push(x_p0.kids[chckIndx(i_570425547, 0, (x_p0.kids).length - 1)].heading);; i_570426560 = addInt(i_570426560, 1); } }; }; } else { Label4: { var k_570425573 = null; var i_570426564 = 0; var L_570426565 = (x_p0.kids).length; Label5: { Label6: while (true) { if (!(i_570426564 < L_570426565)) break Label6; k_570425573 = x_p0.kids[chckIndx(i_570426564, 0, (x_p0.kids).length - 1)]; extractItems_u1__dochack(k_570425573, heading_p1, items_p2, items_p2_Idx); i_570426564 += 1; if (!(((x_p0.kids).length == L_570426565))) { failedAssertImpl_u0__stdZassertions(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); } } }; }; } }; } function tree_u0__dochack(tag_p0, kids_p1) { var result_570425461 = null; result_570425461 = document.createElement(tag_p0); Label1: { var k_570425475 = null; var i_570426577 = 0; Label2: { Label3: while (true) { if (!(i_570426577 < (kids_p1).length)) break Label3; k_570425475 = kids_p1[chckIndx(i_570426577, 0, (kids_p1).length - 1)]; result_570425461.appendChild(k_570425475); i_570426577 += 1; } }; }; return result_570425461; } function text_u0__dochack(s_p0) { var result_570425485 = null; result_570425485 = document.createTextNode(s_p0); return result_570425485; } function uncovered_u0__dochack(x_p0) { var Temporary1; var result_570425914 = null; BeforeRet: { if ((((x_p0.kids).length == 0) && !((x_p0.heading == null)))) { if (!(x_p0.heading.hasOwnProperty('__karaxMarker__'))) { Temporary1 = x_p0; } else { Temporary1 = null; } result_570425914 = Temporary1; break BeforeRet; } result_570425914 = {heading: x_p0.heading, kids: [], sortId: x_p0.sortId, doSort: x_p0.doSort}; Label2: { var k_570425929 = null; var i_570426584 = 0; var L_570426585 = (x_p0.kids).length; Label3: { Label4: while (true) { if (!(i_570426584 < L_570426585)) break Label4; k_570425929 = x_p0.kids[chckIndx(i_570426584, 0, (x_p0.kids).length - 1)]; var y_570425930 = uncovered_u0__dochack(k_570425929); if (!((y_570425930 == null))) { result_570425914.kids.push(y_570425930);; } i_570426584 += 1; if (!(((x_p0.kids).length == L_570426585))) { failedAssertImpl_u0__stdZassertions(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); } } }; }; if (((result_570425914.kids).length == 0)) { result_570425914 = null; } }; return result_570425914; } function mergeTocs_u0__dochack(orig_p0, news_p1) { var result_570425945 = null; result_570425945 = uncovered_u0__dochack(orig_p0); if ((result_570425945 == null)) { result_570425945 = news_p1; } else { Label1: { var i_570425957 = 0; var colontmp__570426580 = 0; colontmp__570426580 = (news_p1.kids).length; var i_570426581 = 0; Label2: { Label3: while (true) { if (!(i_570426581 < colontmp__570426580)) break Label3; i_570425957 = i_570426581; result_570425945.kids.push(news_p1.kids[chckIndx(i_570425957, 0, (news_p1.kids).length - 1)]);; i_570426581 = addInt(i_570426581, 1); } }; }; } return result_570425945; } function buildToc_u0__dochack(orig_p0, types_p1, procs_p2) { var result_570425966 = null; var newStuff_570425971 = {heading: null, kids: [], doSort: true, sortId: 0}; Label1: { var t_570425975 = null; var i_570426572 = 0; var L_570426573 = (types_p1).length; Label2: { Label3: while (true) { if (!(i_570426572 < L_570426573)) break Label3; t_570425975 = types_p1[chckIndx(i_570426572, 0, (types_p1).length - 1)]; var c_570425980 = {heading: t_570425975.cloneNode(true), kids: [], doSort: true, sortId: 0}; t_570425975.__karaxMarker__ = true; Label4: { var p_570425984 = null; var i_570426569 = 0; var L_570426570 = (procs_p2).length; Label5: { Label6: while (true) { if (!(i_570426569 < L_570426570)) break Label6; p_570425984 = procs_p2[chckIndx(i_570426569, 0, (procs_p2).length - 1)]; if (!(p_570425984.hasOwnProperty('__karaxMarker__'))) { var xx_570425985 = p_570425984.parentNode.getElementsByClassName("attachedType"); if ((((xx_570425985).length == 1) && (xx_570425985[chckIndx(0, 0, (xx_570425985).length - 1)].textContent == t_570425975.textContent))) { var q_570425990 = tree_u0__dochack("A", [text_u0__dochack(p_570425984.title)]); q_570425990.setAttribute("href", p_570425984.getAttribute("href")); c_570425980.kids.push({heading: q_570425990, kids: [], sortId: 0, doSort: false});; p_570425984.__karaxMarker__ = true; } } i_570426569 += 1; if (!(((procs_p2).length == L_570426570))) { failedAssertImpl_u0__stdZassertions(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); } } }; }; newStuff_570425971.kids.push(c_570425980);; i_570426572 += 1; if (!(((types_p1).length == L_570426573))) { failedAssertImpl_u0__stdZassertions(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); } } }; }; result_570425966 = mergeTocs_u0__dochack(orig_p0, newStuff_570425971); return result_570425966; } function add_u0__dochack(parent_p0, kid_p1) { if (((parent_p0.nodeName == "TR") && ((kid_p1.nodeName == "TD") || (kid_p1.nodeName == "TH")))) { var k_570425479 = document.createElement("TD"); k_570425479.appendChild(kid_p1); parent_p0.appendChild(k_570425479); } else { parent_p0.appendChild(kid_p1); } } function setClass_u0__dochack(e_p0, value_p1) { e_p0.setAttribute("class", value_p1); } function toHtml_u0__dochack(x_p0, isRoot_p1) { var Temporary1; function HEX3Aanonymous_u1__dochack(a_p0, b_p1) { var result_570425629 = 0; BeforeRet: { if ((!((a_p0.heading == null)) && !((b_p1.heading == null)))) { var x_570425638 = a_p0.heading.textContent; var y_570425639 = b_p1.heading.textContent; if ((x_570425638 < y_570425639)) { result_570425629 = (-1); break BeforeRet; } if ((y_570425639 < x_570425638)) { result_570425629 = 1; break BeforeRet; } result_570425629 = 0; break BeforeRet; } else { result_570425629 = subInt(a_p0.sortId, b_p1.sortId); break BeforeRet; } }; return result_570425629; } var result_570425609 = null; BeforeRet: { if ((x_p0 == null)) { result_570425609 = null; break BeforeRet; } if (((x_p0.kids).length == 0)) { if ((x_p0.heading == null)) { result_570425609 = null; break BeforeRet; } result_570425609 = x_p0.heading.cloneNode(true); break BeforeRet; } result_570425609 = tree_u0__dochack("DIV", []); if ((!((x_p0.heading == null)) && !(x_p0.heading.hasOwnProperty('__karaxMarker__')))) { add_u0__dochack(result_570425609, x_p0.heading.cloneNode(true)); } var ul_570425625 = tree_u0__dochack("UL", []); if (isRoot_p1) { setClass_u0__dochack(ul_570425625, "simple simple-toc"); } else { setClass_u0__dochack(ul_570425625, "simple"); } if (x_p0.doSort) { Temporary1 = HEX3Aanonymous_u1__dochack.bind(null); Temporary1.ClP_0 = HEX3Aanonymous_u1__dochack; Temporary1.ClE_0 = null; x_p0.kids.sort(Temporary1); } Label2: { var k_570425651 = null; var i_570426588 = 0; var L_570426589 = (x_p0.kids).length; Label3: { Label4: while (true) { if (!(i_570426588 < L_570426589)) break Label4; k_570425651 = x_p0.kids[chckIndx(i_570426588, 0, (x_p0.kids).length - 1)]; var y_570425652 = toHtml_u0__dochack(k_570425651, false); if (!((y_570425652 == null))) { add_u0__dochack(ul_570425625, tree_u0__dochack("LI", [y_570425652])); } i_570426588 += 1; if (!(((x_p0.kids).length == L_570426589))) { failedAssertImpl_u0__stdZassertions(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); } } }; }; if (!((ul_570425625.childNodes.length == 0))) { add_u0__dochack(result_570425609, ul_570425625); } if ((result_570425609.childNodes.length == 0)) { result_570425609 = null; } }; return result_570425609; } function replaceById_u0__dochack(id_p0, newTree_p1) { var x_570425489 = document.getElementById(id_p0); x_570425489.parentNode.replaceChild(newTree_p1, x_570425489); newTree_p1.id = id_p0; } function togglevis_u0__dochack(d_p0) { if ((d_p0.style.display == "none")) { d_p0.style.display = "inline"; } else { d_p0.style.display = "none"; } } function groupBy(value_p0) { var toc_570426024 = document.getElementById("toc-list"); if ((alternative_570426019[0] == null)) { var tt_570426032 = {heading: null, kids: [], sortId: 0, doSort: false}; toToc_u0__dochack(toc_570426024, tt_570426032); tt_570426032 = tt_570426032.kids[chckIndx(0, 0, (tt_570426032.kids).length - 1)]; var types_570426037 = [[]]; var procs_570426042 = [[]]; extractItems_u1__dochack(tt_570426032, "Types", types_570426037, 0); extractItems_u1__dochack(tt_570426032, "Procs", procs_570426042, 0); extractItems_u1__dochack(tt_570426032, "Converters", procs_570426042, 0); extractItems_u1__dochack(tt_570426032, "Methods", procs_570426042, 0); extractItems_u1__dochack(tt_570426032, "Templates", procs_570426042, 0); extractItems_u1__dochack(tt_570426032, "Macros", procs_570426042, 0); extractItems_u1__dochack(tt_570426032, "Iterators", procs_570426042, 0); var ntoc_570426043 = buildToc_u0__dochack(tt_570426032, types_570426037[0], procs_570426042[0]); var x_570426044 = toHtml_u0__dochack(ntoc_570426043, true); alternative_570426019[0] = tree_u0__dochack("DIV", [x_570426044]); } if ((value_p0 == "type")) { replaceById_u0__dochack("tocRoot", alternative_570426019[0]); } else { replaceById_u0__dochack("tocRoot", tree_u0__dochack("DIV", [])); } togglevis_u0__dochack(document.getElementById("toc-list")); } function raiseRangeError() { raiseException({message: [118,97,108,117,101,32,111,117,116,32,111,102,32,114,97,110,103,101], parent: null, m_type: NTI251658263, name: null, trace: [], up: null}, "RangeDefect"); } function HEX5BHEX5D_u1__pureZstrutils(s_p0, x_p1) { var result_738198817 = []; var a_738198819 = x_p1.a; var L_738198821 = addInt(subInt(subInt((s_p0).length, x_p1.b), a_738198819), 1); result_738198817 = nimCopy(null, mnewString(chckRange(L_738198821, 0, 2147483647)), NTI33554449); Label1: { var i_738198826 = 0; var i_570426598 = 0; Label2: { Label3: while (true) { if (!(i_570426598 < L_738198821)) break Label3; i_738198826 = i_570426598; result_738198817[chckIndx(i_738198826, 0, (result_738198817).length - 1)] = s_p0[chckIndx(addInt(i_738198826, a_738198819), 0, (s_p0).length - 1)]; i_570426598 = addInt(i_570426598, 1); } }; }; return result_738198817; } function HEX2EHEX2E_u0__stdZenumutils(a_p0, b_p1) { var result_956301424 = ({a: 0, b: 0}); result_956301424 = nimCopy(result_956301424, {a: a_p0, b: b_p1}, NTI956301400); return result_956301424; } async function loadIndex_u0__dochack() { var result_570426242 = null; BeforeRet: { var indexURL_570426248 = document.getElementById("indexLink").getAttribute("href"); var rootURL_570426274 = HEX5BHEX5D_u1__pureZstrutils(cstrToNimstr(indexURL_570426248), HEX2EHEX2E_u0__stdZenumutils(0, 14)); var resp_570426286 = (await (await fetch(indexURL_570426248)).text()); var indexElem_570426287 = document.createElement("div"); indexElem_570426287.innerHTML = resp_570426286; Label1: { var href_570426309 = null; var colontmp__570426592 = []; colontmp__570426592 = indexElem_570426287.getElementsByClassName("reference"); var i_570426594 = 0; var L_570426595 = (colontmp__570426592).length; Label2: { Label3: while (true) { if (!(i_570426594 < L_570426595)) break Label3; href_570426309 = colontmp__570426592[chckIndx(i_570426594, 0, (colontmp__570426592).length - 1)]; href_570426309.setAttribute("href", toJSStr((rootURL_570426274).concat(cstrToNimstr(href_570426309.getAttribute("href"))))); db_570426061[0].push(href_570426309);; contents_570426062[0].push(href_570426309.getAttribute("data-doc-search-tag"));; i_570426594 += 1; if (!(((colontmp__570426592).length == L_570426595))) { failedAssertImpl_u0__stdZassertions(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); } } }; }; result_570426242 = undefined; break BeforeRet; }; return result_570426242; } function then_u0__dochack(future_p0, onSuccess_p1, onReject_p2) { var result_570426409 = null; BeforeRet: { var ret_570426419 = null; ret_570426419 = future_p0.then(onSuccess_p1, onReject_p2); result_570426409 = ret_570426419; break BeforeRet; }; return result_570426409; } function nsuToLowerAsciiChar(c_p0) { var result_738197591 = 0; if ((ConstSet2[c_p0] != undefined)) { result_738197591 = (c_p0 ^ 32); } else { result_738197591 = c_p0; } return result_738197591; } function fuzzyMatch_u0__fuzzysearch(pattern_p0, str_p1) { var Temporary4; var Temporary5; var Temporary6; var Temporary7; var Temporary8; var result_721420309 = {Field0: 0, Field1: false}; var scoreState_721420310 = (-100); var headerMatched_721420311 = false; var unmatchedLeadingCharCount_721420312 = 0; var consecutiveMatchCount_721420313 = 0; var strIndex_721420314 = 0; var patIndex_721420315 = 0; var score_721420316 = 0; Label1: { Label2: while (true) { if (!((strIndex_721420314 < ((str_p1) == null ? 0 : (str_p1).length)) && (patIndex_721420315 < ((pattern_p0) == null ? 0 : (pattern_p0).length)))) break Label2; Label3: { var patternChar_721420319 = nsuToLowerAsciiChar(pattern_p0.charCodeAt(chckIndx(patIndex_721420315, 0, (pattern_p0).length - 1))); var strChar_721420320 = nsuToLowerAsciiChar(str_p1.charCodeAt(chckIndx(strIndex_721420314, 0, (str_p1).length - 1))); if ((ConstSet3[patternChar_721420319] != undefined)) { patIndex_721420315 = addInt(patIndex_721420315, 1); break Label3; } if ((ConstSet4[strChar_721420320] != undefined)) { strIndex_721420314 = addInt(strIndex_721420314, 1); break Label3; } if ((!(headerMatched_721420311) && (strChar_721420320 == 58))) { headerMatched_721420311 = true; scoreState_721420310 = (-100); score_721420316 = chckRange(Number(BigInt(Math.trunc(Math.floor((0.5 * score_721420316))))), (-2147483648), 2147483647); patIndex_721420315 = 0; strIndex_721420314 = addInt(strIndex_721420314, 1); break Label3; } if ((strChar_721420320 == patternChar_721420319)) { switch (scoreState_721420310) { case (-100): case 20: scoreState_721420310 = 10; break; case 0: scoreState_721420310 = 5; score_721420316 = addInt(score_721420316, scoreState_721420310); break; case 10: case 5: consecutiveMatchCount_721420313 = addInt(consecutiveMatchCount_721420313, 1); scoreState_721420310 = 5; score_721420316 = addInt(score_721420316, mulInt(5, consecutiveMatchCount_721420313)); if ((scoreState_721420310 == 10)) { score_721420316 = addInt(score_721420316, 10); } var onBoundary_721420372 = (patIndex_721420315 == ((pattern_p0) == null ? -1 : (pattern_p0).length - 1)); if ((!(onBoundary_721420372) && (strIndex_721420314 < ((str_p1) == null ? -1 : (str_p1).length - 1)))) { var nextPatternChar_721420373 = nsuToLowerAsciiChar(pattern_p0.charCodeAt(chckIndx(addInt(patIndex_721420315, 1), 0, (pattern_p0).length - 1))); var nextStrChar_721420374 = nsuToLowerAsciiChar(str_p1.charCodeAt(chckIndx(addInt(strIndex_721420314, 1), 0, (str_p1).length - 1))); if (!!((ConstSet5[nextStrChar_721420374] != undefined))) Temporary4 = false; else { Temporary4 = !((nextStrChar_721420374 == nextPatternChar_721420373)); } onBoundary_721420372 = Temporary4; } if (onBoundary_721420372) { scoreState_721420310 = 20; score_721420316 = addInt(score_721420316, scoreState_721420310); } break; case (-1): case (-3): if (!((ConstSet6[str_p1.charCodeAt(chckIndx(subInt(strIndex_721420314, 1), 0, (str_p1).length - 1))] != undefined))) Temporary5 = true; else { if (!(ConstSet7[str_p1.charCodeAt(chckIndx(subInt(strIndex_721420314, 1), 0, (str_p1).length - 1))] != undefined)) Temporary6 = false; else { Temporary6 = (ConstSet8[str_p1.charCodeAt(chckIndx(strIndex_721420314, 0, (str_p1).length - 1))] != undefined); } Temporary5 = Temporary6; } var isLeadingChar_721420398 = Temporary5; if (isLeadingChar_721420398) { scoreState_721420310 = 10; } else { scoreState_721420310 = 0; score_721420316 = addInt(score_721420316, scoreState_721420310); } break; } patIndex_721420315 = addInt(patIndex_721420315, 1); } else { switch (scoreState_721420310) { case (-100): scoreState_721420310 = (-3); score_721420316 = addInt(score_721420316, scoreState_721420310); break; case 5: scoreState_721420310 = (-1); score_721420316 = addInt(score_721420316, scoreState_721420310); consecutiveMatchCount_721420313 = 0; break; case (-3): if ((unmatchedLeadingCharCount_721420312 < 3)) { scoreState_721420310 = (-3); score_721420316 = addInt(score_721420316, scoreState_721420310); } unmatchedLeadingCharCount_721420312 = addInt(unmatchedLeadingCharCount_721420312, 1); break; default: scoreState_721420310 = (-1); score_721420316 = addInt(score_721420316, scoreState_721420310); break; } } strIndex_721420314 = addInt(strIndex_721420314, 1); }; } }; if (!(patIndex_721420315 == ((pattern_p0) == null ? 0 : (pattern_p0).length))) Temporary7 = false; else { if ((strIndex_721420314 == ((str_p1) == null ? 0 : (str_p1).length))) Temporary8 = true; else { Temporary8 = !((ConstSet9[str_p1.charCodeAt(chckIndx(strIndex_721420314, 0, (str_p1).length - 1))] != undefined)); } Temporary7 = Temporary8; } if (Temporary7) { score_721420316 = addInt(score_721420316, 10); } var colontmp__570426611 = nimMax(0, score_721420316); var colontmp__570426612 = (0 < score_721420316); result_721420309 = nimCopy(result_721420309, {Field0: colontmp__570426611, Field1: colontmp__570426612}, NTI721420302); return result_721420309; } function escapeCString_u0__dochack(x_p0, x_p0_Idx) { var s_570426065 = []; Label1: { var c_570426066 = 0; var iHEX60gensym14_570426615 = 0; var nHEX60gensym14_570426616 = ((x_p0[x_p0_Idx]) == null ? 0 : (x_p0[x_p0_Idx]).length); Label2: { Label3: while (true) { if (!(iHEX60gensym14_570426615 < nHEX60gensym14_570426616)) break Label3; c_570426066 = x_p0[x_p0_Idx].charCodeAt(chckIndx(iHEX60gensym14_570426615, 0, (x_p0[x_p0_Idx]).length - 1)); switch (c_570426066) { case 60: nimAddStrStr(s_570426065, [38,108,116,59]);; break; case 62: nimAddStrStr(s_570426065, [38,103,116,59]);; break; default: addChar(s_570426065, c_570426066);; break; } iHEX60gensym14_570426615 += 1; } }; }; x_p0[x_p0_Idx] = toJSStr(s_570426065); } function dosearch_u0__dochack(value_p0) { var Temporary5; function HEX3Aanonymous_u2__dochack(a_p0, b_p1) { var result_570426108 = 0; result_570426108 = subInt(b_p1["Field1"], a_p0["Field1"]); return result_570426108; } var result_570426069 = null; BeforeRet: { if (((db_570426061[0]).length == 0)) { break BeforeRet; } var ul_570426073 = tree_u0__dochack("UL", []); result_570426069 = tree_u0__dochack("DIV", []); setClass_u0__dochack(result_570426069, "search_results"); var matches_570426078 = []; Label1: { var i_570426086 = 0; var colontmp__570426602 = 0; colontmp__570426602 = (db_570426061[0]).length; var i_570426603 = 0; Label2: { Label3: while (true) { if (!(i_570426603 < colontmp__570426602)) break Label3; i_570426086 = i_570426603; Label4: { var c_570426087 = contents_570426062[0][chckIndx(i_570426086, 0, (contents_570426062[0]).length - 1)]; if (((c_570426087 == "Examples") || (c_570426087 == "PEG construction"))) { break Label4; } var tmpTuple_570426088 = fuzzyMatch_u0__fuzzysearch(value_p0, c_570426087); var score_570426089 = tmpTuple_570426088["Field0"]; var matched_570426090 = tmpTuple_570426088["Field1"]; if (matched_570426090) { matches_570426078.push({Field0: db_570426061[0][chckIndx(i_570426086, 0, (db_570426061[0]).length - 1)], Field1: score_570426089});; } }; i_570426603 = addInt(i_570426603, 1); } }; }; Temporary5 = HEX3Aanonymous_u2__dochack.bind(null); Temporary5.ClP_0 = HEX3Aanonymous_u2__dochack; Temporary5.ClE_0 = null; matches_570426078.sort(Temporary5); Label6: { var i_570426125 = 0; var colontmp__570426606 = 0; colontmp__570426606 = nimMin((matches_570426078).length, 29); var i_570426607 = 0; Label7: { Label8: while (true) { if (!(i_570426607 < colontmp__570426606)) break Label8; i_570426125 = i_570426607; matches_570426078[chckIndx(i_570426125, 0, (matches_570426078).length - 1)]["Field0"].innerHTML = matches_570426078[chckIndx(i_570426125, 0, (matches_570426078).length - 1)]["Field0"].getAttribute("data-doc-search-tag"); escapeCString_u0__dochack(matches_570426078[chckIndx(i_570426125, 0, (matches_570426078).length - 1)]["Field0"], "innerHTML"); add_u0__dochack(ul_570426073, tree_u0__dochack("LI", [matches_570426078[chckIndx(i_570426125, 0, (matches_570426078).length - 1)]["Field0"]])); i_570426607 = addInt(i_570426607, 1); } }; }; if ((ul_570426073.childNodes.length == 0)) { add_u0__dochack(result_570426069, tree_u0__dochack("B", [text_u0__dochack("no search results")])); } else { add_u0__dochack(result_570426069, tree_u0__dochack("B", [text_u0__dochack("search results")])); add_u0__dochack(result_570426069, ul_570426073); } }; return result_570426069; } function hideSearch_u0__dochack() { if (!((oldtoc_570426382[0] == null))) { replaceById_u0__dochack("tocRoot", oldtoc_570426382[0]); } } function runSearch_u0__dochack() { var elem_570426391 = document.getElementById("searchInput"); var value_570426392 = elem_570426391.value; if (!((value_570426392 == ""))) { if ((oldtoc_570426382[0] == null)) { oldtoc_570426382[0] = document.getElementById("tocRoot"); } var results_570426396 = dosearch_u0__dochack(value_570426392); replaceById_u0__dochack("tocRoot", results_570426396); } else { hideSearch_u0__dochack(); } } function search() { var Temporary1; if ((loadIndexFut_570426385[0] == null)) { loadIndexFut_570426385[0] = loadIndex_u0__dochack(); (then_u0__dochack(loadIndexFut_570426385[0], runSearch_u0__dochack, null)); } if (!((timer_570426383[0] == null))) { clearTimeout(timer_570426383[0]); } Temporary1 = runSearch_u0__dochack.bind(null); Temporary1.ClP_0 = runSearch_u0__dochack; Temporary1.ClE_0 = null; timer_570426383[0] = setTimeout(Temporary1, 400); } function copyToClipboard() { function updatePreTags() { const allPreTags = document.querySelectorAll("pre:not(.line-nums)") allPreTags.forEach((e) => { const div = document.createElement("div") div.classList.add("copyToClipBoard") const preTag = document.createElement("pre") preTag.innerHTML = e.innerHTML const button = document.createElement("button") button.value = e.textContent.replace('...', '') button.classList.add("copyToClipBoardBtn") button.style.cursor = "pointer" div.appendChild(preTag) div.appendChild(button) e.outerHTML = div.outerHTML }) } function copyTextToClipboard(e) { const clipBoardContent = e.target.value navigator.clipboard.writeText(clipBoardContent).then(function() { e.target.style.setProperty("--clipboard-image", "var(--clipboard-image-selected)") }, function(err) { console.error("Could not copy text: ", err); }); } window.addEventListener("click", (e) => { if (e.target.classList.contains("copyToClipBoardBtn")) { copyTextToClipboard(e) } }) window.addEventListener("mouseover", (e) => { if (e.target.nodeName === "PRE") { e.target.nextElementSibling.style.setProperty("--clipboard-image", "var(--clipboard-image-normal)") } }) window.addEventListener("DOMContentLoaded", updatePreTags) } var Temporary1; var Temporary2; function HEX3Aanonymous_u4__dochack(e_p0) { if ((e_p0.key == "/")) { e_p0.preventDefault(); var searchElem_570426473 = document.getElementById("searchInput"); searchElem_570426473.focus(); searchElem_570426473.parentElement.scrollIntoView(); runSearch_u0__dochack(); } } var Temporary3; function HEX3Aanonymous_u5__dochack(e_p0) { hideSearch_u0__dochack(); } var Temporary4; var t_570425383 = window.localStorage.getItem("theme"); if ((t_570425383 == null)) { Temporary1 = "auto"; } else { Temporary1 = t_570425383; } setTheme(Temporary1); var alternative_570426019 = [null]; var db_570426061 = [[]]; var contents_570426062 = [[]]; var oldtoc_570426382 = [null]; var timer_570426383 = [null]; var loadIndexFut_570426385 = [null]; Temporary2 = HEX3Aanonymous_u4__dochack.bind(null); Temporary2.ClP_0 = HEX3Aanonymous_u4__dochack; Temporary2.ClE_0 = null; window.addEventListener("keypress", Temporary2, false); Temporary3 = HEX3Aanonymous_u5__dochack.bind(null); Temporary3.ClP_0 = HEX3Aanonymous_u5__dochack; Temporary3.ClE_0 = null; window.addEventListener("hashchange", Temporary3, false); copyToClipboard(); Temporary4 = onDOMLoaded.bind(null); Temporary4.ClP_0 = onDOMLoaded; Temporary4.ClE_0 = null; window.addEventListener("DOMContentLoaded", Temporary4, false);