jssm 5.124.0 → 5.125.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/cdn/viz.js +186 -91
- package/dist/cli/fsl-render.cjs +1 -1
- package/dist/cli/fsl.cjs +1 -1
- package/dist/deno/README.md +6 -6
- package/dist/deno/jssm.js +1 -1
- package/dist/deno/jssm_viz.d.ts +78 -6
- package/dist/jssm.es5.cjs +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/dist/jssm.es6.mjs +1 -1
- package/dist/jssm_viz.cjs +1 -1
- package/dist/jssm_viz.iife.cjs +1 -1
- package/dist/jssm_viz.mjs +1 -1
- package/jssm_viz.es5.d.cts +78 -6
- package/jssm_viz.es6.d.ts +78 -6
- package/package.json +1 -1
package/dist/cdn/viz.js
CHANGED
|
@@ -348,8 +348,8 @@ peg$SyntaxError.buildMessage = function (expected, found) {
|
|
|
348
348
|
};
|
|
349
349
|
function peg$parse(input, options) {
|
|
350
350
|
options = options !== void 0 ? options : {};
|
|
351
|
-
var peg$FAILED = {}, peg$startRuleFunctions = { Document: peg$parseDocument }, peg$startRuleFunction = peg$parseDocument, peg$c0 = function (e) { return e; }, peg$c1 = "
|
|
352
|
-
themes.push(th); return themes; }, peg$c16 = function (th) { return [th]; }, peg$c17 = "box3d", peg$c18 = peg$literalExpectation("box3d", false), peg$c19 = "polygon", peg$c20 = peg$literalExpectation("polygon", false), peg$c21 = "ellipse", peg$c22 = peg$literalExpectation("ellipse", false), peg$c23 = "oval", peg$c24 = peg$literalExpectation("oval", false), peg$c25 = "circle", peg$c26 = peg$literalExpectation("circle", false), peg$c27 = "point", peg$c28 = peg$literalExpectation("point", false), peg$c29 = "egg", peg$c30 = peg$literalExpectation("egg", false), peg$c31 = "triangle", peg$c32 = peg$literalExpectation("triangle", false), peg$c33 = "plaintext", peg$c34 = peg$literalExpectation("plaintext", false), peg$c35 = "
|
|
351
|
+
var peg$FAILED = {}, peg$startRuleFunctions = { Document: peg$parseDocument }, peg$startRuleFunction = peg$parseDocument, peg$c0 = function (e) { return e; }, peg$c1 = "default", peg$c2 = peg$literalExpectation("default", false), peg$c3 = "ocean", peg$c4 = peg$literalExpectation("ocean", false), peg$c5 = "modern", peg$c6 = peg$literalExpectation("modern", false), peg$c7 = "plain", peg$c8 = peg$literalExpectation("plain", false), peg$c9 = "bold", peg$c10 = peg$literalExpectation("bold", false), peg$c11 = "[", peg$c12 = peg$literalExpectation("[", false), peg$c13 = "]", peg$c14 = peg$literalExpectation("]", false), peg$c15 = function (ths, th) { const themes = ths.map(t => t[0]); if (th)
|
|
352
|
+
themes.push(th); return themes; }, peg$c16 = function (th) { return [th]; }, peg$c17 = "box3d", peg$c18 = peg$literalExpectation("box3d", false), peg$c19 = "polygon", peg$c20 = peg$literalExpectation("polygon", false), peg$c21 = "ellipse", peg$c22 = peg$literalExpectation("ellipse", false), peg$c23 = "oval", peg$c24 = peg$literalExpectation("oval", false), peg$c25 = "circle", peg$c26 = peg$literalExpectation("circle", false), peg$c27 = "point", peg$c28 = peg$literalExpectation("point", false), peg$c29 = "egg", peg$c30 = peg$literalExpectation("egg", false), peg$c31 = "triangle", peg$c32 = peg$literalExpectation("triangle", false), peg$c33 = "plaintext", peg$c34 = peg$literalExpectation("plaintext", false), peg$c35 = "diamond", peg$c36 = peg$literalExpectation("diamond", false), peg$c37 = "trapezium", peg$c38 = peg$literalExpectation("trapezium", false), peg$c39 = "parallelogram", peg$c40 = peg$literalExpectation("parallelogram", false), peg$c41 = "house", peg$c42 = peg$literalExpectation("house", false), peg$c43 = "pentagon", peg$c44 = peg$literalExpectation("pentagon", false), peg$c45 = "hexagon", peg$c46 = peg$literalExpectation("hexagon", false), peg$c47 = "septagon", peg$c48 = peg$literalExpectation("septagon", false), peg$c49 = "octagon", peg$c50 = peg$literalExpectation("octagon", false), peg$c51 = "doublecircle", peg$c52 = peg$literalExpectation("doublecircle", false), peg$c53 = "doubleoctagon", peg$c54 = peg$literalExpectation("doubleoctagon", false), peg$c55 = "tripleoctagon", peg$c56 = peg$literalExpectation("tripleoctagon", false), peg$c57 = "invtriangle", peg$c58 = peg$literalExpectation("invtriangle", false), peg$c59 = "invtrapezium", peg$c60 = peg$literalExpectation("invtrapezium", false), peg$c61 = "invhouse", peg$c62 = peg$literalExpectation("invhouse", false), peg$c63 = "Mdiamond", peg$c64 = peg$literalExpectation("Mdiamond", false), peg$c65 = "Msquare", peg$c66 = peg$literalExpectation("Msquare", false), peg$c67 = "Mcircle", peg$c68 = peg$literalExpectation("Mcircle", false), peg$c69 = "rectangle", peg$c70 = peg$literalExpectation("rectangle", false), peg$c71 = "rect", peg$c72 = peg$literalExpectation("rect", false), peg$c73 = "square", peg$c74 = peg$literalExpectation("square", false), peg$c75 = "star", peg$c76 = peg$literalExpectation("star", false), peg$c77 = "none", peg$c78 = peg$literalExpectation("none", false), peg$c79 = "underline", peg$c80 = peg$literalExpectation("underline", false), peg$c81 = "cylinder", peg$c82 = peg$literalExpectation("cylinder", false), peg$c83 = "note", peg$c84 = peg$literalExpectation("note", false), peg$c85 = "tab", peg$c86 = peg$literalExpectation("tab", false), peg$c87 = "folder", peg$c88 = peg$literalExpectation("folder", false), peg$c89 = "box", peg$c90 = peg$literalExpectation("box", false), peg$c91 = "component", peg$c92 = peg$literalExpectation("component", false), peg$c93 = "promoter", peg$c94 = peg$literalExpectation("promoter", false), peg$c95 = "cds", peg$c96 = peg$literalExpectation("cds", false), peg$c97 = "terminator", peg$c98 = peg$literalExpectation("terminator", false), peg$c99 = "utr", peg$c100 = peg$literalExpectation("utr", false), peg$c101 = "primersite", peg$c102 = peg$literalExpectation("primersite", false), peg$c103 = "restrictionsite", peg$c104 = peg$literalExpectation("restrictionsite", false), peg$c105 = "fivepoverhang", peg$c106 = peg$literalExpectation("fivepoverhang", false), peg$c107 = "threepoverhang", peg$c108 = peg$literalExpectation("threepoverhang", false), peg$c109 = "noverhang", peg$c110 = peg$literalExpectation("noverhang", false), peg$c111 = "assembly", peg$c112 = peg$literalExpectation("assembly", false), peg$c113 = "signature", peg$c114 = peg$literalExpectation("signature", false), peg$c115 = "insulator", peg$c116 = peg$literalExpectation("insulator", false), peg$c117 = "ribosite", peg$c118 = peg$literalExpectation("ribosite", false), peg$c119 = "rnastab", peg$c120 = peg$literalExpectation("rnastab", false), peg$c121 = "proteasesite", peg$c122 = peg$literalExpectation("proteasesite", false), peg$c123 = "proteinstab", peg$c124 = peg$literalExpectation("proteinstab", false), peg$c125 = "rpromoter", peg$c126 = peg$literalExpectation("rpromoter", false), peg$c127 = "rarrow", peg$c128 = peg$literalExpectation("rarrow", false), peg$c129 = "larrow", peg$c130 = peg$literalExpectation("larrow", false), peg$c131 = "lpromoter", peg$c132 = peg$literalExpectation("lpromoter", false), peg$c133 = "record", peg$c134 = peg$literalExpectation("record", false), peg$c135 = peg$otherExpectation("forward light arrow ->"), peg$c136 = "->", peg$c137 = peg$literalExpectation("->", false), peg$c138 = "\u2192", peg$c139 = peg$literalExpectation("\u2192", false), peg$c140 = function () { return "->"; }, peg$c141 = peg$otherExpectation("two way light arrow <->"), peg$c142 = "<->", peg$c143 = peg$literalExpectation("<->", false), peg$c144 = "\u2194", peg$c145 = peg$literalExpectation("\u2194", false), peg$c146 = function () { return "<->"; }, peg$c147 = peg$otherExpectation("back light arrow <-"), peg$c148 = "<-", peg$c149 = peg$literalExpectation("<-", false), peg$c150 = "\u2190", peg$c151 = peg$literalExpectation("\u2190", false), peg$c152 = function () { return "<-"; }, peg$c153 = peg$otherExpectation("forward fat arrow =>"), peg$c154 = "=>", peg$c155 = peg$literalExpectation("=>", false), peg$c156 = "\u21D2", peg$c157 = peg$literalExpectation("\u21D2", false), peg$c158 = function () { return "=>"; }, peg$c159 = peg$otherExpectation("two way fat arrow <=>"), peg$c160 = "<=>", peg$c161 = peg$literalExpectation("<=>", false), peg$c162 = "\u21D4", peg$c163 = peg$literalExpectation("\u21D4", false), peg$c164 = function () { return "<=>"; }, peg$c165 = peg$otherExpectation("back fat arrow <="), peg$c166 = "<=", peg$c167 = peg$literalExpectation("<=", false), peg$c168 = "\u21D0", peg$c169 = peg$literalExpectation("\u21D0", false), peg$c170 = function () { return "<="; }, peg$c171 = peg$otherExpectation("forward tilde arrow ~>"), peg$c172 = "~>", peg$c173 = peg$literalExpectation("~>", false), peg$c174 = "\u219B", peg$c175 = peg$literalExpectation("\u219B", false), peg$c176 = function () { return "~>"; }, peg$c177 = peg$otherExpectation("two way tilde arrow <~>"), peg$c178 = "<~>", peg$c179 = peg$literalExpectation("<~>", false), peg$c180 = "\u21AE", peg$c181 = peg$literalExpectation("\u21AE", false), peg$c182 = function () { return "<~>"; }, peg$c183 = peg$otherExpectation("back tilde arrow <~"), peg$c184 = "<~", peg$c185 = peg$literalExpectation("<~", false), peg$c186 = "\u219A", peg$c187 = peg$literalExpectation("\u219A", false), peg$c188 = function () { return "<~"; }, peg$c189 = peg$otherExpectation("light fat arrow <-=>"), peg$c190 = "<-=>", peg$c191 = peg$literalExpectation("<-=>", false), peg$c192 = "\u2190\u21D2", peg$c193 = peg$literalExpectation("\u2190\u21D2", false), peg$c194 = function () { return "<-=>"; }, peg$c195 = peg$otherExpectation("light tilde arrow <-~>"), peg$c196 = "<-~>", peg$c197 = peg$literalExpectation("<-~>", false), peg$c198 = "\u2190\u219B", peg$c199 = peg$literalExpectation("\u2190\u219B", false), peg$c200 = function () { return "<-~>"; }, peg$c201 = peg$otherExpectation("fat light arrow <=->"), peg$c202 = "<=->", peg$c203 = peg$literalExpectation("<=->", false), peg$c204 = "\u21D0\u2192", peg$c205 = peg$literalExpectation("\u21D0\u2192", false), peg$c206 = function () { return "<=->"; }, peg$c207 = peg$otherExpectation("fat tilde arrow <=~>"), peg$c208 = "<=~>", peg$c209 = peg$literalExpectation("<=~>", false), peg$c210 = "\u21D0\u219B", peg$c211 = peg$literalExpectation("\u21D0\u219B", false), peg$c212 = function () { return "<=~>"; }, peg$c213 = peg$otherExpectation("tilde light arrow <~->"), peg$c214 = "<~->", peg$c215 = peg$literalExpectation("<~->", false), peg$c216 = "\u219A\u2192", peg$c217 = peg$literalExpectation("\u219A\u2192", false), peg$c218 = function () { return "<~->"; }, peg$c219 = peg$otherExpectation("tilde fat arrow <~=>"), peg$c220 = "<~=>", peg$c221 = peg$literalExpectation("<~=>", false), peg$c222 = "\u219A\u21D2", peg$c223 = peg$literalExpectation("\u219A\u21D2", false), peg$c224 = function () { return "<~=>"; }, peg$c225 = peg$otherExpectation("light arrow"), peg$c226 = peg$otherExpectation("fat arrow"), peg$c227 = peg$otherExpectation("tilde arrow"), peg$c228 = peg$otherExpectation("mixed arrow"), peg$c229 = peg$otherExpectation("arrow"), peg$c230 = "true", peg$c231 = peg$literalExpectation("true", false), peg$c232 = function () { return true; }, peg$c233 = "false", peg$c234 = peg$literalExpectation("false", false), peg$c235 = function () { return false; }, peg$c236 = "regular", peg$c237 = peg$literalExpectation("regular", false), peg$c238 = "rounded", peg$c239 = peg$literalExpectation("rounded", false), peg$c240 = "lined", peg$c241 = peg$literalExpectation("lined", false), peg$c242 = "solid", peg$c243 = peg$literalExpectation("solid", false), peg$c244 = "dotted", peg$c245 = peg$literalExpectation("dotted", false), peg$c246 = "dashed", peg$c247 = peg$literalExpectation("dashed", false), peg$c248 = "\"", peg$c249 = peg$literalExpectation("\"", false), peg$c250 = "\\", peg$c251 = peg$literalExpectation("\\", false), peg$c252 = "/", peg$c253 = peg$literalExpectation("/", false), peg$c254 = "b", peg$c255 = peg$literalExpectation("b", false), peg$c256 = function () { return "\b"; }, peg$c257 = "f", peg$c258 = peg$literalExpectation("f", false), peg$c259 = function () { return "\f"; }, peg$c260 = "n", peg$c261 = peg$literalExpectation("n", false), peg$c262 = function () { return "\n"; }, peg$c263 = "r", peg$c264 = peg$literalExpectation("r", false), peg$c265 = function () { return "\r"; }, peg$c266 = "t", peg$c267 = peg$literalExpectation("t", false), peg$c268 = function () { return "\t"; }, peg$c269 = "v", peg$c270 = peg$literalExpectation("v", false), peg$c271 = function () { return "\v"; }, peg$c272 = "u", peg$c273 = peg$literalExpectation("u", false), peg$c274 = function (digits) {
|
|
353
353
|
return String.fromCharCode(parseInt(digits, 16));
|
|
354
354
|
}, peg$c275 = function (Sequence) { return Sequence; }, peg$c276 = "null", peg$c277 = peg$literalExpectation("null", false), peg$c278 = function () { return null; }, peg$c279 = "undefined", peg$c280 = peg$literalExpectation("undefined", false), peg$c281 = function () { return undefined; }, peg$c282 = /^[\0-!#-[\]-\uFFFF]/, peg$c283 = peg$classExpectation([["\0", "!"], ["#", "["], ["]", "\uFFFF"]], false, false), peg$c284 = "'", peg$c285 = peg$literalExpectation("'", false), peg$c286 = /^[ -&(-[\]-\uFFFF]/, peg$c287 = peg$classExpectation([[" ", "&"], ["(", "["], ["]", "\uFFFF"]], false, false), peg$c288 = peg$otherExpectation("action label"), peg$c289 = function (chars) { return chars.join(""); }, peg$c290 = /^[\n\r\u2028\u2029]/, peg$c291 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], false, false), peg$c292 = "*/", peg$c293 = peg$literalExpectation("*/", false), peg$c294 = peg$anyExpectation(), peg$c295 = peg$otherExpectation("block comment"), peg$c296 = "/*", peg$c297 = peg$literalExpectation("/*", false), peg$c298 = peg$otherExpectation("line comment"), peg$c299 = "//", peg$c300 = peg$literalExpectation("//", false), peg$c301 = peg$otherExpectation("whitespace"), peg$c302 = /^[ \t\r\n\x0B]/, peg$c303 = peg$classExpectation([" ", "\t", "\r", "\n", "\x0B"], false, false), peg$c304 = peg$otherExpectation("string"), peg$c305 = /^[0-9a-zA-Z._!$\^*!?,\x80-\uFFFF]/, peg$c306 = peg$classExpectation([["0", "9"], ["a", "z"], ["A", "Z"], ".", "_", "!", "$", "^", "*", "!", "?", ",", ["\x80", "\uFFFF"]], false, false), peg$c307 = /^[0-9a-zA-Z.+_\^()*&$#@!?,\x80-\uFFFF]/, peg$c308 = peg$classExpectation([["0", "9"], ["a", "z"], ["A", "Z"], ".", "+", "_", "^", "(", ")", "*", "&", "$", "#", "@", "!", "?", ",", ["\x80", "\uFFFF"]], false, false), peg$c309 = peg$otherExpectation("atom"), peg$c310 = function (firstletter, text) {
|
|
355
355
|
return firstletter + ((text || []).join(''));
|
|
@@ -586,9 +586,9 @@ function peg$parse(input, options) {
|
|
|
586
586
|
}
|
|
587
587
|
function peg$parseTheme() {
|
|
588
588
|
var s0;
|
|
589
|
-
if (input.substr(peg$currPos,
|
|
589
|
+
if (input.substr(peg$currPos, 7) === peg$c1) {
|
|
590
590
|
s0 = peg$c1;
|
|
591
|
-
peg$currPos +=
|
|
591
|
+
peg$currPos += 7;
|
|
592
592
|
}
|
|
593
593
|
else {
|
|
594
594
|
s0 = peg$FAILED;
|
|
@@ -597,9 +597,9 @@ function peg$parse(input, options) {
|
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
if (s0 === peg$FAILED) {
|
|
600
|
-
if (input.substr(peg$currPos,
|
|
600
|
+
if (input.substr(peg$currPos, 5) === peg$c3) {
|
|
601
601
|
s0 = peg$c3;
|
|
602
|
-
peg$currPos +=
|
|
602
|
+
peg$currPos += 5;
|
|
603
603
|
}
|
|
604
604
|
else {
|
|
605
605
|
s0 = peg$FAILED;
|
|
@@ -860,256 +860,256 @@ function peg$parse(input, options) {
|
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
if (s0 === peg$FAILED) {
|
|
863
|
-
if (input.substr(peg$currPos, 5) === peg$
|
|
864
|
-
s0 = peg$
|
|
863
|
+
if (input.substr(peg$currPos, 5) === peg$c7) {
|
|
864
|
+
s0 = peg$c7;
|
|
865
865
|
peg$currPos += 5;
|
|
866
866
|
}
|
|
867
867
|
else {
|
|
868
868
|
s0 = peg$FAILED;
|
|
869
869
|
if (peg$silentFails === 0) {
|
|
870
|
-
peg$fail(peg$
|
|
870
|
+
peg$fail(peg$c8);
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
873
|
if (s0 === peg$FAILED) {
|
|
874
|
-
if (input.substr(peg$currPos, 7) === peg$
|
|
875
|
-
s0 = peg$
|
|
874
|
+
if (input.substr(peg$currPos, 7) === peg$c35) {
|
|
875
|
+
s0 = peg$c35;
|
|
876
876
|
peg$currPos += 7;
|
|
877
877
|
}
|
|
878
878
|
else {
|
|
879
879
|
s0 = peg$FAILED;
|
|
880
880
|
if (peg$silentFails === 0) {
|
|
881
|
-
peg$fail(peg$
|
|
881
|
+
peg$fail(peg$c36);
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
884
|
if (s0 === peg$FAILED) {
|
|
885
|
-
if (input.substr(peg$currPos, 9) === peg$
|
|
886
|
-
s0 = peg$
|
|
885
|
+
if (input.substr(peg$currPos, 9) === peg$c37) {
|
|
886
|
+
s0 = peg$c37;
|
|
887
887
|
peg$currPos += 9;
|
|
888
888
|
}
|
|
889
889
|
else {
|
|
890
890
|
s0 = peg$FAILED;
|
|
891
891
|
if (peg$silentFails === 0) {
|
|
892
|
-
peg$fail(peg$
|
|
892
|
+
peg$fail(peg$c38);
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
895
|
if (s0 === peg$FAILED) {
|
|
896
|
-
if (input.substr(peg$currPos, 13) === peg$
|
|
897
|
-
s0 = peg$
|
|
896
|
+
if (input.substr(peg$currPos, 13) === peg$c39) {
|
|
897
|
+
s0 = peg$c39;
|
|
898
898
|
peg$currPos += 13;
|
|
899
899
|
}
|
|
900
900
|
else {
|
|
901
901
|
s0 = peg$FAILED;
|
|
902
902
|
if (peg$silentFails === 0) {
|
|
903
|
-
peg$fail(peg$
|
|
903
|
+
peg$fail(peg$c40);
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
906
|
if (s0 === peg$FAILED) {
|
|
907
|
-
if (input.substr(peg$currPos, 5) === peg$
|
|
908
|
-
s0 = peg$
|
|
907
|
+
if (input.substr(peg$currPos, 5) === peg$c41) {
|
|
908
|
+
s0 = peg$c41;
|
|
909
909
|
peg$currPos += 5;
|
|
910
910
|
}
|
|
911
911
|
else {
|
|
912
912
|
s0 = peg$FAILED;
|
|
913
913
|
if (peg$silentFails === 0) {
|
|
914
|
-
peg$fail(peg$
|
|
914
|
+
peg$fail(peg$c42);
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
917
|
if (s0 === peg$FAILED) {
|
|
918
|
-
if (input.substr(peg$currPos, 8) === peg$
|
|
919
|
-
s0 = peg$
|
|
918
|
+
if (input.substr(peg$currPos, 8) === peg$c43) {
|
|
919
|
+
s0 = peg$c43;
|
|
920
920
|
peg$currPos += 8;
|
|
921
921
|
}
|
|
922
922
|
else {
|
|
923
923
|
s0 = peg$FAILED;
|
|
924
924
|
if (peg$silentFails === 0) {
|
|
925
|
-
peg$fail(peg$
|
|
925
|
+
peg$fail(peg$c44);
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
if (s0 === peg$FAILED) {
|
|
929
|
-
if (input.substr(peg$currPos, 7) === peg$
|
|
930
|
-
s0 = peg$
|
|
929
|
+
if (input.substr(peg$currPos, 7) === peg$c45) {
|
|
930
|
+
s0 = peg$c45;
|
|
931
931
|
peg$currPos += 7;
|
|
932
932
|
}
|
|
933
933
|
else {
|
|
934
934
|
s0 = peg$FAILED;
|
|
935
935
|
if (peg$silentFails === 0) {
|
|
936
|
-
peg$fail(peg$
|
|
936
|
+
peg$fail(peg$c46);
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
939
|
if (s0 === peg$FAILED) {
|
|
940
|
-
if (input.substr(peg$currPos, 8) === peg$
|
|
941
|
-
s0 = peg$
|
|
940
|
+
if (input.substr(peg$currPos, 8) === peg$c47) {
|
|
941
|
+
s0 = peg$c47;
|
|
942
942
|
peg$currPos += 8;
|
|
943
943
|
}
|
|
944
944
|
else {
|
|
945
945
|
s0 = peg$FAILED;
|
|
946
946
|
if (peg$silentFails === 0) {
|
|
947
|
-
peg$fail(peg$
|
|
947
|
+
peg$fail(peg$c48);
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
950
|
if (s0 === peg$FAILED) {
|
|
951
|
-
if (input.substr(peg$currPos, 7) === peg$
|
|
952
|
-
s0 = peg$
|
|
951
|
+
if (input.substr(peg$currPos, 7) === peg$c49) {
|
|
952
|
+
s0 = peg$c49;
|
|
953
953
|
peg$currPos += 7;
|
|
954
954
|
}
|
|
955
955
|
else {
|
|
956
956
|
s0 = peg$FAILED;
|
|
957
957
|
if (peg$silentFails === 0) {
|
|
958
|
-
peg$fail(peg$
|
|
958
|
+
peg$fail(peg$c50);
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
if (s0 === peg$FAILED) {
|
|
962
|
-
if (input.substr(peg$currPos, 12) === peg$
|
|
963
|
-
s0 = peg$
|
|
962
|
+
if (input.substr(peg$currPos, 12) === peg$c51) {
|
|
963
|
+
s0 = peg$c51;
|
|
964
964
|
peg$currPos += 12;
|
|
965
965
|
}
|
|
966
966
|
else {
|
|
967
967
|
s0 = peg$FAILED;
|
|
968
968
|
if (peg$silentFails === 0) {
|
|
969
|
-
peg$fail(peg$
|
|
969
|
+
peg$fail(peg$c52);
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
if (s0 === peg$FAILED) {
|
|
973
|
-
if (input.substr(peg$currPos, 13) === peg$
|
|
974
|
-
s0 = peg$
|
|
973
|
+
if (input.substr(peg$currPos, 13) === peg$c53) {
|
|
974
|
+
s0 = peg$c53;
|
|
975
975
|
peg$currPos += 13;
|
|
976
976
|
}
|
|
977
977
|
else {
|
|
978
978
|
s0 = peg$FAILED;
|
|
979
979
|
if (peg$silentFails === 0) {
|
|
980
|
-
peg$fail(peg$
|
|
980
|
+
peg$fail(peg$c54);
|
|
981
981
|
}
|
|
982
982
|
}
|
|
983
983
|
if (s0 === peg$FAILED) {
|
|
984
|
-
if (input.substr(peg$currPos, 13) === peg$
|
|
985
|
-
s0 = peg$
|
|
984
|
+
if (input.substr(peg$currPos, 13) === peg$c55) {
|
|
985
|
+
s0 = peg$c55;
|
|
986
986
|
peg$currPos += 13;
|
|
987
987
|
}
|
|
988
988
|
else {
|
|
989
989
|
s0 = peg$FAILED;
|
|
990
990
|
if (peg$silentFails === 0) {
|
|
991
|
-
peg$fail(peg$
|
|
991
|
+
peg$fail(peg$c56);
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
if (s0 === peg$FAILED) {
|
|
995
|
-
if (input.substr(peg$currPos, 11) === peg$
|
|
996
|
-
s0 = peg$
|
|
995
|
+
if (input.substr(peg$currPos, 11) === peg$c57) {
|
|
996
|
+
s0 = peg$c57;
|
|
997
997
|
peg$currPos += 11;
|
|
998
998
|
}
|
|
999
999
|
else {
|
|
1000
1000
|
s0 = peg$FAILED;
|
|
1001
1001
|
if (peg$silentFails === 0) {
|
|
1002
|
-
peg$fail(peg$
|
|
1002
|
+
peg$fail(peg$c58);
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
if (s0 === peg$FAILED) {
|
|
1006
|
-
if (input.substr(peg$currPos, 12) === peg$
|
|
1007
|
-
s0 = peg$
|
|
1006
|
+
if (input.substr(peg$currPos, 12) === peg$c59) {
|
|
1007
|
+
s0 = peg$c59;
|
|
1008
1008
|
peg$currPos += 12;
|
|
1009
1009
|
}
|
|
1010
1010
|
else {
|
|
1011
1011
|
s0 = peg$FAILED;
|
|
1012
1012
|
if (peg$silentFails === 0) {
|
|
1013
|
-
peg$fail(peg$
|
|
1013
|
+
peg$fail(peg$c60);
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
1016
|
if (s0 === peg$FAILED) {
|
|
1017
|
-
if (input.substr(peg$currPos, 8) === peg$
|
|
1018
|
-
s0 = peg$
|
|
1017
|
+
if (input.substr(peg$currPos, 8) === peg$c61) {
|
|
1018
|
+
s0 = peg$c61;
|
|
1019
1019
|
peg$currPos += 8;
|
|
1020
1020
|
}
|
|
1021
1021
|
else {
|
|
1022
1022
|
s0 = peg$FAILED;
|
|
1023
1023
|
if (peg$silentFails === 0) {
|
|
1024
|
-
peg$fail(peg$
|
|
1024
|
+
peg$fail(peg$c62);
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
1027
|
if (s0 === peg$FAILED) {
|
|
1028
|
-
if (input.substr(peg$currPos, 8) === peg$
|
|
1029
|
-
s0 = peg$
|
|
1028
|
+
if (input.substr(peg$currPos, 8) === peg$c63) {
|
|
1029
|
+
s0 = peg$c63;
|
|
1030
1030
|
peg$currPos += 8;
|
|
1031
1031
|
}
|
|
1032
1032
|
else {
|
|
1033
1033
|
s0 = peg$FAILED;
|
|
1034
1034
|
if (peg$silentFails === 0) {
|
|
1035
|
-
peg$fail(peg$
|
|
1035
|
+
peg$fail(peg$c64);
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
1038
|
if (s0 === peg$FAILED) {
|
|
1039
|
-
if (input.substr(peg$currPos, 7) === peg$
|
|
1040
|
-
s0 = peg$
|
|
1039
|
+
if (input.substr(peg$currPos, 7) === peg$c65) {
|
|
1040
|
+
s0 = peg$c65;
|
|
1041
1041
|
peg$currPos += 7;
|
|
1042
1042
|
}
|
|
1043
1043
|
else {
|
|
1044
1044
|
s0 = peg$FAILED;
|
|
1045
1045
|
if (peg$silentFails === 0) {
|
|
1046
|
-
peg$fail(peg$
|
|
1046
|
+
peg$fail(peg$c66);
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
1049
1049
|
if (s0 === peg$FAILED) {
|
|
1050
|
-
if (input.substr(peg$currPos, 7) === peg$
|
|
1051
|
-
s0 = peg$
|
|
1050
|
+
if (input.substr(peg$currPos, 7) === peg$c67) {
|
|
1051
|
+
s0 = peg$c67;
|
|
1052
1052
|
peg$currPos += 7;
|
|
1053
1053
|
}
|
|
1054
1054
|
else {
|
|
1055
1055
|
s0 = peg$FAILED;
|
|
1056
1056
|
if (peg$silentFails === 0) {
|
|
1057
|
-
peg$fail(peg$
|
|
1057
|
+
peg$fail(peg$c68);
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
1060
|
if (s0 === peg$FAILED) {
|
|
1061
|
-
if (input.substr(peg$currPos, 9) === peg$
|
|
1062
|
-
s0 = peg$
|
|
1061
|
+
if (input.substr(peg$currPos, 9) === peg$c69) {
|
|
1062
|
+
s0 = peg$c69;
|
|
1063
1063
|
peg$currPos += 9;
|
|
1064
1064
|
}
|
|
1065
1065
|
else {
|
|
1066
1066
|
s0 = peg$FAILED;
|
|
1067
1067
|
if (peg$silentFails === 0) {
|
|
1068
|
-
peg$fail(peg$
|
|
1068
|
+
peg$fail(peg$c70);
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
1071
|
if (s0 === peg$FAILED) {
|
|
1072
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
1073
|
-
s0 = peg$
|
|
1072
|
+
if (input.substr(peg$currPos, 4) === peg$c71) {
|
|
1073
|
+
s0 = peg$c71;
|
|
1074
1074
|
peg$currPos += 4;
|
|
1075
1075
|
}
|
|
1076
1076
|
else {
|
|
1077
1077
|
s0 = peg$FAILED;
|
|
1078
1078
|
if (peg$silentFails === 0) {
|
|
1079
|
-
peg$fail(peg$
|
|
1079
|
+
peg$fail(peg$c72);
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
if (s0 === peg$FAILED) {
|
|
1083
|
-
if (input.substr(peg$currPos, 6) === peg$
|
|
1084
|
-
s0 = peg$
|
|
1083
|
+
if (input.substr(peg$currPos, 6) === peg$c73) {
|
|
1084
|
+
s0 = peg$c73;
|
|
1085
1085
|
peg$currPos += 6;
|
|
1086
1086
|
}
|
|
1087
1087
|
else {
|
|
1088
1088
|
s0 = peg$FAILED;
|
|
1089
1089
|
if (peg$silentFails === 0) {
|
|
1090
|
-
peg$fail(peg$
|
|
1090
|
+
peg$fail(peg$c74);
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
1093
|
if (s0 === peg$FAILED) {
|
|
1094
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
1095
|
-
s0 = peg$
|
|
1094
|
+
if (input.substr(peg$currPos, 4) === peg$c75) {
|
|
1095
|
+
s0 = peg$c75;
|
|
1096
1096
|
peg$currPos += 4;
|
|
1097
1097
|
}
|
|
1098
1098
|
else {
|
|
1099
1099
|
s0 = peg$FAILED;
|
|
1100
1100
|
if (peg$silentFails === 0) {
|
|
1101
|
-
peg$fail(peg$
|
|
1101
|
+
peg$fail(peg$c76);
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
1104
|
if (s0 === peg$FAILED) {
|
|
1105
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
1106
|
-
s0 = peg$
|
|
1105
|
+
if (input.substr(peg$currPos, 4) === peg$c77) {
|
|
1106
|
+
s0 = peg$c77;
|
|
1107
1107
|
peg$currPos += 4;
|
|
1108
1108
|
}
|
|
1109
1109
|
else {
|
|
1110
1110
|
s0 = peg$FAILED;
|
|
1111
1111
|
if (peg$silentFails === 0) {
|
|
1112
|
-
peg$fail(peg$
|
|
1112
|
+
peg$fail(peg$c78);
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
1115
|
if (s0 === peg$FAILED) {
|
|
@@ -18388,14 +18388,14 @@ function peg$parse(input, options) {
|
|
|
18388
18388
|
if (s4 !== peg$FAILED) {
|
|
18389
18389
|
s5 = peg$parseWS();
|
|
18390
18390
|
if (s5 !== peg$FAILED) {
|
|
18391
|
-
if (input.substr(peg$currPos, 7) === peg$
|
|
18392
|
-
s6 = peg$
|
|
18391
|
+
if (input.substr(peg$currPos, 7) === peg$c1) {
|
|
18392
|
+
s6 = peg$c1;
|
|
18393
18393
|
peg$currPos += 7;
|
|
18394
18394
|
}
|
|
18395
18395
|
else {
|
|
18396
18396
|
s6 = peg$FAILED;
|
|
18397
18397
|
if (peg$silentFails === 0) {
|
|
18398
|
-
peg$fail(peg$
|
|
18398
|
+
peg$fail(peg$c2);
|
|
18399
18399
|
}
|
|
18400
18400
|
}
|
|
18401
18401
|
if (s6 !== peg$FAILED) {
|
|
@@ -18633,14 +18633,14 @@ function peg$parse(input, options) {
|
|
|
18633
18633
|
if (s4 !== peg$FAILED) {
|
|
18634
18634
|
s5 = peg$parseWS();
|
|
18635
18635
|
if (s5 !== peg$FAILED) {
|
|
18636
|
-
if (input.substr(peg$currPos, 7) === peg$
|
|
18637
|
-
s6 = peg$
|
|
18636
|
+
if (input.substr(peg$currPos, 7) === peg$c1) {
|
|
18637
|
+
s6 = peg$c1;
|
|
18638
18638
|
peg$currPos += 7;
|
|
18639
18639
|
}
|
|
18640
18640
|
else {
|
|
18641
18641
|
s6 = peg$FAILED;
|
|
18642
18642
|
if (peg$silentFails === 0) {
|
|
18643
|
-
peg$fail(peg$
|
|
18643
|
+
peg$fail(peg$c2);
|
|
18644
18644
|
}
|
|
18645
18645
|
}
|
|
18646
18646
|
if (s6 !== peg$FAILED) {
|
|
@@ -21041,7 +21041,7 @@ var constants = /*#__PURE__*/Object.freeze({
|
|
|
21041
21041
|
* Useful for runtime diagnostics and for embedding in serialized machine
|
|
21042
21042
|
* snapshots so that deserializers can detect version-skew.
|
|
21043
21043
|
*/
|
|
21044
|
-
const version = "5.
|
|
21044
|
+
const version = "5.125.0";
|
|
21045
21045
|
|
|
21046
21046
|
// whargarbl lots of these return arrays could/should be sets
|
|
21047
21047
|
const { state_name_chars, state_name_first_chars, action_label_chars } = constants;
|
|
@@ -24357,18 +24357,113 @@ function vc(col) {
|
|
|
24357
24357
|
return (_a = default_viz_colors[col]) !== null && _a !== void 0 ? _a : '';
|
|
24358
24358
|
}
|
|
24359
24359
|
/**
|
|
24360
|
-
*
|
|
24361
|
-
*
|
|
24362
|
-
*
|
|
24363
|
-
*
|
|
24364
|
-
*
|
|
24360
|
+
* Convert a state name into a URL-friendly slug suitable for use as the
|
|
24361
|
+
* body of a dot/SVG node identifier. The transformation is:
|
|
24362
|
+
*
|
|
24363
|
+
* 1. Lowercase
|
|
24364
|
+
* 2. Any run of characters outside `[a-z0-9]` (after lowercasing) becomes
|
|
24365
|
+
* a single `-`
|
|
24366
|
+
* 3. Leading and trailing `-` are trimmed
|
|
24367
|
+
*
|
|
24368
|
+
* If the result is empty (e.g. for a state named `"!!!"`), the empty
|
|
24369
|
+
* string is returned — callers are expected to fall back to an indexed
|
|
24370
|
+
* placeholder like `node-N`. See {@link slug_states} for the collision-
|
|
24371
|
+
* resolving wrapper that consumes this helper.
|
|
24372
|
+
*
|
|
24373
|
+
* ```typescript
|
|
24374
|
+
* slug_for('Green Light'); // 'green-light'
|
|
24375
|
+
* slug_for('!!!'); // ''
|
|
24376
|
+
* slug_for(' Foo Bar '); // 'foo-bar'
|
|
24377
|
+
* ```
|
|
24378
|
+
*
|
|
24379
|
+
* @param state The state name to slugify.
|
|
24380
|
+
* @returns The lowercase hyphen-separated slug, or empty string if none of
|
|
24381
|
+
* the characters were retainable.
|
|
24382
|
+
*
|
|
24383
|
+
* @internal
|
|
24384
|
+
*/
|
|
24385
|
+
function slug_for(state) {
|
|
24386
|
+
return state
|
|
24387
|
+
.toLowerCase()
|
|
24388
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
24389
|
+
.replace(/^-+|-+$/g, '');
|
|
24390
|
+
}
|
|
24391
|
+
/**
|
|
24392
|
+
* Build a `Map<state, slug>` assigning every state in `states` a unique,
|
|
24393
|
+
* deterministic, URL-safe slug used as its dot/SVG node identifier.
|
|
24394
|
+
*
|
|
24395
|
+
* Algorithm:
|
|
24396
|
+
*
|
|
24397
|
+
* 1. Slug each state via {@link slug_for}. States whose slug comes out
|
|
24398
|
+
* empty fall back to `node-N`, where `N` is the state's declaration
|
|
24399
|
+
* index (1-based, to match user-visible numbering).
|
|
24400
|
+
* 2. Walk the state list in declaration order, tracking how many times
|
|
24401
|
+
* each base slug has already been used. The first occurrence keeps
|
|
24402
|
+
* the base slug; subsequent collisions get `-2`, `-3`, … suffixes.
|
|
24403
|
+
* If the proposed suffixed slug itself collides with a base slug
|
|
24404
|
+
* used later, the counter advances until a free slot is found.
|
|
24405
|
+
*
|
|
24406
|
+
* This yields a deterministic mapping given the state-declaration order,
|
|
24407
|
+
* so output is stable across runs.
|
|
24408
|
+
*
|
|
24409
|
+
* ```typescript
|
|
24410
|
+
* slug_states(['Red Light', 'red-light']);
|
|
24411
|
+
* // Map { 'Red Light' => 'red-light', 'red-light' => 'red-light-2' }
|
|
24412
|
+
*
|
|
24413
|
+
* slug_states(['!!!', '???']);
|
|
24414
|
+
* // Map { '!!!' => 'node-1', '???' => 'node-2' }
|
|
24415
|
+
* ```
|
|
24416
|
+
*
|
|
24417
|
+
* @param states States in declaration order.
|
|
24418
|
+
* @returns A `Map` from each state name to its unique slug.
|
|
24419
|
+
*
|
|
24420
|
+
* @internal
|
|
24421
|
+
*/
|
|
24422
|
+
function slug_states(states) {
|
|
24423
|
+
const used = new Set();
|
|
24424
|
+
const out = new Map();
|
|
24425
|
+
states.forEach((s, i) => {
|
|
24426
|
+
const base = slug_for(s) || `node-${i + 1}`;
|
|
24427
|
+
let candidate = base;
|
|
24428
|
+
let n = 2;
|
|
24429
|
+
while (used.has(candidate)) {
|
|
24430
|
+
candidate = `${base}-${n}`;
|
|
24431
|
+
n += 1;
|
|
24432
|
+
}
|
|
24433
|
+
used.add(candidate);
|
|
24434
|
+
out.set(s, candidate);
|
|
24435
|
+
});
|
|
24436
|
+
return out;
|
|
24437
|
+
}
|
|
24438
|
+
/**
|
|
24439
|
+
* Build a graphviz-safe node identifier for a state. Accepts either a
|
|
24440
|
+
* `string[]` (legacy test-only path; returns an index-based `n0`/`n1`
|
|
24441
|
+
* identifier via `indexOf`), or a precomputed `Map<state, slug>` produced
|
|
24442
|
+
* by {@link slug_states} (used by all rendering hot paths).
|
|
24443
|
+
*
|
|
24444
|
+
* When a slug map is supplied, the identifier is the slug wrapped in
|
|
24445
|
+
* double quotes — dot allows quoted identifiers, and the slug alphabet
|
|
24446
|
+
* (lowercase alphanumerics + `-`) requires quoting because bare dot IDs
|
|
24447
|
+
* may not contain `-`. Graphviz round-trips the quoted form through to
|
|
24448
|
+
* the SVG `<title>` element and uses the slug as a stable basis for the
|
|
24449
|
+
* generated SVG element `id` attribute.
|
|
24450
|
+
*
|
|
24451
|
+
* ```typescript
|
|
24452
|
+
* node_of('Red Light', new Map([['Red Light', 'red-light']]));
|
|
24453
|
+
* // '"red-light"'
|
|
24454
|
+
* ```
|
|
24365
24455
|
*
|
|
24366
24456
|
* @internal
|
|
24367
24457
|
*/
|
|
24368
24458
|
function node_of(state, state_index) {
|
|
24369
|
-
|
|
24370
|
-
|
|
24371
|
-
|
|
24459
|
+
if (Array.isArray(state_index)) {
|
|
24460
|
+
return `n${state_index.indexOf(state)}`;
|
|
24461
|
+
}
|
|
24462
|
+
const v = state_index.get(state);
|
|
24463
|
+
if (typeof v === 'string') {
|
|
24464
|
+
return `"${v}"`;
|
|
24465
|
+
}
|
|
24466
|
+
return `n${v}`;
|
|
24372
24467
|
}
|
|
24373
24468
|
/**
|
|
24374
24469
|
* Compose a graphviz `style` string from a pre-computed
|
|
@@ -24706,7 +24801,7 @@ function arranges_for(u_jssm, state_index) {
|
|
|
24706
24801
|
function machine_to_dot(u_jssm, opts = {}) {
|
|
24707
24802
|
var _a;
|
|
24708
24803
|
const l_states = u_jssm.states();
|
|
24709
|
-
const state_index =
|
|
24804
|
+
const state_index = slug_states(l_states);
|
|
24710
24805
|
const state_kinds = classify_states(u_jssm, l_states);
|
|
24711
24806
|
const nodes = states_to_nodes_string(u_jssm, l_states, state_index, state_kinds, opts.hide_state_labels === true);
|
|
24712
24807
|
const edges = states_to_edges_string(u_jssm, l_states, state_index, state_kinds);
|