cubing 0.52.0 → 0.52.2

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.
Files changed (78) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/puzzle-geometry-bin.js +2 -2
  3. package/dist/bin/puzzle-geometry-bin.js.map +1 -1
  4. package/dist/bin/scramble.js +9 -2
  5. package/dist/bin/scramble.js.map +2 -2
  6. package/dist/lib/cubing/{KPattern.d-N-dYG3S_.d.ts → KPattern.d-xuPJs0ug.d.ts} +1 -1
  7. package/dist/lib/cubing/{PuzzleLoader-DUS1aLQG.d.ts → PuzzleLoader-Cas0EZPp.d.ts} +31 -21
  8. package/dist/lib/cubing/{TwizzleLink.d-Cf4H-1Jc.d.ts → TwizzleLink.d-WfSkIfwD.d.ts} +3 -3
  9. package/dist/lib/cubing/alg/index.d.ts +19 -19
  10. package/dist/lib/cubing/alg/index.js +1 -1
  11. package/dist/lib/cubing/bluetooth/index.d.ts +6 -6
  12. package/dist/lib/cubing/bluetooth/index.js +5 -5
  13. package/dist/lib/cubing/{bluetooth-puzzle.d-ClBIGffk.d.ts → bluetooth-puzzle.d-C0XAV6ic.d.ts} +2 -2
  14. package/dist/lib/cubing/chunks/{chunk-BKDL54KM.js → chunk-4QUGAADL.js} +48 -29
  15. package/dist/lib/cubing/chunks/chunk-4QUGAADL.js.map +7 -0
  16. package/dist/lib/cubing/chunks/{chunk-74JQNDKL.js → chunk-5VWOLKUC.js} +3 -3
  17. package/dist/lib/cubing/chunks/{chunk-YUOBAYIL.js → chunk-5Z53QNZS.js} +3 -3
  18. package/dist/lib/cubing/chunks/{chunk-ZJQ7HF54.js → chunk-CIXBGOOX.js} +2 -2
  19. package/dist/lib/cubing/chunks/{chunk-DSMNO2NL.js → chunk-L67IYVUG.js} +3 -3
  20. package/dist/lib/cubing/chunks/{chunk-2P6TNNY3.js → chunk-MCJFY474.js} +4 -3
  21. package/dist/lib/cubing/chunks/{chunk-2P6TNNY3.js.map → chunk-MCJFY474.js.map} +1 -1
  22. package/dist/lib/cubing/chunks/{chunk-7NWFAGQJ.js → chunk-TSTVI26N.js} +5 -5
  23. package/dist/lib/cubing/chunks/{chunk-PELVXAI7.js → chunk-VJNWIUJL.js} +2 -2
  24. package/dist/lib/cubing/chunks/{chunk-SJG4RSQ7.js → chunk-XDSD4WY3.js} +4 -4
  25. package/dist/lib/cubing/chunks/{chunk-6APJHPXM.js → chunk-ZCOKH4N7.js} +2 -2
  26. package/dist/lib/cubing/chunks/{inside-27AE3BA4.js → inside-3DZHA2UE.js} +21 -14
  27. package/dist/lib/cubing/chunks/{inside-27AE3BA4.js.map → inside-3DZHA2UE.js.map} +1 -1
  28. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-3RHFK7AV.js → search-dynamic-sgs-side-events-5PT5NPLZ.js} +6 -6
  29. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-NZE5FKFE.js → search-dynamic-sgs-unofficial-MVOG2KLC.js} +6 -6
  30. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-JFKCEJQ2.js → search-dynamic-solve-4x4x4-73PVNO5Q.js} +7 -7
  31. package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-ONSGYKTM.js → search-dynamic-solve-fto-TL4GETO2.js} +2 -2
  32. package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-ZX2CLDKY.js → search-dynamic-solve-kilominx-OKETU2LL.js} +2 -2
  33. package/dist/lib/cubing/chunks/search-worker-entry.js +1 -1
  34. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-NVEO366S.js → twisty-dynamic-3d-7ZN6BI6G.js} +6 -6
  35. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-NVEO366S.js.map → twisty-dynamic-3d-7ZN6BI6G.js.map} +2 -2
  36. package/dist/lib/cubing/chunks/{twsearch-PO5XVUBI.js → twsearch-57UA6UJ5.js} +3 -3
  37. package/dist/lib/cubing/chunks/{twsearch-PO5XVUBI.js.map → twsearch-57UA6UJ5.js.map} +1 -1
  38. package/dist/lib/cubing/chunks/twsearch_wasm_bg-EDFRIWUK-BXQ7VHRF.js +15 -0
  39. package/dist/lib/cubing/chunks/twsearch_wasm_bg-EDFRIWUK-BXQ7VHRF.js.map +7 -0
  40. package/dist/lib/cubing/{index-BW1Xj98G.d.ts → index-CfdtT2YB.d.ts} +2 -2
  41. package/dist/lib/cubing/kpuzzle/index.d.ts +2 -2
  42. package/dist/lib/cubing/kpuzzle/index.js +2 -2
  43. package/dist/lib/cubing/notation/index.d.ts +4 -4
  44. package/dist/lib/cubing/notation/index.js +4 -4
  45. package/dist/lib/cubing/{parseAlg.d-DhFLCVac.d.ts → parseAlg.d-BaJ_OjeN.d.ts} +1 -1
  46. package/dist/lib/cubing/protocol/index.d.ts +2 -2
  47. package/dist/lib/cubing/protocol/index.js +4 -4
  48. package/dist/lib/cubing/puzzle-geometry/index.d.ts +3 -3
  49. package/dist/lib/cubing/puzzle-geometry/index.js +74 -71
  50. package/dist/lib/cubing/puzzle-geometry/index.js.map +4 -4
  51. package/dist/lib/cubing/puzzles/index.d.ts +4 -4
  52. package/dist/lib/cubing/puzzles/index.js +4 -4
  53. package/dist/lib/cubing/scramble/index.d.ts +3 -3
  54. package/dist/lib/cubing/scramble/index.js +6 -6
  55. package/dist/lib/cubing/search/index.d.ts +3 -3
  56. package/dist/lib/cubing/search/index.js +6 -6
  57. package/dist/lib/cubing/stream/index.d.ts +5 -5
  58. package/dist/lib/cubing/stream/index.js +1 -1
  59. package/dist/lib/cubing/twisty/index.d.ts +5 -5
  60. package/dist/lib/cubing/twisty/index.js +7 -6
  61. package/dist/lib/cubing/twisty/index.js.map +2 -2
  62. package/package.json +15 -14
  63. package/dist/lib/cubing/chunks/chunk-BKDL54KM.js.map +0 -7
  64. package/dist/lib/cubing/chunks/twsearch_wasm_bg-BXF6UDBS-C6IO3BR3.js +0 -15
  65. package/dist/lib/cubing/chunks/twsearch_wasm_bg-BXF6UDBS-C6IO3BR3.js.map +0 -7
  66. /package/dist/lib/cubing/chunks/{chunk-74JQNDKL.js.map → chunk-5VWOLKUC.js.map} +0 -0
  67. /package/dist/lib/cubing/chunks/{chunk-YUOBAYIL.js.map → chunk-5Z53QNZS.js.map} +0 -0
  68. /package/dist/lib/cubing/chunks/{chunk-ZJQ7HF54.js.map → chunk-CIXBGOOX.js.map} +0 -0
  69. /package/dist/lib/cubing/chunks/{chunk-DSMNO2NL.js.map → chunk-L67IYVUG.js.map} +0 -0
  70. /package/dist/lib/cubing/chunks/{chunk-7NWFAGQJ.js.map → chunk-TSTVI26N.js.map} +0 -0
  71. /package/dist/lib/cubing/chunks/{chunk-PELVXAI7.js.map → chunk-VJNWIUJL.js.map} +0 -0
  72. /package/dist/lib/cubing/chunks/{chunk-SJG4RSQ7.js.map → chunk-XDSD4WY3.js.map} +0 -0
  73. /package/dist/lib/cubing/chunks/{chunk-6APJHPXM.js.map → chunk-ZCOKH4N7.js.map} +0 -0
  74. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-3RHFK7AV.js.map → search-dynamic-sgs-side-events-5PT5NPLZ.js.map} +0 -0
  75. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-NZE5FKFE.js.map → search-dynamic-sgs-unofficial-MVOG2KLC.js.map} +0 -0
  76. /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-JFKCEJQ2.js.map → search-dynamic-solve-4x4x4-73PVNO5Q.js.map} +0 -0
  77. /package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-ONSGYKTM.js.map → search-dynamic-solve-fto-TL4GETO2.js.map} +0 -0
  78. /package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-ZX2CLDKY.js.map → search-dynamic-solve-kilominx-OKETU2LL.js.map} +0 -0
package/README.md CHANGED
@@ -13,7 +13,7 @@ Twizzle</a> is the spiritual successor to [alg.cubing.net](https://alg.cubing.ne
13
13
  If you're just getting started, the easiest way to use `cubing.js` is through `cdn.cubing.net`:
14
14
 
15
15
  ```html
16
- <script src="https://cdn.cubing.net/js/cubing/twisty" type="module"></script>
16
+ <script src="https://cdn.cubing.net/v0/js/cubing/twisty" type="module"></script>
17
17
  <twisty-player alg="R U R' U R U2' R'"></twisty-player>
18
18
  ```
19
19
 
@@ -130,8 +130,8 @@ little chop, pyramorphix, mastermorphix, pyraminx, Jing pyraminx,
130
130
  master paramorphix, megaminx, gigaminx, pentultimate, starminx,
131
131
  starminx 2, pyraminx crystal, chopasaurus, big chop, skewb diamond,
132
132
  FTO, Christopher's jewel, octastar, Trajber's octahedron, radio chop,
133
- icosamate, icosahedron 2, icosahedron 3, icosahedron static faces,
134
- icosahedron moving faces, and Eitan's star.
133
+ icosamate, Regular Astrominx, Regular Astrominx + Big Chop,
134
+ Redicosahedron, Redicosahedron with centers,Icosaminx, and Eitan's star.
135
135
 
136
136
  Examples:
137
137
  puzzlegeometry --ss 2x2x2
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/bin/puzzle-geometry-bin.ts"],
4
- "sourcesContent": ["// To run this file directly:\n// bun run src/bin/puzzle-geometry-bin.ts -- <program args>\n\nimport {\n PuzzleGeometry,\n getPG3DNamedPuzzles,\n parsePuzzleDescription,\n type ExperimentalPuzzleBaseShape,\n type ExperimentalPuzzleCutType,\n type ExperimentalPuzzleGeometryOptions,\n} from \"cubing/puzzle-geometry\";\nimport type { PuzzleDescriptionString } from \"cubing/puzzle-geometry/PGPuzzles\";\nimport type {\n PuzzleCutDescription,\n PuzzleDescription,\n} from \"cubing/puzzle-geometry/PuzzleGeometry\";\n\nexport function asstructured(v: any): any {\n if (typeof v === \"string\") {\n return JSON.parse(v);\n }\n return v;\n}\nexport function asboolean(v: any): boolean {\n if (typeof v === \"string\") {\n return v !== \"false\";\n } else {\n return !!v;\n }\n}\nexport function parsePGOptionList(\n optionlist?: any[],\n): ExperimentalPuzzleGeometryOptions {\n const options: ExperimentalPuzzleGeometryOptions = {};\n if (optionlist !== undefined) {\n if (optionlist.length % 2 !== 0) {\n throw new Error(\"Odd length in option list?\");\n }\n for (let i = 0; i < optionlist.length; i += 2) {\n if (optionlist[i] === \"verbose\") {\n options.verbosity = (options.verbosity ?? 0) + 1;\n } else if (optionlist[i] === \"quiet\") {\n options.verbosity = 0;\n } else if (optionlist[i] === \"allmoves\") {\n options.allMoves = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"outerblockmoves\") {\n options.outerBlockMoves = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"vertexmoves\") {\n options.vertexMoves = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"rotations\") {\n options.addRotations = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"cornersets\") {\n options.includeCornerOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"centersets\") {\n options.includeCenterOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"edgesets\") {\n options.includeEdgeOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"omit\") {\n options.excludeOrbits = optionlist[i + 1];\n } else if (optionlist[i] === \"graycorners\") {\n options.grayCorners = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"graycenters\") {\n options.grayCenters = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"grayedges\") {\n options.grayEdges = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"movelist\") {\n options.moveList = asstructured(optionlist[i + 1]);\n } else if (optionlist[i] === \"killorientation\") {\n options.fixedOrientation = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"optimize\") {\n options.optimizeOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"scramble\") {\n options.scrambleAmount = optionlist[i + 1];\n } else if (optionlist[i] === \"fix\") {\n options.fixedPieceType = optionlist[i + 1];\n } else if (optionlist[i] === \"orientcenters\") {\n options.orientCenters = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"puzzleorientation\") {\n options.puzzleOrientation = asstructured(optionlist[i + 1]);\n } else if (optionlist[i] === \"puzzleorientations\") {\n options.puzzleOrientations = asstructured(optionlist[i + 1]);\n } else {\n throw new Error(\n `Bad option while processing option list ${optionlist[i]}`,\n );\n }\n }\n }\n return options;\n}\n\nlet dosvg = false;\nlet doss = false;\nlet doksolve = false;\nlet dogap = false;\nlet domathematica = false;\nlet docanon = false;\nlet do3d = false;\nif (globalThis.process && process.argv && process.argv.length <= 2) {\n console.log(\n `Usage: puzzle-geometry [options] [puzzle]\n\nOptions:\n--ksolve: write ksolve (tws) file\n--svg: write SVG (default is flat; --3d makes it 3D)\n--gap: write gap\n--mathematica: write mathematica\n--ss: execute Schrier-Sims calculation\n--3d: use 3D format for SVG file\n--canon: write canonical string analysis\n--rotations: include full-puzzle rotations as moves\n--allmoves: includes all moves (i.e., slice moves for 3x3x3)\n--outerblockmoves: use outer block moves rather than slice moves\n--vertexmoves: for tetrahedral puzzles, prefer vertex moves to face moves\n--nocorners: ignore all corners\n--noedges: ignore all edges\n--nocenters: ignore all centers\n--noorientation: ignore orientations\n--orientcenters: give centers an orientation\n--puzzleorientation: for 3D formats, give puzzle orientation\n--moves movenames: restrict moves to this list (e.g, U2,F,r)\n--optimize: optimize tws/ksolve/gap output\n--scramble: scramble solved position\n--fixcorner: choose moves to keep one corner fixed\n--fixedge: choose moves to keep one edge fixed\n--fixcenter: choose moves to keep one center fixed\n--verbose (-v): make verbose\n\nThe puzzle can be given as a geometric description or by name.\nThe geometric description starts with c (cube), t (tetrahedron),\nd (dodecahedron), i (icosahedron), or o (octahedron), then a\nspace, then a series of cuts. Each cut begins with f (for a\ncut parallel to faces), v (for a cut perpendicular to a ray\nfrom the center through a corner), or e (for a cut perpendicular\nto a ray from the center through an edge) followed by a decimal\nnumber giving a distance, where 1 is the distance between the\ncenter of the puzzle and the center of a face.\n\nThe puzzle names recognized are 2x2x2 through 13x13x13, 20x20x20,\nmaster skewb, professor skewb, compy cube, helicopter, dino,\nlittle chop, pyramorphix, mastermorphix, pyraminx, Jing pyraminx,\nmaster paramorphix, megaminx, gigaminx, pentultimate, starminx,\nstarminx 2, pyraminx crystal, chopasaurus, big chop, skewb diamond,\nFTO, Christopher's jewel, octastar, Trajber's octahedron, radio chop,\nicosamate, icosahedron 2, icosahedron 3, icosahedron static faces,\nicosahedron moving faces, and Eitan's star.\n\nExamples:\n puzzlegeometry --ss 2x2x2\n puzzlegeometry --ss --fixcorner 2x2x2\n puzzlegeometry --ss --moves U,F2,r 4x4x4\n puzzlegeometry --ksolve --optimize --moves U,F,R megaminx\n puzzlegeometry --gap --noedges megaminx\n`,\n );\n}\nif (globalThis.process && process.argv && process.argv.length >= 3) {\n let desc: PuzzleDescriptionString | undefined;\n const puzzleList = getPG3DNamedPuzzles();\n let argp = 2;\n const optionlist = [];\n let showargs = true;\n let pascalcomment = false;\n while (argp < process.argv.length && process.argv[argp][0] === \"-\") {\n const option = process.argv[argp++];\n if (option === \"--verbose\" || option === \"-v\") {\n optionlist.push(\"verbose\", true);\n } else if (option === \"--quiet\" || option === \"-q\") {\n optionlist.push(\"quiet\", true);\n showargs = false;\n } else if (option === \"--ksolve\") {\n doksolve = true;\n } else if (option === \"--svg\") {\n showargs = false;\n optionlist.push(\"quiet\", true);\n dosvg = true;\n } else if (option === \"--gap\") {\n dogap = true;\n } else if (option === \"--mathematica\") {\n domathematica = true;\n pascalcomment = true;\n } else if (option === \"--ss\") {\n doss = true;\n } else if (option === \"--3d\") {\n do3d = true;\n } else if (option === \"--canon\") {\n docanon = true;\n } else if (option === \"--rotations\") {\n optionlist.push(\"rotations\", true);\n } else if (option === \"--allmoves\") {\n optionlist.push(\"allmoves\", true);\n } else if (option === \"--outerblockmoves\") {\n optionlist.push(\"outerblockmoves\", true);\n } else if (option === \"--vertexmoves\") {\n optionlist.push(\"vertexmoves\", true);\n } else if (option === \"--nocorners\") {\n optionlist.push(\"cornersets\", false);\n } else if (option === \"--noedges\") {\n optionlist.push(\"edgesets\", false);\n } else if (option === \"--noorientation\") {\n optionlist.push(\"killorientation\", true);\n } else if (option === \"--nocenters\") {\n optionlist.push(\"centersets\", false);\n } else if (option === \"--omit\") {\n optionlist.push(\"omit\", process.argv[argp].split(\",\"));\n argp++;\n } else if (option === \"--moves\") {\n optionlist.push(\"movelist\", process.argv[argp].split(\",\"));\n argp++;\n } else if (option === \"--optimize\") {\n optionlist.push(\"optimize\", true);\n } else if (option === \"--scramble\") {\n optionlist.push(\"scramble\", 100);\n } else if (option === \"--fixcorner\") {\n optionlist.push(\"fix\", \"v\");\n } else if (option === \"--fixedge\") {\n optionlist.push(\"fix\", \"e\");\n } else if (option === \"--fixcenter\") {\n optionlist.push(\"fix\", \"f\");\n } else if (option === \"--orientcenters\") {\n optionlist.push(\"orientcenters\", true);\n } else if (option === \"--puzzleorientation\") {\n optionlist.push(\"puzzleorientation\", process.argv[argp]);\n argp++;\n } else {\n throw new Error(`Bad option: ${option}`);\n }\n }\n for (const [name, curDesc] of Object.entries(puzzleList)) {\n if (name === process.argv[argp]) {\n desc = curDesc;\n break;\n }\n }\n let puzzleDescription: PuzzleDescription;\n if (showargs) {\n if (pascalcomment) {\n console.log(`(* ${process.argv.join(\" \")} *)`);\n } else {\n console.log(`# ${process.argv.join(\" \")}`);\n }\n }\n if (desc !== undefined) {\n const parsed = parsePuzzleDescription(desc);\n if (parsed === null) {\n throw new Error(\"Could not parse puzzle description!\");\n }\n puzzleDescription = parsed;\n argp++;\n } else {\n const cuts: PuzzleCutDescription[] = [];\n const cutarg = argp++;\n while (argp + 1 < process.argv.length && process.argv[argp].length === 1) {\n // TODO: validate cut type\n cuts.push({\n cutType: process.argv[argp] as ExperimentalPuzzleCutType,\n distance: parseFloat(process.argv[argp + 1]),\n });\n argp += 2;\n }\n // TODO: validate shape\n puzzleDescription = {\n shape: process.argv[cutarg] as ExperimentalPuzzleBaseShape,\n cuts,\n };\n }\n const options = parsePGOptionList(optionlist);\n const pg = new PuzzleGeometry(puzzleDescription, options);\n pg.allstickers();\n pg.genperms();\n if (argp < process.argv.length) {\n throw new Error(\"Unprocessed content at end of command line\");\n }\n if (dogap) {\n console.log(pg.writegap());\n } else if (domathematica) {\n console.log(pg.writemathematica());\n } else if (doksolve) {\n console.log(pg.writeksolve()); // TODO: Update arguments\n } else if (dosvg) {\n console.log(pg.generatesvg(undefined, undefined, undefined, do3d));\n } else if (do3d) {\n console.log(JSON.stringify(pg.get3d()));\n } else if (doss) {\n pg.writeSchreierSims(console.log);\n } else if (docanon) {\n pg.showcanon((_) => console.log(_));\n }\n}\n"],
4
+ "sourcesContent": ["// To run this file directly:\n// bun run src/bin/puzzle-geometry-bin.ts -- <program args>\n\nimport {\n PuzzleGeometry,\n getPG3DNamedPuzzles,\n parsePuzzleDescription,\n type ExperimentalPuzzleBaseShape,\n type ExperimentalPuzzleCutType,\n type ExperimentalPuzzleGeometryOptions,\n} from \"cubing/puzzle-geometry\";\nimport type { PuzzleDescriptionString } from \"cubing/puzzle-geometry/PGPuzzles\";\nimport type {\n PuzzleCutDescription,\n PuzzleDescription,\n} from \"cubing/puzzle-geometry/PuzzleGeometry\";\n\nexport function asstructured(v: any): any {\n if (typeof v === \"string\") {\n return JSON.parse(v);\n }\n return v;\n}\nexport function asboolean(v: any): boolean {\n if (typeof v === \"string\") {\n return v !== \"false\";\n } else {\n return !!v;\n }\n}\nexport function parsePGOptionList(\n optionlist?: any[],\n): ExperimentalPuzzleGeometryOptions {\n const options: ExperimentalPuzzleGeometryOptions = {};\n if (optionlist !== undefined) {\n if (optionlist.length % 2 !== 0) {\n throw new Error(\"Odd length in option list?\");\n }\n for (let i = 0; i < optionlist.length; i += 2) {\n if (optionlist[i] === \"verbose\") {\n options.verbosity = (options.verbosity ?? 0) + 1;\n } else if (optionlist[i] === \"quiet\") {\n options.verbosity = 0;\n } else if (optionlist[i] === \"allmoves\") {\n options.allMoves = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"outerblockmoves\") {\n options.outerBlockMoves = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"vertexmoves\") {\n options.vertexMoves = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"rotations\") {\n options.addRotations = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"cornersets\") {\n options.includeCornerOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"centersets\") {\n options.includeCenterOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"edgesets\") {\n options.includeEdgeOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"omit\") {\n options.excludeOrbits = optionlist[i + 1];\n } else if (optionlist[i] === \"graycorners\") {\n options.grayCorners = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"graycenters\") {\n options.grayCenters = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"grayedges\") {\n options.grayEdges = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"movelist\") {\n options.moveList = asstructured(optionlist[i + 1]);\n } else if (optionlist[i] === \"killorientation\") {\n options.fixedOrientation = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"optimize\") {\n options.optimizeOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"scramble\") {\n options.scrambleAmount = optionlist[i + 1];\n } else if (optionlist[i] === \"fix\") {\n options.fixedPieceType = optionlist[i + 1];\n } else if (optionlist[i] === \"orientcenters\") {\n options.orientCenters = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"puzzleorientation\") {\n options.puzzleOrientation = asstructured(optionlist[i + 1]);\n } else if (optionlist[i] === \"puzzleorientations\") {\n options.puzzleOrientations = asstructured(optionlist[i + 1]);\n } else {\n throw new Error(\n `Bad option while processing option list ${optionlist[i]}`,\n );\n }\n }\n }\n return options;\n}\n\nlet dosvg = false;\nlet doss = false;\nlet doksolve = false;\nlet dogap = false;\nlet domathematica = false;\nlet docanon = false;\nlet do3d = false;\nif (globalThis.process && process.argv && process.argv.length <= 2) {\n console.log(\n `Usage: puzzle-geometry [options] [puzzle]\n\nOptions:\n--ksolve: write ksolve (tws) file\n--svg: write SVG (default is flat; --3d makes it 3D)\n--gap: write gap\n--mathematica: write mathematica\n--ss: execute Schrier-Sims calculation\n--3d: use 3D format for SVG file\n--canon: write canonical string analysis\n--rotations: include full-puzzle rotations as moves\n--allmoves: includes all moves (i.e., slice moves for 3x3x3)\n--outerblockmoves: use outer block moves rather than slice moves\n--vertexmoves: for tetrahedral puzzles, prefer vertex moves to face moves\n--nocorners: ignore all corners\n--noedges: ignore all edges\n--nocenters: ignore all centers\n--noorientation: ignore orientations\n--orientcenters: give centers an orientation\n--puzzleorientation: for 3D formats, give puzzle orientation\n--moves movenames: restrict moves to this list (e.g, U2,F,r)\n--optimize: optimize tws/ksolve/gap output\n--scramble: scramble solved position\n--fixcorner: choose moves to keep one corner fixed\n--fixedge: choose moves to keep one edge fixed\n--fixcenter: choose moves to keep one center fixed\n--verbose (-v): make verbose\n\nThe puzzle can be given as a geometric description or by name.\nThe geometric description starts with c (cube), t (tetrahedron),\nd (dodecahedron), i (icosahedron), or o (octahedron), then a\nspace, then a series of cuts. Each cut begins with f (for a\ncut parallel to faces), v (for a cut perpendicular to a ray\nfrom the center through a corner), or e (for a cut perpendicular\nto a ray from the center through an edge) followed by a decimal\nnumber giving a distance, where 1 is the distance between the\ncenter of the puzzle and the center of a face.\n\nThe puzzle names recognized are 2x2x2 through 13x13x13, 20x20x20,\nmaster skewb, professor skewb, compy cube, helicopter, dino,\nlittle chop, pyramorphix, mastermorphix, pyraminx, Jing pyraminx,\nmaster paramorphix, megaminx, gigaminx, pentultimate, starminx,\nstarminx 2, pyraminx crystal, chopasaurus, big chop, skewb diamond,\nFTO, Christopher's jewel, octastar, Trajber's octahedron, radio chop,\nicosamate, Regular Astrominx, Regular Astrominx + Big Chop,\nRedicosahedron, Redicosahedron with centers,Icosaminx, and Eitan's star.\n\nExamples:\n puzzlegeometry --ss 2x2x2\n puzzlegeometry --ss --fixcorner 2x2x2\n puzzlegeometry --ss --moves U,F2,r 4x4x4\n puzzlegeometry --ksolve --optimize --moves U,F,R megaminx\n puzzlegeometry --gap --noedges megaminx\n`,\n );\n}\nif (globalThis.process && process.argv && process.argv.length >= 3) {\n let desc: PuzzleDescriptionString | undefined;\n const puzzleList = getPG3DNamedPuzzles();\n let argp = 2;\n const optionlist = [];\n let showargs = true;\n let pascalcomment = false;\n while (argp < process.argv.length && process.argv[argp][0] === \"-\") {\n const option = process.argv[argp++];\n if (option === \"--verbose\" || option === \"-v\") {\n optionlist.push(\"verbose\", true);\n } else if (option === \"--quiet\" || option === \"-q\") {\n optionlist.push(\"quiet\", true);\n showargs = false;\n } else if (option === \"--ksolve\") {\n doksolve = true;\n } else if (option === \"--svg\") {\n showargs = false;\n optionlist.push(\"quiet\", true);\n dosvg = true;\n } else if (option === \"--gap\") {\n dogap = true;\n } else if (option === \"--mathematica\") {\n domathematica = true;\n pascalcomment = true;\n } else if (option === \"--ss\") {\n doss = true;\n } else if (option === \"--3d\") {\n do3d = true;\n } else if (option === \"--canon\") {\n docanon = true;\n } else if (option === \"--rotations\") {\n optionlist.push(\"rotations\", true);\n } else if (option === \"--allmoves\") {\n optionlist.push(\"allmoves\", true);\n } else if (option === \"--outerblockmoves\") {\n optionlist.push(\"outerblockmoves\", true);\n } else if (option === \"--vertexmoves\") {\n optionlist.push(\"vertexmoves\", true);\n } else if (option === \"--nocorners\") {\n optionlist.push(\"cornersets\", false);\n } else if (option === \"--noedges\") {\n optionlist.push(\"edgesets\", false);\n } else if (option === \"--noorientation\") {\n optionlist.push(\"killorientation\", true);\n } else if (option === \"--nocenters\") {\n optionlist.push(\"centersets\", false);\n } else if (option === \"--omit\") {\n optionlist.push(\"omit\", process.argv[argp].split(\",\"));\n argp++;\n } else if (option === \"--moves\") {\n optionlist.push(\"movelist\", process.argv[argp].split(\",\"));\n argp++;\n } else if (option === \"--optimize\") {\n optionlist.push(\"optimize\", true);\n } else if (option === \"--scramble\") {\n optionlist.push(\"scramble\", 100);\n } else if (option === \"--fixcorner\") {\n optionlist.push(\"fix\", \"v\");\n } else if (option === \"--fixedge\") {\n optionlist.push(\"fix\", \"e\");\n } else if (option === \"--fixcenter\") {\n optionlist.push(\"fix\", \"f\");\n } else if (option === \"--orientcenters\") {\n optionlist.push(\"orientcenters\", true);\n } else if (option === \"--puzzleorientation\") {\n optionlist.push(\"puzzleorientation\", process.argv[argp]);\n argp++;\n } else {\n throw new Error(`Bad option: ${option}`);\n }\n }\n for (const [name, curDesc] of Object.entries(puzzleList)) {\n if (name === process.argv[argp]) {\n desc = curDesc;\n break;\n }\n }\n let puzzleDescription: PuzzleDescription;\n if (showargs) {\n if (pascalcomment) {\n console.log(`(* ${process.argv.join(\" \")} *)`);\n } else {\n console.log(`# ${process.argv.join(\" \")}`);\n }\n }\n if (desc !== undefined) {\n const parsed = parsePuzzleDescription(desc);\n if (parsed === null) {\n throw new Error(\"Could not parse puzzle description!\");\n }\n puzzleDescription = parsed;\n argp++;\n } else {\n const cuts: PuzzleCutDescription[] = [];\n const cutarg = argp++;\n while (argp + 1 < process.argv.length && process.argv[argp].length === 1) {\n // TODO: validate cut type\n cuts.push({\n cutType: process.argv[argp] as ExperimentalPuzzleCutType,\n distance: parseFloat(process.argv[argp + 1]),\n });\n argp += 2;\n }\n // TODO: validate shape\n puzzleDescription = {\n shape: process.argv[cutarg] as ExperimentalPuzzleBaseShape,\n cuts,\n };\n }\n const options = parsePGOptionList(optionlist);\n const pg = new PuzzleGeometry(puzzleDescription, options);\n pg.allstickers();\n pg.genperms();\n if (argp < process.argv.length) {\n throw new Error(\"Unprocessed content at end of command line\");\n }\n if (dogap) {\n console.log(pg.writegap());\n } else if (domathematica) {\n console.log(pg.writemathematica());\n } else if (doksolve) {\n console.log(pg.writeksolve()); // TODO: Update arguments\n } else if (dosvg) {\n console.log(pg.generatesvg(undefined, undefined, undefined, do3d));\n } else if (do3d) {\n console.log(JSON.stringify(pg.get3d()));\n } else if (doss) {\n pg.writeSchreierSims(console.log);\n } else if (docanon) {\n pg.show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AAK,IAAI,eAAe,mBAAmB,OAAO;AACxD,KAAG,YAAY;AACf,KAAG,SAAS;AACZ,MAAI,OAAO,QAAQ,KAAK,QAAQ;AAC9B,UAAM,IAAI,MAAM,4CAA4C;AAAA,EAC9D;AACA,MAAI,OAAO;AACT,YAAQ,IAAI,GAAG,SAAS,CAAC;AAAA,EAC3B,WAAW,eAAe;AACxB,YAAQ,IAAI,GAAG,iBAAiB,CAAC;AAAA,EACnC,WAAW,UAAU;AACnB,YAAQ,IAAI,GAAG,YAAY,CAAC;AAAA,EAC9B,WAAW,OAAO;AAChB,YAAQ,IAAI,GAAG,YAAY,QAAW,QAAW,QAAW,IAAI,CAAC;AAAA,EACnE,WAAW,MAAM;AACf,YAAQ,IAAI,KAAK,UAAU,GAAG,MAAM,CAAC,CAAC;AAAA,EACxC,WAAW,MAAM;AACf,OAAG,kBAAkB,QAAQ,GAAG;AAAA,EAClC,WAAW,SAAS;AAClB,OAAG,UAAU,CAAC,MAAM,QAAQ,IAAI,CAAC,CAAC;AAAA,EACpC;AACF;",
6
6
  "names": []
7
7
  }
@@ -27,6 +27,10 @@ var argv = await yargs(
27
27
  describe: "Output format.",
28
28
  choices: ["text", "link", "json-text"],
29
29
  alias: "f"
30
+ }).option("notation", {
31
+ describe: "Notation type.",
32
+ default: "auto",
33
+ choices: ["auto", "LGN"]
30
34
  }).option("text", {
31
35
  type: "boolean",
32
36
  describe: "Convenient shorthand for `--format text`.",
@@ -44,13 +48,16 @@ var { format } = argv;
44
48
  format ??= argv.text || !process.stdout.isTTY ? "text" : "auto";
45
49
  setSearchDebug({ logPerf: false, showWorkerInstantiationWarnings: false });
46
50
  function scrambleText(scramble) {
47
- return scramble.toString();
51
+ return scramble.toString({
52
+ // TODO: any
53
+ notation: argv.notation
54
+ });
48
55
  }
49
56
  function scrambleLink(scramble) {
50
57
  const url = new URL("https://alpha.twizzle.net/edit/");
51
58
  const puzzleID = eventInfo(eventID)?.puzzleID;
52
59
  puzzleID && url.searchParams.set("puzzle", puzzleID);
53
- url.searchParams.set("alg", scramble.toString());
60
+ url.searchParams.set("alg", scrambleText(scramble));
54
61
  return url.toString();
55
62
  }
56
63
  var JSONListPrinter = class {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/bin/scramble.ts"],
4
- "sourcesContent": ["// To run this file directly:\n// bun run src/bin/scramble.ts -- 333\n\nimport { eventInfo } from \"cubing/puzzles\";\nimport { randomScrambleForEvent } from \"cubing/scramble\";\nimport { setSearchDebug } from \"cubing/search\";\nimport type { Alg } from \"cubing/alg\";\n\n// TODO: completions for `bash`, `zsh`, and `fish`: https://github.com/loilo/completarr\n\nconst [yargs, hideBin] = await (async () => {\n try {\n const yargs = (await import(\"yargs\")).default;\n const { hideBin } = await import(\"yargs/helpers\");\n return [yargs, hideBin];\n } catch (e) {\n throw new Error(\n \"Could not import `yargs`, which is not automatically installed as a regular dependency of `cubing`. Please run `npm install yargs` (or the equivalent) separately.\",\n );\n }\n})();\n\n// @ts-ignore: Top-level await is okay because this is not part of the main library.\nconst argv = await yargs(\n // TODO: `hideBin` just shows `bun` in `bun`.\n hideBin(process.argv),\n)\n .option(\"amount\", {\n describe: \"Amount of scrambles.\",\n default: 1,\n type: \"number\",\n alias: \"n\",\n })\n .option(\"format\", {\n describe: \"Output format.\",\n choices: [\"text\", \"link\", \"json-text\"],\n alias: \"f\",\n })\n .option(\"text\", {\n type: \"boolean\",\n describe: \"Convenient shorthand for `--format text`.\",\n alias: \"t\",\n })\n .usage(\"$0 eventID\", \"Generate cubing scrambles.\", (yargs) =>\n yargs.positional(\"eventID\", {\n describe: \"WCA or unofficial event ID\",\n type: \"string\",\n }),\n )\n .version(false) // TODO: why doesn't `yargs` get the right version in `bun` or for the `dist` bin?\n .strictOptions().argv;\n\nconst eventID = argv.eventID as string;\nlet { format } = argv;\nformat ??= argv.text || !process.stdout.isTTY ? \"text\" : \"auto\";\n\nsetSearchDebug({ logPerf: false, showWorkerInstantiationWarnings: false });\n\nfunction scrambleText(scramble: Alg): string {\n return scramble.toString();\n}\n\nfunction scrambleLink(scramble: Alg): string {\n const url = new URL(\"https://alpha.twizzle.net/edit/\");\n const puzzleID = eventInfo(eventID)?.puzzleID;\n puzzleID && url.searchParams.set(\"puzzle\", puzzleID);\n url.searchParams.set(\"alg\", scramble.toString());\n return url.toString();\n}\n\nclass JSONListPrinter<T> {\n #finished = false;\n #firstValuePrintedAlready = false;\n constructor() {\n process.stdout.write(\"[\\n \");\n }\n\n push(value: T) {\n if (this.#firstValuePrintedAlready) {\n process.stdout.write(\",\\n \");\n }\n this.#firstValuePrintedAlready = true;\n process.stdout.write(JSON.stringify(value));\n }\n\n finish() {\n if (this.#finished) {\n throw new Error(\"Tried to finish JSON list printing multiple times.\");\n }\n this.#finished = true;\n console.log(\"\\n]\");\n }\n}\n\nif (format !== \"json-text\" && argv.amount === 1) {\n // @ts-ignore: Top-level await is okay because this is not part of the main library.\n const scramble = await randomScrambleForEvent(eventID);\n\n switch (format) {\n case \"text\": {\n console.log(scrambleText(scramble));\n break;\n }\n case \"link\": {\n console.log(scrambleLink(scramble));\n break;\n }\n case \"json-text\": {\n throw new Error(\n \"Encountered `json` format in code that is not expected to handle it.\",\n );\n }\n case \"auto\": {\n console.log(`${scrambleText(scramble)}\n\n\uD83D\uDD17 ${scrambleLink(scramble)}`);\n break;\n }\n default: {\n throw new Error(\"Unknown format!\");\n }\n }\n} else {\n const jsonListPrinter: JSONListPrinter<string> | undefined =\n format === \"json-text\" ? new JSONListPrinter() : undefined;\n for (let i = 0; i < argv.amount; i++) {\n // @ts-ignore: Top-level await is okay because this is not part of the main library.\n const scramble = await randomScrambleForEvent(eventID);\n switch (format) {\n case \"text\": {\n console.log(`// Scramble #${i + 1}`);\n console.log(`${scrambleText(scramble)}\\n`);\n break;\n }\n case \"link\": {\n console.log(`// Scramble #${i + 1}`);\n console.log(`${scrambleLink(scramble)}\\n`);\n break;\n }\n case \"json-text\": {\n jsonListPrinter?.push(scramble.toString());\n break;\n }\n case \"auto\": {\n console.log(`// Scramble #${i + 1}\n${scrambleText(scramble)}\n\n\uD83D\uDD17 ${scrambleLink(scramble)}\n`);\n break;\n }\n default: {\n throw new Error(\"Unknown format!\");\n }\n }\n }\n jsonListPrinter?.finish();\n}\n"],
5
- "mappings": ";;;AAGA,SAAS,iBAAiB;AAC1B,SAAS,8BAA8B;AACvC,SAAS,sBAAsB;AAK/B,IAAM,CAAC,OAAO,OAAO,IAAI,OAAO,YAAY;AAC1C,MAAI;AACF,UAAMA,UAAS,MAAM,OAAO,OAAO,GAAG;AACtC,UAAM,EAAE,SAAAC,SAAQ,IAAI,MAAM,OAAO,eAAe;AAChD,WAAO,CAACD,QAAOC,QAAO;AAAA,EACxB,SAAS,GAAG;AACV,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF,GAAG;AAGH,IAAM,OAAO,MAAM;AAAA;AAAA,EAEjB,QAAQ,QAAQ,IAAI;AACtB,EACG,OAAO,UAAU;AAAA,EAChB,UAAU;AAAA,EACV,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AACT,CAAC,EACA,OAAO,UAAU;AAAA,EAChB,UAAU;AAAA,EACV,SAAS,CAAC,QAAQ,QAAQ,WAAW;AAAA,EACrC,OAAO;AACT,CAAC,EACA,OAAO,QAAQ;AAAA,EACd,MAAM;AAAA,EACN,UAAU;AAAA,EACV,OAAO;AACT,CAAC,EACA;AAAA,EAAM;AAAA,EAAc;AAAA,EAA8B,CAACD,WAClDA,OAAM,WAAW,WAAW;AAAA,IAC1B,UAAU;AAAA,IACV,MAAM;AAAA,EACR,CAAC;AACH,EACC,QAAQ,KAAK,EACb,cAAc,EAAE;AAEnB,IAAM,UAAU,KAAK;AACrB,IAAI,EAAE,OAAO,IAAI;AACjB,WAAW,KAAK,QAAQ,CAAC,QAAQ,OAAO,QAAQ,SAAS;AAEzD,eAAe,EAAE,SAAS,OAAO,iCAAiC,MAAM,CAAC;AAEzE,SAAS,aA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ACnC;AAAA,EACF;AACF,OAAO;AACL,QAAM,kBACJ,WAAW,cAAc,IAAI,gBAAgB,IAAI;AACnD,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AAEpC,UAAM,WAAW,MAAM,uBAAuB,OAAO;AACrD,YAAQ,QAAQ;AAAA,MACd,KAAK,QAAQ;AACX,gBAAQ,IAAI,gBAAgB,IAAI,CAAC,EAAE;AACnC,gBAAQ,IAAI,GAAG,aAAa,QAAQ,CAAC;AAAA,CAAI;AACzC;AAAA,MACF;AAAA,MACA,KAAK,QAAQ;AACX,gBAAQ,IAAI,gBAAgB,IAAI,CAAC,EAAE;AACnC,gBAAQ,IAAI,GAAG,aAAa,QAAQ,CAAC;AAAA,CAAI;AACzC;AAAA,MACF;AAAA,MACA,KAAK,aAAa;AAChB,yBAAiB,KAAK,SAAS,SAAS,CAAC;AACzC;AAAA,MACF;AAAA,MACA,KAAK,QAAQ;AACX,gBAAQ,IAAI,gBAAgB,IAAI,CAAC;AAAA,EACvC,aAAa,QAAQ,CAAC;AAAA;AAAA,YAEnB,aAAa,QAAQ,CAAC;AAAA,CAC1B;AACO;AAAA,MACF;AAAA,MACA,SAAS;AACP,cAAM,IAAI,MAAM,iBAAiB;AAAA,MACnC;AAAA,IACF;AAAA,EACF;AACA,mBAAiB,OAAO;AAC1B;",
4
+ "sourcesContent": ["// To run this file directly:\n// bun run src/bin/scramble.ts -- 333\n\nimport type { Alg, ExperimentalSerializationOptions } from \"cubing/alg\";\nimport { eventInfo } from \"cubing/puzzles\";\nimport { randomScrambleForEvent } from \"cubing/scramble\";\nimport { setSearchDebug } from \"cubing/search\";\n\n// TODO: completions for `bash`, `zsh`, and `fish`: https://github.com/loilo/completarr\n\nconst [yargs, hideBin] = await (async () => {\n try {\n const yargs = (await import(\"yargs\")).default;\n const { hideBin } = await import(\"yargs/helpers\");\n return [yargs, hideBin];\n } catch (e) {\n throw new Error(\n \"Could not import `yargs`, which is not automatically installed as a regular dependency of `cubing`. Please run `npm install yargs` (or the equivalent) separately.\",\n );\n }\n})();\n\n// @ts-ignore: Top-level await is okay because this is not part of the main library.\nconst argv = await yargs(\n // TODO: `hideBin` just shows `bun` in `bun`.\n hideBin(process.argv),\n)\n .option(\"amount\", {\n describe: \"Amount of scrambles.\",\n default: 1,\n type: \"number\",\n alias: \"n\",\n })\n .option(\"format\", {\n describe: \"Output format.\",\n choices: [\"text\", \"link\", \"json-text\"],\n alias: \"f\",\n })\n .option(\"notation\", {\n describe: \"Notation type.\",\n default: \"auto\",\n choices: [\"auto\", \"LGN\"],\n })\n .option(\"text\", {\n type: \"boolean\",\n describe: \"Convenient shorthand for `--format text`.\",\n alias: \"t\",\n })\n .usage(\"$0 eventID\", \"Generate cubing scrambles.\", (yargs) =>\n yargs.positional(\"eventID\", {\n describe: \"WCA or unofficial event ID\",\n type: \"string\",\n }),\n )\n .version(false) // TODO: why doesn't `yargs` get the right version in `bun` or for the `dist` bin?\n .strictOptions().argv;\n\nconst eventID = argv.eventID as string;\nlet { format } = argv;\nformat ??= argv.text || !process.stdout.isTTY ? \"text\" : \"auto\";\n\nsetSearchDebug({ logPerf: false, showWorkerInstantiationWarnings: false });\n\nfunction scrambleText(scramble: Alg): string {\n return scramble.toString({\n // TODO: any\n notation: (argv as ExperimentalSerializationOptions).notation,\n });\n}\n\nfunction scrambleLink(scramble: Alg): string {\n const url = new URL(\"https://alpha.twizzle.net/edit/\");\n const puzzleID = eventInfo(eventID)?.puzzleID;\n puzzleID && url.searchParams.set(\"puzzle\", puzzleID);\n url.searchParams.set(\"alg\", scrambleText(scramble));\n return url.toString();\n}\n\nclass JSONListPrinter<T> {\n #finished = false;\n #firstValuePrintedAlready = false;\n constructor() {\n process.stdout.write(\"[\\n \");\n }\n\n push(value: T) {\n if (this.#firstValuePrintedAlready) {\n process.stdout.write(\",\\n \");\n }\n this.#firstValuePrintedAlready = true;\n process.stdout.write(JSON.stringify(value));\n }\n\n finish() {\n if (this.#finished) {\n throw new Error(\"Tried to finish JSON list printing multiple times.\");\n }\n this.#finished = true;\n console.log(\"\\n]\");\n }\n}\n\nif (format !== \"json-text\" && argv.amount === 1) {\n // @ts-ignore: Top-level await is okay because this is not part of the main library.\n const scramble = await randomScrambleForEvent(eventID);\n\n switch (format) {\n case \"text\": {\n console.log(scrambleText(scramble));\n break;\n }\n case \"link\": {\n console.log(scrambleLink(scramble));\n break;\n }\n case \"json-text\": {\n throw new Error(\n \"Encountered `json` format in code that is not expected to handle it.\",\n );\n }\n case \"auto\": {\n console.log(`${scrambleText(scramble)}\n\n\uD83D\uDD17 ${scrambleLink(scramble)}`);\n break;\n }\n default: {\n throw new Error(\"Unknown format!\");\n }\n }\n} else {\n const jsonListPrinter: JSONListPrinter<string> | undefined =\n format === \"json-text\" ? new JSONListPrinter() : undefined;\n for (let i = 0; i < argv.amount; i++) {\n // @ts-ignore: Top-level await is okay because this is not part of the main library.\n const scramble = await randomScrambleForEvent(eventID);\n switch (format) {\n case \"text\": {\n console.log(`// Scramble #${i + 1}`);\n console.log(`${scrambleText(scramble)}\\n`);\n break;\n }\n case \"link\": {\n console.log(`// Scramble #${i + 1}`);\n console.log(`${scrambleLink(scramble)}\\n`);\n break;\n }\n case \"json-text\": {\n jsonListPrinter?.push(scramble.toString());\n break;\n }\n case \"auto\": {\n console.log(`// Scramble #${i + 1}\n${scrambleText(scramble)}\n\n\uD83D\uDD17 ${scrambleLink(scramble)}\n`);\n break;\n }\n default: {\n throw new Error(\"Unknown format!\");\n }\n }\n }\n jsonListPrinter?.finish();\n}\n"],
5
+ "mappings": ";;;AAIA,SAAS,iBAAiB;AAC1B,SAAS,8BAA8B;AACvC,SAAS,sBAAsB;AAI/B,IAAM,CAAC,OAAO,OAAO,IAAI,OAAO,YAAY;AAC1C,MAAI;AACF,UAAMA,UAAS,MAAM,OAAO,OAAO,GAAG;AACtC,UAAM,EAAE,SAAAC,SAAQ,IAAI,MAAM,OAAO,eAAe;AAChD,WAAO,CAACD,QAAOC,QAAO;AAAA,EACxB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I;AACzC;AAAA,MACF;AAAA,MACA,KAAK,QAAQ;AACX,gBAAQ,IAAI,gBAAgB,IAAI,CAAC,EAAE;AACnC,gBAAQ,IAAI,GAAG,aAAa,QAAQ,CAAC;AAAA,CAAI;AACzC;AAAA,MACF;AAAA,MACA,KAAK,aAAa;AAChB,yBAAiB,KAAK,SAAS,SAAS,CAAC;AACzC;AAAA,MACF;AAAA,MACA,KAAK,QAAQ;AACX,gBAAQ,IAAI,gBAAgB,IAAI,CAAC;AAAA,EACvC,aAAa,QAAQ,CAAC;AAAA;AAAA,YAEnB,aAAa,QAAQ,CAAC;AAAA,CAC1B;AACO;AAAA,MACF;AAAA,MACA,SAAS;AACP,cAAM,IAAI,MAAM,iBAAiB;AAAA,MACnC;AAAA,IACF;AAAA,EACF;AACA,mBAAiB,OAAO;AAC1B;",
6
6
  "names": ["yargs", "hideBin"]
7
7
  }
@@ -1,4 +1,4 @@
1
- import { M as Move, A as Alg } from './PuzzleLoader-DUS1aLQG.js';
1
+ import { M as Move, A as Alg } from './PuzzleLoader-Cas0EZPp.js';
2
2
 
3
3
  type KPatternData = Record<string, KPatternOrbitData>;
4
4
  interface KPatternOrbitData {
@@ -1,10 +1,20 @@
1
1
  import { Texture, Object3D, Raycaster, PerspectiveCamera, Scene, WebGLRenderer } from 'three';
2
2
 
3
+ type ExperimentalNotationType$1 = "auto" | "LGN";
4
+ interface ExperimentalSerializationOptions$1 {
5
+ notation?: ExperimentalNotationType$1;
6
+ }
7
+
3
8
  declare enum IterationDirection$1 {
4
9
  Forwards = 1,
5
10
  Backwards = -1
6
11
  }
7
12
 
13
+ type ExperimentalNotationType = "auto" | "LGN";
14
+ interface ExperimentalSerializationOptions {
15
+ notation?: ExperimentalNotationType;
16
+ }
17
+
8
18
  declare abstract class Comparable$1 {
9
19
  is(c: any): boolean;
10
20
  as<T>(c: new (...args: any) => T): T | null;
@@ -16,7 +26,7 @@ interface Repeatable$1 extends Comparable$1 {
16
26
  declare abstract class AlgCommon$1<T extends Alg$1 | AlgNode$1> extends Comparable$1 implements Repeatable$1 {
17
27
  constructor();
18
28
  get log(): (message?: any) => void;
19
- abstract toString(): string;
29
+ abstract toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
20
30
  abstract invert(): T;
21
31
  abstract experimentalExpand(iterDir: IterationDirection$1): Generator<AlgLeaf$1>;
22
32
  }
@@ -39,7 +49,7 @@ declare class QuantumMove$1 extends Comparable$1 {
39
49
  /** @deprecated */
40
50
  get innerLayer(): number | null;
41
51
  experimentalExpand(): Generator<AlgLeaf$1>;
42
- toString(): string;
52
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
43
53
  }
44
54
  interface MoveModifications$1 {
45
55
  outerLayer?: number;
@@ -66,13 +76,13 @@ declare class Move$1 extends AlgCommon$1<Move$1> {
66
76
  get outerLayer(): number | undefined;
67
77
  /** @deprecated */
68
78
  get innerLayer(): number | undefined;
69
- toString(): string;
79
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
70
80
  }
71
81
 
72
82
  /** @category Alg Nodes */
73
83
  declare class Pause$1 extends AlgCommon$1<Pause$1> {
74
84
  experimentalNISSGrouping?: Grouping$1;
75
- toString(): string;
85
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
76
86
  isIdentical(other: Comparable$1): boolean;
77
87
  invert(): Pause$1;
78
88
  experimentalExpand(_iterDir?: IterationDirection$1, _depth?: number): Generator<AlgLeaf$1>;
@@ -91,7 +101,7 @@ declare class Grouping$1 extends AlgCommon$1<Grouping$1> {
91
101
  invert(): Grouping$1;
92
102
  experimentalExpand(iterDir?: IterationDirection$1, depth?: number): Generator<AlgLeaf$1>;
93
103
  static fromString(): Grouping$1;
94
- toString(): string;
104
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
95
105
  experimentalAsSquare1Tuple(): [moveU: Move$1, moveD: Move$1] | null;
96
106
  }
97
107
 
@@ -103,7 +113,7 @@ declare class LineComment$1 extends AlgCommon$1<LineComment$1> {
103
113
  isIdentical(other: Comparable$1): boolean;
104
114
  invert(): LineComment$1;
105
115
  experimentalExpand(_iterDir?: IterationDirection$1, _depth?: number): Generator<AlgLeaf$1>;
106
- toString(): string;
116
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
107
117
  }
108
118
 
109
119
  /** @category Alg Nodes */
@@ -115,7 +125,7 @@ declare class Commutator$1 extends AlgCommon$1<Commutator$1> {
115
125
  isIdentical(other: Comparable$1): boolean;
116
126
  invert(): Commutator$1;
117
127
  experimentalExpand(iterDir?: IterationDirection$1, depth?: number): Generator<AlgLeaf$1>;
118
- toString(): string;
128
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
119
129
  }
120
130
 
121
131
  /** @category Alg Nodes */
@@ -127,12 +137,12 @@ declare class Conjugate$1 extends AlgCommon$1<Conjugate$1> {
127
137
  isIdentical(other: Comparable$1): boolean;
128
138
  invert(): Conjugate$1;
129
139
  experimentalExpand(iterDir: IterationDirection$1, depth?: number): Generator<AlgLeaf$1>;
130
- toString(): string;
140
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
131
141
  }
132
142
 
133
143
  /** @category Alg Nodes */
134
144
  declare class Newline$1 extends AlgCommon$1<Newline$1> {
135
- toString(): string;
145
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
136
146
  isIdentical(other: Comparable$1): boolean;
137
147
  invert(): Newline$1;
138
148
  experimentalExpand(_iterDir?: IterationDirection$1, _depth?: number): Generator<AlgLeaf$1>;
@@ -285,7 +295,7 @@ declare class Alg$1 extends AlgCommon$1<Alg$1> {
285
295
  * // R U2 L
286
296
  * console.log(alg.toString())
287
297
  */
288
- toString(): string;
298
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
289
299
  /**
290
300
  * `experimentalSimplify` can perform several mostly-syntactic simplifications on an alg:
291
301
  *
@@ -357,7 +367,7 @@ interface Repeatable extends Comparable {
357
367
  declare abstract class AlgCommon<T extends Alg | AlgNode> extends Comparable implements Repeatable {
358
368
  constructor();
359
369
  get log(): (message?: any) => void;
360
- abstract toString(): string;
370
+ abstract toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
361
371
  abstract invert(): T;
362
372
  abstract experimentalExpand(iterDir: IterationDirection): Generator<AlgLeaf>;
363
373
  }
@@ -380,7 +390,7 @@ declare class QuantumMove extends Comparable {
380
390
  /** @deprecated */
381
391
  get innerLayer(): number | null;
382
392
  experimentalExpand(): Generator<AlgLeaf>;
383
- toString(): string;
393
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
384
394
  }
385
395
  interface MoveModifications {
386
396
  outerLayer?: number;
@@ -407,13 +417,13 @@ declare class Move extends AlgCommon<Move> {
407
417
  get outerLayer(): number | undefined;
408
418
  /** @deprecated */
409
419
  get innerLayer(): number | undefined;
410
- toString(): string;
420
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
411
421
  }
412
422
 
413
423
  /** @category Alg Nodes */
414
424
  declare class Pause extends AlgCommon<Pause> {
415
425
  experimentalNISSGrouping?: Grouping;
416
- toString(): string;
426
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
417
427
  isIdentical(other: Comparable): boolean;
418
428
  invert(): Pause;
419
429
  experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
@@ -432,7 +442,7 @@ declare class Grouping extends AlgCommon<Grouping> {
432
442
  invert(): Grouping;
433
443
  experimentalExpand(iterDir?: IterationDirection, depth?: number): Generator<AlgLeaf>;
434
444
  static fromString(): Grouping;
435
- toString(): string;
445
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
436
446
  experimentalAsSquare1Tuple(): [moveU: Move, moveD: Move] | null;
437
447
  }
438
448
 
@@ -444,7 +454,7 @@ declare class LineComment extends AlgCommon<LineComment> {
444
454
  isIdentical(other: Comparable): boolean;
445
455
  invert(): LineComment;
446
456
  experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
447
- toString(): string;
457
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
448
458
  }
449
459
 
450
460
  /** @category Alg Nodes */
@@ -456,7 +466,7 @@ declare class Commutator extends AlgCommon<Commutator> {
456
466
  isIdentical(other: Comparable): boolean;
457
467
  invert(): Commutator;
458
468
  experimentalExpand(iterDir?: IterationDirection, depth?: number): Generator<AlgLeaf>;
459
- toString(): string;
469
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
460
470
  }
461
471
 
462
472
  /** @category Alg Nodes */
@@ -468,12 +478,12 @@ declare class Conjugate extends AlgCommon<Conjugate> {
468
478
  isIdentical(other: Comparable): boolean;
469
479
  invert(): Conjugate;
470
480
  experimentalExpand(iterDir: IterationDirection, depth?: number): Generator<AlgLeaf>;
471
- toString(): string;
481
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
472
482
  }
473
483
 
474
484
  /** @category Alg Nodes */
475
485
  declare class Newline extends AlgCommon<Newline> {
476
- toString(): string;
486
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
477
487
  isIdentical(other: Comparable): boolean;
478
488
  invert(): Newline;
479
489
  experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
@@ -626,7 +636,7 @@ declare class Alg extends AlgCommon<Alg> {
626
636
  * // R U2 L
627
637
  * console.log(alg.toString())
628
638
  */
629
- toString(): string;
639
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
630
640
  /**
631
641
  * `experimentalSimplify` can perform several mostly-syntactic simplifications on an alg:
632
642
  *
@@ -2585,4 +2595,4 @@ interface PuzzleLoader {
2585
2595
  keyMapping?: () => Promise<KeyMapping>;
2586
2596
  }
2587
2597
 
2588
- export { Alg$1 as A, Commutator$1 as C, Grouping$1 as G, IterationDirection$1 as I, type KeyMapping as K, LineComment$1 as L, Move$1 as M, Newline$1 as N, type PuzzleSpecificSimplifyOptions$1 as P, QuantumMove$1 as Q, type SimplifyOptions$1 as S, type AlgNode$1 as a, type AlgLeaf$1 as b, type AppendOptions$1 as c, Conjugate$1 as d, Pause$1 as e, type MoveModifications$1 as f, type AlgBranch$1 as g, type AppendCancelOptions$1 as h };
2598
+ export { Alg$1 as A, Commutator$1 as C, type ExperimentalNotationType as E, Grouping$1 as G, IterationDirection$1 as I, type KeyMapping as K, LineComment$1 as L, Move$1 as M, Newline$1 as N, type PuzzleSpecificSimplifyOptions$1 as P, QuantumMove$1 as Q, type SimplifyOptions$1 as S, type AlgNode$1 as a, type AlgLeaf$1 as b, type AppendOptions$1 as c, Conjugate$1 as d, Pause$1 as e, type MoveModifications$1 as f, type AlgBranch$1 as g, type AppendCancelOptions$1 as h, type ExperimentalSerializationOptions as i };
@@ -1,7 +1,7 @@
1
1
  import { Texture, Object3D, Raycaster, PerspectiveCamera, Scene, WebGLRenderer } from 'three';
2
- import { P as PuzzleSpecificSimplifyOptions, b as AlgLeaf, M as Move, A as Alg, e as Pause, h as AppendCancelOptions, c as AppendOptions, a as AlgNode, I as IterationDirection } from './PuzzleLoader-DUS1aLQG.js';
3
- import { P as Parsed } from './parseAlg.d-DhFLCVac.js';
4
- import { s as KPuzzle, d as PuzzleGeometry, K as KPattern, t as KTransformation, u as PuzzleDescriptionString } from './KPattern.d-N-dYG3S_.js';
2
+ import { P as PuzzleSpecificSimplifyOptions, b as AlgLeaf, M as Move, A as Alg, e as Pause, h as AppendCancelOptions, c as AppendOptions, a as AlgNode, I as IterationDirection } from './PuzzleLoader-Cas0EZPp.js';
3
+ import { P as Parsed } from './parseAlg.d-BaJ_OjeN.js';
4
+ import { s as KPuzzle, d as PuzzleGeometry, K as KPattern, t as KTransformation, u as PuzzleDescriptionString } from './KPattern.d-xuPJs0ug.js';
5
5
 
6
6
  type FaceletMeshStickeringMask = "regular" | "dim" | "oriented" | "experimentalOriented2" | "ignored" | "invisible";
7
7
  type FaceletStickeringMask = {
@@ -1,6 +1,6 @@
1
- import { a as AlgNode, A as Alg, M as Move, c as AppendOptions, G as Grouping, C as Commutator, d as Conjugate, e as Pause, N as Newline, L as LineComment, K as KeyMapping, b as AlgLeaf } from '../PuzzleLoader-DUS1aLQG.js';
2
- export { g as AlgBranch, h as AppendCancelOptions, f as MoveModifications, P as PuzzleSpecificSimplifyOptions, Q as QuantumMove, S as SimplifyOptions } from '../PuzzleLoader-DUS1aLQG.js';
3
- export { P as ExperimentalParsed } from '../parseAlg.d-DhFLCVac.js';
1
+ import { a as AlgNode, A as Alg, M as Move, c as AppendOptions, K as KeyMapping, b as AlgLeaf, G as Grouping, C as Commutator, d as Conjugate, e as Pause, N as Newline, L as LineComment } from '../PuzzleLoader-Cas0EZPp.js';
2
+ export { g as AlgBranch, h as AppendCancelOptions, E as ExperimentalNotationType, i as ExperimentalSerializationOptions, f as MoveModifications, P as PuzzleSpecificSimplifyOptions, Q as QuantumMove, S as SimplifyOptions } from '../PuzzleLoader-Cas0EZPp.js';
3
+ export { P as ExperimentalParsed } from '../parseAlg.d-BaJ_OjeN.js';
4
4
  import 'three';
5
5
 
6
6
  /** @deprecated */
@@ -19,6 +19,22 @@ declare class AlgBuilder {
19
19
  reset(): void;
20
20
  }
21
21
 
22
+ declare const Example: {
23
+ Sune: Alg;
24
+ AntiSune: Alg;
25
+ SuneCommutator: Alg;
26
+ Niklas: Alg;
27
+ EPerm: Alg;
28
+ FURURFCompact: Alg;
29
+ APermCompact: Alg;
30
+ FURURFMoves: Alg;
31
+ TPerm: Alg;
32
+ HeadlightSwaps: Alg;
33
+ TriplePause: Alg;
34
+ };
35
+
36
+ declare function keyToMove(keyMapping: KeyMapping | undefined, e: KeyboardEvent): AlgLeaf | null;
37
+
22
38
  declare abstract class TraversalDownUp<DataDown, DataAlgUp, DataAlgNodeUp = DataAlgUp> {
23
39
  traverseAlgNode(algNode: AlgNode, dataDown: DataDown): DataAlgNodeUp;
24
40
  traverseIntoAlgNode(algNode: AlgNode, dataDown: DataDown): AlgNode;
@@ -47,22 +63,6 @@ declare function functionFromTraversal<DataDown, DataAlgUp, ConstructorArgs exte
47
63
  new (...args: ConstructorArgs): TraversalDownUp<DataDown, DataAlgUp, any>;
48
64
  }, constructorArgs?: ConstructorArgs): undefined extends DataDown ? (alg: Alg) => DataAlgUp : (alg: Alg, v: DataDown) => DataAlgUp;
49
65
 
50
- declare const Example: {
51
- Sune: Alg;
52
- AntiSune: Alg;
53
- SuneCommutator: Alg;
54
- Niklas: Alg;
55
- EPerm: Alg;
56
- FURURFCompact: Alg;
57
- APermCompact: Alg;
58
- FURURFMoves: Alg;
59
- TPerm: Alg;
60
- HeadlightSwaps: Alg;
61
- TriplePause: Alg;
62
- };
63
-
64
- declare function keyToMove(keyMapping: KeyMapping | undefined, e: KeyboardEvent): AlgLeaf | null;
65
-
66
66
  interface AlgCubingNetOptions {
67
67
  alg?: Alg;
68
68
  setup?: Alg;
@@ -18,7 +18,7 @@ import {
18
18
  functionFromTraversal,
19
19
  keyToMove,
20
20
  setAlgDebug
21
- } from "../chunks/chunk-BKDL54KM.js";
21
+ } from "../chunks/chunk-4QUGAADL.js";
22
22
  export {
23
23
  Alg,
24
24
  AlgBuilder,
@@ -1,10 +1,10 @@
1
- import { K as KPattern } from '../KPattern.d-N-dYG3S_.js';
2
- import { a as PuzzleID, P as PuzzleLoader } from '../TwizzleLink.d-Cf4H-1Jc.js';
3
- import { A as Alg, M as Move } from '../PuzzleLoader-DUS1aLQG.js';
4
- import { B as BluetoothPuzzle } from '../bluetooth-puzzle.d-ClBIGffk.js';
5
- export { A as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle.d-ClBIGffk.js';
1
+ import { K as KPattern } from '../KPattern.d-xuPJs0ug.js';
2
+ import { a as PuzzleID, P as PuzzleLoader } from '../TwizzleLink.d-WfSkIfwD.js';
3
+ import { A as Alg, M as Move } from '../PuzzleLoader-Cas0EZPp.js';
4
+ import { B as BluetoothPuzzle } from '../bluetooth-puzzle.d-C0XAV6ic.js';
5
+ export { A as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle.d-C0XAV6ic.js';
6
6
  import 'three';
7
- import '../parseAlg.d-DhFLCVac.js';
7
+ import '../parseAlg.d-BaJ_OjeN.js';
8
8
 
9
9
  declare function enableDebugLogging(enable: boolean): void;
10
10
 
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  binaryComponentsToReid3x3x3,
3
3
  twizzleBinaryToBinaryComponents
4
- } from "../chunks/chunk-DSMNO2NL.js";
4
+ } from "../chunks/chunk-L67IYVUG.js";
5
5
  import {
6
6
  cube3x3x3,
7
7
  puzzles
8
- } from "../chunks/chunk-SJG4RSQ7.js";
8
+ } from "../chunks/chunk-XDSD4WY3.js";
9
9
  import {
10
10
  experimental3x3x3KPuzzle
11
- } from "../chunks/chunk-2P6TNNY3.js";
11
+ } from "../chunks/chunk-MCJFY474.js";
12
12
  import {
13
13
  KPattern
14
- } from "../chunks/chunk-ZJQ7HF54.js";
14
+ } from "../chunks/chunk-CIXBGOOX.js";
15
15
  import {
16
16
  Alg,
17
17
  Move,
18
18
  experimentalAppendMove,
19
19
  keyToMove
20
- } from "../chunks/chunk-BKDL54KM.js";
20
+ } from "../chunks/chunk-4QUGAADL.js";
21
21
 
22
22
  // src/cubing/bluetooth/debug.ts
23
23
  var DEBUG_LOGGING_ENABLED = false;
@@ -1,5 +1,5 @@
1
- import { b as AlgLeaf } from './PuzzleLoader-DUS1aLQG.js';
2
- import { K as KPattern } from './KPattern.d-N-dYG3S_.js';
1
+ import { b as AlgLeaf } from './PuzzleLoader-Cas0EZPp.js';
2
+ import { K as KPattern } from './KPattern.d-xuPJs0ug.js';
3
3
 
4
4
  interface StreamTransformer {
5
5
  transformAlgLeaf(algLeafEvent: AlgLeafEvent): void;