diff --git a/dist/jssm.es5.cjs.js b/dist/jssm.es5.cjs.js index 955efc8a..ba13e626 100644 --- a/dist/jssm.es5.cjs.js +++ b/dist/jssm.es5.cjs.js @@ -404,26 +404,26 @@ function peg$parse(input, options) { peg$c189 = function peg$c189(value) { return { key: "outputs", value: value }; }, - peg$c190 = "start_nodes", - peg$c191 = peg$literalExpectation("start_nodes", false), - peg$c192 = function peg$c192(value) { - return { key: "start_nodes", value: value }; + peg$c190 = peg$otherExpectation("graph configuration"), + peg$c191 = "graph", + peg$c192 = peg$literalExpectation("graph", false), + peg$c193 = function peg$c193(graph_items) { + return { config_kind: "graph", config_items: graph_items || [] }; }, - peg$c193 = "end_nodes", - peg$c194 = peg$literalExpectation("end_nodes", false), - peg$c195 = function peg$c195(value) { - return { key: "end_nodes", value: value }; + peg$c194 = "graph_layout", + peg$c195 = peg$literalExpectation("graph_layout", false), + peg$c196 = function peg$c196(value) { + return { key: "graph_layout", value: value }; }, - peg$c196 = peg$otherExpectation("graph configuration"), - peg$c197 = "graph", - peg$c198 = peg$literalExpectation("graph", false), - peg$c199 = function peg$c199(graph_items) { - return { config_kind: "graph", config_items: graph_items || [] }; + peg$c197 = "start_nodes", + peg$c198 = peg$literalExpectation("start_nodes", false), + peg$c199 = function peg$c199(value) { + return { key: "start_nodes", value: value }; }, - peg$c200 = "graph_layout", - peg$c201 = peg$literalExpectation("graph_layout", false), + peg$c200 = "end_nodes", + peg$c201 = peg$literalExpectation("end_nodes", false), peg$c202 = function peg$c202(value) { - return { key: "graph_layout", value: value }; + return { key: "end_nodes", value: value }; }, peg$c203 = peg$otherExpectation("configuration"), peg$c204 = "color", @@ -3901,19 +3901,57 @@ function peg$parse(input, options) { return s0; } - function peg$parseGraphStartNodes() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + function peg$parseGraphItem() { + var s0; + s0 = peg$parseGraphBg(); + if (s0 === peg$FAILED) { + s0 = peg$parseMinTransitionsPerState(); + if (s0 === peg$FAILED) { + s0 = peg$parseMaxTransitionsPerState(); + if (s0 === peg$FAILED) { + s0 = peg$parseGraphInputs(); + if (s0 === peg$FAILED) { + s0 = peg$parseGraphOutputs(); + } + } + } + } + + return s0; + } + + function peg$parseGraphItems() { + var s0, s1; + + s0 = []; + s1 = peg$parseGraphItem(); + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = peg$parseGraphItem(); + } + } else { + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseConfigGraph() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; + + peg$silentFails++; s0 = peg$currPos; s1 = peg$parseWhitespace(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 11) === peg$c190) { - s2 = peg$c190; - peg$currPos += 11; + if (input.substr(peg$currPos, 5) === peg$c191) { + s2 = peg$c191; + peg$currPos += 5; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$c191); + peg$fail(peg$c192); } } if (s2 !== peg$FAILED) { @@ -3931,25 +3969,48 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$parseWhitespace(); if (s5 !== peg$FAILED) { - s6 = peg$parseLabelList(); + if (input.charCodeAt(peg$currPos) === 123) { + s6 = peg$c126; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c127); + } + } if (s6 !== peg$FAILED) { s7 = peg$parseWhitespace(); if (s7 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 59) { - s8 = peg$c119; - peg$currPos++; - } else { - s8 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c120); - } + s8 = peg$parseGraphItems(); + if (s8 === peg$FAILED) { + s8 = null; } if (s8 !== peg$FAILED) { s9 = peg$parseWhitespace(); if (s9 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c192(s6); - s0 = s1; + if (input.substr(peg$currPos, 2) === peg$c145) { + s10 = peg$c145; + peg$currPos += 2; + } else { + s10 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c146); + } + } + if (s10 !== peg$FAILED) { + s11 = peg$parseWhitespace(); + if (s11 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c193(s8); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3986,23 +4047,30 @@ function peg$parse(input, options) { peg$currPos = s0; s0 = peg$FAILED; } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c190); + } + } return s0; } - function peg$parseGraphEndNodes() { + function peg$parseConfigGraphLayout() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; s1 = peg$parseWhitespace(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9) === peg$c193) { - s2 = peg$c193; - peg$currPos += 9; + if (input.substr(peg$currPos, 12) === peg$c194) { + s2 = peg$c194; + peg$currPos += 12; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$c194); + peg$fail(peg$c195); } } if (s2 !== peg$FAILED) { @@ -4020,7 +4088,7 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$parseWhitespace(); if (s5 !== peg$FAILED) { - s6 = peg$parseLabelList(); + s6 = peg$parseGvizLayout(); if (s6 !== peg$FAILED) { s7 = peg$parseWhitespace(); if (s7 !== peg$FAILED) { @@ -4037,7 +4105,7 @@ function peg$parse(input, options) { s9 = peg$parseWhitespace(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c195(s6); + s1 = peg$c196(s6); s0 = s1; } else { peg$currPos = s0; @@ -4079,59 +4147,15 @@ function peg$parse(input, options) { return s0; } - function peg$parseGraphItem() { - var s0; - - s0 = peg$parseGraphBg(); - if (s0 === peg$FAILED) { - s0 = peg$parseMinTransitionsPerState(); - if (s0 === peg$FAILED) { - s0 = peg$parseMaxTransitionsPerState(); - if (s0 === peg$FAILED) { - s0 = peg$parseGraphStartNodes(); - if (s0 === peg$FAILED) { - s0 = peg$parseGraphEndNodes(); - if (s0 === peg$FAILED) { - s0 = peg$parseGraphInputs(); - if (s0 === peg$FAILED) { - s0 = peg$parseGraphOutputs(); - } - } - } - } - } - } - - return s0; - } - - function peg$parseGraphItems() { - var s0, s1; - - s0 = []; - s1 = peg$parseGraphItem(); - if (s1 !== peg$FAILED) { - while (s1 !== peg$FAILED) { - s0.push(s1); - s1 = peg$parseGraphItem(); - } - } else { - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseConfigGraph() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; + function peg$parseConfigStartNodes() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - peg$silentFails++; s0 = peg$currPos; s1 = peg$parseWhitespace(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 5) === peg$c197) { + if (input.substr(peg$currPos, 11) === peg$c197) { s2 = peg$c197; - peg$currPos += 5; + peg$currPos += 11; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { @@ -4153,48 +4177,25 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$parseWhitespace(); if (s5 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 123) { - s6 = peg$c126; - peg$currPos++; - } else { - s6 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c127); - } - } + s6 = peg$parseLabelList(); if (s6 !== peg$FAILED) { s7 = peg$parseWhitespace(); if (s7 !== peg$FAILED) { - s8 = peg$parseGraphItems(); - if (s8 === peg$FAILED) { - s8 = null; + if (input.charCodeAt(peg$currPos) === 59) { + s8 = peg$c119; + peg$currPos++; + } else { + s8 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c120); + } } if (s8 !== peg$FAILED) { s9 = peg$parseWhitespace(); if (s9 !== peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c145) { - s10 = peg$c145; - peg$currPos += 2; - } else { - s10 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c146); - } - } - if (s10 !== peg$FAILED) { - s11 = peg$parseWhitespace(); - if (s11 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c199(s8); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } + peg$savedPos = s0; + s1 = peg$c199(s6); + s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4231,26 +4232,19 @@ function peg$parse(input, options) { peg$currPos = s0; s0 = peg$FAILED; } - peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c196); - } - } return s0; } - function peg$parseConfigGraphLayout() { + function peg$parseConfigEndNodes() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; s1 = peg$parseWhitespace(); if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 12) === peg$c200) { + if (input.substr(peg$currPos, 9) === peg$c200) { s2 = peg$c200; - peg$currPos += 12; + peg$currPos += 9; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { @@ -4272,7 +4266,7 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$parseWhitespace(); if (s5 !== peg$FAILED) { - s6 = peg$parseGvizLayout(); + s6 = peg$parseLabelList(); if (s6 !== peg$FAILED) { s7 = peg$parseWhitespace(); if (s7 !== peg$FAILED) { @@ -4339,13 +4333,19 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$parseConfigGraphLayout(); if (s0 === peg$FAILED) { - s0 = peg$parseConfigTransition(); + s0 = peg$parseConfigStartNodes(); if (s0 === peg$FAILED) { - s0 = peg$parseConfigAction(); + s0 = peg$parseConfigEndNodes(); if (s0 === peg$FAILED) { - s0 = peg$parseConfigState(); + s0 = peg$parseConfigTransition(); if (s0 === peg$FAILED) { - s0 = peg$parseConfigValidation(); + s0 = peg$parseConfigAction(); + if (s0 === peg$FAILED) { + s0 = peg$parseConfigState(); + if (s0 === peg$FAILED) { + s0 = peg$parseConfigValidation(); + } + } } } } diff --git a/dist/jssm.es5.cjs.min.js b/dist/jssm.es5.cjs.min.js index 790a834f..62518ec3 100644 --- a/dist/jssm.es5.cjs.min.js +++ b/dist/jssm.es5.cjs.min.js @@ -1 +1 @@ -require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o0){for(i=1,j=1;ipeg$maxFailPos&&(peg$maxFailPos=peg$currPos,peg$maxFailExpected=[]),peg$maxFailExpected.push(expected))}function peg$buildStructuredError(expected,found,location){return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected,found),expected,found,location)}function peg$parseDocument(){var s0,s2;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED&&(s2=peg$parseTermList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c0(s2)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGvizShape(){var s0;return input.substr(peg$currPos,6)===peg$c1?(s0=peg$c1,peg$currPos+=6):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c2)),s0===peg$FAILED&&(input.substr(peg$currPos,9)===peg$c3?(s0=peg$c3,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c4)),s0===peg$FAILED&&(input.substr(peg$currPos,6)===peg$c5?(s0=peg$c5,peg$currPos+=6):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c6)))),s0}function peg$parseForwardLightArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c8?(s0=peg$c8,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c9)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c7),s0}function peg$parseTwoWayLightArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,3)===peg$c11?(s0=peg$c11,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c12)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c10),s0}function peg$parseBackLightArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c14?(s0=peg$c14,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c15)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c13),s0}function peg$parseForwardFatArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c17?(s0=peg$c17,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c18)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c16),s0}function peg$parseTwoWayFatArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,3)===peg$c20?(s0=peg$c20,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c21)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c19),s0}function peg$parseBackFatArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c23?(s0=peg$c23,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c24)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c22),s0}function peg$parseForwardTildeArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c26?(s0=peg$c26,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c27)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c25),s0}function peg$parseTwoWayTildeArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,3)===peg$c29?(s0=peg$c29,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c30)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c28),s0}function peg$parseBackTildeArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c32?(s0=peg$c32,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c33)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c31),s0}function peg$parseLightFatArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c35?(s0=peg$c35,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c36)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c34),s0}function peg$parseLightTildeArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c38?(s0=peg$c38,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c39)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c37),s0}function peg$parseFatLightArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c41?(s0=peg$c41,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c42)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c40),s0}function peg$parseFatTildeArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c44?(s0=peg$c44,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c45)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c43),s0}function peg$parseTildeLightArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c47?(s0=peg$c47,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c48)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c46),s0}function peg$parseTildeFatArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c50?(s0=peg$c50,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c51)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c49),s0}function peg$parseLightArrow(){var s0;return peg$silentFails++,(s0=peg$parseForwardLightArrow())===peg$FAILED&&(s0=peg$parseTwoWayLightArrow())===peg$FAILED&&(s0=peg$parseBackLightArrow()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c52),s0}function peg$parseFatArrow(){var s0;return peg$silentFails++,(s0=peg$parseForwardFatArrow())===peg$FAILED&&(s0=peg$parseTwoWayFatArrow())===peg$FAILED&&(s0=peg$parseBackFatArrow()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c53),s0}function peg$parseTildeArrow(){var s0;return peg$silentFails++,(s0=peg$parseForwardTildeArrow())===peg$FAILED&&(s0=peg$parseTwoWayTildeArrow())===peg$FAILED&&(s0=peg$parseBackTildeArrow()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c54),s0}function peg$parseMixedArrow(){var s0;return peg$silentFails++,(s0=peg$parseLightFatArrow())===peg$FAILED&&(s0=peg$parseLightTildeArrow())===peg$FAILED&&(s0=peg$parseFatLightArrow())===peg$FAILED&&(s0=peg$parseFatTildeArrow())===peg$FAILED&&(s0=peg$parseTildeLightArrow())===peg$FAILED&&(s0=peg$parseTildeFatArrow()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c55),s0}function peg$parseArrow(){var s0;return peg$silentFails++,(s0=peg$parseMixedArrow())===peg$FAILED&&(s0=peg$parseLightArrow())===peg$FAILED&&(s0=peg$parseFatArrow())===peg$FAILED&&(s0=peg$parseTildeArrow()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c56),s0}function peg$parseHexDigit(){var s0;return peg$c57.test(input.charAt(peg$currPos))?(s0=input.charAt(peg$currPos),peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c58)),s0}function peg$parseChar(){var s0,s2,s3,s4,s5,s6,s7,s8,s9;return(s0=peg$parseUnescaped())===peg$FAILED&&(s0=peg$currPos,peg$parseEscape()!==peg$FAILED?(34===input.charCodeAt(peg$currPos)?(s2=peg$c59,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c60)),s2===peg$FAILED&&(92===input.charCodeAt(peg$currPos)?(s2=peg$c61,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c62)),s2===peg$FAILED&&(47===input.charCodeAt(peg$currPos)?(s2=peg$c63,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c64)),s2===peg$FAILED&&(s2=peg$currPos,98===input.charCodeAt(peg$currPos)?(s3=peg$c65,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c66)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c67()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,102===input.charCodeAt(peg$currPos)?(s3=peg$c68,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c69)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c70()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,110===input.charCodeAt(peg$currPos)?(s3=peg$c71,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c72)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c73()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,114===input.charCodeAt(peg$currPos)?(s3=peg$c74,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c75)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c76()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,116===input.charCodeAt(peg$currPos)?(s3=peg$c77,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c78)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c79()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,118===input.charCodeAt(peg$currPos)?(s3=peg$c80,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c81)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c82()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,117===input.charCodeAt(peg$currPos)?(s3=peg$c83,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c84)),s3!==peg$FAILED?(s4=peg$currPos,s5=peg$currPos,(s6=peg$parseHexDigit())!==peg$FAILED&&(s7=peg$parseHexDigit())!==peg$FAILED&&(s8=peg$parseHexDigit())!==peg$FAILED&&(s9=peg$parseHexDigit())!==peg$FAILED?s5=s6=[s6,s7,s8,s9]:(peg$currPos=s5,s5=peg$FAILED),(s4=s5!==peg$FAILED?input.substring(s4,peg$currPos):s5)!==peg$FAILED?(peg$savedPos=s2,s2=s3=peg$c85(s4)):(peg$currPos=s2,s2=peg$FAILED)):(peg$currPos=s2,s2=peg$FAILED)))))))))),s2!==peg$FAILED?(peg$savedPos=s0,s0=peg$c86(s2)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)),s0}function peg$parseEscape(){var s0;return 92===input.charCodeAt(peg$currPos)?(s0=peg$c61,peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c62)),s0}function peg$parseQuoteMark(){var s0;return 34===input.charCodeAt(peg$currPos)?(s0=peg$c59,peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c60)),s0}function peg$parseUnescaped(){var s0;return peg$c87.test(input.charAt(peg$currPos))?(s0=input.charAt(peg$currPos),peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c88)),s0}function peg$parseActionLabelChar(){var s0,s2,s3,s4,s5,s6,s7,s8,s9;return(s0=peg$parseActionLabelUnescaped())===peg$FAILED&&(s0=peg$currPos,peg$parseEscape()!==peg$FAILED?(39===input.charCodeAt(peg$currPos)?(s2=peg$c89,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c90)),s2===peg$FAILED&&(92===input.charCodeAt(peg$currPos)?(s2=peg$c61,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c62)),s2===peg$FAILED&&(47===input.charCodeAt(peg$currPos)?(s2=peg$c63,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c64)),s2===peg$FAILED&&(s2=peg$currPos,98===input.charCodeAt(peg$currPos)?(s3=peg$c65,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c66)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c67()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,102===input.charCodeAt(peg$currPos)?(s3=peg$c68,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c69)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c70()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,110===input.charCodeAt(peg$currPos)?(s3=peg$c71,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c72)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c73()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,114===input.charCodeAt(peg$currPos)?(s3=peg$c74,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c75)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c76()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,116===input.charCodeAt(peg$currPos)?(s3=peg$c77,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c78)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c79()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,118===input.charCodeAt(peg$currPos)?(s3=peg$c80,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c81)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c82()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,117===input.charCodeAt(peg$currPos)?(s3=peg$c83,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c84)),s3!==peg$FAILED?(s4=peg$currPos,s5=peg$currPos,(s6=peg$parseHexDigit())!==peg$FAILED&&(s7=peg$parseHexDigit())!==peg$FAILED&&(s8=peg$parseHexDigit())!==peg$FAILED&&(s9=peg$parseHexDigit())!==peg$FAILED?s5=s6=[s6,s7,s8,s9]:(peg$currPos=s5,s5=peg$FAILED),(s4=s5!==peg$FAILED?input.substring(s4,peg$currPos):s5)!==peg$FAILED?(peg$savedPos=s2,s2=s3=peg$c85(s4)):(peg$currPos=s2,s2=peg$FAILED)):(peg$currPos=s2,s2=peg$FAILED)))))))))),s2!==peg$FAILED?(peg$savedPos=s0,s0=peg$c86(s2)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)),s0}function peg$parseActionLabelQuoteMark(){var s0;return 39===input.charCodeAt(peg$currPos)?(s0=peg$c89,peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c90)),s0}function peg$parseActionLabelUnescaped(){var s0;return peg$c91.test(input.charAt(peg$currPos))?(s0=input.charAt(peg$currPos),peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c92)),s0}function peg$parseActionLabel(){var s0,s2,s3;if(peg$silentFails++,s0=peg$currPos,peg$parseActionLabelQuoteMark()!==peg$FAILED){for(s2=[],s3=peg$parseActionLabelChar();s3!==peg$FAILED;)s2.push(s3),s3=peg$parseActionLabelChar();s2!==peg$FAILED&&(s3=peg$parseActionLabelQuoteMark())!==peg$FAILED?(peg$savedPos=s0,s0=peg$c94(s2)):(peg$currPos=s0,s0=peg$FAILED)}else peg$currPos=s0,s0=peg$FAILED;return peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c93),s0}function peg$parseWhitespace(){var s0,s1;for(peg$silentFails++,s0=[],peg$c96.test(input.charAt(peg$currPos))?(s1=input.charAt(peg$currPos),peg$currPos++):(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c97));s1!==peg$FAILED;)s0.push(s1),peg$c96.test(input.charAt(peg$currPos))?(s1=input.charAt(peg$currPos),peg$currPos++):(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c97));return peg$silentFails--,s0===peg$FAILED&&(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c95)),s0}function peg$parseString(){var s0,s2,s3;if(peg$silentFails++,s0=peg$currPos,peg$parseQuoteMark()!==peg$FAILED){for(s2=[],s3=peg$parseChar();s3!==peg$FAILED;)s2.push(s3),s3=peg$parseChar();s2!==peg$FAILED&&(s3=peg$parseQuoteMark())!==peg$FAILED?(peg$savedPos=s0,s0=peg$c94(s2)):(peg$currPos=s0,s0=peg$FAILED)}else peg$currPos=s0,s0=peg$FAILED;return peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c98),s0}function peg$parseAtom(){var s0,s1,s2;if(peg$silentFails++,s0=peg$currPos,s1=[],peg$c100.test(input.charAt(peg$currPos))?(s2=input.charAt(peg$currPos),peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c101)),s2!==peg$FAILED)for(;s2!==peg$FAILED;)s1.push(s2),peg$c100.test(input.charAt(peg$currPos))?(s2=input.charAt(peg$currPos),peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c101));else s1=peg$FAILED;return s1!==peg$FAILED&&(peg$savedPos=s0,s1=peg$c102(s1)),s0=s1,peg$silentFails--,s0===peg$FAILED&&(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c99)),s0}function peg$parseLabel(){var s0;return peg$silentFails++,(s0=peg$parseAtom())===peg$FAILED&&(s0=peg$parseString()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c103),s0}function peg$parseColor(){var s0;return peg$silentFails++,input.substr(peg$currPos,3)===peg$c105?(s0=peg$c105,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c106)),s0===peg$FAILED&&(input.substr(peg$currPos,5)===peg$c107?(s0=peg$c107,peg$currPos+=5):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c108)),s0===peg$FAILED&&(input.substr(peg$currPos,4)===peg$c109?(s0=peg$c109,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c110)))),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c104),s0}function peg$parseArrowItemKey(){var s0;return input.substr(peg$currPos,9)===peg$c111?(s0=peg$c111,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c112)),s0===peg$FAILED&&(input.substr(peg$currPos,10)===peg$c113?(s0=peg$c113,peg$currPos+=10):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c114)),s0===peg$FAILED&&(input.substr(peg$currPos,10)===peg$c115?(s0=peg$c115,peg$currPos+=10):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c116)))),s0}function peg$parseArrowItem(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED&&(s2=peg$parseArrowItemKey())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c121(s2,s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseSingleEdgeColor(){var s0,s2,s4,s6,s8;return peg$silentFails++,s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,10)===peg$c123?(s2=peg$c123,peg$currPos+=10):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c124)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseColor())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c125(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c122),s0}function peg$parseArrowItems(){var s0,s1;if((s0=peg$parseSingleEdgeColor())===peg$FAILED)if(s0=[],(s1=peg$parseArrowItem())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseArrowItem();else s0=peg$FAILED;return s0}function peg$parseArrowDesc(){var s0,s1,s3,s5;return s0=peg$currPos,123===input.charCodeAt(peg$currPos)?(s1=peg$c126,peg$currPos++):(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s1!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s3=peg$parseArrowItems())===peg$FAILED&&(s3=null),s3!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(125===input.charCodeAt(peg$currPos)?(s5=peg$c128,peg$currPos++):(s5=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c129)),s5!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c130(s3)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseLabelList(){var s0,s1,s3,s4,s5,s6;if(s0=peg$currPos,91===input.charCodeAt(peg$currPos)?(s1=peg$c131,peg$currPos++):(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c132)),s1!==peg$FAILED)if(peg$parseWhitespace()!==peg$FAILED){for(s3=[],s4=peg$currPos,(s5=peg$parseLabel())!==peg$FAILED&&(s6=peg$parseWhitespace())!==peg$FAILED?s4=s5=[s5,s6]:(peg$currPos=s4,s4=peg$FAILED);s4!==peg$FAILED;)s3.push(s4),s4=peg$currPos,(s5=peg$parseLabel())!==peg$FAILED&&(s6=peg$parseWhitespace())!==peg$FAILED?s4=s5=[s5,s6]:(peg$currPos=s4,s4=peg$FAILED);s3!==peg$FAILED?(93===input.charCodeAt(peg$currPos)?(s4=peg$c133,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c134)),s4!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c135(s3)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)}else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;return s0}function peg$parseLabelOrLabelList(){var s0;return(s0=peg$parseLabelList())===peg$FAILED&&(s0=peg$parseLabel()),s0}function peg$parseSubexp(){var s0,s2,s4,s6,s8,s10,s12,s14;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?((s2=peg$parseActionLabel())===peg$FAILED&&(s2=null),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s4=peg$parseArrowDesc())===peg$FAILED&&(s4=null),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseArrow())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseArrowDesc())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s10=peg$parseActionLabel())===peg$FAILED&&(s10=null),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s12=peg$parseLabelOrLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s14=peg$parseSubexp())===peg$FAILED&&(s14=null),s14!==peg$FAILED?(peg$savedPos=s0,s0=peg$c136(s2,s4,s6,s8,s10,s12,s14)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseExp(){var s0,s1,s2,s4;return s0=peg$currPos,(s1=peg$parseLabelOrLabelList())!==peg$FAILED&&(s2=peg$parseSubexp())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s4=peg$c119,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c137(s1,s2)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseValidationKey(){var s0;return input.substr(peg$currPos,9)===peg$c138?(s0=peg$c138,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c139)),s0===peg$FAILED&&(input.substr(peg$currPos,4)===peg$c140?(s0=peg$c140,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c141))),s0}function peg$parseValidationItem(){var s0,s1,s2,s3,s4;return s0=peg$currPos,(s1=peg$parseValidationKey())!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s2=peg$c117,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s2!==peg$FAILED&&(s3=peg$parseLabel())!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s4=peg$c119,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s4!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c142(s1,s3)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseValidationItems(){var s0,s1;if(s0=[],(s1=peg$parseValidationItem())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseValidationItem();else s0=peg$FAILED;return s0}function peg$parseConfigValidation(){var s0,s2,s4,s6,s8,s10;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,10)===peg$c143?(s2=peg$c143,peg$currPos+=10):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c144)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(123===input.charCodeAt(peg$currPos)?(s6=peg$c126,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseValidationItems())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,2)===peg$c145?(s10=peg$c145,peg$currPos+=2):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c146)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c147(s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGvizLayout(){var s0;return input.substr(peg$currPos,3)===peg$c148?(s0=peg$c148,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c149)),s0===peg$FAILED&&(input.substr(peg$currPos,5)===peg$c150?(s0=peg$c150,peg$currPos+=5):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c151)),s0===peg$FAILED&&(input.substr(peg$currPos,3)===peg$c152?(s0=peg$c152,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c153)),s0===peg$FAILED&&(input.substr(peg$currPos,5)===peg$c154?(s0=peg$c154,peg$currPos+=5):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c155))))),s0}function peg$parseStateItemShapeKey(){var s0;return input.substr(peg$currPos,8)===peg$c156?(s0=peg$c156,peg$currPos+=8):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c157)),s0===peg$FAILED&&(input.substr(peg$currPos,9)===peg$c158?(s0=peg$c158,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c159)),s0===peg$FAILED&&(input.substr(peg$currPos,10)===peg$c160?(s0=peg$c160,peg$currPos+=10):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c161)))),s0}function peg$parseStateItemShape(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED&&(s2=peg$parseStateItemShapeKey())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseGvizShape())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c121(s2,s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseStateItems(){var s0,s1;if(s0=[],(s1=peg$parseStateItemShape())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseStateItemShape();else s0=peg$FAILED;return s0}function peg$parseConfigState(){var s0,s2,s4,s6,s8,s10;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,5)===peg$c162?(s2=peg$c162,peg$currPos+=5):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c163)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(123===input.charCodeAt(peg$currPos)?(s6=peg$c126,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseStateItems())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,2)===peg$c145?(s10=peg$c145,peg$currPos+=2):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c146)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c164(s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseActionKey(){var s0;return input.substr(peg$currPos,9)===peg$c138?(s0=peg$c138,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c139)),s0===peg$FAILED&&(input.substr(peg$currPos,4)===peg$c140?(s0=peg$c140,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c141))),s0}function peg$parseActionItem(){var s0,s1,s2,s3,s4;return s0=peg$currPos,(s1=peg$parseActionKey())!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s2=peg$c117,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s2!==peg$FAILED&&(s3=peg$parseLabel())!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s4=peg$c119,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s4!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c165(s1,s3)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseActionItems(){var s0,s1;if(s0=[],(s1=peg$parseActionItem())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseActionItem();else s0=peg$FAILED;return s0}function peg$parseConfigAction(){var s0,s2,s4,s6,s8,s10;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,6)===peg$c166?(s2=peg$c166,peg$currPos+=6):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c167)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(123===input.charCodeAt(peg$currPos)?(s6=peg$c126,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseActionItems())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,2)===peg$c145?(s10=peg$c145,peg$currPos+=2):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c146)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c168(s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseTransitionKey(){var s0;return input.substr(peg$currPos,9)===peg$c138?(s0=peg$c138,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c139)),s0===peg$FAILED&&(input.substr(peg$currPos,4)===peg$c140?(s0=peg$c140,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c141))),s0}function peg$parseTransitionItem(){var s0,s1,s2,s3,s4;return s0=peg$currPos,(s1=peg$parseTransitionKey())!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s2=peg$c117,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s2!==peg$FAILED&&(s3=peg$parseLabel())!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s4=peg$c119,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s4!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c169(s1,s3)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseTransitionItems(){var s0,s1;if((s0=peg$parseGraphDefaultEdgeColor())===peg$FAILED)if(s0=[],(s1=peg$parseTransitionItem())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseTransitionItem();else s0=peg$FAILED;return s0}function peg$parseGraphDefaultEdgeColor(){var s0,s2,s4,s6,s8;return peg$silentFails++,s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,10)===peg$c123?(s2=peg$c123,peg$currPos+=10):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c124)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseColor())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c171(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c170),s0}function peg$parseConfigTransition(){var s0,s2,s4,s6,s8,s10;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,10)===peg$c172?(s2=peg$c172,peg$currPos+=10):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c173)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(123===input.charCodeAt(peg$currPos)?(s6=peg$c126,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseTransitionItems())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,2)===peg$c145?(s10=peg$c145,peg$currPos+=2):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c146)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c174(s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGraphBg(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,8)===peg$c175?(s2=peg$c175,peg$currPos+=8):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c176)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseGvizShape())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c177(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseMinTransitionsPerState(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,25)===peg$c178?(s2=peg$c178,peg$currPos+=25):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c179)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c180(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseMaxTransitionsPerState(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,25)===peg$c181?(s2=peg$c181,peg$currPos+=25):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c182)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c183(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGraphInputs(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,6)===peg$c184?(s2=peg$c184,peg$currPos+=6):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c185)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c186(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGraphOutputs(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,7)===peg$c187?(s2=peg$c187,peg$currPos+=7):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c188)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c189(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGraphStartNodes(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,11)===peg$c190?(s2=peg$c190,peg$currPos+=11):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c191)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c192(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGraphEndNodes(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,9)===peg$c193?(s2=peg$c193,peg$currPos+=9):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c194)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c195(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGraphItem(){var s0;return(s0=peg$parseGraphBg())===peg$FAILED&&(s0=peg$parseMinTransitionsPerState())===peg$FAILED&&(s0=peg$parseMaxTransitionsPerState())===peg$FAILED&&(s0=peg$parseGraphStartNodes())===peg$FAILED&&(s0=peg$parseGraphEndNodes())===peg$FAILED&&(s0=peg$parseGraphInputs())===peg$FAILED&&(s0=peg$parseGraphOutputs()),s0}function peg$parseGraphItems(){var s0,s1;if(s0=[],(s1=peg$parseGraphItem())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseGraphItem();else s0=peg$FAILED;return s0}function peg$parseConfigGraph(){var s0,s2,s4,s6,s8,s10;return peg$silentFails++,s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,5)===peg$c197?(s2=peg$c197,peg$currPos+=5):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c198)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(123===input.charCodeAt(peg$currPos)?(s6=peg$c126,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseGraphItems())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,2)===peg$c145?(s10=peg$c145,peg$currPos+=2):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c146)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c199(s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c196),s0}function peg$parseConfigGraphLayout(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,12)===peg$c200?(s2=peg$c200,peg$currPos+=12):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c201)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseGvizLayout())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c202(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseConfig(){var s0;return peg$silentFails++,(s0=peg$parseConfigGraph())===peg$FAILED&&(s0=peg$parseConfigGraphLayout())===peg$FAILED&&(s0=peg$parseConfigTransition())===peg$FAILED&&(s0=peg$parseConfigAction())===peg$FAILED&&(s0=peg$parseConfigState())===peg$FAILED&&(s0=peg$parseConfigValidation()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c203),s0}function peg$parseStateColor(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,5)===peg$c204?(s2=peg$c204,peg$currPos+=5):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c205)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseColor())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c206(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseArbitraryStateQuality(){var s0,s2,s4,s6,s8;return peg$silentFails++,s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED&&(s2=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c208(s2,s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c207),s0}function peg$parseStateQuality(){var s0;return(s0=peg$parseStateColor())===peg$FAILED&&(s0=peg$parseArbitraryStateQuality()),s0}function peg$parseStateDef(){var s0,s2,s4,s6,s8,s9,s10,s12;if(peg$silentFails++,s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED)if(input.substr(peg$currPos,5)===peg$c162?(s2=peg$c162,peg$currPos+=5):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c163)),s2!==peg$FAILED)if(peg$parseWhitespace()!==peg$FAILED)if((s4=peg$parseLabel())!==peg$FAILED)if(peg$parseWhitespace()!==peg$FAILED)if(91===input.charCodeAt(peg$currPos)?(s6=peg$c131,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c132)),s6!==peg$FAILED)if(peg$parseWhitespace()!==peg$FAILED){for(s8=[],s9=peg$parseStateQuality();s9!==peg$FAILED;)s8.push(s9),s9=peg$parseStateQuality();s8!==peg$FAILED&&(s9=peg$parseWhitespace())!==peg$FAILED?(93===input.charCodeAt(peg$currPos)?(s10=peg$c133,peg$currPos++):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c134)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s12=peg$c119,peg$currPos++):(s12=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s12!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c210(s4,s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)}else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;return peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c209),s0}function peg$parseMachineName(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,12)===peg$c211?(s2=peg$c211,peg$currPos+=12):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c212)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c213(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseStateGroupDef(){var s0,s2,s4,s6,s8,s10;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,5)===peg$c214?(s2=peg$c214,peg$currPos+=5):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c215)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s4=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s6=peg$c117,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s8=peg$parseLabelOrLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s10=peg$c119,peg$currPos++):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c216(s4,s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseTerm(){var s0;return(s0=peg$parseExp())===peg$FAILED&&(s0=peg$parseStateDef())===peg$FAILED&&(s0=peg$parseMachineName())===peg$FAILED&&(s0=peg$parseStateGroupDef())===peg$FAILED&&(s0=peg$parseConfig()),s0}function peg$parseTermList(){var s0,s1;for(s0=[],s1=peg$parseTerm();s1!==peg$FAILED;)s0.push(s1),s1=peg$parseTerm();return s0}options=void 0!==options?options:{};var peg$result,peg$FAILED={},peg$startRuleFunctions={Document:peg$parseDocument},peg$startRuleFunction=peg$parseDocument,peg$c0=function(e){return e},peg$c1="square",peg$c2=peg$literalExpectation("square",!1),peg$c3="rectangle",peg$c4=peg$literalExpectation("rectangle",!1),peg$c5="circle",peg$c6=peg$literalExpectation("circle",!1),peg$c7=peg$otherExpectation("forward light arrow ->"),peg$c8="->",peg$c9=peg$literalExpectation("->",!1),peg$c10=peg$otherExpectation("two way light arrow <->"),peg$c11="<->",peg$c12=peg$literalExpectation("<->",!1),peg$c13=peg$otherExpectation("back light arrow <-"),peg$c14="<-",peg$c15=peg$literalExpectation("<-",!1),peg$c16=peg$otherExpectation("forward fat arrow =>"),peg$c17="=>",peg$c18=peg$literalExpectation("=>",!1),peg$c19=peg$otherExpectation("two way fat arrow <=>"),peg$c20="<=>",peg$c21=peg$literalExpectation("<=>",!1),peg$c22=peg$otherExpectation("back fat arrow <="),peg$c23="<=",peg$c24=peg$literalExpectation("<=",!1),peg$c25=peg$otherExpectation("forward tilde arrow ~>"),peg$c26="~>",peg$c27=peg$literalExpectation("~>",!1),peg$c28=peg$otherExpectation("two way tilde arrow <~>"),peg$c29="<~>",peg$c30=peg$literalExpectation("<~>",!1),peg$c31=peg$otherExpectation("back tilde arrow <~"),peg$c32="<~",peg$c33=peg$literalExpectation("<~",!1),peg$c34=peg$otherExpectation("light fat arrow <-=>"),peg$c35="<-=>",peg$c36=peg$literalExpectation("<-=>",!1),peg$c37=peg$otherExpectation("light tilde arrow <-~>"),peg$c38="<-~>",peg$c39=peg$literalExpectation("<-~>",!1),peg$c40=peg$otherExpectation("fat light arrow <=->"),peg$c41="<=->",peg$c42=peg$literalExpectation("<=->",!1),peg$c43=peg$otherExpectation("fat tilde arrow <=~>"),peg$c44="<=~>",peg$c45=peg$literalExpectation("<=~>",!1),peg$c46=peg$otherExpectation("tilde light arrow <~->"),peg$c47="<~->",peg$c48=peg$literalExpectation("<~->",!1),peg$c49=peg$otherExpectation("tilde fat arrow <~=>"),peg$c50="<~=>",peg$c51=peg$literalExpectation("<~=>",!1),peg$c52=peg$otherExpectation("light arrow"),peg$c53=peg$otherExpectation("fat arrow"),peg$c54=peg$otherExpectation("tilde arrow"),peg$c55=peg$otherExpectation("mixed arrow"),peg$c56=peg$otherExpectation("arrow"),peg$c57=/^[0-9a-fA-F]/,peg$c58=peg$classExpectation([["0","9"],["a","f"],["A","F"]],!1,!1),peg$c59='"',peg$c60=peg$literalExpectation('"',!1),peg$c61="\\",peg$c62=peg$literalExpectation("\\",!1),peg$c63="/",peg$c64=peg$literalExpectation("/",!1),peg$c65="b",peg$c66=peg$literalExpectation("b",!1),peg$c67=function(){return"\b"},peg$c68="f",peg$c69=peg$literalExpectation("f",!1),peg$c70=function(){return"\f"},peg$c71="n",peg$c72=peg$literalExpectation("n",!1),peg$c73=function(){return"\n"},peg$c74="r",peg$c75=peg$literalExpectation("r",!1),peg$c76=function(){return"\r"},peg$c77="t",peg$c78=peg$literalExpectation("t",!1),peg$c79=function(){return"\t"},peg$c80="v",peg$c81=peg$literalExpectation("v",!1),peg$c82=function(){return"\v"},peg$c83="u",peg$c84=peg$literalExpectation("u",!1),peg$c85=function(digits){return String.fromCharCode(parseInt(digits,16))},peg$c86=function(Sequence){return Sequence},peg$c87=/^[ -!#-[\]-\u10FFFF]/,peg$c88=peg$classExpectation([[" ","!"],["#","["],["]","ჿ"],"F","F"],!1,!1),peg$c89="'",peg$c90=peg$literalExpectation("'",!1),peg$c91=/^[ -&(-[\]-\u10FFFF]/,peg$c92=peg$classExpectation([[" ","&"],["(","["],["]","ჿ"],"F","F"],!1,!1),peg$c93=peg$otherExpectation("action label"),peg$c94=function(chars){return chars.join("")},peg$c95=peg$otherExpectation("whitespace"),peg$c96=/^[ \t\n\r\x0B]/,peg$c97=peg$classExpectation([" ","\t","\n","\r","\v"],!1,!1),peg$c98=peg$otherExpectation("string"),peg$c99=peg$otherExpectation("atom"),peg$c100=/^[0-9a-zA-Z.+_&()%$#@!?,']/,peg$c101=peg$classExpectation([["0","9"],["a","z"],["A","Z"],".","+","_","&","(",")","%","$","#","@","!","?",",","'"],!1,!1),peg$c102=function(text){return text.join("")},peg$c103=peg$otherExpectation("label"),peg$c104=peg$otherExpectation("color"),peg$c105="red",peg$c106=peg$literalExpectation("red",!1),peg$c107="green",peg$c108=peg$literalExpectation("green",!1),peg$c109="blue",peg$c110=peg$literalExpectation("blue",!1),peg$c111="arc_label",peg$c112=peg$literalExpectation("arc_label",!1),peg$c113="head_label",peg$c114=peg$literalExpectation("head_label",!1),peg$c115="tail_label",peg$c116=peg$literalExpectation("tail_label",!1),peg$c117=":",peg$c118=peg$literalExpectation(":",!1),peg$c119=";",peg$c120=peg$literalExpectation(";",!1),peg$c121=function(key,value){return{key:key,value:value}},peg$c122=peg$otherExpectation("single edge color"),peg$c123="edge_color",peg$c124=peg$literalExpectation("edge_color",!1),peg$c125=function(value){return{key:"single_edge_color",value:value}},peg$c126="{",peg$c127=peg$literalExpectation("{",!1),peg$c128="}",peg$c129=peg$literalExpectation("}",!1),peg$c130=function(items){return items},peg$c131="[",peg$c132=peg$literalExpectation("[",!1),peg$c133="]",peg$c134=peg$literalExpectation("]",!1),peg$c135=function(names){return names.map(function(i){return i[0]})},peg$c136=function(r_action,l_desc,arrow,r_desc,l_action,label,tail){var base={kind:arrow,to:label};return tail&&tail!==[]&&(base.se=tail),l_desc&&(base.l_desc=l_desc),r_desc&&(base.r_desc=r_desc),l_action&&(base.l_action=l_action),r_action&&(base.r_action=r_action),base},peg$c137=function(label,se){var base={key:"transition",from:label};return se&&se!==[]&&(base.se=se),base},peg$c138="whargarbl",peg$c139=peg$literalExpectation("whargarbl",!1),peg$c140="todo",peg$c141=peg$literalExpectation("todo",!1),peg$c142=function(validationkey,value){return{key:validationkey,value:value}},peg$c143="validation",peg$c144=peg$literalExpectation("validation",!1),peg$c145="};",peg$c146=peg$literalExpectation("};",!1),peg$c147=function(validation_items){return{config_kind:"validation",config_items:validation_items||[]}},peg$c148="dot",peg$c149=peg$literalExpectation("dot",!1),peg$c150="circo",peg$c151=peg$literalExpectation("circo",!1),peg$c152="fdp",peg$c153=peg$literalExpectation("fdp",!1),peg$c154="neato",peg$c155=peg$literalExpectation("neato",!1),peg$c156="in_shape",peg$c157=peg$literalExpectation("in_shape",!1),peg$c158="out_shape",peg$c159=peg$literalExpectation("out_shape",!1),peg$c160="node_shape",peg$c161=peg$literalExpectation("node_shape",!1),peg$c162="state",peg$c163=peg$literalExpectation("state",!1),peg$c164=function(state_items){return{config_kind:"state",config_items:state_items||[]}},peg$c165=function(actionkey,value){return{key:actionkey,value:value}},peg$c166="action",peg$c167=peg$literalExpectation("action",!1),peg$c168=function(action_items){return{config_kind:"action",config_items:action_items||[]}},peg$c169=function(transitionkey,value){return{key:transitionkey,value:value}},peg$c170=peg$otherExpectation("graph default edge color"),peg$c171=function(value){return{key:"graph_default_edge_color",value:value}},peg$c172="transition",peg$c173=peg$literalExpectation("transition",!1),peg$c174=function(transition_items){return{config_kind:"transition",config_items:transition_items||[]}},peg$c175="graph_bg",peg$c176=peg$literalExpectation("graph_bg",!1),peg$c177=function(value){return{key:"graph_bg",value:value}},peg$c178="min_transitions_per_state",peg$c179=peg$literalExpectation("min_transitions_per_state",!1),peg$c180=function(value){return{key:"min_transitions_per_state",value:value}},peg$c181="max_transitions_per_state",peg$c182=peg$literalExpectation("max_transitions_per_state",!1),peg$c183=function(value){return{key:"max_transitions_per_state",value:value}},peg$c184="inputs",peg$c185=peg$literalExpectation("inputs",!1),peg$c186=function(value){return{key:"inputs",value:value}},peg$c187="outputs",peg$c188=peg$literalExpectation("outputs",!1),peg$c189=function(value){return{key:"outputs",value:value}},peg$c190="start_nodes",peg$c191=peg$literalExpectation("start_nodes",!1),peg$c192=function(value){return{key:"start_nodes",value:value}},peg$c193="end_nodes",peg$c194=peg$literalExpectation("end_nodes",!1),peg$c195=function(value){return{key:"end_nodes",value:value}},peg$c196=peg$otherExpectation("graph configuration"),peg$c197="graph",peg$c198=peg$literalExpectation("graph",!1),peg$c199=function(graph_items){return{config_kind:"graph",config_items:graph_items||[]}},peg$c200="graph_layout",peg$c201=peg$literalExpectation("graph_layout",!1),peg$c202=function(value){return{key:"graph_layout",value:value}},peg$c203=peg$otherExpectation("configuration"),peg$c204="color",peg$c205=peg$literalExpectation("color",!1),peg$c206=function(value){return{key:"state color",value:value}},peg$c207=peg$otherExpectation("state quality"),peg$c208=function(name,value){return{key:"state quality",name:name,value:value}},peg$c209=peg$otherExpectation("state definition"),peg$c210=function(name,sq){return{key:"State qualities",value:sq}},peg$c211="machine name",peg$c212=peg$literalExpectation("machine name",!1),peg$c213=function(name){return{key:"Machine name",value:name}},peg$c214="group",peg$c215=peg$literalExpectation("group",!1),peg$c216=function(name,nl){return{key:"group definition",value:{name:name,list:nl}}},peg$currPos=0,peg$savedPos=0,peg$posDetailsCache=[{line:1,column:1}],peg$maxFailPos=0,peg$maxFailExpected=[],peg$silentFails=0;if("startRule"in options){if(!(options.startRule in peg$startRuleFunctions))throw new Error("Can't start parsing from rule \""+options.startRule+'".');peg$startRuleFunction=peg$startRuleFunctions[options.startRule]}if((peg$result=peg$startRuleFunction())!==peg$FAILED&&peg$currPos===input.length)return peg$result;throw peg$result!==peg$FAILED&&peg$currPos1&&void 0!==arguments[1]?arguments[1]:"probability";if(!Array.isArray(options))throw new TypeError("options must be a non-empty array of objects");if("object"!==_typeof(options[0]))throw new TypeError("options must be a non-empty array of objects");for(var or_one=function(item){return void 0===item?1:item},rnd=function(cap){return Math.random()*cap}(options.reduce(function(acc,val){return acc+or_one(val[probability_property])},0)),cursor=0,cursor_sum=0;(cursor_sum+=options[cursor++][probability_property])<=rnd;);return options[cursor-1]},seq=function(n){return new Array(n).fill(!0).map(function(_,i){return i})},histograph=function(a){return a.sort().reduce(function(m,v){return m.set(v,m.has(v)?m.get(v)+1:1),m},new Map)},weighted_sample_select=function(n,options,probability_property){return seq(n).map(function(i){return weighted_rand_select(options,probability_property)})};exports.seq=seq,exports.histograph=histograph,exports.weighted_histo_key=function(n,options,probability_property,extract){return histograph(weighted_sample_select(n,options,probability_property).map(function(s){return s[extract]}))},exports.weighted_rand_select=weighted_rand_select,exports.weighted_sample_select=weighted_sample_select},{}],jssm:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i":case"=>":case"~>":return"none";case"<-":case"<->":case"<-=>":case"<-~>":return"legal";case"<=":case"<=>":case"<=->":case"<=~>":return"main";case"<~":case"<~>":case"<~->":case"<~=>":return"forced";default:throw new Error("arrow_direction: unknown arrow type "+arrow)}}function arrow_right_kind(arrow){switch(String(arrow)){case"<-":case"<=":case"<~":return"none";case"->":case"<->":case"<=->":case"<~->":return"legal";case"=>":case"<=>":case"<-=>":case"<~=>":return"main";case"~>":case"<~>":case"<-~>":case"<=~>":return"forced";default:throw new Error("arrow_direction: unknown arrow type "+arrow)}}function compile_rule_transition_step(acc,from,to,this_se,next_se){var edges=[],uFrom=Array.isArray(from)?from:[from],uTo=Array.isArray(to)?to:[to];uFrom.map(function(f){uTo.map(function(t){var rk=arrow_right_kind(this_se.kind),lk=arrow_left_kind(this_se.kind),right={from:f,to:t,kind:rk,forced_only:"forced"===rk,main_path:"main"===rk};this_se.r_action&&(right.action=this_se.r_action),"none"!==right.kind&&edges.push(right);var left={from:t,to:f,kind:lk,forced_only:"forced"===lk,main_path:"main"===lk};this_se.l_action&&(left.action=this_se.l_action),"none"!==left.kind&&edges.push(left)})});var new_acc=acc.concat(edges);return next_se?compile_rule_transition_step(new_acc,to,next_se.to,next_se,next_se.se):new_acc}function compile_rule_handle_transition(rule){return compile_rule_transition_step([],rule.from,rule.se.to,rule.se,rule.se.se)}function compile_rule_handler(rule){if("transition"===rule.key)return{agg_as:"transition",val:compile_rule_handle_transition(rule)};if("graph_layout"===rule.key)return{agg_as:"graph_layout",val:rule.value};throw new Error("compile_rule_handler: Unknown rule: "+JSON.stringify(rule))}function compile(tree){var _ref,results={graph_layout:[],transition:[]};if(tree.map(function(tr){var rule=compile_rule_handler(tr),agg_as=rule.agg_as,val=rule.val;results[agg_as]=results[agg_as].concat(val)}),results.graph_layout.length>1)throw new Error("May only have one graph_layout statement maximum: "+JSON.stringify(results.graph_layout));var assembled_transitions=(_ref=[]).concat.apply(_ref,_toConsumableArray(results.transition)),result_cfg={initial_state:assembled_transitions[0].from,transitions:assembled_transitions};return results.graph_layout.length&&(result_cfg.layout=results.graph_layout[0]),result_cfg}function make(plan){return compile(parse(plan))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.weighted_histo_key=exports.weighted_sample_select=exports.histograph=exports.weighted_rand_select=exports.seq=exports.arrow_right_kind=exports.arrow_left_kind=exports.arrow_direction=exports.sm=exports.compile=exports.parse=exports.make=exports.Machine=exports.version=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:this.state();return{entrances:this.list_entrances(whichState),exits:this.list_exits(whichState)}}},{key:"list_entrances",value:function(){var whichState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state();return(this._states.get(whichState)||{}).from||[]}},{key:"list_exits",value:function(){var whichState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state();return(this._states.get(whichState)||{}).to||[]}},{key:"probable_exits_for",value:function(whichState){var _this2=this,wstate=this._states.get(whichState);if(!wstate)throw new Error("No such state "+JSON.stringify(whichState)+" in probable_exits_for");return wstate.to.map(function(ws){return _this2.lookup_transition_for(_this2.state(),ws)}).filter(Boolean)}},{key:"probabilistic_transition",value:function(){var selected=(0,_jssmUtil.weighted_rand_select)(this.probable_exits_for(this.state()));return this.transition(selected.to)}},{key:"probabilistic_walk",value:function(n){var _this3=this;return(0,_jssmUtil.seq)(n).map(function(){var state_was=_this3.state();return _this3.probabilistic_transition(),state_was}).concat([this.state()])}},{key:"probabilistic_histo_walk",value:function(n){return(0,_jssmUtil.histograph)(this.probabilistic_walk(n))}},{key:"actions",value:function(){var whichState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state(),wstate=this._reverse_actions.get(whichState);if(wstate)return[].concat(_toConsumableArray(wstate.keys()));throw new Error("No such state "+JSON.stringify(whichState))}},{key:"list_states_having_action",value:function(whichState){var wstate=this._actions.get(whichState);if(wstate)return[].concat(_toConsumableArray(wstate.keys()));throw new Error("No such state "+JSON.stringify(whichState))}},{key:"list_exit_actions",value:function(){var _this4=this,whichState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state(),ra_base=this._reverse_actions.get(whichState);if(!ra_base)throw new Error("No such state "+JSON.stringify(whichState));return[].concat(_toConsumableArray(ra_base.values())).map(function(edgeId){return _this4._edges[edgeId]}).filter(function(o){return o.from===whichState}).map(function(filtered){return filtered.action})}},{key:"probable_action_exits",value:function(){var _this5=this,whichState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state(),ra_base=this._reverse_actions.get(whichState);if(!ra_base)throw new Error("No such state "+JSON.stringify(whichState));return[].concat(_toConsumableArray(ra_base.values())).map(function(edgeId){return _this5._edges[edgeId]}).filter(function(o){return o.from===whichState}).map(function(filtered){return{action:filtered.action,probability:filtered.probability}})}},{key:"is_unenterable",value:function(whichState){return 0===this.list_entrances(whichState).length}},{key:"has_unenterables",value:function(){var _this6=this;return this.states().some(function(x){return _this6.is_unenterable(x)})}},{key:"is_terminal",value:function(){return this.state_is_terminal(this.state())}},{key:"state_is_terminal",value:function(whichState){return 0===this.list_exits(whichState).length}},{key:"has_terminals",value:function(){var _this7=this;return this.states().some(function(x){return _this7.state_is_terminal(x)})}},{key:"is_complete",value:function(){return this.state_is_complete(this.state())}},{key:"state_is_complete",value:function(whichState){var wstate=this._states.get(whichState);if(wstate)return wstate.complete;throw new Error("No such state "+JSON.stringify(whichState))}},{key:"has_completes",value:function(){var _this8=this;return this.states().some(function(x){return _this8.state_is_complete(x)})}},{key:"action",value:function(name,newData){if(this.valid_action(name,newData)){var edge=this.current_action_edge_for(name);return this._state=edge.to,!0}return!1}},{key:"transition",value:function(newState,newData){return!!this.valid_transition(newState,newData)&&(this._state=newState,!0)}},{key:"force_transition",value:function(newState,newData){return!!this.valid_force_transition(newState,newData)&&(this._state=newState,!0)}},{key:"current_action_for",value:function(action){var action_base=this._actions.get(action);return action_base?action_base.get(this.state()):void 0}},{key:"current_action_edge_for",value:function(action){var idx=this.current_action_for(action);if(void 0===idx||null===idx)throw new Error("No such action "+JSON.stringify(action));return this._edges[idx]}},{key:"valid_action",value:function(action,_newData){return void 0!==this.current_action_for(action)}},{key:"valid_transition",value:function(newState,_newData){var transition_for=this.lookup_transition_for(this.state(),newState);return!!transition_for&&!transition_for.forced_only}},{key:"valid_force_transition",value:function(newState,_newData){return void 0!==this.lookup_transition_for(this.state(),newState)}}]),Machine}();exports.version="4.4.1",exports.Machine=Machine,exports.make=make,exports.parse=parse,exports.compile=compile,exports.sm=function(template_strings){var _arguments=arguments;return new Machine(make(template_strings.reduce(function(acc,val,idx){return""+acc+_arguments[idx]+val})))},exports.arrow_direction=function(arrow){switch(String(arrow)){case"->":case"=>":case"~>":return"right";case"<-":case"<=":case"<~":return"left";case"<->":case"<-=>":case"<-~>":case"<=>":case"<=->":case"<=~>":case"<~>":case"<~->":case"<~=>":return"both";default:throw new Error("arrow_direction: unknown arrow type "+arrow)}},exports.arrow_left_kind=arrow_left_kind,exports.arrow_right_kind=arrow_right_kind,exports.seq=_jssmUtil.seq,exports.weighted_rand_select=_jssmUtil.weighted_rand_select,exports.histograph=_jssmUtil.histograph,exports.weighted_sample_select=_jssmUtil.weighted_sample_select,exports.weighted_histo_key=_jssmUtil.weighted_histo_key},{"./jssm-dot.js":1,"./jssm-util.js":2}]},{},[]); \ No newline at end of file +require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o0){for(i=1,j=1;ipeg$maxFailPos&&(peg$maxFailPos=peg$currPos,peg$maxFailExpected=[]),peg$maxFailExpected.push(expected))}function peg$buildStructuredError(expected,found,location){return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected,found),expected,found,location)}function peg$parseDocument(){var s0,s2;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED&&(s2=peg$parseTermList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c0(s2)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGvizShape(){var s0;return input.substr(peg$currPos,6)===peg$c1?(s0=peg$c1,peg$currPos+=6):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c2)),s0===peg$FAILED&&(input.substr(peg$currPos,9)===peg$c3?(s0=peg$c3,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c4)),s0===peg$FAILED&&(input.substr(peg$currPos,6)===peg$c5?(s0=peg$c5,peg$currPos+=6):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c6)))),s0}function peg$parseForwardLightArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c8?(s0=peg$c8,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c9)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c7),s0}function peg$parseTwoWayLightArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,3)===peg$c11?(s0=peg$c11,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c12)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c10),s0}function peg$parseBackLightArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c14?(s0=peg$c14,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c15)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c13),s0}function peg$parseForwardFatArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c17?(s0=peg$c17,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c18)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c16),s0}function peg$parseTwoWayFatArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,3)===peg$c20?(s0=peg$c20,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c21)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c19),s0}function peg$parseBackFatArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c23?(s0=peg$c23,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c24)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c22),s0}function peg$parseForwardTildeArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c26?(s0=peg$c26,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c27)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c25),s0}function peg$parseTwoWayTildeArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,3)===peg$c29?(s0=peg$c29,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c30)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c28),s0}function peg$parseBackTildeArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,2)===peg$c32?(s0=peg$c32,peg$currPos+=2):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c33)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c31),s0}function peg$parseLightFatArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c35?(s0=peg$c35,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c36)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c34),s0}function peg$parseLightTildeArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c38?(s0=peg$c38,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c39)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c37),s0}function peg$parseFatLightArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c41?(s0=peg$c41,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c42)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c40),s0}function peg$parseFatTildeArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c44?(s0=peg$c44,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c45)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c43),s0}function peg$parseTildeLightArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c47?(s0=peg$c47,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c48)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c46),s0}function peg$parseTildeFatArrow(){var s0;return peg$silentFails++,input.substr(peg$currPos,4)===peg$c50?(s0=peg$c50,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c51)),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c49),s0}function peg$parseLightArrow(){var s0;return peg$silentFails++,(s0=peg$parseForwardLightArrow())===peg$FAILED&&(s0=peg$parseTwoWayLightArrow())===peg$FAILED&&(s0=peg$parseBackLightArrow()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c52),s0}function peg$parseFatArrow(){var s0;return peg$silentFails++,(s0=peg$parseForwardFatArrow())===peg$FAILED&&(s0=peg$parseTwoWayFatArrow())===peg$FAILED&&(s0=peg$parseBackFatArrow()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c53),s0}function peg$parseTildeArrow(){var s0;return peg$silentFails++,(s0=peg$parseForwardTildeArrow())===peg$FAILED&&(s0=peg$parseTwoWayTildeArrow())===peg$FAILED&&(s0=peg$parseBackTildeArrow()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c54),s0}function peg$parseMixedArrow(){var s0;return peg$silentFails++,(s0=peg$parseLightFatArrow())===peg$FAILED&&(s0=peg$parseLightTildeArrow())===peg$FAILED&&(s0=peg$parseFatLightArrow())===peg$FAILED&&(s0=peg$parseFatTildeArrow())===peg$FAILED&&(s0=peg$parseTildeLightArrow())===peg$FAILED&&(s0=peg$parseTildeFatArrow()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c55),s0}function peg$parseArrow(){var s0;return peg$silentFails++,(s0=peg$parseMixedArrow())===peg$FAILED&&(s0=peg$parseLightArrow())===peg$FAILED&&(s0=peg$parseFatArrow())===peg$FAILED&&(s0=peg$parseTildeArrow()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c56),s0}function peg$parseHexDigit(){var s0;return peg$c57.test(input.charAt(peg$currPos))?(s0=input.charAt(peg$currPos),peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c58)),s0}function peg$parseChar(){var s0,s2,s3,s4,s5,s6,s7,s8,s9;return(s0=peg$parseUnescaped())===peg$FAILED&&(s0=peg$currPos,peg$parseEscape()!==peg$FAILED?(34===input.charCodeAt(peg$currPos)?(s2=peg$c59,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c60)),s2===peg$FAILED&&(92===input.charCodeAt(peg$currPos)?(s2=peg$c61,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c62)),s2===peg$FAILED&&(47===input.charCodeAt(peg$currPos)?(s2=peg$c63,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c64)),s2===peg$FAILED&&(s2=peg$currPos,98===input.charCodeAt(peg$currPos)?(s3=peg$c65,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c66)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c67()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,102===input.charCodeAt(peg$currPos)?(s3=peg$c68,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c69)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c70()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,110===input.charCodeAt(peg$currPos)?(s3=peg$c71,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c72)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c73()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,114===input.charCodeAt(peg$currPos)?(s3=peg$c74,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c75)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c76()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,116===input.charCodeAt(peg$currPos)?(s3=peg$c77,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c78)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c79()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,118===input.charCodeAt(peg$currPos)?(s3=peg$c80,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c81)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c82()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,117===input.charCodeAt(peg$currPos)?(s3=peg$c83,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c84)),s3!==peg$FAILED?(s4=peg$currPos,s5=peg$currPos,(s6=peg$parseHexDigit())!==peg$FAILED&&(s7=peg$parseHexDigit())!==peg$FAILED&&(s8=peg$parseHexDigit())!==peg$FAILED&&(s9=peg$parseHexDigit())!==peg$FAILED?s5=s6=[s6,s7,s8,s9]:(peg$currPos=s5,s5=peg$FAILED),(s4=s5!==peg$FAILED?input.substring(s4,peg$currPos):s5)!==peg$FAILED?(peg$savedPos=s2,s2=s3=peg$c85(s4)):(peg$currPos=s2,s2=peg$FAILED)):(peg$currPos=s2,s2=peg$FAILED)))))))))),s2!==peg$FAILED?(peg$savedPos=s0,s0=peg$c86(s2)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)),s0}function peg$parseEscape(){var s0;return 92===input.charCodeAt(peg$currPos)?(s0=peg$c61,peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c62)),s0}function peg$parseQuoteMark(){var s0;return 34===input.charCodeAt(peg$currPos)?(s0=peg$c59,peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c60)),s0}function peg$parseUnescaped(){var s0;return peg$c87.test(input.charAt(peg$currPos))?(s0=input.charAt(peg$currPos),peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c88)),s0}function peg$parseActionLabelChar(){var s0,s2,s3,s4,s5,s6,s7,s8,s9;return(s0=peg$parseActionLabelUnescaped())===peg$FAILED&&(s0=peg$currPos,peg$parseEscape()!==peg$FAILED?(39===input.charCodeAt(peg$currPos)?(s2=peg$c89,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c90)),s2===peg$FAILED&&(92===input.charCodeAt(peg$currPos)?(s2=peg$c61,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c62)),s2===peg$FAILED&&(47===input.charCodeAt(peg$currPos)?(s2=peg$c63,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c64)),s2===peg$FAILED&&(s2=peg$currPos,98===input.charCodeAt(peg$currPos)?(s3=peg$c65,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c66)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c67()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,102===input.charCodeAt(peg$currPos)?(s3=peg$c68,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c69)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c70()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,110===input.charCodeAt(peg$currPos)?(s3=peg$c71,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c72)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c73()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,114===input.charCodeAt(peg$currPos)?(s3=peg$c74,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c75)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c76()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,116===input.charCodeAt(peg$currPos)?(s3=peg$c77,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c78)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c79()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,118===input.charCodeAt(peg$currPos)?(s3=peg$c80,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c81)),s3!==peg$FAILED&&(peg$savedPos=s2,s3=peg$c82()),(s2=s3)===peg$FAILED&&(s2=peg$currPos,117===input.charCodeAt(peg$currPos)?(s3=peg$c83,peg$currPos++):(s3=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c84)),s3!==peg$FAILED?(s4=peg$currPos,s5=peg$currPos,(s6=peg$parseHexDigit())!==peg$FAILED&&(s7=peg$parseHexDigit())!==peg$FAILED&&(s8=peg$parseHexDigit())!==peg$FAILED&&(s9=peg$parseHexDigit())!==peg$FAILED?s5=s6=[s6,s7,s8,s9]:(peg$currPos=s5,s5=peg$FAILED),(s4=s5!==peg$FAILED?input.substring(s4,peg$currPos):s5)!==peg$FAILED?(peg$savedPos=s2,s2=s3=peg$c85(s4)):(peg$currPos=s2,s2=peg$FAILED)):(peg$currPos=s2,s2=peg$FAILED)))))))))),s2!==peg$FAILED?(peg$savedPos=s0,s0=peg$c86(s2)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)),s0}function peg$parseActionLabelQuoteMark(){var s0;return 39===input.charCodeAt(peg$currPos)?(s0=peg$c89,peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c90)),s0}function peg$parseActionLabelUnescaped(){var s0;return peg$c91.test(input.charAt(peg$currPos))?(s0=input.charAt(peg$currPos),peg$currPos++):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c92)),s0}function peg$parseActionLabel(){var s0,s2,s3;if(peg$silentFails++,s0=peg$currPos,peg$parseActionLabelQuoteMark()!==peg$FAILED){for(s2=[],s3=peg$parseActionLabelChar();s3!==peg$FAILED;)s2.push(s3),s3=peg$parseActionLabelChar();s2!==peg$FAILED&&(s3=peg$parseActionLabelQuoteMark())!==peg$FAILED?(peg$savedPos=s0,s0=peg$c94(s2)):(peg$currPos=s0,s0=peg$FAILED)}else peg$currPos=s0,s0=peg$FAILED;return peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c93),s0}function peg$parseWhitespace(){var s0,s1;for(peg$silentFails++,s0=[],peg$c96.test(input.charAt(peg$currPos))?(s1=input.charAt(peg$currPos),peg$currPos++):(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c97));s1!==peg$FAILED;)s0.push(s1),peg$c96.test(input.charAt(peg$currPos))?(s1=input.charAt(peg$currPos),peg$currPos++):(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c97));return peg$silentFails--,s0===peg$FAILED&&(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c95)),s0}function peg$parseString(){var s0,s2,s3;if(peg$silentFails++,s0=peg$currPos,peg$parseQuoteMark()!==peg$FAILED){for(s2=[],s3=peg$parseChar();s3!==peg$FAILED;)s2.push(s3),s3=peg$parseChar();s2!==peg$FAILED&&(s3=peg$parseQuoteMark())!==peg$FAILED?(peg$savedPos=s0,s0=peg$c94(s2)):(peg$currPos=s0,s0=peg$FAILED)}else peg$currPos=s0,s0=peg$FAILED;return peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c98),s0}function peg$parseAtom(){var s0,s1,s2;if(peg$silentFails++,s0=peg$currPos,s1=[],peg$c100.test(input.charAt(peg$currPos))?(s2=input.charAt(peg$currPos),peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c101)),s2!==peg$FAILED)for(;s2!==peg$FAILED;)s1.push(s2),peg$c100.test(input.charAt(peg$currPos))?(s2=input.charAt(peg$currPos),peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c101));else s1=peg$FAILED;return s1!==peg$FAILED&&(peg$savedPos=s0,s1=peg$c102(s1)),s0=s1,peg$silentFails--,s0===peg$FAILED&&(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c99)),s0}function peg$parseLabel(){var s0;return peg$silentFails++,(s0=peg$parseAtom())===peg$FAILED&&(s0=peg$parseString()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c103),s0}function peg$parseColor(){var s0;return peg$silentFails++,input.substr(peg$currPos,3)===peg$c105?(s0=peg$c105,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c106)),s0===peg$FAILED&&(input.substr(peg$currPos,5)===peg$c107?(s0=peg$c107,peg$currPos+=5):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c108)),s0===peg$FAILED&&(input.substr(peg$currPos,4)===peg$c109?(s0=peg$c109,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c110)))),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c104),s0}function peg$parseArrowItemKey(){var s0;return input.substr(peg$currPos,9)===peg$c111?(s0=peg$c111,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c112)),s0===peg$FAILED&&(input.substr(peg$currPos,10)===peg$c113?(s0=peg$c113,peg$currPos+=10):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c114)),s0===peg$FAILED&&(input.substr(peg$currPos,10)===peg$c115?(s0=peg$c115,peg$currPos+=10):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c116)))),s0}function peg$parseArrowItem(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED&&(s2=peg$parseArrowItemKey())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c121(s2,s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseSingleEdgeColor(){var s0,s2,s4,s6,s8;return peg$silentFails++,s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,10)===peg$c123?(s2=peg$c123,peg$currPos+=10):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c124)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseColor())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c125(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c122),s0}function peg$parseArrowItems(){var s0,s1;if((s0=peg$parseSingleEdgeColor())===peg$FAILED)if(s0=[],(s1=peg$parseArrowItem())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseArrowItem();else s0=peg$FAILED;return s0}function peg$parseArrowDesc(){var s0,s1,s3,s5;return s0=peg$currPos,123===input.charCodeAt(peg$currPos)?(s1=peg$c126,peg$currPos++):(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s1!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s3=peg$parseArrowItems())===peg$FAILED&&(s3=null),s3!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(125===input.charCodeAt(peg$currPos)?(s5=peg$c128,peg$currPos++):(s5=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c129)),s5!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c130(s3)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseLabelList(){var s0,s1,s3,s4,s5,s6;if(s0=peg$currPos,91===input.charCodeAt(peg$currPos)?(s1=peg$c131,peg$currPos++):(s1=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c132)),s1!==peg$FAILED)if(peg$parseWhitespace()!==peg$FAILED){for(s3=[],s4=peg$currPos,(s5=peg$parseLabel())!==peg$FAILED&&(s6=peg$parseWhitespace())!==peg$FAILED?s4=s5=[s5,s6]:(peg$currPos=s4,s4=peg$FAILED);s4!==peg$FAILED;)s3.push(s4),s4=peg$currPos,(s5=peg$parseLabel())!==peg$FAILED&&(s6=peg$parseWhitespace())!==peg$FAILED?s4=s5=[s5,s6]:(peg$currPos=s4,s4=peg$FAILED);s3!==peg$FAILED?(93===input.charCodeAt(peg$currPos)?(s4=peg$c133,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c134)),s4!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c135(s3)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)}else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;return s0}function peg$parseLabelOrLabelList(){var s0;return(s0=peg$parseLabelList())===peg$FAILED&&(s0=peg$parseLabel()),s0}function peg$parseSubexp(){var s0,s2,s4,s6,s8,s10,s12,s14;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?((s2=peg$parseActionLabel())===peg$FAILED&&(s2=null),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s4=peg$parseArrowDesc())===peg$FAILED&&(s4=null),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseArrow())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseArrowDesc())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s10=peg$parseActionLabel())===peg$FAILED&&(s10=null),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s12=peg$parseLabelOrLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s14=peg$parseSubexp())===peg$FAILED&&(s14=null),s14!==peg$FAILED?(peg$savedPos=s0,s0=peg$c136(s2,s4,s6,s8,s10,s12,s14)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseExp(){var s0,s1,s2,s4;return s0=peg$currPos,(s1=peg$parseLabelOrLabelList())!==peg$FAILED&&(s2=peg$parseSubexp())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s4=peg$c119,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c137(s1,s2)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseValidationKey(){var s0;return input.substr(peg$currPos,9)===peg$c138?(s0=peg$c138,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c139)),s0===peg$FAILED&&(input.substr(peg$currPos,4)===peg$c140?(s0=peg$c140,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c141))),s0}function peg$parseValidationItem(){var s0,s1,s2,s3,s4;return s0=peg$currPos,(s1=peg$parseValidationKey())!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s2=peg$c117,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s2!==peg$FAILED&&(s3=peg$parseLabel())!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s4=peg$c119,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s4!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c142(s1,s3)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseValidationItems(){var s0,s1;if(s0=[],(s1=peg$parseValidationItem())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseValidationItem();else s0=peg$FAILED;return s0}function peg$parseConfigValidation(){var s0,s2,s4,s6,s8,s10;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,10)===peg$c143?(s2=peg$c143,peg$currPos+=10):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c144)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(123===input.charCodeAt(peg$currPos)?(s6=peg$c126,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseValidationItems())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,2)===peg$c145?(s10=peg$c145,peg$currPos+=2):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c146)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c147(s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGvizLayout(){var s0;return input.substr(peg$currPos,3)===peg$c148?(s0=peg$c148,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c149)),s0===peg$FAILED&&(input.substr(peg$currPos,5)===peg$c150?(s0=peg$c150,peg$currPos+=5):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c151)),s0===peg$FAILED&&(input.substr(peg$currPos,3)===peg$c152?(s0=peg$c152,peg$currPos+=3):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c153)),s0===peg$FAILED&&(input.substr(peg$currPos,5)===peg$c154?(s0=peg$c154,peg$currPos+=5):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c155))))),s0}function peg$parseStateItemShapeKey(){var s0;return input.substr(peg$currPos,8)===peg$c156?(s0=peg$c156,peg$currPos+=8):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c157)),s0===peg$FAILED&&(input.substr(peg$currPos,9)===peg$c158?(s0=peg$c158,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c159)),s0===peg$FAILED&&(input.substr(peg$currPos,10)===peg$c160?(s0=peg$c160,peg$currPos+=10):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c161)))),s0}function peg$parseStateItemShape(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED&&(s2=peg$parseStateItemShapeKey())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseGvizShape())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c121(s2,s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseStateItems(){var s0,s1;if(s0=[],(s1=peg$parseStateItemShape())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseStateItemShape();else s0=peg$FAILED;return s0}function peg$parseConfigState(){var s0,s2,s4,s6,s8,s10;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,5)===peg$c162?(s2=peg$c162,peg$currPos+=5):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c163)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(123===input.charCodeAt(peg$currPos)?(s6=peg$c126,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseStateItems())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,2)===peg$c145?(s10=peg$c145,peg$currPos+=2):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c146)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c164(s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseActionKey(){var s0;return input.substr(peg$currPos,9)===peg$c138?(s0=peg$c138,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c139)),s0===peg$FAILED&&(input.substr(peg$currPos,4)===peg$c140?(s0=peg$c140,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c141))),s0}function peg$parseActionItem(){var s0,s1,s2,s3,s4;return s0=peg$currPos,(s1=peg$parseActionKey())!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s2=peg$c117,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s2!==peg$FAILED&&(s3=peg$parseLabel())!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s4=peg$c119,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s4!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c165(s1,s3)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseActionItems(){var s0,s1;if(s0=[],(s1=peg$parseActionItem())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseActionItem();else s0=peg$FAILED;return s0}function peg$parseConfigAction(){var s0,s2,s4,s6,s8,s10;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,6)===peg$c166?(s2=peg$c166,peg$currPos+=6):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c167)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(123===input.charCodeAt(peg$currPos)?(s6=peg$c126,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseActionItems())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,2)===peg$c145?(s10=peg$c145,peg$currPos+=2):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c146)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c168(s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseTransitionKey(){var s0;return input.substr(peg$currPos,9)===peg$c138?(s0=peg$c138,peg$currPos+=9):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c139)),s0===peg$FAILED&&(input.substr(peg$currPos,4)===peg$c140?(s0=peg$c140,peg$currPos+=4):(s0=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c141))),s0}function peg$parseTransitionItem(){var s0,s1,s2,s3,s4;return s0=peg$currPos,(s1=peg$parseTransitionKey())!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s2=peg$c117,peg$currPos++):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s2!==peg$FAILED&&(s3=peg$parseLabel())!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s4=peg$c119,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s4!==peg$FAILED?(peg$savedPos=s0,s0=s1=peg$c169(s1,s3)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseTransitionItems(){var s0,s1;if((s0=peg$parseGraphDefaultEdgeColor())===peg$FAILED)if(s0=[],(s1=peg$parseTransitionItem())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseTransitionItem();else s0=peg$FAILED;return s0}function peg$parseGraphDefaultEdgeColor(){var s0,s2,s4,s6,s8;return peg$silentFails++,s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,10)===peg$c123?(s2=peg$c123,peg$currPos+=10):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c124)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseColor())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c171(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c170),s0}function peg$parseConfigTransition(){var s0,s2,s4,s6,s8,s10;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,10)===peg$c172?(s2=peg$c172,peg$currPos+=10):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c173)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(123===input.charCodeAt(peg$currPos)?(s6=peg$c126,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseTransitionItems())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,2)===peg$c145?(s10=peg$c145,peg$currPos+=2):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c146)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c174(s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGraphBg(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,8)===peg$c175?(s2=peg$c175,peg$currPos+=8):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c176)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseGvizShape())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c177(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseMinTransitionsPerState(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,25)===peg$c178?(s2=peg$c178,peg$currPos+=25):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c179)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c180(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseMaxTransitionsPerState(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,25)===peg$c181?(s2=peg$c181,peg$currPos+=25):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c182)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c183(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGraphInputs(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,6)===peg$c184?(s2=peg$c184,peg$currPos+=6):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c185)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c186(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGraphOutputs(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,7)===peg$c187?(s2=peg$c187,peg$currPos+=7):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c188)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c189(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseGraphItem(){var s0;return(s0=peg$parseGraphBg())===peg$FAILED&&(s0=peg$parseMinTransitionsPerState())===peg$FAILED&&(s0=peg$parseMaxTransitionsPerState())===peg$FAILED&&(s0=peg$parseGraphInputs())===peg$FAILED&&(s0=peg$parseGraphOutputs()),s0}function peg$parseGraphItems(){var s0,s1;if(s0=[],(s1=peg$parseGraphItem())!==peg$FAILED)for(;s1!==peg$FAILED;)s0.push(s1),s1=peg$parseGraphItem();else s0=peg$FAILED;return s0}function peg$parseConfigGraph(){var s0,s2,s4,s6,s8,s10;return peg$silentFails++,s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,5)===peg$c191?(s2=peg$c191,peg$currPos+=5):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c192)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(123===input.charCodeAt(peg$currPos)?(s6=peg$c126,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c127)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?((s8=peg$parseGraphItems())===peg$FAILED&&(s8=null),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,2)===peg$c145?(s10=peg$c145,peg$currPos+=2):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c146)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c193(s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c190),s0}function peg$parseConfigGraphLayout(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,12)===peg$c194?(s2=peg$c194,peg$currPos+=12):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c195)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseGvizLayout())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c196(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseConfigStartNodes(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,11)===peg$c197?(s2=peg$c197,peg$currPos+=11):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c198)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c199(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseConfigEndNodes(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,9)===peg$c200?(s2=peg$c200,peg$currPos+=9):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c201)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c202(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseConfig(){var s0;return peg$silentFails++,(s0=peg$parseConfigGraph())===peg$FAILED&&(s0=peg$parseConfigGraphLayout())===peg$FAILED&&(s0=peg$parseConfigStartNodes())===peg$FAILED&&(s0=peg$parseConfigEndNodes())===peg$FAILED&&(s0=peg$parseConfigTransition())===peg$FAILED&&(s0=peg$parseConfigAction())===peg$FAILED&&(s0=peg$parseConfigState())===peg$FAILED&&(s0=peg$parseConfigValidation()),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c203),s0}function peg$parseStateColor(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,5)===peg$c204?(s2=peg$c204,peg$currPos+=5):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c205)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseColor())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c206(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseArbitraryStateQuality(){var s0,s2,s4,s6,s8;return peg$silentFails++,s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED&&(s2=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c208(s2,s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c207),s0}function peg$parseStateQuality(){var s0;return(s0=peg$parseStateColor())===peg$FAILED&&(s0=peg$parseArbitraryStateQuality()),s0}function peg$parseStateDef(){var s0,s2,s4,s6,s8,s9,s10,s12;if(peg$silentFails++,s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED)if(input.substr(peg$currPos,5)===peg$c162?(s2=peg$c162,peg$currPos+=5):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c163)),s2!==peg$FAILED)if(peg$parseWhitespace()!==peg$FAILED)if((s4=peg$parseLabel())!==peg$FAILED)if(peg$parseWhitespace()!==peg$FAILED)if(91===input.charCodeAt(peg$currPos)?(s6=peg$c131,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c132)),s6!==peg$FAILED)if(peg$parseWhitespace()!==peg$FAILED){for(s8=[],s9=peg$parseStateQuality();s9!==peg$FAILED;)s8.push(s9),s9=peg$parseStateQuality();s8!==peg$FAILED&&(s9=peg$parseWhitespace())!==peg$FAILED?(93===input.charCodeAt(peg$currPos)?(s10=peg$c133,peg$currPos++):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c134)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s12=peg$c119,peg$currPos++):(s12=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s12!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c210(s4,s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)}else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;else peg$currPos=s0,s0=peg$FAILED;return peg$silentFails--,s0===peg$FAILED&&0===peg$silentFails&&peg$fail(peg$c209),s0}function peg$parseMachineName(){var s0,s2,s4,s6,s8;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,12)===peg$c211?(s2=peg$c211,peg$currPos+=12):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c212)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s4=peg$c117,peg$currPos++):(s4=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s4!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s6=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s8=peg$c119,peg$currPos++):(s8=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s8!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c213(s6)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseStateGroupDef(){var s0,s2,s4,s6,s8,s10;return s0=peg$currPos,peg$parseWhitespace()!==peg$FAILED?(input.substr(peg$currPos,5)===peg$c214?(s2=peg$c214,peg$currPos+=5):(s2=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c215)),s2!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s4=peg$parseLabel())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(58===input.charCodeAt(peg$currPos)?(s6=peg$c117,peg$currPos++):(s6=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c118)),s6!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED&&(s8=peg$parseLabelOrLabelList())!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(59===input.charCodeAt(peg$currPos)?(s10=peg$c119,peg$currPos++):(s10=peg$FAILED,0===peg$silentFails&&peg$fail(peg$c120)),s10!==peg$FAILED&&peg$parseWhitespace()!==peg$FAILED?(peg$savedPos=s0,s0=peg$c216(s4,s8)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED)):(peg$currPos=s0,s0=peg$FAILED),s0}function peg$parseTerm(){var s0;return(s0=peg$parseExp())===peg$FAILED&&(s0=peg$parseStateDef())===peg$FAILED&&(s0=peg$parseMachineName())===peg$FAILED&&(s0=peg$parseStateGroupDef())===peg$FAILED&&(s0=peg$parseConfig()),s0}function peg$parseTermList(){var s0,s1;for(s0=[],s1=peg$parseTerm();s1!==peg$FAILED;)s0.push(s1),s1=peg$parseTerm();return s0}options=void 0!==options?options:{};var peg$result,peg$FAILED={},peg$startRuleFunctions={Document:peg$parseDocument},peg$startRuleFunction=peg$parseDocument,peg$c0=function(e){return e},peg$c1="square",peg$c2=peg$literalExpectation("square",!1),peg$c3="rectangle",peg$c4=peg$literalExpectation("rectangle",!1),peg$c5="circle",peg$c6=peg$literalExpectation("circle",!1),peg$c7=peg$otherExpectation("forward light arrow ->"),peg$c8="->",peg$c9=peg$literalExpectation("->",!1),peg$c10=peg$otherExpectation("two way light arrow <->"),peg$c11="<->",peg$c12=peg$literalExpectation("<->",!1),peg$c13=peg$otherExpectation("back light arrow <-"),peg$c14="<-",peg$c15=peg$literalExpectation("<-",!1),peg$c16=peg$otherExpectation("forward fat arrow =>"),peg$c17="=>",peg$c18=peg$literalExpectation("=>",!1),peg$c19=peg$otherExpectation("two way fat arrow <=>"),peg$c20="<=>",peg$c21=peg$literalExpectation("<=>",!1),peg$c22=peg$otherExpectation("back fat arrow <="),peg$c23="<=",peg$c24=peg$literalExpectation("<=",!1),peg$c25=peg$otherExpectation("forward tilde arrow ~>"),peg$c26="~>",peg$c27=peg$literalExpectation("~>",!1),peg$c28=peg$otherExpectation("two way tilde arrow <~>"),peg$c29="<~>",peg$c30=peg$literalExpectation("<~>",!1),peg$c31=peg$otherExpectation("back tilde arrow <~"),peg$c32="<~",peg$c33=peg$literalExpectation("<~",!1),peg$c34=peg$otherExpectation("light fat arrow <-=>"),peg$c35="<-=>",peg$c36=peg$literalExpectation("<-=>",!1),peg$c37=peg$otherExpectation("light tilde arrow <-~>"),peg$c38="<-~>",peg$c39=peg$literalExpectation("<-~>",!1),peg$c40=peg$otherExpectation("fat light arrow <=->"),peg$c41="<=->",peg$c42=peg$literalExpectation("<=->",!1),peg$c43=peg$otherExpectation("fat tilde arrow <=~>"),peg$c44="<=~>",peg$c45=peg$literalExpectation("<=~>",!1),peg$c46=peg$otherExpectation("tilde light arrow <~->"),peg$c47="<~->",peg$c48=peg$literalExpectation("<~->",!1),peg$c49=peg$otherExpectation("tilde fat arrow <~=>"),peg$c50="<~=>",peg$c51=peg$literalExpectation("<~=>",!1),peg$c52=peg$otherExpectation("light arrow"),peg$c53=peg$otherExpectation("fat arrow"),peg$c54=peg$otherExpectation("tilde arrow"),peg$c55=peg$otherExpectation("mixed arrow"),peg$c56=peg$otherExpectation("arrow"),peg$c57=/^[0-9a-fA-F]/,peg$c58=peg$classExpectation([["0","9"],["a","f"],["A","F"]],!1,!1),peg$c59='"',peg$c60=peg$literalExpectation('"',!1),peg$c61="\\",peg$c62=peg$literalExpectation("\\",!1),peg$c63="/",peg$c64=peg$literalExpectation("/",!1),peg$c65="b",peg$c66=peg$literalExpectation("b",!1),peg$c67=function(){return"\b"},peg$c68="f",peg$c69=peg$literalExpectation("f",!1),peg$c70=function(){return"\f"},peg$c71="n",peg$c72=peg$literalExpectation("n",!1),peg$c73=function(){return"\n"},peg$c74="r",peg$c75=peg$literalExpectation("r",!1),peg$c76=function(){return"\r"},peg$c77="t",peg$c78=peg$literalExpectation("t",!1),peg$c79=function(){return"\t"},peg$c80="v",peg$c81=peg$literalExpectation("v",!1),peg$c82=function(){return"\v"},peg$c83="u",peg$c84=peg$literalExpectation("u",!1),peg$c85=function(digits){return String.fromCharCode(parseInt(digits,16))},peg$c86=function(Sequence){return Sequence},peg$c87=/^[ -!#-[\]-\u10FFFF]/,peg$c88=peg$classExpectation([[" ","!"],["#","["],["]","ჿ"],"F","F"],!1,!1),peg$c89="'",peg$c90=peg$literalExpectation("'",!1),peg$c91=/^[ -&(-[\]-\u10FFFF]/,peg$c92=peg$classExpectation([[" ","&"],["(","["],["]","ჿ"],"F","F"],!1,!1),peg$c93=peg$otherExpectation("action label"),peg$c94=function(chars){return chars.join("")},peg$c95=peg$otherExpectation("whitespace"),peg$c96=/^[ \t\n\r\x0B]/,peg$c97=peg$classExpectation([" ","\t","\n","\r","\v"],!1,!1),peg$c98=peg$otherExpectation("string"),peg$c99=peg$otherExpectation("atom"),peg$c100=/^[0-9a-zA-Z.+_&()%$#@!?,']/,peg$c101=peg$classExpectation([["0","9"],["a","z"],["A","Z"],".","+","_","&","(",")","%","$","#","@","!","?",",","'"],!1,!1),peg$c102=function(text){return text.join("")},peg$c103=peg$otherExpectation("label"),peg$c104=peg$otherExpectation("color"),peg$c105="red",peg$c106=peg$literalExpectation("red",!1),peg$c107="green",peg$c108=peg$literalExpectation("green",!1),peg$c109="blue",peg$c110=peg$literalExpectation("blue",!1),peg$c111="arc_label",peg$c112=peg$literalExpectation("arc_label",!1),peg$c113="head_label",peg$c114=peg$literalExpectation("head_label",!1),peg$c115="tail_label",peg$c116=peg$literalExpectation("tail_label",!1),peg$c117=":",peg$c118=peg$literalExpectation(":",!1),peg$c119=";",peg$c120=peg$literalExpectation(";",!1),peg$c121=function(key,value){return{key:key,value:value}},peg$c122=peg$otherExpectation("single edge color"),peg$c123="edge_color",peg$c124=peg$literalExpectation("edge_color",!1),peg$c125=function(value){return{key:"single_edge_color",value:value}},peg$c126="{",peg$c127=peg$literalExpectation("{",!1),peg$c128="}",peg$c129=peg$literalExpectation("}",!1),peg$c130=function(items){return items},peg$c131="[",peg$c132=peg$literalExpectation("[",!1),peg$c133="]",peg$c134=peg$literalExpectation("]",!1),peg$c135=function(names){return names.map(function(i){return i[0]})},peg$c136=function(r_action,l_desc,arrow,r_desc,l_action,label,tail){var base={kind:arrow,to:label};return tail&&tail!==[]&&(base.se=tail),l_desc&&(base.l_desc=l_desc),r_desc&&(base.r_desc=r_desc),l_action&&(base.l_action=l_action),r_action&&(base.r_action=r_action),base},peg$c137=function(label,se){var base={key:"transition",from:label};return se&&se!==[]&&(base.se=se),base},peg$c138="whargarbl",peg$c139=peg$literalExpectation("whargarbl",!1),peg$c140="todo",peg$c141=peg$literalExpectation("todo",!1),peg$c142=function(validationkey,value){return{key:validationkey,value:value}},peg$c143="validation",peg$c144=peg$literalExpectation("validation",!1),peg$c145="};",peg$c146=peg$literalExpectation("};",!1),peg$c147=function(validation_items){return{config_kind:"validation",config_items:validation_items||[]}},peg$c148="dot",peg$c149=peg$literalExpectation("dot",!1),peg$c150="circo",peg$c151=peg$literalExpectation("circo",!1),peg$c152="fdp",peg$c153=peg$literalExpectation("fdp",!1),peg$c154="neato",peg$c155=peg$literalExpectation("neato",!1),peg$c156="in_shape",peg$c157=peg$literalExpectation("in_shape",!1),peg$c158="out_shape",peg$c159=peg$literalExpectation("out_shape",!1),peg$c160="node_shape",peg$c161=peg$literalExpectation("node_shape",!1),peg$c162="state",peg$c163=peg$literalExpectation("state",!1),peg$c164=function(state_items){return{config_kind:"state",config_items:state_items||[]}},peg$c165=function(actionkey,value){return{key:actionkey,value:value}},peg$c166="action",peg$c167=peg$literalExpectation("action",!1),peg$c168=function(action_items){return{config_kind:"action",config_items:action_items||[]}},peg$c169=function(transitionkey,value){return{key:transitionkey,value:value}},peg$c170=peg$otherExpectation("graph default edge color"),peg$c171=function(value){return{key:"graph_default_edge_color",value:value}},peg$c172="transition",peg$c173=peg$literalExpectation("transition",!1),peg$c174=function(transition_items){return{config_kind:"transition",config_items:transition_items||[]}},peg$c175="graph_bg",peg$c176=peg$literalExpectation("graph_bg",!1),peg$c177=function(value){return{key:"graph_bg",value:value}},peg$c178="min_transitions_per_state",peg$c179=peg$literalExpectation("min_transitions_per_state",!1),peg$c180=function(value){return{key:"min_transitions_per_state",value:value}},peg$c181="max_transitions_per_state",peg$c182=peg$literalExpectation("max_transitions_per_state",!1),peg$c183=function(value){return{key:"max_transitions_per_state",value:value}},peg$c184="inputs",peg$c185=peg$literalExpectation("inputs",!1),peg$c186=function(value){return{key:"inputs",value:value}},peg$c187="outputs",peg$c188=peg$literalExpectation("outputs",!1),peg$c189=function(value){return{key:"outputs",value:value}},peg$c190=peg$otherExpectation("graph configuration"),peg$c191="graph",peg$c192=peg$literalExpectation("graph",!1),peg$c193=function(graph_items){return{config_kind:"graph",config_items:graph_items||[]}},peg$c194="graph_layout",peg$c195=peg$literalExpectation("graph_layout",!1),peg$c196=function(value){return{key:"graph_layout",value:value}},peg$c197="start_nodes",peg$c198=peg$literalExpectation("start_nodes",!1),peg$c199=function(value){return{key:"start_nodes",value:value}},peg$c200="end_nodes",peg$c201=peg$literalExpectation("end_nodes",!1),peg$c202=function(value){return{key:"end_nodes",value:value}},peg$c203=peg$otherExpectation("configuration"),peg$c204="color",peg$c205=peg$literalExpectation("color",!1),peg$c206=function(value){return{key:"state color",value:value}},peg$c207=peg$otherExpectation("state quality"),peg$c208=function(name,value){return{key:"state quality",name:name,value:value}},peg$c209=peg$otherExpectation("state definition"),peg$c210=function(name,sq){return{key:"State qualities",value:sq}},peg$c211="machine name",peg$c212=peg$literalExpectation("machine name",!1),peg$c213=function(name){return{key:"Machine name",value:name}},peg$c214="group",peg$c215=peg$literalExpectation("group",!1),peg$c216=function(name,nl){return{key:"group definition",value:{name:name,list:nl}}},peg$currPos=0,peg$savedPos=0,peg$posDetailsCache=[{line:1,column:1}],peg$maxFailPos=0,peg$maxFailExpected=[],peg$silentFails=0;if("startRule"in options){if(!(options.startRule in peg$startRuleFunctions))throw new Error("Can't start parsing from rule \""+options.startRule+'".');peg$startRuleFunction=peg$startRuleFunctions[options.startRule]}if((peg$result=peg$startRuleFunction())!==peg$FAILED&&peg$currPos===input.length)return peg$result;throw peg$result!==peg$FAILED&&peg$currPos1&&void 0!==arguments[1]?arguments[1]:"probability";if(!Array.isArray(options))throw new TypeError("options must be a non-empty array of objects");if("object"!==_typeof(options[0]))throw new TypeError("options must be a non-empty array of objects");for(var or_one=function(item){return void 0===item?1:item},rnd=function(cap){return Math.random()*cap}(options.reduce(function(acc,val){return acc+or_one(val[probability_property])},0)),cursor=0,cursor_sum=0;(cursor_sum+=options[cursor++][probability_property])<=rnd;);return options[cursor-1]},seq=function(n){return new Array(n).fill(!0).map(function(_,i){return i})},histograph=function(a){return a.sort().reduce(function(m,v){return m.set(v,m.has(v)?m.get(v)+1:1),m},new Map)},weighted_sample_select=function(n,options,probability_property){return seq(n).map(function(i){return weighted_rand_select(options,probability_property)})};exports.seq=seq,exports.histograph=histograph,exports.weighted_histo_key=function(n,options,probability_property,extract){return histograph(weighted_sample_select(n,options,probability_property).map(function(s){return s[extract]}))},exports.weighted_rand_select=weighted_rand_select,exports.weighted_sample_select=weighted_sample_select},{}],jssm:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i":case"=>":case"~>":return"none";case"<-":case"<->":case"<-=>":case"<-~>":return"legal";case"<=":case"<=>":case"<=->":case"<=~>":return"main";case"<~":case"<~>":case"<~->":case"<~=>":return"forced";default:throw new Error("arrow_direction: unknown arrow type "+arrow)}}function arrow_right_kind(arrow){switch(String(arrow)){case"<-":case"<=":case"<~":return"none";case"->":case"<->":case"<=->":case"<~->":return"legal";case"=>":case"<=>":case"<-=>":case"<~=>":return"main";case"~>":case"<~>":case"<-~>":case"<=~>":return"forced";default:throw new Error("arrow_direction: unknown arrow type "+arrow)}}function compile_rule_transition_step(acc,from,to,this_se,next_se){var edges=[],uFrom=Array.isArray(from)?from:[from],uTo=Array.isArray(to)?to:[to];uFrom.map(function(f){uTo.map(function(t){var rk=arrow_right_kind(this_se.kind),lk=arrow_left_kind(this_se.kind),right={from:f,to:t,kind:rk,forced_only:"forced"===rk,main_path:"main"===rk};this_se.r_action&&(right.action=this_se.r_action),"none"!==right.kind&&edges.push(right);var left={from:t,to:f,kind:lk,forced_only:"forced"===lk,main_path:"main"===lk};this_se.l_action&&(left.action=this_se.l_action),"none"!==left.kind&&edges.push(left)})});var new_acc=acc.concat(edges);return next_se?compile_rule_transition_step(new_acc,to,next_se.to,next_se,next_se.se):new_acc}function compile_rule_handle_transition(rule){return compile_rule_transition_step([],rule.from,rule.se.to,rule.se,rule.se.se)}function compile_rule_handler(rule){if("transition"===rule.key)return{agg_as:"transition",val:compile_rule_handle_transition(rule)};if("graph_layout"===rule.key)return{agg_as:"graph_layout",val:rule.value};throw new Error("compile_rule_handler: Unknown rule: "+JSON.stringify(rule))}function compile(tree){var _ref,results={graph_layout:[],transition:[]};if(tree.map(function(tr){var rule=compile_rule_handler(tr),agg_as=rule.agg_as,val=rule.val;results[agg_as]=results[agg_as].concat(val)}),results.graph_layout.length>1)throw new Error("May only have one graph_layout statement maximum: "+JSON.stringify(results.graph_layout));var assembled_transitions=(_ref=[]).concat.apply(_ref,_toConsumableArray(results.transition)),result_cfg={initial_state:assembled_transitions[0].from,transitions:assembled_transitions};return results.graph_layout.length&&(result_cfg.layout=results.graph_layout[0]),result_cfg}function make(plan){return compile(parse(plan))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.weighted_histo_key=exports.weighted_sample_select=exports.histograph=exports.weighted_rand_select=exports.seq=exports.arrow_right_kind=exports.arrow_left_kind=exports.arrow_direction=exports.sm=exports.compile=exports.parse=exports.make=exports.Machine=exports.version=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:this.state();return{entrances:this.list_entrances(whichState),exits:this.list_exits(whichState)}}},{key:"list_entrances",value:function(){var whichState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state();return(this._states.get(whichState)||{}).from||[]}},{key:"list_exits",value:function(){var whichState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state();return(this._states.get(whichState)||{}).to||[]}},{key:"probable_exits_for",value:function(whichState){var _this2=this,wstate=this._states.get(whichState);if(!wstate)throw new Error("No such state "+JSON.stringify(whichState)+" in probable_exits_for");return wstate.to.map(function(ws){return _this2.lookup_transition_for(_this2.state(),ws)}).filter(Boolean)}},{key:"probabilistic_transition",value:function(){var selected=(0,_jssmUtil.weighted_rand_select)(this.probable_exits_for(this.state()));return this.transition(selected.to)}},{key:"probabilistic_walk",value:function(n){var _this3=this;return(0,_jssmUtil.seq)(n).map(function(){var state_was=_this3.state();return _this3.probabilistic_transition(),state_was}).concat([this.state()])}},{key:"probabilistic_histo_walk",value:function(n){return(0,_jssmUtil.histograph)(this.probabilistic_walk(n))}},{key:"actions",value:function(){var whichState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state(),wstate=this._reverse_actions.get(whichState);if(wstate)return[].concat(_toConsumableArray(wstate.keys()));throw new Error("No such state "+JSON.stringify(whichState))}},{key:"list_states_having_action",value:function(whichState){var wstate=this._actions.get(whichState);if(wstate)return[].concat(_toConsumableArray(wstate.keys()));throw new Error("No such state "+JSON.stringify(whichState))}},{key:"list_exit_actions",value:function(){var _this4=this,whichState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state(),ra_base=this._reverse_actions.get(whichState);if(!ra_base)throw new Error("No such state "+JSON.stringify(whichState));return[].concat(_toConsumableArray(ra_base.values())).map(function(edgeId){return _this4._edges[edgeId]}).filter(function(o){return o.from===whichState}).map(function(filtered){return filtered.action})}},{key:"probable_action_exits",value:function(){var _this5=this,whichState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state(),ra_base=this._reverse_actions.get(whichState);if(!ra_base)throw new Error("No such state "+JSON.stringify(whichState));return[].concat(_toConsumableArray(ra_base.values())).map(function(edgeId){return _this5._edges[edgeId]}).filter(function(o){return o.from===whichState}).map(function(filtered){return{action:filtered.action,probability:filtered.probability}})}},{key:"is_unenterable",value:function(whichState){return 0===this.list_entrances(whichState).length}},{key:"has_unenterables",value:function(){var _this6=this;return this.states().some(function(x){return _this6.is_unenterable(x)})}},{key:"is_terminal",value:function(){return this.state_is_terminal(this.state())}},{key:"state_is_terminal",value:function(whichState){return 0===this.list_exits(whichState).length}},{key:"has_terminals",value:function(){var _this7=this;return this.states().some(function(x){return _this7.state_is_terminal(x)})}},{key:"is_complete",value:function(){return this.state_is_complete(this.state())}},{key:"state_is_complete",value:function(whichState){var wstate=this._states.get(whichState);if(wstate)return wstate.complete;throw new Error("No such state "+JSON.stringify(whichState))}},{key:"has_completes",value:function(){var _this8=this;return this.states().some(function(x){return _this8.state_is_complete(x)})}},{key:"action",value:function(name,newData){if(this.valid_action(name,newData)){var edge=this.current_action_edge_for(name);return this._state=edge.to,!0}return!1}},{key:"transition",value:function(newState,newData){return!!this.valid_transition(newState,newData)&&(this._state=newState,!0)}},{key:"force_transition",value:function(newState,newData){return!!this.valid_force_transition(newState,newData)&&(this._state=newState,!0)}},{key:"current_action_for",value:function(action){var action_base=this._actions.get(action);return action_base?action_base.get(this.state()):void 0}},{key:"current_action_edge_for",value:function(action){var idx=this.current_action_for(action);if(void 0===idx||null===idx)throw new Error("No such action "+JSON.stringify(action));return this._edges[idx]}},{key:"valid_action",value:function(action,_newData){return void 0!==this.current_action_for(action)}},{key:"valid_transition",value:function(newState,_newData){var transition_for=this.lookup_transition_for(this.state(),newState);return!!transition_for&&!transition_for.forced_only}},{key:"valid_force_transition",value:function(newState,_newData){return void 0!==this.lookup_transition_for(this.state(),newState)}}]),Machine}();exports.version="4.4.1",exports.Machine=Machine,exports.make=make,exports.parse=parse,exports.compile=compile,exports.sm=function(template_strings){var _arguments=arguments;return new Machine(make(template_strings.reduce(function(acc,val,idx){return""+acc+_arguments[idx]+val})))},exports.arrow_direction=function(arrow){switch(String(arrow)){case"->":case"=>":case"~>":return"right";case"<-":case"<=":case"<~":return"left";case"<->":case"<-=>":case"<-~>":case"<=>":case"<=->":case"<=~>":case"<~>":case"<~->":case"<~=>":return"both";default:throw new Error("arrow_direction: unknown arrow type "+arrow)}},exports.arrow_left_kind=arrow_left_kind,exports.arrow_right_kind=arrow_right_kind,exports.seq=_jssmUtil.seq,exports.weighted_rand_select=_jssmUtil.weighted_rand_select,exports.histograph=_jssmUtil.histograph,exports.weighted_sample_select=_jssmUtil.weighted_sample_select,exports.weighted_histo_key=_jssmUtil.weighted_histo_key},{"./jssm-dot.js":1,"./jssm-util.js":2}]},{},[]); \ No newline at end of file diff --git a/package.json b/package.json index 75d7e7aa..713495ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jssm", - "version": "4.4.1", + "version": "4.5.0", "engines": { "node": ">=6.0.0" }, diff --git a/src/js/jssm-dot.peg b/src/js/jssm-dot.peg index 2baedfef..0bf26463 100644 --- a/src/js/jssm-dot.peg +++ b/src/js/jssm-dot.peg @@ -307,18 +307,10 @@ GraphInputs GraphOutputs = Whitespace "outputs" Whitespace ":" Whitespace value:LabelList Whitespace ";" Whitespace { return {key:"outputs", value:value}; } -GraphStartNodes - = Whitespace "start_nodes" Whitespace ":" Whitespace value:LabelList Whitespace ";" Whitespace { return {key:"start_nodes", value:value}; } - -GraphEndNodes - = Whitespace "end_nodes" Whitespace ":" Whitespace value:LabelList Whitespace ";" Whitespace { return {key:"end_nodes", value:value}; } - GraphItem = GraphBg / MinTransitionsPerState / MaxTransitionsPerState - / GraphStartNodes - / GraphEndNodes / GraphInputs / GraphOutputs @@ -333,11 +325,19 @@ ConfigGraph "graph configuration" ConfigGraphLayout = Whitespace "graph_layout" Whitespace ":" Whitespace value:GvizLayout Whitespace ";" Whitespace { return {key:"graph_layout", value:value}; } +ConfigStartNodes + = Whitespace "start_nodes" Whitespace ":" Whitespace value:LabelList Whitespace ";" Whitespace { return {key:"start_nodes", value:value}; } + +ConfigEndNodes + = Whitespace "end_nodes" Whitespace ":" Whitespace value:LabelList Whitespace ";" Whitespace { return {key:"end_nodes", value:value}; } + Config "configuration" = ConfigGraph / ConfigGraphLayout + / ConfigStartNodes + / ConfigEndNodes / ConfigTransition / ConfigAction / ConfigState