@rednaxela101/cubing 0.63.5

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 (136) hide show
  1. package/README.md +120 -0
  2. package/alg/index.d.ts +1 -0
  3. package/bluetooth/index.d.ts +1 -0
  4. package/dist/bin/chunks/chunk-22VWCGBC.js +13 -0
  5. package/dist/bin/chunks/chunk-22VWCGBC.js.map +7 -0
  6. package/dist/bin/order.js +59 -0
  7. package/dist/bin/order.js.map +7 -0
  8. package/dist/bin/puzzle-geometry-bin.js +407 -0
  9. package/dist/bin/puzzle-geometry-bin.js.map +7 -0
  10. package/dist/bin/scramble.js +188 -0
  11. package/dist/bin/scramble.js.map +7 -0
  12. package/dist/bin/svg.js +56 -0
  13. package/dist/bin/svg.js.map +7 -0
  14. package/dist/lib/cubing/alg/index.d.ts +2 -0
  15. package/dist/lib/cubing/alg/index.js +43 -0
  16. package/dist/lib/cubing/alg/index.js.map +7 -0
  17. package/dist/lib/cubing/bluetooth/index.d.ts +189 -0
  18. package/dist/lib/cubing/bluetooth/index.js +2271 -0
  19. package/dist/lib/cubing/bluetooth/index.js.map +7 -0
  20. package/dist/lib/cubing/chunks/big-puzzle-orientation-BA6QHO5C.js +68 -0
  21. package/dist/lib/cubing/chunks/big-puzzle-orientation-BA6QHO5C.js.map +7 -0
  22. package/dist/lib/cubing/chunks/chunk-2VJB4TMH.js +1774 -0
  23. package/dist/lib/cubing/chunks/chunk-2VJB4TMH.js.map +7 -0
  24. package/dist/lib/cubing/chunks/chunk-52ZXJEUO.js +665 -0
  25. package/dist/lib/cubing/chunks/chunk-52ZXJEUO.js.map +7 -0
  26. package/dist/lib/cubing/chunks/chunk-56VZAEPF.js +274 -0
  27. package/dist/lib/cubing/chunks/chunk-56VZAEPF.js.map +7 -0
  28. package/dist/lib/cubing/chunks/chunk-7GUL3OBQ.js +9 -0
  29. package/dist/lib/cubing/chunks/chunk-7GUL3OBQ.js.map +7 -0
  30. package/dist/lib/cubing/chunks/chunk-7L7BJSIM.js +21 -0
  31. package/dist/lib/cubing/chunks/chunk-7L7BJSIM.js.map +7 -0
  32. package/dist/lib/cubing/chunks/chunk-AESPJKN6.js +265 -0
  33. package/dist/lib/cubing/chunks/chunk-AESPJKN6.js.map +7 -0
  34. package/dist/lib/cubing/chunks/chunk-C2Q347XS.js +89 -0
  35. package/dist/lib/cubing/chunks/chunk-C2Q347XS.js.map +7 -0
  36. package/dist/lib/cubing/chunks/chunk-CGBMJBU3.js +1195 -0
  37. package/dist/lib/cubing/chunks/chunk-CGBMJBU3.js.map +7 -0
  38. package/dist/lib/cubing/chunks/chunk-HZQONEMD.js +249 -0
  39. package/dist/lib/cubing/chunks/chunk-HZQONEMD.js.map +7 -0
  40. package/dist/lib/cubing/chunks/chunk-IAGCVPL3.js +1069 -0
  41. package/dist/lib/cubing/chunks/chunk-IAGCVPL3.js.map +7 -0
  42. package/dist/lib/cubing/chunks/chunk-NAPITA3L.js +1 -0
  43. package/dist/lib/cubing/chunks/chunk-NAPITA3L.js.map +7 -0
  44. package/dist/lib/cubing/chunks/chunk-XPDJUSZ7.js +1876 -0
  45. package/dist/lib/cubing/chunks/chunk-XPDJUSZ7.js.map +7 -0
  46. package/dist/lib/cubing/chunks/chunk-YSI6PF35.js +619 -0
  47. package/dist/lib/cubing/chunks/chunk-YSI6PF35.js.map +7 -0
  48. package/dist/lib/cubing/chunks/inside-LG2EAKCL.js +557 -0
  49. package/dist/lib/cubing/chunks/inside-LG2EAKCL.js.map +7 -0
  50. package/dist/lib/cubing/chunks/puzzles-dynamic-2x2x2-JYJJXB4V.js +142 -0
  51. package/dist/lib/cubing/chunks/puzzles-dynamic-2x2x2-JYJJXB4V.js.map +7 -0
  52. package/dist/lib/cubing/chunks/puzzles-dynamic-3x3x3-FYXD7SIU.js +365 -0
  53. package/dist/lib/cubing/chunks/puzzles-dynamic-3x3x3-FYXD7SIU.js.map +7 -0
  54. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js +132 -0
  55. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js.map +7 -0
  56. package/dist/lib/cubing/chunks/puzzles-dynamic-5x5x5-JUNRX27W.js +277 -0
  57. package/dist/lib/cubing/chunks/puzzles-dynamic-5x5x5-JUNRX27W.js.map +7 -0
  58. package/dist/lib/cubing/chunks/puzzles-dynamic-clock-USGQTDPO.js +836 -0
  59. package/dist/lib/cubing/chunks/puzzles-dynamic-clock-USGQTDPO.js.map +7 -0
  60. package/dist/lib/cubing/chunks/puzzles-dynamic-fto-WJHMLYCJ.js +100 -0
  61. package/dist/lib/cubing/chunks/puzzles-dynamic-fto-WJHMLYCJ.js.map +7 -0
  62. package/dist/lib/cubing/chunks/puzzles-dynamic-megaminx-2LVHIDL4.js +224 -0
  63. package/dist/lib/cubing/chunks/puzzles-dynamic-megaminx-2LVHIDL4.js.map +7 -0
  64. package/dist/lib/cubing/chunks/puzzles-dynamic-pyraminx-7UWX4HHI.js +93 -0
  65. package/dist/lib/cubing/chunks/puzzles-dynamic-pyraminx-7UWX4HHI.js.map +7 -0
  66. package/dist/lib/cubing/chunks/puzzles-dynamic-square1-PQEKBPFN.js +842 -0
  67. package/dist/lib/cubing/chunks/puzzles-dynamic-square1-PQEKBPFN.js.map +7 -0
  68. package/dist/lib/cubing/chunks/search-dynamic-sgs-2x2x2-XFKQ4VJS.js +125 -0
  69. package/dist/lib/cubing/chunks/search-dynamic-sgs-2x2x2-XFKQ4VJS.js.map +7 -0
  70. package/dist/lib/cubing/chunks/search-dynamic-sgs-megaminx-ZDOOLEDW.js +1564 -0
  71. package/dist/lib/cubing/chunks/search-dynamic-sgs-megaminx-ZDOOLEDW.js.map +7 -0
  72. package/dist/lib/cubing/chunks/search-dynamic-sgs-pyraminx-W6UJWBYY.js +108 -0
  73. package/dist/lib/cubing/chunks/search-dynamic-sgs-pyraminx-W6UJWBYY.js.map +7 -0
  74. package/dist/lib/cubing/chunks/search-dynamic-sgs-skewb-FXGKV4KD.js +125 -0
  75. package/dist/lib/cubing/chunks/search-dynamic-sgs-skewb-FXGKV4KD.js.map +7 -0
  76. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-YK6HA7BK.js +644 -0
  77. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-YK6HA7BK.js.map +7 -0
  78. package/dist/lib/cubing/chunks/search-dynamic-solve-3x3x3-DLMAGPXS.js +2549 -0
  79. package/dist/lib/cubing/chunks/search-dynamic-solve-3x3x3-DLMAGPXS.js.map +7 -0
  80. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-NONXQHOJ.js +2923 -0
  81. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-NONXQHOJ.js.map +7 -0
  82. package/dist/lib/cubing/chunks/search-dynamic-solve-fto-3GQ2HLSW.js +1405 -0
  83. package/dist/lib/cubing/chunks/search-dynamic-solve-fto-3GQ2HLSW.js.map +7 -0
  84. package/dist/lib/cubing/chunks/search-worker-entry.js +19 -0
  85. package/dist/lib/cubing/chunks/search-worker-entry.js.map +7 -0
  86. package/dist/lib/cubing/chunks/square1-stickerings-W2ZLZWIN.js +73 -0
  87. package/dist/lib/cubing/chunks/square1-stickerings-W2ZLZWIN.js.map +7 -0
  88. package/dist/lib/cubing/chunks/twips-2RNTWYNZ.js +433 -0
  89. package/dist/lib/cubing/chunks/twips-2RNTWYNZ.js.map +7 -0
  90. package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-23XTPLIK.js +10 -0
  91. package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-23XTPLIK.js.map +7 -0
  92. package/dist/lib/cubing/chunks/twisty-dynamic-3d-JO6OGKOF.js +2424 -0
  93. package/dist/lib/cubing/chunks/twisty-dynamic-3d-JO6OGKOF.js.map +7 -0
  94. package/dist/lib/cubing/index-BX6f56uo.d.ts +76 -0
  95. package/dist/lib/cubing/index-CcRu94bx.d.ts +2622 -0
  96. package/dist/lib/cubing/kpuzzle/index.d.ts +2 -0
  97. package/dist/lib/cubing/kpuzzle/index.js +12 -0
  98. package/dist/lib/cubing/kpuzzle/index.js.map +7 -0
  99. package/dist/lib/cubing/notation/index.d.ts +32 -0
  100. package/dist/lib/cubing/notation/index.js +20 -0
  101. package/dist/lib/cubing/notation/index.js.map +7 -0
  102. package/dist/lib/cubing/outside-BCzgSYQ_.d.ts +38 -0
  103. package/dist/lib/cubing/protocol/index.d.ts +28 -0
  104. package/dist/lib/cubing/protocol/index.js +20 -0
  105. package/dist/lib/cubing/protocol/index.js.map +7 -0
  106. package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -0
  107. package/dist/lib/cubing/puzzle-geometry/index.js +5024 -0
  108. package/dist/lib/cubing/puzzle-geometry/index.js.map +7 -0
  109. package/dist/lib/cubing/puzzles/index.d.ts +2 -0
  110. package/dist/lib/cubing/puzzles/index.js +23 -0
  111. package/dist/lib/cubing/puzzles/index.js.map +7 -0
  112. package/dist/lib/cubing/scramble/index.d.ts +2 -0
  113. package/dist/lib/cubing/scramble/index.js +16 -0
  114. package/dist/lib/cubing/scramble/index.js.map +7 -0
  115. package/dist/lib/cubing/search/index.d.ts +7 -0
  116. package/dist/lib/cubing/search/index.js +37 -0
  117. package/dist/lib/cubing/search/index.js.map +7 -0
  118. package/dist/lib/cubing/stream/index.d.ts +2 -0
  119. package/dist/lib/cubing/stream/index.js +111 -0
  120. package/dist/lib/cubing/stream/index.js.map +7 -0
  121. package/dist/lib/cubing/twisty/index.d.ts +2 -0
  122. package/dist/lib/cubing/twisty/index.js +6236 -0
  123. package/dist/lib/cubing/twisty/index.js.map +7 -0
  124. package/experimental-json-schema/kpuzzle/KPatternData.schema.json +34 -0
  125. package/experimental-json-schema/kpuzzle/KPuzzleDefinition.schema.json +97 -0
  126. package/experimental-json-schema/kpuzzle/KTransformationData.schema.json +27 -0
  127. package/kpuzzle/index.d.ts +1 -0
  128. package/notation/index.d.ts +1 -0
  129. package/package.json +146 -0
  130. package/protocol/index.d.ts +1 -0
  131. package/puzzle-geometry/index.d.ts +1 -0
  132. package/puzzles/index.d.ts +1 -0
  133. package/scramble/index.d.ts +1 -0
  134. package/search/index.d.ts +1 -0
  135. package/stream/index.d.ts +1 -0
  136. package/twisty/index.d.ts +1 -0
@@ -0,0 +1,2923 @@
1
+ import "./chunk-NAPITA3L.js";
2
+ import "./chunk-HZQONEMD.js";
3
+ import {
4
+ random333Scramble
5
+ } from "./chunk-IAGCVPL3.js";
6
+ import "./chunk-7GUL3OBQ.js";
7
+ import "./chunk-YSI6PF35.js";
8
+ import "./chunk-2VJB4TMH.js";
9
+ import "./chunk-52ZXJEUO.js";
10
+ import {
11
+ Alg
12
+ } from "./chunk-XPDJUSZ7.js";
13
+
14
+ // src/cubing/vendor/mit/cs0x7f/cstimer/src/js/lib/mathlib.ts
15
+ var Cnk = [];
16
+ var fact = [1];
17
+ for (let i = 0; i < 32; ++i) {
18
+ Cnk[i] = [];
19
+ for (let j = 0; j < 32; ++j) {
20
+ Cnk[i][j] = 0;
21
+ }
22
+ }
23
+ for (let i = 0; i < 32; ++i) {
24
+ Cnk[i][0] = Cnk[i][i] = 1;
25
+ fact[i + 1] = fact[i] * (i + 1);
26
+ for (let j = 1; j < i; ++j) {
27
+ Cnk[i][j] = Cnk[i - 1][j - 1] + Cnk[i - 1][j];
28
+ }
29
+ }
30
+ function circle(arr, ...moreArgs) {
31
+ const length = moreArgs.length;
32
+ const temp = arr[moreArgs[length - 1]];
33
+ for (let i = length; i > 0; i--) {
34
+ arr[moreArgs[i]] = arr[moreArgs[i - 1]];
35
+ }
36
+ arr[moreArgs[0]] = temp;
37
+ return circle;
38
+ }
39
+ function set8Perm(arr, idx, n, even) {
40
+ n = (n || 8) - 1;
41
+ let val = 1985229328;
42
+ let prt = 0;
43
+ even ??= 0;
44
+ if (even < 0) {
45
+ idx <<= 1;
46
+ }
47
+ for (let i = 0; i < n; ++i) {
48
+ const p = fact[n - i];
49
+ let v = ~~(idx / p);
50
+ prt ^= v;
51
+ idx %= p;
52
+ v <<= 2;
53
+ arr[i] = val >> v & 7;
54
+ const m = (1 << v) - 1;
55
+ val = (val & m) + (val >> 4 & ~m);
56
+ }
57
+ if (even < 0 && (prt & 1) !== 0) {
58
+ arr[n] = arr[n - 1];
59
+ arr[n - 1] = val & 7;
60
+ } else {
61
+ arr[n] = val & 7;
62
+ }
63
+ return arr;
64
+ }
65
+
66
+ // src/cubing/vendor/mit/cs0x7f/cstimer/src/js/scramble/444-solver.ts
67
+ import { randomUIntBelow } from "random-uint-below";
68
+ function createArray(length1, length2) {
69
+ const result = new Array(length1);
70
+ if (length2 !== void 0) {
71
+ for (let i = 0; i < length1; i++) {
72
+ result[i] = new Array(length2);
73
+ }
74
+ }
75
+ return result;
76
+ }
77
+ var _;
78
+ var seedTable = {};
79
+ var CM$ = {};
80
+ var Q$Object = 0;
81
+ var Q$Serializable = 30;
82
+ var Q$Center1 = 21;
83
+ var Q$CornerCube = 22;
84
+ var Q$Edge3 = 23;
85
+ var Q$FullCube_0 = 24;
86
+ var Q$FullCube_$1 = 25;
87
+ var Q$Comparable = 34;
88
+ var Q$Search_0 = 26;
89
+ var Q$Object_$1 = 40;
90
+ function newSeed(id) {
91
+ return new seedTable[id]();
92
+ }
93
+ function defineSeed(id, superSeed, castableTypeMap, ...moreArgs) {
94
+ let seed = seedTable[id];
95
+ if (seed && !seed.___clazz$) {
96
+ _ = seed.prototype;
97
+ } else {
98
+ !seed && (seed = seedTable[id] = function() {
99
+ });
100
+ _ = seed.prototype = superSeed < 0 ? {} : newSeed(superSeed);
101
+ _.castableTypeMap$ = castableTypeMap;
102
+ }
103
+ for (const arg of moreArgs) {
104
+ arg.prototype = _;
105
+ }
106
+ if (seed.___clazz$) {
107
+ _.___clazz$ = seed.___clazz$;
108
+ seed.___clazz$ = null;
109
+ }
110
+ }
111
+ function makeCastMap(a) {
112
+ const result = {};
113
+ for (let i_0 = 0, c = a.length; i_0 < c; ++i_0) {
114
+ result[a[i_0]] = 1;
115
+ }
116
+ return result;
117
+ }
118
+ defineSeed(1, -1, CM$);
119
+ _.value = null;
120
+ function Array_0() {
121
+ }
122
+ function createFrom(a, length_0) {
123
+ const result = createFromSeed(0, length_0);
124
+ initValues(a.___clazz$, a.castableTypeMap$, a.queryId$, result);
125
+ return result;
126
+ }
127
+ function createFromSeed(seedType, length_0) {
128
+ const array = new Array(length_0);
129
+ if (seedType === 3) {
130
+ for (let i_0 = 0; i_0 < length_0; ++i_0) {
131
+ const value = {
132
+ m: 0,
133
+ l: 0,
134
+ h: 0
135
+ };
136
+ value.l = value.m = value.h = 0;
137
+ array[i_0] = value;
138
+ }
139
+ } else if (seedType > 0) {
140
+ const value = [null, 0, false][seedType];
141
+ for (let i_0 = 0; i_0 < length_0; ++i_0) {
142
+ array[i_0] = value;
143
+ }
144
+ }
145
+ return array;
146
+ }
147
+ function initDim(arrayClass, castableTypeMap, queryId, length_0, seedType) {
148
+ const result = createFromSeed(seedType, length_0);
149
+ initValues(arrayClass, castableTypeMap, queryId, result);
150
+ return result;
151
+ }
152
+ function initValues(arrayClass, castableTypeMap, queryId, array) {
153
+ $clinit_Array$ExpandoWrapper();
154
+ wrapArray(array, expandoNames_0, expandoValues_0);
155
+ array.___clazz$ = arrayClass;
156
+ array.castableTypeMap$ = castableTypeMap;
157
+ array.queryId$ = queryId;
158
+ return array;
159
+ }
160
+ function setCheck(array, index, value) {
161
+ return array[index] = value;
162
+ }
163
+ defineSeed(73, 1, {}, Array_0);
164
+ _.queryId$ = 0;
165
+ var ran$clinit_Array$ExpandoWrapper = false;
166
+ function $clinit_Array$ExpandoWrapper() {
167
+ if (ran$clinit_Array$ExpandoWrapper) {
168
+ return;
169
+ }
170
+ ran$clinit_Array$ExpandoWrapper = true;
171
+ expandoNames_0 = [];
172
+ expandoValues_0 = [];
173
+ initExpandos(new Array_0(), expandoNames_0, expandoValues_0);
174
+ }
175
+ function initExpandos(protoType, expandoNames, expandoValues) {
176
+ let i_0 = 0;
177
+ let value;
178
+ for (const name_0 in protoType) {
179
+ if (value = protoType[name_0]) {
180
+ expandoNames[i_0] = name_0;
181
+ expandoValues[i_0] = value;
182
+ ++i_0;
183
+ }
184
+ }
185
+ }
186
+ function wrapArray(array, expandoNames, expandoValues) {
187
+ $clinit_Array$ExpandoWrapper();
188
+ for (let i_0 = 0, c = expandoNames.length; i_0 < c; ++i_0) {
189
+ array[expandoNames[i_0]] = expandoValues[i_0];
190
+ }
191
+ }
192
+ var expandoNames_0;
193
+ var expandoValues_0;
194
+ function canCast(src, dstId) {
195
+ return src.castableTypeMap$ && !!src.castableTypeMap$[dstId];
196
+ }
197
+ function instanceOf(src, dstId) {
198
+ return src !== null && canCast(src, dstId);
199
+ }
200
+ var ran$clinit_Center1 = false;
201
+ function $clinit_Center1() {
202
+ if (ran$clinit_Center1) {
203
+ return false;
204
+ }
205
+ ran$clinit_Center1 = true;
206
+ ctsmv = createArray(15582, 36);
207
+ sym2raw = createArray(15582);
208
+ csprun = createArray(15582);
209
+ symmult = createArray(48, 48);
210
+ symmove = createArray(48, 36);
211
+ syminv = createArray(48);
212
+ finish_0 = createArray(48);
213
+ }
214
+ function $$init_1(this$static) {
215
+ this$static.ct = createArray(24);
216
+ }
217
+ function $equals(this$static, obj) {
218
+ let c;
219
+ let i_0;
220
+ if (instanceOf(obj, Q$Center1)) {
221
+ c = obj;
222
+ for (i_0 = 0; i_0 < 24; ++i_0) {
223
+ if (this$static.ct[i_0] !== c.ct[i_0]) {
224
+ return false;
225
+ }
226
+ }
227
+ return true;
228
+ }
229
+ return false;
230
+ }
231
+ function $get_1(this$static) {
232
+ let i_0;
233
+ let idx;
234
+ let r;
235
+ idx = 0;
236
+ r = 8;
237
+ for (i_0 = 23; i_0 >= 0; --i_0) {
238
+ this$static.ct[i_0] === 1 && (idx += Cnk[i_0][r--]);
239
+ }
240
+ return idx;
241
+ }
242
+ function $getsym(this$static) {
243
+ let cord;
244
+ let j;
245
+ if (raw2sym !== null) {
246
+ return raw2sym[$get_1(this$static)];
247
+ }
248
+ for (j = 0; j < 48; ++j) {
249
+ cord = raw2sym_0($get_1(this$static));
250
+ if (cord !== -1) {
251
+ return cord * 64 + j;
252
+ }
253
+ $rot(this$static, 0);
254
+ j % 2 === 1 && $rot(this$static, 1);
255
+ j % 8 === 7 && $rot(this$static, 2);
256
+ j % 16 === 15 && $rot(this$static, 3);
257
+ }
258
+ }
259
+ function $move(this$static, m_0) {
260
+ const key = m_0 % 3;
261
+ m_0 = ~~(m_0 / 3);
262
+ switch (m_0) {
263
+ case 0: {
264
+ swap(this$static.ct, 0, 1, 2, 3, key);
265
+ break;
266
+ }
267
+ case 1: {
268
+ swap(this$static.ct, 16, 17, 18, 19, key);
269
+ break;
270
+ }
271
+ case 2: {
272
+ swap(this$static.ct, 8, 9, 10, 11, key);
273
+ break;
274
+ }
275
+ case 3: {
276
+ swap(this$static.ct, 4, 5, 6, 7, key);
277
+ break;
278
+ }
279
+ case 4: {
280
+ swap(this$static.ct, 20, 21, 22, 23, key);
281
+ break;
282
+ }
283
+ case 5: {
284
+ swap(this$static.ct, 12, 13, 14, 15, key);
285
+ break;
286
+ }
287
+ case 6: {
288
+ swap(this$static.ct, 0, 1, 2, 3, key);
289
+ swap(this$static.ct, 8, 20, 12, 16, key);
290
+ swap(this$static.ct, 9, 21, 13, 17, key);
291
+ break;
292
+ }
293
+ case 7: {
294
+ swap(this$static.ct, 16, 17, 18, 19, key);
295
+ swap(this$static.ct, 1, 15, 5, 9, key);
296
+ swap(this$static.ct, 2, 12, 6, 10, key);
297
+ break;
298
+ }
299
+ case 8: {
300
+ swap(this$static.ct, 8, 9, 10, 11, key);
301
+ swap(this$static.ct, 2, 19, 4, 21, key);
302
+ swap(this$static.ct, 3, 16, 5, 22, key);
303
+ break;
304
+ }
305
+ case 9: {
306
+ swap(this$static.ct, 4, 5, 6, 7, key);
307
+ swap(this$static.ct, 10, 18, 14, 22, key);
308
+ swap(this$static.ct, 11, 19, 15, 23, key);
309
+ break;
310
+ }
311
+ case 10: {
312
+ swap(this$static.ct, 20, 21, 22, 23, key);
313
+ swap(this$static.ct, 0, 8, 4, 14, key);
314
+ swap(this$static.ct, 3, 11, 7, 13, key);
315
+ break;
316
+ }
317
+ case 11: {
318
+ swap(this$static.ct, 12, 13, 14, 15, key);
319
+ swap(this$static.ct, 1, 20, 7, 18, key);
320
+ swap(this$static.ct, 0, 23, 6, 17, key);
321
+ }
322
+ }
323
+ }
324
+ function $rot(this$static, r) {
325
+ switch (r) {
326
+ case 0: {
327
+ $move(this$static, 19);
328
+ $move(this$static, 28);
329
+ break;
330
+ }
331
+ case 1: {
332
+ $move(this$static, 21);
333
+ $move(this$static, 32);
334
+ break;
335
+ }
336
+ case 2: {
337
+ swap(this$static.ct, 0, 3, 1, 2, 1);
338
+ swap(this$static.ct, 8, 11, 9, 10, 1);
339
+ swap(this$static.ct, 4, 7, 5, 6, 1);
340
+ swap(this$static.ct, 12, 15, 13, 14, 1);
341
+ swap(this$static.ct, 16, 19, 21, 22, 1);
342
+ swap(this$static.ct, 17, 18, 20, 23, 1);
343
+ break;
344
+ }
345
+ case 3: {
346
+ $move(this$static, 18);
347
+ $move(this$static, 29);
348
+ $move(this$static, 24);
349
+ $move(this$static, 35);
350
+ }
351
+ }
352
+ }
353
+ function $rotate(this$static, r) {
354
+ let j;
355
+ for (j = 0; j < r; ++j) {
356
+ $rot(this$static, 0);
357
+ j % 2 === 1 && $rot(this$static, 1);
358
+ j % 8 === 7 && $rot(this$static, 2);
359
+ j % 16 === 15 && $rot(this$static, 3);
360
+ }
361
+ }
362
+ function $set_0(this$static, idx) {
363
+ let i_0;
364
+ let r;
365
+ r = 8;
366
+ for (i_0 = 23; i_0 >= 0; --i_0) {
367
+ this$static.ct[i_0] = 0;
368
+ if (idx >= Cnk[i_0][r]) {
369
+ idx -= Cnk[i_0][r--];
370
+ this$static.ct[i_0] = 1;
371
+ }
372
+ }
373
+ }
374
+ function $set_1(this$static, c) {
375
+ let i_0;
376
+ for (i_0 = 0; i_0 < 24; ++i_0) {
377
+ this$static.ct[i_0] = c.ct[i_0];
378
+ }
379
+ }
380
+ function Center1_0() {
381
+ let i_0;
382
+ $$init_1(this);
383
+ for (i_0 = 0; i_0 < 8; ++i_0) {
384
+ this.ct[i_0] = 1;
385
+ }
386
+ for (i_0 = 8; i_0 < 24; ++i_0) {
387
+ this.ct[i_0] = 0;
388
+ }
389
+ }
390
+ function Center1_1(c, urf) {
391
+ let i_0;
392
+ $$init_1(this);
393
+ for (i_0 = 0; i_0 < 24; ++i_0) {
394
+ this.ct[i_0] = ~~(c.ct[i_0] / 2) === urf ? 1 : 0;
395
+ }
396
+ }
397
+ function Center1_2(ct) {
398
+ let i_0;
399
+ $$init_1(this);
400
+ for (i_0 = 0; i_0 < 24; ++i_0) {
401
+ this.ct[i_0] = ct[i_0];
402
+ }
403
+ }
404
+ function createMoveTable() {
405
+ let i_0;
406
+ let m_0;
407
+ const c = new Center1_0();
408
+ const d = new Center1_0();
409
+ for (i_0 = 0; i_0 < 15582; ++i_0) {
410
+ $set_0(d, sym2raw[i_0]);
411
+ for (m_0 = 0; m_0 < 36; ++m_0) {
412
+ $set_1(c, d);
413
+ $move(c, m_0);
414
+ ctsmv[i_0][m_0] = $getsym(c);
415
+ }
416
+ }
417
+ }
418
+ function createPrun() {
419
+ let check;
420
+ let depth;
421
+ let done;
422
+ let i_0;
423
+ let idx;
424
+ let inv;
425
+ let m_0;
426
+ let select;
427
+ fill_0(csprun);
428
+ csprun[0] = 0;
429
+ depth = 0;
430
+ done = 1;
431
+ while (done !== 15582) {
432
+ inv = depth > 4;
433
+ select = inv ? -1 : depth;
434
+ check = inv ? depth : -1;
435
+ ++depth;
436
+ for (i_0 = 0; i_0 < 15582; ++i_0) {
437
+ if (csprun[i_0] !== select) {
438
+ continue;
439
+ }
440
+ for (m_0 = 0; m_0 < 27; ++m_0) {
441
+ idx = ~~ctsmv[i_0][m_0] >>> 6;
442
+ if (csprun[idx] !== check) {
443
+ continue;
444
+ }
445
+ ++done;
446
+ if (inv) {
447
+ csprun[i_0] = depth;
448
+ break;
449
+ } else {
450
+ csprun[idx] = depth;
451
+ }
452
+ }
453
+ }
454
+ }
455
+ }
456
+ function getSolvedSym(cube) {
457
+ let check;
458
+ let i_0;
459
+ let j;
460
+ const c = new Center1_2(cube.ct);
461
+ for (j = 0; j < 48; ++j) {
462
+ check = true;
463
+ for (i_0 = 0; i_0 < 24; ++i_0) {
464
+ if (c.ct[i_0] !== ~~(i_0 / 4)) {
465
+ check = false;
466
+ break;
467
+ }
468
+ }
469
+ if (check) {
470
+ return j;
471
+ }
472
+ $rot(c, 0);
473
+ j % 2 === 1 && $rot(c, 1);
474
+ j % 8 === 7 && $rot(c, 2);
475
+ j % 16 === 15 && $rot(c, 3);
476
+ }
477
+ return -1;
478
+ }
479
+ function initSym_0() {
480
+ let i_0;
481
+ let j;
482
+ let k_0;
483
+ const c = new Center1_0();
484
+ for (i_0 = 0; i_0 < 24; ++i_0) {
485
+ c.ct[i_0] = i_0;
486
+ }
487
+ const d = new Center1_2(c.ct);
488
+ const e = new Center1_2(c.ct);
489
+ const f = new Center1_2(c.ct);
490
+ for (i_0 = 0; i_0 < 48; ++i_0) {
491
+ for (j = 0; j < 48; ++j) {
492
+ for (k_0 = 0; k_0 < 48; ++k_0) {
493
+ if ($equals(c, d)) {
494
+ symmult[i_0][j] = k_0;
495
+ k_0 === 0 && (syminv[i_0] = j);
496
+ }
497
+ $rot(d, 0);
498
+ k_0 % 2 === 1 && $rot(d, 1);
499
+ k_0 % 8 === 7 && $rot(d, 2);
500
+ k_0 % 16 === 15 && $rot(d, 3);
501
+ }
502
+ $rot(c, 0);
503
+ j % 2 === 1 && $rot(c, 1);
504
+ j % 8 === 7 && $rot(c, 2);
505
+ j % 16 === 15 && $rot(c, 3);
506
+ }
507
+ $rot(c, 0);
508
+ i_0 % 2 === 1 && $rot(c, 1);
509
+ i_0 % 8 === 7 && $rot(c, 2);
510
+ i_0 % 16 === 15 && $rot(c, 3);
511
+ }
512
+ for (i_0 = 0; i_0 < 48; ++i_0) {
513
+ $set_1(c, e);
514
+ $rotate(c, syminv[i_0]);
515
+ for (j = 0; j < 36; ++j) {
516
+ $set_1(d, c);
517
+ $move(d, j);
518
+ $rotate(d, i_0);
519
+ for (k_0 = 0; k_0 < 36; ++k_0) {
520
+ $set_1(f, e);
521
+ $move(f, k_0);
522
+ if ($equals(f, d)) {
523
+ symmove[i_0][j] = k_0;
524
+ break;
525
+ }
526
+ }
527
+ }
528
+ }
529
+ $set_0(c, 0);
530
+ for (i_0 = 0; i_0 < 48; ++i_0) {
531
+ finish_0[syminv[i_0]] = $get_1(c);
532
+ $rot(c, 0);
533
+ i_0 % 2 === 1 && $rot(c, 1);
534
+ i_0 % 8 === 7 && $rot(c, 2);
535
+ i_0 % 16 === 15 && $rot(c, 3);
536
+ }
537
+ }
538
+ function initSym2Raw() {
539
+ let count;
540
+ let i_0;
541
+ let idx;
542
+ let j;
543
+ const c = new Center1_0();
544
+ const occ = createArray(22984);
545
+ for (i_0 = 0; i_0 < 22984; i_0++) {
546
+ occ[i_0] = 0;
547
+ }
548
+ count = 0;
549
+ for (i_0 = 0; i_0 < 735471; ++i_0) {
550
+ if ((occ[~~i_0 >>> 5] & 1 << (i_0 & 31)) === 0) {
551
+ $set_0(c, i_0);
552
+ for (j = 0; j < 48; ++j) {
553
+ idx = $get_1(c);
554
+ occ[~~idx >>> 5] |= 1 << (idx & 31);
555
+ raw2sym !== null && (raw2sym[idx] = count << 6 | syminv[j]);
556
+ $rot(c, 0);
557
+ j % 2 === 1 && $rot(c, 1);
558
+ j % 8 === 7 && $rot(c, 2);
559
+ j % 16 === 15 && $rot(c, 3);
560
+ }
561
+ sym2raw[count++] = i_0;
562
+ }
563
+ }
564
+ }
565
+ function raw2sym_0(n) {
566
+ const m_0 = binarySearch_0(sym2raw, n);
567
+ return m_0 >= 0 ? m_0 : -1;
568
+ }
569
+ defineSeed(153, 1, makeCastMap([Q$Center1]), Center1_0, Center1_1, Center1_2);
570
+ var csprun;
571
+ var ctsmv;
572
+ var finish_0;
573
+ var raw2sym = null;
574
+ var sym2raw;
575
+ var syminv;
576
+ var symmove;
577
+ var symmult;
578
+ var ran$clinit_Center2 = false;
579
+ function $clinit_Center2() {
580
+ if (ran$clinit_Center2) {
581
+ return;
582
+ }
583
+ ran$clinit_Center2 = true;
584
+ rlmv = createArray(70, 28);
585
+ ctmv = createArray(6435, 28);
586
+ rlrot = createArray(70, 16);
587
+ ctrot = createArray(6435, 16);
588
+ ctprun = createArray(450450);
589
+ pmv = [
590
+ 0,
591
+ 0,
592
+ 0,
593
+ 0,
594
+ 0,
595
+ 0,
596
+ 0,
597
+ 0,
598
+ 0,
599
+ 0,
600
+ 0,
601
+ 0,
602
+ 0,
603
+ 0,
604
+ 0,
605
+ 0,
606
+ 0,
607
+ 0,
608
+ 0,
609
+ 0,
610
+ 0,
611
+ 1,
612
+ 0,
613
+ 1,
614
+ 0,
615
+ 0,
616
+ 0,
617
+ 0,
618
+ 0,
619
+ 0,
620
+ 1,
621
+ 0,
622
+ 1,
623
+ 0,
624
+ 0,
625
+ 0
626
+ ];
627
+ }
628
+ function $getct(this$static) {
629
+ let i_0;
630
+ let idx;
631
+ let r;
632
+ idx = 0;
633
+ r = 8;
634
+ for (i_0 = 14; i_0 >= 0; --i_0) {
635
+ this$static.ct[i_0] !== this$static.ct[15] && (idx += Cnk[i_0][r--]);
636
+ }
637
+ return idx;
638
+ }
639
+ function $getrl(this$static) {
640
+ let i_0;
641
+ let idx;
642
+ let r;
643
+ idx = 0;
644
+ r = 4;
645
+ for (i_0 = 6; i_0 >= 0; --i_0) {
646
+ this$static.rl[i_0] !== this$static.rl[7] && (idx += Cnk[i_0][r--]);
647
+ }
648
+ return idx * 2 + this$static.parity;
649
+ }
650
+ function $move_0(this$static, m_0) {
651
+ this$static.parity ^= pmv[m_0];
652
+ const key = m_0 % 3;
653
+ m_0 = ~~(m_0 / 3);
654
+ switch (m_0) {
655
+ case 0: {
656
+ swap(this$static.ct, 0, 1, 2, 3, key);
657
+ break;
658
+ }
659
+ case 1: {
660
+ swap(this$static.rl, 0, 1, 2, 3, key);
661
+ break;
662
+ }
663
+ case 2: {
664
+ swap(this$static.ct, 8, 9, 10, 11, key);
665
+ break;
666
+ }
667
+ case 3: {
668
+ swap(this$static.ct, 4, 5, 6, 7, key);
669
+ break;
670
+ }
671
+ case 4: {
672
+ swap(this$static.rl, 4, 5, 6, 7, key);
673
+ break;
674
+ }
675
+ case 5: {
676
+ swap(this$static.ct, 12, 13, 14, 15, key);
677
+ break;
678
+ }
679
+ case 6: {
680
+ swap(this$static.ct, 0, 1, 2, 3, key);
681
+ swap(this$static.rl, 0, 5, 4, 1, key);
682
+ swap(this$static.ct, 8, 9, 12, 13, key);
683
+ break;
684
+ }
685
+ case 7: {
686
+ swap(this$static.rl, 0, 1, 2, 3, key);
687
+ swap(this$static.ct, 1, 15, 5, 9, key);
688
+ swap(this$static.ct, 2, 12, 6, 10, key);
689
+ break;
690
+ }
691
+ case 8: {
692
+ swap(this$static.ct, 8, 9, 10, 11, key);
693
+ swap(this$static.rl, 0, 3, 6, 5, key);
694
+ swap(this$static.ct, 3, 2, 5, 4, key);
695
+ break;
696
+ }
697
+ case 9: {
698
+ swap(this$static.ct, 4, 5, 6, 7, key);
699
+ swap(this$static.rl, 3, 2, 7, 6, key);
700
+ swap(this$static.ct, 11, 10, 15, 14, key);
701
+ break;
702
+ }
703
+ case 10: {
704
+ swap(this$static.rl, 4, 5, 6, 7, key);
705
+ swap(this$static.ct, 0, 8, 4, 14, key);
706
+ swap(this$static.ct, 3, 11, 7, 13, key);
707
+ break;
708
+ }
709
+ case 11: {
710
+ swap(this$static.ct, 12, 13, 14, 15, key);
711
+ swap(this$static.rl, 1, 4, 7, 2, key);
712
+ swap(this$static.ct, 1, 0, 7, 6, key);
713
+ }
714
+ }
715
+ }
716
+ function $rot_0(this$static, r) {
717
+ switch (r) {
718
+ case 0: {
719
+ $move_0(this$static, 19);
720
+ $move_0(this$static, 28);
721
+ break;
722
+ }
723
+ case 1: {
724
+ $move_0(this$static, 21);
725
+ $move_0(this$static, 32);
726
+ break;
727
+ }
728
+ case 2: {
729
+ swap(this$static.ct, 0, 3, 1, 2, 1);
730
+ swap(this$static.ct, 8, 11, 9, 10, 1);
731
+ swap(this$static.ct, 4, 7, 5, 6, 1);
732
+ swap(this$static.ct, 12, 15, 13, 14, 1);
733
+ swap(this$static.rl, 0, 3, 5, 6, 1);
734
+ swap(this$static.rl, 1, 2, 4, 7, 1);
735
+ }
736
+ }
737
+ }
738
+ function $set_2(this$static, c, edgeParity) {
739
+ let i_0;
740
+ for (i_0 = 0; i_0 < 16; ++i_0) {
741
+ this$static.ct[i_0] = ~~(c.ct[i_0] / 2);
742
+ }
743
+ for (i_0 = 0; i_0 < 8; ++i_0) {
744
+ this$static.rl[i_0] = c.ct[i_0 + 16];
745
+ }
746
+ this$static.parity = edgeParity;
747
+ }
748
+ function $setct(this$static, idx) {
749
+ let i_0;
750
+ let r;
751
+ r = 8;
752
+ this$static.ct[15] = 0;
753
+ for (i_0 = 14; i_0 >= 0; --i_0) {
754
+ if (idx >= Cnk[i_0][r]) {
755
+ idx -= Cnk[i_0][r--];
756
+ this$static.ct[i_0] = 1;
757
+ } else {
758
+ this$static.ct[i_0] = 0;
759
+ }
760
+ }
761
+ }
762
+ function $setrl(this$static, idx) {
763
+ let i_0;
764
+ let r;
765
+ this$static.parity = idx & 1;
766
+ idx >>>= 1;
767
+ r = 4;
768
+ this$static.rl[7] = 0;
769
+ for (i_0 = 6; i_0 >= 0; --i_0) {
770
+ if (idx >= Cnk[i_0][r]) {
771
+ idx -= Cnk[i_0][r--];
772
+ this$static.rl[i_0] = 1;
773
+ } else {
774
+ this$static.rl[i_0] = 0;
775
+ }
776
+ }
777
+ }
778
+ function Center2_0() {
779
+ this.rl = createArray(8);
780
+ this.ct = createArray(16);
781
+ }
782
+ function init_3() {
783
+ let ct;
784
+ let ctx;
785
+ let depth;
786
+ let done;
787
+ let i_0;
788
+ let idx;
789
+ let j;
790
+ let m_0;
791
+ let rl;
792
+ let rlx;
793
+ const c = new Center2_0();
794
+ for (i_0 = 0; i_0 < 70; ++i_0) {
795
+ for (m_0 = 0; m_0 < 28; ++m_0) {
796
+ $setrl(c, i_0);
797
+ $move_0(c, move2std[m_0]);
798
+ rlmv[i_0][m_0] = $getrl(c);
799
+ }
800
+ }
801
+ for (i_0 = 0; i_0 < 70; ++i_0) {
802
+ $setrl(c, i_0);
803
+ for (j = 0; j < 16; ++j) {
804
+ rlrot[i_0][j] = $getrl(c);
805
+ $rot_0(c, 0);
806
+ j % 2 === 1 && $rot_0(c, 1);
807
+ j % 8 === 7 && $rot_0(c, 2);
808
+ }
809
+ }
810
+ for (i_0 = 0; i_0 < 6435; ++i_0) {
811
+ $setct(c, i_0);
812
+ for (j = 0; j < 16; ++j) {
813
+ ctrot[i_0][j] = $getct(c) & 65535;
814
+ $rot_0(c, 0);
815
+ j % 2 === 1 && $rot_0(c, 1);
816
+ j % 8 === 7 && $rot_0(c, 2);
817
+ }
818
+ }
819
+ for (i_0 = 0; i_0 < 6435; ++i_0) {
820
+ for (m_0 = 0; m_0 < 28; ++m_0) {
821
+ $setct(c, i_0);
822
+ $move_0(c, move2std[m_0]);
823
+ ctmv[i_0][m_0] = $getct(c) & 65535;
824
+ }
825
+ }
826
+ fill_0(ctprun);
827
+ ctprun[0] = ctprun[18] = ctprun[28] = ctprun[46] = ctprun[54] = ctprun[56] = 0;
828
+ depth = 0;
829
+ done = 6;
830
+ while (done !== 450450) {
831
+ const inv = depth > 6;
832
+ const select = inv ? -1 : depth;
833
+ const check = inv ? depth : -1;
834
+ ++depth;
835
+ for (i_0 = 0; i_0 < 450450; ++i_0) {
836
+ if (ctprun[i_0] !== select) {
837
+ continue;
838
+ }
839
+ ct = ~~(i_0 / 70);
840
+ rl = i_0 % 70;
841
+ for (m_0 = 0; m_0 < 23; ++m_0) {
842
+ ctx = ctmv[ct][m_0];
843
+ rlx = rlmv[rl][m_0];
844
+ idx = ctx * 70 + rlx;
845
+ if (ctprun[idx] !== check) {
846
+ continue;
847
+ }
848
+ ++done;
849
+ if (inv) {
850
+ ctprun[i_0] = depth;
851
+ break;
852
+ } else {
853
+ ctprun[idx] = depth;
854
+ }
855
+ }
856
+ }
857
+ }
858
+ }
859
+ defineSeed(154, 1, {}, Center2_0);
860
+ _.parity = 0;
861
+ var ctmv;
862
+ var ctprun;
863
+ var ctrot;
864
+ var pmv;
865
+ var rlmv;
866
+ var rlrot;
867
+ var ran$clinit_Center3 = false;
868
+ function $clinit_Center3() {
869
+ if (ran$clinit_Center3) {
870
+ return;
871
+ }
872
+ ran$clinit_Center3 = true;
873
+ ctmove = createArray(29400, 20);
874
+ pmove = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1];
875
+ prun_0 = createArray(29400);
876
+ rl2std = [0, 9, 14, 23, 27, 28, 41, 42, 46, 55, 60, 69];
877
+ std2rl = createArray(70);
878
+ }
879
+ function $getct_0(this$static) {
880
+ let i_0;
881
+ let idx;
882
+ let idxrl;
883
+ let r;
884
+ idx = 0;
885
+ r = 4;
886
+ for (i_0 = 6; i_0 >= 0; --i_0) {
887
+ this$static.ud[i_0] !== this$static.ud[7] && (idx += Cnk[i_0][r--]);
888
+ }
889
+ idx *= 35;
890
+ r = 4;
891
+ for (i_0 = 6; i_0 >= 0; --i_0) {
892
+ this$static.fb[i_0] !== this$static.fb[7] && (idx += Cnk[i_0][r--]);
893
+ }
894
+ idx *= 12;
895
+ const check = this$static.fb[7] ^ this$static.ud[7];
896
+ idxrl = 0;
897
+ r = 4;
898
+ for (i_0 = 7; i_0 >= 0; --i_0) {
899
+ this$static.rl[i_0] !== check && (idxrl += Cnk[i_0][r--]);
900
+ }
901
+ return this$static.parity + 2 * (idx + std2rl[idxrl]);
902
+ }
903
+ function $move_1(this$static, i_0) {
904
+ this$static.parity ^= pmove[i_0];
905
+ switch (i_0) {
906
+ case 0:
907
+ case 1:
908
+ case 2: {
909
+ swap(this$static.ud, 0, 1, 2, 3, i_0 % 3);
910
+ break;
911
+ }
912
+ case 3: {
913
+ swap(this$static.rl, 0, 1, 2, 3, 1);
914
+ break;
915
+ }
916
+ case 4:
917
+ case 5:
918
+ case 6: {
919
+ swap(this$static.fb, 0, 1, 2, 3, (i_0 - 1) % 3);
920
+ break;
921
+ }
922
+ case 7:
923
+ case 8:
924
+ case 9: {
925
+ swap(this$static.ud, 4, 5, 6, 7, (i_0 - 1) % 3);
926
+ break;
927
+ }
928
+ case 10: {
929
+ swap(this$static.rl, 4, 5, 6, 7, 1);
930
+ break;
931
+ }
932
+ case 11:
933
+ case 12:
934
+ case 13: {
935
+ swap(this$static.fb, 4, 5, 6, 7, (i_0 + 1) % 3);
936
+ break;
937
+ }
938
+ case 14: {
939
+ swap(this$static.ud, 0, 1, 2, 3, 1);
940
+ swap(this$static.rl, 0, 5, 4, 1, 1);
941
+ swap(this$static.fb, 0, 5, 4, 1, 1);
942
+ break;
943
+ }
944
+ case 15: {
945
+ swap(this$static.rl, 0, 1, 2, 3, 1);
946
+ swap(this$static.fb, 1, 4, 7, 2, 1);
947
+ swap(this$static.ud, 1, 6, 5, 2, 1);
948
+ break;
949
+ }
950
+ case 16: {
951
+ swap(this$static.fb, 0, 1, 2, 3, 1);
952
+ swap(this$static.ud, 3, 2, 5, 4, 1);
953
+ swap(this$static.rl, 0, 3, 6, 5, 1);
954
+ break;
955
+ }
956
+ case 17: {
957
+ swap(this$static.ud, 4, 5, 6, 7, 1);
958
+ swap(this$static.rl, 3, 2, 7, 6, 1);
959
+ swap(this$static.fb, 3, 2, 7, 6, 1);
960
+ break;
961
+ }
962
+ case 18: {
963
+ swap(this$static.rl, 4, 5, 6, 7, 1);
964
+ swap(this$static.fb, 0, 3, 6, 5, 1);
965
+ swap(this$static.ud, 0, 3, 4, 7, 1);
966
+ break;
967
+ }
968
+ case 19: {
969
+ swap(this$static.fb, 4, 5, 6, 7, 1);
970
+ swap(this$static.ud, 0, 7, 6, 1, 1);
971
+ swap(this$static.rl, 1, 4, 7, 2, 1);
972
+ }
973
+ }
974
+ }
975
+ function $set_3(this$static, c, eXc_parity) {
976
+ let i_0;
977
+ const parity = (c.ct[0] > c.ct[8] ? 1 : 0) ^ (c.ct[8] > c.ct[16] ? 1 : 0) ^ (c.ct[0] > c.ct[16] ? 1 : 0) ? 1 : 0;
978
+ for (i_0 = 0; i_0 < 8; ++i_0) {
979
+ this$static.ud[i_0] = c.ct[i_0] & 1 ^ 1;
980
+ this$static.fb[i_0] = c.ct[i_0 + 8] & 1 ^ 1;
981
+ this$static.rl[i_0] = c.ct[i_0 + 16] & 1 ^ 1 ^ parity;
982
+ }
983
+ this$static.parity = parity ^ eXc_parity;
984
+ }
985
+ function $setct_0(this$static, idx) {
986
+ let i_0;
987
+ let idxfb;
988
+ let idxrl;
989
+ let r;
990
+ this$static.parity = idx & 1;
991
+ idx >>>= 1;
992
+ idxrl = rl2std[idx % 12];
993
+ idx = ~~(idx / 12);
994
+ r = 4;
995
+ for (i_0 = 7; i_0 >= 0; --i_0) {
996
+ this$static.rl[i_0] = 0;
997
+ if (idxrl >= Cnk[i_0][r]) {
998
+ idxrl -= Cnk[i_0][r--];
999
+ this$static.rl[i_0] = 1;
1000
+ }
1001
+ }
1002
+ idxfb = idx % 35;
1003
+ idx = ~~(idx / 35);
1004
+ r = 4;
1005
+ this$static.fb[7] = 0;
1006
+ for (i_0 = 6; i_0 >= 0; --i_0) {
1007
+ if (idxfb >= Cnk[i_0][r]) {
1008
+ idxfb -= Cnk[i_0][r--];
1009
+ this$static.fb[i_0] = 1;
1010
+ } else {
1011
+ this$static.fb[i_0] = 0;
1012
+ }
1013
+ }
1014
+ r = 4;
1015
+ this$static.ud[7] = 0;
1016
+ for (i_0 = 6; i_0 >= 0; --i_0) {
1017
+ if (idx >= Cnk[i_0][r]) {
1018
+ idx -= Cnk[i_0][r--];
1019
+ this$static.ud[i_0] = 1;
1020
+ } else {
1021
+ this$static.ud[i_0] = 0;
1022
+ }
1023
+ }
1024
+ }
1025
+ function Center3_0() {
1026
+ this.ud = createArray(8);
1027
+ this.rl = createArray(8);
1028
+ this.fb = createArray(8);
1029
+ }
1030
+ function init_4() {
1031
+ let depth;
1032
+ let done;
1033
+ let i_0;
1034
+ let m_0;
1035
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1036
+ std2rl[rl2std[i_0]] = i_0;
1037
+ }
1038
+ const c = new Center3_0();
1039
+ for (i_0 = 0; i_0 < 29400; ++i_0) {
1040
+ for (m_0 = 0; m_0 < 20; ++m_0) {
1041
+ $setct_0(c, i_0);
1042
+ $move_1(c, m_0);
1043
+ ctmove[i_0][m_0] = $getct_0(c) & 65535;
1044
+ }
1045
+ }
1046
+ fill_0(prun_0);
1047
+ prun_0[0] = 0;
1048
+ depth = 0;
1049
+ done = 1;
1050
+ while (done !== 29400) {
1051
+ for (i_0 = 0; i_0 < 29400; ++i_0) {
1052
+ if (prun_0[i_0] !== depth) {
1053
+ continue;
1054
+ }
1055
+ for (m_0 = 0; m_0 < 17; ++m_0) {
1056
+ if (prun_0[ctmove[i_0][m_0]] === -1) {
1057
+ prun_0[ctmove[i_0][m_0]] = depth + 1;
1058
+ ++done;
1059
+ }
1060
+ }
1061
+ }
1062
+ ++depth;
1063
+ }
1064
+ }
1065
+ defineSeed(155, 1, {}, Center3_0);
1066
+ _.parity = 0;
1067
+ var ctmove;
1068
+ var pmove;
1069
+ var prun_0;
1070
+ var rl2std;
1071
+ var std2rl;
1072
+ function $copy_1(this$static, c) {
1073
+ let i_0;
1074
+ for (i_0 = 0; i_0 < 24; ++i_0) {
1075
+ this$static.ct[i_0] = c.ct[i_0];
1076
+ }
1077
+ }
1078
+ function $move_2(this$static, m_0) {
1079
+ const key = m_0 % 3;
1080
+ m_0 = ~~(m_0 / 3);
1081
+ switch (m_0) {
1082
+ case 0: {
1083
+ swap(this$static.ct, 0, 1, 2, 3, key);
1084
+ break;
1085
+ }
1086
+ case 1: {
1087
+ swap(this$static.ct, 16, 17, 18, 19, key);
1088
+ break;
1089
+ }
1090
+ case 2: {
1091
+ swap(this$static.ct, 8, 9, 10, 11, key);
1092
+ break;
1093
+ }
1094
+ case 3: {
1095
+ swap(this$static.ct, 4, 5, 6, 7, key);
1096
+ break;
1097
+ }
1098
+ case 4: {
1099
+ swap(this$static.ct, 20, 21, 22, 23, key);
1100
+ break;
1101
+ }
1102
+ case 5: {
1103
+ swap(this$static.ct, 12, 13, 14, 15, key);
1104
+ break;
1105
+ }
1106
+ case 6: {
1107
+ swap(this$static.ct, 0, 1, 2, 3, key);
1108
+ swap(this$static.ct, 8, 20, 12, 16, key);
1109
+ swap(this$static.ct, 9, 21, 13, 17, key);
1110
+ break;
1111
+ }
1112
+ case 7: {
1113
+ swap(this$static.ct, 16, 17, 18, 19, key);
1114
+ swap(this$static.ct, 1, 15, 5, 9, key);
1115
+ swap(this$static.ct, 2, 12, 6, 10, key);
1116
+ break;
1117
+ }
1118
+ case 8: {
1119
+ swap(this$static.ct, 8, 9, 10, 11, key);
1120
+ swap(this$static.ct, 2, 19, 4, 21, key);
1121
+ swap(this$static.ct, 3, 16, 5, 22, key);
1122
+ break;
1123
+ }
1124
+ case 9: {
1125
+ swap(this$static.ct, 4, 5, 6, 7, key);
1126
+ swap(this$static.ct, 10, 18, 14, 22, key);
1127
+ swap(this$static.ct, 11, 19, 15, 23, key);
1128
+ break;
1129
+ }
1130
+ case 10: {
1131
+ swap(this$static.ct, 20, 21, 22, 23, key);
1132
+ swap(this$static.ct, 0, 8, 4, 14, key);
1133
+ swap(this$static.ct, 3, 11, 7, 13, key);
1134
+ break;
1135
+ }
1136
+ case 11: {
1137
+ swap(this$static.ct, 12, 13, 14, 15, key);
1138
+ swap(this$static.ct, 1, 20, 7, 18, key);
1139
+ swap(this$static.ct, 0, 23, 6, 17, key);
1140
+ }
1141
+ }
1142
+ }
1143
+ function CenterCube_0() {
1144
+ let i_0;
1145
+ this.ct = createArray(24);
1146
+ for (i_0 = 0; i_0 < 24; ++i_0) {
1147
+ this.ct[i_0] = ~~(i_0 / 4);
1148
+ }
1149
+ }
1150
+ function CenterCube_1() {
1151
+ let i_0;
1152
+ let m_0;
1153
+ let t;
1154
+ CenterCube_0.call(this);
1155
+ for (i_0 = 0; i_0 < 23; ++i_0) {
1156
+ t = i_0 + randomUIntBelow(24 - i_0);
1157
+ if (this.ct[t] !== this.ct[i_0]) {
1158
+ m_0 = this.ct[i_0];
1159
+ this.ct[i_0] = this.ct[t];
1160
+ this.ct[t] = m_0;
1161
+ }
1162
+ }
1163
+ }
1164
+ defineSeed(156, 1, {}, CenterCube_0, CenterCube_1);
1165
+ var ran$clinit_CornerCube = false;
1166
+ function $clinit_CornerCube() {
1167
+ if (ran$clinit_CornerCube) {
1168
+ return;
1169
+ }
1170
+ ran$clinit_CornerCube = true;
1171
+ moveCube_0 = createArray(18);
1172
+ initMove_0();
1173
+ }
1174
+ function $$init_2(this$static) {
1175
+ this$static.cp = [0, 1, 2, 3, 4, 5, 6, 7];
1176
+ this$static.co = [0, 0, 0, 0, 0, 0, 0, 0];
1177
+ }
1178
+ function $copy_2(this$static, c) {
1179
+ let i_0;
1180
+ for (i_0 = 0; i_0 < 8; ++i_0) {
1181
+ this$static.cp[i_0] = c.cp[i_0];
1182
+ this$static.co[i_0] = c.co[i_0];
1183
+ }
1184
+ }
1185
+ function $move_3(this$static, idx) {
1186
+ !this$static.temps && (this$static.temps = new CornerCube_0());
1187
+ CornMult_0(this$static, moveCube_0[idx], this$static.temps);
1188
+ $copy_2(this$static, this$static.temps);
1189
+ }
1190
+ function $setTwist_0(this$static, idx) {
1191
+ let i_0;
1192
+ let twst;
1193
+ twst = 0;
1194
+ for (i_0 = 6; i_0 >= 0; --i_0) {
1195
+ twst += this$static.co[i_0] = idx % 3;
1196
+ idx = ~~(idx / 3);
1197
+ }
1198
+ this$static.co[7] = (15 - twst) % 3;
1199
+ }
1200
+ function CornMult_0(a, b, prod) {
1201
+ let corn;
1202
+ let ori;
1203
+ let oriA;
1204
+ let oriB;
1205
+ for (corn = 0; corn < 8; ++corn) {
1206
+ prod.cp[corn] = a.cp[b.cp[corn]];
1207
+ oriA = a.co[b.cp[corn]];
1208
+ oriB = b.co[corn];
1209
+ ori = oriA;
1210
+ ori = ori + (oriA < 3 ? oriB : 6 - oriB);
1211
+ ori = ori % 3;
1212
+ (oriA >= 3 ? 1 : 0) ^ (oriB >= 3 ? 1 : 0) && (ori = ori + 3);
1213
+ prod.co[corn] = ori;
1214
+ }
1215
+ }
1216
+ function CornerCube_0() {
1217
+ $$init_2(this);
1218
+ }
1219
+ function CornerCube_1(cperm, twist) {
1220
+ $$init_2(this);
1221
+ set8Perm(this.cp, cperm);
1222
+ $setTwist_0(this, twist);
1223
+ }
1224
+ function CornerCube_2() {
1225
+ CornerCube_1.call(this, randomUIntBelow(40320), randomUIntBelow(2187));
1226
+ }
1227
+ function initMove_0() {
1228
+ let a;
1229
+ let p_0;
1230
+ moveCube_0[0] = new CornerCube_1(15120, 0);
1231
+ moveCube_0[3] = new CornerCube_1(21021, 1494);
1232
+ moveCube_0[6] = new CornerCube_1(8064, 1236);
1233
+ moveCube_0[9] = new CornerCube_1(9, 0);
1234
+ moveCube_0[12] = new CornerCube_1(1230, 412);
1235
+ moveCube_0[15] = new CornerCube_1(224, 137);
1236
+ for (a = 0; a < 18; a += 3) {
1237
+ for (p_0 = 0; p_0 < 2; ++p_0) {
1238
+ moveCube_0[a + p_0 + 1] = new CornerCube_0();
1239
+ CornMult_0(moveCube_0[a + p_0], moveCube_0[a], moveCube_0[a + p_0 + 1]);
1240
+ }
1241
+ }
1242
+ }
1243
+ defineSeed(
1244
+ 157,
1245
+ 1,
1246
+ makeCastMap([Q$CornerCube]),
1247
+ CornerCube_0,
1248
+ CornerCube_1,
1249
+ CornerCube_2
1250
+ );
1251
+ _.temps = null;
1252
+ var moveCube_0;
1253
+ var ran$clinit_Edge3 = false;
1254
+ function $clinit_Edge3() {
1255
+ if (ran$clinit_Edge3) {
1256
+ return;
1257
+ }
1258
+ ran$clinit_Edge3 = true;
1259
+ eprun = createArray(1937880);
1260
+ sym2raw_0 = createArray(1538);
1261
+ symstate = createArray(1538);
1262
+ raw2sym_1 = createArray(11880);
1263
+ syminv_0 = [0, 1, 6, 3, 4, 5, 2, 7];
1264
+ mvrot = createArray(160, 12);
1265
+ mvroto = createArray(160, 12);
1266
+ factX = [
1267
+ 1,
1268
+ 1,
1269
+ 1,
1270
+ 3,
1271
+ 12,
1272
+ 60,
1273
+ 360,
1274
+ 2520,
1275
+ 20160,
1276
+ 181440,
1277
+ 1814400,
1278
+ 19958400,
1279
+ 239500800
1280
+ ];
1281
+ FullEdgeMap = [0, 2, 4, 6, 1, 3, 7, 5, 8, 9, 10, 11];
1282
+ }
1283
+ function $circlex(this$static, a, b, c, d) {
1284
+ const temp = this$static.edgeo[d];
1285
+ this$static.edgeo[d] = this$static.edge[c];
1286
+ this$static.edge[c] = this$static.edgeo[b];
1287
+ this$static.edgeo[b] = this$static.edge[a];
1288
+ this$static.edge[a] = temp;
1289
+ }
1290
+ function $get_2(this$static, end) {
1291
+ let i_0;
1292
+ let idx;
1293
+ let v;
1294
+ let valh;
1295
+ let vall;
1296
+ this$static.isStd || $std(this$static);
1297
+ idx = 0;
1298
+ vall = 1985229328;
1299
+ valh = 47768;
1300
+ for (i_0 = 0; i_0 < end; ++i_0) {
1301
+ v = this$static.edge[i_0] << 2;
1302
+ idx *= 12 - i_0;
1303
+ if (v >= 32) {
1304
+ idx += valh >> v - 32 & 15;
1305
+ valh -= 4368 << v - 32;
1306
+ } else {
1307
+ idx += vall >> v & 15;
1308
+ valh -= 4369;
1309
+ vall -= 286331152 << v;
1310
+ }
1311
+ }
1312
+ return idx;
1313
+ }
1314
+ function $getsym_0(this$static) {
1315
+ let symcord1x;
1316
+ const cord1x = $get_2(this$static, 4);
1317
+ symcord1x = raw2sym_1[cord1x];
1318
+ const symx = symcord1x & 7;
1319
+ symcord1x >>= 3;
1320
+ $rotate_0(this$static, symx);
1321
+ const cord2x = $get_2(this$static, 10) % 20160;
1322
+ return symcord1x * 20160 + cord2x;
1323
+ }
1324
+ function $move_4(this$static, i_0) {
1325
+ this$static.isStd = false;
1326
+ switch (i_0) {
1327
+ case 0: {
1328
+ circle(this$static.edge, 0, 4, 1, 5);
1329
+ circle(this$static.edgeo, 0, 4, 1, 5);
1330
+ break;
1331
+ }
1332
+ case 1: {
1333
+ $swap_0(this$static.edge, 0, 4, 1, 5);
1334
+ $swap_0(this$static.edgeo, 0, 4, 1, 5);
1335
+ break;
1336
+ }
1337
+ case 2: {
1338
+ circle(this$static.edge, 0, 5, 1, 4);
1339
+ circle(this$static.edgeo, 0, 5, 1, 4);
1340
+ break;
1341
+ }
1342
+ case 3: {
1343
+ $swap_0(this$static.edge, 5, 10, 6, 11);
1344
+ $swap_0(this$static.edgeo, 5, 10, 6, 11);
1345
+ break;
1346
+ }
1347
+ case 4: {
1348
+ circle(this$static.edge, 0, 11, 3, 8);
1349
+ circle(this$static.edgeo, 0, 11, 3, 8);
1350
+ break;
1351
+ }
1352
+ case 5: {
1353
+ $swap_0(this$static.edge, 0, 11, 3, 8);
1354
+ $swap_0(this$static.edgeo, 0, 11, 3, 8);
1355
+ break;
1356
+ }
1357
+ case 6: {
1358
+ circle(this$static.edge, 0, 8, 3, 11);
1359
+ circle(this$static.edgeo, 0, 8, 3, 11);
1360
+ break;
1361
+ }
1362
+ case 7: {
1363
+ circle(this$static.edge, 2, 7, 3, 6);
1364
+ circle(this$static.edgeo, 2, 7, 3, 6);
1365
+ break;
1366
+ }
1367
+ case 8: {
1368
+ $swap_0(this$static.edge, 2, 7, 3, 6);
1369
+ $swap_0(this$static.edgeo, 2, 7, 3, 6);
1370
+ break;
1371
+ }
1372
+ case 9: {
1373
+ circle(this$static.edge, 2, 6, 3, 7);
1374
+ circle(this$static.edgeo, 2, 6, 3, 7);
1375
+ break;
1376
+ }
1377
+ case 10: {
1378
+ $swap_0(this$static.edge, 4, 8, 7, 9);
1379
+ $swap_0(this$static.edgeo, 4, 8, 7, 9);
1380
+ break;
1381
+ }
1382
+ case 11: {
1383
+ circle(this$static.edge, 1, 9, 2, 10);
1384
+ circle(this$static.edgeo, 1, 9, 2, 10);
1385
+ break;
1386
+ }
1387
+ case 12: {
1388
+ $swap_0(this$static.edge, 1, 9, 2, 10);
1389
+ $swap_0(this$static.edgeo, 1, 9, 2, 10);
1390
+ break;
1391
+ }
1392
+ case 13: {
1393
+ circle(this$static.edge, 1, 10, 2, 9);
1394
+ circle(this$static.edgeo, 1, 10, 2, 9);
1395
+ break;
1396
+ }
1397
+ case 14: {
1398
+ $swap_0(this$static.edge, 0, 4, 1, 5);
1399
+ $swap_0(this$static.edgeo, 0, 4, 1, 5);
1400
+ circle(this$static.edge, 9, 11);
1401
+ circle(this$static.edgeo, 8, 10);
1402
+ break;
1403
+ }
1404
+ case 15: {
1405
+ $swap_0(this$static.edge, 5, 10, 6, 11);
1406
+ $swap_0(this$static.edgeo, 5, 10, 6, 11);
1407
+ circle(this$static.edge, 1, 3);
1408
+ circle(this$static.edgeo, 0, 2);
1409
+ break;
1410
+ }
1411
+ case 16: {
1412
+ $swap_0(this$static.edge, 0, 11, 3, 8);
1413
+ $swap_0(this$static.edgeo, 0, 11, 3, 8);
1414
+ circle(this$static.edge, 5, 7);
1415
+ circle(this$static.edgeo, 4, 6);
1416
+ break;
1417
+ }
1418
+ case 17: {
1419
+ $swap_0(this$static.edge, 2, 7, 3, 6);
1420
+ $swap_0(this$static.edgeo, 2, 7, 3, 6);
1421
+ circle(this$static.edge, 8, 10);
1422
+ circle(this$static.edgeo, 9, 11);
1423
+ break;
1424
+ }
1425
+ case 18: {
1426
+ $swap_0(this$static.edge, 4, 8, 7, 9);
1427
+ $swap_0(this$static.edgeo, 4, 8, 7, 9);
1428
+ circle(this$static.edge, 0, 2);
1429
+ circle(this$static.edgeo, 1, 3);
1430
+ break;
1431
+ }
1432
+ case 19: {
1433
+ $swap_0(this$static.edge, 1, 9, 2, 10);
1434
+ $swap_0(this$static.edgeo, 1, 9, 2, 10);
1435
+ circle(this$static.edge, 4, 6);
1436
+ circle(this$static.edgeo, 5, 7);
1437
+ }
1438
+ }
1439
+ }
1440
+ function $rot_1(this$static, r) {
1441
+ this$static.isStd = false;
1442
+ switch (r) {
1443
+ case 0: {
1444
+ $move_4(this$static, 14);
1445
+ $move_4(this$static, 17);
1446
+ break;
1447
+ }
1448
+ case 1: {
1449
+ $circlex(this$static, 11, 5, 10, 6);
1450
+ $circlex(this$static, 5, 10, 6, 11);
1451
+ $circlex(this$static, 1, 2, 3, 0);
1452
+ $circlex(this$static, 4, 9, 7, 8);
1453
+ $circlex(this$static, 8, 4, 9, 7);
1454
+ $circlex(this$static, 0, 1, 2, 3);
1455
+ break;
1456
+ }
1457
+ case 2: {
1458
+ $swapx(this$static, 4, 5);
1459
+ $swapx(this$static, 5, 4);
1460
+ $swapx(this$static, 11, 8);
1461
+ $swapx(this$static, 8, 11);
1462
+ $swapx(this$static, 7, 6);
1463
+ $swapx(this$static, 6, 7);
1464
+ $swapx(this$static, 9, 10);
1465
+ $swapx(this$static, 10, 9);
1466
+ $swapx(this$static, 1, 1);
1467
+ $swapx(this$static, 0, 0);
1468
+ $swapx(this$static, 3, 3);
1469
+ $swapx(this$static, 2, 2);
1470
+ }
1471
+ }
1472
+ }
1473
+ function $rotate_0(this$static, r) {
1474
+ while (r >= 2) {
1475
+ r -= 2;
1476
+ $rot_1(this$static, 1);
1477
+ $rot_1(this$static, 2);
1478
+ }
1479
+ r !== 0 && $rot_1(this$static, 0);
1480
+ }
1481
+ function $set_4(this$static, idx) {
1482
+ let i_0;
1483
+ let p_0;
1484
+ let parity;
1485
+ let v;
1486
+ let vall;
1487
+ let valh;
1488
+ vall = 1985229328;
1489
+ valh = 47768;
1490
+ parity = 0;
1491
+ for (i_0 = 0; i_0 < 11; ++i_0) {
1492
+ p_0 = factX[11 - i_0];
1493
+ v = ~~(idx / p_0);
1494
+ idx = idx % p_0;
1495
+ parity ^= v;
1496
+ v <<= 2;
1497
+ if (v >= 32) {
1498
+ v = v - 32;
1499
+ this$static.edge[i_0] = valh >> v & 15;
1500
+ const m = (1 << v) - 1;
1501
+ valh = (valh & m) + (valh >> 4 & ~m);
1502
+ } else {
1503
+ this$static.edge[i_0] = vall >> v & 15;
1504
+ const m = (1 << v) - 1;
1505
+ vall = (vall & m) + (vall >>> 4 & ~m) + (valh << 28);
1506
+ valh = valh >> 4;
1507
+ }
1508
+ }
1509
+ if ((parity & 1) === 0) {
1510
+ this$static.edge[11] = vall;
1511
+ } else {
1512
+ this$static.edge[11] = this$static.edge[10];
1513
+ this$static.edge[10] = vall;
1514
+ }
1515
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1516
+ this$static.edgeo[i_0] = i_0;
1517
+ }
1518
+ this$static.isStd = true;
1519
+ }
1520
+ function $set_5(this$static, e) {
1521
+ let i_0;
1522
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1523
+ this$static.edge[i_0] = e.edge[i_0];
1524
+ this$static.edgeo[i_0] = e.edgeo[i_0];
1525
+ }
1526
+ this$static.isStd = e.isStd;
1527
+ }
1528
+ function $set_6(this$static, c) {
1529
+ let i_0;
1530
+ let parity;
1531
+ let s;
1532
+ let t;
1533
+ this$static.temp === null && (this$static.temp = createArray(12));
1534
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1535
+ this$static.temp[i_0] = i_0;
1536
+ this$static.edge[i_0] = c.ep[FullEdgeMap[i_0] + 12] % 12;
1537
+ }
1538
+ parity = 1;
1539
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1540
+ while (this$static.edge[i_0] !== i_0) {
1541
+ t = this$static.edge[i_0];
1542
+ this$static.edge[i_0] = this$static.edge[t];
1543
+ this$static.edge[t] = t;
1544
+ s = this$static.temp[i_0];
1545
+ this$static.temp[i_0] = this$static.temp[t];
1546
+ this$static.temp[t] = s;
1547
+ parity ^= 1;
1548
+ }
1549
+ }
1550
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1551
+ this$static.edge[i_0] = this$static.temp[c.ep[FullEdgeMap[i_0]] % 12];
1552
+ }
1553
+ return parity;
1554
+ }
1555
+ function $std(this$static) {
1556
+ let i_0;
1557
+ this$static.temp === null && (this$static.temp = createArray(12));
1558
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1559
+ this$static.temp[this$static.edgeo[i_0]] = i_0;
1560
+ }
1561
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1562
+ this$static.edge[i_0] = this$static.temp[this$static.edge[i_0]];
1563
+ this$static.edgeo[i_0] = i_0;
1564
+ }
1565
+ this$static.isStd = true;
1566
+ }
1567
+ function $swap_0(arr, a, b, c, d) {
1568
+ let temp;
1569
+ temp = arr[a];
1570
+ arr[a] = arr[c];
1571
+ arr[c] = temp;
1572
+ temp = arr[b];
1573
+ arr[b] = arr[d];
1574
+ arr[d] = temp;
1575
+ }
1576
+ function $swapx(this$static, x, y) {
1577
+ const temp = this$static.edge[x];
1578
+ this$static.edge[x] = this$static.edgeo[y];
1579
+ this$static.edgeo[y] = temp;
1580
+ }
1581
+ function Edge3_0() {
1582
+ this.edge = createArray(12);
1583
+ this.edgeo = createArray(12);
1584
+ }
1585
+ function createPrun_0() {
1586
+ let chk;
1587
+ let cord1;
1588
+ let cord1x;
1589
+ let cord2;
1590
+ let cord2x;
1591
+ let dep1m3;
1592
+ let depm3;
1593
+ let depth;
1594
+ let end;
1595
+ let find_0;
1596
+ let i_0;
1597
+ let i_;
1598
+ let idx;
1599
+ let idxx;
1600
+ let inv;
1601
+ let j;
1602
+ let m_0;
1603
+ let symState;
1604
+ let symcord1;
1605
+ let symcord1x;
1606
+ let symx;
1607
+ let val;
1608
+ const e = new Edge3_0();
1609
+ const f = new Edge3_0();
1610
+ const g = new Edge3_0();
1611
+ fill_0(eprun);
1612
+ depth = 0;
1613
+ done_0 = 1;
1614
+ setPruning_0(eprun, 0, 0);
1615
+ while (done_0 !== 31006080) {
1616
+ inv = depth > 9;
1617
+ depm3 = depth % 3;
1618
+ dep1m3 = (depth + 1) % 3;
1619
+ find_0 = inv ? 3 : depm3;
1620
+ chk = inv ? depm3 : 3;
1621
+ if (depth >= 9) {
1622
+ break;
1623
+ }
1624
+ for (i_ = 0; i_ < 31006080; i_ += 16) {
1625
+ val = eprun[~~i_ >> 4];
1626
+ if (!inv && val === -1) {
1627
+ continue;
1628
+ }
1629
+ for (i_0 = i_, end = i_ + 16; i_0 < end; ++i_0, val >>= 2) {
1630
+ if ((val & 3) !== find_0) {
1631
+ continue;
1632
+ }
1633
+ symcord1 = ~~(i_0 / 20160);
1634
+ cord1 = sym2raw_0[symcord1];
1635
+ cord2 = i_0 % 20160;
1636
+ $set_4(e, cord1 * 20160 + cord2);
1637
+ for (m_0 = 0; m_0 < 17; ++m_0) {
1638
+ cord1x = getmvrot(e.edge, m_0 << 3, 4);
1639
+ symcord1x = raw2sym_1[cord1x];
1640
+ symx = symcord1x & 7;
1641
+ symcord1x >>= 3;
1642
+ cord2x = getmvrot(e.edge, m_0 << 3 | symx, 10) % 20160;
1643
+ idx = symcord1x * 20160 + cord2x;
1644
+ if (getPruning_0(eprun, idx) !== chk) {
1645
+ continue;
1646
+ }
1647
+ setPruning_0(eprun, inv ? i_0 : idx, dep1m3);
1648
+ ++done_0;
1649
+ if (inv) {
1650
+ break;
1651
+ }
1652
+ symState = symstate[symcord1x];
1653
+ if (symState === 1) {
1654
+ continue;
1655
+ }
1656
+ $set_5(f, e);
1657
+ $move_4(f, m_0);
1658
+ $rotate_0(f, symx);
1659
+ for (j = 1; (symState = ~~symState >> 1 & 65535) !== 0; ++j) {
1660
+ if ((symState & 1) !== 1) {
1661
+ continue;
1662
+ }
1663
+ $set_5(g, f);
1664
+ $rotate_0(g, j);
1665
+ idxx = symcord1x * 20160 + $get_2(g, 10) % 20160;
1666
+ if (getPruning_0(eprun, idxx) === chk) {
1667
+ setPruning_0(eprun, idxx, dep1m3);
1668
+ ++done_0;
1669
+ }
1670
+ }
1671
+ }
1672
+ }
1673
+ }
1674
+ ++depth;
1675
+ }
1676
+ }
1677
+ function getPruning_0(table, index) {
1678
+ return table[index >> 4] >> ((index & 15) << 1) & 3;
1679
+ }
1680
+ function getmvrot(ep, mrIdx, end) {
1681
+ let i_0;
1682
+ let idx;
1683
+ let v;
1684
+ let valh;
1685
+ let vall;
1686
+ const movo = mvroto[mrIdx];
1687
+ const mov = mvrot[mrIdx];
1688
+ idx = 0;
1689
+ vall = 1985229328;
1690
+ valh = 47768;
1691
+ for (i_0 = 0; i_0 < end; ++i_0) {
1692
+ v = movo[ep[mov[i_0]]] << 2;
1693
+ idx *= 12 - i_0;
1694
+ if (v >= 32) {
1695
+ idx += valh >> v - 32 & 15;
1696
+ valh -= 4368 << v - 32;
1697
+ } else {
1698
+ idx += vall >> v & 15;
1699
+ valh -= 4369;
1700
+ vall -= 286331152 << v;
1701
+ }
1702
+ }
1703
+ return idx;
1704
+ }
1705
+ function getprun(edge) {
1706
+ let cord1;
1707
+ let cord1x;
1708
+ let cord2;
1709
+ let cord2x;
1710
+ let depm3;
1711
+ let depth;
1712
+ let idx;
1713
+ let m_0;
1714
+ let symcord1;
1715
+ let symcord1x;
1716
+ let symx;
1717
+ const e = new Edge3_0();
1718
+ depth = 0;
1719
+ depm3 = getPruning_0(eprun, edge);
1720
+ if (depm3 === 3) {
1721
+ return 10;
1722
+ }
1723
+ while (edge !== 0) {
1724
+ depm3 === 0 ? depm3 = 2 : --depm3;
1725
+ symcord1 = ~~(edge / 20160);
1726
+ cord1 = sym2raw_0[symcord1];
1727
+ cord2 = edge % 20160;
1728
+ $set_4(e, cord1 * 20160 + cord2);
1729
+ for (m_0 = 0; m_0 < 17; ++m_0) {
1730
+ cord1x = getmvrot(e.edge, m_0 << 3, 4);
1731
+ symcord1x = raw2sym_1[cord1x];
1732
+ symx = symcord1x & 7;
1733
+ symcord1x >>= 3;
1734
+ cord2x = getmvrot(e.edge, m_0 << 3 | symx, 10) % 20160;
1735
+ idx = symcord1x * 20160 + cord2x;
1736
+ if (getPruning_0(eprun, idx) === depm3) {
1737
+ ++depth;
1738
+ edge = idx;
1739
+ break;
1740
+ }
1741
+ }
1742
+ }
1743
+ return depth;
1744
+ }
1745
+ function getprun_0(edge, prun) {
1746
+ const depm3 = getPruning_0(eprun, edge);
1747
+ if (depm3 === 3) {
1748
+ return 10;
1749
+ }
1750
+ return (1227133513 << depm3 >> prun & 3) + prun - 1;
1751
+ }
1752
+ function initMvrot() {
1753
+ let i_0;
1754
+ let m_0;
1755
+ let r;
1756
+ const e = new Edge3_0();
1757
+ for (m_0 = 0; m_0 < 20; ++m_0) {
1758
+ for (r = 0; r < 8; ++r) {
1759
+ $set_4(e, 0);
1760
+ $move_4(e, m_0);
1761
+ $rotate_0(e, r);
1762
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1763
+ mvrot[m_0 << 3 | r][i_0] = e.edge[i_0];
1764
+ }
1765
+ $std(e);
1766
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1767
+ mvroto[m_0 << 3 | r][i_0] = e.temp[i_0];
1768
+ }
1769
+ }
1770
+ }
1771
+ }
1772
+ function initRaw2Sym() {
1773
+ let count;
1774
+ let i_0;
1775
+ let idx;
1776
+ let j;
1777
+ const e = new Edge3_0();
1778
+ const occ = createArray(1485);
1779
+ for (i_0 = 0; i_0 < 1485; i_0++) {
1780
+ occ[i_0] = 0;
1781
+ }
1782
+ count = 0;
1783
+ for (i_0 = 0; i_0 < 11880; ++i_0) {
1784
+ if ((occ[~~i_0 >>> 3] & 1 << (i_0 & 7)) === 0) {
1785
+ $set_4(e, i_0 * factX[8]);
1786
+ for (j = 0; j < 8; ++j) {
1787
+ idx = $get_2(e, 4);
1788
+ idx === i_0 && (symstate[count] = (symstate[count] | 1 << j) & 65535);
1789
+ occ[~~idx >> 3] = occ[~~idx >> 3] | 1 << (idx & 7);
1790
+ raw2sym_1[idx] = count << 3 | syminv_0[j];
1791
+ $rot_1(e, 0);
1792
+ if (j % 2 === 1) {
1793
+ $rot_1(e, 1);
1794
+ $rot_1(e, 2);
1795
+ }
1796
+ }
1797
+ sym2raw_0[count++] = i_0;
1798
+ }
1799
+ }
1800
+ }
1801
+ function setPruning_0(table, index, value) {
1802
+ table[index >> 4] ^= (3 ^ value) << ((index & 15) << 1);
1803
+ }
1804
+ defineSeed(158, 1, makeCastMap([Q$Edge3]), Edge3_0);
1805
+ _.isStd = true;
1806
+ _.temp = null;
1807
+ var FullEdgeMap;
1808
+ var done_0 = 0;
1809
+ var eprun;
1810
+ var factX;
1811
+ var mvrot;
1812
+ var mvroto;
1813
+ var raw2sym_1;
1814
+ var sym2raw_0;
1815
+ var syminv_0;
1816
+ var symstate;
1817
+ var ran$clinit_EdgeCube = false;
1818
+ function $clinit_EdgeCube() {
1819
+ if (ran$clinit_EdgeCube) {
1820
+ return;
1821
+ }
1822
+ ran$clinit_EdgeCube = true;
1823
+ }
1824
+ function $checkEdge(this$static) {
1825
+ let ck;
1826
+ let i_0;
1827
+ let parity;
1828
+ ck = 0;
1829
+ parity = false;
1830
+ for (i_0 = 0; i_0 < 12; ++i_0) {
1831
+ ck |= 1 << this$static.ep[i_0];
1832
+ parity = parity !== this$static.ep[i_0] >= 12;
1833
+ }
1834
+ ck &= ~~ck >> 12;
1835
+ return ck === 0 && !parity;
1836
+ }
1837
+ function $copy_3(this$static, c) {
1838
+ let i_0;
1839
+ for (i_0 = 0; i_0 < 24; ++i_0) {
1840
+ this$static.ep[i_0] = c.ep[i_0];
1841
+ }
1842
+ }
1843
+ function $move_5(this$static, m_0) {
1844
+ const key = m_0 % 3;
1845
+ m_0 = ~~(m_0 / 3);
1846
+ switch (m_0) {
1847
+ case 0: {
1848
+ swap(this$static.ep, 0, 1, 2, 3, key);
1849
+ swap(this$static.ep, 12, 13, 14, 15, key);
1850
+ break;
1851
+ }
1852
+ case 1: {
1853
+ swap(this$static.ep, 11, 15, 10, 19, key);
1854
+ swap(this$static.ep, 23, 3, 22, 7, key);
1855
+ break;
1856
+ }
1857
+ case 2: {
1858
+ swap(this$static.ep, 0, 11, 6, 8, key);
1859
+ swap(this$static.ep, 12, 23, 18, 20, key);
1860
+ break;
1861
+ }
1862
+ case 3: {
1863
+ swap(this$static.ep, 4, 5, 6, 7, key);
1864
+ swap(this$static.ep, 16, 17, 18, 19, key);
1865
+ break;
1866
+ }
1867
+ case 4: {
1868
+ swap(this$static.ep, 1, 20, 5, 21, key);
1869
+ swap(this$static.ep, 13, 8, 17, 9, key);
1870
+ break;
1871
+ }
1872
+ case 5: {
1873
+ swap(this$static.ep, 2, 9, 4, 10, key);
1874
+ swap(this$static.ep, 14, 21, 16, 22, key);
1875
+ break;
1876
+ }
1877
+ case 6: {
1878
+ swap(this$static.ep, 0, 1, 2, 3, key);
1879
+ swap(this$static.ep, 12, 13, 14, 15, key);
1880
+ swap(this$static.ep, 9, 22, 11, 20, key);
1881
+ break;
1882
+ }
1883
+ case 7: {
1884
+ swap(this$static.ep, 11, 15, 10, 19, key);
1885
+ swap(this$static.ep, 23, 3, 22, 7, key);
1886
+ swap(this$static.ep, 2, 16, 6, 12, key);
1887
+ break;
1888
+ }
1889
+ case 8: {
1890
+ swap(this$static.ep, 0, 11, 6, 8, key);
1891
+ swap(this$static.ep, 12, 23, 18, 20, key);
1892
+ swap(this$static.ep, 3, 19, 5, 13, key);
1893
+ break;
1894
+ }
1895
+ case 9: {
1896
+ swap(this$static.ep, 4, 5, 6, 7, key);
1897
+ swap(this$static.ep, 16, 17, 18, 19, key);
1898
+ swap(this$static.ep, 8, 23, 10, 21, key);
1899
+ break;
1900
+ }
1901
+ case 10: {
1902
+ swap(this$static.ep, 1, 20, 5, 21, key);
1903
+ swap(this$static.ep, 13, 8, 17, 9, key);
1904
+ swap(this$static.ep, 14, 0, 18, 4, key);
1905
+ break;
1906
+ }
1907
+ case 11: {
1908
+ swap(this$static.ep, 2, 9, 4, 10, key);
1909
+ swap(this$static.ep, 14, 21, 16, 22, key);
1910
+ swap(this$static.ep, 7, 15, 1, 17, key);
1911
+ }
1912
+ }
1913
+ }
1914
+ function EdgeCube_0() {
1915
+ let i_0;
1916
+ this.ep = createArray(24);
1917
+ for (i_0 = 0; i_0 < 24; ++i_0) {
1918
+ this.ep[i_0] = i_0;
1919
+ }
1920
+ }
1921
+ function EdgeCube_1() {
1922
+ let i_0;
1923
+ let m_0;
1924
+ let t;
1925
+ EdgeCube_0.call(this);
1926
+ for (i_0 = 0; i_0 < 23; ++i_0) {
1927
+ t = i_0 + randomUIntBelow(24 - i_0);
1928
+ if (t !== i_0) {
1929
+ m_0 = this.ep[i_0];
1930
+ this.ep[i_0] = this.ep[t];
1931
+ this.ep[t] = m_0;
1932
+ }
1933
+ }
1934
+ }
1935
+ defineSeed(159, 1, {}, EdgeCube_0, EdgeCube_1);
1936
+ var ran$clinit_FullCube_0 = false;
1937
+ function $clinit_FullCube_0() {
1938
+ if (ran$clinit_FullCube_0) {
1939
+ return;
1940
+ }
1941
+ ran$clinit_FullCube_0 = true;
1942
+ move2rot = [35, 1, 34, 2, 4, 6, 22, 5, 19];
1943
+ }
1944
+ function $$init_3(this$static) {
1945
+ this$static.moveBuffer = createArray(60);
1946
+ }
1947
+ function $compareTo_1(this$static, c) {
1948
+ return this$static.value - c.value;
1949
+ }
1950
+ function $copy_4(this$static, c) {
1951
+ let i_0;
1952
+ $copy_3(this$static.edge, c.edge);
1953
+ $copy_1(this$static.center, c.center);
1954
+ $copy_2(this$static.corner, c.corner);
1955
+ this$static.value = c.value;
1956
+ this$static.add1 = c.add1;
1957
+ this$static.length1 = c.length1;
1958
+ this$static.length2 = c.length2;
1959
+ this$static.length3 = c.length3;
1960
+ this$static.sym = c.sym;
1961
+ for (i_0 = 0; i_0 < 60; ++i_0) {
1962
+ this$static.moveBuffer[i_0] = c.moveBuffer[i_0];
1963
+ }
1964
+ this$static.moveLength = c.moveLength;
1965
+ this$static.edgeAvail = c.edgeAvail;
1966
+ this$static.centerAvail = c.centerAvail;
1967
+ this$static.cornerAvail = c.cornerAvail;
1968
+ }
1969
+ function $getCenter(this$static) {
1970
+ while (this$static.centerAvail < this$static.moveLength) {
1971
+ $move_2(
1972
+ this$static.center,
1973
+ this$static.moveBuffer[this$static.centerAvail++]
1974
+ );
1975
+ }
1976
+ return this$static.center;
1977
+ }
1978
+ function $getCorner(this$static) {
1979
+ while (this$static.cornerAvail < this$static.moveLength) {
1980
+ $move_3(
1981
+ this$static.corner,
1982
+ this$static.moveBuffer[this$static.cornerAvail++] % 18
1983
+ );
1984
+ }
1985
+ return this$static.corner;
1986
+ }
1987
+ function $getEdge(this$static) {
1988
+ while (this$static.edgeAvail < this$static.moveLength) {
1989
+ $move_5(this$static.edge, this$static.moveBuffer[this$static.edgeAvail++]);
1990
+ }
1991
+ return this$static.edge;
1992
+ }
1993
+ function $getMoveString(this$static) {
1994
+ let i_0;
1995
+ let idx;
1996
+ let move;
1997
+ let rot;
1998
+ let sb;
1999
+ let sym;
2000
+ const fixedMoves = new Array(
2001
+ this$static.moveLength - (this$static.add1 ? 2 : 0)
2002
+ );
2003
+ idx = 0;
2004
+ for (i_0 = 0; i_0 < this$static.length1; ++i_0) {
2005
+ fixedMoves[idx++] = this$static.moveBuffer[i_0];
2006
+ }
2007
+ sym = this$static.sym;
2008
+ for (i_0 = this$static.length1 + (this$static.add1 ? 2 : 0); i_0 < this$static.moveLength; ++i_0) {
2009
+ if (symmove[sym][this$static.moveBuffer[i_0]] >= 27) {
2010
+ fixedMoves[idx++] = symmove[sym][this$static.moveBuffer[i_0]] - 9;
2011
+ rot = move2rot[symmove[sym][this$static.moveBuffer[i_0]] - 27];
2012
+ sym = symmult[sym][rot];
2013
+ } else {
2014
+ fixedMoves[idx++] = symmove[sym][this$static.moveBuffer[i_0]];
2015
+ }
2016
+ }
2017
+ const finishSym = symmult[syminv[sym]][getSolvedSym($getCenter(this$static))];
2018
+ sb = "";
2019
+ sym = finishSym;
2020
+ for (i_0 = idx - 1; i_0 >= 0; --i_0) {
2021
+ move = fixedMoves[i_0];
2022
+ move = ~~(move / 3) * 3 + (2 - move % 3);
2023
+ if (symmove[sym][move] >= 27) {
2024
+ sb = `${sb}${move2str_1[symmove[sym][move] - 9]} `;
2025
+ rot = move2rot[symmove[sym][move] - 27];
2026
+ sym = symmult[sym][rot];
2027
+ } else {
2028
+ sb = `${sb}${move2str_1[symmove[sym][move]]} `;
2029
+ }
2030
+ }
2031
+ return sb;
2032
+ }
2033
+ function $move_6(this$static, m_0) {
2034
+ this$static.moveBuffer[this$static.moveLength++] = m_0;
2035
+ return;
2036
+ }
2037
+ function FullCube_3() {
2038
+ $$init_3(this);
2039
+ this.edge = new EdgeCube_0();
2040
+ this.center = new CenterCube_0();
2041
+ this.corner = new CornerCube_0();
2042
+ }
2043
+ function FullCube_4(c) {
2044
+ FullCube_3.call(this);
2045
+ $copy_4(this, c);
2046
+ }
2047
+ function FullCube_5() {
2048
+ $$init_3(this);
2049
+ this.edge = new EdgeCube_1();
2050
+ this.center = new CenterCube_1();
2051
+ this.corner = new CornerCube_2();
2052
+ }
2053
+ defineSeed(
2054
+ 160,
2055
+ 1,
2056
+ makeCastMap([Q$FullCube_0, Q$Comparable]),
2057
+ FullCube_3,
2058
+ FullCube_4,
2059
+ FullCube_5
2060
+ );
2061
+ _.compareTo$ = function compareTo_1(c) {
2062
+ return $compareTo_1(this, c);
2063
+ };
2064
+ _.add1 = false;
2065
+ _.center = null;
2066
+ _.centerAvail = 0;
2067
+ _.corner = null;
2068
+ _.cornerAvail = 0;
2069
+ _.edge = null;
2070
+ _.edgeAvail = 0;
2071
+ _.length1 = 0;
2072
+ _.length2 = 0;
2073
+ _.length3 = 0;
2074
+ _.moveLength = 0;
2075
+ _.sym = 0;
2076
+ _.value = 0;
2077
+ var move2rot;
2078
+ function $compare(c1, c2) {
2079
+ return c2.value - c1.value;
2080
+ }
2081
+ function $compare_0(c1, c2) {
2082
+ return $compare(c1, c2);
2083
+ }
2084
+ function FullCube$ValueComparator_0() {
2085
+ }
2086
+ defineSeed(161, 1, {}, FullCube$ValueComparator_0);
2087
+ _.compare = function compare(c1, c2) {
2088
+ return $compare_0(c1, c2);
2089
+ };
2090
+ var ran$clinit_Moves = false;
2091
+ function $clinit_Moves() {
2092
+ if (ran$clinit_Moves) {
2093
+ return;
2094
+ }
2095
+ ran$clinit_Moves = true;
2096
+ let i_0;
2097
+ let j;
2098
+ move2str_1 = [
2099
+ "U ",
2100
+ "U2 ",
2101
+ "U' ",
2102
+ "R ",
2103
+ "R2 ",
2104
+ "R' ",
2105
+ "F ",
2106
+ "F2 ",
2107
+ "F' ",
2108
+ "D ",
2109
+ "D2 ",
2110
+ "D' ",
2111
+ "L ",
2112
+ "L2 ",
2113
+ "L' ",
2114
+ "B ",
2115
+ "B2 ",
2116
+ "B' ",
2117
+ "Uw ",
2118
+ "Uw2",
2119
+ "Uw'",
2120
+ "Rw ",
2121
+ "Rw2",
2122
+ "Rw'",
2123
+ "Fw ",
2124
+ "Fw2",
2125
+ "Fw'",
2126
+ "Dw ",
2127
+ "Dw2",
2128
+ "Dw'",
2129
+ "Lw ",
2130
+ "Lw2",
2131
+ "Lw'",
2132
+ "Bw ",
2133
+ "Bw2",
2134
+ "Bw'"
2135
+ ];
2136
+ move2std = [
2137
+ 0,
2138
+ 1,
2139
+ 2,
2140
+ 3,
2141
+ 4,
2142
+ 5,
2143
+ 6,
2144
+ 7,
2145
+ 8,
2146
+ 9,
2147
+ 10,
2148
+ 11,
2149
+ 12,
2150
+ 13,
2151
+ 14,
2152
+ 15,
2153
+ 16,
2154
+ 17,
2155
+ 19,
2156
+ 21,
2157
+ 22,
2158
+ 23,
2159
+ 25,
2160
+ 28,
2161
+ 30,
2162
+ 31,
2163
+ 32,
2164
+ 34,
2165
+ 36
2166
+ ];
2167
+ move3std = [
2168
+ 0,
2169
+ 1,
2170
+ 2,
2171
+ 4,
2172
+ 6,
2173
+ 7,
2174
+ 8,
2175
+ 9,
2176
+ 10,
2177
+ 11,
2178
+ 13,
2179
+ 15,
2180
+ 16,
2181
+ 17,
2182
+ 19,
2183
+ 22,
2184
+ 25,
2185
+ 28,
2186
+ 31,
2187
+ 34,
2188
+ 36
2189
+ ];
2190
+ std2move = createArray(37);
2191
+ std3move = createArray(37);
2192
+ ckmv = createArray(37, 36);
2193
+ ckmv2_0 = createArray(29, 28);
2194
+ ckmv3 = createArray(21, 20);
2195
+ skipAxis = createArray(36);
2196
+ skipAxis2 = createArray(28);
2197
+ skipAxis3 = createArray(20);
2198
+ for (i_0 = 0; i_0 < 29; ++i_0) {
2199
+ std2move[move2std[i_0]] = i_0;
2200
+ }
2201
+ for (i_0 = 0; i_0 < 21; ++i_0) {
2202
+ std3move[move3std[i_0]] = i_0;
2203
+ }
2204
+ for (i_0 = 0; i_0 < 36; ++i_0) {
2205
+ for (j = 0; j < 36; ++j) {
2206
+ ckmv[i_0][j] = ~~(i_0 / 3) === ~~(j / 3) || ~~(i_0 / 3) % 3 === ~~(j / 3) % 3 && i_0 > j;
2207
+ }
2208
+ ckmv[36][i_0] = false;
2209
+ }
2210
+ for (i_0 = 0; i_0 < 29; ++i_0) {
2211
+ for (j = 0; j < 28; ++j) {
2212
+ ckmv2_0[i_0][j] = ckmv[move2std[i_0]][move2std[j]];
2213
+ }
2214
+ }
2215
+ for (i_0 = 0; i_0 < 21; ++i_0) {
2216
+ for (j = 0; j < 20; ++j) {
2217
+ ckmv3[i_0][j] = ckmv[move3std[i_0]][move3std[j]];
2218
+ }
2219
+ }
2220
+ for (i_0 = 0; i_0 < 36; ++i_0) {
2221
+ skipAxis[i_0] = 36;
2222
+ for (j = i_0; j < 36; ++j) {
2223
+ if (!ckmv[i_0][j]) {
2224
+ skipAxis[i_0] = j - 1;
2225
+ break;
2226
+ }
2227
+ }
2228
+ }
2229
+ for (i_0 = 0; i_0 < 28; ++i_0) {
2230
+ skipAxis2[i_0] = 28;
2231
+ for (j = i_0; j < 28; ++j) {
2232
+ if (!ckmv2_0[i_0][j]) {
2233
+ skipAxis2[i_0] = j - 1;
2234
+ break;
2235
+ }
2236
+ }
2237
+ }
2238
+ for (i_0 = 0; i_0 < 20; ++i_0) {
2239
+ skipAxis3[i_0] = 20;
2240
+ for (j = i_0; j < 20; ++j) {
2241
+ if (!ckmv3[i_0][j]) {
2242
+ skipAxis3[i_0] = j - 1;
2243
+ break;
2244
+ }
2245
+ }
2246
+ }
2247
+ }
2248
+ var ckmv;
2249
+ var ckmv2_0;
2250
+ var ckmv3;
2251
+ var move2std;
2252
+ var move2str_1;
2253
+ var move3std;
2254
+ var skipAxis;
2255
+ var skipAxis2;
2256
+ var skipAxis3;
2257
+ var std2move;
2258
+ var std3move;
2259
+ function $doSearch(this$static) {
2260
+ let MAX_LENGTH2;
2261
+ let MAX_LENGTH3;
2262
+ let ct;
2263
+ let edge;
2264
+ let eparity;
2265
+ let i_0;
2266
+ let index;
2267
+ let length12;
2268
+ let length123;
2269
+ let prun;
2270
+ let s2ct;
2271
+ let s2rl;
2272
+ this$static.solution = "";
2273
+ const ud = $getsym(new Center1_1($getCenter(this$static.c), 0));
2274
+ const fb = $getsym(new Center1_1($getCenter(this$static.c), 1));
2275
+ const rl = $getsym(new Center1_1($getCenter(this$static.c), 2));
2276
+ const udprun = csprun[~~ud >> 6];
2277
+ const fbprun = csprun[~~fb >> 6];
2278
+ const rlprun = csprun[~~rl >> 6];
2279
+ this$static.p1SolsCnt = 0;
2280
+ this$static.arr2idx = 0;
2281
+ $clear(this$static.p1sols.heap);
2282
+ for (this$static.length1 = (udprun < fbprun ? udprun : fbprun) < rlprun ? udprun < fbprun ? udprun : fbprun : rlprun; this$static.length1 < 100; ++this$static.length1) {
2283
+ if (rlprun <= this$static.length1 && $search1(
2284
+ this$static,
2285
+ ~~rl >>> 6,
2286
+ rl & 63,
2287
+ this$static.length1,
2288
+ -1,
2289
+ 0
2290
+ ) || udprun <= this$static.length1 && $search1(
2291
+ this$static,
2292
+ ~~ud >>> 6,
2293
+ ud & 63,
2294
+ this$static.length1,
2295
+ -1,
2296
+ 0
2297
+ ) || fbprun <= this$static.length1 && $search1(this$static, ~~fb >>> 6, fb & 63, this$static.length1, -1, 0)) {
2298
+ break;
2299
+ }
2300
+ }
2301
+ const p1SolsArr = $toArray_1(
2302
+ this$static.p1sols,
2303
+ initDim(
2304
+ _3Lcs_threephase_FullCube_2_classLit,
2305
+ makeCastMap([Q$FullCube_$1, Q$Serializable, Q$Object_$1]),
2306
+ Q$FullCube_0,
2307
+ 0,
2308
+ 0
2309
+ )
2310
+ );
2311
+ p1SolsArr.sort(function(a, b) {
2312
+ return a.value - b.value;
2313
+ });
2314
+ MAX_LENGTH2 = 9;
2315
+ do {
2316
+ OUT: for (length12 = p1SolsArr[0].value; length12 < 100; ++length12) {
2317
+ for (i_0 = 0; i_0 < p1SolsArr.length; ++i_0) {
2318
+ if (p1SolsArr[i_0].value > length12) {
2319
+ break;
2320
+ }
2321
+ if (length12 - p1SolsArr[i_0].length1 > MAX_LENGTH2) {
2322
+ continue;
2323
+ }
2324
+ $copy_4(this$static.c1, p1SolsArr[i_0]);
2325
+ $set_2(
2326
+ this$static.ct2,
2327
+ $getCenter(this$static.c1),
2328
+ parity_0($getEdge(this$static.c1).ep)
2329
+ );
2330
+ s2ct = $getct(this$static.ct2);
2331
+ s2rl = $getrl(this$static.ct2);
2332
+ this$static.length1 = p1SolsArr[i_0].length1;
2333
+ this$static.length2 = length12 - p1SolsArr[i_0].length1;
2334
+ if ($search2(this$static, s2ct, s2rl, this$static.length2, 28, 0)) {
2335
+ break OUT;
2336
+ }
2337
+ }
2338
+ }
2339
+ ++MAX_LENGTH2;
2340
+ } while (length12 === 100);
2341
+ this$static.arr2.sort(function(a, b) {
2342
+ return a.value - b.value;
2343
+ });
2344
+ index = 0;
2345
+ MAX_LENGTH3 = 13;
2346
+ do {
2347
+ OUT2: for (length123 = this$static.arr2[0].value; length123 < 100; ++length123) {
2348
+ for (i_0 = 0; i_0 < Math.min(this$static.arr2idx, 100); ++i_0) {
2349
+ if (this$static.arr2[i_0].value > length123) {
2350
+ break;
2351
+ }
2352
+ if (length123 - this$static.arr2[i_0].length1 - this$static.arr2[i_0].length2 > MAX_LENGTH3) {
2353
+ continue;
2354
+ }
2355
+ eparity = $set_6(this$static.e12, $getEdge(this$static.arr2[i_0]));
2356
+ $set_3(
2357
+ this$static.ct3,
2358
+ $getCenter(this$static.arr2[i_0]),
2359
+ eparity ^ parity_0($getCorner(this$static.arr2[i_0]).cp)
2360
+ );
2361
+ ct = $getct_0(this$static.ct3);
2362
+ edge = $get_2(this$static.e12, 10);
2363
+ prun = getprun($getsym_0(this$static.e12));
2364
+ if (prun <= length123 - this$static.arr2[i_0].length1 - this$static.arr2[i_0].length2 && $search3(
2365
+ this$static,
2366
+ edge,
2367
+ ct,
2368
+ prun,
2369
+ length123 - this$static.arr2[i_0].length1 - this$static.arr2[i_0].length2,
2370
+ 20,
2371
+ 0
2372
+ )) {
2373
+ index = i_0;
2374
+ break OUT2;
2375
+ }
2376
+ }
2377
+ }
2378
+ ++MAX_LENGTH3;
2379
+ } while (length123 === 100);
2380
+ const solcube = new FullCube_4(this$static.arr2[index]);
2381
+ this$static.length1 = solcube.length1;
2382
+ this$static.length2 = solcube.length2;
2383
+ const length_0 = length123 - this$static.length1 - this$static.length2;
2384
+ for (i_0 = 0; i_0 < length_0; ++i_0) {
2385
+ $move_6(solcube, move3std[this$static.move3[i_0]]);
2386
+ }
2387
+ this$static.solution = $getMoveString(solcube);
2388
+ }
2389
+ function $init2_0(this$static, sym) {
2390
+ let i_0;
2391
+ let next;
2392
+ $copy_4(this$static.c1, this$static.c);
2393
+ for (i_0 = 0; i_0 < this$static.length1; ++i_0) {
2394
+ $move_6(this$static.c1, this$static.move1[i_0]);
2395
+ }
2396
+ switch (finish_0[sym]) {
2397
+ case 0: {
2398
+ $move_6(this$static.c1, 24);
2399
+ $move_6(this$static.c1, 35);
2400
+ this$static.move1[this$static.length1] = 24;
2401
+ this$static.move1[this$static.length1 + 1] = 35;
2402
+ this$static.add1 = true;
2403
+ sym = 19;
2404
+ break;
2405
+ }
2406
+ case 12869: {
2407
+ $move_6(this$static.c1, 18);
2408
+ $move_6(this$static.c1, 29);
2409
+ this$static.move1[this$static.length1] = 18;
2410
+ this$static.move1[this$static.length1 + 1] = 29;
2411
+ this$static.add1 = true;
2412
+ sym = 34;
2413
+ break;
2414
+ }
2415
+ case 735470: {
2416
+ this$static.add1 = false;
2417
+ sym = 0;
2418
+ }
2419
+ }
2420
+ $set_2(
2421
+ this$static.ct2,
2422
+ $getCenter(this$static.c1),
2423
+ parity_0($getEdge(this$static.c1).ep)
2424
+ );
2425
+ const s2ct = $getct(this$static.ct2);
2426
+ const s2rl = $getrl(this$static.ct2);
2427
+ const ctp = ctprun[s2ct * 70 + s2rl];
2428
+ this$static.c1.value = ctp + this$static.length1;
2429
+ this$static.c1.length1 = this$static.length1;
2430
+ this$static.c1.add1 = this$static.add1;
2431
+ this$static.c1.sym = sym;
2432
+ ++this$static.p1SolsCnt;
2433
+ if (this$static.p1sols.heap.size < 500) {
2434
+ next = new FullCube_4(this$static.c1);
2435
+ } else {
2436
+ next = $poll(this$static.p1sols);
2437
+ next.value > this$static.c1.value && $copy_4(next, this$static.c1);
2438
+ }
2439
+ $add(this$static.p1sols, next);
2440
+ return this$static.p1SolsCnt === 1e4;
2441
+ }
2442
+ function $init3(this$static) {
2443
+ let i_0;
2444
+ $copy_4(this$static.c2, this$static.c1);
2445
+ for (i_0 = 0; i_0 < this$static.length2; ++i_0) {
2446
+ $move_6(this$static.c2, this$static.move2[i_0]);
2447
+ }
2448
+ if (!$checkEdge($getEdge(this$static.c2))) {
2449
+ return false;
2450
+ }
2451
+ const eparity = $set_6(this$static.e12, $getEdge(this$static.c2));
2452
+ $set_3(
2453
+ this$static.ct3,
2454
+ $getCenter(this$static.c2),
2455
+ eparity ^ parity_0($getCorner(this$static.c2).cp)
2456
+ );
2457
+ const ct = $getct_0(this$static.ct3);
2458
+ $get_2(this$static.e12, 10);
2459
+ const prun = getprun($getsym_0(this$static.e12));
2460
+ !this$static.arr2[this$static.arr2idx] ? this$static.arr2[this$static.arr2idx] = new FullCube_4(this$static.c2) : $copy_4(this$static.arr2[this$static.arr2idx], this$static.c2);
2461
+ this$static.arr2[this$static.arr2idx].value = this$static.length1 + this$static.length2 + Math.max(prun, prun_0[ct]);
2462
+ this$static.arr2[this$static.arr2idx].length2 = this$static.length2;
2463
+ ++this$static.arr2idx;
2464
+ return this$static.arr2idx === this$static.arr2.length;
2465
+ }
2466
+ function $randomState(this$static) {
2467
+ init_5();
2468
+ this$static.c = new FullCube_5();
2469
+ $doSearch(this$static);
2470
+ return this$static.solution;
2471
+ }
2472
+ function $search1(this$static, ct, sym, maxl, lm, depth) {
2473
+ let axis;
2474
+ let ctx;
2475
+ let m_0;
2476
+ let power;
2477
+ let prun;
2478
+ let symx;
2479
+ if (ct === 0) {
2480
+ return maxl === 0 && $init2_0(this$static, sym);
2481
+ }
2482
+ for (axis = 0; axis < 27; axis += 3) {
2483
+ if (axis === lm || axis === lm - 9 || axis === lm - 18) {
2484
+ continue;
2485
+ }
2486
+ for (power = 0; power < 3; ++power) {
2487
+ m_0 = axis + power;
2488
+ ctx = ctsmv[ct][symmove[sym][m_0]];
2489
+ prun = csprun[~~ctx >>> 6];
2490
+ if (prun >= maxl) {
2491
+ if (prun > maxl) {
2492
+ break;
2493
+ }
2494
+ continue;
2495
+ }
2496
+ symx = symmult[sym][ctx & 63];
2497
+ ctx >>>= 6;
2498
+ this$static.move1[depth] = m_0;
2499
+ if ($search1(this$static, ctx, symx, maxl - 1, axis, depth + 1)) {
2500
+ return true;
2501
+ }
2502
+ }
2503
+ }
2504
+ return false;
2505
+ }
2506
+ function $search2(this$static, ct, rl, maxl, lm, depth) {
2507
+ let ctx;
2508
+ let m_0;
2509
+ let prun;
2510
+ let rlx;
2511
+ if (ct === 0 && ctprun[rl] === 0) {
2512
+ return maxl === 0 && $init3(this$static);
2513
+ }
2514
+ for (m_0 = 0; m_0 < 23; ++m_0) {
2515
+ if (ckmv2_0[lm][m_0]) {
2516
+ m_0 = skipAxis2[m_0];
2517
+ continue;
2518
+ }
2519
+ ctx = ctmv[ct][m_0];
2520
+ rlx = rlmv[rl][m_0];
2521
+ prun = ctprun[ctx * 70 + rlx];
2522
+ if (prun >= maxl) {
2523
+ prun > maxl && (m_0 = skipAxis2[m_0]);
2524
+ continue;
2525
+ }
2526
+ this$static.move2[depth] = move2std[m_0];
2527
+ if ($search2(this$static, ctx, rlx, maxl - 1, m_0, depth + 1)) {
2528
+ return true;
2529
+ }
2530
+ }
2531
+ return false;
2532
+ }
2533
+ function $search3(this$static, edge, ct, prun, maxl, lm, depth) {
2534
+ let cord1x;
2535
+ let cord2x;
2536
+ let ctx;
2537
+ let edgex;
2538
+ let m_0;
2539
+ let prun1;
2540
+ let prunx;
2541
+ let symcord1x;
2542
+ let symx;
2543
+ if (maxl === 0) {
2544
+ return edge === 0 && ct === 0;
2545
+ }
2546
+ $set_4(this$static.tempe[depth], edge);
2547
+ for (m_0 = 0; m_0 < 17; ++m_0) {
2548
+ if (ckmv3[lm][m_0]) {
2549
+ m_0 = skipAxis3[m_0];
2550
+ continue;
2551
+ }
2552
+ ctx = ctmove[ct][m_0];
2553
+ prun1 = prun_0[ctx];
2554
+ if (prun1 >= maxl) {
2555
+ prun1 > maxl && m_0 < 14 && (m_0 = skipAxis3[m_0]);
2556
+ continue;
2557
+ }
2558
+ edgex = getmvrot(this$static.tempe[depth].edge, m_0 << 3, 10);
2559
+ cord1x = ~~(edgex / 20160);
2560
+ symcord1x = raw2sym_1[cord1x];
2561
+ symx = symcord1x & 7;
2562
+ symcord1x >>= 3;
2563
+ cord2x = getmvrot(this$static.tempe[depth].edge, m_0 << 3 | symx, 10) % 20160;
2564
+ prunx = getprun_0(symcord1x * 20160 + cord2x, prun);
2565
+ if (prunx >= maxl) {
2566
+ prunx > maxl && m_0 < 14 && (m_0 = skipAxis3[m_0]);
2567
+ continue;
2568
+ }
2569
+ if ($search3(this$static, edgex, ctx, prunx, maxl - 1, m_0, depth + 1)) {
2570
+ this$static.move3[depth] = m_0;
2571
+ return true;
2572
+ }
2573
+ }
2574
+ return false;
2575
+ }
2576
+ function Search_4() {
2577
+ let i_0;
2578
+ this.p1sols = new PriorityQueue_0(new FullCube$ValueComparator_0());
2579
+ this.move1 = createArray(15);
2580
+ this.move2 = createArray(20);
2581
+ this.move3 = createArray(20);
2582
+ this.c1 = new FullCube_3();
2583
+ this.c2 = new FullCube_3();
2584
+ this.ct2 = new Center2_0();
2585
+ this.ct3 = new Center3_0();
2586
+ this.e12 = new Edge3_0();
2587
+ this.tempe = createArray(20);
2588
+ this.arr2 = createArray(100);
2589
+ for (i_0 = 0; i_0 < 20; ++i_0) {
2590
+ this.tempe[i_0] = new Edge3_0();
2591
+ }
2592
+ }
2593
+ function init_5() {
2594
+ if (inited_2) {
2595
+ return;
2596
+ }
2597
+ initSym_0();
2598
+ raw2sym = createArray(735471);
2599
+ initSym2Raw();
2600
+ createMoveTable();
2601
+ raw2sym = null;
2602
+ createPrun();
2603
+ init_3();
2604
+ init_4();
2605
+ initMvrot();
2606
+ initRaw2Sym();
2607
+ createPrun_0();
2608
+ inited_2 = true;
2609
+ }
2610
+ defineSeed(163, 1, makeCastMap([Q$Search_0]), Search_4);
2611
+ _.add1 = false;
2612
+ _.arr2idx = 0;
2613
+ _.c = null;
2614
+ _.length1 = 0;
2615
+ _.length2 = 0;
2616
+ _.p1SolsCnt = 0;
2617
+ _.solution = "";
2618
+ var inited_2 = false;
2619
+ var ran$clinit_Util_0 = false;
2620
+ function $clinit_Util_0() {
2621
+ if (ran$clinit_Util_0) {
2622
+ return;
2623
+ }
2624
+ ran$clinit_Util_0 = true;
2625
+ }
2626
+ function parity_0(arr) {
2627
+ let i_0;
2628
+ let j;
2629
+ let len;
2630
+ let parity;
2631
+ parity = 0;
2632
+ for (i_0 = 0, len = arr.length; i_0 < len; ++i_0) {
2633
+ for (j = i_0; j < len; ++j) {
2634
+ arr[i_0] > arr[j] && (parity ^= 1);
2635
+ }
2636
+ }
2637
+ return parity;
2638
+ }
2639
+ function swap(arr, a, b, c, d, key) {
2640
+ let temp;
2641
+ switch (key) {
2642
+ case 0: {
2643
+ temp = arr[d];
2644
+ arr[d] = arr[c];
2645
+ arr[c] = arr[b];
2646
+ arr[b] = arr[a];
2647
+ arr[a] = temp;
2648
+ return;
2649
+ }
2650
+ case 1: {
2651
+ temp = arr[a];
2652
+ arr[a] = arr[c];
2653
+ arr[c] = temp;
2654
+ temp = arr[b];
2655
+ arr[b] = arr[d];
2656
+ arr[d] = temp;
2657
+ return;
2658
+ }
2659
+ case 2: {
2660
+ temp = arr[a];
2661
+ arr[a] = arr[b];
2662
+ arr[b] = arr[c];
2663
+ arr[c] = arr[d];
2664
+ arr[d] = temp;
2665
+ return;
2666
+ }
2667
+ }
2668
+ }
2669
+ function Class_0() {
2670
+ }
2671
+ function createForArray(packageName, className, seedId, componentType) {
2672
+ const clazz = new Class_0();
2673
+ clazz.typeName = packageName + className;
2674
+ isInstantiable(seedId !== 0 ? -seedId : 0) && setClassLiteral(seedId !== 0 ? -seedId : 0, clazz);
2675
+ clazz.modifiers = 4;
2676
+ clazz.superclass = Ljava_lang_Object_2_classLit;
2677
+ clazz.componentType = componentType;
2678
+ return clazz;
2679
+ }
2680
+ function createForClass(packageName, className, seedId, superclass) {
2681
+ const clazz = new Class_0();
2682
+ clazz.typeName = packageName + className;
2683
+ isInstantiable(seedId) && setClassLiteral(seedId, clazz);
2684
+ clazz.superclass = superclass;
2685
+ return clazz;
2686
+ }
2687
+ function getSeedFunction(clazz) {
2688
+ const func = seedTable[clazz.seedId];
2689
+ clazz = null;
2690
+ return func;
2691
+ }
2692
+ function isInstantiable(seedId) {
2693
+ return typeof seedId === "number" && seedId > 0;
2694
+ }
2695
+ function setClassLiteral(seedId, clazz) {
2696
+ let proto;
2697
+ clazz.seedId = seedId;
2698
+ if (seedId === 2) {
2699
+ proto = String.prototype;
2700
+ } else {
2701
+ if (seedId > 0) {
2702
+ let seed = getSeedFunction(clazz);
2703
+ if (seed) {
2704
+ proto = seed.prototype;
2705
+ } else {
2706
+ seed = seedTable[seedId] = function() {
2707
+ };
2708
+ seed.___clazz$ = clazz;
2709
+ return;
2710
+ }
2711
+ } else {
2712
+ return;
2713
+ }
2714
+ }
2715
+ proto.___clazz$ = clazz;
2716
+ }
2717
+ _.val$outerIter = null;
2718
+ function $add(this$static, o) {
2719
+ if ($offer(this$static, o)) {
2720
+ return true;
2721
+ }
2722
+ }
2723
+ function $$init_6(this$static) {
2724
+ this$static.array = initDim(
2725
+ _3Ljava_lang_Object_2_classLit,
2726
+ makeCastMap([Q$Serializable, Q$Object_$1]),
2727
+ Q$Object,
2728
+ 0,
2729
+ 0
2730
+ );
2731
+ }
2732
+ function $add_0(this$static, o) {
2733
+ setCheck(this$static.array, this$static.size++, o);
2734
+ return true;
2735
+ }
2736
+ function $clear(this$static) {
2737
+ this$static.array = initDim(
2738
+ _3Ljava_lang_Object_2_classLit,
2739
+ makeCastMap([Q$Serializable, Q$Object_$1]),
2740
+ Q$Object,
2741
+ 0,
2742
+ 0
2743
+ );
2744
+ this$static.size = 0;
2745
+ }
2746
+ function $get_4(this$static, index) {
2747
+ return this$static.array[index];
2748
+ }
2749
+ function $remove_0(this$static, index) {
2750
+ const previous = this$static.array[index];
2751
+ splice_0(this$static.array, index, 1);
2752
+ --this$static.size;
2753
+ return previous;
2754
+ }
2755
+ function $set_7(this$static, index, o) {
2756
+ const previous = this$static.array[index];
2757
+ setCheck(this$static.array, index, o);
2758
+ return previous;
2759
+ }
2760
+ function $toArray_0(this$static, out) {
2761
+ let i_0;
2762
+ out.length < this$static.size && (out = createFrom(out, this$static.size));
2763
+ for (i_0 = 0; i_0 < this$static.size; ++i_0) {
2764
+ setCheck(out, i_0, this$static.array[i_0]);
2765
+ }
2766
+ out.length > this$static.size && setCheck(out, this$static.size, null);
2767
+ return out;
2768
+ }
2769
+ function ArrayList_1() {
2770
+ $$init_6(this);
2771
+ this.array.length = 500;
2772
+ }
2773
+ function splice_0(array, index, deleteCount) {
2774
+ array.splice(index, deleteCount);
2775
+ }
2776
+ _.size = 0;
2777
+ function binarySearch_0(sortedArray, key) {
2778
+ let high;
2779
+ let low;
2780
+ let mid;
2781
+ let midVal;
2782
+ low = 0;
2783
+ high = sortedArray.length - 1;
2784
+ while (low <= high) {
2785
+ mid = low + (~~(high - low) >> 1);
2786
+ midVal = sortedArray[mid];
2787
+ if (midVal < key) {
2788
+ low = mid + 1;
2789
+ } else if (midVal > key) {
2790
+ high = mid - 1;
2791
+ } else {
2792
+ return mid;
2793
+ }
2794
+ }
2795
+ return -low - 1;
2796
+ }
2797
+ function fill_0(a) {
2798
+ fill_1(a, a.length);
2799
+ }
2800
+ function fill_1(a, toIndex) {
2801
+ let i_0;
2802
+ for (i_0 = 0; i_0 < toIndex; ++i_0) {
2803
+ a[i_0] = -1;
2804
+ }
2805
+ }
2806
+ function $mergeHeaps(this$static, node) {
2807
+ let smallestChild;
2808
+ let leftChild;
2809
+ let rightChild;
2810
+ let smallestChild_0;
2811
+ const heapSize = this$static.heap.size;
2812
+ const value = $get_4(this$static.heap, node);
2813
+ while (node * 2 + 1 < heapSize) {
2814
+ smallestChild = (leftChild = 2 * node + 1, rightChild = leftChild + 1, smallestChild_0 = leftChild, rightChild < heapSize && $compare_0(
2815
+ $get_4(this$static.heap, rightChild),
2816
+ $get_4(this$static.heap, leftChild)
2817
+ ) < 0 && (smallestChild_0 = rightChild), smallestChild_0);
2818
+ if ($compare_0(value, $get_4(this$static.heap, smallestChild)) < 0) {
2819
+ break;
2820
+ }
2821
+ $set_7(this$static.heap, node, $get_4(this$static.heap, smallestChild));
2822
+ node = smallestChild;
2823
+ }
2824
+ $set_7(this$static.heap, node, value);
2825
+ }
2826
+ function $offer(this$static, e) {
2827
+ let childNode;
2828
+ let node;
2829
+ node = this$static.heap.size;
2830
+ $add_0(this$static.heap, e);
2831
+ while (node > 0) {
2832
+ childNode = node;
2833
+ node = ~~((node - 1) / 2);
2834
+ if ($compare_0($get_4(this$static.heap, node), e) <= 0) {
2835
+ $set_7(this$static.heap, childNode, e);
2836
+ return true;
2837
+ }
2838
+ $set_7(this$static.heap, childNode, $get_4(this$static.heap, node));
2839
+ }
2840
+ $set_7(this$static.heap, node, e);
2841
+ return true;
2842
+ }
2843
+ function $poll(this$static) {
2844
+ if (this$static.heap.size === 0) {
2845
+ return null;
2846
+ }
2847
+ const value = $get_4(this$static.heap, 0);
2848
+ $removeAtIndex(this$static);
2849
+ return value;
2850
+ }
2851
+ function $removeAtIndex(this$static) {
2852
+ const lastValue = $remove_0(this$static.heap, this$static.heap.size - 1);
2853
+ if (0 < this$static.heap.size) {
2854
+ $set_7(this$static.heap, 0, lastValue);
2855
+ $mergeHeaps(this$static, 0);
2856
+ }
2857
+ }
2858
+ function $toArray_1(this$static, a) {
2859
+ return $toArray_0(this$static.heap, a);
2860
+ }
2861
+ function PriorityQueue_0(cmp) {
2862
+ this.heap = new ArrayList_1();
2863
+ this.cmp = cmp;
2864
+ }
2865
+ defineSeed(239, 1, {}, PriorityQueue_0);
2866
+ _.cmp = null;
2867
+ _.heap = null;
2868
+ var Ljava_lang_Object_2_classLit = createForClass(
2869
+ "java.lang.",
2870
+ "Object",
2871
+ 1,
2872
+ null
2873
+ );
2874
+ var _3Ljava_lang_Object_2_classLit = createForArray(
2875
+ "[Ljava.lang.",
2876
+ "Object;",
2877
+ 356,
2878
+ Ljava_lang_Object_2_classLit
2879
+ );
2880
+ var Lcs_threephase_FullCube_2_classLit = createForClass(
2881
+ "cs.threephase.",
2882
+ "FullCube",
2883
+ 160,
2884
+ Ljava_lang_Object_2_classLit
2885
+ );
2886
+ var _3Lcs_threephase_FullCube_2_classLit = createForArray(
2887
+ "[Lcs.threephase.",
2888
+ "FullCube;",
2889
+ 381,
2890
+ Lcs_threephase_FullCube_2_classLit
2891
+ );
2892
+ var searcher;
2893
+ var raninit = false;
2894
+ function init() {
2895
+ if (raninit) {
2896
+ return;
2897
+ }
2898
+ raninit = true;
2899
+ $clinit_Moves();
2900
+ $clinit_Util_0();
2901
+ $clinit_Center1();
2902
+ $clinit_Center2();
2903
+ $clinit_Center3();
2904
+ $clinit_Edge3();
2905
+ $clinit_CornerCube();
2906
+ $clinit_EdgeCube();
2907
+ $clinit_FullCube_0();
2908
+ searcher = new Search_4();
2909
+ }
2910
+ function initialize() {
2911
+ init();
2912
+ init_5();
2913
+ }
2914
+ async function random444Scramble() {
2915
+ init();
2916
+ const suffix = Alg.fromString($randomState(searcher));
2917
+ return (await random333Scramble()).concat(suffix);
2918
+ }
2919
+ export {
2920
+ initialize,
2921
+ random444Scramble
2922
+ };
2923
+ //# sourceMappingURL=search-dynamic-solve-4x4x4-NONXQHOJ.js.map