cubing 0.63.7 → 0.64.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 (100) hide show
  1. package/dist/bin/chunks/{chunk-6YZ4AUWL.js → chunk-DQNBCFR3.js} +2 -2
  2. package/dist/bin/chunks/{chunk-6YZ4AUWL.js.map → chunk-DQNBCFR3.js.map} +1 -1
  3. package/dist/bin/order.js +1 -1
  4. package/dist/bin/order.js.map +1 -1
  5. package/dist/bin/puzzle-geometry-bin.js +1 -1
  6. package/dist/bin/puzzle-geometry-bin.js.map +1 -1
  7. package/dist/bin/scramble.js +1 -1
  8. package/dist/bin/scramble.js.map +1 -1
  9. package/dist/bin/svg.js +1 -1
  10. package/dist/bin/svg.js.map +1 -1
  11. package/dist/lib/cubing/alg/index.d.ts +1 -1
  12. package/dist/lib/cubing/alg/index.js +1 -1
  13. package/dist/lib/cubing/bluetooth/index.d.ts +17 -17
  14. package/dist/lib/cubing/bluetooth/index.js +96 -96
  15. package/dist/lib/cubing/bluetooth/index.js.map +2 -2
  16. package/dist/lib/cubing/chunks/{big-puzzle-orientation-ADWIOX6S.js → big-puzzle-orientation-G75BXW2W.js} +2 -2
  17. package/dist/lib/cubing/chunks/big-puzzle-orientation-G75BXW2W.js.map +7 -0
  18. package/dist/lib/cubing/chunks/{chunk-A7FK4XKU.js → chunk-5LBACZOM.js} +173 -144
  19. package/dist/lib/cubing/chunks/chunk-5LBACZOM.js.map +7 -0
  20. package/dist/lib/cubing/chunks/{chunk-5KMTA6PX.js → chunk-7MYDNYZ3.js} +3 -3
  21. package/dist/lib/cubing/chunks/chunk-7MYDNYZ3.js.map +7 -0
  22. package/dist/lib/cubing/chunks/{chunk-7LXHWXCO.js → chunk-ALR6ZQFC.js} +2 -2
  23. package/dist/lib/cubing/chunks/chunk-ALR6ZQFC.js.map +7 -0
  24. package/dist/lib/cubing/chunks/{chunk-H5KMIDAF.js → chunk-DTYBGCI3.js} +5 -5
  25. package/dist/lib/cubing/chunks/chunk-DTYBGCI3.js.map +7 -0
  26. package/dist/lib/cubing/chunks/{chunk-YR72E7KZ.js → chunk-GO2SL6SC.js} +38 -38
  27. package/dist/lib/cubing/chunks/chunk-GO2SL6SC.js.map +7 -0
  28. package/dist/lib/cubing/chunks/{chunk-FUAADKXE.js → chunk-KHUP3BPA.js} +35 -34
  29. package/dist/lib/cubing/chunks/chunk-KHUP3BPA.js.map +7 -0
  30. package/dist/lib/cubing/chunks/{chunk-MQSQDKWH.js → chunk-O2QJENHE.js} +3 -3
  31. package/dist/lib/cubing/chunks/chunk-O2QJENHE.js.map +7 -0
  32. package/dist/lib/cubing/chunks/{chunk-5ONX3JVC.js → chunk-THRYJMRP.js} +8 -8
  33. package/dist/lib/cubing/chunks/chunk-THRYJMRP.js.map +7 -0
  34. package/dist/lib/cubing/chunks/{chunk-UEUJSZTX.js → chunk-UWJ575HH.js} +58 -46
  35. package/dist/lib/cubing/chunks/chunk-UWJ575HH.js.map +7 -0
  36. package/dist/lib/cubing/chunks/{chunk-N5FJ5YIA.js → chunk-YFNXHRNE.js} +37 -31
  37. package/dist/lib/cubing/chunks/chunk-YFNXHRNE.js.map +7 -0
  38. package/dist/lib/cubing/chunks/{inside-JAJOK2MI.js → inside-A7LIP56H.js} +14 -14
  39. package/dist/lib/cubing/chunks/inside-A7LIP56H.js.map +7 -0
  40. package/dist/lib/cubing/chunks/{puzzles-dynamic-side-events-IMYJ533P.js → puzzles-dynamic-side-events-653A7JCM.js} +1 -1
  41. package/dist/lib/cubing/chunks/puzzles-dynamic-side-events-653A7JCM.js.map +7 -0
  42. package/dist/lib/cubing/chunks/{puzzles-dynamic-unofficial-P3TW433I.js → puzzles-dynamic-unofficial-2CY6GVZ4.js} +1 -1
  43. package/dist/lib/cubing/chunks/{puzzles-dynamic-unofficial-P3TW433I.js.map → puzzles-dynamic-unofficial-2CY6GVZ4.js.map} +1 -1
  44. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-WORUZVF5.js → search-dynamic-sgs-side-events-YSB3MWLK.js} +6 -6
  45. package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-YSB3MWLK.js.map +7 -0
  46. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-5JQKPNG2.js → search-dynamic-sgs-unofficial-OLK64DE6.js} +6 -6
  47. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-5JQKPNG2.js.map → search-dynamic-sgs-unofficial-OLK64DE6.js.map} +1 -1
  48. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-BGV4AJVT.js → search-dynamic-solve-4x4x4-WWFUMIDG.js} +7 -7
  49. package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-I5ID5LXD.js → search-dynamic-solve-fto-ZZKLTONP.js} +2 -2
  50. package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-Y2D3C74Y.js → search-dynamic-solve-kilominx-PUF4PRHS.js} +2 -2
  51. package/dist/lib/cubing/chunks/search-worker-entry.js +1 -1
  52. package/dist/lib/cubing/chunks/search-worker-entry.js.map +2 -2
  53. package/dist/lib/cubing/chunks/{twips-ZNMKGC5U.js → twips-LHO3IYJC.js} +2 -2
  54. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-4BEQ76PB.js → twisty-dynamic-3d-A2G22YLA.js} +6 -6
  55. package/dist/lib/cubing/chunks/twisty-dynamic-3d-A2G22YLA.js.map +7 -0
  56. package/dist/lib/cubing/{index-B2leUGbW.d.ts → index-C2x6Sc62.d.ts} +52 -47
  57. package/dist/lib/cubing/{index-BLw2OxXo.d.ts → index-Doa1gNE4.d.ts} +1 -1
  58. package/dist/lib/cubing/kpuzzle/index.d.ts +1 -1
  59. package/dist/lib/cubing/kpuzzle/index.js +2 -2
  60. package/dist/lib/cubing/notation/index.d.ts +17 -15
  61. package/dist/lib/cubing/notation/index.js +4 -4
  62. package/dist/lib/cubing/{outside-V6_PW1ZK.d.ts → outside-nf-4k7Tp.d.ts} +1 -1
  63. package/dist/lib/cubing/protocol/index.d.ts +1 -1
  64. package/dist/lib/cubing/protocol/index.js +4 -4
  65. package/dist/lib/cubing/puzzle-geometry/index.d.ts +1 -1
  66. package/dist/lib/cubing/puzzle-geometry/index.js +284 -184
  67. package/dist/lib/cubing/puzzle-geometry/index.js.map +2 -2
  68. package/dist/lib/cubing/puzzles/index.d.ts +1 -1
  69. package/dist/lib/cubing/puzzles/index.js +4 -4
  70. package/dist/lib/cubing/scramble/index.d.ts +1 -1
  71. package/dist/lib/cubing/scramble/index.js +6 -6
  72. package/dist/lib/cubing/search/index.d.ts +1 -1
  73. package/dist/lib/cubing/search/index.js +6 -6
  74. package/dist/lib/cubing/search/index.js.map +1 -1
  75. package/dist/lib/cubing/stream/index.d.ts +1 -1
  76. package/dist/lib/cubing/stream/index.js +1 -1
  77. package/dist/lib/cubing/stream/index.js.map +1 -1
  78. package/dist/lib/cubing/twisty/index.d.ts +1 -1
  79. package/dist/lib/cubing/twisty/index.js +190 -180
  80. package/dist/lib/cubing/twisty/index.js.map +2 -2
  81. package/package.json +2 -2
  82. package/dist/lib/cubing/chunks/big-puzzle-orientation-ADWIOX6S.js.map +0 -7
  83. package/dist/lib/cubing/chunks/chunk-5KMTA6PX.js.map +0 -7
  84. package/dist/lib/cubing/chunks/chunk-5ONX3JVC.js.map +0 -7
  85. package/dist/lib/cubing/chunks/chunk-7LXHWXCO.js.map +0 -7
  86. package/dist/lib/cubing/chunks/chunk-A7FK4XKU.js.map +0 -7
  87. package/dist/lib/cubing/chunks/chunk-FUAADKXE.js.map +0 -7
  88. package/dist/lib/cubing/chunks/chunk-H5KMIDAF.js.map +0 -7
  89. package/dist/lib/cubing/chunks/chunk-MQSQDKWH.js.map +0 -7
  90. package/dist/lib/cubing/chunks/chunk-N5FJ5YIA.js.map +0 -7
  91. package/dist/lib/cubing/chunks/chunk-UEUJSZTX.js.map +0 -7
  92. package/dist/lib/cubing/chunks/chunk-YR72E7KZ.js.map +0 -7
  93. package/dist/lib/cubing/chunks/inside-JAJOK2MI.js.map +0 -7
  94. package/dist/lib/cubing/chunks/puzzles-dynamic-side-events-IMYJ533P.js.map +0 -7
  95. package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-WORUZVF5.js.map +0 -7
  96. package/dist/lib/cubing/chunks/twisty-dynamic-3d-4BEQ76PB.js.map +0 -7
  97. /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-BGV4AJVT.js.map → search-dynamic-solve-4x4x4-WWFUMIDG.js.map} +0 -0
  98. /package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-I5ID5LXD.js.map → search-dynamic-solve-fto-ZZKLTONP.js.map} +0 -0
  99. /package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-Y2D3C74Y.js.map → search-dynamic-solve-kilominx-PUF4PRHS.js.map} +0 -0
  100. /package/dist/lib/cubing/chunks/{twips-ZNMKGC5U.js.map → twips-LHO3IYJC.js.map} +0 -0
@@ -18,27 +18,30 @@ import {
18
18
  rawRenderPooled,
19
19
  setCameraFromOrbitCoordinates,
20
20
  setTwistyDebug
21
- } from "../chunks/chunk-YR72E7KZ.js";
21
+ } from "../chunks/chunk-GO2SL6SC.js";
22
22
  import {
23
+ CommonMetric,
23
24
  countAnimatedLeaves,
24
25
  countLeavesInExpansionForSimultaneousMoveIndexer,
25
26
  countMetricMoves
26
- } from "../chunks/chunk-UEUJSZTX.js";
27
+ } from "../chunks/chunk-UWJ575HH.js";
27
28
  import {
28
29
  puzzles
29
- } from "../chunks/chunk-FUAADKXE.js";
30
+ } from "../chunks/chunk-KHUP3BPA.js";
30
31
  import {
32
+ PieceStickering,
31
33
  cube3x3x3,
32
34
  customPGPuzzleLoader,
33
35
  getPartialAppendOptionsForPuzzleSpecificSimplifyOptions,
34
36
  getPieceStickeringMask
35
- } from "../chunks/chunk-A7FK4XKU.js";
36
- import "../chunks/chunk-5ONX3JVC.js";
37
+ } from "../chunks/chunk-5LBACZOM.js";
38
+ import "../chunks/chunk-THRYJMRP.js";
37
39
  import {
38
40
  Alg,
39
41
  AlgBuilder,
40
42
  Conjugate,
41
43
  Grouping,
44
+ IterationDirection,
42
45
  LineComment,
43
46
  Move,
44
47
  Newline,
@@ -52,7 +55,7 @@ import {
52
55
  functionFromTraversal,
53
56
  offsetMod,
54
57
  startCharIndexKey
55
- } from "../chunks/chunk-N5FJ5YIA.js";
58
+ } from "../chunks/chunk-YFNXHRNE.js";
56
59
 
57
60
  // src/cubing/twisty/controllers/indexer/AlgDuration.ts
58
61
  function defaultDurationForAmount(amount) {
@@ -69,11 +72,11 @@ function defaultDurationForAmount(amount) {
69
72
  }
70
73
  var AlgDuration = class extends TraversalUp {
71
74
  // TODO: Pass durationForAmount as Down type instead?
75
+ durationForAmount = defaultDurationForAmount;
72
76
  constructor(durationForAmount = defaultDurationForAmount) {
73
77
  super();
74
78
  this.durationForAmount = durationForAmount;
75
79
  }
76
- durationForAmount;
77
80
  traverseAlg(alg) {
78
81
  let total = 0;
79
82
  for (const algNode of alg.childAlgNodes()) {
@@ -106,16 +109,16 @@ var AlgDuration = class extends TraversalUp {
106
109
 
107
110
  // src/cubing/twisty/controllers/indexer/SimpleAlgIndexer.ts
108
111
  var SimpleAlgIndexer = class {
109
- constructor(kpuzzle, alg) {
110
- this.kpuzzle = kpuzzle;
111
- this.moves = new Alg(alg.experimentalExpand());
112
- }
113
- kpuzzle;
114
112
  moves;
115
113
  // TODO: Allow custom `durationFn`.
116
114
  durationFn = new AlgDuration(
117
115
  defaultDurationForAmount
118
116
  );
117
+ kpuzzle;
118
+ constructor(kpuzzle, alg) {
119
+ this.kpuzzle = kpuzzle;
120
+ this.moves = new Alg(alg.experimentalExpand());
121
+ }
119
122
  getAnimLeaf(index) {
120
123
  return Array.from(this.moves.childAlgNodes())[index];
121
124
  }
@@ -157,6 +160,11 @@ var SimpleAlgIndexer = class {
157
160
 
158
161
  // src/cubing/twisty/controllers/indexer/tree/AlgWalker.ts
159
162
  var AlgWalkerDecoration = class {
163
+ moveCount;
164
+ duration;
165
+ forward;
166
+ backward;
167
+ children = [];
160
168
  constructor(moveCount, duration, forward, backward, children = []) {
161
169
  this.moveCount = moveCount;
162
170
  this.duration = duration;
@@ -164,13 +172,15 @@ var AlgWalkerDecoration = class {
164
172
  this.backward = backward;
165
173
  this.children = children;
166
174
  }
167
- moveCount;
168
- duration;
169
- forward;
170
- backward;
171
- children;
172
175
  };
173
176
  var DecoratorConstructor = class extends TraversalUp {
177
+ identity;
178
+ dummyLeaf;
179
+ durationFn = new AlgDuration(
180
+ defaultDurationForAmount
181
+ );
182
+ cache = {};
183
+ kpuzzle;
174
184
  constructor(kpuzzle) {
175
185
  super();
176
186
  this.kpuzzle = kpuzzle;
@@ -183,13 +193,6 @@ var DecoratorConstructor = class extends TraversalUp {
183
193
  []
184
194
  );
185
195
  }
186
- kpuzzle;
187
- identity;
188
- dummyLeaf;
189
- durationFn = new AlgDuration(
190
- defaultDurationForAmount
191
- );
192
- cache = {};
193
196
  traverseAlg(alg) {
194
197
  let moveCount = 0;
195
198
  let duration = 0;
@@ -293,14 +296,27 @@ var DecoratorConstructor = class extends TraversalUp {
293
296
  }
294
297
  };
295
298
  var WalkerDown = class {
299
+ apd;
300
+ back;
296
301
  constructor(apd, back) {
297
302
  this.apd = apd;
298
303
  this.back = back;
299
304
  }
300
- apd;
301
- back;
302
305
  };
303
306
  var AlgWalker = class extends TraversalDownUp {
307
+ move;
308
+ moveDuration;
309
+ back;
310
+ st;
311
+ root;
312
+ i;
313
+ dur;
314
+ goalIndex;
315
+ goalDuration;
316
+ kpuzzle;
317
+ algOrAlgNode;
318
+ // TODO: can we keep these separate?
319
+ apd;
304
320
  constructor(kpuzzle, algOrAlgNode, apd) {
305
321
  super();
306
322
  this.kpuzzle = kpuzzle;
@@ -316,18 +332,6 @@ var AlgWalker = class extends TraversalDownUp {
316
332
  this.st = this.kpuzzle.identityTransformation();
317
333
  this.root = new WalkerDown(this.apd, false);
318
334
  }
319
- kpuzzle;
320
- algOrAlgNode;
321
- apd;
322
- move;
323
- moveDuration;
324
- back;
325
- st;
326
- root;
327
- i;
328
- dur;
329
- goalIndex;
330
- goalDuration;
331
335
  moveByIndex(loc) {
332
336
  if (this.i >= 0 && this.i === loc) {
333
337
  return this.move !== void 0;
@@ -359,7 +363,7 @@ var AlgWalker = class extends TraversalDownUp {
359
363
  let i = wd.back ? alg.experimentalNumChildAlgNodes() - 1 : 0;
360
364
  for (const algNode of directedGenerator(
361
365
  alg.childAlgNodes(),
362
- wd.back ? -1 /* Backwards */ : 1 /* Forwards */
366
+ wd.back ? IterationDirection.Backwards : IterationDirection.Forwards
363
367
  )) {
364
368
  if (this.traverseAlgNode(
365
369
  algNode,
@@ -566,6 +570,9 @@ var chunkAlgs = functionFromTraversal(ChunkAlgs);
566
570
 
567
571
  // src/cubing/twisty/controllers/indexer/tree/TreeAlgIndexer.ts
568
572
  var TreeAlgIndexer = class {
573
+ decoration;
574
+ walker;
575
+ kpuzzle;
569
576
  constructor(kpuzzle, alg) {
570
577
  this.kpuzzle = kpuzzle;
571
578
  const deccon = new DecoratorConstructor(this.kpuzzle);
@@ -573,9 +580,6 @@ var TreeAlgIndexer = class {
573
580
  this.decoration = deccon.traverseAlg(chunkedAlg);
574
581
  this.walker = new AlgWalker(this.kpuzzle, chunkedAlg, this.decoration);
575
582
  }
576
- kpuzzle;
577
- decoration;
578
- walker;
579
583
  getAnimLeaf(index) {
580
584
  if (this.walker.moveByIndex(index)) {
581
585
  if (!this.walker.move) {
@@ -668,6 +672,14 @@ var colorMaps = {
668
672
  invisible: "#00000000"
669
673
  };
670
674
  var TwistyAnimatedSVG = class {
675
+ wrapperElement;
676
+ svgElement;
677
+ gradientDefs;
678
+ originalColors = {};
679
+ gradients = {};
680
+ svgID;
681
+ kpuzzle;
682
+ showUnknownOrientations = false;
671
683
  constructor(kpuzzle, svgSource, experimentalStickeringMask, showUnknownOrientations = false) {
672
684
  this.kpuzzle = kpuzzle;
673
685
  this.showUnknownOrientations = showUnknownOrientations;
@@ -746,14 +758,6 @@ var TwistyAnimatedSVG = class {
746
758
  this.drawPattern(this.kpuzzle.defaultPattern());
747
759
  }
748
760
  }
749
- kpuzzle;
750
- showUnknownOrientations;
751
- wrapperElement;
752
- svgElement;
753
- gradientDefs;
754
- originalColors = {};
755
- gradients = {};
756
- svgID;
757
761
  drawPattern(pattern, nextPattern, fraction) {
758
762
  this.draw(pattern, nextPattern, fraction);
759
763
  }
@@ -875,16 +879,16 @@ var TwistyAnimatedSVG = class {
875
879
 
876
880
  // src/cubing/twisty/views/ClassListManager.ts
877
881
  var ClassListManager = class {
882
+ #currentClassName = null;
883
+ elem;
884
+ prefix;
885
+ validSuffixes;
878
886
  // The prefix should ideally end in a dash.
879
887
  constructor(elem, prefix, validSuffixes) {
880
888
  this.elem = elem;
881
889
  this.prefix = prefix;
882
890
  this.validSuffixes = validSuffixes;
883
891
  }
884
- elem;
885
- prefix;
886
- validSuffixes;
887
- #currentClassName = null;
888
892
  // Does nothing if there was no value.
889
893
  clearValue() {
890
894
  if (this.#currentClassName) {
@@ -942,23 +946,32 @@ function modIntoRange(v, rangeMin, rangeMax) {
942
946
  }
943
947
 
944
948
  // src/cubing/twisty/controllers/AnimationTypes.ts
949
+ var Direction = {
950
+ Forwards: 1,
951
+ Paused: 0,
952
+ Backwards: -1
953
+ };
945
954
  function directionScalar(direction) {
946
955
  return direction;
947
956
  }
957
+ var BoundaryType = {
958
+ Move: "move",
959
+ EntireTimeline: "entire-timeline"
960
+ };
948
961
 
949
962
  // src/cubing/twisty/controllers/TwistyAnimationController.ts
950
963
  var CatchUpHelper = class {
964
+ catchingUp = false;
965
+ pendingFrame = false;
966
+ tempoScale = 1;
951
967
  // TODO
968
+ model;
952
969
  constructor(model) {
953
970
  this.model = model;
954
971
  model.tempoScale.addFreshListener((tempoScale) => {
955
972
  this.tempoScale = tempoScale;
956
973
  });
957
974
  }
958
- model;
959
- catchingUp = false;
960
- pendingFrame = false;
961
- tempoScale = 1;
962
975
  scheduler = new RenderScheduler(
963
976
  this.animFrame.bind(this)
964
977
  );
@@ -1006,18 +1019,9 @@ var CatchUpHelper = class {
1006
1019
  }
1007
1020
  };
1008
1021
  var TwistyAnimationController = class {
1009
- constructor(model, delegate) {
1010
- this.delegate = delegate;
1011
- this.model = model;
1012
- this.lastTimestampPromise = this.#effectiveTimestampMilliseconds();
1013
- this.model.playingInfo.addFreshListener(this.onPlayingProp.bind(this));
1014
- this.catchUpHelper = new CatchUpHelper(this.model);
1015
- this.model.catchUpMove.addFreshListener(this.onCatchUpMoveProp.bind(this));
1016
- }
1017
- delegate;
1018
1022
  // TODO: #private?
1019
1023
  playing = false;
1020
- direction = 1 /* Forwards */;
1024
+ direction = Direction.Forwards;
1021
1025
  catchUpHelper;
1022
1026
  model;
1023
1027
  lastDatestamp = 0;
@@ -1025,6 +1029,15 @@ var TwistyAnimationController = class {
1025
1029
  scheduler = new RenderScheduler(
1026
1030
  this.animFrame.bind(this)
1027
1031
  );
1032
+ delegate;
1033
+ constructor(model, delegate) {
1034
+ this.delegate = delegate;
1035
+ this.model = model;
1036
+ this.lastTimestampPromise = this.#effectiveTimestampMilliseconds();
1037
+ this.model.playingInfo.addFreshListener(this.onPlayingProp.bind(this));
1038
+ this.catchUpHelper = new CatchUpHelper(this.model);
1039
+ this.model.catchUpMove.addFreshListener(this.onCatchUpMoveProp.bind(this));
1040
+ }
1028
1041
  // TODO: Do we need this?
1029
1042
  async onPlayingProp(playingInfo) {
1030
1043
  if (playingInfo.playing !== this.playing) {
@@ -1069,14 +1082,14 @@ var TwistyAnimationController = class {
1069
1082
  // TODO: bundle playing direction, and boundary into `toggle`.
1070
1083
  play(options) {
1071
1084
  void (async () => {
1072
- const direction = options?.direction ?? 1 /* Forwards */;
1085
+ const direction = options?.direction ?? Direction.Forwards;
1073
1086
  const coarseTimelineInfo = await this.model.coarseTimelineInfo.get();
1074
1087
  if (options?.autoSkipToOtherEndIfStartingAtBoundary ?? true) {
1075
- if (direction === 1 /* Forwards */ && coarseTimelineInfo.atEnd) {
1088
+ if (direction === Direction.Forwards && coarseTimelineInfo.atEnd) {
1076
1089
  this.model.timestampRequest.set("start");
1077
1090
  this.delegate.flash();
1078
1091
  }
1079
- if (direction === -1 /* Backwards */ && coarseTimelineInfo.atStart) {
1092
+ if (direction === Direction.Backwards && coarseTimelineInfo.atStart) {
1080
1093
  this.model.timestampRequest.set("end");
1081
1094
  this.delegate.flash();
1082
1095
  }
@@ -1084,7 +1097,7 @@ var TwistyAnimationController = class {
1084
1097
  this.model.playingInfo.set({
1085
1098
  playing: true,
1086
1099
  direction,
1087
- untilBoundary: options?.untilBoundary ?? "entire-timeline" /* EntireTimeline */,
1100
+ untilBoundary: options?.untilBoundary ?? BoundaryType.EntireTimeline,
1088
1101
  loop: options?.loop ?? false
1089
1102
  });
1090
1103
  this.playing = true;
@@ -1098,7 +1111,7 @@ var TwistyAnimationController = class {
1098
1111
  this.scheduler.cancelAnimFrame();
1099
1112
  this.model.playingInfo.set({
1100
1113
  playing: false,
1101
- untilBoundary: "entire-timeline" /* EntireTimeline */
1114
+ untilBoundary: BoundaryType.EntireTimeline
1102
1115
  });
1103
1116
  }
1104
1117
  #animFrameEffectiveTimestampStaleDropper = new StaleDropper();
@@ -1122,11 +1135,11 @@ var TwistyAnimationController = class {
1122
1135
  return;
1123
1136
  }
1124
1137
  let end = currentMoveInfo.earliestEnd;
1125
- if (currentMoveInfo.currentMoves.length === 0 || playingInfo.untilBoundary === "entire-timeline" /* EntireTimeline */) {
1138
+ if (currentMoveInfo.currentMoves.length === 0 || playingInfo.untilBoundary === BoundaryType.EntireTimeline) {
1126
1139
  end = timeRange.end;
1127
1140
  }
1128
1141
  let start = currentMoveInfo.latestStart;
1129
- if (currentMoveInfo.currentMoves.length === 0 || playingInfo.untilBoundary === "entire-timeline" /* EntireTimeline */) {
1142
+ if (currentMoveInfo.currentMoves.length === 0 || playingInfo.untilBoundary === BoundaryType.EntireTimeline) {
1130
1143
  start = timeRange.start;
1131
1144
  }
1132
1145
  let delta = (frameDatestamp - lastDatestamp) * directionScalar(this.direction) * tempoScale;
@@ -1181,12 +1194,12 @@ var TwistyAnimationController = class {
1181
1194
 
1182
1195
  // src/cubing/twisty/controllers/TwistyPlayerController.ts
1183
1196
  var TwistyPlayerController = class {
1197
+ animationController;
1198
+ model;
1184
1199
  constructor(model, delegate) {
1185
1200
  this.model = model;
1186
1201
  this.animationController = new TwistyAnimationController(model, delegate);
1187
1202
  }
1188
- model;
1189
- animationController;
1190
1203
  jumpToStart(options) {
1191
1204
  this.animationController.jumpToStart(options);
1192
1205
  }
@@ -1306,14 +1319,21 @@ svg {
1306
1319
 
1307
1320
  // src/cubing/twisty/views/2D/Twisty2DPuzzle.ts
1308
1321
  var Twisty2DPuzzle = class extends ManagedCustomElement {
1322
+ svgWrapper;
1323
+ scheduler = new RenderScheduler(this.render.bind(this));
1324
+ #cachedPosition = null;
1309
1325
  // TODO: pull when needed.
1326
+ model;
1327
+ kpuzzle;
1328
+ svgSource;
1329
+ options;
1330
+ puzzleLoader;
1310
1331
  constructor(model, kpuzzle, svgSource, options, puzzleLoader) {
1311
1332
  super();
1312
1333
  this.model = model;
1313
1334
  this.kpuzzle = kpuzzle;
1314
1335
  this.svgSource = svgSource;
1315
1336
  this.options = options;
1316
- this.puzzleLoader = puzzleLoader;
1317
1337
  this.addCSS(twisty2DSVGCSS);
1318
1338
  this.resetSVG();
1319
1339
  this.#freshListenerManager.addListener(
@@ -1340,14 +1360,6 @@ var Twisty2DPuzzle = class extends ManagedCustomElement {
1340
1360
  );
1341
1361
  }
1342
1362
  }
1343
- model;
1344
- kpuzzle;
1345
- svgSource;
1346
- options;
1347
- puzzleLoader;
1348
- svgWrapper;
1349
- scheduler = new RenderScheduler(this.render.bind(this));
1350
- #cachedPosition = null;
1351
1363
  #freshListenerManager = new FreshListenerManager();
1352
1364
  disconnect() {
1353
1365
  this.#freshListenerManager.disconnect();
@@ -1357,7 +1369,7 @@ var Twisty2DPuzzle = class extends ManagedCustomElement {
1357
1369
  if (position.movesInProgress.length > 0) {
1358
1370
  const move = position.movesInProgress[0].move;
1359
1371
  let partialMove = move;
1360
- if (position.movesInProgress[0].direction === -1 /* Backwards */) {
1372
+ if (position.movesInProgress[0].direction === Direction.Backwards) {
1361
1373
  partialMove = move.invert();
1362
1374
  }
1363
1375
  const newPattern = position.pattern.applyMove(partialMove);
@@ -1420,6 +1432,10 @@ customElementsShim.define("twisty-2d-puzzle", Twisty2DPuzzle);
1420
1432
 
1421
1433
  // src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts
1422
1434
  var Twisty2DPuzzleWrapper = class {
1435
+ model;
1436
+ schedulable;
1437
+ puzzleLoader;
1438
+ effectiveVisualization;
1423
1439
  constructor(model, schedulable, puzzleLoader, effectiveVisualization) {
1424
1440
  this.model = model;
1425
1441
  this.schedulable = schedulable;
@@ -1435,10 +1451,6 @@ var Twisty2DPuzzleWrapper = class {
1435
1451
  }
1436
1452
  );
1437
1453
  }
1438
- model;
1439
- schedulable;
1440
- puzzleLoader;
1441
- effectiveVisualization;
1442
1454
  #freshListenerManager = new FreshListenerManager();
1443
1455
  disconnect() {
1444
1456
  this.#freshListenerManager.disconnect();
@@ -1464,17 +1476,17 @@ var Twisty2DPuzzleWrapper = class {
1464
1476
 
1465
1477
  // src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts
1466
1478
  var Twisty2DSceneWrapper = class extends ManagedCustomElement {
1479
+ #freshListenerManager = new FreshListenerManager();
1480
+ disconnect() {
1481
+ this.#freshListenerManager.disconnect();
1482
+ }
1483
+ model;
1484
+ effectiveVisualization;
1467
1485
  constructor(model, effectiveVisualization) {
1468
1486
  super();
1469
1487
  this.model = model;
1470
1488
  this.effectiveVisualization = effectiveVisualization;
1471
1489
  }
1472
- model;
1473
- effectiveVisualization;
1474
- #freshListenerManager = new FreshListenerManager();
1475
- disconnect() {
1476
- this.#freshListenerManager.disconnect();
1477
- }
1478
1490
  async connectedCallback() {
1479
1491
  this.addCSS(twistyViewerWrapperCSS);
1480
1492
  if (this.model) {
@@ -1538,6 +1550,10 @@ var InitialValueTracker = class {
1538
1550
 
1539
1551
  // src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts
1540
1552
  var Twisty3DPuzzleWrapper = class extends EventTarget {
1553
+ model;
1554
+ schedulable;
1555
+ puzzleLoader;
1556
+ visualizationStrategy;
1541
1557
  constructor(model, schedulable, puzzleLoader, visualizationStrategy) {
1542
1558
  super();
1543
1559
  this.model = model;
@@ -1626,10 +1642,6 @@ var Twisty3DPuzzleWrapper = class extends EventTarget {
1626
1642
  }
1627
1643
  );
1628
1644
  }
1629
- model;
1630
- schedulable;
1631
- puzzleLoader;
1632
- visualizationStrategy;
1633
1645
  #freshListenerManager = new FreshListenerManager();
1634
1646
  disconnect() {
1635
1647
  this.#freshListenerManager.disconnect();
@@ -1724,11 +1736,6 @@ var Twisty3DPuzzleWrapper = class extends EventTarget {
1724
1736
 
1725
1737
  // src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts
1726
1738
  var Twisty3DSceneWrapper = class extends ManagedCustomElement {
1727
- constructor(model) {
1728
- super();
1729
- this.model = model;
1730
- }
1731
- model;
1732
1739
  // @ts-expect-error TypeScript type inference appears to be borked: ts(2322)
1733
1740
  #backViewClassListManager = new ClassListManager(this, "back-view-", [
1734
1741
  "auto",
@@ -1740,6 +1747,11 @@ var Twisty3DSceneWrapper = class extends ManagedCustomElement {
1740
1747
  disconnect() {
1741
1748
  this.#freshListenerManager.disconnect();
1742
1749
  }
1750
+ model;
1751
+ constructor(model) {
1752
+ super();
1753
+ this.model = model;
1754
+ }
1743
1755
  async connectedCallback() {
1744
1756
  this.addCSS(twistyViewerWrapperCSS);
1745
1757
  const vantage = new Twisty3DVantage(this.model, this);
@@ -2105,6 +2117,10 @@ var buttonCommands = {
2105
2117
  "twizzle-link": true
2106
2118
  };
2107
2119
  var TwistyButtons = class extends ManagedCustomElement {
2120
+ buttons = null;
2121
+ model;
2122
+ controller;
2123
+ defaultFullscreenElement;
2108
2124
  // TODO: Privacy
2109
2125
  constructor(model, controller, defaultFullscreenElement) {
2110
2126
  super();
@@ -2112,10 +2128,6 @@ var TwistyButtons = class extends ManagedCustomElement {
2112
2128
  this.controller = controller;
2113
2129
  this.defaultFullscreenElement = defaultFullscreenElement;
2114
2130
  }
2115
- model;
2116
- controller;
2117
- defaultFullscreenElement;
2118
- buttons = null;
2119
2131
  connectedCallback() {
2120
2132
  this.addCSS(buttonGridCSS);
2121
2133
  const buttons = {};
@@ -2146,8 +2158,8 @@ var TwistyButtons = class extends ManagedCustomElement {
2146
2158
  }
2147
2159
  case "play-step-backwards": {
2148
2160
  this.controller?.animationController.play({
2149
- direction: -1 /* Backwards */,
2150
- untilBoundary: "move" /* Move */
2161
+ direction: Direction.Backwards,
2162
+ untilBoundary: BoundaryType.Move
2151
2163
  });
2152
2164
  break;
2153
2165
  }
@@ -2157,8 +2169,8 @@ var TwistyButtons = class extends ManagedCustomElement {
2157
2169
  }
2158
2170
  case "play-step": {
2159
2171
  this.controller?.animationController.play({
2160
- direction: 1 /* Forwards */,
2161
- untilBoundary: "move" /* Move */
2172
+ direction: Direction.Forwards,
2173
+ untilBoundary: BoundaryType.Move
2162
2174
  });
2163
2175
  break;
2164
2176
  }
@@ -2304,13 +2316,13 @@ var lastPreval = 0;
2304
2316
  var scaling = false;
2305
2317
  var currentClickNum = 0;
2306
2318
  var TwistyScrubber = class extends ManagedCustomElement {
2319
+ model;
2320
+ controller;
2307
2321
  constructor(model, controller) {
2308
2322
  super();
2309
2323
  this.model = model;
2310
2324
  this.controller = controller;
2311
2325
  }
2312
- model;
2313
- controller;
2314
2326
  async onDetailedTimelineInfo(detailedTimelineInfo) {
2315
2327
  const inputElem = await this.inputElem();
2316
2328
  inputElem.min = detailedTimelineInfo.timeRange.start.toString();
@@ -2358,8 +2370,8 @@ var TwistyScrubber = class extends ManagedCustomElement {
2358
2370
  // fallthrough
2359
2371
  case "ArrowRight": {
2360
2372
  this.controller?.animationController.play({
2361
- direction: e.key === "ArrowLeft" ? -1 /* Backwards */ : 1 /* Forwards */,
2362
- untilBoundary: "move" /* Move */
2373
+ direction: e.key === "ArrowLeft" ? Direction.Backwards : Direction.Forwards,
2374
+ untilBoundary: BoundaryType.Move
2363
2375
  });
2364
2376
  e.preventDefault();
2365
2377
  break;
@@ -2729,7 +2741,7 @@ var CurrentMoveInfoProp = class extends TwistyPropDerived {
2729
2741
  if (inputs.detailedTimelineInfo.atEnd && inputs.catchUpMove.move !== null) {
2730
2742
  currentMoveInfo.currentMoves.push({
2731
2743
  move: inputs.catchUpMove.move,
2732
- direction: -1 /* Backwards */,
2744
+ direction: Direction.Backwards,
2733
2745
  fraction: 1 - inputs.catchUpMove.amount,
2734
2746
  startTimestamp: -1,
2735
2747
  // TODO
@@ -2767,7 +2779,7 @@ var CurrentMoveInfoProp = class extends TwistyPropDerived {
2767
2779
  const end = start + duration;
2768
2780
  const currentMove = {
2769
2781
  move,
2770
- direction: 1 /* Forwards */,
2782
+ direction: Direction.Forwards,
2771
2783
  fraction,
2772
2784
  startTimestamp: start,
2773
2785
  endTimestamp: end
@@ -2957,13 +2969,13 @@ function simulMoves(a) {
2957
2969
 
2958
2970
  // src/cubing/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts
2959
2971
  var SimultaneousMoveIndexer = class {
2972
+ animLeaves;
2960
2973
  // TODO: Allow custom `durationFn`.
2974
+ kpuzzle;
2961
2975
  constructor(kpuzzle, alg, options) {
2962
2976
  this.kpuzzle = kpuzzle;
2963
2977
  this.animLeaves = options?.animationTimelineLeaves ?? simulMoves(alg);
2964
2978
  }
2965
- kpuzzle;
2966
- animLeaves;
2967
2979
  getAnimLeaf(index) {
2968
2980
  return this.animLeaves[Math.min(index, this.animLeaves.length - 1)]?.animLeaf ?? null;
2969
2981
  }
@@ -3045,7 +3057,7 @@ var SimultaneousMoveIndexer = class {
3045
3057
  }
3046
3058
  const currentMove = {
3047
3059
  move,
3048
- direction: 1 /* Forwards */,
3060
+ direction: Direction.Forwards,
3049
3061
  fraction,
3050
3062
  startTimestamp: leafWithRange.start,
3051
3063
  endTimestamp: leafWithRange.end
@@ -3319,9 +3331,9 @@ var DetailedTimelineInfoProp = class extends TwistyPropDerived {
3319
3331
  var PlayingInfoProp = class extends TwistyPropSource {
3320
3332
  async getDefaultValue() {
3321
3333
  return {
3322
- direction: 1 /* Forwards */,
3334
+ direction: Direction.Forwards,
3323
3335
  playing: false,
3324
- untilBoundary: "entire-timeline" /* EntireTimeline */,
3336
+ untilBoundary: BoundaryType.EntireTimeline,
3325
3337
  loop: false
3326
3338
  };
3327
3339
  }
@@ -3537,22 +3549,22 @@ var StickeringMaskProp = class extends TwistyPropDerived {
3537
3549
 
3538
3550
  // src/cubing/twisty/model/props/puzzle/display/parseSerializedStickeringMask.ts
3539
3551
  var charMap = {
3540
- "-": "Regular" /* Regular */,
3541
- D: "Dim" /* Dim */,
3542
- I: "Ignored" /* Ignored */,
3552
+ "-": PieceStickering.Regular,
3553
+ D: PieceStickering.Dim,
3554
+ I: PieceStickering.Ignored,
3543
3555
  // o: ExperimentalPieceStickering.OrientationStickers, // TODO: hack for centers
3544
- X: "Invisible" /* Invisible */,
3545
- O: "IgnoreNonPrimary" /* IgnoreNonPrimary */,
3556
+ X: PieceStickering.Invisible,
3557
+ O: PieceStickering.IgnoreNonPrimary,
3546
3558
  // orient color known
3547
- P: "PermuteNonPrimary" /* PermuteNonPrimary */,
3559
+ P: PieceStickering.PermuteNonPrimary,
3548
3560
  // Example: PLL
3549
- o: "Ignoriented" /* Ignoriented */,
3561
+ o: PieceStickering.Ignoriented,
3550
3562
  // Example: LL edges during CLS
3551
- "?": "OrientationWithoutPermutation" /* OrientationWithoutPermutation */,
3563
+ "?": PieceStickering.OrientationWithoutPermutation,
3552
3564
  // ACube: ignore position
3553
- M: "Mystery" /* Mystery */,
3565
+ M: PieceStickering.Mystery,
3554
3566
  // This piece needs highlighting, but we know nothing about it.
3555
- "@": "Regular" /* Regular */
3567
+ "@": PieceStickering.Regular
3556
3568
  // ACube: ignore orientation // TODO: distinguish from "regular"
3557
3569
  };
3558
3570
  function parseSerializedStickeringMask(serializedStickeringMask) {
@@ -3766,21 +3778,6 @@ function defaultCameraOrbitCoordinates(puzzleID, strategy) {
3766
3778
 
3767
3779
  // src/cubing/twisty/model/TwistySceneModel.ts
3768
3780
  var TwistySceneModel = class {
3769
- constructor(twistyPlayerModel) {
3770
- this.twistyPlayerModel = twistyPlayerModel;
3771
- this.orbitCoordinates = new OrbitCoordinatesProp({
3772
- orbitCoordinatesRequest: this.orbitCoordinatesRequest,
3773
- latitudeLimit: this.latitudeLimit,
3774
- puzzleID: twistyPlayerModel.puzzleID,
3775
- strategy: twistyPlayerModel.visualizationStrategy
3776
- });
3777
- this.stickeringMask = new StickeringMaskProp({
3778
- stickeringMaskRequest: this.stickeringMaskRequest,
3779
- stickeringRequest: this.stickeringRequest,
3780
- puzzleLoader: twistyPlayerModel.puzzleLoader
3781
- });
3782
- }
3783
- twistyPlayerModel;
3784
3781
  // Depth 0
3785
3782
  background = new BackgroundProp();
3786
3783
  colorSchemeRequest = new ColorSchemeRequestProp();
@@ -3813,6 +3810,21 @@ var TwistySceneModel = class {
3813
3810
  // Dependence on TwistyPlayerModel
3814
3811
  orbitCoordinates;
3815
3812
  stickeringMask;
3813
+ twistyPlayerModel;
3814
+ constructor(twistyPlayerModel) {
3815
+ this.twistyPlayerModel = twistyPlayerModel;
3816
+ this.orbitCoordinates = new OrbitCoordinatesProp({
3817
+ orbitCoordinatesRequest: this.orbitCoordinatesRequest,
3818
+ latitudeLimit: this.latitudeLimit,
3819
+ puzzleID: twistyPlayerModel.puzzleID,
3820
+ strategy: twistyPlayerModel.visualizationStrategy
3821
+ });
3822
+ this.stickeringMask = new StickeringMaskProp({
3823
+ stickeringMaskRequest: this.stickeringMaskRequest,
3824
+ stickeringRequest: this.stickeringRequest,
3825
+ puzzleLoader: twistyPlayerModel.puzzleLoader
3826
+ });
3827
+ }
3816
3828
  };
3817
3829
 
3818
3830
  // src/cubing/twisty/model/UserVisibleErrorTracker.ts
@@ -4317,10 +4329,10 @@ var TwistyPlayerSettable = class extends ManagedCustomElement {
4317
4329
  experimentalGet = new ExperimentalGetters(this.experimentalModel);
4318
4330
  };
4319
4331
  var ExperimentalGetters = class {
4332
+ model;
4320
4333
  constructor(model) {
4321
4334
  this.model = model;
4322
4335
  }
4323
- model;
4324
4336
  async alg() {
4325
4337
  return (await this.model.alg.get()).alg;
4326
4338
  }
@@ -5308,8 +5320,7 @@ twistyAlgViewerCSS.replaceSync(
5308
5320
  `
5309
5321
  :host {
5310
5322
  display: inline;
5311
- --comment-shade: oklab(0.69 -0.19 0.14);
5312
- --comment-opacity: 0.6;
5323
+ --comment-opacity: 0.4;
5313
5324
  --active-background-shade: rgba(66, 133, 244);
5314
5325
  }
5315
5326
 
@@ -5341,7 +5352,6 @@ a {
5341
5352
  }
5342
5353
 
5343
5354
  twisty-alg-leaf-elem.twisty-alg-line-comment {
5344
- color: color-mix(in oklab, var(--comment-shade) 75%, currentColor);
5345
5355
  opacity: var(--comment-opacity);
5346
5356
  }
5347
5357
 
@@ -5359,6 +5369,7 @@ twisty-alg-leaf-elem.twisty-alg-line-comment {
5359
5369
  // src/cubing/twisty/views/TwistyAlgViewer.ts
5360
5370
  var DEFAULT_OFFSET_FRACTION = 0.25;
5361
5371
  var TwistyAlgLeafElem = class extends HTMLElementShim {
5372
+ algOrAlgNode;
5362
5373
  constructor(className, text, dataDown, algOrAlgNode, offsetIntoMove, clickable) {
5363
5374
  super();
5364
5375
  this.algOrAlgNode = algOrAlgNode;
@@ -5378,7 +5389,6 @@ var TwistyAlgLeafElem = class extends HTMLElementShim {
5378
5389
  this.appendChild(document.createElement("span")).textContent = text;
5379
5390
  }
5380
5391
  }
5381
- algOrAlgNode;
5382
5392
  pathToIndex(_index) {
5383
5393
  return [];
5384
5394
  }
@@ -5388,13 +5398,13 @@ var TwistyAlgLeafElem = class extends HTMLElementShim {
5388
5398
  };
5389
5399
  customElementsShim.define("twisty-alg-leaf-elem", TwistyAlgLeafElem);
5390
5400
  var TwistyAlgWrapperElem = class extends HTMLElementShim {
5401
+ queue = [];
5402
+ algOrAlgNode;
5391
5403
  constructor(className, algOrAlgNode) {
5392
5404
  super();
5393
5405
  this.algOrAlgNode = algOrAlgNode;
5394
5406
  this.classList.add(className);
5395
5407
  }
5396
- algOrAlgNode;
5397
- queue = [];
5398
5408
  addString(str) {
5399
5409
  const span = document.createElement("span");
5400
5410
  span.textContent = str;
@@ -5404,7 +5414,7 @@ var TwistyAlgWrapperElem = class extends HTMLElementShim {
5404
5414
  this.queue.push(dataUp.element);
5405
5415
  return dataUp.moveCount;
5406
5416
  }
5407
- flushQueue(direction = 1 /* Forwards */) {
5417
+ flushQueue(direction = IterationDirection.Forwards) {
5408
5418
  for (const node of maybeReverseList(this.queue, direction)) {
5409
5419
  this.append(node);
5410
5420
  }
@@ -5416,13 +5426,13 @@ var TwistyAlgWrapperElem = class extends HTMLElementShim {
5416
5426
  };
5417
5427
  customElementsShim.define("twisty-alg-wrapper-elem", TwistyAlgWrapperElem);
5418
5428
  function oppositeDirection(direction) {
5419
- return direction === 1 /* Forwards */ ? -1 /* Backwards */ : 1 /* Forwards */;
5429
+ return direction === IterationDirection.Forwards ? IterationDirection.Backwards : IterationDirection.Forwards;
5420
5430
  }
5421
5431
  function updateDirectionByAmount(currentDirection, amount) {
5422
5432
  return amount < 0 ? oppositeDirection(currentDirection) : currentDirection;
5423
5433
  }
5424
5434
  function maybeReverseList(l, direction) {
5425
- if (direction === 1 /* Forwards */) {
5435
+ if (direction === IterationDirection.Forwards) {
5426
5436
  return l;
5427
5437
  }
5428
5438
  const copy = Array.from(l);
@@ -5672,7 +5682,7 @@ var TwistyAlgViewer = class extends ManagedCustomElement {
5672
5682
  this.#domTree = algToDOMTree(alg, {
5673
5683
  earliestMoveIndex: 0,
5674
5684
  twistyAlgViewer: this,
5675
- direction: 1 /* Forwards */
5685
+ direction: IterationDirection.Forwards
5676
5686
  }).element;
5677
5687
  this.#domTreeAlg = alg;
5678
5688
  this.contentWrapper.textContent = "";
@@ -5957,40 +5967,40 @@ function getConfigFromURL(prefix = "", url = location.href) {
5957
5967
  var OUTER_BLOCK_MOVES_EXPLANATION = "outer block moves (e.g. R, Rw, or 4r)";
5958
5968
  var INNER_BLOCK_MOVES_EXPLANATION = "inner block moves (e.g. M or 2-5r)";
5959
5969
  var METRIC_EXPLANATIONS = {
5960
- ["OBTM" /* OuterBlockTurnMetric */]: `HTM = OBTM ("Outer Block Turn Metric"):
5970
+ [CommonMetric.OuterBlockTurnMetric]: `HTM = OBTM ("Outer Block Turn Metric"):
5961
5971
  \u2022 ${INNER_BLOCK_MOVES_EXPLANATION} count as 2 turns
5962
5972
  \u2022 ${OUTER_BLOCK_MOVES_EXPLANATION} count as 1 turn
5963
5973
  \u2022 rotations (e.g. x) count as 0 turns`,
5964
- ["OBQTM" /* OuterBlockQuantumTurnMetric */]: `QTM = OBQTM ("Outer Block Quantum Turn Metric"):
5974
+ [CommonMetric.OuterBlockQuantumTurnMetric]: `QTM = OBQTM ("Outer Block Quantum Turn Metric"):
5965
5975
  \u2022 ${INNER_BLOCK_MOVES_EXPLANATION} count as 2 turns per quantum (e.g. M2 counts as 4)
5966
5976
  \u2022 ${OUTER_BLOCK_MOVES_EXPLANATION} count as 1 turn per quantum (e.g. R2 counts as 2)
5967
5977
  \u2022 rotations (e.g. x) count as 0 turns`,
5968
- ["RBTM" /* RangeBlockTurnMetric */]: `STM = RBTM ("Range Block Turn Metric"):
5978
+ [CommonMetric.RangeBlockTurnMetric]: `STM = RBTM ("Range Block Turn Metric"):
5969
5979
  \u2022 ${INNER_BLOCK_MOVES_EXPLANATION} count as 1 turn
5970
5980
  \u2022 ${OUTER_BLOCK_MOVES_EXPLANATION} count as 1 turn
5971
5981
  \u2022 rotations (e.g. x) count as 0 turns`,
5972
- ["RBQTM" /* RangeBlockQuantumTurnMetric */]: `SQTM = RBQTM ("Range Block Quantum Turn Metric"):
5982
+ [CommonMetric.RangeBlockQuantumTurnMetric]: `SQTM = RBQTM ("Range Block Quantum Turn Metric"):
5973
5983
  \u2022 ${INNER_BLOCK_MOVES_EXPLANATION} count as 1 turn per quantum (e.g. M2 counts as 2)
5974
5984
  \u2022 ${OUTER_BLOCK_MOVES_EXPLANATION} count as 1 turn per quantum (e.g. R2 counts as 2)
5975
5985
  \u2022 rotations (e.g. x) count as 0 turns`,
5976
- ["ETM" /* ExecutionTurnMetric */]: `ETM ("Execution Turn Metric"):
5986
+ [CommonMetric.ExecutionTurnMetric]: `ETM ("Execution Turn Metric"):
5977
5987
  \u2022 all moves (including rotations) count as 1 turn`
5978
5988
  };
5979
5989
  var CONSISTENT_METRIC_ABBREVIATIONS = {
5980
- ["OBTM" /* OuterBlockTurnMetric */]: "OB",
5981
- ["OBQTM" /* OuterBlockQuantumTurnMetric */]: "OBQ",
5982
- ["RBTM" /* RangeBlockTurnMetric */]: "RB",
5983
- ["RBQTM" /* RangeBlockQuantumTurnMetric */]: "RBQ",
5984
- ["ETM" /* ExecutionTurnMetric */]: "E"
5990
+ [CommonMetric.OuterBlockTurnMetric]: "OB",
5991
+ [CommonMetric.OuterBlockQuantumTurnMetric]: "OBQ",
5992
+ [CommonMetric.RangeBlockTurnMetric]: "RB",
5993
+ [CommonMetric.RangeBlockQuantumTurnMetric]: "RBQ",
5994
+ [CommonMetric.ExecutionTurnMetric]: "E"
5985
5995
  };
5986
5996
  var TwizzleLink = class extends ManagedCustomElement {
5997
+ twistyPlayer = null;
5998
+ a = null;
5999
+ options;
5987
6000
  constructor(options) {
5988
6001
  super({ mode: "open" });
5989
6002
  this.options = options;
5990
6003
  }
5991
- options;
5992
- twistyPlayer = null;
5993
- a = null;
5994
6004
  #fallback() {
5995
6005
  this.contentWrapper.textContent = "";
5996
6006
  if (this.a) {
@@ -6161,14 +6171,14 @@ function constructMoveCountDisplay(model, elem = document.createElement("span"))
6161
6171
  }
6162
6172
  elem.textContent = "(";
6163
6173
  if (puzzleLoader.id === "3x3x3") {
6164
- addMetric("OBTM" /* OuterBlockTurnMetric */);
6165
- addMetric("OBQTM" /* OuterBlockQuantumTurnMetric */);
6166
- addMetric("RBTM" /* RangeBlockTurnMetric */);
6174
+ addMetric(CommonMetric.OuterBlockTurnMetric);
6175
+ addMetric(CommonMetric.OuterBlockQuantumTurnMetric);
6176
+ addMetric(CommonMetric.RangeBlockTurnMetric);
6167
6177
  } else if (puzzleLoader.pg) {
6168
- addMetric("RBTM" /* RangeBlockTurnMetric */);
6169
- addMetric("RBQTM" /* RangeBlockQuantumTurnMetric */);
6178
+ addMetric(CommonMetric.RangeBlockTurnMetric);
6179
+ addMetric(CommonMetric.RangeBlockQuantumTurnMetric);
6170
6180
  }
6171
- addMetric("ETM" /* ExecutionTurnMetric */);
6181
+ addMetric(CommonMetric.ExecutionTurnMetric);
6172
6182
  elem.append(")");
6173
6183
  }
6174
6184
  model.puzzleAlg.addFreshListener(update);