cubing 0.28.1 → 0.29.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.
Files changed (101) hide show
  1. package/README.md +2 -0
  2. package/dist/esm/alg/index.js +2 -2
  3. package/dist/esm/bluetooth/index.js +222 -86
  4. package/dist/esm/bluetooth/index.js.map +3 -3
  5. package/dist/esm/{chunk-F4WWCPVE.js → chunk-2IZUSAXQ.js} +2 -2
  6. package/dist/esm/{chunk-F4WWCPVE.js.map → chunk-2IZUSAXQ.js.map} +1 -1
  7. package/dist/esm/{chunk-YSVFZVG4.js → chunk-DZGFGBKT.js} +183 -76
  8. package/dist/esm/chunk-DZGFGBKT.js.map +7 -0
  9. package/dist/esm/{chunk-7D7LW3WQ.js → chunk-GW4FGG42.js} +8 -4
  10. package/dist/esm/{chunk-7D7LW3WQ.js.map → chunk-GW4FGG42.js.map} +1 -1
  11. package/dist/esm/{chunk-32FWPPTW.js → chunk-LSCTPPWV.js} +22 -8
  12. package/dist/esm/{chunk-32FWPPTW.js.map → chunk-LSCTPPWV.js.map} +1 -1
  13. package/dist/esm/{chunk-LSVR2HCG.js → chunk-LV7IKG36.js} +389 -363
  14. package/dist/esm/{chunk-LSVR2HCG.js.map → chunk-LV7IKG36.js.map} +1 -1
  15. package/dist/esm/{chunk-CSBUJ64Q.js → chunk-NI7U4XAZ.js} +373 -238
  16. package/dist/esm/chunk-NI7U4XAZ.js.map +7 -0
  17. package/dist/esm/{chunk-GVPTO3OF.js → chunk-OX6O2ZO5.js} +1 -1
  18. package/dist/esm/{chunk-GVPTO3OF.js.map → chunk-OX6O2ZO5.js.map} +1 -1
  19. package/dist/esm/{chunk-67VJZGH2.js → chunk-PYWGREIP.js} +44 -13
  20. package/dist/esm/chunk-PYWGREIP.js.map +7 -0
  21. package/dist/esm/{chunk-WAL36PO3.js → chunk-Q4W5ZR4U.js} +28 -12
  22. package/dist/esm/{chunk-WAL36PO3.js.map → chunk-Q4W5ZR4U.js.map} +1 -1
  23. package/dist/esm/{chunk-MGJA5U5O.js → chunk-SBZRVSPK.js} +1 -12
  24. package/dist/esm/{chunk-MGJA5U5O.js.map → chunk-SBZRVSPK.js.map} +0 -0
  25. package/dist/esm/{chunk-MWKALF6W.js → chunk-TGPS3CXW.js} +22 -13
  26. package/dist/esm/chunk-TGPS3CXW.js.map +7 -0
  27. package/dist/esm/{chunk-V55YSWJY.js → chunk-WXCNEGW3.js} +10 -4
  28. package/dist/esm/{chunk-V55YSWJY.js.map → chunk-WXCNEGW3.js.map} +1 -1
  29. package/dist/esm/{chunk-ZY3RTFFS.js → chunk-XU5ILFX5.js} +137 -66
  30. package/dist/esm/{chunk-ZY3RTFFS.js.map → chunk-XU5ILFX5.js.map} +3 -3
  31. package/dist/esm/{chunk-ALBEW4DJ.js → chunk-ZB3P5AZN.js} +1 -1
  32. package/dist/esm/{chunk-ALBEW4DJ.js.map → chunk-ZB3P5AZN.js.map} +1 -1
  33. package/dist/esm/{chunk-NPHUBFZ6.js → chunk-ZNAYJGVL.js} +2 -2
  34. package/dist/esm/{chunk-NPHUBFZ6.js.map → chunk-ZNAYJGVL.js.map} +1 -1
  35. package/dist/esm/kpuzzle/index.js +3 -3
  36. package/dist/esm/notation/index.js +3 -3
  37. package/dist/esm/protocol/index.js +5 -5
  38. package/dist/esm/puzzle-geometry/index.js +271 -71
  39. package/dist/esm/puzzle-geometry/index.js.map +2 -2
  40. package/dist/esm/puzzles/index.js +5 -5
  41. package/dist/esm/{puzzles-dynamic-3x3x3-NB2PEZTV.js → puzzles-dynamic-3x3x3-KIG5A6QR.js} +2 -2
  42. package/dist/esm/{puzzles-dynamic-3x3x3-NB2PEZTV.js.map → puzzles-dynamic-3x3x3-KIG5A6QR.js.map} +0 -0
  43. package/dist/esm/puzzles-dynamic-4x4x4-PEDAPUZK.js +126 -0
  44. package/dist/esm/puzzles-dynamic-4x4x4-PEDAPUZK.js.map +7 -0
  45. package/dist/esm/{puzzles-dynamic-side-events-WZI4Y3N6.js → puzzles-dynamic-side-events-5C7LMBWX.js} +2 -2
  46. package/dist/esm/{puzzles-dynamic-side-events-WZI4Y3N6.js.map → puzzles-dynamic-side-events-5C7LMBWX.js.map} +0 -0
  47. package/dist/esm/{puzzles-dynamic-unofficial-FUG3JBMH.js → puzzles-dynamic-unofficial-WWJ4NJMX.js} +2 -2
  48. package/dist/esm/{puzzles-dynamic-unofficial-FUG3JBMH.js.map → puzzles-dynamic-unofficial-WWJ4NJMX.js.map} +0 -0
  49. package/dist/esm/scramble/index.js +5 -5
  50. package/dist/esm/search/index.js +10 -10
  51. package/dist/esm/{search-dynamic-sgs-side-events-R3HDJ5XQ.js → search-dynamic-sgs-side-events-AYX7MZO7.js} +35 -17
  52. package/dist/esm/{search-dynamic-sgs-side-events-R3HDJ5XQ.js.map → search-dynamic-sgs-side-events-AYX7MZO7.js.map} +2 -2
  53. package/dist/esm/{search-dynamic-sgs-unofficial-FQNKGHVO.js → search-dynamic-sgs-unofficial-DLJOJFJL.js} +35 -14
  54. package/dist/esm/{search-dynamic-sgs-unofficial-FQNKGHVO.js.map → search-dynamic-sgs-unofficial-DLJOJFJL.js.map} +2 -2
  55. package/dist/esm/{search-dynamic-solve-3x3x3-K42IWMQV.js → search-dynamic-solve-3x3x3-7XZTYQMO.js} +795 -142
  56. package/dist/esm/{search-dynamic-solve-3x3x3-K42IWMQV.js.map → search-dynamic-solve-3x3x3-7XZTYQMO.js.map} +1 -1
  57. package/dist/esm/{search-dynamic-solve-4x4x4-XRV4NBMQ.js → search-dynamic-solve-4x4x4-CWWTFKMR.js} +135 -29
  58. package/dist/esm/{search-dynamic-solve-4x4x4-XRV4NBMQ.js.map → search-dynamic-solve-4x4x4-CWWTFKMR.js.map} +1 -1
  59. package/dist/esm/{search-dynamic-solve-fto-O6UXF7EC.js → search-dynamic-solve-fto-4LI23P6K.js} +253 -69
  60. package/dist/esm/{search-dynamic-solve-fto-O6UXF7EC.js.map → search-dynamic-solve-fto-4LI23P6K.js.map} +2 -2
  61. package/dist/esm/{search-dynamic-solve-kilominx-G4MLGWNS.js → search-dynamic-solve-kilominx-3HEVQ4MC.js} +32 -8
  62. package/dist/esm/{search-dynamic-solve-kilominx-G4MLGWNS.js.map → search-dynamic-solve-kilominx-3HEVQ4MC.js.map} +2 -2
  63. package/dist/esm/{search-dynamic-solve-master_tetraminx-3RKD3IAN.js → search-dynamic-solve-master_tetraminx-UB32C7MM.js} +111 -42
  64. package/dist/esm/{search-dynamic-solve-master_tetraminx-3RKD3IAN.js.map → search-dynamic-solve-master_tetraminx-UB32C7MM.js.map} +2 -2
  65. package/dist/esm/{search-dynamic-solve-sq1-WIJEGVLP.js → search-dynamic-solve-sq1-HA72TYF2.js} +54 -9
  66. package/dist/esm/{search-dynamic-solve-sq1-WIJEGVLP.js.map → search-dynamic-solve-sq1-HA72TYF2.js.map} +2 -2
  67. package/dist/esm/{search-worker-inside-generated-string-IZCKWXUA.js → search-worker-inside-generated-string-AMEXYCKK.js} +146 -28
  68. package/dist/esm/search-worker-inside-generated-string-AMEXYCKK.js.map +7 -0
  69. package/dist/esm/{search-worker-js-entry-WBEKNBB7.js → search-worker-js-entry-TP2T3NUL.js} +147 -53
  70. package/dist/esm/{search-worker-js-entry-WBEKNBB7.js.map → search-worker-js-entry-TP2T3NUL.js.map} +2 -2
  71. package/dist/esm/{search-worker-ts-entry-XQWMEOC4.js → search-worker-ts-entry-NEH77S4I.js} +5 -5
  72. package/dist/esm/{search-worker-ts-entry-XQWMEOC4.js.map → search-worker-ts-entry-NEH77S4I.js.map} +1 -1
  73. package/dist/esm/stream/index.js +12 -8
  74. package/dist/esm/stream/index.js.map +1 -1
  75. package/dist/esm/twisty/index.js +1154 -762
  76. package/dist/esm/twisty/index.js.map +3 -3
  77. package/dist/esm/{twisty-dynamic-3d-QOX7IEXC.js → twisty-dynamic-3d-D3ZDBJUH.js} +352 -175
  78. package/dist/esm/{twisty-dynamic-3d-QOX7IEXC.js.map → twisty-dynamic-3d-D3ZDBJUH.js.map} +2 -2
  79. package/dist/types/{Alg-e2a80975.d.ts → Alg-137fb0d5.d.ts} +19 -16
  80. package/dist/types/{KState-a2f0e651.d.ts → KState-a73111d7.d.ts} +1 -9
  81. package/dist/types/{TwizzleLink-dcf51446.d.ts → TwizzleLink-bef52ecd.d.ts} +46 -10
  82. package/dist/types/alg/index.d.ts +4 -4
  83. package/dist/types/bluetooth/index.d.ts +4 -4
  84. package/dist/types/{bluetooth-puzzle-3670a6a1.d.ts → bluetooth-puzzle-8a678993.d.ts} +9 -9
  85. package/dist/types/kpuzzle/index.d.ts +2 -2
  86. package/dist/types/notation/index.d.ts +1 -1
  87. package/dist/types/{outside-0ce1b145.d.ts → outside-e55f28a0.d.ts} +2 -2
  88. package/dist/types/{parseAlg-db0dec6c.d.ts → parseAlg-a28f7568.d.ts} +1 -1
  89. package/dist/types/protocol/index.d.ts +2 -2
  90. package/dist/types/puzzle-geometry/index.d.ts +3 -3
  91. package/dist/types/puzzles/index.d.ts +5 -5
  92. package/dist/types/scramble/index.d.ts +3 -3
  93. package/dist/types/search/index.d.ts +3 -3
  94. package/dist/types/stream/index.d.ts +5 -5
  95. package/dist/types/twisty/index.d.ts +5 -5
  96. package/package.json +47 -41
  97. package/dist/esm/chunk-67VJZGH2.js.map +0 -7
  98. package/dist/esm/chunk-CSBUJ64Q.js.map +0 -7
  99. package/dist/esm/chunk-MWKALF6W.js.map +0 -7
  100. package/dist/esm/chunk-YSVFZVG4.js.map +0 -7
  101. package/dist/esm/search-worker-inside-generated-string-IZCKWXUA.js.map +0 -7
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Move,
3
3
  QuantumMove
4
- } from "../chunk-CSBUJ64Q.js";
5
- import "../chunk-MGJA5U5O.js";
4
+ } from "../chunk-NI7U4XAZ.js";
5
+ import "../chunk-SBZRVSPK.js";
6
6
 
7
7
  // src/cubing/puzzle-geometry/FaceNameSwizzler.ts
8
8
  var FaceNameSwizzler = class {
@@ -92,7 +92,10 @@ var FaceNameSwizzler = class {
92
92
  }
93
93
  spinmatchv(userinput, longname) {
94
94
  if (userinput.endsWith("v") && longname.endsWith("v")) {
95
- return this.spinmatch(userinput.slice(0, userinput.length - 1), longname.slice(0, longname.length - 1));
95
+ return this.spinmatch(
96
+ userinput.slice(0, userinput.length - 1),
97
+ longname.slice(0, longname.length - 1)
98
+ );
96
99
  } else {
97
100
  return this.spinmatch(userinput, longname);
98
101
  }
@@ -130,7 +133,10 @@ var FTONotationMapper = class {
130
133
  }
131
134
  notationToInternal(move) {
132
135
  if (move.family === "T" && move.innerLayer === void 0 && move.outerLayer === void 0) {
133
- return new Move(new QuantumMove("FLRv", move.innerLayer, move.outerLayer), move.amount);
136
+ return new Move(
137
+ new QuantumMove("FLRv", move.innerLayer, move.outerLayer),
138
+ move.amount
139
+ );
134
140
  } else {
135
141
  const r = this.child.notationToInternal(move);
136
142
  return r;
@@ -142,7 +148,10 @@ var FTONotationMapper = class {
142
148
  fam = fam.substring(0, fam.length - 1);
143
149
  }
144
150
  if (this.sw.spinmatch(fam, "FLUR")) {
145
- return new Move(new QuantumMove("T", move.innerLayer, move.outerLayer), move.amount);
151
+ return new Move(
152
+ new QuantumMove("T", move.innerLayer, move.outerLayer),
153
+ move.amount
154
+ );
146
155
  }
147
156
  return this.child.notationToExternal(move);
148
157
  }
@@ -178,7 +187,10 @@ var FaceRenamingMapper = class {
178
187
  if (grip === ngrip) {
179
188
  return move;
180
189
  } else {
181
- return new Move(new QuantumMove(ngrip, move.innerLayer, move.outerLayer), move.amount);
190
+ return new Move(
191
+ new QuantumMove(ngrip, move.innerLayer, move.outerLayer),
192
+ move.amount
193
+ );
182
194
  }
183
195
  }
184
196
  notationToInternal(move) {
@@ -224,13 +236,22 @@ var MegaminxScramblingNotationMapper = class {
224
236
  }
225
237
  notationToExternal(move) {
226
238
  if (move.family === "ERv" && Math.abs(move.amount) === 1) {
227
- return new Move(new QuantumMove("x", move.innerLayer, move.outerLayer), move.amount * 2);
239
+ return new Move(
240
+ new QuantumMove("x", move.innerLayer, move.outerLayer),
241
+ move.amount * 2
242
+ );
228
243
  }
229
244
  if (move.family === "ILv" && Math.abs(move.amount) === 1) {
230
- return new Move(new QuantumMove("x", move.innerLayer, move.outerLayer), -move.amount * 2);
245
+ return new Move(
246
+ new QuantumMove("x", move.innerLayer, move.outerLayer),
247
+ -move.amount * 2
248
+ );
231
249
  }
232
250
  if (move.family === "Uv") {
233
- return new Move(new QuantumMove("y", move.innerLayer, move.outerLayer), move.amount);
251
+ return new Move(
252
+ new QuantumMove("y", move.innerLayer, move.outerLayer),
253
+ move.amount
254
+ );
234
255
  }
235
256
  if (move.family === "Dv") {
236
257
  return new Move("y", -move.amount);
@@ -256,20 +277,38 @@ var NxNxNCubeMapper = class {
256
277
  }
257
278
  if ((this.slices & 1) === 1) {
258
279
  if (grip === "E") {
259
- move = new Move(new QuantumMove("D", (this.slices + 1) / 2), move.amount);
280
+ move = new Move(
281
+ new QuantumMove("D", (this.slices + 1) / 2),
282
+ move.amount
283
+ );
260
284
  } else if (grip === "M") {
261
- move = new Move(new QuantumMove("L", (this.slices + 1) / 2), move.amount);
285
+ move = new Move(
286
+ new QuantumMove("L", (this.slices + 1) / 2),
287
+ move.amount
288
+ );
262
289
  } else if (grip === "S") {
263
- move = new Move(new QuantumMove("F", (this.slices + 1) / 2), move.amount);
290
+ move = new Move(
291
+ new QuantumMove("F", (this.slices + 1) / 2),
292
+ move.amount
293
+ );
264
294
  }
265
295
  }
266
296
  if (this.slices > 2) {
267
297
  if (grip === "e") {
268
- move = new Move(new QuantumMove("D", this.slices - 1, 2), move.amount);
298
+ move = new Move(
299
+ new QuantumMove("D", this.slices - 1, 2),
300
+ move.amount
301
+ );
269
302
  } else if (grip === "m") {
270
- move = new Move(new QuantumMove("L", this.slices - 1, 2), move.amount);
303
+ move = new Move(
304
+ new QuantumMove("L", this.slices - 1, 2),
305
+ move.amount
306
+ );
271
307
  } else if (grip === "s") {
272
- move = new Move(new QuantumMove("F", this.slices - 1, 2), move.amount);
308
+ move = new Move(
309
+ new QuantumMove("F", this.slices - 1, 2),
310
+ move.amount
311
+ );
273
312
  }
274
313
  }
275
314
  }
@@ -355,12 +394,18 @@ var PyraminxNotationMapper = class {
355
394
  if (this.wcaHack && move.innerLayer === 2 && move.outerLayer === null) {
356
395
  const newFamilyWCA = pyraminxFamilyMapWCA[move.family];
357
396
  if (newFamilyWCA) {
358
- return new Move(new QuantumMove(newFamilyWCA, move.innerLayer, move.outerLayer), move.amount);
397
+ return new Move(
398
+ new QuantumMove(newFamilyWCA, move.innerLayer, move.outerLayer),
399
+ move.amount
400
+ );
359
401
  }
360
402
  }
361
403
  const newFamily = this.map[move.family];
362
404
  if (newFamily) {
363
- return new Move(new QuantumMove(newFamily, move.innerLayer, move.outerLayer), move.amount);
405
+ return new Move(
406
+ new QuantumMove(newFamily, move.innerLayer, move.outerLayer),
407
+ move.amount
408
+ );
364
409
  } else if (pyraminxExternalQuantumY.isIdentical(move.quantum)) {
365
410
  return new Move(pyraminxInternalQuantumY, -move.amount);
366
411
  } else {
@@ -371,13 +416,19 @@ var PyraminxNotationMapper = class {
371
416
  if (this.wcaHack && move.innerLayer === 2 && move.outerLayer === null) {
372
417
  for (const [external, internal] of Object.entries(pyraminxFamilyMapWCA)) {
373
418
  if (this.child.spinmatch(move.family, internal)) {
374
- return new Move(new QuantumMove(external, move.innerLayer, move.outerLayer), move.amount);
419
+ return new Move(
420
+ new QuantumMove(external, move.innerLayer, move.outerLayer),
421
+ move.amount
422
+ );
375
423
  }
376
424
  }
377
425
  }
378
426
  for (const [external, internal] of Object.entries(this.map)) {
379
427
  if (this.child.spinmatch(move.family, internal)) {
380
- return new Move(new QuantumMove(external, move.innerLayer, move.outerLayer), move.amount);
428
+ return new Move(
429
+ new QuantumMove(external, move.innerLayer, move.outerLayer),
430
+ move.amount
431
+ );
381
432
  }
382
433
  }
383
434
  if (pyraminxInternalQuantumY.isIdentical(move.quantum)) {
@@ -433,7 +484,10 @@ var SkewbNotationMapper = class {
433
484
  }
434
485
  const newFamily = skewbFamilyMap[move.family];
435
486
  if (newFamily) {
436
- return new Move(new QuantumMove(newFamily, move.outerLayer, move.innerLayer), move.amount);
487
+ return new Move(
488
+ new QuantumMove(newFamily, move.outerLayer, move.innerLayer),
489
+ move.amount
490
+ );
437
491
  }
438
492
  if (skewbExternalQuantumX.isIdentical(move.quantum)) {
439
493
  return new Move(skewbInternalQuantumX, move.amount);
@@ -449,7 +503,10 @@ var SkewbNotationMapper = class {
449
503
  notationToExternal(move) {
450
504
  for (const [external, internal] of Object.entries(skewbFamilyMap)) {
451
505
  if (this.child.spinmatchv(move.family, internal)) {
452
- return new Move(new QuantumMove(external, move.innerLayer, move.outerLayer), move.amount);
506
+ return new Move(
507
+ new QuantumMove(external, move.innerLayer, move.outerLayer),
508
+ move.amount
509
+ );
453
510
  }
454
511
  }
455
512
  if (skewbInternalQuantumX.isIdentical(move.quantum)) {
@@ -746,13 +803,20 @@ var PGOrbitsDef = class {
746
803
  result.push("Name " + name);
747
804
  result.push("");
748
805
  for (let i = 0; i < this.orbitnames.length; i++) {
749
- result.push(`Set ${this.orbitnames[i]} ${this.orbitdefs[i].size} ${this.orbitdefs[i].mod}`);
806
+ result.push(
807
+ `Set ${this.orbitnames[i]} ${this.orbitdefs[i].size} ${this.orbitdefs[i].mod}`
808
+ );
750
809
  this.describeSet(i, result, mapper);
751
810
  }
752
811
  result.push("");
753
812
  result.push("Solved");
754
813
  for (let i = 0; i < this.orbitnames.length; i++) {
755
- this.solved.orbits[i].appendDefinition(result, this.orbitnames[i], false, false);
814
+ this.solved.orbits[i].appendDefinition(
815
+ result,
816
+ this.orbitnames[i],
817
+ false,
818
+ false
819
+ );
756
820
  }
757
821
  result.push("End");
758
822
  for (let i = 0; i < this.movenames.length; i++) {
@@ -771,7 +835,11 @@ var PGOrbitsDef = class {
771
835
  if (doinv) {
772
836
  this.moveops[i].orbits[j].inv().appendDefinition(result, this.orbitnames[j], true);
773
837
  } else {
774
- this.moveops[i].orbits[j].appendDefinition(result, this.orbitnames[j], true);
838
+ this.moveops[i].orbits[j].appendDefinition(
839
+ result,
840
+ this.orbitnames[j],
841
+ true
842
+ );
775
843
  }
776
844
  }
777
845
  result.push("End");
@@ -795,7 +863,9 @@ var PGOrbitsDef = class {
795
863
  const moves = {};
796
864
  if (includemoves) {
797
865
  for (let i = 0; i < this.movenames.length; i++) {
798
- moves[this.movenames[i]] = this.transformToKTransformationData(this.moveops[i]);
866
+ moves[this.movenames[i]] = this.transformToKTransformationData(
867
+ this.moveops[i]
868
+ );
799
869
  }
800
870
  }
801
871
  return {
@@ -839,7 +909,10 @@ var PGOrbitsDef = class {
839
909
  for (let k = 0; k < n; k++) {
840
910
  if (this.moveops[j].orbits[i].perm[k] !== k || this.moveops[j].orbits[i].ori[k] !== 0) {
841
911
  for (let o = 0; o < om; o++) {
842
- duo.union(k * om + o, this.moveops[j].orbits[i].perm[k] * om + (o + this.moveops[j].orbits[i].ori[k]) % om);
912
+ duo.union(
913
+ k * om + o,
914
+ this.moveops[j].orbits[i].perm[k] * om + (o + this.moveops[j].orbits[i].ori[k]) % om
915
+ );
843
916
  }
844
917
  }
845
918
  }
@@ -904,12 +977,22 @@ var PGOrbitsDef = class {
904
977
  neworbitdefs.push(new PGOrbitDef(nv, 1));
905
978
  newsolved.push(this.solved.orbits[i].remapVS(no, nv).killOri());
906
979
  for (let k = 0; k < this.moveops.length; k++) {
907
- newmoveops[k].push(this.moveops[k].orbits[i].remap(no, on, nv).killOri());
980
+ newmoveops[k].push(
981
+ this.moveops[k].orbits[i].remap(no, on, nv).killOri()
982
+ );
908
983
  }
909
984
  }
910
985
  }
911
986
  }
912
- return new PGOrbitsDef(neworbitnames, neworbitdefs, new VisibleState(newsolved), this.movenames, newmoveops.map((_) => new PGTransform(_)), this.isRotation, this.forcenames);
987
+ return new PGOrbitsDef(
988
+ neworbitnames,
989
+ neworbitdefs,
990
+ new VisibleState(newsolved),
991
+ this.movenames,
992
+ newmoveops.map((_) => new PGTransform(_)),
993
+ this.isRotation,
994
+ this.forcenames
995
+ );
913
996
  }
914
997
  scramble(n) {
915
998
  this.solved = this.solved.mul(this.getScrambleTransformation(n));
@@ -1234,7 +1317,9 @@ var PGTransform = class extends PGTransformBase {
1234
1317
  return new PGTransform(this.internalInv());
1235
1318
  }
1236
1319
  e() {
1237
- return new PGTransform(this.orbits.map((_) => PGOrbit.e(_.perm.length, _.orimod)));
1320
+ return new PGTransform(
1321
+ this.orbits.map((_) => PGOrbit.e(_.perm.length, _.orimod))
1322
+ );
1238
1323
  }
1239
1324
  };
1240
1325
  var VisibleState = class extends PGTransformBase {
@@ -1423,7 +1508,12 @@ var Quat = class {
1423
1508
  this.d = d;
1424
1509
  }
1425
1510
  mul(q) {
1426
- return new Quat(this.a * q.a - this.b * q.b - this.c * q.c - this.d * q.d, this.a * q.b + this.b * q.a + this.c * q.d - this.d * q.c, this.a * q.c - this.b * q.d + this.c * q.a + this.d * q.b, this.a * q.d + this.b * q.c - this.c * q.b + this.d * q.a);
1511
+ return new Quat(
1512
+ this.a * q.a - this.b * q.b - this.c * q.c - this.d * q.d,
1513
+ this.a * q.b + this.b * q.a + this.c * q.d - this.d * q.c,
1514
+ this.a * q.c - this.b * q.d + this.c * q.a + this.d * q.b,
1515
+ this.a * q.d + this.b * q.c - this.c * q.b + this.d * q.a
1516
+ );
1427
1517
  }
1428
1518
  toString() {
1429
1519
  return `Q[${this.a},${this.b},${this.c},${this.d}]`;
@@ -1435,7 +1525,12 @@ var Quat = class {
1435
1525
  return Math.hypot(this.a, this.b, this.c, this.d);
1436
1526
  }
1437
1527
  cross(q) {
1438
- return new Quat(0, this.c * q.d - this.d * q.c, this.d * q.b - this.b * q.d, this.b * q.c - this.c * q.b);
1528
+ return new Quat(
1529
+ 0,
1530
+ this.c * q.d - this.d * q.c,
1531
+ this.d * q.b - this.b * q.d,
1532
+ this.b * q.c - this.c * q.b
1533
+ );
1439
1534
  }
1440
1535
  dot(q) {
1441
1536
  return this.b * q.b + this.c * q.c + this.d * q.d;
@@ -1512,11 +1607,26 @@ var Quat = class {
1512
1607
  return face.map((_) => _.rotatepoint(this));
1513
1608
  }
1514
1609
  intersect3(p2, p3) {
1515
- const det = this.det3x3(this.b, this.c, this.d, p2.b, p2.c, p2.d, p3.b, p3.c, p3.d);
1610
+ const det = this.det3x3(
1611
+ this.b,
1612
+ this.c,
1613
+ this.d,
1614
+ p2.b,
1615
+ p2.c,
1616
+ p2.d,
1617
+ p3.b,
1618
+ p3.c,
1619
+ p3.d
1620
+ );
1516
1621
  if (Math.abs(det) < eps) {
1517
1622
  return false;
1518
1623
  }
1519
- return new Quat(0, this.det3x3(this.a, this.c, this.d, p2.a, p2.c, p2.d, p3.a, p3.c, p3.d) / det, this.det3x3(this.b, this.a, this.d, p2.b, p2.a, p2.d, p3.b, p3.a, p3.d) / det, this.det3x3(this.b, this.c, this.a, p2.b, p2.c, p2.a, p3.b, p3.c, p3.a) / det);
1624
+ return new Quat(
1625
+ 0,
1626
+ this.det3x3(this.a, this.c, this.d, p2.a, p2.c, p2.d, p3.a, p3.c, p3.d) / det,
1627
+ this.det3x3(this.b, this.a, this.d, p2.b, p2.a, p2.d, p3.b, p3.a, p3.d) / det,
1628
+ this.det3x3(this.b, this.c, this.a, p2.b, p2.c, p2.a, p3.b, p3.c, p3.a) / det
1629
+ );
1520
1630
  }
1521
1631
  side(x) {
1522
1632
  if (x > eps) {
@@ -1835,7 +1945,9 @@ function schreierSims(g, disp) {
1835
1945
  avgs.push(avg);
1836
1946
  sollen += avg;
1837
1947
  }
1838
- disp(`${i}: sz ${sz} T ${tks} sol ${sollen} none ${none} mults ${mults.toString()}`);
1948
+ disp(
1949
+ `${i}: sz ${sz} T ${tks} sol ${sollen} none ${none} mults ${mults.toString()}`
1950
+ );
1839
1951
  }
1840
1952
  return sz;
1841
1953
  }
@@ -1859,7 +1971,12 @@ var Face = class {
1859
1971
  this.length = q.length;
1860
1972
  }
1861
1973
  get(off) {
1862
- return new Quat(0, this.coords[3 * off], this.coords[3 * off + 1], this.coords[3 * off + 2]);
1974
+ return new Quat(
1975
+ 0,
1976
+ this.coords[3 * off],
1977
+ this.coords[3 * off + 1],
1978
+ this.coords[3 * off + 2]
1979
+ );
1863
1980
  }
1864
1981
  centermass() {
1865
1982
  let sx = 0;
@@ -2261,7 +2378,10 @@ function getPuzzleGeometryByDesc(desc, options = {}) {
2261
2378
  if (parsed === null) {
2262
2379
  throw new Error("Could not parse the puzzle description");
2263
2380
  }
2264
- const pg = new PuzzleGeometry(parsed, Object.assign({}, { allMoves: true }, options));
2381
+ const pg = new PuzzleGeometry(
2382
+ parsed,
2383
+ Object.assign({}, { allMoves: true }, options)
2384
+ );
2265
2385
  pg.allstickers();
2266
2386
  pg.genperms();
2267
2387
  return pg;
@@ -2290,7 +2410,9 @@ function getmovename(geo, bits, slices) {
2290
2410
  movenamePrefix = String(bits[1] + 1);
2291
2411
  }
2292
2412
  } else {
2293
- throw new Error(`We only support slice and outer block moves right now. ${bits}`);
2413
+ throw new Error(
2414
+ `We only support slice and outer block moves right now. ${bits}`
2415
+ );
2294
2416
  }
2295
2417
  return [movenamePrefix + movenameFamily, inverted];
2296
2418
  }
@@ -2619,7 +2741,9 @@ var PuzzleGeometry = class {
2619
2741
  }
2620
2742
  }
2621
2743
  if (st < 0) {
2622
- throw new Error("Internal error; couldn't find face name when fixing corners");
2744
+ throw new Error(
2745
+ "Internal error; couldn't find face name when fixing corners"
2746
+ );
2623
2747
  }
2624
2748
  let r = "";
2625
2749
  for (let j = 1; j < vertexnames[i].length; j++) {
@@ -2661,7 +2785,9 @@ var PuzzleGeometry = class {
2661
2785
  const geonormalnames = geonormals.map((_) => _[1]);
2662
2786
  this.swizzler.setGripNames(geonormalnames);
2663
2787
  if (this.options.verbosity > 0) {
2664
- console.log("# Distances: face " + 1 + " edge " + this.edgedistance + " vertex " + this.vertexdistance);
2788
+ console.log(
2789
+ "# Distances: face " + 1 + " edge " + this.edgedistance + " vertex " + this.vertexdistance
2790
+ );
2665
2791
  }
2666
2792
  for (let c = 0; c < cutplanes.length; c++) {
2667
2793
  for (const rotation of this.rotations) {
@@ -2756,27 +2882,33 @@ var PuzzleGeometry = class {
2756
2882
  this.addNotationMapper = "PyraminxOrTetraminxMapper";
2757
2883
  }
2758
2884
  if (shape === "o" && sawface) {
2759
- this.notationMapper = new FaceRenamingMapper(this.swizzler, new FaceNameSwizzler(["F", "D", "L", "BL", "R", "U", "BR", "B"]));
2885
+ this.notationMapper = new FaceRenamingMapper(
2886
+ this.swizzler,
2887
+ new FaceNameSwizzler(["F", "D", "L", "BL", "R", "U", "BR", "B"])
2888
+ );
2760
2889
  if (!sawedge && !sawvertex) {
2761
2890
  this.addNotationMapper = "FTOMapper";
2762
2891
  }
2763
2892
  }
2764
2893
  if (shape === "d" && sawface) {
2765
2894
  this.addNotationMapper = "MegaminxMapper";
2766
- this.notationMapper = new FaceRenamingMapper(this.swizzler, new FaceNameSwizzler([
2767
- "U",
2768
- "F",
2769
- "L",
2770
- "BL",
2771
- "BR",
2772
- "R",
2773
- "FR",
2774
- "FL",
2775
- "DL",
2776
- "B",
2777
- "DR",
2778
- "D"
2779
- ]));
2895
+ this.notationMapper = new FaceRenamingMapper(
2896
+ this.swizzler,
2897
+ new FaceNameSwizzler([
2898
+ "U",
2899
+ "F",
2900
+ "L",
2901
+ "BL",
2902
+ "BR",
2903
+ "R",
2904
+ "FR",
2905
+ "FL",
2906
+ "DL",
2907
+ "B",
2908
+ "DR",
2909
+ "D"
2910
+ ])
2911
+ );
2780
2912
  }
2781
2913
  }
2782
2914
  keyface(face) {
@@ -2861,7 +2993,12 @@ var PuzzleGeometry = class {
2861
2993
  const sinr = delta.c;
2862
2994
  const x1 = x0.smul(cosr).sub(y0.smul(sinr)).smul(len);
2863
2995
  const y1 = y0.smul(cosr).sum(x0.smul(sinr)).smul(len);
2864
- const off = new Quat(0, targvec[0].b - x1.dot(face[edgen]), targvec[0].c - y1.dot(face[edgen]), 0);
2996
+ const off = new Quat(
2997
+ 0,
2998
+ targvec[0].b - x1.dot(face[edgen]),
2999
+ targvec[0].c - y1.dot(face[edgen]),
3000
+ 0
3001
+ );
2865
3002
  return [x1, y1, off];
2866
3003
  }
2867
3004
  allstickers() {
@@ -2992,13 +3129,18 @@ var PuzzleGeometry = class {
2992
3129
  }
2993
3130
  if (this.addNotationMapper === "MegaminxMapper" && gtype === "f") {
2994
3131
  if (1 + moveplanesets[i].length === 3) {
2995
- this.notationMapper = new MegaminxScramblingNotationMapper(this.notationMapper);
3132
+ this.notationMapper = new MegaminxScramblingNotationMapper(
3133
+ this.notationMapper
3134
+ );
2996
3135
  }
2997
3136
  this.addNotationMapper = "";
2998
3137
  }
2999
3138
  if (this.addNotationMapper === "FTOMapper" && gtype === "f") {
3000
3139
  if (1 + moveplanesets[i].length === 3) {
3001
- this.notationMapper = new FTONotationMapper(this.notationMapper, this.swizzler);
3140
+ this.notationMapper = new FTONotationMapper(
3141
+ this.notationMapper,
3142
+ this.swizzler
3143
+ );
3002
3144
  }
3003
3145
  this.addNotationMapper = "";
3004
3146
  }
@@ -3206,7 +3348,9 @@ var PuzzleGeometry = class {
3206
3348
  }
3207
3349
  }
3208
3350
  if (this.fixedCubie < 0) {
3209
- throw new Error("Could not find a cubie of type " + this.options.fixedPieceType + " to fix.");
3351
+ throw new Error(
3352
+ "Could not find a cubie of type " + this.options.fixedPieceType + " to fix."
3353
+ );
3210
3354
  }
3211
3355
  }
3212
3356
  if (this.options.verbosity > 0) {
@@ -3315,10 +3459,14 @@ var PuzzleGeometry = class {
3315
3459
  hislice = this.moveplanesets[msi].length;
3316
3460
  }
3317
3461
  if (loslice < 0 || loslice > this.moveplanesets[msi].length || hislice < 0 || hislice > this.moveplanesets[msi].length) {
3318
- throw new Error("Bad slice spec " + loslice + " " + hislice + " vs " + this.moveplanesets[msi].length);
3462
+ throw new Error(
3463
+ "Bad slice spec " + loslice + " " + hislice + " vs " + this.moveplanesets[msi].length
3464
+ );
3319
3465
  }
3320
3466
  if (!permissivieMoveParsing && loslice === 0 && hislice === this.moveplanesets[msi].length && !fullrotation) {
3321
- throw new Error("! full puzzle rotations must be specified with v suffix.");
3467
+ throw new Error(
3468
+ "! full puzzle rotations must be specified with v suffix."
3469
+ );
3322
3470
  }
3323
3471
  return [void 0, msi, loslice, hislice, firstgrip, move.amount];
3324
3472
  }
@@ -3425,7 +3573,9 @@ var PuzzleGeometry = class {
3425
3573
  cm = cm2;
3426
3574
  }
3427
3575
  if (b.length > 2 && this.options.orientCenters && (this.cubies[b[0]].length === 1 || this.duplicatedCubies[b[0]] > 1)) {
3428
- if (this.facecentermass[i].dist(this.basefaces[this.getfaceindex(i)].centermass()) < eps3) {
3576
+ if (this.facecentermass[i].dist(
3577
+ this.basefaces[this.getfaceindex(i)].centermass()
3578
+ ) < eps3) {
3429
3579
  let face1 = this.faces[this.cubies[b[0]][0]];
3430
3580
  for (let ii = 0; ii < b.length; ii += 2) {
3431
3581
  const face0 = this.faces[this.cubies[b[ii]][0]];
@@ -3437,7 +3587,9 @@ var PuzzleGeometry = class {
3437
3587
  }
3438
3588
  }
3439
3589
  if (o < 0) {
3440
- throw new Error("Couldn't find rotation of center faces; ignoring for now.");
3590
+ throw new Error(
3591
+ "Couldn't find rotation of center faces; ignoring for now."
3592
+ );
3441
3593
  } else {
3442
3594
  b[ii + 1] = o;
3443
3595
  face1 = face1.rotate(this.moverotations[k][0]);
@@ -3450,7 +3602,10 @@ var PuzzleGeometry = class {
3450
3602
  if (sc === 0) {
3451
3603
  b.push(b[0], ii);
3452
3604
  } else {
3453
- b.push(b[0], (this.movesetorders[k] - ii) % this.movesetorders[k]);
3605
+ b.push(
3606
+ b[0],
3607
+ (this.movesetorders[k] - ii) % this.movesetorders[k]
3608
+ );
3454
3609
  }
3455
3610
  }
3456
3611
  }
@@ -3618,7 +3773,9 @@ var PuzzleGeometry = class {
3618
3773
  r.push(mvs.join(","));
3619
3774
  r.push("];");
3620
3775
  const ip = os.solved.identicalPieces();
3621
- r.push("ip:=[" + ip.map((_) => "[" + _.map((__) => __ + 1).join(",") + "]").join(",") + "];");
3776
+ r.push(
3777
+ "ip:=[" + ip.map((_) => "[" + _.map((__) => __ + 1).join(",") + "]").join(",") + "];"
3778
+ );
3622
3779
  r.push("# Size(Group(Gen));");
3623
3780
  r.push("# Size(Stabilizer(Group(Gen), ip, OnTuplesSets));");
3624
3781
  r.push("");
@@ -3793,7 +3950,12 @@ var PuzzleGeometry = class {
3793
3950
  throw new Error("Could not find rotation");
3794
3951
  }
3795
3952
  const cmp = mps[found];
3796
- if (cmp.length !== mps[k].length || this.moveplanesets[k].length !== this.moveplanesets[found].length || this.diffmvsets(cmp, mps[k], this.moveplanesets[found].length, neg)) {
3953
+ if (cmp.length !== mps[k].length || this.moveplanesets[k].length !== this.moveplanesets[found].length || this.diffmvsets(
3954
+ cmp,
3955
+ mps[k],
3956
+ this.moveplanesets[found].length,
3957
+ neg
3958
+ )) {
3797
3959
  addrot[i] |= ii;
3798
3960
  }
3799
3961
  }
@@ -3861,7 +4023,12 @@ var PuzzleGeometry = class {
3861
4023
  continue;
3862
4024
  }
3863
4025
  setnames.push(this.cubiesetnames[i]);
3864
- setdefs.push(new PGOrbitDef(this.cubieords[i], this.options.fixedOrientation ? 1 : this.orbitoris[i]));
4026
+ setdefs.push(
4027
+ new PGOrbitDef(
4028
+ this.cubieords[i],
4029
+ this.options.fixedOrientation ? 1 : this.orbitoris[i]
4030
+ )
4031
+ );
3865
4032
  }
3866
4033
  const solved = [];
3867
4034
  for (let i = 0; i < this.cubiesetnames.length; i++) {
@@ -3882,7 +4049,13 @@ var PuzzleGeometry = class {
3882
4049
  }
3883
4050
  o.push(0);
3884
4051
  }
3885
- solved.push(new PGOrbit(p, o, this.options.fixedOrientation ? 1 : this.orbitoris[i]));
4052
+ solved.push(
4053
+ new PGOrbit(
4054
+ p,
4055
+ o,
4056
+ this.options.fixedOrientation ? 1 : this.orbitoris[i]
4057
+ )
4058
+ );
3886
4059
  }
3887
4060
  const movenames = [];
3888
4061
  const forcenames = [];
@@ -3930,12 +4103,27 @@ var PuzzleGeometry = class {
3930
4103
  forcenames.push(false);
3931
4104
  }
3932
4105
  isrots.push(movebits[0] === 0 && movebits[1] === slices);
3933
- const mv = this.getMoveFromBits(movebits, moveset[i + 1], inverted, this.cmovesbyslice[k], setmoves, this.movesetorders[k]);
4106
+ const mv = this.getMoveFromBits(
4107
+ movebits,
4108
+ moveset[i + 1],
4109
+ inverted,
4110
+ this.cmovesbyslice[k],
4111
+ setmoves,
4112
+ this.movesetorders[k]
4113
+ );
3934
4114
  moves.push(mv);
3935
4115
  }
3936
4116
  }
3937
4117
  }
3938
- let r = new PGOrbitsDef(setnames, setdefs, new VisibleState(solved), movenames, moves, isrots, forcenames);
4118
+ let r = new PGOrbitsDef(
4119
+ setnames,
4120
+ setdefs,
4121
+ new VisibleState(solved),
4122
+ movenames,
4123
+ moves,
4124
+ isrots,
4125
+ forcenames
4126
+ );
3939
4127
  if (this.options.optimizeOrbits) {
3940
4128
  r = r.optimize();
3941
4129
  }
@@ -4288,7 +4476,12 @@ var PuzzleGeometry = class {
4288
4476
  const g = function() {
4289
4477
  const irot = rot.invrot();
4290
4478
  return function(facenum, coords) {
4291
- let q = new Quat(0, coords[0] * maxdist, -coords[1] * maxdist, coords[2] * maxdist);
4479
+ let q = new Quat(
4480
+ 0,
4481
+ coords[0] * maxdist,
4482
+ -coords[1] * maxdist,
4483
+ coords[2] * maxdist
4484
+ );
4292
4485
  q = q.rotatepoint(irot);
4293
4486
  const x = twodmapper(facenum, q);
4294
4487
  x[0] /= 2880;
@@ -4364,7 +4557,14 @@ var PGNotation = class {
4364
4557
  const slices = this.pg.moveplanesets[mv[1]].length;
4365
4558
  bits = [slices - mv[3], slices - mv[2]];
4366
4559
  }
4367
- const pgmv = this.pg.getMoveFromBits(bits, mv[5], !mv[4], this.pg.cmovesbyslice[mv[1]], void 0, this.pg.movesetorders[mv[1]]);
4560
+ const pgmv = this.pg.getMoveFromBits(
4561
+ bits,
4562
+ mv[5],
4563
+ !mv[4],
4564
+ this.pg.cmovesbyslice[mv[1]],
4565
+ void 0,
4566
+ this.pg.movesetorders[mv[1]]
4567
+ );
4368
4568
  const r = PGOrbitsDef.transformToKTransformationData(this.orbitNames, pgmv);
4369
4569
  return r;
4370
4570
  }