gh-pages
parent
ae23734506
commit
691a3f917e
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/
|
||||
|
||||
/** @license React v0.20.2
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v17.0.2
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v17.0.2
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
|
@ -0,0 +1,196 @@
|
|||
/* @tailwind base; */
|
||||
|
||||
.bg-gray-50 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgba(249, 250, 251, var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.table {
|
||||
display: table;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.justify-center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.justify-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.h-full {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.p-2 {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
* {
|
||||
--tw-shadow: 0 0 #0000;
|
||||
}
|
||||
|
||||
* {
|
||||
--tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
|
||||
--tw-ring-offset-width: 0px;
|
||||
--tw-ring-offset-color: #fff;
|
||||
--tw-ring-color: rgba(59, 130, 246, 0.5);
|
||||
--tw-ring-offset-shadow: 0 0 #0000;
|
||||
--tw-ring-shadow: 0 0 #0000;
|
||||
}
|
||||
|
||||
.visible {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.w-auto {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ping {
|
||||
75%, 100% {
|
||||
transform: scale(2);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
50% {
|
||||
opacity: .5;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes bounce {
|
||||
0%, 100% {
|
||||
transform: translateY(-25%);
|
||||
animation-timing-function: cubic-bezier(0.8,0,1,1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: none;
|
||||
animation-timing-function: cubic-bezier(0,0,0.2,1);
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
font-family: sans-serif;
|
||||
overflow: hidden;
|
||||
--topNavH: 48px;
|
||||
--sideNavW: 200px;
|
||||
}
|
||||
|
||||
#c {
|
||||
position: absolute;
|
||||
width: calc(100% - var(--sideNavW));
|
||||
height: calc(100% - var(--topNavH));
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.topNav {
|
||||
position: absolute;
|
||||
height: var(--topNavH);
|
||||
left:0;
|
||||
right:0;
|
||||
top:0;
|
||||
}
|
||||
|
||||
.sideNav {
|
||||
position: absolute;
|
||||
top: var(--topNavH);
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: var(--sideNavW);
|
||||
}
|
||||
|
||||
#labels > div {
|
||||
position: absolute;
|
||||
border: solid 1px black;
|
||||
}
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgba(243, 244, 246, var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgba(229, 231, 235, var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.btn {
|
||||
fill: currentColor;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgba(5, 150, 105, var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgba(4, 120, 87, var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: fixed;
|
||||
display: block;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
padding: 4px;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
margin-left: -6px;
|
||||
border: solid 6px transparent;
|
||||
border-bottom-color: black;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
}
|
||||
|
||||
@media (min-width: 1280px) {
|
||||
}
|
||||
|
||||
@media (min-width: 1536px) {
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -12,15 +12,17 @@
|
|||
<meta property="og:image" content="" />
|
||||
<link rel="apple-touch-icon" href="icon-192.png" />
|
||||
<link rel="manifest" href="manifest.json" />
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<!-- app.css references the css imported into app.jsx -->
|
||||
<link rel="stylesheet" href="app.css">
|
||||
<title>CAD Tool</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<canvas id="c"></canvas>
|
||||
<div id="react"></div>
|
||||
<canvas id="c" class="block w-screen h-screen"></canvas>
|
||||
<div id="labels"></div>
|
||||
<div id="stats"></div>
|
||||
<script src="index.bundle.js"></script>
|
||||
<script src="app.bundle.js"></script>
|
||||
<script src="scene.bundle.js"></script>
|
||||
<script src="solver.js"></script>
|
||||
<script src="lz-string.min.js"></script>
|
||||
|
|
508
lz-string.js
508
lz-string.js
|
@ -1,508 +0,0 @@
|
|||
// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>
|
||||
// This work is free. You can redistribute it and/or modify it
|
||||
// under the terms of the WTFPL, Version 2
|
||||
// For more information see LICENSE.txt or http://www.wtfpl.net/
|
||||
//
|
||||
// For more information, the home page:
|
||||
// http://pieroxy.net/blog/pages/lz-string/testing.html
|
||||
//
|
||||
// LZ-based compression algorithm, version 1.4.4
|
||||
var LZString = (function() {
|
||||
|
||||
// private property
|
||||
var f = String.fromCharCode;
|
||||
var keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
||||
var keyStrUriSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$";
|
||||
var baseReverseDic = {};
|
||||
|
||||
function getBaseValue(alphabet, character) {
|
||||
if (!baseReverseDic[alphabet]) {
|
||||
baseReverseDic[alphabet] = {};
|
||||
for (var i=0 ; i<alphabet.length ; i++) {
|
||||
baseReverseDic[alphabet][alphabet.charAt(i)] = i;
|
||||
}
|
||||
}
|
||||
return baseReverseDic[alphabet][character];
|
||||
}
|
||||
|
||||
var LZString = {
|
||||
compressToBase64 : function (input) {
|
||||
if (input == null) return "";
|
||||
var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});
|
||||
switch (res.length % 4) { // To produce valid Base64
|
||||
default: // When could this happen ?
|
||||
case 0 : return res;
|
||||
case 1 : return res+"===";
|
||||
case 2 : return res+"==";
|
||||
case 3 : return res+"=";
|
||||
}
|
||||
},
|
||||
|
||||
decompressFromBase64 : function (input) {
|
||||
if (input == null) return "";
|
||||
if (input == "") return null;
|
||||
return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });
|
||||
},
|
||||
|
||||
compressToUTF16 : function (input) {
|
||||
if (input == null) return "";
|
||||
return LZString._compress(input, 15, function(a){return f(a+32);}) + " ";
|
||||
},
|
||||
|
||||
decompressFromUTF16: function (compressed) {
|
||||
if (compressed == null) return "";
|
||||
if (compressed == "") return null;
|
||||
return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });
|
||||
},
|
||||
|
||||
//compress into uint8array (UCS-2 big endian format)
|
||||
compressToUint8Array: function (uncompressed) {
|
||||
var compressed = LZString.compress(uncompressed);
|
||||
var buf=new Uint8Array(compressed.length*2); // 2 bytes per character
|
||||
|
||||
for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {
|
||||
var current_value = compressed.charCodeAt(i);
|
||||
buf[i*2] = current_value >>> 8;
|
||||
buf[i*2+1] = current_value % 256;
|
||||
}
|
||||
return buf;
|
||||
},
|
||||
|
||||
//decompress from uint8array (UCS-2 big endian format)
|
||||
decompressFromUint8Array:function (compressed) {
|
||||
if (compressed===null || compressed===undefined){
|
||||
return LZString.decompress(compressed);
|
||||
} else {
|
||||
var buf=new Array(compressed.length/2); // 2 bytes per character
|
||||
for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {
|
||||
buf[i]=compressed[i*2]*256+compressed[i*2+1];
|
||||
}
|
||||
|
||||
var result = [];
|
||||
buf.forEach(function (c) {
|
||||
result.push(f(c));
|
||||
});
|
||||
return LZString.decompress(result.join(''));
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
//compress into a string that is already URI encoded
|
||||
compressToEncodedURIComponent: function (input) {
|
||||
if (input == null) return "";
|
||||
return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});
|
||||
},
|
||||
|
||||
//decompress from an output of compressToEncodedURIComponent
|
||||
decompressFromEncodedURIComponent:function (input) {
|
||||
if (input == null) return "";
|
||||
if (input == "") return null;
|
||||
input = input.replace(/ /g, "+");
|
||||
return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });
|
||||
},
|
||||
|
||||
compress: function (uncompressed) {
|
||||
return LZString._compress(uncompressed, 16, function(a){return f(a);});
|
||||
},
|
||||
_compress: function (uncompressed, bitsPerChar, getCharFromInt) {
|
||||
if (uncompressed == null) return "";
|
||||
var i, value,
|
||||
context_dictionary= {},
|
||||
context_dictionaryToCreate= {},
|
||||
context_c="",
|
||||
context_wc="",
|
||||
context_w="",
|
||||
context_enlargeIn= 2, // Compensate for the first entry which should not count
|
||||
context_dictSize= 3,
|
||||
context_numBits= 2,
|
||||
context_data=[],
|
||||
context_data_val=0,
|
||||
context_data_position=0,
|
||||
ii;
|
||||
|
||||
for (ii = 0; ii < uncompressed.length; ii += 1) {
|
||||
context_c = uncompressed.charAt(ii);
|
||||
if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {
|
||||
context_dictionary[context_c] = context_dictSize++;
|
||||
context_dictionaryToCreate[context_c] = true;
|
||||
}
|
||||
|
||||
context_wc = context_w + context_c;
|
||||
if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {
|
||||
context_w = context_wc;
|
||||
} else {
|
||||
if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {
|
||||
if (context_w.charCodeAt(0)<256) {
|
||||
for (i=0 ; i<context_numBits ; i++) {
|
||||
context_data_val = (context_data_val << 1);
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
}
|
||||
value = context_w.charCodeAt(0);
|
||||
for (i=0 ; i<8 ; i++) {
|
||||
context_data_val = (context_data_val << 1) | (value&1);
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
value = value >> 1;
|
||||
}
|
||||
} else {
|
||||
value = 1;
|
||||
for (i=0 ; i<context_numBits ; i++) {
|
||||
context_data_val = (context_data_val << 1) | value;
|
||||
if (context_data_position ==bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
value = 0;
|
||||
}
|
||||
value = context_w.charCodeAt(0);
|
||||
for (i=0 ; i<16 ; i++) {
|
||||
context_data_val = (context_data_val << 1) | (value&1);
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
value = value >> 1;
|
||||
}
|
||||
}
|
||||
context_enlargeIn--;
|
||||
if (context_enlargeIn == 0) {
|
||||
context_enlargeIn = Math.pow(2, context_numBits);
|
||||
context_numBits++;
|
||||
}
|
||||
delete context_dictionaryToCreate[context_w];
|
||||
} else {
|
||||
value = context_dictionary[context_w];
|
||||
for (i=0 ; i<context_numBits ; i++) {
|
||||
context_data_val = (context_data_val << 1) | (value&1);
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
value = value >> 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
context_enlargeIn--;
|
||||
if (context_enlargeIn == 0) {
|
||||
context_enlargeIn = Math.pow(2, context_numBits);
|
||||
context_numBits++;
|
||||
}
|
||||
// Add wc to the dictionary.
|
||||
context_dictionary[context_wc] = context_dictSize++;
|
||||
context_w = String(context_c);
|
||||
}
|
||||
}
|
||||
|
||||
// Output the code for w.
|
||||
if (context_w !== "") {
|
||||
if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {
|
||||
if (context_w.charCodeAt(0)<256) {
|
||||
for (i=0 ; i<context_numBits ; i++) {
|
||||
context_data_val = (context_data_val << 1);
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
}
|
||||
value = context_w.charCodeAt(0);
|
||||
for (i=0 ; i<8 ; i++) {
|
||||
context_data_val = (context_data_val << 1) | (value&1);
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
value = value >> 1;
|
||||
}
|
||||
} else {
|
||||
value = 1;
|
||||
for (i=0 ; i<context_numBits ; i++) {
|
||||
context_data_val = (context_data_val << 1) | value;
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
value = 0;
|
||||
}
|
||||
value = context_w.charCodeAt(0);
|
||||
for (i=0 ; i<16 ; i++) {
|
||||
context_data_val = (context_data_val << 1) | (value&1);
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
value = value >> 1;
|
||||
}
|
||||
}
|
||||
context_enlargeIn--;
|
||||
if (context_enlargeIn == 0) {
|
||||
context_enlargeIn = Math.pow(2, context_numBits);
|
||||
context_numBits++;
|
||||
}
|
||||
delete context_dictionaryToCreate[context_w];
|
||||
} else {
|
||||
value = context_dictionary[context_w];
|
||||
for (i=0 ; i<context_numBits ; i++) {
|
||||
context_data_val = (context_data_val << 1) | (value&1);
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
value = value >> 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
context_enlargeIn--;
|
||||
if (context_enlargeIn == 0) {
|
||||
context_enlargeIn = Math.pow(2, context_numBits);
|
||||
context_numBits++;
|
||||
}
|
||||
}
|
||||
|
||||
// Mark the end of the stream
|
||||
value = 2;
|
||||
for (i=0 ; i<context_numBits ; i++) {
|
||||
context_data_val = (context_data_val << 1) | (value&1);
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data_position = 0;
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
context_data_val = 0;
|
||||
} else {
|
||||
context_data_position++;
|
||||
}
|
||||
value = value >> 1;
|
||||
}
|
||||
|
||||
// Flush the last char
|
||||
while (true) {
|
||||
context_data_val = (context_data_val << 1);
|
||||
if (context_data_position == bitsPerChar-1) {
|
||||
context_data.push(getCharFromInt(context_data_val));
|
||||
break;
|
||||
}
|
||||
else context_data_position++;
|
||||
}
|
||||
return context_data.join('');
|
||||
},
|
||||
|
||||
decompress: function (compressed) {
|
||||
if (compressed == null) return "";
|
||||
if (compressed == "") return null;
|
||||
return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });
|
||||
},
|
||||
|
||||
_decompress: function (length, resetValue, getNextValue) {
|
||||
var dictionary = [],
|
||||
next,
|
||||
enlargeIn = 4,
|
||||
dictSize = 4,
|
||||
numBits = 3,
|
||||
entry = "",
|
||||
result = [],
|
||||
i,
|
||||
w,
|
||||
bits, resb, maxpower, power,
|
||||
c,
|
||||
data = {val:getNextValue(0), position:resetValue, index:1};
|
||||
|
||||
for (i = 0; i < 3; i += 1) {
|
||||
dictionary[i] = i;
|
||||
}
|
||||
|
||||
bits = 0;
|
||||
maxpower = Math.pow(2,2);
|
||||
power=1;
|
||||
while (power!=maxpower) {
|
||||
resb = data.val & data.position;
|
||||
data.position >>= 1;
|
||||
if (data.position == 0) {
|
||||
data.position = resetValue;
|
||||
data.val = getNextValue(data.index++);
|
||||
}
|
||||
bits |= (resb>0 ? 1 : 0) * power;
|
||||
power <<= 1;
|
||||
}
|
||||
|
||||
switch (next = bits) {
|
||||
case 0:
|
||||
bits = 0;
|
||||
maxpower = Math.pow(2,8);
|
||||
power=1;
|
||||
while (power!=maxpower) {
|
||||
resb = data.val & data.position;
|
||||
data.position >>= 1;
|
||||
if (data.position == 0) {
|
||||
data.position = resetValue;
|
||||
data.val = getNextValue(data.index++);
|
||||
}
|
||||
bits |= (resb>0 ? 1 : 0) * power;
|
||||
power <<= 1;
|
||||
}
|
||||
c = f(bits);
|
||||
break;
|
||||
case 1:
|
||||
bits = 0;
|
||||
maxpower = Math.pow(2,16);
|
||||
power=1;
|
||||
while (power!=maxpower) {
|
||||
resb = data.val & data.position;
|
||||
data.position >>= 1;
|
||||
if (data.position == 0) {
|
||||
data.position = resetValue;
|
||||
data.val = getNextValue(data.index++);
|
||||
}
|
||||
bits |= (resb>0 ? 1 : 0) * power;
|
||||
power <<= 1;
|
||||
}
|
||||
c = f(bits);
|
||||
break;
|
||||
case 2:
|
||||
return "";
|
||||
}
|
||||
dictionary[3] = c;
|
||||
w = c;
|
||||
result.push(c);
|
||||
while (true) {
|
||||
if (data.index > length) {
|
||||
return "";
|
||||
}
|
||||
|
||||
bits = 0;
|
||||
maxpower = Math.pow(2,numBits);
|
||||
power=1;
|
||||
while (power!=maxpower) {
|
||||
resb = data.val & data.position;
|
||||
data.position >>= 1;
|
||||
if (data.position == 0) {
|
||||
data.position = resetValue;
|
||||
data.val = getNextValue(data.index++);
|
||||
}
|
||||
bits |= (resb>0 ? 1 : 0) * power;
|
||||
power <<= 1;
|
||||
}
|
||||
|
||||
switch (c = bits) {
|
||||
case 0:
|
||||
bits = 0;
|
||||
maxpower = Math.pow(2,8);
|
||||
power=1;
|
||||
while (power!=maxpower) {
|
||||
resb = data.val & data.position;
|
||||
data.position >>= 1;
|
||||
if (data.position == 0) {
|
||||
data.position = resetValue;
|
||||
data.val = getNextValue(data.index++);
|
||||
}
|
||||
bits |= (resb>0 ? 1 : 0) * power;
|
||||
power <<= 1;
|
||||
}
|
||||
|
||||
dictionary[dictSize++] = f(bits);
|
||||
c = dictSize-1;
|
||||
enlargeIn--;
|
||||
break;
|
||||
case 1:
|
||||
bits = 0;
|
||||
maxpower = Math.pow(2,16);
|
||||
power=1;
|
||||
while (power!=maxpower) {
|
||||
resb = data.val & data.position;
|
||||
data.position >>= 1;
|
||||
if (data.position == 0) {
|
||||
data.position = resetValue;
|
||||
data.val = getNextValue(data.index++);
|
||||
}
|
||||
bits |= (resb>0 ? 1 : 0) * power;
|
||||
power <<= 1;
|
||||
}
|
||||
dictionary[dictSize++] = f(bits);
|
||||
c = dictSize-1;
|
||||
enlargeIn--;
|
||||
break;
|
||||
case 2:
|
||||
return result.join('');
|
||||
}
|
||||
|
||||
if (enlargeIn == 0) {
|
||||
enlargeIn = Math.pow(2, numBits);
|
||||
numBits++;
|
||||
}
|
||||
|
||||
if (dictionary[c]) {
|
||||
entry = dictionary[c];
|
||||
} else {
|
||||
if (c === dictSize) {
|
||||
entry = w + w.charAt(0);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
result.push(entry);
|
||||
|
||||
// Add w+entry[0] to the dictionary.
|
||||
dictionary[dictSize++] = w + entry.charAt(0);
|
||||
enlargeIn--;
|
||||
|
||||
w = entry;
|
||||
|
||||
if (enlargeIn == 0) {
|
||||
enlargeIn = Math.pow(2, numBits);
|
||||
numBits++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
return LZString;
|
||||
})();
|
||||
|
||||
// if (typeof define === 'function' && define.amd) {
|
||||
// define(function () { return LZString; });
|
||||
// } else if( typeof module !== 'undefined' && module != null ) {
|
||||
// module.exports = LZString
|
||||
// } else if( typeof angular !== 'undefined' && angular != null ) {
|
||||
// angular.module('LZString', [])
|
||||
// .factory('LZString', function () {
|
||||
// return LZString;
|
||||
// });
|
||||
// }
|
||||
|
||||
var aaa = 'aaax'
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
solver.wasm
BIN
solver.wasm
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
(()=>{"use strict";var e,r,t={661:(e,r,t)=>{t.d(r,{UZH:()=>o,RsA:()=>n,PeU:()=>i,tm_:()=>s,S2y:()=>d,_iA:()=>l,ntZ:()=>a,dwk:()=>p,Wl3:()=>u,_Li:()=>c,ehD:()=>b,esl:()=>f,jFi:()=>h,bdR:()=>_,WMw:()=>v,N4l:()=>w,M5h:()=>O,Xaj:()=>y,bGH:()=>E,Wbm:()=>g,rOj:()=>m,r_:()=>S,Sm8:()=>T,c8b:()=>j,ghN:()=>x,KhW:()=>L,iWC:()=>A,k74:()=>R,LgZ:()=>k,fSK:()=>D,Hy8:()=>M,Vdb:()=>H,Wpd:()=>P,RlZ:()=>W,BVF:()=>C,Se2:()=>G,Zr5:()=>N,vCF:()=>V,eD:()=>I,ksN:()=>Y,w$m:()=>Z,M6v:()=>z,Ns1:()=>F,qhX:()=>B,NDo:()=>U,uL9:()=>K,EoG:()=>J,CdI:()=>$,YGz:()=>Q,LY2:()=>q,dZ3:()=>X,xfE:()=>ee,fY$:()=>re,vxC:()=>te,dSO:()=>oe,Bf4:()=>ne,g8_:()=>ie,SVc:()=>se,rpg:()=>de,uWy:()=>le,OoA:()=>ae,TyD:()=>pe,YLQ:()=>ue,aH4:()=>ce,wem:()=>be,qyh:()=>fe,D1R:()=>he,ywz:()=>_e,T95:()=>ve,iAb:()=>we,LsT:()=>Oe,Kz5:()=>ye,JQ4:()=>Ee,VzW:()=>ge,cLu:()=>me,k0A:()=>Se,irR:()=>Te,XNv:()=>je,wJv:()=>xe,OTo:()=>Le,UCm:()=>Ae,wk1:()=>Re,Y8D:()=>ke,cRx:()=>De,qkB:()=>Me,brP:()=>He,hEm:()=>Pe,D9w:()=>We,av9:()=>Ce,CtA:()=>Ge,F5G:()=>Ne,E2K:()=>Ve,wuA:()=>Ie,BFQ:()=>Ye,v3W:()=>Ze,ILR:()=>ze,_AM:()=>Fe,vCx:()=>Be,eaV:()=>Ue,CaW:()=>Ke,fto:()=>Je,l0P:()=>$e,ekQ:()=>Qe,ptH:()=>qe,jZA:()=>Xe,y2t:()=>er,gi4:()=>rr,Djp:()=>tr,BG$:()=>or,NYV:()=>nr,xJs:()=>ir,pKu:()=>sr,GG6:()=>dr,Gih:()=>lr,FUD:()=>ar,iiP:()=>pr,SvJ:()=>ur,bsb:()=>cr,APR:()=>br,Abz:()=>fr,v6B:()=>hr,pnl:()=>_r,OS$:()=>vr,_wO:()=>wr,bcs:()=>Or,Y5S:()=>yr,Wso:()=>Er,p1$:()=>gr,I0h:()=>mr,Yjz:()=>Sr,ePn:()=>Tr,HBG:()=>jr,rnI:()=>xr,knz:()=>Lr,pMV:()=>Ar,KC9:()=>Rr,M6c:()=>kr,LgE:()=>Dr,Inb:()=>Mr,gMp:()=>Hr,z81:()=>Pr,mSO:()=>Wr,IOt:()=>Cr,PA7:()=>Gr,x5V:()=>Nr,cum:()=>Vr,W2J:()=>Ir,LSk:()=>Yr});const o="126",n={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},i=0,s=1,d=2,l=1,a=2,p=3,u=0,c=1,b=2,f=1,h=0,_=1,v=2,w=3,O=4,y=5,E=100,g=101,m=102,S=103,T=104,j=200,x=201,L=202,A=203,R=204,k=205,D=206,M=207,H=208,P=209,W=210,C=0,G=1,N=2,V=3,I=4,Y=5,Z=6,z=7,F=0,B=1,U=2,K=0,J=1,$=2,Q=3,q=4,X=5,ee=300,re=301,te=302,oe=303,ne=304,ie=306,se=307,de=1e3,le=1001,ae=1002,pe=1003,ue=1004,ce=1005,be=1006,fe=1007,he=1008,_e=1009,ve=1010,we=1011,Oe=1012,ye=1013,Ee=1014,ge=1015,me=1016,Se=1017,Te=1018,je=1019,xe=1020,Le=1021,Ae=1022,Re=1023,ke=1024,De=1025,Me=1026,He=1027,Pe=1028,We=1029,Ce=1030,Ge=1031,Ne=1032,Ve=1033,Ie=33776,Ye=33777,Ze=33778,ze=33779,Fe=35840,Be=35841,Ue=35842,Ke=35843,Je=36196,$e=37492,Qe=37496,qe=37808,Xe=37809,er=37810,rr=37811,tr=37812,or=37813,nr=37814,ir=37815,sr=37816,dr=37817,lr=37818,ar=37819,pr=37820,ur=37821,cr=36492,br=37840,fr=37841,hr=37842,_r=37843,vr=37844,wr=37845,Or=37846,yr=37847,Er=37848,gr=37849,mr=37850,Sr=37851,Tr=37852,jr=37853,xr=3e3,Lr=3001,Ar=3007,Rr=3002,kr=3003,Dr=3004,Mr=3005,Hr=3006,Pr=3200,Wr=3201,Cr=0,Gr=1,Nr=7680,Vr=519,Ir=35044,Yr="300 es"}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=t,e=[],n.O=(r,t,o,i)=>{if(!t){var s=1/0;for(a=0;a<e.length;a++){for(var[t,o,i]=e[a],d=!0,l=0;l<t.length;l++)(!1&i||s>=i)&&Object.keys(n.O).every((e=>n.O[e](t[l])))?t.splice(l--,1):(d=!1,i<s&&(s=i));d&&(e.splice(a--,1),r=o())}return r}i=i||0;for(var a=e.length;a>0&&e[a-1][2]>i;a--)e[a]=e[a-1];e[a]=[t,o,i]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={928:0};n.O.j=r=>0===e[r];var r=(r,t)=>{var o,i,[s,d,l]=t,a=0;for(o in d)n.o(d,o)&&(n.m[o]=d[o]);for(l&&l(n),r&&r(t);a<s.length;a++)i=s[a],n.o(e,i)&&e[i]&&e[i][0](),e[s[a]]=0;n.O()},t=self.webpackChunk=self.webpackChunk||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),r=n(661),"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:r.UZH}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=r.UZH),n.O()})();
|
Loading…
Reference in New Issue