Showing preview only (1,610K chars total). Download the full file or copy to clipboard to get everything.
Repository: jamesshore/object_playground
Branch: master
Commit: db12ef438e74
Files: 53
Total size: 1.5 MB
Directory structure:
gitextract_xkbrie79/
├── .gitignore
├── .idea/
│ ├── .name
│ ├── 12_object_playground.iml
│ ├── dictionaries/
│ │ └── jshore.xml
│ ├── encodings.xml
│ ├── jsLibraryMappings.xml
│ ├── libraries/
│ │ └── sass_stdlib.xml
│ ├── modules.xml
│ ├── scopes/
│ │ └── scope_settings.xml
│ └── vcs.xml
├── Jakefile.js
├── LICENSE.TXT
├── build/
│ ├── config/
│ │ └── karma.conf.js
│ └── util/
│ ├── build_command.js
│ ├── karma_runner.js
│ ├── lint_runner.js
│ ├── nodeunit_runner.js
│ ├── sh.js
│ └── version_checker.js
├── convert_sample.pl
├── deploy.bat
├── deploy.jakefile
├── deploy.sh
├── integrate.bat
├── integrate.jakefile
├── integrate.sh
├── jake.bat
├── jake.sh
├── package.json
├── readme.md
└── src/
├── _object_graph_test.js
├── _object_node_test.js
├── _ui_test.js
├── _user_code_test.js
├── _viz_visualizer_test.js
├── index.html
├── object_graph.js
├── object_node.js
├── site.css
├── ui.js
├── user_code.js
├── viz/
│ ├── .gitattributes
│ ├── .gitignore
│ ├── COPYING
│ ├── Makefile
│ ├── README.txt
│ ├── config.h
│ ├── example.html
│ ├── post.js
│ ├── pre.js
│ ├── viz.c
│ └── viz.js
└── viz_visualizer.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Mac OS X
.DS_Store
# WebStorm
.idea/workspace.xml
# npm
node_modules/**/.bin/
### npm modules' build artifacts ###
# Selenium WebDriverJS & Karma: Optional dependencies that don't build on vanilla Windows
node_modules/fsevents/
# Socket.IO
node_modules/uws/build/
node_modules/uws/build_log.txt
# uws
node_modules/uws/uws_darwin_57.node
# Karma
node_modules/karma/static/context.js
node_modules/karma/static/karma.js
================================================
FILE: .idea/.name
================================================
12_object_playground
================================================
FILE: .idea/12_object_playground.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
================================================
FILE: .idea/dictionaries/jshore.xml
================================================
<component name="ProjectDictionaryState">
<dictionary name="jshore">
<words>
<w>proto</w>
</words>
</dictionary>
</component>
================================================
FILE: .idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: .idea/jsLibraryMappings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<excludedPredefinedLibrary name="HTML" />
<excludedPredefinedLibrary name="HTML5 / EcmaScript 5" />
</component>
</project>
================================================
FILE: .idea/libraries/sass_stdlib.xml
================================================
<component name="libraryTable">
<library name="sass-stdlib">
<CLASSES />
<SOURCES>
<root url="file://$APPLICATION_HOME_DIR$/plugins/sass/lib/stubs/sass_functions.scss" />
</SOURCES>
</library>
</component>
================================================
FILE: .idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/12_object_playground.iml" filepath="$PROJECT_DIR$/.idea/12_object_playground.iml" />
</modules>
</component>
</project>
================================================
FILE: .idea/scopes/scope_settings.xml
================================================
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>
================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
================================================
FILE: Jakefile.js
================================================
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
/*global desc, task, jake, fail, complete, directory, require, console, process */
(function () {
"use strict";
var NODE_VERSION = "v8.9.4";
var TESTED_BROWSERS = [
// "IE 8.0 (Windows)", // DOES NOT WORK -- no SVG support
// "IE 9.0 (Windows)", // DOES NOT WORK -- no Int32Array support and shim causes 'Out of memory' error
"IE 11.0.0 (Windows 7.0.0)",
"Edge 16.16299.0 (Windows 10.0.0)",
"Firefox 58.0.0 (Mac OS X 10.11.0)",
"Chrome 64.0.3282 (Mac OS X 10.11.6)",
"Safari 11.0.3 (Mac OS X 10.11.6)",
"Mobile Safari 10.0.0 (iOS 10.2.0)",
"Chrome Mobile WebView 44.0.2403 (Android 6.0.0)"
];
var KARMA_CONFIG = "./build/config/karma.conf.js";
// Lazy-load dependencies to avoid run-time errors if using wrong version of Node
function lint() { return require("./build/util/lint_runner.js"); }
function karma() { return require("./build/util/karma_runner.js"); }
function version() { return require("./build/util/version_checker.js"); }
checkNodeVersion();
desc("Lint and test");
task("default", ["lint", "test"], function() {
console.log("\n\nBUILD OK");
});
desc("Start Karma server -- run this first");
task("karma", function() {
karma().serve(KARMA_CONFIG, complete, fail);
}, {async: true});
desc("Start HTTP server for manual testing");
task("run", function() {
jake.exec("node ./node_modules/http-server/bin/http-server ./src", { interactive: true }, complete);
}, {async: true});
desc("Lint everything");
task("lint", [], function () {
var passed = lint().validateFileList(nodeFilesToLint(), nodeLintOptions(), {});
passed = lint().validateFileList(browserFilesToLint(), browserLintOptions(), browserLintGlobals()) && passed;
if (!passed) fail("Lint failed");
});
desc("Test browser code");
task("test", function() {
karma().runTests({
configFile: KARMA_CONFIG,
browsers: TESTED_BROWSERS,
strict: !process.env.loose
}, complete, fail);
}, {async: true});
function checkNodeVersion() {
var installedVersion = process.version;
version().check("Node", !process.env.loose, NODE_VERSION, installedVersion, fail);
}
function nodeFilesToLint() {
var files = new jake.FileList();
files.include("build/util/**/*.js");
files.include("Jakefile.js");
return files.toArray();
}
function browserFilesToLint() {
var files = new jake.FileList();
files.include("src/*.js");
return files.toArray();
}
function sharedLintOptions() {
return {
bitwise:true,
curly:false,
eqeqeq:true,
forin:true,
immed:true,
latedef:false,
newcap:true,
noarg:true,
noempty:true,
nonew:true,
regexp:true,
undef:true,
strict:true,
trailing:true
};
}
function nodeLintOptions() {
var options = sharedLintOptions();
options.node = true;
return options;
}
function browserLintOptions() {
var options = sharedLintOptions();
options.browser = true;
return options;
}
function browserLintGlobals() {
return {
jdls: true,
console: false,
mocha: false,
describe: false,
it: false,
expect: false,
dump: false,
beforeEach: false,
afterEach: false
};
}
}());
================================================
FILE: LICENSE.TXT
================================================
License
-------
Copyright (c) 2013 James Shore
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: build/config/karma.conf.js
================================================
// Karma configuration
// Generated on Tue Sep 24 2013 14:33:42 GMT-0700 (PDT)
(function() {
"use strict";
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '../..',
// frameworks to use
frameworks: ['mocha', 'expect'],
client: {
// Mocha config options
mocha: {
timeout: '5000',
}
},
// list of files / patterns to load in the browser
files: [
'src/viz/viz.js',
'src/*.js'
],
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['dots'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: [],
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false
});
};
}());
================================================
FILE: build/util/build_command.js
================================================
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
(function() {
"use strict";
var UNIX_BUILD_COMMAND = "./jake.sh";
var WINDOWS_BUILD_COMMAND = "jake";
var UNIX_INTEGRATE_COMMAND = "./integrate.sh";
var WINDOWS_INTEGRATE_COMMAND = "integrate";
var os = require("os");
module.exports = function() {
return os.platform() === "win32" ? WINDOWS_BUILD_COMMAND : UNIX_BUILD_COMMAND;
};
module.exports.integrate = function() {
return os.platform() === "win32" ? WINDOWS_INTEGRATE_COMMAND : UNIX_INTEGRATE_COMMAND;
};
}());
================================================
FILE: build/util/karma_runner.js
================================================
// Copyright (c) 2012-2015 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
// Helper functions for running Karma
(function() {
"use strict";
var path = require("path");
var sh = require("./sh.js");
var runner = require("karma/lib/runner");
var server = require("karma/lib/server");
var KARMA = "node node_modules/karma/bin/karma";
exports.serve = function(configFile, success, fail) {
var command = KARMA + " start " + configFile;
sh.run(command, success, function () {
fail("Could not start Karma server");
});
};
exports.runTests = function(options, success, fail) {
options.capture = options.capture || [];
var config = {
configFile: path.resolve(options.configFile),
browsers: options.capture,
singleRun: options.capture.length > 0
};
var runKarma = runner.run.bind(runner);
if (config.singleRun) runKarma = server.start.bind(server);
var stdout = new CapturedStdout();
runKarma(config, function(exitCode) {
stdout.restore();
if (exitCode) return fail("Client tests failed (did you start the Karma server?)");
var browserMissing = checkRequiredBrowsers(options.browsers, stdout);
if (browserMissing && options.strict) return fail("Did not test all browsers");
if (stdout.capturedOutput.indexOf("TOTAL: 0 SUCCESS") !== -1) return fail("No tests were run!");
return success();
});
};
function checkRequiredBrowsers(requiredBrowsers, stdout) {
var browserMissing = false;
requiredBrowsers.forEach(function(browser) {
browserMissing = lookForBrowser(browser, stdout.capturedOutput) || browserMissing;
});
return browserMissing;
}
function lookForBrowser(browser, output) {
var missing = output.indexOf(browser + ": Executed") === -1;
if (missing) console.log("Warning: " + browser + " was not tested!");
return missing;
}
function CapturedStdout() {
var self = this;
self.oldStdout = process.stdout.write;
self.capturedOutput = "";
process.stdout.write = function(data) {
self.capturedOutput += data;
self.oldStdout.apply(this, arguments);
};
}
CapturedStdout.prototype.restore = function() {
process.stdout.write = this.oldStdout;
};
}());
================================================
FILE: build/util/lint_runner.js
================================================
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
"use strict";
var jshint = require("jshint").JSHINT;
var fs = require("fs");
exports.validateSource = function(sourceCode, options, globals, description) {
description = description ? description + " " : "";
var pass = jshint(sourceCode, options, globals);
if (pass) {
console.log(description + "ok");
}
else {
console.log(description + "failed");
jshint.errors.forEach(function(error) {
console.log(error.line + ": " + error.evidence.trim());
console.log(" " + error.reason);
});
}
return pass;
};
exports.validateFile = function(filename, options, globals) {
var sourceCode = fs.readFileSync(filename, "utf8");
return exports.validateSource(sourceCode, options, globals, filename);
};
exports.validateFileList = function(fileList, options, globals) {
var pass = true;
fileList.forEach(function(filename) {
pass = exports.validateFile(filename, options, globals) && pass;
});
return pass;
};
================================================
FILE: build/util/nodeunit_runner.js
================================================
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
(function() {
"use strict";
var nodeunit = require("nodeunit");
var REPORTER = "default";
exports.runTests = function(testFiles, success, fail) {
nodeunit.reporters[REPORTER].run(testFiles, null, function(failures) {
if (failures) fail("Tests failed");
else success();
});
};
}());
================================================
FILE: build/util/sh.js
================================================
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
(function() {
"use strict";
var jake = require("jake");
exports.runMany = function(commands, successCallback, failureCallback) {
var stdout = [];
function serializedSh(command) {
if (command) {
run(command, function(oneStdout) {
stdout.push(oneStdout);
serializedSh(commands.shift());
}, failureCallback);
}
else {
successCallback(stdout);
}
}
serializedSh(commands.shift());
};
var run = exports.run = function(oneCommand, successCallback, failureCallback) {
var stdout = "";
var child = jake.createExec(oneCommand);
child.on("stdout", function(data) {
process.stdout.write(data);
stdout += data;
});
child.on("stderr", function(data) {
process.stderr.write(data);
});
child.on("cmdEnd", function() {
successCallback(stdout);
});
child.on("error", function() {
failureCallback(stdout);
});
console.log("> " + oneCommand);
child.run();
};
}());
================================================
FILE: build/util/version_checker.js
================================================
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.
(function() {
"use strict";
exports.check = function(name, strict, expectedString, actualString, fail) {
function failWithQualifier(qualifier) {
fail("Incorrect " + name + " version. Expected " + qualifier +
" [" + expectedString + "], but was [" + actualString + "].");
}
var expected = parseNodeVersion("expected Node version", expectedString, fail);
var actual = parseNodeVersion("Node version", actualString, fail);
if (!process.env.loose) {
if (actual[0] !== expected[0] || actual[1] !== expected[1] || actual[2] !== expected[2]) {
failWithQualifier("exactly");
}
}
else {
if (actual[0] < expected[0]) failWithQualifier("at least");
if (actual[0] === expected[0] && actual[1] < expected[1]) failWithQualifier("at least");
if (actual[0] === expected[0] && actual[1] === expected[1] && actual[2] < expected[2]) failWithQualifier("at least");
}
};
function parseNodeVersion(description, versionString, fail) {
var versionMatcher = /^v(\d+)\.(\d+)\.(\d+)(\-|$)/; // v[major].[minor].[bugfix]
var versionInfo = versionString.match(versionMatcher);
if (versionInfo === null) fail("Could not parse " + description + " (was '" + versionString + "')");
var major = parseInt(versionInfo[1], 10);
var minor = parseInt(versionInfo[2], 10);
var bugfix = parseInt(versionInfo[3], 10);
return [major, minor, bugfix];
}
}());
================================================
FILE: convert_sample.pl
================================================
#!/usr/bin/perl
# Converts input into JavaScript. Intended to make it easier to generate code samples.
# To use:
# 1. Run this program from the terminal (`./convert_sample.pl`).
# 2. Paste in code to convert.
# 3. Press ^D (control-D).
# 4. Make sure terminal window is wide enough to display output without wrapping.
# 5. Copy output into appropriate part of user_code.js.
my @lines = <STDIN>;
foreach $line (@lines) {
$line =~ s/\\/\\\\/g;
$line =~ s/\t/ /g;
$line =~ s/\n/\\n/g;
$line =~ s/\'/\\'/g;
};
$output = join "' + \n\t'", @lines;
print "\n\nOUTPUT:\n";
print "'$output'\n";
================================================
FILE: deploy.bat
================================================
call jake -f deploy.jakefile %*
================================================
FILE: deploy.jakefile
================================================
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
/*global desc, task, jake, fail, complete */
var PRODUCTION_HOST = "jdlshore_objectplayground@ssh.phx.nearlyfreespeech.net";
var PRODUCTION_DIR = "/home/public";
var INTEGRATION_BRANCH = "integration";
var GIT_HEAD = "HEAD";
var DEPLOY_COMMAND = "rsync --recursive --keep-dirlinks --perms --times --delete --delete-excluded --human-readable --progress --exclude=.DS_Store --include=.* src/* " + PRODUCTION_HOST + ":" + PRODUCTION_DIR + "/";
var sh = require("./build/util/sh.js");
var build_command = require("./build/util/build_command.js");
(function() {
"use strict";
task("default", function() {
console.log("This Jakefile deploys the application. Use -T option to see targets.\n");
});
desc("Integrate master branch and deploy to production");
task("latest", ["integrate"], function() {
deploy(INTEGRATION_BRANCH, complete);
}, {async: true});
desc("Deploy git HEAD to production (use to manually fix release)")
task("head", ["build", "git"], function() {
deploy(GIT_HEAD, complete);
}, {async: true});
// Ensure that Git status is clean
task("git", function() {
run("git status --porcelain", function(stdout) {
if (stdout[0]) fail("Cannot deploy until all files checked into git (or added to .gitignore).");
complete();
});
}, {async: true});
// Run integrate script
task("integrate", function() {
run(build_command.integrate(), complete, "Cannot deploy until integration succeeds.");
}, {async: true});
// Make sure build is clean
task("build", function() {
run(build_command(), complete, "Cannot deploy until build passes.");
}, {async: true});
function deploy(commitToTag, complete) {
sh.run(DEPLOY_COMMAND, onSuccess, onFailure);
function onSuccess() {
tagCommit();
console.log("\n\nDEPLOY SUCCEEDED");
}
function onFailure() {
console.log("\n\nDEPLOY FAILED");
}
function tagCommit(tagRoot) {
var deployedAt = new Date();
var tagMessage = "Application successfully deployed at " + deployedAt.toUTCString() + "\nLocal time: " + deployedAt.toLocaleString();
var tagCommand = "git tag -a '" + tagName(deployedAt) + "' -m '" + tagMessage + "' " + commitToTag;
sh.run(tagCommand, complete, function() {
fail("Application deployed and online, but failed to tag repository.");
});
}
function tagName(date) {
var humanReadableDate = date.getFullYear() + "." + (date.getMonth() + 1) + "." + date.getDate() + "-";
var timestamp = date.getTime();
return "deploy-" + humanReadableDate + timestamp;
}
}
function run(command, callback, errorMessage) {
errorMessage = errorMessage || "shell command exited with error code";
sh.run(command, callback, function() {
fail(errorMessage);
});
}
}());
================================================
FILE: deploy.sh
================================================
./jake.sh -f deploy.jakefile $*
================================================
FILE: integrate.bat
================================================
call jake -f integrate.jakefile %*
================================================
FILE: integrate.jakefile
================================================
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
/*global desc, task, jake, fail, complete */
var build_command = require("./build/util/build_command.js");
var sh = require("./build/util/sh.js");
(function() {
"use strict";
task("default", ["promote"]);
desc("Merge master branch into integration branch.");
task("promote", ["status"], function() {
checkoutAndBuild(afterSuccessfulBuild, afterFailedBuild);
function checkoutAndBuild(successCallback, failureCallback) {
sh.runMany([
"git checkout master",
build_command()
], successCallback, failureCallback);
}
function afterSuccessfulBuild() {
run([
"git checkout integration",
"git merge master --no-ff --log=500 -m INTEGRATE: --edit",
"git checkout master",
"git merge integration"
], complete);
}
function afterFailedBuild() {
fail("Integration failed.");
}
});
// Ensure there aren't any files that need to be checked in or ignored
task("status", function() {
run(["git status --porcelain"], function(stdout) {
if (stdout[0]) fail("Working directory contains files to commit or ignore.");
complete();
});
}, {async:true});
function run(commands, callback, errorMessage) {
errorMessage = errorMessage || "shell command exited with error code";
sh.runMany(commands, callback, function() {
fail(errorMessage);
});
}
}());
================================================
FILE: integrate.sh
================================================
./jake.sh -f integrate.jakefile $*
================================================
FILE: jake.bat
================================================
@echo off
if not exist node_modules\.bin\jake.cmd call npm rebuild
node_modules\.bin\jake %*
================================================
FILE: jake.sh
================================================
#!/bin/sh
[ ! -f node_modules/.bin/jake ] && npm rebuild
node_modules/.bin/jake $*
================================================
FILE: package.json
================================================
{
"name": "12_object_playground",
"version": "1.0.0",
"description": "A tool for visualizing and experimenting with JavaScript object relationships",
"devDependencies": {
"expect.js": "^0.3.1",
"http-server": "^0.11.1",
"jake": "^8.0.15",
"jshint": "^2.1.2",
"karma": "^2.0.0",
"karma-expect": "^1.1.0",
"karma-mocha": "^1.3.0",
"mocha": "^5.0.1"
},
"scripts": {
"test": "jake"
},
"repository": {
"type": "git",
"url": "https://github.com/jamesshore/object_playground.git"
},
"author": "James Shore",
"license": "MIT",
"bugs": {
"url": "https://github.com/jamesshore/object_playground/issues"
},
"homepage": "http://www.objectplayground.com/"
}
================================================
FILE: readme.md
================================================
Object Playground
=============
Object Playground is a tool for visualizing and experimenting with JavaScript object relationships. It's [online at objectplayground.com](http://www.objectplayground.com). Object Playground is a project from [Let's Code: Test-Driven JavaScript](http://www.letscodejavascript.com), a screencast series focused on professional, rigorous JavaScript development. Created by James Shore.
This repository contains the source code for Object Playground.
Browser Support
---------------
Object Playground has been tested against the browsers listed at the top of `Jakefile.js`. At the time of this writing, the following browsers are known to work. Other modern browsers are likely to work as well.
* Chrome 40
* Firefox 36
* IE 10
* IE 11
* Safari 8.0 (Mac)
* Safari 7.0 (iOS)
The following browsers are known to *not* work:
* IE 9: Lacks the Int32Array type used by Viz.js. A polyfill was attempted, but resulted in an "out of memory" error.
* IE 8: Does not support SVG, lacks Int32Array type.
Building and Testing
--------------------
Before building for the first time:
1. Install [Node.js](http://nodejs.org/download/). Use the version described in Jakefile.js NODE_VERSION variable. (The npm `n` package can help with changing Node versions.)
2. Download the source code by cloning the git repository: `git clone https://github.com/jamesshore/object_playground`.
3. All commands must run from the root of the source tree: `cd <directory>`.
4. To cause the build to fail unless certain browsers are tested, edit `TESTED_BROWSERS` at the top of `Jakefile.js`.
To build (and test):
1. Run `./jake.sh karma` (Unix/Mac) or `jake karma` (Windows) to start the Karma server.
2. Point the browsers you want to test against at the URL `http://localhost:8080`.
3. Run `./jake.sh` (Unix/Mac) or `jake` (Windows) every time you want to build and test. Use the `loose=true` option to relax the Node.js and browser version requirements.
Note: At the time of this writing, the source code has not been confirmed to build on Windows.
To test manually:
1. Run `./jake.sh run`.
2. Open `http://localhost:8080` in a browser.
(Or just open `src/index.html` in a browser.)
Development and Integration
---------------------------
This repository contains two branches:
* `master` is for development.
* `integration` is guaranteed to build and pass all tests.
To integrate:
1. Get to a clean build and commit your code to the master branch.
2. Run `./integrate.sh` (Unix/Mac) or `integrate` (Windows) to test the master branch and merge it into the integration branch.
To change code samples:
1. Use `convert_sample.pl` to convert code to JavaScript string.
2. Modify `src/user_code.js` with new sample.
Deploying
---------
Before deploying for the first time:
1. Install rsync or make sure it's available on the path
2. Modify `PRODUCTION_HOST` at top of `deploy.jakefile` to match production host (using `username@host` format)
3. Modify `PRODUCTION_DIR` at top of `deploy.jakefile` to be the directory on the host where your public web content goes
To deploy:
1. Run `./deploy.sh latest` (Unix/Mac) or `deploy latest` (Windows) to integrate the master branch and deploy it. The script will tag your git repository with `deploy-<date>-<timestamp>` if the deploy succeeds.
In case of a bad deployment:
1. Choose a previous, good commit to deploy. `gitk --all` and the `deploy` tags may be helpful here.
2. Check out the commit: `git checkout <commit_id>`
3. Run `./deploy.sh head` (Unix/Mac) or `deploy head` (Windows) to deploy the commit. As above, the script will tag the git repository if the deploy succeeds.
================================================
FILE: src/_object_graph_test.js
================================================
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.
(function() {
"use strict";
describe("ObjectGraph", function() {
function newGraph(name, object, options) {
return new jdls.ObjectGraph(name, object, options);
}
function nodes(object, options) {
var graph = newGraph("name", object, options);
return graph.nodes().map(function(element) {
return element.value();
});
}
function edges(object) {
var graph = newGraph("name", object);
return graph.edges().map(function(element) {
return [element.from.value(), element.to.value()];
});
}
describe("node collection", function() {
it("recursively collects nodes", function() {
var a = { name: "a" };
var b = { name: "b",
a: a
};
var c = { name: "c",
b: b
};
expect(nodes(c)).to.eql([c, b, a]);
});
it("doesn't collect nodes more than once", function() {
var a = { name: "a" };
var b = { name: "b",
a: a
};
var c = { name: "c",
a: a,
b: b
};
expect(nodes(c)).to.eql([c, a, b]);
});
it("handles cycles", function() {
var a = { name: "a" };
var b = { name: "b" };
a.b = b;
b.a = a;
// expect's eql() method can't handle the cycles here, so we do the assertion manually
var graph = nodes(a);
expect(graph.length).to.equal(2);
expect(graph[0]).to.equal(a);
expect(graph[1]).to.equal(b);
});
});
describe("edge collection", function() {
it("recursively collects edges", function() {
var a = { name: "a" };
var b = { name: "b",
a: a
};
var c = { name: "c",
b: b
};
expect(edges(c)).to.eql([
[c, b],
[b, a]
]);
});
it("uses identical node objects when multiple edges connect to the same nodes", function() {
var a = { name: "a" };
var b = { name: "b" };
a.b = b;
b.a = a;
var edges = newGraph("name", a).edges();
expect(edges[0].from).to.equal(edges[1].to);
expect(edges[1].from).to.equal(edges[0].to);
});
it("includes ID for origin node's field", function() {
var a = { name: "a" };
var b = { name: "b",
a: a
};
var edges = newGraph("name", b).edges();
expect(edges[0].fromField).to.equal("f1");
});
});
describe("built-in object filtering", function() {
it("ignores built-in objects", function() {
var object = {
a: Object.prototype,
b: Function.prototype,
c: Array.prototype,
d: String.prototype,
e: Boolean.prototype,
f: Number.prototype,
g: Date.prototype,
h: RegExp.prototype,
i: Error.prototype
};
expect(nodes(object)).to.eql([object]);
});
it("can be turned off", function() {
expect(nodes(Object, { builtins: true })).to.eql([
Object, Object.prototype, Function.prototype, Function
]);
});
});
describe("function filtering", function() {
it("filters out 'ordinary' function nodes", function() {
var object = {
a: function ignoredFunction() {}
};
expect(nodes(object)).to.eql([object]);
});
it("filters out edges linking filtered nodes", function() {
var object = {
a: function ignoredFunction() {}
};
expect(edges(object)).to.eql([]);
});
it("filters out 'ordinary' functions with no prototype", function() {
function ignoredFunction() {}
var object = {
a: ignoredFunction
};
ignoredFunction.prototype = undefined;
expect(nodes(object)).to.eql([object]);
});
it("shows functions with additional properties", function() {
function notIgnored() {}
notIgnored.additionalProperty = "foo";
var object = {
a: notIgnored
};
expect(nodes(object)).to.eql([object, notIgnored, notIgnored.prototype]);
});
it("shows functions whose prototypes have additional properties", function() {
function notIgnored() {}
notIgnored.prototype.additionalProperty = "foo";
var object = {
a: notIgnored
};
expect(nodes(object)).to.eql([object, notIgnored, notIgnored.prototype]);
});
it("shows functions (and doesn't crash) when prototype is not an object", function() {
function notIgnored() {}
notIgnored.prototype = "I'm a string where an object should be!";
var object = {
a: notIgnored
};
expect(nodes(object)).to.eql([object, notIgnored]);
});
it("shows functions that are used as constructors", function() {
function MyClass() {}
MyClass.prototype.a = 1;
var object = new MyClass();
expect(nodes(object)).to.eql([object, MyClass.prototype, MyClass]);
});
it("shows functions that are artificially set as constructors", function() {
function MyClass() {}
var object = { constructor: MyClass };
expect(nodes(object)).to.eql([object, MyClass, MyClass.prototype]);
});
it("shows all links to constructor functions, even when link isn't constructor reference", function() {
function MyClass() {}
var object = new MyClass();
var container = [ object, MyClass ];
expect(edges(container)).to.eql([
[container, object],
[object, MyClass.prototype],
[MyClass.prototype, MyClass],
[MyClass, MyClass.prototype],
[container, MyClass]
]);
});
it("shows all links to constructor functions, even when link is found before function is known to be constructor", function() {
function MyClass() {}
var object = new MyClass();
var container = [ MyClass, object ];
expect(edges(container)).to.eql([
[container, MyClass],
[container, object],
[object, MyClass.prototype],
[MyClass.prototype, MyClass],
[MyClass, MyClass.prototype]
]);
});
it("shows functions whose prototype does not point back to itself", function() {
var object = {};
function MyClass() {}
MyClass.prototype = object;
var container = [ object, MyClass ];
expect(nodes(container)).to.eql([container, object, MyClass]);
});
it("does not crash when examining functions with undefined prototype property", function() {
function MyClass() {}
var object = new MyClass();
MyClass.prototype = undefined;
expect(nodes(object)).to.eql([object, Object.getPrototypeOf(object), MyClass]);
});
it("does not crash when examining functions with null prototype property", function() {
function MyClass() {}
var object = new MyClass();
MyClass.prototype = null;
expect(nodes(object)).to.eql([object, Object.getPrototypeOf(object), MyClass]);
});
it("can be turned off", function() {
function aFunction() {}
var object = { a: aFunction };
expect(nodes(object, { allFunctions: true })).to.eql([
object,
aFunction,
aFunction.prototype
]);
});
});
});
}());
================================================
FILE: src/_object_node_test.js
================================================
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
(function() {
"use strict";
mocha.setup({ignoreLeaks: true});
describe("ObjectNode", function() {
function newNode(name, object) {
return new jdls.ObjectNode(name, object);
}
describe("id", function() {
it("is unique for each node object regardless of contents", function() {
var object = {};
var node1 = newNode("name", object);
var node2 = newNode("name", object);
expect(node1.id()).to.not.equal(node2.id());
});
});
describe("name", function() {
it("is based on provided name for most objects", function() {
var node = newNode("name", {});
expect(node.name()).to.equal("name");
});
it("doesn't crash when object has no prototype", function() {
var node = newNode("name", Object.create(null));
expect(node.name()).to.equal("name");
});
it("uses function name for functions", function() {
var node = newNode("name", function aFunction() {});
expect(node.name()).to.equal("aFunction()");
});
it("is anonymous for unnamed functions", function() {
var node = newNode("name", function() {});
expect(node.name()).to.equal("<anon>()");
});
it("handles 'Function' special case", function() {
var node = newNode("name", Function.prototype);
expect(node.name()).to.equal("Function.prototype");
});
it("uses constructor name when present", function() {
function TheConstructor() {}
var node = newNode("name", TheConstructor.prototype);
expect(node.name()).to.equal("TheConstructor.prototype");
});
it("does not use inherited constructor name", function() {
var proto = {
constructor: function TheConstructor() {}
};
var object = Object.create(proto);
var node = newNode("name", object);
expect(node.name()).to.equal("name");
});
it("does not use constructor name when constructor's prototype property points elsewhere", function() {
var object = {
constructor: function TheConstructor() {}
};
var node = newNode("name", object);
expect(node.name()).to.equal("name");
});
});
describe("type", function() {
it("is same as prototype's name", function() {
var proto = function foo() {};
var object = Object.create(proto);
var node = newNode("name", object);
expect(node.type()).to.equal("foo()");
});
it("is anonymous when prototype doesn't have a name", function() {
var object = Object.create({});
var node = newNode("name", object);
expect(node.type()).to.equal("<anon>");
});
it("is null when object has no prototype", function() {
var node = newNode("name", Object.create(null));
expect(node.type()).to.equal("<null>");
});
});
describe("equals", function() {
it("is equal when objects have same identity, regardless of name", function() {
var object = {};
var node1 = newNode("name", object);
var node2 = newNode("different name", object);
expect(node1.equals(node2)).to.be(true);
});
it("is not equal when objects have different identify, even if they have same contents", function() {
var node1 = newNode("name", {});
var node2 = newNode("name", {});
expect(node1.equals(node2)).to.be(false);
});
});
describe("properties", function() {
function properties(object) {
var node = newNode("name", object);
return node.properties();
}
function conversionOf(variable) {
var object = { name: variable };
return properties(object)[0].value;
}
it("provides each property", function() {
var object = {
a: 1,
b: 2,
c: 3
};
expect(properties(object)).to.eql([
{ name: "a", value: "1", id: "f0" },
{ name: "b", value: "2", id: "f1" },
{ name: "c", value: "3", id: "f2" }
]);
});
it("converts primitives", function() {
expect(conversionOf(undefined)).to.equal("undefined");
expect(conversionOf(null)).to.equal("null");
expect(conversionOf(true)).to.equal("true");
expect(conversionOf(false)).to.equal("false");
expect(conversionOf(0)).to.equal("0");
expect(conversionOf(1)).to.equal("1");
expect(conversionOf("string")).to.equal('"string"');
});
it("converts functions", function() {
expect(conversionOf(function aFunction() {})).to.equal("aFunction()");
expect(conversionOf(function () {})).to.equal("<anon>()");
});
it("converts objects to their names when they have one", function() {
function MyClass() {}
expect(conversionOf(MyClass.prototype)).to.equal("MyClass.prototype");
});
it("converts objects to their types when they don't have a name", function() {
expect(conversionOf({})).to.equal("{Object.prototype}");
});
it("handles 'Function' special case", function() {
expect(conversionOf(Function.prototype)).to.equal("Function.prototype");
});
});
describe("prototype", function() {
function prototype(object) {
var node = newNode("name", object);
return node.prototype();
}
function conversionOf(object) {
return prototype(object).value;
}
it("converts objects without a prototype to 'null'", function() {
expect(conversionOf(Object.create(null))).to.equal("null");
});
it("converts prototypes to their name if they have one", function() {
function MyClass() {}
expect(conversionOf(new MyClass())).to.equal("MyClass.prototype");
});
it("converts prototypes without a name to 'xxx.<prototype>'", function() {
expect(conversionOf(Object.create({}))).to.equal("name.<prototype>");
});
});
describe("sub-nodes", function() {
function subNodes(object) {
var result = [];
var node = newNode("name", object);
node.forEachSubNode(function(subnode) {
result.push(subnode.name());
});
return result;
}
it("provides each function and object, and the prototype", function() {
function MyClass() {}
var object = new MyClass();
object.a = function aFunction() {};
object.b = Array.prototype;
expect(subNodes(object)).to.eql([
"aFunction()",
"Array.prototype",
"MyClass.prototype"
]);
});
it("skips null, undefined, and primitives", function() {
var object = {
a: true,
b: "string",
c: 10,
d: undefined,
e: null
};
expect(subNodes(object)).to.eql([
"Object.prototype"
]);
});
it("skips prototype if it's null", function() {
expect(subNodes(Object.create(null))).to.eql([]);
});
it("provides fallback name based on property name", function() {
var proto = Object.create(null);
var object = Object.create(proto);
object.a = {
b: {}
};
expect(subNodes(object)).to.eql([
"name.a",
"name.<prototype>"
]);
});
it("provides id and name that matches field id and name", function() {
var object = {
a: 1,
b: {}
};
var indexes = [];
newNode("name", object).forEachSubNode(function(subnode, index, name) {
indexes.push({ index: index, name: name });
});
expect(indexes).to.eql([
{ index: "f1", name: "b" },
{ index: "proto", name: "<prototype>" }
]);
});
});
});
}());
================================================
FILE: src/_ui_test.js
================================================
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.
(function() {
"use strict";
describe("UI", function() {
var preload;
var error;
var content;
var samples;
var userCode;
var showBuiltins;
var showAllFunctions;
var evaluate;
var graph;
beforeEach(function() {
document.body.innerHTML +=
"<div id='loading'>Loading</div>" +
"<div id='error'>Error</div>" +
"<div id='content'>" +
"<ul id='samples'></ul>" +
"<textarea id='userCode'></textarea>" +
"<input id='evaluate' type='submit'>" +
"<input id='builtins' type='checkbox'>" +
"<input id='functions' type='checkbox'>" +
"<div id='graph'></div>" +
"</div>";
preload = document.getElementById("loading");
error = document.getElementById("error");
content = document.getElementById("content");
samples = document.getElementById("samples");
userCode = document.getElementById("userCode");
evaluate = document.getElementById("evaluate");
showBuiltins = document.getElementById("builtins");
showAllFunctions = document.getElementById("functions");
graph = document.getElementById("graph");
initialize();
});
function initialize() {
jdls.ui.initialize({
preloadDiv: preload,
errorDiv: error,
contentDiv: content,
samplesList: samples,
userCodeTextArea: userCode,
evaluateButton: evaluate,
showBuiltinsCheckbox: showBuiltins,
showAllFunctionsCheckbox: showAllFunctions,
graphDiv: graph
});
}
afterEach(function() {
document.body.removeChild(preload);
document.body.removeChild(content);
});
describe("initialization", function() {
var defaultSample;
beforeEach(function() {
defaultSample = jdls.usercode.DEFAULT_SAMPLE;
});
it("hides pre-load div and displays content div", function() {
expect(preload.style.display).to.equal("none");
expect(error.style.display).to.equal("none");
expect(content.style.display).to.equal("block");
});
it("populates sample buttons", function() {
expect(samples.innerHTML).to.contain(defaultSample.name);
});
it("puts default user code into text area", function() {
expect(userCode.value).to.equal(defaultSample.code);
});
it("draws graph", function() {
expect(graph.innerHTML).to.contain("Generated by graphviz");
});
it("displays error div if exception thrown", function() {
// simulate IE 8 behavior
var patchedMethod = Object.getOwnPropertyNames;
try {
delete Object.getOwnPropertyNames;
initialize();
expect(preload.style.display).to.equal("none");
expect(error.style.display).to.equal("block");
expect(content.style.display).to.equal("none");
}
finally {
Object.getOwnPropertyNames = patchedMethod;
}
});
it("displays error div if Int32Array not present", function() {
/*global Int32Array:true */
// simulate IE 9 behavior
var patchedClass = Int32Array;
try {
Int32Array = undefined;
initialize();
expect(preload.style.display).to.equal("none");
expect(error.style.display).to.equal("block");
expect(content.style.display).to.equal("none");
}
finally {
Int32Array = patchedClass;
}
});
});
describe("options", function() {
it("respects 'show builtins' checkbox", function() {
userCode.value = "this.a = [];";
showBuiltins.checked = true;
evaluate.click();
expect(graph.innerHTML).to.contain("Array()");
});
it("respects 'show all functions' checkbox", function() {
userCode.value = "this.a = function a() {};";
showAllFunctions.checked = true;
evaluate.click();
expect(graph.innerHTML).to.contain("constructor");
});
});
describe("interactivity", function() {
it("re-draws graph when evaluate button clicked", function() {
userCode.value = "this.test_marker = 1;";
evaluate.click();
expect(graph.innerHTML).to.contain("test_marker");
});
it("populates text area and re-evaluates when sample button clicked", function() {
userCode.value = "this.test_marker = 1;";
evaluate.click();
var firstSample = jdls.usercode.samples[Object.getOwnPropertyNames(jdls.usercode.samples)[0]];
var firstSampleButton = samples.firstElementChild.firstElementChild;
firstSampleButton.click();
expect(userCode.value).to.equal(firstSample.code);
expect(graph.innerHTML).to.not.contain("test_marker");
});
it("displays exception when bad code entered", function() {
userCode.value = "asdf";
evaluate.click();
expect(graph.innerHTML).to.contain("<pre>ReferenceError");
});
});
});
}());
================================================
FILE: src/_user_code_test.js
================================================
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.
(function() {
"use strict";
describe("user code", function() {
var evaluate;
var samples;
beforeEach(function() {
evaluate = jdls.usercode.evaluate;
samples = jdls.usercode.samples;
});
it("evaluates to an object", function() {
var code = "" +
"this.foo = {" +
" a: 1," +
" b: 2" +
"}";
expect(evaluate(code)).to.eql({
foo: {
a: 1,
b: 2
}
});
});
describe("samples", function() {
function check(sample) {
try {
evaluate(sample.code);
}
catch (ex) {
console.log("Warning: '" + sample.name + "' sample doesn't compile");
// ES6 samples don't work on all browsers, so following line is commented out to
// prevent test failure
// throw ex;
}
}
it("all compile", function() {
/*jshint forin:false */
for (var sampleName in samples) {
var sample = samples[sampleName];
check(sample);
}
});
});
});
}());
================================================
FILE: src/_viz_visualizer_test.js
================================================
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.
(function() {
"use strict";
describe("Viz.js Visualizer", function() {
var graph;
var details;
beforeEach(function() {
var object = {
a: {
b: "b"
}
};
graph = new jdls.ObjectGraph("name", object);
details = jdls.viz.details;
});
it("escapes HTML strings", function() {
var esc = details.escapeHtml;
expect(esc("&&")).to.equal("&&");
expect(esc("<<>>")).to.equal("<<>>");
expect(esc('""')).to.equal("""");
expect(esc("''")).to.equal("''");
expect(esc("\n\n")).to.equal("<br /><br />");
expect(esc("\t\t")).to.equal(" ");
});
it("converts nodes (with alternating property colors)", function() {
var node = new jdls.ObjectNode("name", { a: 1, b: 2, c: 3 });
expect(details.nodeToViz(node)).to.equal(
' "' + node.id() + '" [label=<\n' +
' <table border="0" cellborder="0" cellpadding="3" cellspacing="0">\n' +
' <th><td port="title" bgcolor="#00668F"><font color="white" point-size="11">name</font></td></th>\n' +
' <tr><td port="f0" bgcolor="#E3E3E3" align="left" balign="left"> <font color="#333333">a:</font> <font color="#666666">1</font> </td></tr>\n' +
' <tr><td port="f1" bgcolor="#FDFDFD" align="left" balign="left"> <font color="#333333">b:</font> <font color="#666666">2</font> </td></tr>\n' +
' <tr><td port="f2" bgcolor="#E3E3E3" align="left" balign="left"> <font color="#333333">c:</font> <font color="#666666">3</font> </td></tr>\n' +
' <tr><td port="proto" bgcolor="#0082B6"><font color="white">Object.prototype</font></td></tr>\n' +
' </table>\n' +
' >];\n'
// '"' + node.id() + '" [\n' +
// 'label = "<title>name \\{Object\\}| <f0> a: 1| <proto> \\<prototype\\>: Object"\n' +
// 'shape = "record"];\n'
);
});
it("converts edges", function() {
var edge = graph.edges()[0];
var fromId = graph.nodes()[0].id();
var toId = graph.nodes()[1].id();
expect(details.edgeToViz(edge)).to.equal(
'"' + fromId + '":f0 -> "' + toId + '":title [];'
);
});
it("converts entire graph", function() {
var fromNode = graph.nodes()[0];
var toNode = graph.nodes()[1];
var edge = graph.edges()[0];
expect(details.graphToViz(graph)).to.equal(
'digraph g {\n' +
' graph [\n' +
' rankdir = "LR"\n' +
' ];\n' +
' node [\n' +
' fontname = "Helvetica"\n' +
' fontsize = "10"\n' +
' shape = "plaintext"\n' +
' ];\n' +
' edge [\n' +
' color = "#555555"\n' +
' arrowsize = "0.8"\n' +
' ];\n' +
' \n' +
details.nodeToViz(fromNode) +
details.nodeToViz(toNode) +
details.edgeToViz(edge) +
'}\n'
);
});
it("renders 'viz' format to svg", function() {
var svg = details.vizToSvg("digraph { a -> b; }");
expect(svg).to.contain("Generated by graphviz");
});
});
}());
================================================
FILE: src/index.html
================================================
<!DOCTYPE html>
<html>
<head>
<title>Object Playground: The Definitive Guide to Object-Oriented JavaScript</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Cache-Control" content="no-cache">
<link rel="stylesheet" type="text/css" href="site.css?2013-07-28">
<!-- Google Analytics -->
<!-- Note: Google recommends this script be placed in the <head> tag.
It's asynchronous, so doing so shouldn't affect load time.
(Also note the 'isogram' variable naming. Cute.) -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-40614638-1', 'objectplayground.com');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="intro" class="dark_bg">
<a href="https://github.com/jamesshore/object_playground"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 1;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
<div id="banner2" class="wrapper banner">
<div class="wrapper">
<div class="col-1-6"><a class="logo" href="http://www.letscodejavascript.com"></a></div>
<div class="col-2-3">
<h1>Get more pro JavaScript screencasts</h1>
<h4>Visit Let’s Code: Test-Driven JavaScript and start watching today!</h4>
</div>
<div class="col-1-6"><a class="button" href="http://www.letscodejavascript.com">more videos</a></div>
</div>
</div>
<div class="wrapper video">
<iframe width="720" height="405" src="//www.youtube.com/embed/PMfcsYzj-9M" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="wrapper superwide">
<ul class="tab_navigation">
<li class="col-1-1"><span class="active">Visualize and Explore</span></li>
</ul>
<div id="playgroundPreload">
<div class="content">
<div class="content_box">
<div class="notification">
<h2 class="highlight">Loading...</h2>
</div>
</div>
</div>
</div>
<div id="playgroundError" style="display: none;">
<div class="content">
<div class="content_box">
<div class="notification">
<h2 class="highlight">Unable to Load Object Visualizer</h2>
<p>Your browser doesn’t support the JavaScript functions required. The latest versions of Firefox, Chrome, Safari, and MS Edge are known to work, and Internet Explorer 11 does too. Try one of them instead.</p>
</div>
</div>
</div>
</div>
<div id="playgroundContent" style="display: none;">
<ul id="samples" class="tab_navigation col-1-6 objects">
<!-- This list is automatically populated by the JavaScript code -->
</ul>
<div class="content">
<div class="content_box">
<div class="main codearea">
<div class="col-3-4">
<textarea id="usercode"></textarea>
</div>
<div class="col-1-4">
<div class="aside">
<table>
<tr>
<td><input id="builtins" type="checkbox"></td>
<td><label for="builtins">Show standard objects</label></td>
</tr>
<tr>
<td><input id="functions" type="checkbox"></td>
<td><label for="functions">Show all functions</label></td>
</tr>
</table>
</div>
<input type="submit" id="evaluate" class="button" value="Click to Evaluate">
</div>
</div>
<div class="wrapper superwide graph">
<div id="graph"></div>
</div>
</div>
</div>
</div>
</div>
<div class="divider dot"></div>
<div class="wrapper superwide">
<div class="content">
<div class="content_box">
<div class="main">
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'letscodejavascript'; // required: replace example with your forum shortname
var disqus_url = 'http://www.letscodejavascript.com/v1/comments/ll12.html';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
</div>
</div>
</div>
<div class="divider dot"></div>
<div class="wrapper superwide">
<div class="content">
<div class="content_box">
<div class="main">
<h2 class="highlight">Transcript</h1>
<p><em>(<a href="https://github.com/sminutoli/javascript-the-definitive-guide-spanish/blob/master/transcript.md">Spanish translation here.</a>)</em></p>
<p>If you hang around the JavaScript world long enough, you’ll come across a bunch of different recipes for object-oriented programming. The standard way, so much as there <em>can</em> be a standard way, is this.</p>
<p>And <em>this</em> is the recipe for inheritance.</p>
<p>That’s the standard. But why this? Why this… mess? And why does it work?</p>
<p>Hi, everyone. My name is James Shore and this is <cite>Let’s Code: Test-Driven JavaScript</cite>. I’m here with my Lessons Learned on object-oriented programming in JavaScript. I’m recording this on June 1st, 2013.</p>
<p>In today’s episode, we’re going to build up these recipes from first principles. We’ll start with a review of object fundamentals, then look at how functions work in JavaScript. Next, we’ll cover prototypes and inheritance, then polymorphism and method overriding. We’ll discuss classes and instantiation in the prototypal model, then see how these concepts map to the classical model most people use. Finally, we’ll delve into the inner workings of the <code>instanceof</code> keyword, before closing with a look at future directions, a tool for exploring these concepts further, and my recommendations.</p>
<p>This is a big topic and we’re going to cover a lot of ground. Be sure to take advantage of the pause and rewind buttons in your video player. You can use the timestamps here to jump to sections of interest.</p>
<h3>1. Object Fundamentals</h3>
<p>Let’s start with the basics. These are the common JavaScript types—these are everything you can actually type into your source code. However, most of these are not actually primitive types. The only things that are really primitives are strings, numbers, and booleans; a couple of ways of saying “can’t find it,” and objects. Everything else—functions, arrays, and regular expressions, as well as all the other objects you use in your program—those are all variant kinds of objects.</p>
<p>So, what is an object? Well, it is a set of name/value pairs. In other languages, you might call it a dictionary, or a hash, or maybe an associative array, but fundamentally, it’s key/value pairs. You can use any number of keys with any name, as long as it’s a string, and each string can be associated with any value. Those values can be of any type: any of our basic primitive types, as well as any object type, including functions, and of course, objects themselves.</p>
<p>An important thing to note about objects is that, although primitives are passed by value, objects are passed by reference. Let’s see what that means.</p>
<p>So if we have two variables, named <code>number1</code> and <code>number2</code>, and we assign a value to <code>number1</code>—let’s say 3.14 etcetera—and then we copy that variable into <code>number2</code>, those two values are not connected. So if we change <code>number2</code>, <code>number1</code> is unaffected.</p>
<p>Objects, on the other hand, are stored by reference. What that means is that if you assign an object to one of these variables and then we copy that object into a new variable, we’re not copying the object. There’s still only one object. What we’re doing is copying the reference. The pointer. The arrow. So if we change <code>object2</code>, <code>object1</code> gets changed as well. <code>object2.a</code> is 42, but also, <code>object1.a</code> is 42.</p>
<p>One last thing before we’re done with the basics.</p>
<p>If you ask for a property that isn’t found in an object, you’ll get <code>undefined</code> as your result back. Now, you can assign <code>undefined</code> to any property you want. That doesn’t actually delete the property. If for some reason you want to get the property out of the object entirely, you have to use the <code>delete</code> keyword. Now honestly, in practice, the distinction is usually not that important.</p>
<h3>2. Functions & Methods</h3>
<p>I mentioned earlier that functions are just regular kinds of objects, and that’s true. When you define a function, JavaScript creates an object for you that has three properties already defined: the name, which is the name of the function; the length, which is the number of arguments; and a prototype, which I’ll explain later.</p>
<p>Because functions are just regular objects, you can do everything with them that you can do with a normal object. You can assign properties to them; you can assign them to different variables; and when you do, they’re passed by reference, so you can run that function from its new location by just saying the variable name and parentheses.</p>
<p>When you put a function inside of an object, it’s typically called a “method.” You can run methods just like you run any other function by saying <code>object.methodname</code> and then parentheses.</p>
<p>When you do that, JavaScript will set the <code>this</code> keyword to the object that you used. So if you say <code>myObject.get()</code>, <code>this</code> will be set to <code>myObject</code>. Then when the function returns, <code>this</code> will be set back to whatever value it had before.</p>
<p>The <code>this</code> keyword is JavaScript’s biggest gotcha. It depends on the <em>object</em>, not where the function was defined, and this can cause a lot of problems.</p>
<p>So, if we have <code>myMethod</code> which returns <code>this.val</code>, and we call <code>object1.get()</code>, we’ll get a 42 back. If we call <code>object2.get()</code>, <code>this</code> will be set to <code>object2</code> and we’ll get 3.14159 back. If we just call <code>myMethod()</code> directly, <code>this</code> won’t be set to anything in particular. It could be undefined if we’re using strict mode; it could be the global object; it’s really hard to tell for sure.</p>
<p>So you have to be really careful when you’re using <code>this</code>. If possible, I really recommend that use strict mode whenever you can because that will force <code>this</code> to be undefined. It won’t prevent mistakes relating to <code>this</code>, but it will help you catch them more quickly.</p>
<p>If you have a case where you need <code>this</code> to be a particular value, you can force it by using either <code>call()</code>, <code>apply()</code>, or <code>bind()</code>. Now the details of those functions are outside the scope of this episode, but let me show you an example of one of them.</p>
<p>If we say <code>myMethod.call()</code>, then that will run the <code>myMethod</code> function and force the <code>this</code> value to whatever we said. So <code>myMethod.call(object1)</code> will set <code>this</code> to <code>object1</code>.</p>
<h3>3. Prototypal Inheritance</h3>
<p>Okay, that’s the basics. Let’s get into some of the more complicated stuff.</p>
<p>It’s pretty rare that you’re going to be defining all of your object from scratch. You’ll typically have some sort of repeated pattern. For example, in this case, <code>object1</code>, <code>object2</code>, and <code>object3</code> are all using the same function. And rather than define them all separately like that, which would be a maintenance nightmare in the long run, what you can do is use something called “prototypes.”</p>
<p>The way this works is that you can define a single object, and then have other objects inherit from it, or “extend” it. The way you do that is by calling <code>Object.create()</code>.</p>
<p>So if I have a parent object with a function and a value, I can create a new object (which I’ve called <code>child</code>) by saying <code>Object.create(child)</code>. You can do anything with this child object that you do with any other object. You can add values to it or even extend it with another child.</p>
<p>Now the cool part is what happens when we start to use these objects.</p>
<p>The base object is just like before. Let’s say we say <code>parent.get()</code>. Well, <code>this</code> is going to be set to <code>parent</code>, and then JavaScript will look for <code>get</code> on that object. And when it finds it, it’ll call the function, which will say <code>return this.val</code>, which will cause JavaScript to look for <code>val</code> on <code>parent</code>. So that’s pretty normal.</p>
<p>But here’s the cool part. If we call <code>child.get()</code>, then <code>this</code> is set to <code>child</code>. JavaScript will look for <code>get</code> on <code>child</code>, but it won’t find it. So it will look at the prototype—it will go up the prototype chain—and look at <code>parent</code>, and it will find <code>get</code> there. When it finds that function, it will try to <code>return this.val</code>, which means it will go back to <code>child</code>, look for <code>val</code>, and find it. So <code>child.get()</code> will return 3.14 rather than 42, even though it’s using the function that was defined in <code>parent</code>.</p>
<p>JavaScript will go as far up the prototype chain as it needs to go in order to find a property. So if we said <code>grandchild.get()</code>, then JavaScript will look for <code>get</code> on the grandchild. It won’t find it, so it will go up to the prototype and look for <code>get</code> on <code>child</code>. It won’t find it there, so it will go to <code>parent</code>, look for <code>get</code> there, and find it. It will call the function, try to <code>return this.val</code>, so again it will go back to <code>grandchild</code>, look for <code>val</code>. It won’t find it, so it will go up to <code>child</code>, look for <code>val</code>, find it there, and return 3.14159.</p>
<p>This is the fundamentals of inheritance in JavaScript. Now, if you’ve seen other ways of talking about objects in JavaScript, they might have focused on classes or something else first. But this right here—this <em>prototype-based inheritance</em>—is fundamentally how JavaScript works. Actually, JavaScript doesn’t have any other form of inheritance other than this prototypal inheritance I’m showing you here.</p>
<p>There’s one more wrinkle I want to share, and that is that every single object has a prototype, except for the base object, and any objects you create yourself to explicitly not have prototypes. Here’s what they look like.</p>
<p>By default, objects that you create have <code>Object.prototype</code> as their prototype, and functions have <code>Function.prototype</code> as their prototype. Notice that this is where those <code>call()</code>, <code>apply()</code>, and <code>bind()</code> methods I was talking about earlier come from.</p>
<p>Now, this is way too much detail to show in most of these visualizations, so what I’m going to do is just use <code>[[Object]]</code> and <code>[[Function]]</code> to refer to those prototypes from here on out.</p>
<h3>4. Polymorphism & Method Overriding</h3>
<p>Once you have objects in a prototype chain, you might find that you want children to behave differently from their parent, even when the same method name is called. This is called “polymorphism.” Polymorphism means, “the same name, but different behaviors.” Now, technically, you can have polymorphism without inheritance, but we’re not going to get into that right now.</p>
<p>It’s easy to do polymorphism in JavaScript; you just use the same property name, but assign a different method. So if we wanted to have a <code>firmAnswer</code> object that answered something differently—or answered in a different way—we’d just say <code>firmAnswer.get</code> and assign the function. In this case, what we’re going to do is we’re going to return the same value and return “!!” at the end.</p>
<p>So if we say <code>answer.get()</code>, that will give us “42” back, but if we say <code>firmAnswer.get()</code>, that will say <em>“42!!”</em> back. Anyway, you get the idea.</p>
<p>This relationship is actually a little easier to see if we don’t have the function visualizations in there, so I’m going to stop showing them for now.</p>
<p>Now you’ll notice here that our <code>fn2</code> is looking at <code>this.val</code> and our <code>fn1</code> is looking at <code>this.val</code>. That’s a bit of duplicated logic. It’s not too bad here, but in more complicated programs, you find that that sort of logic is very difficult to maintain. So typically, what we’re going to want to do, is call <code>fn1</code> from <code>fn2</code>.</p>
<p>Unfortunately, that’s not quite as easy as it might seem. The obvious answer is to just call <code>fn1</code>… to just say <code>answer.get()</code>. That doesn’t work. It returns the wrong answer. It’s going to return 42. Do you know why? If you don’t, pause the video for a moment and see if you can figure it out.</p>
<p>Okay, here’s why.</p>
<p>When we call <code>firmAnswer.get()</code>, <code>this</code> is set to <code>firmAnswer</code> and JavaScript looks for the <code>get</code> property. It finds it and it runs <code>fn2</code>. That runs <code>answer.get()</code>, which is going to set <code>this</code> to <code>answer</code>, and then look for the <code>get</code> property on <code>answer</code>. When it finds it, it will run <code>fn1</code> and try to <code>return this.val</code>. But because <code>this</code> is set to <code>answer</code>, when it looks for <code>this.val</code>, it will find it on the <code>answer</code> object and return 42 rather than 3.14159, which is what we expect.</p>
<p>So, in order for this to work properly, we need to use the <code>call</code> function. We need to say <code>answer.get.call(this)</code>. See if you can figure out why this would work.</p>
<p>Okay, here’s how it works.</p>
<p>When we call <code>firmAnswer.get()</code>, <code>this</code> is set to <code>firmAnswer</code>… it looks for <code>get</code>… finds it… runs <code>fn2</code>… and now it says <code>answer.get.call(this)</code>. That sets <code>this</code> to, well, the same <code>this</code> again. But then it runs <code>answer.get()</code> directly, which tries to <code>return this.val</code>, which looks for <code>val</code> on <code>firmAnswer</code>, finds it, and returns the correct answer.</p>
<h3>5. Classes & Instantiation</h3>
<p>You can organize your JavaScript objects any way you like, but a really common way of organizing it is to separate your methods from your data.</p>
<p>For example, we have this <code>answer</code> object which, when you ask it to <code>get</code> the value, returns the value that it has stored.</p>
<p>Well, it’s pretty typical to want to have multiple copies of this object, so typically what people will do is they will put the function in a prototype—which we’ll call <code>AnswerPrototype</code>—and then they’ll have multiple objects extend that prototype to give us special values.</p>
<p>So we see here that <code>lifeAnswer</code> has the value of 42, because it’s the answer to Life, the Universe, and Everything, and <code>dessertAnswer</code> has the value of pi, for, well, obvious reasons.</p>
<p>If you want to specialize that answer, as we did with <code>firmAnswer</code> before, you can do the same thing. We have our <code>FirmAnswerPrototype</code> add its <code>fn2</code>—the one that puts “!!” on the end—that extends <code>AnswerPrototype</code>. And then we have our <code>luckyAnswer</code> and <code>magicAnswer</code> extend that.</p>
<p>When you use this approach to organize your objects, the prototypes are typically called “classes,” and the objects—the objects that extend them—are typically called “instances.” A class that extends another class is called a “subclass.”</p>
<p>Creating an instance is called “instantiation,” and you’ll notice that there’s a two-step process for that. First, you create the object by extending the prototype, and then second, you initialize its data. (Remember, instances are usually about the data and the prototypes are about the methods—the classes are about the methods.) So we extend and then we initialize.</p>
<p>The problem with this is that this initialization logic is duplicated every time we create a new object. In this simple example, it’s not such as big deal, but in real programs, the initialization logic is usually pretty complicated. So we don’t want to duplicate it everywhere. That would be a big maintenance problem.</p>
<p>It also violates encapsulation. One of the nice things about object-oriented programming is that it allows you to decide how your data is going to be stored in a way that nobody else has to worry about. You just provide access to that data through your methods and then, if you want to change the way data is stored, then you just do it. You update <em>your</em> methods—your object’s methods—but you don’t have to update all the rest of the program.</p>
<p>But here, because all our instances are accessing <code>val</code> directly, we can’t change the way <code>val</code> is stored without having to change all of our instances.</p>
<p>So what’s really common is to use some sort of initialization function. In this case, I’m going to call it <code>constructor()</code>. This is a common method that is used to initialize your objects.</p>
<p>Here’s how this works. Let’s say that we want to create a new instance for <code>magicAnswer</code>. We’ll extend <code>FirmAnswerPrototype</code> and then we’ll say <code>magicAnswer.constructor(3)</code>. That will set <code>this</code> to <code>magicAnswer</code> and it will look for the <code>constructor</code> property. It won’t find it on <code>magicAnswer</code>, so it will look at the prototype. It won’t find it there, so it will look at the prototype of <code>FirmAnswerPrototype</code>. It will find <code>constructor</code> there and then run <code>fn0(value)</code>. <code>fn0</code> is going to set <code>this._val</code> to <code>value</code>. So it goes to <code>this</code>, sets the value, and there we go.</p>
<p>Note that I’ve changed <code>_val</code> to have an underscore in front. This is a common convention in JavaScript to say that a property is private. In other words, you shouldn’t access or change this property. Now, nothing in JavaScript is going to enforce that it doesn’t get changed, but that’s the polite thing to do. And if you follow that rule, that means we can change <code>AnswerPrototype</code> without breaking any of the rest of our code: without changing the way <code>FirmAnswerPrototype</code> has to be programmed or any of our instances.</p>
<p>So that is a complete view of prototypal inheritance in JavaScript. It is a little bit different than what I showed you at the beginning, though, so we’re not quite done yet. But you could do all object-oriented programming in JavaScript using this model.</p>
<h3>6. The Classical Model</h3>
<p>Now, let’s look at the classical model. This is going to build on everything we’ve done up until now.</p>
<p>To start with, remember how, in the prototypal model, we instantiate an object by creating the object and then running a constructor of some sort? That’s so common that JavaScript has a special keyword just for that. It’s called <code>new</code>.</p>
<p>However, <code>new</code> is a little bit, well, weird. It doesn’t work the way we’ve seen up until now, and that’s what makes the classical model I’m about to show you different from the prototypal model I’ve been showing you up until now.</p>
<p>Now, before we get into that, I have to show something a little bit strange about functions. Remember that <code>prototype</code> property I said I’d explain later? Well, I’m going to explain it now. And it is… it’s weird.</p>
<p>When you define a function, JavaScript creates an object with <code>name</code>, <code>length</code>, and <code>prototype</code> properties. That <code>prototype</code> property actually points to a whole ’nother new object with a <code>constructor</code> property that points <em>back</em> to the function you’ve just created. So whenever you create a function in JavaScript, you’re actually creating two objects: the function object, and then this <code>prototype</code> object that’s just hanging out there.</p>
<p>I told you it was weird.</p>
<p>Now look at this closely. Does this look familiar?</p>
<p>Yeah. It’s a prototype. It is, basically, a class. So every time you define a function in JavaScript, you’re actually defining a constructor that’s associated with a little do-nothing class.</p>
<p>Now, of course, not every function you define is meant to be a constructor. So the common convention in JavaScript is that, if it’s meant to be a constructor, it starts with a capital letter, and if it’s meant to be just a normal function, then you start it with a lower-case letter.</p>
<p>Okay, so that’s a little weirdness of functions. Let’s see how this plays out to create the classical model.</p>
<p>First, let’s go back to our prototypal model. We’ll walk through it step by step.</p>
<p>So what we’re going to do is we’re going to create a class called <code>AnswerPrototype</code>. We’re going to create a constructor in it. And when we create that constructor, JavaScript is going to define a function object and a prototype object (which we don’t care about; we’re just going to ignore it). We’re also going to create a <code>get</code> function on our <code>AnswerPrototype</code> and we’re going to create a couple of instances: <code>lifeAnswer</code> and <code>dessertAnswer</code>.</p>
<p>So that’s a basic example using the prototypal model. Now let’s do the exact same thing, but this time using the classical model and the <code>new</code> keyword.</p>
<p>In the classical model, we define the constructor first. So we’ll create this <code>Answer</code> function. JavaScript will automatically create an object to go along with it with a <code>constructor</code> property that points back to our <code>Answer</code> function. That prototype is our class. It’s going to fulfill the exact same purpose that <code>AnswerPrototype</code> fills in the top example. So we’ll set our <code>get</code> method on <code>AnswerPrototype</code>. Then we can instantiate it by calling <code>new Answer()</code>. We’ll say <code>new Answer(42)</code> and that gives us the right value. That’s going to create a child of <code>Answer.prototype</code> <em>and</em> initialize it by calling the <code>Answer</code> constructor with the value of 42.</p>
<p>The way it knows to create <code>lifeAnswer</code> with <code>Answer.prototype</code> as its prototype is because JavaScript looks at the <code>prototype</code> property of the constructor when you use the <code>new</code> keyword.</p>
<p>The same thing happens with <code>dessertAnswer</code>.</p>
<p>That’s the classical model.</p>
<p>Now, it gets a little more complicated when we start dealing with subclasses. So let’s take a look at how this would work with a subclass. Let’s add the <code>FirmAnswer</code> class that we looked at in our previous prototypal example.</p>
<p>Again, we’ll start out by creating a <code>FirmAnswer</code> constructor first. JavaScript will automatically create the <code>FirmAnswer.prototype</code>, but this one we can’t use because we need our <code>FirmAnswer.prototype</code> to extend <code>Answer.prototype</code>—and it doesn’t. So what we’ll do is, we’ll set <code>FirmAnswer.prototype</code> to a new object that we’ll create by extending <code>Answer.prototype</code>. That will cause the old <code>FirmAnswer.prototype</code> to have nothing pointing to it, so it will get collected by the garbage collector.</p>
<p>Next, we’ll set the <code>constructor</code> property to point back to <code>FirmAnswer</code>. Now, as far as I can tell, this <code>constructor</code> property is not necessary. Everything that’s built into JavaScript will work just fine without it. But we’re going to set it here to be consistent. You could probably get away with not using it, but I have to admit, I haven’t been brave enough to try that, so remove it at your own risk.</p>
<p>All right, so we have <code>FirmAnswer.prototype</code> with a constructor. Now we need to set our <code>get</code> method on it. Then we can instantiate it as normal. we’ll say <code>new FirmAnswer(7)</code>. That will create our <code>luckyAnswer</code> extending <code>FirmAnswer.prototype</code> and we can do the same thing with <code>magicAnswer</code>.</p>
<p>Here’s a side-by-side comparison of the two models. I’ve numbered each of the sections so they correspond. So number one in the prototypal model is doing the exact same thing as in the classical model. Go ahead and pause the video here if you’d like to study this further.</p>
<h3>7. instanceof</h3>
<p>There’s one more detail I’d like to share with you.</p>
<p>It’s often convenient to know which class was used to instantiate an object. To achieve that purpose, JavaScript has a keyword: <code>instanceof</code>. The way this works is it looks at the prototype of the constructor and compares it to the object. This is actually a little hard to understand unless you see it, so let me just show it to you.</p>
<p>We can ask if <code>lifeAnswer</code> is an instance of <code>Answer</code>. And intuitively, we know that’s true. But how does JavaScript know? Well, here’s what happens:</p>
<p>First, it looks at <code>Answer.prototype</code>. Not <code>Answer</code>’s <code>prototype</code>, but <code>Answer</code>’s <code>prototype</code> property. Then it looks at <code>lifeAnswer</code>’s actual prototype. And if those two things are the same object then, yes, it’s an instance.</p>
<p>So <code>lifeAnswer</code> wouldn’t be an instance of <code>FirmAnswer</code>. <code>FirmAnswer.prototype</code> is over here. <code>lifeAnswer</code>’s actual prototype is up here. They don’t match, so it’s not an <code>instanceof</code>.</p>
<p>However, there is one caveat to this—one exception to the rule. <code>luckyAnswer</code> <em>is</em> an instance of <code>Answer</code> because JavaScript will go up the prototype chain. So JavaScript will look at <code>Answer.prototype</code>. Then it will look at <code>luckyAnswer</code>’s prototype. That’s not a match, but it will go up the prototype chain and look at <code>Answer.prototype</code> as well. That is a match, so <code>luckyAnswer</code> <em>is</em> an instance of <code>Answer</code>.</p>
<h3>8. Future Directions</h3>
<p>That’s everything you need to know in order to understand how inheritance works in JavaScript. I do want to share a few more things with you, though.</p>
<p>First, in the upcoming version of JavaScript, as defined in the EcmaScript 6 specification, there’s going to be a new syntax which makes it easier to do the classical model of inheritance in JavaScript. It’s the <code>class</code> syntax, and I’ve got it shown here on the left.</p>
<p>Now, as far as I can tell in my research, that yields the exact same underlying object model that classical inheritance does, as I’ve shown here on the right. But it’s going to be much easier to work with.</p>
<p>If you want to see how that compares to the classical model, I have a side-by-side comparison here. Go ahead and pause the video if you want to study this in depth.</p>
<h3>9. The Definitive Guide</h3>
<p>I’ve called this episode “The Definitive Guide to Object-Oriented JavaScript,” which was perhaps a little presumptuous of me. It isn’t possible for single tutorial, no matter how long—and I didn’t really want it to be that long—anyway, it’s not possible for a single tutorial to cover absolutely everything there is to know about JavaScript. There’s some stuff I’ve intentionally left out, such as getters and setters, static variables, much more… the details of <code>bind</code> and <code>apply</code>, for example…</p>
<p>What makes this the definitive guide is <a href="http://www.objectplayground.com">the website</a> I’ve created to accompany this video. This site is an object visualizer. So what you can do is type in JavaScript and it will analyze what you type and display the object map on the screen. So if we wanted to see what a function did, we could just add it here. We could “Show all functions” and see how that function is turned into objects.</p>
<p>This is a very cool tool. It’s a lot of fun; it’s got a lot of default examples for you to play with. Check it out. This is the best way to really understand how inheritance works in JavaScript and how objects work in JavaScript. Test your understanding by typing in some code here, clicking the evaluate button, and see what comes out. Play with your own ways of making inheritance structures; try your own abstractions; try other people’s abstractions. (I’ve got John Resig’s in here, for example, but you can do much, much more.)</p>
<p>Anyway, this is the <em>real</em> definitive resource because it actually runs in your real browser. So it will tell you whatever your browser—it will tell you the JavaScript model used by your actual browser. Check it out.</p>
<h3>10. Recommendations</h3>
<p>To close, here are my recommendations for object-oriented JavaScript in your programs.</p>
<p>First, use the classical model. I know it’s not very popular, and it’s kind of weird, but it is the standard. Everybody understands it. If you use the classical model, anybody who has the slightest familiarity with object-oriented JavaScript will understand this approach. That can’t be said about any other approach you use.</p>
<p>It also is the one that’s most likely to have good IDE support if you want to do some sort of automatic syntax checking or refactoring in your IDE, and it’s also the only approach that supports <code>instanceof</code>. You can hack in support for <code>instanceof</code> into the prototypal model, but it’s not very convenient and actually ends up being uglier than the classical model.</p>
<p>Second, <code>"use strict";</code>. Use the strict mode. It will help prevent situations where <code>this</code> isn’t defined properly.</p>
<p>Third, use JSHint or some other linter. It will help you catch cases where you forgot to use <code>new</code> or you used it in the wrong spot, as long as you use the convention where a class name starts with a capital letter.</p>
<p>Fourth, when the EcmaScript 6 <code>class</code> syntax becomes available, go ahead and use it. It might be a while: at the time I record this, it’s not available in any of the popular browsers, and that means it’s going to be a long time before it’s available in IE. But when it is available, go ahead and use it. It’s a nice, elegant syntax. It maps down to the regular classical model, which means it’ll play nice with all your existing stuff.</p>
<p>And finally, experiment with <a href="http://www.objectplayground.com">Object Playground</a>. I created that site specifically to be a way to learn more about object-oriented JavaScript. You’d be surprised what you can find out about it. For example, go ahead and see whether or not you need that <code>constructor</code> property. What happens when you take it out? Can you find any case where it’s needed, or any case where it’s <em>not</em> needed?</p>
<p>So that’s what I’ve learned about object-oriented programming in JavaScript. Thanks for watching, everybody, and I’ll catch you next time!</p>
</div>
</div>
</div>
</div>
<div class="divider dot"></div>
<div id="footer">
<div class="divider line">
<p>A project from <a href="http://www.letscodejavascript.com">Let’s Code: Test-Driven JavaScript</a>
</div>
<p><a href="http://www.letscodejavascript.com">Let's Code JavaScript</a> is a screencast series focused on rigorous, professional web development. Created by James Shore.</p>
<p>Site designed by <a href="http://linkedin.com/in/phillshaffer">Phill Shaffer</a>. Based on original design by <a href="http://primate.co.uk/">Primate</a>.</p>
<div class="divider dot"></div>
</div>
<!-- Object Playground -->
<!-- This script does the heavy-lifting of rendering SVG. -->
<script type="text/javascript" src="viz/viz.js"></script>
<!--
This code controls the UI and generates the object graph.
I've left it unminified so you can easily explore it. (It's small enough.)
For tests and more, see https://github.com/jamesshore/object_playground .
-->
<script type="text/javascript" src="object_node.js?2018-03-02"></script>
<script type="text/javascript" src="object_graph.js?2018-03-02"></script>
<script type="text/javascript" src="viz_visualizer.js?2018-03-02"></script>
<script type="text/javascript" src="user_code.js?2018-03-02"></script>
<script type="text/javascript" src="ui.js?2018-03-02"></script>
<script>
window.onload = function() {
jdls.ui.initialize({
preloadDiv: document.getElementById("playgroundPreload"),
errorDiv: document.getElementById("playgroundError"),
contentDiv: document.getElementById("playgroundContent"),
samplesList: document.getElementById("samples"),
userCodeTextArea: document.getElementById("usercode"),
evaluateButton: document.getElementById("evaluate"),
showBuiltinsCheckbox: document.getElementById("builtins"),
showAllFunctionsCheckbox: document.getElementById("functions"),
graphDiv: document.getElementById("graph")
});
};
</script>
</body>
</html>
================================================
FILE: src/object_graph.js
================================================
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.
window.jdls = window.jdls || {};
// Instances catalog all objects reachable from a root object.
(function() {
"use strict";
var ObjectGraph = jdls.ObjectGraph = function ObjectGraph(name, root, options) {
options = options || {};
this._nodes = [];
this._edges = [];
this._showBuiltins = !!options.builtins;
this._showAllFunctions = !!options.allFunctions;
// This algorithm is O(n^2) because hasNode is O(n). :-(
// It will be much faster when we can replace this._nodes with Set, which should be O(1).
// (Set is a new data type coming in a future version of JavaScript.)
traverse(this, new jdls.ObjectNode(name, root));
removePartialEdges(this);
};
ObjectGraph.prototype.nodes = function nodes() {
return this._nodes;
};
ObjectGraph.prototype.edges = function edges() {
return this._edges;
};
function traverse(self, node) {
if (hasNode(self, node)) return;
addNode(self, node);
node.forEachSubNode(function(subnode, id, name) {
if (isBuiltin(subnode) && !self._showBuiltins) return;
subnode = dedupe(self, subnode);
addEdge(self, node, subnode, id);
if (isOrdinaryFunction(subnode, name) && !self._showAllFunctions) return;
traverse(self, subnode);
});
}
function removePartialEdges(self) {
// When traversing, we add edges for some subnodes that are not traversed. This is necessary
// because the decision of which subnode to traverse is context-dependent, so sometimes we'll
// decide to filter out a subnode that's later included. We add an edge regardless so it will be present
// if the node is later included. If the node never was included, we filter it out here.
var result = [];
self._edges.forEach(function(element) {
// We're going to figure out if the 'to' node is present, and if it is, we'll use the one that's in
// _nodes rather than the one stored in the edge. That's because the edge may refer to a node that
// was filtered out, if the edge found before the node was known to be interesting.
// Note: It's impossible for the 'from' node to be missing due to the way the traversal algorithm works.
// This code a more complicated way of saying (paraphrased) "if (hasNode()) dedupe();". It's a bit faster.
var node = findNode(self, element.to);
if (node !== undefined) {
element.to = node;
result.push(element);
}
});
self._edges = result;
}
function hasNode(self, node) {
return findNode(self, node) !== undefined;
}
function dedupe(self, node) {
return findNode(self, node) || node;
}
function findNode(self, node) {
var matchingNodes = self._nodes.filter(function(element) {
return element.equals(node);
});
if (matchingNodes.length > 1) throw new Error("Node [" + node.name() + "] was stored multiple times; that should be impossible");
return matchingNodes[0];
}
function addNode(self, node) {
self._nodes.push(node);
}
function addEdge(self, from, to, fromField) {
self._edges.push({
from: from,
to: to,
fromField: fromField
});
}
function isBuiltin(node) {
var value = node.value();
return value === Object.prototype ||
value === Function.prototype ||
value === Array.prototype ||
value === String.prototype ||
value === Boolean.prototype ||
value === Number.prototype ||
value === Date.prototype ||
value === RegExp.prototype ||
value === Error.prototype;
}
function isOrdinaryFunction(node, propertyName) {
var func = node.value();
if (typeof func !== "function") return false;
var prototype = func.prototype;
if (prototype && typeof prototype !== "object") return false;
var constructor = propertyName === "constructor";
var standardFunction = !hasUnusualProperties(func, ["length", "name", "caller", "arguments", "prototype"]);
var standardPrototype = !hasUnusualProperties(prototype, ["constructor"]);
var selfReferencingPrototype = !prototype || prototype.constructor === func;
return !constructor && standardFunction && standardPrototype && selfReferencingPrototype;
function hasUnusualProperties(obj, normalProperties) {
if (obj === undefined || obj === null) return false;
var unusualProperties = Object.getOwnPropertyNames(obj).filter(function(property) {
return normalProperties.indexOf(property) === -1;
});
return (unusualProperties.length !== 0);
}
}
}());
================================================
FILE: src/object_node.js
================================================
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
window.jdls = window.jdls || {};
// Each instance is a single object in the object graph.
(function() {
"use strict";
var uniqueId = 0;
var ObjectNode = jdls.ObjectNode = function ObjectNode(name, value) {
if (typeof value !== "object" && typeof value !== "function") throw new Error("Invalid ObjectNode value: expected function or object, but was " + typeof value);
if (value === null) throw new Error("Invalid ObjectNode value: expected function or object, but was null");
this._id = uniqueId++;
this._name = objectName(name, value);
this._value = value;
};
ObjectNode.prototype.id = function id() {
return "node" + this._id;
};
ObjectNode.prototype.name = function name() {
return this._name;
};
ObjectNode.prototype.type = function type() {
return objectType(this._value);
};
ObjectNode.prototype.value = function value() {
return this._value;
};
ObjectNode.prototype.properties = function properties() {
var self = this;
return getProperties(self._value).map(function(name, index) {
return {
name: name,
value: describeField(self._value[name]),
id: "f" + index
};
});
};
ObjectNode.prototype.prototype = function prototype() {
var value;
var proto = Object.getPrototypeOf(this._value);
if (proto === null) value = "null";
else value = objectName(this._name + ".<prototype>", Object.getPrototypeOf(this._value));
return {
name: "<prototype>",
value: value,
id: "proto"
};
};
ObjectNode.prototype.forEachSubNode = function forEachSubNode(fn) {
var self = this;
forEach(this._value, function(name, value, id) {
if (typeof value !== "function" && typeof value !== "object") return;
if (value === null) return;
fn(new ObjectNode(self._name + "." + name, value), id, name);
});
};
ObjectNode.prototype.equals = function equals(node) {
return this._value === node._value;
};
function objectName(fallbackName, object) {
if (object === Function.prototype) return "Function.prototype";
if (typeof object === "function") return functionName(object) + "()";
if (hasOwnProperty(object, "constructor") && (object.constructor.prototype === object)) return functionName(object.constructor) + ".prototype";
return fallbackName;
}
function objectType(object) {
var prototype = Object.getPrototypeOf(object);
if (prototype === null) return "<null>";
return objectName("<anon>", prototype);
}
function functionName(func) {
var name = func.name;
if (name === undefined) name = ieFunctionNameWorkaround(func);
if (name === "") name = "<anon>";
return name;
}
function describeField(value) {
if (value === null) return "null";
if (value === Function.prototype) return "Function.prototype";
switch (typeof value) {
case "string": return '"' + value + '"';
case "function":
case "object":
return objectName("{" + objectType(value) + "}", value);
default: return "" + value;
}
}
function ieFunctionNameWorkaround(constructor) {
// This workaround is based on code by Jason Bunting et al, http://stackoverflow.com/a/332429
var funcNameRegex = /function\s+(.{1,})\s*\(/;
var results = (funcNameRegex).exec((constructor).toString());
return (results && results.length > 1) ? results[1] : "";
}
function forEach(object, fn) {
getProperties(object).forEach(function(name, index) {
fn(name, object[name], "f" + index);
});
fn("<prototype>", Object.getPrototypeOf(object), "proto");
}
function getProperties(object) {
var names = Object.getOwnPropertyNames(object);
if (typeof object === "function") names = filterOutRestrictedFunctionProperties();
return names;
function filterOutRestrictedFunctionProperties() {
return names.filter(function(name) {
return name !== "caller" && name !== "callee" && name !== "arguments";
});
}
}
// can't use object.hasOwnProperty() because it doesn't work when object doesn't inherit from Object
function hasOwnProperty(object, propertyName) {
return Object.prototype.hasOwnProperty.call(object, propertyName);
}
}());
================================================
FILE: src/site.css
================================================
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite,
del, dfn, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
}
html {
line-height: 1;
}
ol, ul {
list-style: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}
q, blockquote {
quotes: none;
}
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none;
}
a img {
border: none;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
[class*='col-'], [class*='col-'] li {
padding-right: 20px;
float: left;
}
[class*='col-']:last-of-type, [class*='col-'] li:last-of-type {
padding-right: 0;
}
.col-1-1 {
width: 100%;
}
.col-1-2 {
width: 50%;
}
.col-2-3 {
width: 66.66%;
}
.col-1-3 {
width: 33.33%;
}
.col-1-4 {
width: 25%;
}
.col-3-4 {
width: 75%;
}
.col-1-5 li {
width: 20%;
}
.col-1-6 li {
width: 16.66%;
}
body {
background: #ededed url("images/tile_light.gif");
font-family: helvetica, arial, sans-serif;
}
a {
text-decoration: none;
}
h1 {
font-size: 30px;
margin-bottom: 10px;
text-align: inherit;
}
h2 {
font-size: 30px;
margin-bottom: 10px;
text-shadow: 0px 1px 0px white;
}
h2.highlight {
text-align: center;
color: #9eb75b;
font-weight: 100;
margin-bottom: 20px;
}
h3 {
font-size: 16px;
margin-top: 20px;
}
h4 {
color: #4c4c4e;
font-size: 16px;
margin-bottom: 20px;
}
h5 {
color: #9eb75b;
text-transform: uppercase;
margin-bottom: 20px;
margin-left: 18px;
}
p {
color: #868686;
line-height: 20px;
font-weight: 300;
}
input[type='text'] {
font-family: inherit;
}
input[type='submit'] {
font-family: inherit;
-webkit-appearance: none;
}
.wrapper {
width: 830px;
margin: auto;
position: relative;
}
.wrapper.narrow {
width: 730px;
margin: auto;
}
.wrapper.video {
position: relative;
width: 720px;
height: 405px;
margin: 30px auto 60px;
}
.wrapper.wide {
width: 990px;
margin: auto;
}
.wrapper.superwide {
width: 100%;
padding: 0px 40px;
}
.wrapper.superwide .tab_navigation {
width: 100%;
padding-right: 0px;
padding-left: 0px;
}
.wrapper.banner {
width: 100%;
padding: 10px 0px;
}
a.logo {
position: relative;
display: block;
}
#banner1.wrapper.banner {
height: 135px;
}
#banner1 a.logo {
margin: auto;
height: 110px;
width: 50px;
background: url("images/logo.png");
}
#banner1.wrapper.banner p.presents {
margin-top: 0px;
font-size: 12px;
text-align: center;
}
#banner2.wrapper.banner {
background: #41a9cc;
height: 75px;
}
#banner2 a.logo {
margin-left: 5px;
height: 50px;
width: 96px;
background: url("images/logohoriz2.png") no-repeat;
}
#banner2 h1 {
color: #fff;
font-size: 18px;
font-weight: 600;
margin: 9px 0px 2px 20px;
text-align: left;
}
#banner2 h4 {
margin-left: 20px;
line-height: 20px;
color: #e6e6e6;
}
#banner2 a.button {
width: 150px;
float: right;
}
.dark_bg {
-webkit-box-shadow: inset 0 0 5px 0 rgba(0, 0, 0, 0.5);
-moz-box-shadow: inset 0 0 5px 0 rgba(0, 0, 0, 0.5);
box-shadow: inset 0 0 5px 0 rgba(0, 0, 0, 0.5);
background: #4c4c4e url("images/tile_dark.gif");
width: 100%;
padding: 0px 0px 10px 0px;
}
.button, .tab_navigation li a, .tab_navigation li span, .content_box, .signup_form input[type='submit'] {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2);
}
.button, .tab_navigation li a, .tab_navigation li span {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
font-weight: 600;
}
.button {
text-align: center;
font-size: 20px;
padding: 16px;
background: #9eb75b;
color: white;
width: 100%;
cursor: pointer;
border: 0;
}
.button:hover {
background: #839b44;
}
.divider {
border-bottom: 1px solid #d9d9d9;
-webkit-box-shadow: 0 1px 0 0 white;
-moz-box-shadow: 0 1px 0 0 white;
box-shadow: 0 1px 0 0 white;
text-align: center;
background: url("images/content_divider.gif") no-repeat 49.5% 0;
padding: 40px 0 0;
height: 0;
margin: 0 0 50px;
}
.divider h2 {
color: #868686;
background: #ededed url("images/tile_light.gif");
padding: 0 10px;
display: inline-block;
font-weight: 100;
position: relative;
top: -15px;
}
.divider p {
display: inline-block;
padding: 0 10px;
background: #ededed url("images/tile_light.gif");
position: relative;
top: -8px;
}
.divider.dot {
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
margin: 30px 0 0px;
}
.divider.line {
background: none;
margin: 0 0 30px;
}
.divider.line h2 {
top: -22px;
}
#footer {
height: auto;
text-align: center;
}
#footer p {
font-size: 13px;
}
#footer a {
color: inherit;
}
#footer a:hover {
color: black;
text-decoration: underline;
}
.content_box {
clear: both;
overflow: hidden;
*zoom: 1;
background: white;
padding: 40px 0 0px;
}
.content_box h2 {
line-height: 33px;
font-siz
}
.content_box h2 {
line-height: 33px;
}
.content_box h3 {
font-size: 20px;
line-height: 22px;
margin-bottom: 22px;
color: #4c4c4e;
}
.content_box p {
margin-bottom: 22px;
line-height: 22px;
}
.content_box p a {
color: #839b44;
font-weight: 400;
}
.content_box p a:hover {
text-decoration: underline;
}
.content_box .main.codearea {
min-height: 200px;
min-width: 100%;
display: inline-block;
}
.content_box .main.codearea .aside {
margin-bottom: 20px;
padding: 10px;
height: 172px;
border: solid 1px #bbbbbb;
}
.main.codearea .aside table tr td {
vertical-align: text-top;
padding: 5px;
}
.content_box .main {
padding: 0px 45px;
}
.content_box .notification {
padding: 0px 45px 15px 45px;
}
.content_box #disqus_thread {
padding: 0px 0px 25px 0px;
}
.content_box h2 {
line-height: 33px;
}
.content_box h3 {
font-size: 20px;
line-height: 22px;
margin-bottom: 22px;
color: #4c4c4e;
}
.content_box p {
margin-bottom: 22px;
line-height: 22px;
color: #4c4c4e
}
.content_box p a {
color: #839b44;
font-weight: 400;
}
.content_box p a:hover {
text-decoration: underline;
}
.content_box textarea {
width: 100%;
min-height: 250px;
resize: vertical;
overflow: auto;
}
.content_box #graph {
overflow: auto;
padding: 20px 0px 40px 0px;
}
.content_box #graph svg {
display: block;
margin-right: auto;
margin-left: auto;
}
.content_box #graph pre {
padding-left: 40px;
}
.content_box .wrapper.superwide.graph {
border-top: 1px solid #cccccc;
padding: 20px 0px 0px 0px;
margin-top: 40px;
}
.tab_navigation {
width: 730px;
margin-right: auto;
margin-left: auto;
}
.tab_navigation.objects {
margin-top: 25px;
}
.tab_navigation li {
padding: 0 20px 0 0;
}
.tab_navigation li a, .tab_navigation li span {
position: relative;
color: #00668f;
background: white;
text-shadow: none;
text-align: left;
font-weight: 400;
display: block;
text-align: center;
padding: 15px 0;
margin: 0 auto;
text-transform: uppercase;
}
.tab_navigation li a {
font-size: 14px;
line-height: 18px;
padding: 14px 5px;
top: -20px;
cursor: pointer;
}
.tab_navigation li span {
font-size: 18px;
height: 48px;
line-height: 22px;
top: -25px;
margin-top: 0px;
}
.tab_navigation li a:hover {
background: #00668f;
color: #8ec1d6;
text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
}
.tab_navigation li a.active, .tab_navigation li a.active:hover, .tab_navigation li span.active, .tab_navigation li span.active:hover {
background: #41a9cc;
color: #00668f;
text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5);
}
.tab_navigation li a.active:after, .tab_navigation li a.active:hover:after, .tab_navigation li span.active:after, .tab_navigation li span.active:hover:after {
content: "";
display: block;
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #41a9cc;
margin: 0 auto;
}
================================================
FILE: src/ui.js
================================================
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.
window.jdls = window.jdls || {};
// The main user interface.
(function() {
"use strict";
var exports = window.jdls.ui = {};
var preload;
var error;
var content;
var samples;
var userCode;
var evaluate;
var builtins;
var functions;
var graph;
exports.initialize = function initialize(elements) {
preload = elements.preloadDiv;
error = elements.errorDiv;
content = elements.contentDiv;
samples = elements.samplesList;
userCode = elements.userCodeTextArea;
evaluate = elements.evaluateButton;
builtins = elements.showBuiltinsCheckbox;
functions = elements.showAllFunctionsCheckbox;
graph = elements.graphDiv;
try {
replaceUserCode(jdls.usercode.DEFAULT_SAMPLE);
populateSampleButtons();
handleEvaluateButton();
if (!Int32Array) showError();
else showInterface();
}
catch (ex) {
showError();
}
};
function populateSampleButtons() {
Object.getOwnPropertyNames(jdls.usercode.samples).forEach(function(name) {
var sample = jdls.usercode.samples[name];
failFastIfSampleNameMustBeEscaped(sample.name);
var li = document.createElement("li");
li.innerHTML = "<a>" + sample.name + "</a>";
var button = li.firstChild;
button.addEventListener("click", function() {
replaceUserCode(sample);
});
samples.appendChild(li);
});
}
function handleEvaluateButton() {
evaluate.addEventListener("click", function() {
renderUserCode();
});
}
function showInterface() {
preload.style.display = "none";
error.style.display = "none";
content.style.display = "block";
}
function showError() {
preload.style.display = "none";
error.style.display = "block";
content.style.display = "none";
}
function replaceUserCode(sample) {
userCode.value = sample.code;
renderUserCode();
}
function renderUserCode() {
try {
var objectToRender = jdls.usercode.evaluate(userCode.value);
var options = {
builtins: builtins.checked,
allFunctions: functions.checked
};
graph.innerHTML = jdls.viz.render("this", objectToRender, options);
}
catch(err) {
graph.innerHTML = inspect(err.toString());
}
}
function inspect(string) {
return "<pre>" + string.replace(/</g, "<").replace(/>/g, ">").replace(/\"/g, """) + "</pre>";
}
function failFastIfSampleNameMustBeEscaped(name) {
if (contains(["<", ">", '"', "&"])) throw new Error("Sample name [" + name + "] includes text that must be HTML-escaped; that's not implemented yet.");
function contains(forbiddenChars) {
return forbiddenChars.some(function(char) {
return name.indexOf(char) !== -1;
});
}
}
}());
================================================
FILE: src/user_code.js
================================================
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.
window.jdls = window.jdls || {};
// Functions related to user-entered code.
(function() {
"use strict";
var exports = window.jdls.usercode = {};
var samples = exports.samples = {};
exports.evaluate = function evaluate(code) {
/*jshint evil:true, newcap: false */
var context = {};
Function(code).call(context);
return context;
};
samples.instructions = { name: "Instructions", code: '// Enter JavaScript code in this box and then click the "Evaluate" button.\n' +
'// Any variable you assign to "this" will be graphed below.\n' +
'// Try the presets above for more examples!\n' +
'\n' +
'// Example:\n' +
'this.a = undefined;\n' +
'this.b = null;\n' +
'this.c = true;\n' +
'this.d = "foo";\n' +
'this.e = 3.14159;\n' +
'this.f = function bar() {};\n' +
'this.g = { h: "baz" };\n'
};
samples.es5class = { name: "ES5 Class", code: '// Constructor\n' +
'function MyClass() {\n' +
' this.a = 42;\n' +
'}\n' +
'\n' +
'// Method\n' +
'MyClass.prototype.method = function method() {};\n' +
'\n' +
'// Instantiate\n' +
'this.instance = new MyClass();\n'
};
samples.es6class = { name: "ES6 Class", code: '// This example only works on browsers that support ES6 classes\n' +
'\n' +
'// Class\n' +
'class MyClass {\n' +
'\n' +
' // Constructor\n' +
' constructor() {\n' +
' this.a = 42;\n' +
' }\n' +
'\n' +
' // Method\n' +
' method() {}\n' +
'\n' +
'}\n' +
'\n' +
'// Instantiate\n' +
'this.instance = new MyClass();\n'
};
samples.es5inheritance = { name: "ES5 Inheritance", code: '// Parent class constructor\n' +
'function Parent() {\n' +
' this.a = 42;\n' +
'}\n' +
'\n' +
'// Parent class method\n' +
'Parent.prototype.method = function method() {};\n' +
'\n' +
'// Child class constructor\n' +
'function Child() {\n' +
' Parent.call(this);\n' +
' this.b = 3.14159\n' +
'}\n' +
'\n' +
'// Inherit from the parent class\n' +
'Child.prototype = Object.create(Parent.prototype);\n' +
'Child.prototype.constructor = Child;\n' +
'\n' +
'// Child class method\n' +
'Child.prototype.method = function method() {\n' +
' Parent.prototype.method.call(this);\n' +
'};\n' +
'\n' +
'// Instantiate\n' +
'this.instance = new Child();\n'
};
samples.es6inheritance = { name: "ES6 Inheritance", code: '// This example only works on browsers that support ES6 classes\n' +
'\n' +
'// Parent class\n' +
'class Parent {\n' +
'\n' +
' // Parent class constructor\n' +
' constructor() {\n' +
' this.a = 42;\n' +
' }\n' +
'\n' +
' // Parent class method\n' +
' method() {}\n' +
'\n' +
'}\n' +
'\n' +
'// Child class inherits from Parent\n' +
'class Child extends Parent {\n' +
'\n' +
' // Child class constructor\n' +
' constructor() {\n' +
' super();\n' +
' this.b = 3.14159;\n' +
' }\n' +
'\n' +
' // Child class method\n' +
' method() {\n' +
' super.method();\n' +
' }\n' +
'\n' +
'}\n' +
'\n' +
'// Instantiate\n' +
'this.instance = new Child();\n'
};
samples.inception = { name: "Inception!", code: 'this.jdls = jdls;\n' +
'\n' +
'// Can you figure out what the following line does?\n' +
'// Caution: It\'s commented out because some people have\n' +
'// reported their browser crashes when this line runs. D\'oh!\n' +
'\n' +
'// this.inception = new jdls.ObjectGraph("root", jdls);\n'
};
exports.DEFAULT_SAMPLE = samples.instructions;
}());
================================================
FILE: src/viz/.gitattributes
================================================
viz.js -diff
================================================
FILE: src/viz/.gitignore
================================================
graphviz-src.tar.gz
graphviz-src
libexpat-src
libexpat-src.tar.gz
================================================
FILE: src/viz/COPYING
================================================
* The original parts of this project (including files used in compiling the viz.js file) are made available under the following terms:
Copyright (c) 2012 Michael Daines
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* Graphviz is distributed under the Eclipse Public License:
AT&T has previously made versions of this software available under the AT&T Source Code Agreement, version 1.2D and earlier. If you received a copy of the software under that license agreement, you may continue to use and distribute the same version of the software subject to the terms and conditions of the license agreement under which the software was received. However, current versions of the software are now licensed on an open source basis only under The Eclipse Public License (EPL).
For more information on the Eclipse Public License, see the FAQ. If you have any concerns about the what the license means, especially if money is involved, you should contact an intellectual property lawyer.
Eclipse Public License - v 1.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
* This project, including the Makefile, uses work by Satoshi Ueyama, made available under the following terms:
-> Liviz.js (JSViz) <-
Interactive GraphViz on DHTML
-- MIT License
Copyright (c) 2011-2012 Satoshi Ueyama
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================
FILE: src/viz/Makefile
================================================
# To compile, emcc must be in your path or EMSCRIPTEN_ROOT must be set.
EMCC:=$(shell if command -v emcc > /dev/null; then echo "emcc"; else echo "$(EMSCRIPTEN_ROOT)/emcc"; fi)
SRCDIR=graphviz-src
EPSRCDIR=libexpat-src
viz.js: $(SRCDIR) $(EPSRCDIR) viz.c $(EPSRCDIR)/lib/lib-em.bc $(SRCDIR)/lib/cdt/libcdt-em.bc $(SRCDIR)/lib/common/libcommon-em.bc $(SRCDIR)/lib/gvc/libgvc-em.bc $(SRCDIR)/lib/pathplan/libpathplan-em.bc $(SRCDIR)/lib/graph/libgraph-em.bc $(SRCDIR)/lib/dotgen/libdotgen-em.bc $(SRCDIR)/plugin/core/libgvplugin_core-em.bc $(SRCDIR)/plugin/dot_layout/libgvplugin_dot_layout-em.bc post.js pre.js
$(EMCC) -v -O2 -s EXPORTED_FUNCTIONS='["_vizRenderFromString"]' -o viz.js -I$(SRCDIR)/lib/gvc -I$(SRCDIR)/lib/common -I$(SRCDIR)/lib/pathplan -I$(SRCDIR)/lib/cdt -I$(SRCDIR)/lib/graph -I$(EPSRCDIR)/lib viz.c $(SRCDIR)/lib/cdt/libcdt-em.bc $(SRCDIR)/lib/common/libcommon-em.bc $(SRCDIR)/lib/gvc/libgvc-em.bc $(SRCDIR)/lib/pathplan/libpathplan-em.bc $(SRCDIR)/lib/graph/libgraph-em.bc $(SRCDIR)/lib/dotgen/libdotgen-em.bc $(SRCDIR)/plugin/dot_layout/libgvplugin_dot_layout-em.bc $(SRCDIR)/plugin/core/libgvplugin_core-em.bc $(EPSRCDIR)/lib/lib-em.bc --pre-js pre.js --post-js post.js --closure 1
$(SRCDIR)/lib/cdt/libcdt-em.bc:
cd $(SRCDIR)/lib/cdt; $(EMCC) -o libcdt-em.bc -I. dtclose.c dtdisc.c dtextract.c dtflatten.c dthash.c dtlist.c dtmethod.c dtopen.c dtsize.c dtstrhash.c dttree.c dttreeset.c dtrestore.c dtview.c dtwalk.c
$(EPSRCDIR)/lib/lib-em.bc:
cd $(EPSRCDIR)/lib; $(EMCC) -o lib-em.bc -I. -I.. -DHAVE_BCOPY xmlparse.c xmlrole.c xmltok.c
$(SRCDIR)/lib/common/libcommon-em.bc:
cd $(SRCDIR)/lib/common; $(EMCC) -o libcommon-em.bc -I. -I.. -I../.. -I../../.. -I../gvc -I../pathplan -I../cdt -I../graph -I../xdot -I../../../$(EPSRCDIR)/lib -DHAVE_CONFIG_H -DHAVE_EXPAT_H -DHAVE_EXPAT arrows.c emit.c utils.c labels.c memory.c fontmetrics.c geom.c globals.c htmllex.c htmlparse.c htmltable.c ns.c pointset.c postproc.c routespl.c shapes.c splines.c colxlate.c psusershape.c input.c timing.c output.c
$(SRCDIR)/lib/gvc/libgvc-em.bc:
cd $(SRCDIR)/lib/gvc; $(EMCC) -o libgvc-em.bc -I. -I.. -I../.. -I../../.. -I../common -I../pathplan -I../cdt -I../graph -DHAVE_CONFIG_H gvc.c gvconfig.c gvcontext.c gvdevice.c gvlayout.c gvevent.c gvjobs.c gvplugin.c gvrender.c gvusershape.c gvloadimage.c gvtextlayout.c
$(SRCDIR)/lib/pathplan/libpathplan-em.bc:
cd $(SRCDIR)/lib/pathplan; $(EMCC) -o libpathplan-em.bc -I. cvt.c inpoly.c route.c shortest.c solvers.c triang.c util.c visibility.c
$(SRCDIR)/lib/graph/libgraph-em.bc:
cd $(SRCDIR)/lib/graph; $(EMCC) -o libgraph-em.bc -I. -I../cdt -I../gvc -I../common -I../pathplan agxbuf.c attribs.c edge.c graph.c graphio.c lexer.c node.c parser.c refstr.c trie.c
$(SRCDIR)/lib/dotgen/libdotgen-em.bc:
cd $(SRCDIR)/lib/dotgen; $(EMCC) -o libdotgen-em.bc -I. -I.. -I../.. -I../../.. -I../common -I../gvc -I../pathplan -I../cdt -I../graph -DHAVE_CONFIG_H acyclic.c aspect.c class1.c class2.c cluster.c compound.c conc.c decomp.c dotinit.c dotsplines.c fastgr.c flat.c mincross.c position.c rank.c sameport.c
$(SRCDIR)/plugin/core/libgvplugin_core-em.bc:
cd $(SRCDIR)/plugin/core; $(EMCC) -o libgvplugin_core-em.bc -I. -I.. -I../.. -I../../.. -I../../lib -I../../lib/common -I../../lib/gvc -I../../lib/pathplan -I../../lib/cdt -I../../lib/graph -DHAVE_CONFIG_H gvplugin_core.c gvrender_core_dot.c gvrender_core_fig.c gvrender_core_map.c gvrender_core_ps.c gvrender_core_svg.c gvrender_core_tk.c gvrender_core_vml.c gvloadimage_core.c
$(SRCDIR)/plugin/dot_layout/libgvplugin_dot_layout-em.bc:
cd $(SRCDIR)/plugin/dot_layout; $(EMCC) -o libgvplugin_dot_layout-em.bc -I. -I.. -I../.. -I../../.. -I../../lib -I../../lib/common -I../../lib/gvc -I../../lib/pathplan -I../../lib/cdt -I../../lib/graph -DHAVE_CONFIG_H gvplugin_dot_layout.c gvlayout_dot_layout.c
$(SRCDIR): | graphviz-src.tar.gz
mkdir -p $(SRCDIR)
tar xf graphviz-src.tar.gz -C $(SRCDIR) --strip=1
$(EPSRCDIR): | libexpat-src.tar.gz
mkdir -p $(EPSRCDIR)
tar xf libexpat-src.tar.gz -C $(EPSRCDIR) --strip=1
graphviz-src.tar.gz:
curl "http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.30.1.tar.gz" -o graphviz-src.tar.gz
libexpat-src.tar.gz:
curl -L "http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz/download" -o libexpat-src.tar.gz
clean:
rm -f $(SRCDIR)/lib/*/*.bc
rm -f $(SRCDIR)/plugin/*/*.bc
rm -f $(EPSRCDIR)/lib/*.bc
rm -f viz.js
clobber: clean
rm -rf $(SRCDIR)
rm -rf $(EPSRCDIR)
rm -f graphviz-src.tar.gz
rm -f libexpat-src.tar.gz
================================================
FILE: src/viz/README.txt
================================================
Viz.js
======
Simple Graphviz for the web, compiled with Emscripten.
To render as SVG (produces an XML string):
svg = Viz("digraph { a -> b; }", "svg");
This project is based on work by Satoshi Ueyama and Brenton Partridge:
https://github.com/gyuque/livizjs
https://github.com/bpartridge/graphviz.js
================================================
FILE: src/viz/config.h
================================================
#define GVPLUGIN_CONFIG_FILE "config6"
#define GVPLUGIN_VERSION 6
#define PACKAGE "graphviz"
#define PACKAGE_BUGREPORT "http://www.graphviz.org/"
#define PACKAGE_NAME "graphviz"
#define PACKAGE_STRING "graphviz 2.28.0"
#define PACKAGE_TARNAME "graphviz"
#define PACKAGE_URL ""
#define PACKAGE_VERSION "2.28.0"
#define VERSION "2.28.0"
#define HAVE_BOOL 1
#undef ENABLE_LTDL
#define HAVE_ERRNO_H 1
#define DEFAULT_DPI 96
#define HAVE_STRDUP 1
================================================
FILE: src/viz/example.html
================================================
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Viz.js</title>
</head>
<body>
<script type="text/vnd.graphviz" id="cluster">
digraph G {
subgraph cluster_0 {
style=filled;
color=lightgrey;
node [style=filled,color=white];
a0 -> a1 -> a2 -> a3;
label = "process #1";
}
subgraph cluster_1 {
node [style=filled];
b0 -> b1 -> b2 -> b3;
label = "process #2";
color=blue
}
start -> a0;
start -> b0;
a1 -> b3;
b2 -> a3;
a3 -> a0;
a3 -> end;
b3 -> end;
start [shape=Mdiamond];
end [shape=Msquare];
}
</script>
<script type="text/vnd.graphviz" id="crazy">
digraph "unix" {
graph [ fontname = "Helvetica-Oblique",
fontsize = 36,
label = "\n\n\n\nObject Oriented Graphs\nStephen North, 3/19/93",
size = "6,6" ];
node [ shape = polygon,
sides = 4,
distortion = "0.0",
orientation = "0.0",
skew = "0.0",
color = white,
style = filled,
fontname = "Helvetica-Outline" ];
"5th Edition" [sides=9, distortion="0.936354", orientation=28, skew="-0.126818", color=salmon2];
"6th Edition" [sides=5, distortion="0.238792", orientation=11, skew="0.995935", color=deepskyblue];
"PWB 1.0" [sides=8, distortion="0.019636", orientation=79, skew="-0.440424", color=goldenrod2];
LSX [sides=9, distortion="-0.698271", orientation=22, skew="-0.195492", color=burlywood2];
"1 BSD" [sides=7, distortion="0.265084", orientation=26, skew="0.403659", color=gold1];
"Mini Unix" [distortion="0.039386", orientation=2, skew="-0.461120", color=greenyellow];
Wollongong [sides=5, distortion="0.228564", orientation=63, skew="-0.062846", color=darkseagreen];
Interdata [distortion="0.624013", orientation=56, skew="0.101396", color=dodgerblue1];
"Unix/TS 3.0" [sides=8, distortion="0.731383", orientation=43, skew="-0.824612", color=thistle2];
"PWB 2.0" [sides=6, distortion="0.592100", orientation=34, skew="-0.719269", color=darkolivegreen3];
"7th Edition" [sides=10, distortion="0.298417", orientation=65, skew="0.310367", color=chocolate];
"8th Edition" [distortion="-0.997093", orientation=50, skew="-0.061117", color=turquoise3];
"32V" [sides=7, distortion="0.878516", orientation=19, skew="0.592905", color=steelblue3];
V7M [sides=10, distortion="-0.960249", orientation=32, skew="0.460424", color=navy];
"Ultrix-11" [sides=10, distortion="-0.633186", orientation=10, skew="0.333125", color=darkseagreen4];
Xenix [sides=8, distortion="-0.337997", orientation=52, skew="-0.760726", color=coral];
"UniPlus+" [sides=7, distortion="0.788483", orientation=39, skew="-0.526284", color=darkolivegreen3];
"9th Edition" [sides=7, distortion="0.138690", orientation=55, skew="0.554049", color=coral3];
"2 BSD" [sides=7, distortion="-0.010661", orientation=84, skew="0.179249", color=blanchedalmond];
"2.8 BSD" [distortion="-0.239422", orientation=44, skew="0.053841", color=lightskyblue1];
"2.9 BSD" [distortion="-0.843381", orientation=70, skew="-0.601395", color=aquamarine2];
"3 BSD" [sides=10, distortion="0.251820", orientation=18, skew="-0.530618", color=lemonchiffon];
"4 BSD" [sides=5, distortion="-0.772300", orientation=24, skew="-0.028475", color=darkorange1];
"4.1 BSD" [distortion="-0.226170", orientation=38, skew="0.504053", color=lightyellow1];
"4.2 BSD" [sides=10, distortion="-0.807349", orientation=50, skew="-0.908842", color=darkorchid4];
"4.3 BSD" [sides=10, distortion="-0.030619", orientation=76, skew="0.985021", color=lemonchiffon2];
"Ultrix-32" [distortion="-0.644209", orientation=21, skew="0.307836", color=goldenrod3];
"PWB 1.2" [sides=7, distortion="0.640971", orientation=84, skew="-0.768455", color=cyan];
"USG 1.0" [distortion="0.758942", orientation=42, skew="0.039886", color=blue];
"CB Unix 1" [sides=9, distortion="-0.348692", orientation=42, skew="0.767058", color=firebrick];
"USG 2.0" [distortion="0.748625", orientation=74, skew="-0.647656", color=chartreuse4];
"CB Unix 2" [sides=10, distortion="0.851818", orientation=32, skew="-0.020120", color=greenyellow];
"CB Unix 3" [sides=10, distortion="0.992237", orientation=29, skew="0.256102", color=bisque4];
"Unix/TS++" [sides=6, distortion="0.545461", orientation=16, skew="0.313589", color=mistyrose2];
"PDP-11 Sys V" [sides=9, distortion="-0.267769", orientation=40, skew="0.271226", color=cadetblue1];
"USG 3.0" [distortion="-0.848455", orientation=44, skew="0.267152", color=bisque2];
"Unix/TS 1.0" [distortion="0.305594", orientation=75, skew="0.070516", color=orangered];
"TS 4.0" [sides=10, distortion="-0.641701", orientation=50, skew="-0.952502", color=crimson];
"System V.0" [sides=9, distortion="0.021556", orientation=26, skew="-0.729938", color=darkorange1];
"System V.2" [sides=6, distortion="0.985153", orientation=33, skew="-0.399752", color=darkolivegreen4];
"System V.3" [sides=7, distortion="-0.687574", orientation=58, skew="-0.180116", color=lightsteelblue1];
"5th Edition" -> "6th Edition";
"5th Edition" -> "PWB 1.0";
"6th Edition" -> LSX;
"6th Edition" -> "1 BSD";
"6th Edition" -> "Mini Unix";
"6th Edition" -> Wollongong;
"6th Edition" -> Interdata;
Interdata -> "Unix/TS 3.0";
Interdata -> "PWB 2.0";
Interdata -> "7th Edition";
"7th Edition" -> "8th Edition";
"7th Edition" -> "32V";
"7th Edition" -> V7M;
"7th Edition" -> "Ultrix-11";
"7th Edition" -> Xenix;
"7th Edition" -> "UniPlus+";
V7M -> "Ultrix-11";
"8th Edition" -> "9th Edition";
"1 BSD" -> "2 BSD";
"2 BSD" -> "2.8 BSD";
"2.8 BSD" -> "Ultrix-11";
"2.8 BSD" -> "2.9 BSD";
"32V" -> "3 BSD";
"3 BSD" -> "4 BSD";
"4 BSD" -> "4.1 BSD";
"4.1 BSD" -> "4.2 BSD";
"4.1 BSD" -> "2.8 BSD";
"4.1 BSD" -> "8th Edition";
"4.2 BSD" -> "4.3 BSD";
"4.2 BSD" -> "Ultrix-32";
"PWB 1.0" -> "PWB 1.2";
"PWB 1.0" -> "USG 1.0";
"PWB 1.2" -> "PWB 2.0";
"USG 1.0" -> "CB Unix 1";
"USG 1.0" -> "USG 2.0";
"CB Unix 1" -> "CB Unix 2";
"CB Unix 2" -> "CB Unix 3";
"CB Unix 3" -> "Unix/TS++";
"CB Unix 3" -> "PDP-11 Sys V";
"USG 2.0" -> "USG 3.0";
"USG 3.0" -> "Unix/TS 3.0";
"PWB 2.0" -> "Unix/TS 3.0";
"Unix/TS 1.0" -> "Unix/TS 3.0";
"Unix/TS 3.0" -> "TS 4.0";
"Unix/TS++" -> "TS 4.0";
"CB Unix 3" -> "TS 4.0";
"TS 4.0" -> "System V.0";
"System V.0" -> "System V.2";
"System V.2" -> "System V.3";
}
</script>
<script type="text/vnd.graphviz" id="data">
digraph g {
graph [
rankdir = "LR"
];
node [
fontsize = "16"
shape = "ellipse"
];
edge [
];
"node0" [
label = "<f0> 0x10ba8| <f1>"
shape = "record"
];
"node1" [
label = "<f0> 0xf7fc4380| <f1> | <f2> |-1"
shape = "record"
];
"node2" [
label = "<f0> 0xf7fc44b8| | |2"
shape = "record"
];
"node3" [
label = "<f0> 3.43322790286038071e-06|44.79998779296875|0"
shape = "record"
];
"node4" [
label = "<f0> 0xf7fc4380| <f1> | <f2> |2"
shape = "record"
];
"node5" [
label = "<f0> (nil)| | |-1"
shape = "record"
];
"node6" [
label = "<f0> 0xf7fc4380| <f1> | <f2> |1"
shape = "record"
];
"node7" [
label = "<f0> 0xf7fc4380| <f1> | <f2> |2"
shape = "record"
];
"node8" [
label = "<f0> (nil)| | |-1"
shape = "record"
];
"node9" [
label = "<f0> (nil)| | |-1"
shape = "record"
];
"node10" [
label = "<f0> (nil)| <f1> | <f2> |-1"
shape = "record"
];
"node11" [
label = "<f0> (nil)| <f1> | <f2> |-1"
shape = "record"
];
"node12" [
label = "<f0> 0xf7fc43e0| | |1"
shape = "record"
];
"node0":f0 -> "node1":f0 [
id = 0
];
"node0":f1 -> "node2":f0 [
id = 1
];
"node1":f0 -> "node3":f0 [
id = 2
];
"node1":f1 -> "node4":f0 [
id = 3
];
"node1":f2 -> "node5":f0 [
id = 4
];
"node4":f0 -> "node3":f0 [
id = 5
];
"node4":f1 -> "node6":f0 [
id = 6
];
"node4":f2 -> "node10":f0 [
id = 7
];
"node6":f0 -> "node3":f0 [
id = 8
];
"node6":f1 -> "node7":f0 [
id = 9
];
"node6":f2 -> "node9":f0 [
id = 10
];
"node7":f0 -> "node3":f0 [
id = 11
];
"node7":f1 -> "node1":f0 [
id = 12
];
"node7":f2 -> "node8":f0 [
id = 13
];
"node10":f1 -> "node11":f0 [
id = 14
];
"node10":f2 -> "node12":f0 [
id = 15
];
"node11":f2 -> "node1":f0 [
id = 16
];
}
</script>
<script type="text/vnd.graphviz" id="gradients">
digraph G { bgcolor="purple:pink" label="agraph" fontcolor="white"
subgraph cluster1 {fillcolor="blue:cyan" label="acluster" fontcolor="white" style="filled" gradientangle="270"
node [shape=box fillcolor="red:yellow" style="filled" gradientangle=90]
anode;
}
}
</script>
<script type="text/vnd.graphviz" id="tables">
digraph G {
node [shape=plaintext]
a [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD PORT="1">one</TD><TD PORT="2" ROWSPAN="2">two</TD></TR>
<TR><TD PORT="3">three</TD></TR>
</TABLE>>];
b [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD PORT="1">one</TD><TD PORT="2">two</TD></TR>
<TR><TD PORT="3" COLSPAN="2">three</TD></TR>
</TABLE>>];
a:1 -> b:2;
b:1 -> a:2;
b:3 -> a:3;
}
</script>
<script src="viz.js"></script>
<script>
function inspect(s) {
return "<pre>" + s.replace(/</g, "<").replace(/>/g, ">").replace(/\"/g, """) + "</pre>"
}
function src(id) {
return document.getElementById(id).innerHTML;
}
function example(id, format) {
var result;
try {
result = Viz(src(id), format);
if (format === "svg")
return result;
else
return inspect(result);
} catch(e) {
return inspect(e.toString());
}
}
document.body.innerHTML += "<p>Examples from the <a href=\"http://graphviz.org/Gallery.php\">Graphviz gallery</a>.</p>"
document.body.innerHTML += "<h1>Cluster (svg output)</h1>";
document.body.innerHTML += example("cluster", "svg");
document.body.innerHTML += "<h1>Crazy (svg output)</h1>";
document.body.innerHTML += example("crazy", "svg");
document.body.innerHTML += "<h1>Data Structures (svg output)</h1>";
document.body.innerHTML += example("data", "svg");
document.body.innerHTML += "<h1>Tables (svg output)</h1>";
document.body.innerHTML += example("tables", "svg");
document.body.innerHTML += "<h1>Gradients (svg output)</h1>";
document.body.innerHTML += example("gradients", "svg");
document.body.innerHTML += "<h1>Cluster (plain output)</h1>";
document.body.innerHTML += example("cluster", "plain");
document.body.innerHTML += "<h1>Cluster (xdot output)</h1>";
document.body.innerHTML += example("cluster", "xdot");
</script>
</body>
</html>
================================================
FILE: src/viz/post.js
================================================
Module["ccall"]("vizRenderFromString", "number", ["string", "string"], [src, format]);
return Module["return"];
}
================================================
FILE: src/viz/pre.js
================================================
((typeof exports !== "undefined" && exports !== null) ? exports : this)["Viz"] = function(src, format) {
var Module = {};
Module["return"] = "";
Module["print"] = function(text) {
Module["return"] += text + "\n";
}
================================================
FILE: src/viz/viz.c
================================================
#include "cdt.h"
#include "gvc.h"
extern gvplugin_library_t gvplugin_dot_layout_LTX_library;
extern gvplugin_library_t gvplugin_core_LTX_library;
__attribute__((used)) void vizRenderFromString(char *string, char *format) {
GVC_t *context = gvContext();
gvAddLibrary(context, &gvplugin_core_LTX_library);
gvAddLibrary(context, &gvplugin_dot_layout_LTX_library);
Agraph_t *graph = agmemread(string);
gvLayout(context, graph, "dot");
gvRender(context, graph, format, stdout);
gvFreeLayout(context, graph);
agclose(graph);
gvFreeContext(context);
}
================================================
FILE: src/viz/viz.js
================================================
function Tb(Ig){throw Ig}var ic=void 0,vc=!0,Mc=null,Xd=!1;function Jg(){return(function(){})}function Zh(Ig){return(function(){return Ig})}
("undefined"!==typeof exports&&exports!==Mc?exports:this).Viz=(function(Ig,Fw){function Gn(a){eval.call(Mc,a)}function Kg(a){I.print(a+":\n"+Error().stack);Tb("Assertion: "+a)}function ld(a,b){a||Kg("Assertion failed: "+b)}function Hn(a){try{var b=eval("_"+a)}catch(f){try{b=Gw.Module["_"+a]}catch(e){}}ld(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)");return b}function In(a,b,f,e){function n(a,b){if("string"==b){if(a===Mc||a===ic||0===a){return 0}k||(k=pa.na());var s=pa.ma(a.length+1);Jn(a,s);return s}return"array"==b?(k||(k=pa.na()),s=pa.ma(a.length),Kn(a,s),s):a}var k=0,j=0,e=e?e.map((function(a){return n(a,f[j++])})):[];a=a.apply(Mc,e);"string"==b?b=De(a):(ld("array"!=b),b=a);k&&pa.Ha(k);return b}function Lg(s,i,f){f=f||"i8";"*"===f.charAt(f.length-1)&&(f="i32");switch(f){case"i1":m[s]=i;break;case"i8":m[s]=i;break;case"i16":D[s>>1]=i;break;case"i32":a[s>>2]=i;break;case"i64":Pf=[i>>>0,Math.min(Math.floor(i/4294967296),4294967295)>>>0];a[s>>2]=Pf[0];a[s+4>>2]=Pf[1];break;case"float":vb[s>>2]=i;break;case"double":g[b>>3]=i;a[s>>2]=a[b>>2];a[s+4>>2]=a[b+4>>2];break;default:Kg("invalid type for setValue: "+f)}}function Qf(s,i){i=i||"i8";"*"===i.charAt(i.length-1)&&(i="i32");switch(i){case"i1":return m[s];case"i8":return m[s];case"i16":return D[s>>1];case"i32":return a[s>>2];case"i64":return a[s>>2];case"float":return vb[s>>2];case"double":return a[b>>2]=a[s>>2],a[b+4>>2]=a[s+4>>2],g[b>>3];default:Kg("invalid type for setValue: "+i)}return Mc}function c(a,b,f,e){var n,k;"number"===typeof a?(n=vc,k=a):(n=Xd,k=a.length);var j="string"===typeof b?b:Mc,f=f==d?e:[Hb,pa.ma,pa.oa][f===ic?Ee:f](Math.max(k,j?1:b.length));if(n){return ef(f,0,k),f}if("i8"===j){return E.set(new Uint8Array(a),f),f}for(n=0;n<k;){var G=a[n];"function"===typeof G&&(G=pa.md(G));e=j||b[n];0===e?n++:("i64"==e&&(e="i32"),Lg(f+n,G,e),n+=pa.ea(e))}return f}function De(a,b){for(var f=new pa.U,e="undefined"==typeof b,n="",k=0,j;;){j=E[a+k|0];if(e&&0==j){break}n+=f.Da(j);k+=1;if(!e&&k==b){break}}return n}function $h(a){for(;0<a.length;){var b=a.shift(),f=b.ca;"number"===typeof f?b.W===ic?pa.t("v",f):pa.t("vi",f,[b.W]):f(b.W===ic?Mc:b.W)}}function ee(a,b,f){a=(new pa.U).jb(a);f&&(a.length=f);b||a.push(0);return a}function Jn(a,b,f){a=ee(a,f);for(f=0;f<a.length;){m[b+f|0]=a[f],f+=1}}function Kn(a,b){for(var f=0;f<a.length;f++){m[b+f|0]=a[f]}}function Ln(a,b){return 0<=a?a:32>=b?2*Math.abs(1<<b-1)+a:Math.pow(2,b)+a}function Mn(a,b){if(0>=a){return a}var f=32>=b?Math.abs(1<<b-1):Math.pow(2,b-1);if(a>=f&&(32>=b||a>f)){a=-2*f+a}return a}function Aj(a){rf++;I.monitorRunDependencies&&I.monitorRunDependencies(rf);a?(ld(!Mg[a]),Mg[a]=1,Ng===Mc&&"undefined"!==typeof setInterval&&(Ng=setInterval((function(){var a=Xd,b;for(b in Mg){a||(a=vc,I.o("still waiting on run dependencies:")),I.o("dependency: "+b)}a&&I.o("(end of list)")}),6e3))):I.o("warning: run dependency added without ID")}function ai(a){rf--;I.monitorRunDependencies&&I.monitorRunDependencies(rf);a?(ld(Mg[a]),delete Mg[a]):I.o("warning: run dependency removed without ID");0==rf&&(Ng!==Mc&&(clearInterval(Ng),Ng=Mc),!Nn&&Bj&&Cj())}function md(a,b,f){for(var e=0;e<f;){var n=E[a+e|0],k=E[b+e|0];if(n==k&&0==n){break}if(0==n){return-1}if(0==k){return 1}if(n==k){e++}else{return n>k?1:-1}}return 0}function ea(a,b){return md(a,b,Og)}function ie(a,b,f){for(var a=a|0,b=b|0,f=f|0,e=0,n=0,k=0;(e|0)<(f|0);){n=E[a+e|0];k=E[b+e|0];if((n|0)!=(k|0)){return((n|0)>(k|0)?1:-1)|0}e=e+1|0}return 0}function Fc(b,i,f){b|=0;i|=0;f|=0;if((b&3)==(i&3)){for(;b&3;){if(0==(f|0)){return}m[b]=m[i];b=b+1|0;i=i+1|0;f=f-1|0}for(;4<=(f|0);){a[b>>2]=a[i>>2],b=b+4|0,i=i+4|0,f=f-4|0}}for(;0<(f|0);){m[b]=m[i],b=b+1|0,i=i+1|0,f=f-1|0}}function Wa(a){for(var a=a|0,b=0,b=a;m[b]|0;){b=b+1|0}return b-a|0}function fb(b){fb.d||(fb.d=c([0],"i32",Ee));return a[fb.d>>2]=b}function Hw(a,b,f){var e=Q.b[a];if(e){if(e.q){if(0>f){return fb(Cb.i),-1}if(e.object.e){if(e.object.m){for(var n=0;n<f;n++){try{e.object.m(m[b+n|0])}catch(k){return fb(Cb.r),-1}}e.object.timestamp=Date.now();return n}fb(Cb.ra);return-1}n=e.position;a=Q.b[a];if(!a||a.object.e){fb(Cb.l),b=-1}else{if(a.q){if(a.object.g){fb(Cb.R),b=-1}else{if(0>f||0>n){fb(Cb.i),b=-1}else{for(var j=a.object.c;j.length<n;){j.push(0)}for(var G=0;G<f;G++){j[n+G]=E[b+G|0]}a.object.timestamp=Date.now();b=G}}}else{fb(Cb.j),b=-1}}-1!=b&&(e.position+=b);return b}fb(Cb.j);return-1}fb(Cb.l);return-1}function Yd(a,b,f,e){f*=b;if(0==f){return 0}a=Hw(e,a,f);return-1==a?(Q.b[e]&&(Q.b[e].error=vc),0):Math.floor(a/b)}function On(s,i){function f(s){var f;"double"===s?f=(a[b>>2]=a[i+n>>2],a[b+4>>2]=a[i+(n+4)>>2],g[b>>3]):"i64"==s?f=[a[i+n>>2],a[i+(n+4)>>2]]:(s="i32",f=a[i+n>>2]);n+=pa.I(s);return f}for(var e=s,n=0,k=[],j,G;;){var c=e;j=m[e];if(0===j){break}G=m[e+1|0];if(37==j){var d=Xd,h=Xd,q=Xd,u=Xd;a:for(;;){switch(G){case 43:d=vc;break;case 45:h=vc;break;case 35:q=vc;break;case 48:if(u){break a}else{u=vc;break};default:break a}e++;G=m[e+1|0]}var v=0;if(42==G){v=f("i32"),e++,G=m[e+1|0]}else{for(;48<=G&&57>=G;){v=10*v+(G-48),e++,G=m[e+1|0]}}var l=Xd;if(46==G){var w=0,l=vc;e++;G=m[e+1|0];if(42==G){w=f("i32"),e++}else{for(;;){G=m[e+1|0];if(48>G||57<G){break}w=10*w+(G-48);e++}}G=m[e+1|0]}else{w=6}var y;switch(String.fromCharCode(G)){case"h":G=m[e+2|0];104==G?(e++,y=1):y=2;break;case"l":G=m[e+2|0];108==G?(e++,y=8):y=4;break;case"L":;case"q":;case"j":y=8;break;case"z":;case"t":;case"I":y=4;break;default:y=Mc}y&&e++;G=m[e+1|0];if(-1!="diuoxXp".split("").indexOf(String.fromCharCode(G))){c=100==G||105==G;y=y||4;var A=j=f("i"+8*y),C;8==y&&(j=pa.eb(j[0],j[1],117==G));4>=y&&(j=(c?Mn:Ln)(j&Math.pow(256,y)-1,8*y));var F=Math.abs(j),c="";if(100==G||105==G){C=8==y&&Pg?Pg.stringify(A[0],A[1],Mc):Mn(j,8*y).toString(10)}else{if(117==G){C=8==y&&Pg?Pg.stringify(A[0],A[1],vc):Ln(j,8*y).toString(10),j=Math.abs(j)}else{if(111==G){C=(q?"0":"")+F.toString(8)}else{if(120==G||88==G){c=q?"0x":"";if(8==y&&Pg){C=(A[1]>>>0).toString(16)+(A[0]>>>0).toString(16)}else{if(0>j){j=-j;C=(F-1).toString(16);A=[];for(q=0;q<C.length;q++){A.push((15-parseInt(C[q],16)).toString(16))}for(C=A.join("");C.length<2*y;){C="f"+C}}else{C=F.toString(16)}}88==G&&(c=c.toUpperCase(),C=C.toUpperCase())}else{112==G&&(0===F?C="(nil)":(c="0x",C=F.toString(16)))}}}}if(l){for(;C.length<w;){C="0"+C}}for(d&&(c=0>j?"-"+c:"+"+c);c.length+C.length<v;){h?C+=" ":u?C="0"+C:c=" "+c}C=c+C;C.split("").forEach((function(a){k.push(a.charCodeAt(0))}))}else{if(-1!="fFeEgG".split("").indexOf(String.fromCharCode(G))){j=f("double");if(isNaN(j)){C="nan",u=Xd}else{if(isFinite(j)){l=Xd;y=Math.min(w,20);if(103==G||71==G){l=vc,w=w||1,y=parseInt(j.toExponential(y).split("e")[1],10),w>y&&-4<=y?(G=(103==G?"f":"F").charCodeAt(0),w-=y+1):(G=(103==G?"e":"E").charCodeAt(0),w--),y=Math.min(w,20)}if(101==G||69==G){C=j.toExponential(y),/[eE][-+]\d$/.test(C)&&(C=C.slice(0,-1)+"0"+C.slice(-1))}else{if(102==G||70==G){C=j.toFixed(y)}}c=C.split("e");if(l&&!q){for(;1<c[0].length&&-1!=c[0].indexOf(".")&&("0"==c[0].slice(-1)||"."==c[0].slice(-1));){c[0]=c[0].slice(0,-1)}}else{for(q&&-1==C.indexOf(".")&&(c[0]+=".");w>y++;){c[0]+="0"}}C=c[0]+(1<c.length?"e"+c[1]:"");69==G&&(C=C.toUpperCase());d&&0<=j&&(C="+"+C)}else{C=(0>j?"-":"")+"inf",u=Xd}}for(;C.length<v;){C=h?C+" ":u&&("-"==C[0]||"+"==C[0])?C[0]+"0"+C.slice(1):(u?"0":" ")+C}97>G&&(C=C.toUpperCase());C.split("").forEach((function(a){k.push(a.charCodeAt(0))}))}else{if(115==G){d=f("i8*")||Iw;u=Wa(d);l&&(u=Math.min(u,w));if(!h){for(;u<v--;){k.push(32)}}for(q=0;q<u;q++){k.push(E[d++|0])}if(h){for(;u<v--;){k.push(32)}}}else{if(99==G){for(h&&k.push(f("i8"));0<--v;){k.push(32)}h||k.push(f("i8"))}else{if(110==G){h=f("i32*"),a[h>>2]=k.length}else{if(37==G){k.push(j)}else{for(q=c;q<e+2;q++){k.push(m[q])}}}}}}}e+=2}else{k.push(j),e+=1}}return k}function ac(a,b,f){b=On(b,f);f=pa.na();Yd(c(b,"i8",de),1,b.length,a);pa.Ha(f)}function sa(a,b,f,e){Tb("Assertion failed: "+(e?De(e):"unknown condition")+", at: "+[a?De(a):"unknown filename",b,f?De(f):"unknown function"]+" at "+Error().stack)}function jb(a){var b=Wa(a),f=Hb(b+1);Fc(f,a,b);m[f+b|0]=0;return f}function Pn(b,i,f){i=On(i,f);f=i.length;if(0>b){var b=-b,e=Hb(f+1),b=a[b>>2]=e}for(e=0;e<f;e++){m[b+e|0]=i[e]}m[b+e|0]=0;return i.length}function wb(a,b,f){return Pn(a,b,f)}function Rf(){Rf.d||(Rf.d=c([0],"i8",Dj));return Rf.d}function ef(b,i,f){var b=b|0,i=i|0,f=f|0,e=0,n=0,k=0,j=0,e=b+f|0;if(f|0){j=b&3;n=i|i<<8|i<<16|i<<24;k=e&-4;if(j){for(j=b+4-j|0;(b|0)<(j|0);){m[b]=i,b=b+1|0}}for(;(b|0)<(k|0);){a[b>>2]=n,b=b+4|0}}for(;(b|0)<(e|0);){m[b]=i,b=b+1|0}}function Cd(s,i,f,e){Cd.whiteSpace||(Cd.whiteSpace={},Cd.whiteSpace[32]=1,Cd.whiteSpace[9]=1,Cd.whiteSpace[10]=1,Cd.whiteSpace[" "]=1,Cd.whiteSpace["\t"]=1,Cd.whiteSpace["\n"]=1);var s=De(s),n=0;if(0<=s.indexOf("%n")){var k=i,i=(function(){n++;return k()}),j=f,f=(function(){n--;return j()})}var G=0,c=0,d=0,h,G=0;a:for(;G<s.length;){if("%"===s[G]&&"n"==s[G+1]){var q=a[e+d>>2],d=d+pa.I("void*");a[q>>2]=n;G+=2}else{if("%"===s[G]&&"c"==s[G+1]){q=a[e+d>>2],d+=pa.I("void*"),c++,h=i(),m[q]=h,G+=2}else{for(;;){h=i();if(0==h){return c}if(!(h in Cd.whiteSpace)){break}}f();if("%"===s[G]){G++;for(var u=G;48<=s[G].charCodeAt(0)&&57>=s[G].charCodeAt(0);){G++}var v;G!=u&&(v=parseInt(s.slice(u,G),10));var l=u=Xd,w=Xd;"l"==s[G]?(u=vc,G++,"l"==s[G]&&(w=vc,G++)):"h"==s[G]&&(l=vc,G++);var y=s[G];G++;var A=0,q=[];if("f"==y||"e"==y||"g"==y||"E"==y){A=0;for(h=i();0<h;){q.push(String.fromCharCode(h)),/^[+-]?[0-9]*\.?[0-9]+([eE][+-]?[0-9]+)?$/.exec(q.join(""))&&(A=q.length),h=i()}for(h=0;h<q.length-A+1;h++){f()}q.length=A}else{h=i();for(var C=vc;(A<v||isNaN(v))&&0<h;){if(!(h in Cd.whiteSpace)&&("s"==y||("d"===y||"u"==y||"i"==y)&&(48<=h&&57>=h||C&&45==h)||"x"===y&&(48<=h&&57>=h||97<=h&&102>=h||65<=h&&70>=h))&&(G>=s.length||h!==s[G].charCodeAt(0))){q.push(String.fromCharCode(h)),h=i(),A++,C=Xd}else{break}}f()}if(0===q.length){return 0}h=q.join("");q=a[e+d>>2];d+=pa.I("void*");switch(y){case"d":;case"u":;case"i":l?D[q>>1]=parseInt(h,10):w?(Pf=[parseInt(h,10)>>>0,Math.min(Math.floor(parseInt(h,10)/4294967296),4294967295)>>>0],a[q>>2]=Pf[0],a[q+4>>2]=Pf[1]):a[q>>2]=parseInt(h,10);break;case"x":a[q>>2]=parseInt(h,16);break;case"f":;case"e":;case"g":;case"E":u?(g[b>>3]=parseFloat(h),a[q>>2]=a[b>>2],a[q+4>>2]=a[b+4>>2]):vb[q>>2]=parseFloat(h);break;case"s":u=ee(h);for(l=0;l<u.length;l++){m[q+l|0]=u[l]}}c++}else{if(s[G]in Cd.whiteSpace){for(h=i();h in Cd.whiteSpace;){if(0>=h){break a}h=i()}f(h)}else{if(h=i(),s[G].charCodeAt(0)!==h){f(h);break a}}G++}}}}return c}function Ld(a,b,f){var e=0;return Cd(b,(function(){return m[a+e++|0]}),(function(){e--}),f)}function fe(a,b,f){var e,n,k,j;if(0==a&&0==(a=Qf(f,"i8*"))){return 0}a:for(;;){n=Qf(a++,"i8");for(e=b;0!=(k=Qf(e++,"i8"));){if(n==k){continue a}}break}if(0==n){return Lg(f,0,"i8*"),0}for(j=a-1;;){n=Qf(a++,"i8");e=b;do{if((k=Qf(e++,"i8"))==n){return 0==n?a=0:Lg(a-1,0,"i8"),Lg(f,a,"i8*"),j}}while(0!=k)}Kg("strtok_r error!")}function sf(a){return a in{32:0,9:0,10:0,11:0,12:0,13:0}}function We(a,b){var f=0;do{m[a+f|0]=m[b+f|0],f++}while(0!=m[b+(f-1)|0])}function ue(a,b){var f=Wa(a),e=0;do{m[a+f+e|0]=m[b+e|0],e++}while(0!=m[b+(e-1)|0])}function Dc(a,b){a--;do{a++;var f=m[a];if(f==b){return a}}while(f);return 0}function Xe(b,i){for(var f=b;sf(m[b]);){b++}var e=1;45==m[b]?(e=-1,b++):43==m[b]&&b++;for(var n,k=0,j=Xd;;){n=m[b];if(!(48<=n&&57>=n)){break}j=vc;k=10*k+n-48;b++}var G=Xd;if(46==m[b]){b++;for(var c=.1;;){n=m[b];if(!(48<=n&&57>=n)){break}G=vc;k+=c*(n-48);c/=10;b++}}if(!j&&!G){return i&&(a[i>>2]=f),0}n=m[b];if(101==n||69==n){b++;f=0;j=Xd;n=m[b];45==n?(j=vc,b++):43==n&&b++;for(n=m[b];48<=n&&57>=n;){f=10*f+n-48,b++,n=m[b]}j&&(f=-f);k*=Math.pow(10,f)}i&&(a[i>>2]=b);return k*e}function Ye(b,i){for(var f=b;sf(m[f]);){f++}var e=1;45==m[f]?(e=-1,f++):43==m[f]&&f++;var n=10;!n&&48==m[f]&&(120==m[f+1|0]||88==m[f+1|0]?(n=16,f+=2):(n=8,f++));n||(n=10);for(var k,j=0;0!=(k=m[f])&&!(k=parseInt(String.fromCharCode(k),n),isNaN(k));){j=j*n+k,f++}j*=e;i&&(a[i>>2]=f);if(2147483647<j||-2147483648>j){j=2147483647<j?2147483647:-2147483648,fb(Cb.sa)}return j}function Jw(a,b,f,e){var n=Q.b[a];if(!n||n.object.e){return fb(Cb.l),-1}if(n.p){if(n.object.g){return fb(Cb.R),-1}if(0>f||0>e){return fb(Cb.i),-1}for(a=0;n.h.length&&0<f;){m[b++|0]=n.h.pop(),f--,a++}n=n.object.c;f=Math.min(n.length-e,f);if(n.subarray||n.slice){for(var k=0;k<f;k++){m[b+k|0]=n[e+k]}}else{for(k=0;k<f;k++){m[b+k|0]=n.get(e+k)}}return a+f}fb(Cb.j);return-1}function Ej(a,b,f){var e=Q.b[a];if(e){if(e.p){if(0>f){return fb(Cb.i),-1}if(e.object.e){if(e.object.input){for(a=0;e.h.length&&0<f;){m[b++|0]=e.h.pop(),f--,a++}for(var n=0;n<f;n++){try{var k=e.object.input()}catch(j){return fb(Cb.r),-1}if(k===Mc||k===ic){break}a++;m[b+n|0]=k}return a}fb(Cb.ra);return-1}k=e.h.length;a=Jw(a,b,f,e.position);-1!=a&&(e.position+=e.h.length-k+a);return a}fb(Cb.j);return-1}fb(Cb.l);return-1}function Sf(a){if(!Q.b[a]){return-1}var b=Q.b[a];if(b.f||b.error){return-1}a=Ej(a,Sf.d,1);return 0==a?(b.f=vc,-1):-1==a?(b.error=vc,-1):E[Sf.d|0]}function Tf(a,b,f){if(!Q.b[f]){return 0}var e=Q.b[f];if(e.error||e.f){return 0}for(var n,k=0;k<b-1&&10!=n;k++){n=Sf(f);if(-1==n){if(e.error){return 0}if(e.f){break}}m[a+k|0]=n}m[a+k|0]=0;return a}function Qn(a){var b=a+Wa(a);do{if(58==m[b]){return b}b--}while(b>=a);return 0}function Uf(a,b,f){for(var e=Xd,n,k=0;k<f;k++){n=e?0:m[b+k|0],m[a+k|0]=n,e=e||0==m[b+k|0]}}function Vf(a,b,f,e,n){for(var k=0,j,G,c;k<f;){if(j=k+f>>>1,c=b+j*e,G=pa.t("iii",n,[a,c]),0>G){f=j}else{if(0<G){k=j+1}else{return c}}}return 0}function je(){$h(Fj);Tb("exit(1) called, at "+Error().stack)}function ne(a){return 65<=a&&90>=a?a-65+97:a}function ba(){Tb("abort() at "+Error().stack)}function tf(a){return 97<=a&&122>=a?a-97+65:a}function Wf(a,b){return Math.sqrt(a*a+b*b)}function Kw(b,i,f){var e=a[f>>2],n=i&3,f=0!=n,n=1!=n,k=Boolean(i&512),j=Boolean(i&2048),G=Boolean(i&1024),c=Boolean(i&8),b=Q.C(De(b));if(!b.L){return fb(b.error),-1}if(i=b.object||Mc){if(k&&j){return fb(Cb.pa),-1}if((f||k||G)&&i.g){return fb(Cb.R),-1}if(n&&!i.N||f&&!i.write){return fb(Cb.j),-1}if(G&&!i.e){i.c=[]}else{if(!Q.Ba(i)){return fb(Cb.r),-1}}b=b.path}else{if(!k){return fb(Cb.S),-1}if(!b.v.write){return fb(Cb.j),-1}i=Q.$(b.v,b.name,[],e&256,e&128);b=b.ia+"/"+b.name}e=Q.b.length;if(i.g){f=0;Rn&&(f=Hb(Rn.V));var n=[],d;for(d in i.c){n.push(d)}Q.b[e]={path:b,object:i,position:-2,p:vc,q:Xd,K:Xd,error:Xd,f:Xd,h:[],c:n,xa:f}}else{Q.b[e]={path:b,object:i,position:0,p:n,q:f,K:c,error:Xd,f:Xd,h:[]}}return e}function Qg(a,b){var f,b=De(b);if("r"==b[0]){f=-1!=b.indexOf("+")?2:0}else{if("w"==b[0]){f=-1!=b.indexOf("+")?2:1,f|=1536}else{if("a"==b[0]){f=-1!=b.indexOf("+")?2:1,f|=512,f|=8}else{return fb(Cb.i),0}}}f=Kw(a,f,c([511,0,0,0],"i32",de));return-1==f?0:f}function Xf(a){Q.b[a]||fb(Cb.l);Q.b[a]?(Q.b[a].xa&&H(Q.b[a].xa),Q.b[a]=Mc):fb(Cb.l)}function bi(a,b){var f=0,e;do{f||(e=a,f=b);var n=m[a++|0],k=m[f++|0];if(0==k){return e}k!=n&&(a=e+1,f=0)}while(n);return 0}function Sn(b,i){if(Q.b[b]){var f=ee(Q.b[b].path);f=c(f,"i8",de);f=Q.ba(De(f),ic);if(f!==Mc&&Q.Ba(f)){var e=Lw;a[i+e.zb>>2]=1;a[i+e.Cb>>2]=0;a[i+e.vb>>2]=0;a[i+e.rb>>2]=4096;a[i+e.wb>>2]=f.ga;var n=Math.floor(f.timestamp/1e3);if(e.la===ic){e.la=e.qb.Ja;e.Ga=e.yb.Ja;e.Fa=e.tb.Ja;var k=1e3*(f.timestamp%1e3);a[i+e.qb.Ia>>2]=k;a[i+e.yb.Ia>>2]=k;a[i+e.tb.Ia>>2]=k}a[i+e.la>>2]=n;a[i+e.Ga>>2]=n;a[i+e.Fa>>2]=n;var j=0,G=n=0,d=k=0;f.e?(k=d=f.ga,n=G=0,j=8192):(k=1,d=0,f.g?(n=4096,G=1,j=16384):(j=f.c||f.link,n=j.length,G=Math.ceil(j.length/4096),j=f.link===ic?32768:40960));a[i+e.ub>>2]=k;a[i+e.Ab>>2]=d;a[i+e.Bb>>2]=n;a[i+e.sb>>2]=G;f.N&&(j|=365);f.write&&(j|=146);a[i+e.xb>>2]=j}}else{fb(Cb.l)}}function ff(a,b,f){if(Q.b[a]&&!Q.b[a].object.e){var e=Q.b[a];1===f?b+=e.position:2===f&&(b+=e.object.c.length);0>b?(fb(Cb.i),f=-1):(e.h=[],f=e.position=b)}else{fb(Cb.l),f=-1}-1!=f&&(Q.b[a].f=Xd)}function Tn(a,b,f,e){f*=b;if(0==f){return 0}a=Ej(e,a,f);e=Q.b[e];if(-1==a){return e&&(e.error=vc),0}a<f&&(e.f=vc);return Math.floor(a/b)}function ci(b){var i,f;ci.Z?(f=a[Un>>2],i=a[f>>2]):(ci.Z=vc,nd.USER="root",nd.PATH="/",nd.PWD="/",nd.HOME="/home/emscripten",nd.LANG="en_US.UTF-8",nd._="./this.program",i=c(1024,"i8",Ee),f=c(256,"i8*",Ee),a[f>>2]=i,a[Un>>2]=f);var e=[],n=0,k;for(k in b){if("string"===typeof b[k]){var j=k+"="+b[k];e.push(j);n+=j.length}}1024<n&&Tb(Error("Environment size exceeded TOTAL_ENV_SIZE!"));for(b=0;b<e.length;b++){j=e[b];for(n=0;n<j.length;n++){m[i+n|0]=j.charCodeAt(n)}m[i+n|0]=0;a[f+4*b>>2]=i;i+=j.length+1}a[f+4*e.length>>2]=0}function Rg(a){if(0===a){return 0}a=De(a);if(!nd.hasOwnProperty(a)){return 0}Rg.d&&H(Rg.d);Rg.d=c(ee(nd[a]),"i8",Dj);return Rg.d}function Yf(a){Yf.buffer||(Yf.buffer=Hb(256));var b=Yf.buffer;if(a in Gj){if(255<Gj[a].length){fb(Cb.sa)}else{for(var a=Gj[a],f=0;f<a.length;f++){m[b+f|0]=a.charCodeAt(f)}m[b+f|0]=0}}else{fb(Cb.i)}return Yf.buffer}function Vn(a){return Number(Q.b[a]&&Q.b[a].error)}function Wn(a){return 48<=a&&57>=a||97<=a&&122>=a||65<=a&&90>=a}function Zf(a){return 97<=a&&122>=a||65<=a&&90>=a}function uf(a,b,f){if(0!=b){for(var e=[],n=0;n<b;n++){e.push(n)}e.sort((function(b,i){return pa.t("iii",f,[a+4*b,a+4*i])}));var k=Hb(4*b);Fc(k,a,4*b);for(n=0;n<b;n++){e[n]!=n&&Fc(a+4*n,k+4*e[n],4)}H(k)}}function Mw(){switch(8){case 8:return Nw;case 54:;case 56:;case 21:;case 61:;case 63:;case 22:;case 67:;case 23:;case 24:;case 25:;case 26:;case 27:;case 69:;case 28:;case 101:;case 70:;case 71:;case 29:;case 30:;case 199:;case 75:;case 76:;case 32:;case 43:;case 44:;case 80:;case 46:;case 47:;case 45:;case 48:;case 49:;case 42:;case 82:;case 33:;case 7:;case 108:;case 109:;case 107:;case 112:;case 119:;case 121:return 200809;case 13:;case 104:;case 94:;case 95:;case 34:;case 35:;case 77:;case 81:;case 83:;case 84:;case 85:;case 86:;case 87:;case 88:;case 89:;case 90:;case 91:;case 94:;case 95:;case 110:;case 111:;case 113:;case 114:;case 115:;case 116:;case 117:;case 118:;case 120:;case 40:;case 16:;case 79:;case 19:return-1;case 92:;case 93:;case 5:;case 72:;case 6:;case 74:;case 92:;case 93:;case 96:;case 97:;case 98:;case 99:;case 102:;case 103:;case 105:return 1;case 38:;case 66:;case 50:;case 51:;case 4:return 1024;case 15:;case 64:;case 41:return 32;case 55:;case 37:;case 17:return 2147483647;case 18:;case 1:return 47839;case 59:;case 57:return 99;case 68:;case 58:return 2048;case 0:return 2097152;case 3:return 65536;case 14:return 32768;case 73:return 32767;case 39:return 16384;case 60:return 1e3;case 106:return 700;case 52:return 256;case 62:return 255;case 2:return 100;case 65:return 64;case 36:return 20;case 100:return 16;case 20:return 6;case 53:return 4}fb(Cb.i);return-1}function ke(a){var b=ke;b.Z||(ad=ad+4095>>12<<12,b.Z=vc,ke.Fb=ad);b=ad;0!=a&&pa.oa(a);return b}function Sg(a,b){var f,a=a|0,b=b|0;f=16;if((b|0)<(a|0)&(a|0)<(b+f|0)){b=b+f|0;for(a=a+f|0;0<(f|0);){a=a-1|0,b=b-1|0,f=f-1|0,m[a]=m[b]}}else{Fc(a,b,f)}}function vf(b){var i;i=(b+8|0)>>2;var b=a[i]>>2,f=a[b];if(0!=(f&4096|0)){var e=a[b+1];return e}a:do{if(0==(f&3|0)){if(0!=(f&112|0)){e=a[b+2]}else{var n=a[b+1];if(0==(n|0)){e=0}else{var k=n+4|0,j=a[k>>2];b:do{if(0==(j|0)){var G=n,c=a[n>>2]}else{for(var d=n,g=k,h=j;;){var m=h|0;a[g>>2]=a[m>>2];a[m>>2]=d;g=h+4|0;m=a[g>>2];if(0==(m|0)){G=h;c=d;break b}else{d=h,h=m}}}}while(0);if(0==(c|0)){e=G}else{n=G|0;for(j=c;;){k=a[j+4>>2];if(0==(k|0)){n=j}else{for(;!(d=k|0,a[j+4>>2]=a[d>>2],a[d>>2]=j,d=a[k+4>>2],0==(d|0));){j=k,k=d}n=a[n>>2]=k}n|=0;k=a[n>>2];if(0==(k|0)){e=G;break a}else{j=k}}}}}}else{if(k=a[b+2],j=a[b+3],n=(j<<2)+k|0,0<(j|0)){for(d=j=0;;){h=a[k>>2];if(0!=(h|0)){0==(j|0)?j=d=h:a[j>>2]=h;for(;!(h=a[j>>2],0==(h|0));){j=h}a[k>>2]=j}k=k+4|0;if(k>>>0>=n>>>0){e=d;break a}}}else{e=0}}}while(0);a[a[i]+4>>2]=e;G=a[i]|0;a[G>>2]|=4096;return e}function Xn(b,i){var f=h;if(0==(a[1347994]|0)){m[5392e3]=1;m[5391984]=1;m[5391980]=1;m[5391952]=1;var e;e=$f(5359356,0);a[1347994]=e;e=(e+40|0)>>2;0!=(a[ag(a[a[e]+4>>2]|0,5352668,5345e3)+8>>2]|0)&&ba();var n=ag(a[a[e]+4>>2]|0,5383804,5345e3);1!=(a[n+8>>2]|0)&&ba();m[n+12|0]=0;e=ag(a[a[e]+4>>2]|0,5386632,5345e3);2==(a[e+8>>2]|0)?m[e+12|0]=0:ba()}else{m[5392e3]&m[5391984]&m[5391980]||W(0,5354892,(l=h,h=h+1|0,h=h+3>>2<<2,a[l>>2]=0,l))}h=f;bg(0,5338964,5377376);f=Z(340);e=f>>2;0!=(f|0)&&(a[e]=5390596,a[e+4]=112,a[e+8]=0,a[e+9]=1);e=a[f+32>>2];if(0!=(e|0)&&(n=a[e>>2],0!=(n|0))){for(;!(103==m[n]<<24>>24&&0!=(bi(n,5333500)|0)&&Hj(f,a[e+4>>2]),e=e+8|0,n=a[e>>2],0==(n|0));){}}m[f+44|0]=0;e=wf(f,2,5370376);0!=(e|0)&&(a[f+132>>2]=a[a[e+16>>2]+12>>2]);Hj(f,5256512);Hj(f,5256504);e=a[1347999];a[1347999]=478;Yn(b);Ij();a[1347999]=e;e=a[1347993];di(f,e,5352588);var n=a[e+32>>2],k=a[ve>>2],j;Zn(f,i);var G=a[f+124>>2];j=G>>2;a[j+14]=ei(G,a[j+13]);0==(a[n+44>>2]|0)&&0==(a[j+37]&67108864|0)?Yd(5339332,20,1,a[Pb>>2]):(a[j+9]=k,0==(k|0)&&(k=G+148|0,a[k>>2]|=134217728),Jj(f,n),Kj(G),Lj(f));n=e+176|0;G=a[n>>2];0!=(G|0)&&(B[G](e),a[n>>2]=0);n=e+44|0;0!=(a[n>>2]|0)&&($n(e),a[n>>2]=0,a[a[e+32>>2]+44>>2]=0);Fe(e);e=a[1311713];0!=(e|0)&&(dc(e),a[1311713]=0);e=a[f+52>>2];a:do{if(0!=(e|0)){for(n=e;;){if(G=a[n+4>>2],H(n),0==(G|0)){break a}else{n=G}}}}while(0);n=a[f+100>>2];a:do{if(0!=(n|0)){G=n;for(e=G>>2;;){if(k=a[e],H(a[e+1]),H(a[e+2]),H(G),0==(k|0)){break a}else{G=k,e=G>>2}}}}while(0);Lj(f);e=a[f+40>>2];0!=(e|0)&&H(e);e=a[f+48>>2];0!=(e|0)&&H(e);H(f)}function dc(b){var i=b>>2;if(0!=(b|0)&&0>=(a[i+6]|0)){var f=a[i+1],e=f+32|0,n=a[e>>2];if(0==(n|0)){n=0}else{if(n=B[n](b,2,0,f),0>(n|0)){return}}if(0!=(a[i+7]|0)){0!=(a[a[b+8>>2]>>2]&4096|0)&&cg(b);var k=b+28|0,j=a[k>>2];0!=(j|0)&&(j=j+24|0,a[j>>2]=a[j>>2]-1|0);a[b+32>>2]=0;a[k>>2]=0;a[b>>2]=a[a[b+16>>2]>>2]}if(n=0==(n|0)){B[a[a[i+4]>>2]](b,0,64);if(0<(Lb(b)|0)){return}var j=b+8|0,G=a[j>>2],k=b+12|0;0<(a[G+12>>2]|0)?(B[a[k>>2]](b,a[G+8>>2],0,f),j=a[j>>2]):j=G;B[a[k>>2]](b,j,0,f)}k=a[i+5];if(0==(k|0)){H(b)}else{if(n&1==(k|0)){B[a[i+3]](b,b,0,f)}}i=a[e>>2];if(0!=(i|0)){B[i](b,6,0,f)}}}function Tg(b,i){var f,e,n;n=(b+4|0)>>2;var k=a[n];if(0==(k|0)){a[n]=i;var j=a[i+28>>2];a[b+12>>2]=0==(j|0)?242:j}else{if(0!=(i|0)){j=a[a[b+16>>2]>>2];e=(b+8|0)>>2;0!=(a[a[e]>>2]&4096|0)&&cg(b);var G=a[k+32>>2];if(!(0!=(G|0)&&0>(B[G](b,3,i,k)|0))&&(a[n]=i,n=a[i+28>>2],a[b+12>>2]=0==(n|0)?242:n,0==(a[a[e]>>2]&112|0))){f=vf(b);n=a[e]|0;a[n>>2]&=-4097;a[a[e]+4>>2]=0;a[a[e]+16>>2]=0;e=a[e]>>2;a:do{if(0!=(a[e]&3|0)&&(k=a[e+2],G=a[e+3],n=(G<<2)+k|0,0<(G|0))){for(;;){if(G=k+4|0,a[k>>2]=0,G>>>0<n>>>0){k=G}else{break a}}}}while(0);if(0!=(f|0)){e=i+8|0;n=i+4|0;var k=i|0,G=i+24|0,c=f;for(f=c>>2;;){var d=a[f],g=a[e>>2],h=a[n>>2],g=(0>(g|0)?a[f+2]:c+ -g|0)+a[k>>2]|0,g=0>(h|0)?a[g>>2]:g,m=a[G>>2],h=0==(m|0)?ao(g,h):B[m](b,g,i);a[f+1]=h;B[j](b,c,32);if(0==(d|0)){break}else{c=d,f=c>>2}}}}}}}function bo(b,i,f){var e,n,k,j,G,c;e=0;j=(b+8|0)>>2;0!=(a[a[j]>>2]&4096|0)&&cg(b);var d=a[b+4>>2];n=d>>2;var g=a[n],h=a[n+1];c=(d+8|0)>>2;var m=a[c],v=a[n+5];G=(b+20|0)>>2;a[G]&=-32769;do{if(0==(i|0)){if(0!=(f&384|0)){j=a[j]>>2;b=a[j+2];if(0==(b|0)){var l=0;return l}if(0==(f&256|0)){j=a[j+1]=b}else{f=a[b+4>>2];a[j+1]=f;if(0==(f|0)){return l=0}j=f}return l=0>(m|0)?a[j+8>>2]:j+ -m|0}if(0!=(f&4098|0)){e=a[j];if(0!=(a[e>>2]&144|0)){return l=0}e=a[e+8>>2];if(0==(e|0)){l=0}else{var w=e;k=w>>2;break}return l}if(0==(f&64|0)){return l=0}f=d+16|0;n=a[f>>2];0==(n|0)?0>(a[c]|0)&&(e=106):e=106;a:do{if(106==e&&(v=a[a[j]+8>>2],0!=(v|0))){G=b+12|0;g=0>(m|0);h=-m|0;for(l=n;;){w=a[v>>2];if(0!=(l|0)){B[l](b,g?a[v+8>>2]:v+h|0,d)}if(0>(a[c]|0)){B[a[G>>2]](b,v,0,d)}if(0==(w|0)){break a}v=w;l=a[f>>2]}}}while(0);a[a[j]+4>>2]=0;a[a[j]+8>>2]=0;l=a[a[j]+16>>2]=0}else{if(0==(f&2049|0)){w=a[j];do{if(0==(f&512|0)){k=a[w+4>>2];if(0!=(k|0)&&((0>(m|0)?a[k+8>>2]:k+ -m|0)|0)==(i|0)){var y=k;break}e=i+g|0;var A=0>(h|0)?a[e>>2]:e}else{A=i}e=162}while(0);a:do{if(162==e){e=0>(m|0);k=0>(h|0);for(var i=0==(v|0),y=1>(h|0),C=-m|0,w=w+8|0;;){w=a[w>>2];if(0==(w|0)){l=0;break}var F=(e?a[w+8>>2]:w+C|0)+g|0,F=k?a[F>>2]:F;if(0==((i?y?ea(A,F):ie(A,F,h):B[v](b,A,F,d))|0)){y=w;break a}else{w|=0}}return l}}while(0);if(0==(y|0)){return l=0}a[G]|=32768;if(0!=(f&4098|0)){w=y;k=w>>2;break}if(0==(f&8|0)){if(0==(f&16|0)){f=y}else{if(f=a[j],(y|0)!=(a[f+8>>2]|0)){f=a[y+4>>2]}else{return l=a[f+4>>2]=0}}}else{f=a[y>>2]}a[a[j]+4>>2]=f;return 0==(f|0)?l=0:l=0>(m|0)?a[f+8>>2]:f+ -m|0}c=d+12|0;G=a[c>>2];if(0==(G|0)){G=i}else{if(0==(f&1|0)){G=i}else{if(G=B[G](b,i,d),0==(G|0)){return l=0}}}if(-1<(m|0)){d=G+m|0,b=d>>2}else{if(g=B[a[b+12>>2]](b,0,12,d),0!=(g|0)){a[g+8>>2]=G,d=g,b=d>>2}else{if(0==(a[c>>2]|0)){return l=0}m=a[n+4];if(0==(m|0)||0==(f&1|0)){return l=0}B[m](b,G,d);return l=0}}c=d;G=a[j];n=G>>2;g=a[n];0==(g&128|0)?0==(g&16|0)?e=0==(g&32|0)?145:141:(g=a[n+1],h=0!=(g|0),0==(f&8192|0)?h?(g|0)==(a[n+2]|0)?e=141:(f=g+4|0,h=a[f>>2],a[b+1]=h,a[h>>2]=c,a[b]=g,a[f>>2]=d):e=141:h?(f=g|0,h=a[f>>2],0==(h|0)?e=145:(a[b]=h,a[h+4>>2]=d,a[b+1]=g,a[f>>2]=c)):e=145):e=0==(f&8192|0)?141:145;141==e?(n=a[n+2],f=d,a[f>>2]=n,0==(n|0)?a[b+1]=c:(n=n+4|0,a[b+1]=a[n>>2],a[n>>2]=d),a[a[j]+8>>2]=f):145==e&&(f=G+8|0,n=a[f>>2],0==(n|0)?(n=d,a[f>>2]=n,a[b+1]=c,f=n):(n=f=n+4|0,a[a[n>>2]>>2]=c,a[b+1]=a[n>>2],f=a[f>>2]=d),a[f>>2]=0);f=a[j];n=f+16|0;e=a[n>>2];-1<(e|0)?(a[n>>2]=e+1|0,j=a[j]):j=f;a[j+4>>2]=c;l=0>(m|0)?a[b+2]:d+ -m|0}return l}while(0);e=(w|0)>>2;G=a[e];0==(G|0)?G=0:(a[G+4>>2]=a[k+1],G=a[e]);h=a[j]+8|0;g=a[h>>2];(w|0)==(g|0)?(a[h>>2]=G|0,G=a[a[j]+8>>2],0!=(G|0)&&(a[G+4>>2]=a[k+1])):(h=w+4|0,a[a[h>>2]>>2]=G,G=g+4|0,(w|0)==(a[G>>2]|0)&&(a[G>>2]=a[h>>2]));G=a[j]+4|0;a[G>>2]=(w|0)==(a[G>>2]|0)?a[e]:0;j=a[j]+16|0;a[j>>2]=a[j>>2]-1|0;m=0>(m|0)?a[k+2]:w+ -m|0;j=a[n+4];if(0!=(j|0)&&0!=(f&2|0)){B[j](b,m,d)}if(0<=(a[c]|0)){return m}B[a[b+12>>2]](b,w,0,d);return m}function pc(b,i){var f,e,n,k,j,G=0,c=h;h=h+4|0;j=c>>2;if(0==(b|0)|0==(i|0)){return h=c,0}var d=Hb(40);k=d>>2;if(0==(d|0)){return h=c,0}a[k]=0;a[k+4]=0;a[k+1]=0;Tg(d,b);n=(d+20|0)>>2;k=b+32|0;a[n]=0;a[n+1]=0;a[n+2]=0;a[n+3]=0;a[n+4]=0;n=a[k>>2];if(0==(n|0)){f=d,G=238}else{if(a[j]=0,n=B[n](d,1,c,b),0>(n|0)){var g=d,G=239}else{if(0<(n|0)){if(n=a[j],0!=(n|0)){if(0==(a[i+4>>2]&a[n>>2]|0)){g=d,G=239}else{var q=d;e=q>>2;var m=n}}else{if(G=b+28|0,0==(a[G>>2]|0)){g=d,G=239}else{H(d);G=B[a[G>>2]](0,0,40,b);f=G>>2;if(0==(G|0)){return h=c,0}a[f]=0;a[f+4]=0;a[f+1]=0;Tg(G,b);a[f+5]=1;a[f+6]=0;a[f+8]=0;a[f+7]=0;f=G;G=238}}}else{f=d,G=238}}}238==G&&(d=B[a[f+12>>2]](f,0,28,b),a[j]=d,0==(d|0)?(g=f,G=239):(a[d>>2]=a[i+4>>2],a[a[j]+4>>2]=0,a[a[j]+8>>2]=0,a[a[j]+20>>2]=0,a[a[j]+16>>2]=0,a[a[j]+12>>2]=0,a[a[j]+24>>2]=0,q=f,e=q>>2,m=a[j]));if(239==G){return H(g),h=c,0}a[e+2]=m;a[e]=a[i>>2];a[e+4]=i;e=a[k>>2];if(0==(e|0)){return h=c,q}B[e](q,5,q,b);h=c;return q}function Lb(b){var i,f;f=(b+8|0)>>2;i=a[f];0!=(a[i>>2]&4096|0)&&(cg(b),i=a[f]);b=i>>2;i=(i+16|0)>>2;do{if(0>(a[i]|0)){var e=a[b];if(0!=(e&12|0)){a[i]=Mj(a[b+1])}else{if(0!=(e&112|0)){e=a[b+2];a:do{if(0==(e|0)){var n=0}else{for(var k=0,j=e;;){if(k=k+1|0,j=a[j>>2],0==(j|0)){n=k;break a}}}}while(0);a[i]=n}}}}while(0);return a[a[f]+16>>2]}function Mj(b){return 0==(b|0)?0:Mj(a[b+4>>2])+Mj(a[b>>2])+1|0}function ao(a,b){if(1>(b|0)){var f=m[a];a:do{if(0==f<<24>>24){var e=a,n=0}else{for(var k=a,j=0,G=f;;){var c=m[k+1|0],j=Math.a(((G&255)<<8)+j+(c&255)|0,17109811),k=k+(0!=c<<24>>24?2:1)|0,c=m[k];if(0==c<<24>>24){e=k;n=j;break a}else{G=c}}}}while(0);e=n+(e-a|0)|0;return e=Math.a(e,17109811)}e=b-1|0;n=a+e|0;a:do{if(0<(e|0)){j=a;for(c=0;;){if(c=Math.a((E[j]<<8)+E[j+1|0]+c|0,17109811),j=j+2|0,j>>>0>=n>>>0){f=j;k=c;break a}}}else{f=a,k=0}}while(0);if(f>>>0>n>>>0){return e=k+b|0,e=Math.a(e,17109811)}e=Math.a((E[f]<<8)+k|0,17109811);e=e+b|0;return e=Math.a(e,17109811)}function co(b,i,f){var e,n,k,j,G,c,d,g,q,m,l,t,w,y,A,C,F=0,N=h;h=h+128|0;C=N>>2;A=N+8>>2;y=(b+8|0)>>2;var Fa=a[y];if(0==(a[Fa>>2]&4096|0)){var Xc=Fa}else{cg(b),Xc=a[y]}var ka=a[b+4>>2];w=ka>>2;var Dd=a[w],Hd=a[w+1];t=(ka+8|0)>>2;var z=a[t],L=a[w+5];l=(b+20|0)>>2;a[l]&=-32769;var K=a[Xc+4>>2];if(0==(i|0)){if(0==(K|0)){var D=0;h=N;return D}if(0==(f&448|0)){return D=0,h=N,D}if(0==(f&64|0)){a:do{if(0==(f&256|0)){var E=K+4|0,oe=a[E>>2];if(0==(oe|0)){var O=K}else{for(var S=K,X=E,H=oe;;){var Mb=H|0;a[X>>2]=a[Mb>>2];a[Mb>>2]=S;var V=H+4|0,aa=a[V>>2];if(0==(aa|0)){O=H;break a}else{S=H,X=V,H=aa}}}}else{var dg=K|0,$=a[dg>>2];if(0==($|0)){O=K}else{for(var ca=K,da=dg,ga=$;;){var Oa=ga+4|0;a[da>>2]=a[Oa>>2];a[Oa>>2]=ca;var Ua=ga|0,P=a[Ua>>2];if(0==(P|0)){O=ga;break a}else{ca=ga,da=Ua,ga=P}}}}}while(0);a[a[y]+4>>2]=O;D=0>(z|0)?a[O+8>>2]:O+ -z|0;h=N;return D}var Je=ka+16|0;if(0==(a[Je>>2]|0)){if(0>(a[t]|0)){F=283}else{var R=Xc}}else{F=283}if(283==F){for(var ma=b+12|0,I=0>(z|0),eg=-z|0,$a=K;;){var gc=$a+4|0,ec=a[gc>>2];if(0!=(ec|0)){var Db=ec|0;a[gc>>2]=a[Db>>2];a[Db>>2]=$a;$a=ec}else{var za=a[$a>>2],J=a[Je>>2];if(0!=(J|0)){B[J](b,I?a[$a+8>>2]:$a+eg|0,ka)}if(0>(a[t]|0)){B[a[ma>>2]](b,$a,0,ka)}if(0==(za|0)){break}else{$a=za}}}R=a[y]}a[R+16>>2]=0;D=a[a[y]+4>>2]=0;h=N;return D}m=(b+16|0)>>2;a:do{if(8==(a[a[m]+4>>2]|0)){if(0==(f&4098|0)){F=321}else{for(var Da=0>(Hd|0),qa=i+Dd|0,oa=Da?a[qa>>2]:qa,xa=b,Ja=0==(L|0),Ma=1>(Hd|0),Ea=B[a[xa>>2]](b,i,4);;){if(0==(Ea|0)){F=321;break a}var Eb=Ea+Dd|0,Pa=Da?a[Eb>>2]:Eb;if(0!=((Ja?Ma?ea(oa,Pa):ie(oa,Pa,Hd):B[L](b,oa,Pa,ka))|0)){F=321;break a}if((Ea|0)==(i|0)){break}Ea=B[a[xa>>2]](b,Ea,8)}var Ha=a[a[y]+4>>2];a[C]=a[Ha+4>>2];a[C+1]=a[Ha>>2];var ta=Ha,ya=N,F=463}}else{F=321}}while(0);a:do{if(321==F){if(0==(f&2565|0)){if(0!=(f&32|0)){var gf=i,rc=0>(z|0)?a[i+8>>2]:i+ -z|0,cb=rc+Dd|0,me=0>(Hd|0)?a[cb>>2]:cb;if(0==(K|0)){var Qa=N,hb=N,va=gf,ua=rc,F=483}else{var Aa=rc,Ya=gf,ja=me,F=340}}else{if(0==(K|0)){hb=Qa=N,ua=i,F=483}else{if(((0>(z|0)?a[K+8>>2]:K+ -z|0)|0)==(i|0)){var Ka=i,na=K,Ra=N,ra=N,F=420}else{var Ia=i+Dd|0;0>(Hd|0)?(Aa=i,ja=a[Ia>>2]):(Aa=i,ja=Ia);F=340}}}}else{if(0==(f&512|0)){var fa=i+Dd|0,Sa=0>(Hd|0)?a[fa>>2]:fa}else{Sa=i}0==(K|0)?(hb=Qa=N,ua=i,F=483):(Aa=i,ja=Sa,F=340)}b:do{if(340==F){c:do{if(4==(a[a[m]+4>>2]|0)){var gb=a[a[y]+24>>2];if(0==(gb|0)){var Le=K,db=N,W=N}else{if(0==(f&516|0)){Le=K,W=db=N}else{for(var kb=0>(z|0),jf=0>(Hd|0),Va=0==(L|0),Z=1>(Hd|0),lb=-z|0,Bb=0,eb=K;;){if((Bb|0)>=(gb|0)){F=345;break}var ab=(kb?a[eb+8>>2]:eb+lb|0)+Dd|0,ub=jf?a[ab>>2]:ab,pb=Va?Z?ea(ja,ub):ie(ja,ub,Hd):B[L](b,ja,ub,ka);if(0==(pb|0)){F=357;break}a[(Bb<<2>>2)+A]=pb;var qb=a[(0>(pb|0)?eb+4|0:eb|0)>>2];if(0==(qb|0)){D=0;F=518;break}else{Bb=Bb+1|0,eb=qb}}if(345==F){if(0<(gb|0)){var mb=N;q=mb>>2;var ob=N;g=ob>>2;for(var Ta=K,tb=0;;){if(0>(a[(tb<<2>>2)+A]|0)){var bb=Ta+4|0,M=a[bb>>2];if(0>(a[((tb|1)<<2>>2)+A]|0)){var ba=M|0;a[bb>>2]=a[ba>>2];a[ba>>2]=Ta;a[g+1]=M;var sb=M+4|0,xb=M,Y=mb}else{a[q]=M,a[g+1]=Ta,sb=M|0,xb=Ta,Y=M}}else{var zb=Ta|0,Na=a[zb>>2];if(0<(a[((tb|1)<<2>>2)+A]|0)){var Q=Na+4|0;a[zb>>2]=a[Q>>2];a[Q>>2]=Ta;a[q]=Na;sb=Na|0;xb=ob;Y=Na}else{a[g+1]=Na,a[q]=Ta,sb=Na+4|0,xb=Na,Y=Ta}}var ha=a[sb>>2],Ug=tb+2|0;if((Ug|0)<(gb|0)){mb=Y,q=mb>>2,ob=xb,g=ob>>2,Ta=ha,tb=Ug}else{Le=ha;db=xb;W=Y;break c}}}else{Le=K,W=db=N}}else{if(357==F){return D=kb?a[eb+8>>2]:eb+lb|0,h=N,D}if(518==F){return h=N,D}}}}}else{Le=K,W=db=N}}while(0);var sa=0>(z|0),ia=0>(Hd|0),jd=0!=(L|0),la=1>(Hd|0),wc=-z|0,fi=Le,wa=db,Ba=W;d=Ba>>2;c:for(;;){var Nb=fi,pa=wa;for(c=pa>>2;;){var Xa=(sa?a[Nb+8>>2]:Nb+wc|0)+Dd|0,Rd=ia?a[Xa>>2]:Xa,Sd=jd?B[L](b,ja,Rd,ka):la?ea(ja,Rd):ie(ja,Rd,Hd);if(0==(Sd|0)){var Ka=Aa,Jd=Ya,na=Nb,Ra=pa,ra=Ba,F=420;break b}if(0<=(Sd|0)){break}var xd=Nb+4|0,pe=a[xd>>2];G=pe>>2;if(0==(pe|0)){F=402;break c}var Me=(sa?a[G+2]:pe+wc|0)+Dd|0,$b=ia?a[Me>>2]:Me,jc=jd?B[L](b,ja,$b,ka):la?ea(ja,$b):ie(ja,$b,Hd);if(0<=(jc|0)){F=399;break}var Wa=pe|0;a[xd>>2]=a[Wa>>2];a[Wa>>2]=Nb;a[c+1]=pe;var Yc=a[G+1];if(0==(Yc|0)){Qa=Ba;hb=pe;va=Ya;ua=Aa;F=483;break b}else{Nb=Yc,pa=pe,c=pa>>2}}if(399==F){F=0;if(0==(jc|0)){F=400;break}a[d]=pe;a[c+1]=Nb;var Gc=a[G];if(0==(Gc|0)){Qa=pe;hb=Nb;va=Ya;ua=Aa;F=483;break b}else{fi=Gc;wa=Nb;Ba=pe;d=Ba>>2;continue}}var Rb=Nb|0,Zb=a[Rb>>2];j=Zb>>2;if(0==(Zb|0)){F=419;break}var lc=(sa?a[j+2]:Zb+wc|0)+Dd|0,La=ia?a[lc>>2]:lc,ib=jd?B[L](b,ja,La,ka):la?ea(ja,La):ie(ja,La,Hd);if(0<(ib|0)){var Za=Zb+4|0;a[Rb>>2]=a[Za>>2];a[Za>>2]=Nb;a[d]=Zb;var jb=a[j];if(0==(jb|0)){Qa=Zb;hb=pa;va=Ya;ua=Aa;F=483;break b}else{fi=jb;wa=pa;Ba=Zb;d=Ba>>2;continue}}if(0==(ib|0)){F=417;break}a[c+1]=Zb;a[d]=Nb;var od=a[j+1];if(0==(od|0)){Qa=Nb;hb=Zb;va=Ya;ua=Aa;F=483;break b}else{fi=od,wa=Zb,Ba=Nb,d=Ba>>2}}419==F?(Qa=a[d]=Nb,hb=pa,va=Ya,ua=Aa,F=483):400==F?(a[c+1]=Nb,Ka=Aa,Jd=Ya,na=pe,Ra=Nb,ra=Ba,F=420):402==F?(a[c+1]=Nb,Qa=Ba,hb=Nb,va=Ya,ua=Aa,F=483):417==F&&(a[d]=Nb,Ka=Aa,Jd=Ya,na=Zb,Ra=pa,ra=Nb,F=420)}}while(0);do{if(420==F){if(0==(na|0)){Qa=ra,hb=Ra,va=Jd,ua=Ka,F=483}else{if(a[l]|=32768,k=(na+4|0)>>2,a[ra>>2]=a[k],n=(na|0)>>2,a[Ra+4>>2]=a[n],0!=(f&516|0)){var hc=na;e=hc>>2}else{if(0!=(f&8|0)){var Ac=N|0;a[k]=a[Ac>>2];a[n]=0;a[Ac>>2]=na;var fb=Ra,wb=Ka,F=450}else{if(0!=(f&16|0)){var rb=N+4|0;a[n]=a[rb>>2];a[k]=0;a[rb>>2]=na;var Jc=Ra,kc=Ka,F=457}else{if(0!=(f&4098|0)){ta=na;ya=Ra;F=463;break a}if(0!=(f&2049|0)){if(0!=(a[a[m]+4>>2]&4|0)){hc=na,e=hc>>2}else{a[k]=0;var Ed=N+4|0;a[n]=a[Ed>>2];a[Ed>>2]=na;var Ec=Ra,Hb=na,xc=Ka,F=490}}else{if(0==(f&32|0)){return D=0,h=N,D}if(0==(a[a[m]+4>>2]&4|0)){a[Jd+4>>2]=0;var Oc=N+4|0;a[Jd>>2]=a[Oc>>2];a[Oc>>2]=Jd;var yc=a[y]+16|0;a[yc>>2]=a[yc>>2]+1|0}else{var Cb=a[w+4];if(0!=(Cb|0)){B[Cb](b,Ka,ka)}if(0>(a[t]|0)){B[a[b+12>>2]](b,Jd,0,ka)}}hc=na;e=hc>>2}}}}}}}while(0);do{if(483==F){if(a[hb+4>>2]=0,a[Qa>>2]=0,0!=(f&8|0)){fb=hb,wb=ua,F=450}else{if(0!=(f&16|0)){Jc=hb,kc=ua,F=457}else{if(0!=(f&516|0)){var Pc=ua,Cc=hb;break a}if(0!=(f&2049|0)){Ec=hb,Hb=0,xc=ua,F=490}else{if(0==(f&32|0)){Pc=0;Cc=hb;break a}var nb=a[y]+16|0;a[nb>>2]=a[nb>>2]+1|0;hc=va;e=hc>>2}}}}}while(0);do{if(490==F){var Tc=ka+12|0,Ab=a[Tc>>2],vb=0==(Ab|0)?xc:0==(f&1|0)?xc:B[Ab](b,xc,ka);if(0==(vb|0)){var gd=Hb}else{if(-1<(z|0)){gd=vb+z|0}else{var bd=B[a[b+12>>2]](b,0,12,ka),Fb=bd;if(0!=(bd|0)){a[bd+8>>2]=vb}else{if(0!=(a[Tc>>2]|0)){var Qc=a[w+4];if(0!=(Qc|0)&&0!=(f&1|0)){B[Qc](b,vb,ka)}}}gd=Fb}}if(0==(gd|0)){Pc=vb;Cc=Ec;break a}var Fd=a[y]+16|0,Uc=a[Fd>>2];-1<(Uc|0)&&(a[Fd>>2]=Uc+1|0);hc=gd;e=hc>>2}else{if(450==F){var ed=N+4|0,Zc=a[ed>>2];if(0==(Zc|0)){Pc=wb;Cc=fb;break a}var cd=Zc+4|0,$c=a[cd>>2];b:do{if(0==($c|0)){var Vc=Zc,Jb=a[Zc>>2]}else{for(var Kb=Zc,Ib=cd,ge=$c;;){var go=ge|0;a[Ib>>2]=a[go>>2];a[go>>2]=Kb;var se=ge+4|0,Gb=a[se>>2];if(0==(Gb|0)){Vc=ge;Jb=Kb;break b}else{Kb=ge,Ib=se,ge=Gb}}}}while(0);a[ed>>2]=Jb;hc=Vc;e=hc>>2}else{if(457==F){var Ub=N|0,fd=a[Ub>>2];if(0==(fd|0)){Pc=kc;Cc=Jc;break a}var yb=fd|0,hd=a[yb>>2];b:do{if(0==(hd|0)){var Pb=fd,Lb=a[fd+4>>2]}else{for(var Sb=fd,Yb=yb,rd=hd;;){var Vg=rd+4|0;a[Yb>>2]=a[Vg>>2];a[Vg>>2]=Sb;var bc=rd|0,Wg=a[bc>>2];if(0==(Wg|0)){Pb=rd;Lb=Sb;break b}else{Sb=rd,Yb=bc,rd=Wg}}}}while(0);a[Ub>>2]=Lb;hc=Pb;e=hc>>2}}}}while(0);a[e+1]=a[C];a[e]=a[C+1];b:do{if(0==(a[a[m]+4>>2]&8|0)){var Gd=hc}else{if(0==(f&516|0)){Gd=hc}else{for(var Ke=0>(z|0),qc=0>(Hd|0),ho=(Ke?a[e+2]:hc+ -z|0)+Dd|0,ud=qc?a[ho>>2]:ho,id=0==(L|0),xe=1>(Hd|0),yd=-z|0,Kd=hc;;){var He=Kd+4|0,cc=a[He>>2];if(0==(cc|0)){Gd=Kd;break b}var Ad=cc|0,le=a[Ad>>2];c:do{if(0==(le|0)){var Md=cc,Qb=Ad}else{for(var oc=cc,Nd=Ad,Td=le;;){var mc=Td+4|0;a[Nd>>2]=a[mc>>2];a[mc>>2]=oc;var Ob=Td|0,nc=a[Ob>>2];if(0==(nc|0)){Md=Td;Qb=Ob;break c}else{oc=Td,Nd=Ob,Td=nc}}}}while(0);var Ud=He|0;a[Ud>>2]=Md;var Xb=(Ke?a[Md+8>>2]:Md+yd|0)+Dd|0,ac=qc?a[Xb>>2]:Xb;if(0!=((id?xe?ea(ud,ac):ie(ud,ac,Hd):B[L](b,ud,ac,ka))|0)){Gd=Kd;break b}a[Ud>>2]=a[Qb>>2];a[Qb>>2]=Kd;Kd=Md}}}}while(0);a[a[y]+4>>2]=Gd;D=0>(z|0)?a[Gd+8>>2]:Gd+ -z|0;h=N;return D}}while(0);if(463==F){var dc=0>(z|0)?a[ta+8>>2]:ta+ -z|0,Vb=a[w+4];if(0!=(Vb|0)&&0!=(f&2|0)){B[Vb](b,dc,ka)}if(0>(a[t]|0)){B[a[b+12>>2]](b,ta,0,ka)}var zc=a[y]+16|0,pc=a[zc>>2]-1|0;a[zc>>2]=pc;0>(pc|0)&&(a[a[y]+16>>2]=-1);Pc=dc;Cc=ya}for(var Hc=Cc;;){var Fc=Hc+4|0,uc=a[Fc>>2];if(0==(uc|0)){break}else{Hc=uc}}a[Fc>>2]=a[C];a[a[y]+4>>2]=a[C+1];D=0!=(f&2|0)?Pc:0;h=N;return D}function cg(b){var i;i=(b+8|0)>>2;var b=a[i],f=b|0,e=a[f>>2];if(0!=(e&4096|0)){if(b=a[b+4>>2],a[f>>2]=e&-4097,e=a[i],f=a[e>>2],0==(f&3|0)){e=e+4|0,0==(f&12|0)?(a[e>>2]=0,a[a[i]+8>>2]=b|0):a[e>>2]=b}else{if(a[e+4>>2]=0,i=a[i],f=a[i+8>>2],e=a[i+12>>2],i=(e<<2)+f|0,0<(e|0)){for(;!(e=a[f>>2],0!=(e|0)&&(a[f>>2]=b,b=e|0,e=a[b>>2],a[b>>2]=0,b=e),f=f+4|0,f>>>0>=i>>>0);){}}}}}function gi(b,i){for(var f=b|0,e=b+32|0,n=B[a[f>>2]](b,0,128);0!=(n|0);){var k=a[e>>2],j=B[a[f>>2]](b,n,8);if(0>(B[i](0==(k|0)?b:k,n,0)|0)){break}else{n=j}}}function Xg(b,i,f){var e,n=i>>2,k=h;h=h+8|0;var j=k+4;a[n]=0;var G=b+16|0,c=a[a[a[G>>2]+20>>2]>>2]>>>4&1;a[f>>2]=c;var d=a[1347848];a:do{if(0==(d|0)){e=c}else{var g=Gb(b|0,a[d+8>>2]),q=m[g];if(0==q<<24>>24){e=c}else{var u=5391888;for(e=u>>2;;){var l=a[e];if(0==(l|0)){e=c;break a}if(q<<24>>24==m[l]<<24>>24&&0==(ea(g,l)|0)){break}u=u+12|0;e=u>>2}a[n]=a[e+1];e=a[e+2];a[f>>2]=e}}}while(0);c=a[1347855];0!=(c|0)&1==(e|0)&&(c=Gb(b|0,a[c+8>>2]),0!=m[c]<<24>>24&&io(c,f));c=a[1347853];0!=(c|0)&&1==(a[n]|0)&&(c=Gb(b|0,a[c+8>>2]),0!=m[c]<<24>>24&&io(c,i));0!=m[b+161|0]<<24>>24&&(b=a[b+12>>2],Xg(hi(a[b+20>>2],b,a[G>>2]),k,j),a[f>>2]|=a[k>>2],a[n]|=a[j>>2]);h=k}function io(b,i){var f=h;h=h+4|0;a[i>>2]=0;if(0!=m[b]<<24>>24){for(var e=b,n=0;;){a[f>>2]=0;var k=e,e=f,j=ic,c=h;h=h+4|0;j=c>>2;a[j]=0;var d=Nj(k,5391728,c);if((d|0)==(k|0)){for(;!(d=Nj(k,5391840,c),(k|0)==(d|0));){k=d}k=Nj(k,5391744,c)}else{k=d}d=a[j];0!=(d|0)&0==(d&7|0)&&(d|=1,a[j]=d);j=d;d=a[e>>2];j|=d;a[e>>2]=j;h=c;e=k;a[i>>2]|=a[f>>2]<<(n<<3);n=n+1|0;if(!(0!=m[e]<<24>>24&4>(n|0))){break}}}h=f}function $e(s,i){for(var f=0,e=i&7,n=5391616;;){if(0==(a[n+12>>2]|0)){var k=0;break}if((e|0)==(a[n>>2]|0)){f=574;break}else{n=n+16|0}}574==f&&(k=n+4|0,k=(a[b>>2]=a[k>>2],a[b+4>>2]=a[k+4>>2],g[b>>3]));e=i>>>8&7;for(n=5391616;;){if(0==(a[n+12>>2]|0)){var j=k;break}if((e|0)==(a[n>>2]|0)){f=578;break}else{n=n+16|0}}578==f&&(j=n+4|0,j=k+(a[b>>2]=a[j>>2],a[b+4>>2]=a[j+4>>2],g[b>>3]));k=i>>>16&7;for(e=5391616;;){if(0==(a[e+12>>2]|0)){var c=j;break}if((k|0)==(a[e>>2]|0)){f=582;break}else{e=e+16|0}}582==f&&(c=e+4|0,c=j+(a[b>>2]=a[c>>2],a[b+4>>2]=a[c+4>>2],g[b>>3]));j=i>>>24&7;for(k=5391616;;){if(0==(a[k+12>>2]|0)){var d=c,f=588;break}if((j|0)==(a[k>>2]|0)){break}else{k=k+16|0}}if(588==f){return f=10*d,c=a[1347854],c=mc(s|0,c,1,0),f*c}f=k+4|0;d=c+(a[b>>2]=a[f>>2],a[b+4>>2]=a[f+4>>2],g[b>>3]);f=10*d;c=a[1347854];c=mc(s|0,c,1,0);return f*c}function ii(s,i,f,e,n,k){var j,c,d,p,r=h;h=h+80|0;j=r+8;var q=r+72,s=$e(s,k),s=s*s;g[b>>3]=s;a[q>>2]=a[b>>2];a[q+4>>2]=a[b+4>>2];a[n+12>>2]=k;k=e+3|0;c=(k<<4)+i|0;n=(n+32|0)>>2;d=c>>2;a[n]=a[d];a[n+1]=a[d+1];a[n+2]=a[d+2];a[n+3]=a[d+3];(e|0)>(f|0)&&(f=(e<<4)+i|0,c|=0,f=(a[b>>2]=a[f>>2],a[b+4>>2]=a[f+4>>2],g[b>>3])-(a[b>>2]=a[c>>2],a[b+4>>2]=a[c+4>>2],g[b>>3]),c=(e<<4)+i+8|0,k=(k<<4)+i+8|0,k=(a[b>>2]=a[c>>2],a[b+4>>2]=a[c+4>>2],g[b>>3])-(a[b>>2]=a[k>>2],a[b+4>>2]=a[k+4>>2],g[b>>3]),e=f*f+k*k<s?e-3|0:e);p=(j+48|0)>>2;d=((e<<4)+i|0)>>2;a[p]=a[d];a[p+1]=a[d+1];a[p+2]=a[d+2];a[p+3]=a[d+3];c=(j+32|0)>>2;f=((e+1<<4)+i|0)>>2;a[c]=a[f];a[c+1]=a[f+1];a[c+2]=a[f+2];a[c+3]=a[f+3];k=(j+16|0)>>2;s=((e+2<<4)+i|0)>>2;a[k]=a[s];a[k+1]=a[s+1];a[k+2]=a[s+2];a[k+3]=a[s+3];var m=j|0;j>>=2;a[j]=a[n];a[j+1]=a[n+1];a[j+2]=a[n+2];a[j+3]=a[n+3];a[r>>2]=m;a[r+4>>2]=q;Yg(r,602,m,1);a[d]=a[p];a[d+1]=a[p+1];a[d+2]=a[p+2];a[d+3]=a[p+3];a[f]=a[c];a[f+1]=a[c+1];a[f+2]=a[c+2];a[f+3]=a[c+3];a[s]=a[k];a[s+1]=a[k+1];a[s+2]=a[k+2];a[s+3]=a[k+3];i=((e+3<<4)+i|0)>>2;a[i]=a[j];a[i+1]=a[j+1];a[i+2]=a[j+2];a[i+3]=a[j+3];h=r;return e}function ji(s,i,f,e,n,k){var j,c,d,p=h;h=h+80|0;var r=p+8,q=p+72,s=$e(s,k),s=s*s;g[b>>3]=s;a[q>>2]=a[b>>2];a[q+4>>2]=a[b+4>>2];a[n+8>>2]=k;k=(f<<4)+i|0;n=(n+16|0)>>2;j=k>>2;a[n]=a[j];a[n+1]=a[j+1];a[n+2]=a[j+2];a[n+3]=a[j+3];if((e|0)>(f|0)){k|=0;e=f+3|0;j=(e<<4)+i|0;k=(a[b>>2]=a[k>>2],a[b+4>>2]=a[k+4>>2],g[b>>3])-(a[b>>2]=a[j>>2],a[b+4>>2]=a[j+4>>2],g[b>>3]);j=(f<<4)+i+8|0;c=(e<<4)+i+8|0;j=(a[b>>2]=a[j>>2],a[b+4>>2]=a[j+4>>2],g[b>>3])-(a[b>>2]=a[c>>2],a[b+4>>2]=a[c+4>>2],g[b>>3]);var m=k*k+j*j<s?e:f}else{m=f}d=r>>2;c=((m+3<<4)+i|0)>>2;a[d]=a[c];a[d+1]=a[c+1];a[d+2]=a[c+2];a[d+3]=a[c+3];j=(r+16|0)>>2;k=((m+2<<4)+i|0)>>2;a[j]=a[k];a[j+1]=a[k+1];a[j+2]=a[k+2];a[j+3]=a[k+3];e=(r+32|0)>>2;s=((m+1<<4)+i|0)>>2;a[e]=a[s];a[e+1]=a[s+1];a[e+2]=a[s+2];a[e+3]=a[s+3];var l=r+48|0,f=l>>2;a[f]=a[n];a[f+1]=a[n+1];a[f+2]=a[n+2];a[f+3]=a[n+3];a[p>>2]=l;a[p+4>>2]=q;Yg(p,602,r|0,0);i=((m<<4)+i|0)>>2;a[i]=a[f];a[i+1]=a[f+1];a[i+2]=a[f+2];a[i+3]=a[f+3];a[s]=a[e];a[s+1]=a[e+1];a[s+2]=a[e+2];a[s+3]=a[e+3];a[k]=a[j];a[k+1]=a[j+1];a[k+2]=a[j+2];a[k+3]=a[j+3];a[c]=a[d];a[c+1]=a[d+1];a[c+2]=a[d+2];a[c+3]=a[d+3];h=p;return m}function jo(s,i,f,e,n,k,j){var c,d,p,h,q,m,l;d=0!=(k|0);l=0==(j|0);if(d&(l^1)&(e|0)==(f|0)){p=(e<<4)+i|0;var f=p|0,t=(a[b>>2]=a[f>>2],a[b+4>>2]=a[f+4>>2],g[b>>3]),f=(e<<4)+i+8|0;m=(a[b>>2]=a[f>>2],a[b+4>>2]=a[f+4>>2],g[b>>3]);d=e+3|0;c=(d<<4)+i|0;l=(c|0)>>2;f=(a[b>>2]=a[l],a[b+4>>2]=a[l+1],g[b>>3]);q=((d<<4)+i+8|0)>>2;d=(a[b>>2]=a[q],a[b+4>>2]=a[q+1],g[b>>3]);h=$e(s,k);var s=$e(s,j),w=t-f,y=m-d,w=Math.sqrt(w*w+y*y);s+h<w?(y=s,s=h):y=s=w/3;m==d?(t<f?(h=t+s,w=m,s=f-y):(h=t-s,w=m,s=f+y),t=m):m<d?(h=t,w=m+s,s=t,t=d-y):(h=t,w=m-s,s=t,t=d+y);y=e+1|0;m=(y<<4)+i|0;var A=m|0;g[b>>3]=h;a[A>>2]=a[b>>2];a[A+4>>2]=a[b+4>>2];h=(y<<4)+i+8|0;g[b>>3]=w;a[h>>2]=a[b>>2];a[h+4>>2]=a[b+4>>2];p>>=2;m>>=2;a[p]=a[m];a[p+1]=a[m+1];a[p+2]=a[m+2];a[p+3]=a[m+3];g[b>>3]=s;a[l]=a[b>>2];a[l+1]=a[b+4>>2];g[b>>3]=t;a[q]=a[b>>2];a[q+1]=a[b+4>>2];i=((e+2<<4)+i|0)>>2;e=c>>2;a[i]=a[e];a[i+1]=a[e+1];a[i+2]=a[e+2];a[i+3]=a[e+3];a[n+12>>2]=j;i=n+32|0;j=n+40|0;a[n+8>>2]=k;g[b>>3]=f;a[i>>2]=a[b>>2];a[i+4>>2]=a[b+4>>2];g[b>>3]=d;a[j>>2]=a[b>>2];a[j+4>>2]=a[b+4>>2]}else{if(!l){w=$e(s,j);c=(e<<4)+i|0;t=(a[b>>2]=a[c>>2],a[b+4>>2]=a[c+4>>2],g[b>>3]);c=(e<<4)+i+8|0;m=(a[b>>2]=a[c>>2],a[b+4>>2]=a[c+4>>2],g[b>>3]);l=e+3|0;p=(l<<4)+i|0;q=(p|0)>>2;c=(a[b>>2]=a[q],a[b+4>>2]=a[q+1],g[b>>3]);h=((l<<4)+i+8|0)>>2;l=(a[b>>2]=a[h],a[b+4>>2]=a[h+1],g[b>>3]);y=t-c;A=m-l;y=.9*Math.sqrt(y*y+A*A);w=w<y?w:y;m==l?(y=t<c?c-w:c+w,A=m):m<l?(y=t,A=l-w):(y=t,A=l+w);var C=e+1|0,F=(C<<4)+i|0;g[b>>3]=t;a[F>>2]=a[b>>2];a[F+4>>2]=a[b+4>>2];t=(C<<4)+i+8|0;g[b>>3]=m;a[t>>2]=a[b>>2];a[t+4>>2]=a[b+4>>2];g[b>>3]=y;a[q]=a[b>>2];a[q+1]=a[b+4>>2];g[b>>3]=A;a[h]=a[b>>2];a[h+1]=a[b+4>>2];e=((e+2<<4)+i|0)>>2;p>>=2;a[e]=a[p];a[e+1]=a[p+1];a[e+2]=a[p+2];a[e+3]=a[p+3];a[n+12>>2]=j;j=n+32|0;g[b>>3]=c;a[j>>2]=a[b>>2];a[j+4>>2]=a[b+4>>2];j=n+40|0;g[b>>3]=l;a[j>>2]=a[b>>2];a[j+4>>2]=a[b+4>>2];c=w}d&&(p=$e(s,k),d=(f<<4)+i|0,j=d|0,j=(a[b>>2]=a[j>>2],a[b+4>>2]=a[j+4>>2],g[b>>3]),e=(f<<4)+i+8|0,e=(a[b>>2]=a[e>>2],a[b+4>>2]=a[e+4>>2],g[b>>3]),l=f+3|0,s=(l<<4)+i|0,s=(a[b>>2]=a[s>>2],a[b+4>>2]=a[s+4>>2],g[b>>3]),l=(l<<4)+i+8|0,l=(a[b>>2]=a[l>>2],a[b+4>>2]=a[l+4>>2],g[b>>3]),q=j-s,t=e-l,q=.9*Math.sqrt(q*q+t*t),e==l?(p=j<s?j+(p<q?p:q):j-c,q=e):e<l?(p=j,q=e+c):(p=j,q=e-c),t=f+1|0,c=(t<<4)+i|0,m=c|0,g[b>>3]=p,a[m>>2]=a[b>>2],a[m+4>>2]=a[b+4>>2],p=(t<<4)+i+8|0,g[b>>3]=q,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],d>>=2,c>>=2,a[d]=a[c],a[d+1]=a[c+1],a[d+2]=a[c+2],a[d+3]=a[c+3],f=f+2|0,d=(f<<4)+i|0,g[b>>3]=s,a[d>>2]=a[b>>2],a[d+4>>2]=a[b+4>>2],i=(f<<4)+i+8|0,g[b>>3]=l,a[i>>2]=a[b>>2],a[i+4>>2]=a[b+4>>2],a[n+8>>2]=k,k=n+16|0,g[b>>3]=j,a[k>>2]=a[b>>2],a[k+4>>2]=a[b+4>>2],n=n+24|0,g[b>>3]=e,a[n>>2]=a[b>>2],a[n+4>>2]=a[b+4>>2])}}function yf(s,i,f,e,n){var e=e-i,n=n-f,k=10/(Math.sqrt(e*e+n*n)+1e-4),j=(e+(0<=e?1e-4:-1e-4))*k,c=(n+(0<=n?1e-4:-1e-4))*k,k=.5*j,d=.5*c,n=i-d,e=f-k,i=d+i,k=k+f,p=n+j,d=e+c,h=i+j,c=k+c,f=p>h?p:h,f=i>f?i:f,j=d>c?d:c,j=k>j?k:j,p=p<h?p:h,i=i<p?i:p,d=d<c?d:c,k=k<d?k:d,d=s|0;g[b>>3]=n<i?n:i;a[d>>2]=a[b>>2];a[d+4>>2]=a[b+4>>2];i=s+8|0;g[b>>3]=e<k?e:k;a[i>>2]=a[b>>2];a[i+4>>2]=a[b+4>>2];i=s+16|0;g[b>>3]=n>f?n:f;a[i>>2]=a[b>>2];a[i+4>>2]=a[b+4>>2];s=s+24|0;g[b>>3]=e>j?e:j;a[s>>2]=a[b>>2];a[s+4>>2]=a[b+4>>2]}function zf(s,i,f,e,n,k,j,c,d){var p,r=0,q=h;h=h+16|0;var m=s+16|0;p=(a[m>>2]+12|0)>>2;var l=a[p];a[p]=i;Od(a[m>>2],a[s+60>>2],a[a[s>>2]+296>>2]);for(var i=n-f,n=k-e,m=10/(Math.sqrt(i*i+n*n)+1e-4),k=(i+(0<=i?1e-4:-1e-4))*m,i=(n+(0<=n?1e-4:-1e-4))*m,n=q|0,m=q+8|0,t=0,w=f,y=e;;){if(4<=(t|0)){r=638;break}var A=d>>(t<<3)&255;if(0==(A|0)){r=637;break}for(var e=q,f=s,C=k,F=i,N=j,Fa=c,Xc=0,ka=A&7,Dd=5391616;;){var z=a[Dd>>2];if(0==(z|0)){var D=w,L=y;break}if((ka|0)==(z|0)){Xc=642;break}else{Dd=Dd+16|0}}642==Xc&&(D=Dd+4|0,D=(a[b>>2]=a[D>>2],a[b+4>>2]=a[D+4>>2],g[b>>3])*N,L=D*C,F*=D,B[a[Dd+12>>2]](f,w,y,L,F,N,Fa,A),D=L+w,L=F+y);f=e|0;g[b>>3]=D;a[f>>2]=a[b>>2];a[f+4>>2]=a[b+4>>2];e=e+8|0;g[b>>3]=L;a[e>>2]=a[b>>2];a[e+4>>2]=a[b+4>>2];t=t+1|0;w=(a[b>>2]=a[n>>2],a[b+4>>2]=a[n+4>>2],g[b>>3]);y=(a[b>>2]=a[m>>2],a[b+4>>2]=a[m+4>>2],g[b>>3])}637==r?(a[p]=l,h=q):638==r&&(a[p]=l,h=q)}function ko(s,i,f,e,n,k,j,c){var d,p,k=h;h=h+80|0;var j=4<j?.0875*j:.35,r=j*-n,j=j*e,e=i+e,n=f+n;d=k+64|0;p=(d|0)>>2;0==(c&16|0)?(g[b>>3]=e,a[p]=a[b>>2],a[p+1]=a[b+4>>2],p=k+72|0,g[b>>3]=n,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=k>>2,d>>=2,a[p]=a[d],a[p+1]=a[d+1],a[p+2]=a[d+2],a[p+3]=a[d+3],d=k+16|0,g[b>>3]=e-r,a[d>>2]=a[b>>2],a[d+4>>2]=a[b+4>>2],d=k+24|0,g[b>>3]=n-j,a[d>>2]=a[b>>2],a[d+4>>2]=a[b+4>>2],d=k+32|0,g[b>>3]=i,a[d>>2]=a[b>>2],a[d+4>>2]=a[b+4>>2],i=k+40|0,g[b>>3]=f,a[i>>2]=a[b>>2],a[i+4>>2]=a[b+4>>2],f=k+48|0,g[b>>3]=e+r,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=k+56|0,g[b>>3]=n+j,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2]):(g[b>>3]=i,a[p]=a[b>>2],a[p+1]=a[b+4>>2],p=k+72|0,g[b>>3]=f,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=k>>2,d>>=2,a[p]=a[d],a[p+1]=a[d+1],a[p+2]=a[d+2],a[p+3]=a[d+3],d=k+16|0,g[b>>3]=i-r,a[d>>2]=a[b>>2],a[d+4>>2]=a[b+4>>2],d=k+24|0,g[b>>3]=f-j,a[d>>2]=a[b>>2],a[d+4>>2]=a[b+4>>2],d=k+32|0,g[b>>3]=e,a[d>>2]=a[b>>2],a[d+4>>2]=a[b+4>>2],e=k+40|0,g[b>>3]=n,a[e>>2]=a[b>>2],a[e+4>>2]=a[b+4>>2],n=k+48|0,g[b>>3]=r+i,a[n>>2]=a[b>>2],a[n+4>>2]=a[b+4>>2],i=k+56|0,g[b>>3]=j+f,a[i>>2]=a[b>>2],a[i+4>>2]=a[b+4>>2]);0!=(c&32|0)?Hc(s,k|0,3,(c>>>3&1^1)&255):0==(c&64|0)?Hc(s,k+16|0,3,(c>>>3&1^1)&255):Hc(s,k+32|0,3,(c>>>3&1^1)&255);h=k}function lo(s,i,f,e,n,k,j,c){var d,p,r,q=h;h=h+144|0;var m=4*k,l=c&16,m=m>=j|0==(l|0)?.45:.45*(j/m);if(1<j){if(0==(l|0)){var t=k=0}else{k=.05*(j-1)/k,t=l}}else{k=0,t=l}j=-n;l=m*j;m*=e;j*=k;k*=e;d=i+e;p=f+n;var w=.5*e+i,e=.5*n+f,n=q|0,y=q+128|0;r=(y|0)>>2;0==(t|0)?(g[b>>3]=d,a[r]=a[b>>2],a[r+1]=a[b+4>>2],d=q+136|0,g[b>>3]=p,a[d>>2]=a[b>>2],a[d+4>>2]=a[b+4>>2],p=q>>2,d=y>>2,a[p]=a[d],a[p+1]=a[d+1],a[p+2]=a[d+2],a[p+3]=a[d+3],p=q+16|0,g[b>>3]=i-l,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=q+24|0,g[b>>3]=f-m,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=q+32|0,g[b>>3]=w-j,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=q+40|0,g[b>>3]=e-k,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=q+48|0,g[b>>3]=i,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=q+56|0,g[b>>3]=f,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=q+64|0,g[b>>3]=i,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=q+72|0,g[b>>3]=f,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=q+80|0,g[b>>3]=i,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=q+88|0,g[b>>3]=f,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],p=q+96|0,g[b>>3]=w+j,a[p>>2]=a[b>>2],a[p+4>>2]=a[b+4>>2],j=q+104|0,g[b>>3]=e+k,a[j>>2]=a[b>>2],a[j+4>>2]=a[b+4>>2],k=q+112|0,g[b>>3]=l+i,a[k>>2]=a[b>>2],a[k+4>>2]=a[b+4>>2],l=q+120|0,g[b>>3]=m+f):(g[b>>3]=i,a[r]=a[b>>2],a[r+1]=a[b+4>>2],i=q+136|0,g[b>>3]=f,a[i>>2]=a[b>>2],a[i+4>>2]=a[b+4>>2],f=q>>2,i=y>>2,a[f]=a[i],a[f+1]=a[i+1],a[f+2]=a[i+2],a[f+3]=a[i+3],f=q+16|0,g[b>>3]=d-l,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=q+24|0,g[b>>3]=p-m,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=q+32|0,g[b>>3]=w-j,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=q+40|0,g[b>>3]=e-k,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=q+48|0,g[b>>3]=d-j,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=q+56|0,g[b>>3]=p-k,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=q+64|0,g[b>>3]=d,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=q+72|0,g[b>>3]=p,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=q+80|0,g[b>>3]=d+j,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=q+88|0,g[b>>3]=p+k,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],f=q+96|0,g[b>>3]=w+j,a[f>>2]=a[b>>2],a[f+4>>2]=a[b+4>>2],j=q+104|0,g[b>>3]=e+k,a[j>>2]=a[b>>2],a[j+4>>2]=a[b+4>>2],k=q+112|0,g[b>>3]=d+l,a[k>>2]=a[b>>2],a[k+4>>2]=a[b+4>>2],l=q+120|0,g[b>>3]=p+m);a[l>>2]=a[b>>2];a[l+4>>2]=a[b+4>>2];0!=(c&32|0)?Hc(s,n,6,1):0==(c&64|0)?Hc(s,n,9,1):Hc(s,q+48|0,6,1);h=q}function mo(s,i,f,e,n,k,j,c){var d,p,r,q,m,l=h;h=h+64|0;var t=i+e,w=f+n,y=.2*e+i,A=.2*n+f,C=.6*e+i,F=.6*n+f,N=l|0;m=(l|0)>>2;g[b>>3]=y-n;a[m]=a[b>>2];a[m+1]=a[b+4>>2];q=(l+8|0)>>2;g[b>>3]=A+e;a[q]=a[b>>2];a[q+1]=a[b+4>>2];r=(l+16|0)>>2;g[b>>3]=y+n;a[r]=a[b>>2];a[r+1]=a[b+4>>2];p=(l+24|0)>>2;g[b>>3]=A-e;a[p]=a[b>>2];a[p+1]=a[b+4>>2];d=(l+32|0)>>2;g[b>>3]=C+n;a[d]=a[b>>2];a[d+1]=a[b+4>>2];j=(l+40|0)>>2;g[b>>3]=F-e;a[j]=a[b>>2];a[j+1]=a[b+4>>2];k=(l+48|0)>>2;g[b>>3]=C-n;a[k]=a[b>>2];a[k+1]=a[b+4>>2];n=(l+56|0)>>2;g[b>>3]=F+e;a[n]=a[b>>2];a[n+1]=a[b+4>>2];0==(c&32|0)?0!=(c&64|0)&&(g[b>>3]=y,a[r]=a[b>>2],a[r+1]=a[b+4>>2],g[b>>3]=A,a[p]=a[b>>2],a[p+1]=a[b+4>>2],g[b>>3]=C,a[d]=a[b>>2],a[d+1]=a[b+4>>2],g[b>>3]=F,a[j]=a[b>>2],a[j+1]=a[b+4>>2]):(g[b>>3]=y,a[m]=a[b>>2],a[m+1]=a[b+4>>2],g[b>>3]=A,a[q]=a[b>>2],a[q+1]=a[b+4>>2],g[b>>3]=C,a[k]=a[b>>2],a[k+1]=a[b+4>>2],g[b>>3]=F,a[n]=a[b>>2],a[n+1]=a[b+4>>2]);Hc(s,N,4,1);g[b>>3]=i;a[m]=a[b>>2];a[m+1]=a[b+4>>2];g[b>>3]=f;a[q]=a[b>>2];a[q+1]
gitextract_xkbrie79/
├── .gitignore
├── .idea/
│ ├── .name
│ ├── 12_object_playground.iml
│ ├── dictionaries/
│ │ └── jshore.xml
│ ├── encodings.xml
│ ├── jsLibraryMappings.xml
│ ├── libraries/
│ │ └── sass_stdlib.xml
│ ├── modules.xml
│ ├── scopes/
│ │ └── scope_settings.xml
│ └── vcs.xml
├── Jakefile.js
├── LICENSE.TXT
├── build/
│ ├── config/
│ │ └── karma.conf.js
│ └── util/
│ ├── build_command.js
│ ├── karma_runner.js
│ ├── lint_runner.js
│ ├── nodeunit_runner.js
│ ├── sh.js
│ └── version_checker.js
├── convert_sample.pl
├── deploy.bat
├── deploy.jakefile
├── deploy.sh
├── integrate.bat
├── integrate.jakefile
├── integrate.sh
├── jake.bat
├── jake.sh
├── package.json
├── readme.md
└── src/
├── _object_graph_test.js
├── _object_node_test.js
├── _ui_test.js
├── _user_code_test.js
├── _viz_visualizer_test.js
├── index.html
├── object_graph.js
├── object_node.js
├── site.css
├── ui.js
├── user_code.js
├── viz/
│ ├── .gitattributes
│ ├── .gitignore
│ ├── COPYING
│ ├── Makefile
│ ├── README.txt
│ ├── config.h
│ ├── example.html
│ ├── post.js
│ ├── pre.js
│ ├── viz.c
│ └── viz.js
└── viz_visualizer.js
SYMBOL INDEX (1093 symbols across 14 files)
FILE: Jakefile.js
function lint (line 23) | function lint() { return require("./build/util/lint_runner.js"); }
function karma (line 24) | function karma() { return require("./build/util/karma_runner.js"); }
function version (line 25) | function version() { return require("./build/util/version_checker.js"); }
function checkNodeVersion (line 60) | function checkNodeVersion() {
function nodeFilesToLint (line 65) | function nodeFilesToLint() {
function browserFilesToLint (line 72) | function browserFilesToLint() {
function sharedLintOptions (line 78) | function sharedLintOptions() {
function nodeLintOptions (line 97) | function nodeLintOptions() {
function browserLintOptions (line 103) | function browserLintOptions() {
function browserLintGlobals (line 109) | function browserLintGlobals() {
FILE: build/util/karma_runner.js
function checkRequiredBrowsers (line 46) | function checkRequiredBrowsers(requiredBrowsers, stdout) {
function lookForBrowser (line 54) | function lookForBrowser(browser, output) {
function CapturedStdout (line 60) | function CapturedStdout() {
FILE: build/util/sh.js
function serializedSh (line 9) | function serializedSh(command) {
FILE: build/util/version_checker.js
function failWithQualifier (line 6) | function failWithQualifier(qualifier) {
function parseNodeVersion (line 26) | function parseNodeVersion(description, versionString, fail) {
FILE: src/_object_graph_test.js
function newGraph (line 6) | function newGraph(name, object, options) {
function nodes (line 10) | function nodes(object, options) {
function edges (line 17) | function edges(object) {
function ignoredFunction (line 140) | function ignoredFunction() {}
function notIgnored (line 149) | function notIgnored() {}
function notIgnored (line 158) | function notIgnored() {}
function notIgnored (line 167) | function notIgnored() {}
function MyClass (line 176) | function MyClass() {}
function MyClass (line 183) | function MyClass() {}
function MyClass (line 189) | function MyClass() {}
function MyClass (line 203) | function MyClass() {}
function MyClass (line 218) | function MyClass() {}
function MyClass (line 226) | function MyClass() {}
function MyClass (line 233) | function MyClass() {}
function aFunction (line 240) | function aFunction() {}
FILE: src/_object_node_test.js
function newNode (line 8) | function newNode(name, object) {
function TheConstructor (line 48) | function TheConstructor() {}
function properties (line 107) | function properties(object) {
function conversionOf (line 112) | function conversionOf(variable) {
function MyClass (line 149) | function MyClass() {}
function prototype (line 163) | function prototype(object) {
function conversionOf (line 168) | function conversionOf(object) {
function MyClass (line 177) | function MyClass() {}
function subNodes (line 187) | function subNodes(object) {
function MyClass (line 197) | function MyClass() {}
FILE: src/_ui_test.js
function initialize (line 43) | function initialize() {
FILE: src/_user_code_test.js
function check (line 30) | function check(sample) {
FILE: src/object_graph.js
function traverse (line 32) | function traverse(self, node) {
function removePartialEdges (line 46) | function removePartialEdges(self) {
function hasNode (line 69) | function hasNode(self, node) {
function dedupe (line 73) | function dedupe(self, node) {
function findNode (line 77) | function findNode(self, node) {
function addNode (line 85) | function addNode(self, node) {
function addEdge (line 89) | function addEdge(self, from, to, fromField) {
function isBuiltin (line 97) | function isBuiltin(node) {
function isOrdinaryFunction (line 110) | function isOrdinaryFunction(node, propertyName) {
FILE: src/object_node.js
function objectName (line 74) | function objectName(fallbackName, object) {
function objectType (line 81) | function objectType(object) {
function functionName (line 87) | function functionName(func) {
function describeField (line 95) | function describeField(value) {
function ieFunctionNameWorkaround (line 108) | function ieFunctionNameWorkaround(constructor) {
function forEach (line 115) | function forEach(object, fn) {
function getProperties (line 122) | function getProperties(object) {
function hasOwnProperty (line 135) | function hasOwnProperty(object, propertyName) {
FILE: src/ui.js
function populateSampleButtons (line 43) | function populateSampleButtons() {
function handleEvaluateButton (line 60) | function handleEvaluateButton() {
function showInterface (line 66) | function showInterface() {
function showError (line 72) | function showError() {
function replaceUserCode (line 78) | function replaceUserCode(sample) {
function renderUserCode (line 83) | function renderUserCode() {
function inspect (line 98) | function inspect(string) {
function failFastIfSampleNameMustBeEscaped (line 102) | function failFastIfSampleNameMustBeEscaped(name) {
FILE: src/viz/viz.c
function vizRenderFromString (line 7) | __attribute__((used)) void vizRenderFromString(char *string, char *forma...
FILE: src/viz/viz.js
function Tb (line 1) | function Tb(Ig){throw Ig}
function Jg (line 1) | function Jg(){return(function(){})}
function Zh (line 1) | function Zh(Ig){return(function(){return Ig})}
function Gn (line 5) | function Gn(a){eval.call(Mc,a)}
function Kg (line 5) | function Kg(a){I.print(a+":\n"+Error().stack);Tb("Assertion: "+a)}
function ld (line 5) | function ld(a,b){a||Kg("Assertion failed: "+b)}
function Hn (line 5) | function Hn(a){try{var b=eval("_"+a)}catch(f){try{b=Gw.Module["_"+a]}cat...
function In (line 5) | function In(a,b,f,e){function n(a,b){if("string"==b){if(a===Mc||a===ic||...
function Lg (line 5) | function Lg(s,i,f){f=f||"i8";"*"===f.charAt(f.length-1)&&(f="i32");switc...
function Qf (line 5) | function Qf(s,i){i=i||"i8";"*"===i.charAt(i.length-1)&&(i="i32");switch(...
function c (line 5) | function c(a,b,f,e){var n,k;"number"===typeof a?(n=vc,k=a):(n=Xd,k=a.len...
function De (line 5) | function De(a,b){for(var f=new pa.U,e="undefined"==typeof b,n="",k=0,j;;...
function $h (line 5) | function $h(a){for(;0<a.length;){var b=a.shift(),f=b.ca;"number"===typeo...
function ee (line 5) | function ee(a,b,f){a=(new pa.U).jb(a);f&&(a.length=f);b||a.push(0);retur...
function Jn (line 5) | function Jn(a,b,f){a=ee(a,f);for(f=0;f<a.length;){m[b+f|0]=a[f],f+=1}}
function Kn (line 5) | function Kn(a,b){for(var f=0;f<a.length;f++){m[b+f|0]=a[f]}}
function Ln (line 5) | function Ln(a,b){return 0<=a?a:32>=b?2*Math.abs(1<<b-1)+a:Math.pow(2,b)+a}
function Mn (line 5) | function Mn(a,b){if(0>=a){return a}var f=32>=b?Math.abs(1<<b-1):Math.pow...
function Aj (line 5) | function Aj(a){rf++;I.monitorRunDependencies&&I.monitorRunDependencies(r...
function ai (line 5) | function ai(a){rf--;I.monitorRunDependencies&&I.monitorRunDependencies(r...
function md (line 5) | function md(a,b,f){for(var e=0;e<f;){var n=E[a+e|0],k=E[b+e|0];if(n==k&&...
function ea (line 5) | function ea(a,b){return md(a,b,Og)}
function ie (line 5) | function ie(a,b,f){for(var a=a|0,b=b|0,f=f|0,e=0,n=0,k=0;(e|0)<(f|0);){n...
function Fc (line 5) | function Fc(b,i,f){b|=0;i|=0;f|=0;if((b&3)==(i&3)){for(;b&3;){if(0==(f|0...
function Wa (line 5) | function Wa(a){for(var a=a|0,b=0,b=a;m[b]|0;){b=b+1|0}return b-a|0}
function fb (line 5) | function fb(b){fb.d||(fb.d=c([0],"i32",Ee));return a[fb.d>>2]=b}
function Hw (line 5) | function Hw(a,b,f){var e=Q.b[a];if(e){if(e.q){if(0>f){return fb(Cb.i),-1...
function Yd (line 5) | function Yd(a,b,f,e){f*=b;if(0==f){return 0}a=Hw(e,a,f);return-1==a?(Q.b...
function On (line 5) | function On(s,i){function f(s){var f;"double"===s?f=(a[b>>2]=a[i+n>>2],a...
function ac (line 5) | function ac(a,b,f){b=On(b,f);f=pa.na();Yd(c(b,"i8",de),1,b.length,a);pa....
function sa (line 5) | function sa(a,b,f,e){Tb("Assertion failed: "+(e?De(e):"unknown condition...
function jb (line 5) | function jb(a){var b=Wa(a),f=Hb(b+1);Fc(f,a,b);m[f+b|0]=0;return f}
function Pn (line 5) | function Pn(b,i,f){i=On(i,f);f=i.length;if(0>b){var b=-b,e=Hb(f+1),b=a[b...
function wb (line 5) | function wb(a,b,f){return Pn(a,b,f)}
function Rf (line 5) | function Rf(){Rf.d||(Rf.d=c([0],"i8",Dj));return Rf.d}
function ef (line 5) | function ef(b,i,f){var b=b|0,i=i|0,f=f|0,e=0,n=0,k=0,j=0,e=b+f|0;if(f|0)...
function Cd (line 5) | function Cd(s,i,f,e){Cd.whiteSpace||(Cd.whiteSpace={},Cd.whiteSpace[32]=...
function Ld (line 5) | function Ld(a,b,f){var e=0;return Cd(b,(function(){return m[a+e++|0]}),(...
function fe (line 5) | function fe(a,b,f){var e,n,k,j;if(0==a&&0==(a=Qf(f,"i8*"))){return 0}a:f...
function sf (line 5) | function sf(a){return a in{32:0,9:0,10:0,11:0,12:0,13:0}}
function We (line 5) | function We(a,b){var f=0;do{m[a+f|0]=m[b+f|0],f++}while(0!=m[b+(f-1)|0])}
function ue (line 5) | function ue(a,b){var f=Wa(a),e=0;do{m[a+f+e|0]=m[b+e|0],e++}while(0!=m[b...
function Dc (line 5) | function Dc(a,b){a--;do{a++;var f=m[a];if(f==b){return a}}while(f);retur...
function Xe (line 5) | function Xe(b,i){for(var f=b;sf(m[b]);){b++}var e=1;45==m[b]?(e=-1,b++):...
function Ye (line 5) | function Ye(b,i){for(var f=b;sf(m[f]);){f++}var e=1;45==m[f]?(e=-1,f++):...
function Jw (line 5) | function Jw(a,b,f,e){var n=Q.b[a];if(!n||n.object.e){return fb(Cb.l),-1}...
function Ej (line 5) | function Ej(a,b,f){var e=Q.b[a];if(e){if(e.p){if(0>f){return fb(Cb.i),-1...
function Sf (line 5) | function Sf(a){if(!Q.b[a]){return-1}var b=Q.b[a];if(b.f||b.error){return...
function Tf (line 5) | function Tf(a,b,f){if(!Q.b[f]){return 0}var e=Q.b[f];if(e.error||e.f){re...
function Qn (line 5) | function Qn(a){var b=a+Wa(a);do{if(58==m[b]){return b}b--}while(b>=a);re...
function Uf (line 5) | function Uf(a,b,f){for(var e=Xd,n,k=0;k<f;k++){n=e?0:m[b+k|0],m[a+k|0]=n...
function Vf (line 5) | function Vf(a,b,f,e,n){for(var k=0,j,G,c;k<f;){if(j=k+f>>>1,c=b+j*e,G=pa...
function je (line 5) | function je(){$h(Fj);Tb("exit(1) called, at "+Error().stack)}
function ne (line 5) | function ne(a){return 65<=a&&90>=a?a-65+97:a}
function ba (line 5) | function ba(){Tb("abort() at "+Error().stack)}
function tf (line 5) | function tf(a){return 97<=a&&122>=a?a-97+65:a}
function Wf (line 5) | function Wf(a,b){return Math.sqrt(a*a+b*b)}
function Kw (line 5) | function Kw(b,i,f){var e=a[f>>2],n=i&3,f=0!=n,n=1!=n,k=Boolean(i&512),j=...
function Qg (line 5) | function Qg(a,b){var f,b=De(b);if("r"==b[0]){f=-1!=b.indexOf("+")?2:0}el...
function Xf (line 5) | function Xf(a){Q.b[a]||fb(Cb.l);Q.b[a]?(Q.b[a].xa&&H(Q.b[a].xa),Q.b[a]=M...
function bi (line 5) | function bi(a,b){var f=0,e;do{f||(e=a,f=b);var n=m[a++|0],k=m[f++|0];if(...
function Sn (line 5) | function Sn(b,i){if(Q.b[b]){var f=ee(Q.b[b].path);f=c(f,"i8",de);f=Q.ba(...
function ff (line 5) | function ff(a,b,f){if(Q.b[a]&&!Q.b[a].object.e){var e=Q.b[a];1===f?b+=e....
function Tn (line 5) | function Tn(a,b,f,e){f*=b;if(0==f){return 0}a=Ej(e,a,f);e=Q.b[e];if(-1==...
function ci (line 5) | function ci(b){var i,f;ci.Z?(f=a[Un>>2],i=a[f>>2]):(ci.Z=vc,nd.USER="roo...
function Rg (line 5) | function Rg(a){if(0===a){return 0}a=De(a);if(!nd.hasOwnProperty(a)){retu...
function Yf (line 5) | function Yf(a){Yf.buffer||(Yf.buffer=Hb(256));var b=Yf.buffer;if(a in Gj...
function Vn (line 5) | function Vn(a){return Number(Q.b[a]&&Q.b[a].error)}
function Wn (line 5) | function Wn(a){return 48<=a&&57>=a||97<=a&&122>=a||65<=a&&90>=a}
function Zf (line 5) | function Zf(a){return 97<=a&&122>=a||65<=a&&90>=a}
function uf (line 5) | function uf(a,b,f){if(0!=b){for(var e=[],n=0;n<b;n++){e.push(n)}e.sort((...
function Mw (line 5) | function Mw(){switch(8){case 8:return Nw;case 54:;case 56:;case 21:;case...
function ke (line 5) | function ke(a){var b=ke;b.Z||(ad=ad+4095>>12<<12,b.Z=vc,ke.Fb=ad);b=ad;0...
function Sg (line 5) | function Sg(a,b){var f,a=a|0,b=b|0;f=16;if((b|0)<(a|0)&(a|0)<(b+f|0)){b=...
function vf (line 5) | function vf(b){var i;i=(b+8|0)>>2;var b=a[i]>>2,f=a[b];if(0!=(f&4096|0))...
function Xn (line 5) | function Xn(b,i){var f=h;if(0==(a[1347994]|0)){m[5392e3]=1;m[5391984]=1;...
function dc (line 5) | function dc(b){var i=b>>2;if(0!=(b|0)&&0>=(a[i+6]|0)){var f=a[i+1],e=f+3...
function Tg (line 5) | function Tg(b,i){var f,e,n;n=(b+4|0)>>2;var k=a[n];if(0==(k|0)){a[n]=i;v...
function bo (line 5) | function bo(b,i,f){var e,n,k,j,G,c;e=0;j=(b+8|0)>>2;0!=(a[a[j]>>2]&4096|...
function pc (line 5) | function pc(b,i){var f,e,n,k,j,G=0,c=h;h=h+4|0;j=c>>2;if(0==(b|0)|0==(i|...
function Lb (line 5) | function Lb(b){var i,f;f=(b+8|0)>>2;i=a[f];0!=(a[i>>2]&4096|0)&&(cg(b),i...
function Mj (line 5) | function Mj(b){return 0==(b|0)?0:Mj(a[b+4>>2])+Mj(a[b>>2])+1|0}
function ao (line 5) | function ao(a,b){if(1>(b|0)){var f=m[a];a:do{if(0==f<<24>>24){var e=a,n=...
function co (line 5) | function co(b,i,f){var e,n,k,j,G,c,d,g,q,m,l,t,w,y,A,C,F=0,N=h;h=h+128|0...
function cg (line 5) | function cg(b){var i;i=(b+8|0)>>2;var b=a[i],f=b|0,e=a[f>>2];if(0!=(e&40...
function gi (line 5) | function gi(b,i){for(var f=b|0,e=b+32|0,n=B[a[f>>2]](b,0,128);0!=(n|0);)...
function Xg (line 5) | function Xg(b,i,f){var e,n=i>>2,k=h;h=h+8|0;var j=k+4;a[n]=0;var G=b+16|...
function io (line 5) | function io(b,i){var f=h;h=h+4|0;a[i>>2]=0;if(0!=m[b]<<24>>24){for(var e...
function $e (line 5) | function $e(s,i){for(var f=0,e=i&7,n=5391616;;){if(0==(a[n+12>>2]|0)){va...
function ii (line 5) | function ii(s,i,f,e,n,k){var j,c,d,p,r=h;h=h+80|0;j=r+8;var q=r+72,s=$e(...
function ji (line 5) | function ji(s,i,f,e,n,k){var j,c,d,p=h;h=h+80|0;var r=p+8,q=p+72,s=$e(s,...
function jo (line 5) | function jo(s,i,f,e,n,k,j){var c,d,p,h,q,m,l;d=0!=(k|0);l=0==(j|0);if(d&...
function yf (line 5) | function yf(s,i,f,e,n){var e=e-i,n=n-f,k=10/(Math.sqrt(e*e+n*n)+1e-4),j=...
function zf (line 5) | function zf(s,i,f,e,n,k,j,c,d){var p,r=0,q=h;h=h+16|0;var m=s+16|0;p=(a[...
function ko (line 5) | function ko(s,i,f,e,n,k,j,c){var d,p,k=h;h=h+80|0;var j=4<j?.0875*j:.35,...
function lo (line 5) | function lo(s,i,f,e,n,k,j,c){var d,p,r,q=h;h=h+144|0;var m=4*k,l=c&16,m=...
function mo (line 5) | function mo(s,i,f,e,n,k,j,c){var d,p,r,q,m,l=h;h=h+64|0;var t=i+e,w=f+n,...
function no (line 5) | function no(s,i,f,e,n,k,j,c){var d,p,r,q,m,l,t,k=h;h=h+64|0;d=-.4*n;var ...
function oo (line 5) | function oo(s,i,f,e,n,k,j,d){k=h;h=h+80|0;var c=-n/3,p=e/3,r=.5*e+i,q=.5...
function Nj (line 5) | function Nj(b,i,f){for(var e=0;;){var n=a[i>>2];if(0==(n|0)){var k=b,e=7...
function Zg (line 5) | function Zg(s){var i,f=h,e=Z(244);i=e>>2;0==(e|0)&&W(1,5333316,(l=h,h=h+...
function fg (line 5) | function fg(b){var i=b+16|0,f=a[i>>2],b=f>>2;0==(f|0)&&sa(5386900,110,53...
function Oj (line 5) | function Oj(b,i,f,e,n,k,j,d){var c=b>>2;0==(i&32768|0)|0==(f|0)||(a[c+33...
function Pj (line 5) | function Pj(b){var i=a[b+192>>2];-1<(i|0)?(i|0)<(a[b+160>>2]|0)?(i=a[b+1...
function ki (line 5) | function ki(b,i,f){var e=h;h=h+32|0;var n=Y(i,5387424);if(0!=(n|0)&&0!=m...
function li (line 5) | function li(b,i){var f,e,n,k,j=h;k=i>>2;i=h;h=h+32|0;a[i>>2]=a[k];a[i+4>...
function $g (line 5) | function $g(s,i){var f,e,n,k,j=h;h=h+144|0;n=j+64;e=j+128;k=i|0;var d=(a...
function po (line 5) | function po(s){var i=s|0,i=(a[b>>2]=a[i>>2],a[b+4>>2]=a[i+4>>2],g[b>>3])...
function Qj (line 5) | function Qj(s,i){var f,e=s>>2;f=a[e+37];var n=s+348|0,k=(a[b>>2]=a[n>>2]...
function ro (line 5) | function ro(b,i){Ub(b,5338440);var f=i|0,e=Y(f,5331932);0!=(e|0)&&0!=m[e...
function so (line 5) | function so(b,i){var f,e,n,k=a[b+16>>2];n=k>>2;var j=a[b+148>>2],d=Y(i|0...
function to (line 5) | function to(b){var i,f=b>>2,e=h;h=h+16|0;var n=e+8;i=b+192|0;var k=i|0,j...
function bh (line 5) | function bh(s,i,f){var e,n,k,j,d,c=h;h=h+68|0;d=c>>2;var p=c+4,r=i+208|0...
function Pw (line 5) | function Pw(b,i){var f=0;if(2>(a[b+152>>2]|0)){var e;return 1}var n=i|0,...
function Cf (line 5) | function Cf(b,i){var f=a[b>>2],e=i+24|0,n;if(n=0!=(a[e>>2]|0)){if(n=0!=z...
function hg (line 5) | function hg(b,i){var f,e,n=0,k=h;e=(b+252|0)>>2;f=h;h=h+32|0;a[f>>2]=a[e...
function Bf (line 5) | function Bf(b){var i,f,e,n=0,k=h;h=h+148|0;var j=k+128,d=k+132;e=d>>2;m[...
function Oe (line 5) | function Oe(b){var i=a[1314563];0!=(b|0)?(a[1314563]=i+1|0,0==(i|0)&&(a[...
function Jj (line 5) | function Jj(s,i){var f,e,n,k,j=0,d=h;k=(i+44|0)>>2;if(0==(a[k]|0)){retur...
function Go (line 5) | function Go(s,i){var f,e,n,k,j,d,c=s>>2,p=h;h=h+16|0;j=p>>2;n=p+8;e=n>>2...
function ch (line 5) | function ch(s,i,f){var e=s|0;g[b>>3]=f;a[e>>2]=a[b>>2];a[e+4>>2]=a[b+4>>...
function ni (line 5) | function ni(b,i,f){f=f<<24>>24;76==(f|0)?(i=1,f=0):82==(f|0)?(a[i+168>>2...
function oi (line 5) | function oi(b,i,f){a[b>>2]=f;a[b+4>>2]=i}
function Jo (line 5) | function Jo(s,i){var f,e,n,k,j,d=h;h=h+40|0;j=d>>2;var c=d+8;k=c>>2;var ...
function Ko (line 5) | function Ko(s,i){var f,e,n,k,j,d,c,p=s>>2,r=0,q=h;h=h+128|0;var u=q+16,v...
function Ho (line 5) | function Ho(b,i,f){var e=Y(i|0,5345924),i=(b+268|0)>>2;a[i]=0==(e|0)?534...
function Eo (line 5) | function Eo(a){return 40==(a|0)|41==(a|0)|44==(a|0)|0==(a|0)?1:0}
function Fo (line 5) | function Fo(s){var i,f,e,n,k,j,d,c=h;h=h+128|0;var p=c+32,r=c+64,q=c+96;...
function Wj (line 5) | function Wj(s,i){var f=h,e=i,i=h;h=h+48|0;for(var e=e>>2,n=i>>2,k=e+12;e...
function Bo (line 5) | function Bo(s,i,f){var e,n,k,j=i>>2,d=s>>2,c=0,p=h;h=h+156|0;k=p>>2;var ...
function Co (line 5) | function Co(s,i,f){var e,n,k,j,c,d,p,r,q,u,l,t,w,y,A,C,F=0,N=h;h=h+64|0;...
function Do (line 5) | function Do(s){var i,f,e,n;n=0;var k=a[s+16>>2];i=k>>2;var j=a[i+2];e=k+...
function No (line 5) | function No(b,i,f,e,n,k){var j=a[b+16>>2],e=0==e<<24>>24?a[j+148>>2]:n;0...
function jg (line 5) | function jg(b,i,f,e,n,k,j,c,d){var g=h,r=a[b+148>>2];if(0!=(i|0)){if(0==...
function Qo (line 5) | function Qo(s,i,f){var e=s|0;g[b>>3]=i;a[e>>2]=a[b>>2];a[e+4>>2]=a[b+4>>...
function Yj (line 5) | function Yj(s,i){var f,e,n,k,j;f=a[s+16>>2];j=f>>2;var c=a[s+148>>2];if(...
function Po (line 5) | function Po(s,i,f){var e,n,k,j,c,d;c=0;var p=h;h=h+96|0;k=p+48;n=p+64;e=...
function Oo (line 5) | function Oo(s,i,f){var e,n=a[s+16>>2];e=n>>2;var k=a[s+148>>2];if(0!=(k&...
function Mo (line 5) | function Mo(s,i,f,e,n,k,j){var c=h;h=h+196|0;var d=c+48,p=c+96,r=c+144,q...
function pi (line 5) | function pi(b,i){for(var f=1,e=b;;){var n=m[e];if(0==n<<24>>24){break}el...
function Xj (line 5) | function Xj(s,i,f,e,n){i-=e;n=f-n;f=2/Math.sqrt(i*i+n*n+1e-4);e=s|0;g[b>...
function So (line 5) | function So(b,i,f){var e,n=0,k=h,j=Z(8);e=(i<<3)+8|0;Z(e);var c=jb(b);a[...
function Zj (line 5) | function Zj(s,i,f,e){var n,k,j,c,d=h;h=h+32|0;var p=d+16,r=a[s+4>>2],q=r...
function To (line 5) | function To(b){H(a[b>>2]);H(a[b+4>>2]);H(b)}
function Df (line 5) | function Df(s,i){var f,e=h;f=s>>2;s=h;h=h+32|0;a[s>>2]=a[f];a[s+4>>2]=a[...
function Lo (line 5) | function Lo(s,i,f,e,n){var k,j,c,d,p,r,q,m,l=h;h=h+1664|0;var t=l+64,w=l...
function $j (line 5) | function $j(s,i){var f,e,n=h;h=h+144|0;if(0==(po(s)|0)){return f=n|0,e=n...
function Uo (line 5) | function Uo(b,i,f,e,n,k){var j,c=e<<1;j=a[f>>2];if(0<(j|0)){for(var d=a[...
function ig (line 5) | function ig(b,i){var f,e,n=h;h=h+144|0;f=n+128;var k=a[b>>2];Ob(f,128,n|...
function ak (line 5) | function ak(b,i,f){var e=0,n=a[b+124>>2],k=m[i];if(97==k<<24>>24&&0==(ea...
function zo (line 5) | function zo(b,i,f){a:do{if(2>(a[b+152>>2]|0)){var e=1}else{var n=qc(f|0,...
function Ao (line 5) | function Ao(s,i){var f,e,n,k,j,c,d,p,h=i>>2,q=0,u=a[s+148>>2],l=Zg(s);p=...
function Qw (line 5) | function Qw(s){if(4!=(a[s+8>>2]|0)){return 0}var i=s+12|0,i=(a[b>>2]=a[i...
function Rj (line 5) | function Rj(b,i,f){var e=0,n=h;h=h+144|0;var k=n+128,j=Y(f,5362012),c=Y(...
function wo (line 5) | function wo(s){var i,f,e=s>>2,n=h;h=h+16|0;var k=n+8,j=a[e+48],c=a[e+49]...
function Tj (line 5) | function Tj(b,i,f){var e,n=a[b>>2]+28|0;a[n>>2]=a[n>>2]+1|0;(n=0!=(f&4|0...
function qi (line 5) | function qi(a){return 0==(a|0)?0:0==m[a]<<24>>24?0:a}
function fh (line 5) | function fh(b,i){var f;f=(b+12|0)>>2;var e=a[f];a[f]=e+4|0;a[e>>2]=i;a[f...
function gh (line 5) | function gh(b){var i;i=(b+8|0)>>2;var f=a[i];if((f|0)==(a[b+12>>2]|0)){r...
function Qb (line 5) | function Qb(b){var i=0,f=b+224|0,e=a[f>>2];if((e|0)!=(b|0)&0!=(e|0)){b=f...
function Wo (line 5) | function Wo(b){a[b+220>>2]=1;a[b+224>>2]=0;m[b+165|0]=0}
function xo (line 5) | function xo(s,i){var f,e,n,k=h;h=h+4|0;a[k>>2]=1e3;var j=Xa(16e3),c=i|0;...
function gk (line 5) | function gk(s,i,f,e){var n=a[i>>2];(n|0)<(e|0)&&(n<<=1,n=(n|0)>(e|0)?n:e...
function vo (line 5) | function vo(b,i){var f=i+208|0;if(1<=(a[f>>2]|0)){for(var e=i+212|0,n=1;...
function Xo (line 5) | function Xo(b){var i,f=Z(16);i=f>>2;var b=2>(b|0)?2:b,e=Z(b<<2);a[i]=e;a...
function Ne (line 5) | function Ne(b,i,f){0!=(i|0)&&(b=Gb(b,a[i+8>>2]),0!=(b|0)&&0!=m[b]<<24>>2...
function mc (line 5) | function mc(b,i,f,e){0==(i|0)|0==(b|0)?e=f:(b=Gb(b,a[i+8>>2]),0==(b|0)?e...
function qc (line 5) | function qc(b,i,f){return 0==(i|0)|0==(b|0)?f:b=Gb(b,a[i+8>>2])}
function ib (line 5) | function ib(a,b,f){a=qc(a,b,f);return 0!=(a|0)&&0!=m[a]<<24>>24?a:f}
function ri (line 5) | function ri(a){return Wd(a)}
function ih (line 5) | function ih(b,i){var f,e;if((b|0)==(i|0)){return b}e=b+224|0;if(0==(a[e>...
function pd (line 5) | function pd(s,i,f,e,n){var k,j,c=h;h=h+576|0;for(var d=0;!(j=((d<<4)+c|0...
function Yo (line 5) | function Yo(b){for(var i=0,f=0;;){var e=a[1347823];if(1024>(e-f|0)){e=e+...
function ik (line 5) | function ik(b,i,f){var e=0==(b|0),n=0;a:for(;;){var k=a[i+(n<<2)>>2];if(...
function Wd (line 5) | function Wd(a){return 0==(a|0)?0:0==m[a]<<24>>24?0:0==(ia(a,5340208)|0)?...
function ia (line 5) | function ia(a,b){for(var f=0,e=a,n=b;;){var k=m[e];if(0==k<<24>>24){var ...
function Zo (line 5) | function Zo(s,i,f,e,n){var k=s|0;g[b>>3]=i-e;a[k>>2]=a[b>>2];a[k+4>>2]=a...
function Ro (line 5) | function Ro(s,i,f,e,n){var k=0,j=h;h=h+80|0;var c=j+64;a:do{if(0<(f|0)){...
function $o (line 5) | function $o(s){var i=s|0,f=mc(i,a[1347611],.75,.01),e=s+48|0;g[b>>3]=f;a...
function ap (line 5) | function ap(s){var i,f,e,n=s>>2,k=h;h=h+112|0;var j=k+16,c=k+32,d=k+72;e...
function kk (line 5) | function kk(s,i){var f=s|0,e=mc(f,a[1347845],14,1),n=i|0;g[b>>3]=e;a[n>>...
function bp (line 5) | function bp(s,i,f){var e=i+8|0;0==(a[e>>2]|0)&&kk(s,i);var s=s|0,n=i|0,n...
function lk (line 5) | function lk(b,i,f,e){var n,k=h;h=h+80|0;var j=k+40,c=Dc(e,58);if(0==(c|0...
function cp (line 5) | function cp(b,i){if(0==(i|0)){var f=0}else{f=Gb(b|0,a[i+8>>2]),f=0==(f|0...
function jh (line 5) | function jh(s,i){var f,e,n=h;h=h+32|0;f=s+52|0;var k,j=a[s+152>>2]&1,c,d...
function we (line 5) | function we(a,b,f){var e=0;if(0==(f|0)){var n;return 0}for(;;){var k=f-1...
function dp (line 5) | function dp(b){var i=si(b,5363812),f=b+20|0,e=wa(a[f>>2]);a:do{if(0!=(e|...
function nc (line 5) | function nc(a,b,f,e){b=ha(b,f);return 0!=(b|0)?b:a=B[e](a,f,5345e3)}
function ep (line 5) | function ep(b){var i=h;h=h+20|0;var f=i+8,e=Dc(b,59),n=a[1311730];n>>>0<...
function Rw (line 5) | function Rw(s,i){var f,e=h;f=s>>2;s=h;h=h+32|0;a[s>>2]=a[f];a[s+4>>2]=a[...
function nk (line 5) | function nk(b){var i=h;h=h+20|0;var f=i+8,e=a[b>>2];a:do{if(35==m[e]<<24...
function ok (line 5) | function ok(b){var i,f,e=h;h=h+1044|0;f=e>>2;var n=e+4;Ob(n,1024,e+20|0)...
function pk (line 5) | function pk(b){var i,f=h;h=h+1040|0;Ob(f,1024,f+16|0);var e=m[b];i=(f+4|...
function fp (line 5) | function fp(s,i){var f,e=h;h=h+40|0;f=i>>2;i=h;h=h+32|0;a[i>>2]=a[f];a[i...
function Vj (line 5) | function Vj(s,i){var f,e,n,k=h;h=h+32|0;n=i>>2;i=h;h=h+32|0;a[i>>2]=a[n]...
function gp (line 5) | function gp(s,i){var f,e=0,n=h;f=s>>2;s=h;h=h+48|0;for(var k=s>>2,j=f+12...
function qk (line 5) | function qk(b){var i,f,e,n=0,k=h;h=h+1044|0;e=k>>2;var j=k+4;a[e]=b;Ob(j...
function rk (line 5) | function rk(s,i){if(0==i<<24>>24){var f=s+48|0,f=36*(a[b>>2]=a[f>>2],a[b...
function jp (line 5) | function jp(b,i){var f=0,e=h;a:do{if(0==(b|0)){var n=i}else{n=m[b];if(0!...
function kp (line 5) | function kp(a,b){var f=Y(a|0,5351380),f=0==(f|0)?b:0==m[f]<<24>>24?0:jp(...
function ip (line 5) | function ip(s,i,f,e,n){var k,j=h;h=h+128|0;k=n>>2;n=h;h=h+32|0;a[n>>2]=a...
function mk (line 5) | function mk(b,i){var f=a[b+20>>2];if(0==m[b+134|0]<<24>>24){var e;return...
function tk (line 5) | function tk(b,i){var f,e;f=0;var n=a[i>>2];e=(i+24|0)>>2;a[e]=0;a[e+1]=0...
function vi (line 5) | function vi(s,i,f,e){var n,k=0,j=h;h=h+16|0;n=(i+76|0)>>1;var c=D[n]<<16...
function af (line 5) | function af(s,i,f,e,n,k){var j,c,d=h,p=Z(84);c=p>>2;var r=a[s>>2]<<28>>2...
function op (line 5) | function op(a){var b=a+1|0,f=m[b];if(35!=f<<24>>24){for(a=b;;){b=a+1|0;i...
function uk (line 5) | function uk(b,i,f){var e=i>>2,n=a[e]<<28>>28;if(3==(n|0)){var k=a[e+3],j...
function Ff (line 5) | function Ff(b){if(0!=(b|0)){H(a[b>>2]);var i=b+72|0;if(0==m[b+82|0]<<24>...
function hf (line 5) | function hf(s,i,f){var e,n,k;k=(a[s+16>>2]+12|0)>>2;var j=a[k];a[k]=i;if...
function bc (line 5) | function bc(a,b){return uk(a,b,1)}
function Vb (line 5) | function Vb(b){var i=0,f=a[1310723];if(0==(f|0)){a[1310722]=64;var f=Xa(...
function wi (line 5) | function wi(b){var i=0,f=a[1310721];if(0==(f|0)){a[1310720]=64;var f=Xa(...
function Z (line 5) | function Z(a){if(0==(a|0)){a=0}else{var b=Xa(a);ef(b,0,a);a=b}return a}
function Xa (line 5) | function Xa(b){if(0==(b|0)){return 0}b=Hb(b);if(0==(b|0)){Yd(5352472,14,...
function qo (line 5) | function qo(a,b,f,e,n,k){f-=a;e-=b;a=(k-b)*f-(n-a)*e;a*=a;return 1e-10>a...
function hp (line 5) | function hp(s,i,f,e,n){var k,j=0,c=h;k=n>>2;n=h;h=h+32|0;a[n>>2]=a[k];a[...
function mi (line 5) | function mi(s){var i;i=(s+16|0)>>2;var f=(a[b>>2]=a[i],a[b+4>>2]=a[i+1],...
function mp (line 5) | function mp(s,i,f,e,n){a[f+20>>2]=e;var k=f+24|0;g[b>>3]=n;a[k>>2]=a[b>>...
function sp (line 5) | function sp(s){var i,f,e;e=(s+56|0)>>2;g[b>>3]=0;a[e]=a[b>>2];a[e+1]=a[b...
function tp (line 5) | function tp(s,i,f,e){for(var n=0;;){if(0==(e|0)){var k=i,j=f;break}else{...
function kg (line 5) | function kg(s,i,f,e){for(var n=0;;){if(90==(e|0)){n=2812;break}else{if(2...
function up (line 5) | function up(s,i,f,e){if((a[1311762]|0)==(e|0)){var e=(a[b>>2]=a[1311763]...
function xi (line 5) | function xi(b){var i=h;if(0==m[5246933]<<24>>24){m[5246933]=1;var f=wk(a...
function vp (line 5) | function vp(){var b=h,i=a[1311728];a[i+4>>2]=a[i>>2];i=a[1311737];0<(i|0...
function wp (line 5) | function wp(b,i,f){0==(ia(i,5341536)|0)?(b=a,i=Z(108),a[i+92>>2]=-1,m[i+...
function yp (line 5) | function yp(b,i){0==(ia(i,5341536)|0)?(a[1311727]=264,m[5246934]=1):0!=(...
function lp (line 5) | function lp(b,i,f,e){b=cc(b,Math.a(f,i));0!=(b|0)|0==(i|0)||(Yd(5352472,...
function La (line 5) | function La(b,i){var f=cc(b,i);if(0!=(f|0)|0==(i|0)){return f}Yd(5352472...
function zp (line 5) | function zp(){var b=0,i=h,f=a[1311727]=0;a:for(;;){var e=m[5246935];do{i...
function Ap (line 5) | function Ap(b){var i=0,f=h,e=b+1|0,n=m[b];if(60!=n<<24>>24){var k=b,j=n;...
function xp (line 5) | function xp(b){var i=h;a[1311727]=268;m[5246933]=1;var f=wk(a[1311725]);...
function lg (line 5) | function lg(s,i){var f=Z(24),e=f+16|0;g[b>>3]=-1;a[e>>2]=a[b>>2];a[e+4>>...
function lh (line 5) | function lh(b,i,f,e,n){var k=h;h=h+8|0;var j=a[e>>2];if(0!=(j|0)){for(va...
function Re (line 5) | function Re(b,i,f,e,n){var k=h;h=h+4|0;var j=Ye(b,k);(a[k>>2]|0)==(b|0)?...
function Bp (line 5) | function Bp(){var b,i,f=0,e=h;h=h+1200|0;var n=e|0,k=e+400|0;a[1313956]=...
function Cp (line 5) | function Cp(a){for(var b=0;;){var f=m[a];if(0==f<<24>>24){var e=0,b=5;br...
function zk (line 5) | function zk(b){if(0==(b|0)){return b}var i=b+12|0;a[i>>2]=a[i>>2]+1|0;re...
function Fp (line 5) | function Fp(b,i){var f=Z(8);m[f+4|0]=i&255;a[f>>2]=b;return f}
function Ak (line 5) | function Ak(){var b=a[1347745],i=a[1347746];0!=(i|0)&&(vk(i,1),a[1347746...
function Ep (line 5) | function Ep(){var b,i,f,e=a[1347743],n=Z(40);0!=(Lb(a[1347744])|0)&&Dp(0...
function Dp (line 5) | function Dp(b){var i=Z(32),f=a[1347744],e=Lb(f);D[i+12>>1]=e&65535;m[i+1...
function Gf (line 5) | function Gf(s){var i,f,e=Z(8),n=a[a[1347741]>>2];f=n>>2;if(0!=(n|0)){i=s...
function mg (line 5) | function mg(){var b=a[1347741],i=a[b+4>>2];ng(a[b>>2]);H(b);a[1347741]=i}
function yi (line 5) | function yi(b,i,f){var e=Z(12),n=a[a[1347745]+76>>2],n=a[B[a[n>>2]](n,0,...
function Gp (line 5) | function Gp(b){dc(a[b+76>>2]);zi(b|0);H(b)}
function pp (line 5) | function pp(s,i,f){var e,n,k=0,j=h;h=h+60|0;Hp(s);n=j>>2;e=(f+56|0)>>2;a...
function Hp (line 5) | function Hp(b){var i,f=Zg(b);i=f>>2;var b=a[i]>>2,e=a[b+1];a[i+1]=e;a[i+...
function Bk (line 5) | function Bk(s,i,f){var e,n,k,j,c,d=i>>2,p=h;h=h+132|0;var r=p+32,q=p+68,...
function Ip (line 5) | function Ip(s,i,f){var e=D[i+4>>1];if(1<=e<<16>>16){var n=i+24|0,n=(a[b>...
function ng (line 5) | function ng(b){var i=b+12|0,f=a[i>>2]-1|0;a[i>>2]=f;0==(f|0)&&(i=a[b>>2]...
function zi (line 5) | function zi(b){b>>=2;H(a[b]);H(a[b+1]);H(a[b+2]);H(a[b+4]);H(a[b+3]);H(a...
function Ck (line 5) | function Ck(b){var i;if(0!=(b|0)){var f=b|0,e=b+4|0,n=D[e>>1];a:do{if(0<...
function vk (line 5) | function vk(b,i){var f=m[b+4|0];if(1==f<<24>>24){var f=a[b>>2],e=f+76|0,...
function Pp (line 5) | function Pp(b,i){var f=0,e=a[b+4>>2];if(0!=(e|0)&&0==(ia(e,i)|0)){var n;...
function Qp (line 5) | function Qp(s){var i,f=s+84|0;a[f>>2]=Z((a[s+92>>2]<<2)+4|0);var e=s+88|...
function og (line 5) | function og(b){var i=h;21>b>>>0?b=a[(b<<2)+5251464>>2]:(wb(5253352,53423...
function Rp (line 5) | function Rp(s,i,f){var e,n,k,j,c,d,p,h,m,u,l,t,w;w=(s+96|0)>>2;a:do{if(0...
function Dk (line 5) | function Dk(b){var i,f,e;e=a[b+216>>2];var n=a[e+168>>2];if(0!=(n|0)){f=...
function np (line 5) | function np(s,i){var f,e,n,k,j,c=h;h=h+240|0;j=c>>2;var d=c+4;e=c+36;k=e...
function Vp (line 5) | function Vp(s,i,f,e,n){var k=s|0;g[b>>3]=i;a[k>>2]=a[b>>2];a[k+4>>2]=a[b...
function Tp (line 5) | function Tp(b,i){var f;f=a[b>>2]<<28>>28;3==(f|0)?Ib(i,a[b+12>>2]):2==(f...
function Up (line 5) | function Up(a){var b=0,f=Y(a,5372908);if(0==(f|0)){b=358}else{if(0==m[f]...
function Fk (line 5) | function Fk(s,i,f,e){var n=h,k=i+100|0,j=a[k>>2];0!=(j|0)&&Jp(e,j,524695...
function Gk (line 5) | function Gk(s,i,f){var e,n,k,j,c,d,p,r,q,l,v=h;h=h+32|0;l=i>>2;i=h;h=h+3...
function Hk (line 5) | function Hk(s,i,f){var e,n,k,j,c=h;h=h+116|0;var d=c+100;j=(c+16|0)>>2;a...
function Jp (line 5) | function Jp(s,i,f){var e=s+16|0,n=a[e>>2];if(0!=(n|0)){var k=i|0,j=f|0;0...
function Np (line 5) | function Np(s,i){var f=a[i>>2];0!=(f|0)&&(a[s+16>>2]=f);f=a[i+4>>2];0!=(...
function Xp (line 5) | function Xp(s,i,f){var e,n,k,j,c,d,p,r,q,l,v,t,w,y=h;h=h+32|0;w=i>>2;i=h...
function Wp (line 5) | function Wp(b,i,f){var e,n=i+76|0,k=a[n>>2],j=pc(5254908,5389108),c=vf(k...
function Yp (line 5) | function Yp(s,i,f,e){var n=h;a[i+88>>2]=f;var k=i+32|0,j=D[k>>1];0==(j&6...
function Zp (line 5) | function Zp(b,i,f,e){var n;n=(e+72|0)>>1;var k=Za[n]-1|0,j=1;a:for(;;){v...
function Op (line 5) | function Op(s,i,f,e,n,k,j,c,d){var p,r,q=0,l=h;h=h+76|0;r=j>>2;j=h;h=h+2...
function mh (line 5) | function mh(b,i,f,e,n,k){var j,c,d=0,g=h;h=h+176|0;j=e>>2;e=h;h=h+32|0;a...
function Kp (line 5) | function Kp(b,i,f){var e,n=h;e=f>>2;f=h;h=h+32|0;a[f>>2]=a[e];a[f+4>>2]=...
function Lp (line 5) | function Lp(s,i,f,e){var n,k=h;n=e>>2;e=h;h=h+32|0;a[e>>2]=a[n];a[e+4>>2...
function Mp (line 5) | function Mp(s,i,f){var e,n,k,j,c=h;h=h+68|0;var d=c+36,p=i|0;j=d>>2;k=(i...
function nh (line 5) | function nh(b,i,f){var e,n,k;e=0;var j=a[b+16>>2];k=(j+148|0)>>2;0==(a[k...
function Ai (line 5) | function Ai(s,i,f,e,n){var k=h;h=h+32|0;var j=k|0;g[b>>3]=i;a[j>>2]=a[b>...
function oh (line 5) | function oh(b,i,f){0==($p(b)|0)&&aq();if(1>(f|0)){return Kk(),0}b=Y(b|0,...
function $p (line 5) | function $p(b){var i;a[1347820]=b;a[1347591]=0;a[1347634]=0;a[1347623]=0...
function cq (line 5) | function cq(){for(var b=0,i=a[1347591],f=a[1347424],e=0,n=0,k=i;(k|0)<(f...
function hq (line 5) | function hq(){a[1347641]=2147483647;a[1347643]=-2147483647;var b=a[a[134...
function aq (line 5) | function aq(){var b,i=h,f=Xo(a[1347623]),e=a[a[1347820]+216>>2];a:do{if(...
function Kk (line 5) | function Kk(){var b;b=a[a[1347820]+216>>2];if(0!=(b|0)){var i=b;for(b=i>...
function bq (line 5) | function bq(){var b=0;if(2>(a[1347623]|0)){var i;return 0}a:for(;;){if((...
function eq (line 5) | function eq(b,i){var f=(a[i+288>>2]|0)<(a[b+288>>2]|0),e=f?i:b;a[1347824...
function gq (line 5) | function gq(){var b,i;hq();var f=Z((a[1347643]<<2)+4|0);i=f>>2;b=a[13476...
function fq (line 5) | function fq(){var b=a[1347424];if(0<(b|0)){for(var i=a[1347425],f=0;;){v...
function bf (line 5) | function bf(b,i){var f=b+236|0;a[f>>2]=a[f>>2]-i|0;var f=b+272|0,e=a[f>>...
function dq (line 5) | function dq(b,i){var f,e,n,k;k=(i+12|0)>>2;n=(i+16|0)>>2;var j=a[a[k]+23...
function kq (line 5) | function kq(b,i,f,e){var n,i=i+288|0,k=-f|0,j=0==(e|0)&1;for(n=b>>2;;){v...
function lq (line 5) | function lq(b,i){var f,e;e=(b+172|0)>>2;a[i+172>>2]=a[e];a[a[1347425]+(a...
function jq (line 5) | function jq(a,b){var f=0,e=0==m[a+163|0]<<24>>24;if(0==m[b+163|0]<<24>>2...
function Mk (line 5) | function Mk(b,i,f){var b=b>>2,e=0,n=a[b+4],k=(n|0)==(i|0),n=a[(k?a[b+3]:...
function ph (line 5) | function ph(b,i,f){a[b+280>>2]=i;a[b+284>>2]=f;var e=b+272|0,n=a[e>>2],k...
function Ci (line 5) | function Ci(b){var i=b+184|0,f=a[i>>2],e=a[f>>2];a:do{if(0!=(e|0)){for(v...
function Bi (line 5) | function Bi(b){var i=b+176|0,f=a[i>>2],e=a[f>>2];a:do{if(0!=(e|0)){for(v...
function iq (line 5) | function iq(){var b,i=a[1347820]+216|0,f=a[i>>2];a:do{if(0!=(f|0)){var e...
function Lk (line 5) | function Lk(b,i){var f=b+272|0,e=a[f>>2],n=a[e>>2];a:do{if(0!=(n|0)){for...
function Di (line 5) | function Di(b){var i=0,f=b+184|0,e=0;a:for(;;){var n=a[a[f>>2]+(e<<2)>>2...
function Hf (line 5) | function Hf(s,i,f){var e=s|0;g[b>>3]=i;a[e>>2]=a[b>>2];a[e+4>>2]=a[b+4>>...
function Ok (line 5) | function Ok(s,i){var f,e,n,k,j,c=h;h=h+144|0;var d=c+16,p=c+32,r=c+48,m=...
function kd (line 5) | function kd(s,i,f){var e=h;h=h+16|0;kg(e,i,f,90*a[1347604]&-1);var i=e|0...
function Pk (line 5) | function Pk(s){var i,f,e,n=h;h=h+48|0;i=n+16;var k=n+32,j=s+20|0,c=wa(a[...
function Rk (line 5) | function Rk(s){if((a[s+32>>2]|0)!=(s|0)){var i=s+48|0,f=a[i>>2];if(0!=(f...
function Qk (line 5) | function Qk(s){if((a[s+32>>2]|0)!=(s|0)){var i=s+48|0,f=a[i>>2];if(0!=(f...
function mq (line 5) | function mq(s){var i,f,e,n=h;h=h+32|0;var k=n+16;if(0==(a[b>>2]=a[134760...
function Nk (line 5) | function Nk(b){var i,f;i=b+172|0;-1<(a[i>>2]|0)&&ba();f=a[1347424];a[i>>...
function nq (line 5) | function nq(s){var i,f,e,n,k,j,c,d,p,r,q;f=s>>2;var u=h;h=h+112|0;var v=...
function Sk (line 5) | function Sk(s,i,f,e,n,k,j){var c,d,p,r=h;h=h+88|0;var m=r+8;p=m>>2;var l...
function pq (line 5) | function pq(b){var i=h,f=a[1313372];(f|0)<(b|0)&&(b=f+(b+300)-(b|0)%300|...
function Ie (line 5) | function Ie(s,i,f){var e,n,k,j,c,d,p,r,q,u,v,t,w,y,A,C,F,N,Fa,B,ka,z,D,E...
function rq (line 5) | function rq(a,b,f,e){if(!((b|0)>(f|0)&(a|0)<(e|0))){return 0}if(!((f|0)>...
function qh (line 5) | function qh(s){var i,f=h;i=(s+80|0)>>2;ac(a[Pb>>2],5332228,(l=h,h=h+4|0,...
function qq (line 5) | function qq(s,i,f){var e,n,k,j,c,d,p,r,m,u,v,t,w,y,A,C,F,N,Fa=0,B=h;a:do...
function Ei (line 5) | function Ei(s,i,f,e,n,k){var j=s|0;g[b>>3]=(n-f)*i+f;a[j>>2]=a[b>>2];a[j...
function bk (line 5) | function bk(b){0==(b|0)?b=0:(b=a[a[b+4>>2]>>2],b=482==(b|0)?1:68==(b|0)?...
function gg (line 5) | function gg(s,i,f,e,n,k,j){var c,d,p,r,m,l,v,t,w,y,A,C,F,N,Fa,B,ka,z,D,E...
function sq (line 5) | function sq(s){var i,f,e,n,k,j,c,d,p=0,r=h;h=h+32|0;d=r>>2;var q=r+8;c=q...
function pg (line 5) | function pg(s,i,f){var e=s|0;g[b>>3]=i;a[e>>2]=a[b>>2];a[e+4>>2]=a[b+4>>...
function uq (line 5) | function uq(s){var i,f,e,n=h;h=h+32|0;var k=n+16,c=a[a[s+20>>2]+152>>2]>...
function vq (line 5) | function vq(s){var i,f,e,n=Z(44);e=n>>2;var k=a[a[a[s+24>>2]+8>>2]+4>>2]...
function jk (line 5) | function jk(b){var i=0,f=a[1347320];if(0==(f|0)){var e;return 0}for(var ...
function wq (line 5) | function wq(b,i,f,e){var n=h;h=h+40|0;f=xq(i,f,e);a[n+36>>2]=a[e+36>>2];...
function xq (line 5) | function xq(s,i,f){var e=h;h=h+16|0;var n=e+8,k=s+20|0,c=a[a[a[k>>2]+32>...
function qg (line 5) | function qg(s,i,f,e,n,k){var c=h;h=h+128|0;var d=c+16,x=c+32,p=c+48,r=c+...
function yq (line 5) | function yq(b,i,f,e){var n=0;if(1==(e|0)){var k=i,c=-f,n=1756}else{if(0=...
function rg (line 5) | function rg(s,i,f,e){var n,k=h;h=h+64|0;var c=a[i>>2],d=k+16|0;n=k>>2;a[...
function zq (line 5) | function zq(b,i,f,e){var n,k=0,c=h;h=h+52|0;var d=c+40;n=d>>2;var g=c+44...
function Bq (line 5) | function Bq(s,i){var f,e,n,k=h,c=a[s+16>>2];n=c>>2;c=c+148|0;e=a[c>>2];v...
function Aq (line 5) | function Aq(b,i){var f=h;W(0,5345972,(l=h,h=h+8|0,a[l>>2]=b,a[l+4>>2]=i,...
function Cq (line 5) | function Cq(s,i,f){var e=h;h=h+16|0;var n=a[s+4>>2],s=a[s>>2];kg(e,i,f,9...
function Dq (line 5) | function Dq(s,i,f,e,n){var k,c,d=0,x=h;h=h+32|0;if(0==m[i+28|0]<<24>>24)...
function Eq (line 5) | function Eq(s,i){var f,e,n,k,c,d=h;h=h+96|0;var x=d+32,p=a[s+16>>2];c=p>...
function Fq (line 5) | function Fq(b,i){var f=h;h=h+4|0;var e=cl(i,f);0!=(e|0)&&Od(a[b+16>>2],a...
function Gi (line 5) | function Gi(b,i){var f=ib(i|0,a[1347637],5345e3);0==m[f]<<24>>24?rb(b,53...
function Hi (line 5) | function Hi(s,i,f,e,n){var k=s|0;g[b>>3]=i+e;a[k>>2]=a[b>>2];a[k+4>>2]=a...
function bl (line 5) | function bl(s,i,f){var e,n,k,c,d,x,p,r,q,l,v=h;h=h+96|0;var t=v+32;q=v+4...
function al (line 5) | function al(b){b=ib(b|0,a[1347637],5345e3);return 0==m[b]<<24>>24?538349...
function If (line 5) | function If(b,i){var f=b|0,e=ib(f,a[1347633],5345e3);return 0==m[e]<<24>...
function cl (line 5) | function cl(b,i){var f=0,e=ib(b|0,a[1347613],5345e3);a:do{if(0==m[e]<<24...
function Gq (line 5) | function Gq(b,i){var f=0,e=a[b+60>>2];if(0!=(e|0)&&m[e]<<24>>24==m[i]<<2...
function dl (line 5) | function dl(b){var i=b+48|0,f=b+56|0;a:do{if(0<(a[i>>2]|0)){for(var e=0;...
function Hq (line 5) | function Hq(s,i,f){var e=h;h=h+16|0;s=a[s>>2];kg(e,i,f,90*(a[a[s+20>>2]+...
function Iq (line 5) | function Iq(s,i){var f,e,n=0,k=h;h=h+4|0;var c=s+16|0,d=a[c>>2];e=d>>2;v...
function Jq (line 5) | function Jq(s,i,f){var e,n=0,k=h;h=h+16|0;e=a[s+4>>2];var s=a[s>>2],c=s+...
function Ii (line 5) | function Ii(a,b,f,e,n,k,c,d){d=-(d-k);c-=n;n=d*n+c*k;return(0<=d*a+c*b-n...
function Kq (line 5) | function Kq(s,i){var f,e,n,k,c=0,d=a[s+16>>2];k=d>>2;var d=d+148|0,h=a[d...
function Lq (line 5) | function Lq(s,i){var f,e,n=h;h=h+48|0;f=n+32;var k=i+96|0,k=.375*(a[b>>2...
function tq (line 5) | function tq(a,b){var f=a/b&-1;return(((f|0)*b+1e-5<a&1)+f|0)*b}
function Fi (line 5) | function Fi(s,i,f,e){var n,k=0,c=Z(68),d=a[s+120>>2],h=0,p=a[1311819],r=...
function Yk (line 5) | function Yk(s,i,f){var e=h;h=h+32|0;var n=e+8,k=e+16,c=a[f+52>>2];a:do{i...
function Zk (line 5) | function Zk(s,i,f,e){var n,k,c=h;h=h+32|0;var d=c+16;k=(s|0)>>2;var x=i-...
function $k (line 5) | function $k(s,i,f,e){var n,k,c,d=h;h=h+32|0;n=d+16;m[s+65|0]=e&255;k=s+8...
function sg (line 5) | function sg(a,b){dl(a);0!=(b|0)&&H(b)}
function Yg (line 5) | function Yg(s,i,f,e){var n,k,c,d=h;h=h+96|0;var x=d+64;c=x>>2;var p=d+72...
function Ji (line 5) | function Ji(s,i,f,e){var n,k,c,d,x,p,r,m,l,v,t,w,y,A,C,F,N,B,z=h;h=h+64|...
function el (line 5) | function el(b,i){var f,e;a:do{if(0==m[b+124|0]<<24>>24){f=b}else{for(e=b...
function vd (line 5) | function vd(s,i,f,e){var n,k,c,d,x,p,r,q,l=0,v=h;h=h+80|0;x=v>>2;p=v+4;d...
function Mq (line 5) | function Mq(b,i,f,e,n,k){var c,d,g=h;h=h+8|0;d=g>>2;var p=g+4;c=p>>2;for...
function Wc (line 5) | function Wc(s,i){var f,e,n=h;f=i>>2;i=h;h=h+32|0;a[i>>2]=a[f];a[i+4>>2]=...
function Nq (line 5) | function Nq(s,i,f,e,n){var k=s|0;g[b>>3]=i+e;a[k>>2]=a[b>>2];a[k+4>>2]=a...
function rh (line 5) | function rh(s,i,f,e,n){var k,c,d,x,p,r,q,l,v,t,w,y,A,C=e>>2,F=0,N=h;h=h+...
function fl (line 5) | function fl(s){var i,f=a[s+176>>2],e=a[f>>2];if(0==(e|0)){var n=0,k=0}el...
function Sw (line 5) | function Sw(s){var i=0,f=a[s+108>>2];0==m[s+56|0]<<24>>24?0!=m[s+96|0]<<...
function sh (line 5) | function sh(s,i,f,e,n){var k,c,d,x,p,r,q,l,v,t,w,y,A,C=e>>2,F=0,N=h;h=h+...
function Oq (line 5) | function Oq(b,i,f,e,n){var k=0,c=a[b+(i<<2)>>2];0==m[c+56|0]<<24>>24?0!=...
function Rq (line 5) | function Rq(s,i,f,e,n){var k,c,d,x,p,r,q,l,v,t,w,y,A=h;h=h+16080|0;var C...
function gl (line 5) | function gl(s,i,f,e,n){var k,c,d,x,p,r,q,l,v,t,w,y,A=h;h=h+16080|0;var C...
function Qq (line 5) | function Qq(s,i,f,e,n){var k,c,d,x,p,r,q,l,v,t,w,y,A=h;h=h+16080|0;var C...
function Pq (line 5) | function Pq(s,i,f,e,n){var c,d,G,x,p,r,q,l,v,t,w,y,A=h;h=h+16080|0;var C...
function sc (line 5) | function sc(s,i,f){var e=s|0;g[b>>3]=i;a[e>>2]=a[b>>2];a[e+4>>2]=a[b+4>>...
function hl (line 5) | function hl(s,i){var f,e,n,c,d,G,x=h;h=h+96|0;var p=x+64,r=x+80;if(6!=m[...
function Sq (line 5) | function Sq(b){var i=Wa(b);if((i|0)<(a[1323821]|0)){i=a[1323820]}else{if...
function th (line 5) | function th(b){for(var i=0;;){var f=a[b+24>>2];if(0!=(f|0)){i=2702;break...
function il (line 5) | function il(s,i,f,e,n,c,d){d>>=2;c>>=2;n>>=2;e>>=2;g[b>>3]=1-s;a[e]=a[b>...
function Ki (line 5) | function Ki(s,i,f,e,n,c){c>>=2;n>>=2;e>>=2;if(0<i){var d=1>s?6*s:0,s=d&-...
function Tq (line 5) | function Tq(s,i,f){var e,n,c,d,G,x,p,r,q,u,v,t,w,y,A,C,F=i>>2,N=0,B=h;h=...
function Uq (line 5) | function Uq(b){var i=m[b];if(98==i<<24>>24){return b}var f=b+1|0;if(0==(...
function Vq (line 5) | function Vq(b,i){var f=h,e=Wa(b)+Wa(i)|0;(e+3|0)<(a[1314593]|0)?e=a[1314...
function Wq (line 5) | function Wq(b){var i,f=h;h=h+1112|0;var e=f+1024,n=f+1096,c=f+1100,d=f+1...
function Li (line 5) | function Li(b,i,f){var e=0,n=h,c=0!=(i|0);a:do{if(c){for(var d=1,g=0;;){...
function jl (line 5) | function jl(a,b){var f=0,e=b;a:for(;;){var n=m[e];b:do{if(37==n<<24>>24)...
function kl (line 5) | function kl(b,i){var f=h;if(0==(i|0)){var e;e=0;var n=b,c=0;b:for(;;){fo...
function Yq (line 5) | function Yq(s,i){var f,e,n,c,d=s>>2,G=0,x=h;h=h+8|0;c=x>>2;n=(s+44|0)>>2...
function Zq (line 5) | function Zq(s){var i=Y(s|0,5384372);if(0!=(i|0)){var f=m[i];if(0!=f<<24>...
function ll (line 5) | function ll(s,i,f){var e,n=h;h=h+20|0;e=n>>2;var c=n+8,d=n+16;m[d]=0;s=Y...
function ml (line 5) | function ml(s){var i,f=s|0,e=Y(f,5338964);if(0!=(e|0)&&0!=m[e]<<24>>24){...
function $n (line 5) | function $n(b){var i,f=b+44|0;i=(f|0)>>2;var e=a[i],n=a[e+88>>2];0!=(n|0...
function nl (line 5) | function nl(s,i,f,e){var n,c,d,G=i+68|0,G=(a[b>>2]=a[G>>2],a[b+4>>2]=a[G...
function ze (line 5) | function ze(s,i,f){var e=h;h=h+1024|0;0!=(i|0)&&nb(i,s);i=e|0;wb(i,53571...
function ae (line 5) | function ae(a,b,f){0!=(b|0)&&nb(b,a);nb(f,a)}
function ol (line 5) | function ol(a){var a=tc(a),b=qd(a);Xb(a);return b}
function $q (line 5) | function $q(a,b,f,e){b=0==f<<24>>24?qd(b):ol(Dc(b,58)+1|0);ae(a,5375156,...
function pl (line 5) | function pl(s,i,f){var e,n,c,d,G,x,p,r,q,u=0,v=h;h=h+2064|0;var t=v+2048...
function ar (line 5) | function ar(s,i,f){var e,n=h;h=h+1024|0;e=(i+48|0)>>2;var c=a[e];if(0==(...
function ql (line 5) | function ql(s,i){var f=h;h=h+1024|0;var e=f|0,n=s+52|0,n=(a[b>>2]=a[n>>2...
function Mi (line 5) | function Mi(b,i,f){var e=h;h=h+1024|0;var n=e|0;wb(n,5381316,(l=h,h=h+8|...
function di (line 5) | function di(s,i,f){var e=h;h=h+256|0;if(999==(br(s,f)|0)){i=rl(s,f),W(1,...
function Hj (line 5) | function Hj(b,i){var f;f=a[i>>2];var e,n=Xa(12);e=n>>2;a[e+1]=0;a[e+2]=j...
function Io (line 5) | function Io(b){var i,f=b>>2;i=0;var e=h,n=a[f+19],c=a[f];if(0==(n|0)){i=...
function fr (line 5) | function fr(b){var i=h;h=h+100|0;var f=a[b+24>>2],e=i|0;0==(f|0)?m[e]=0:...
function z (line 5) | function z(a,b){Se(a,b,Wa(b))}
function Xq (line 5) | function Xq(a,b){var f=h;h=h+4|0;m[f]=b&255;Se(a,f,1);h=f}
function uo (line 5) | function uo(b){var i=a[b+36>>2];if(0!=(i|0)&&0==m[b+140|0]<<24>>24&&0==(...
function J (line 5) | function J(b,i,f){var e=h;h=h+1028|0;var n=e+1024;a[n>>2]=f;f=e|0;Se(b,f...
function tg (line 5) | function tg(b,i){var f=h;h=h+4|0;Se(b,Ni(f,i),a[f>>2]);h=f}
function Se (line 5) | function Se(b,i,f){var e=h;if(0==(f|0)|0==(i|0)){return h=e,0}0!=(a[b+14...
function gr (line 5) | function gr(b,i,f){var e,n,c=h;e=a[a[b>>2]+116>>2];if(0!=(e|0)){return f...
function hr (line 5) | function hr(b){var i=h,f=a[b+76>>2];0!=(a[b+148>>2]&1024|0)&&(B[a[a[b+12...
function Ni (line 5) | function Ni(b,i){if(-1e15>i){return a[b>>2]=19,5253492}if(1e15<i){return...
function Pd (line 5) | function Pd(b,i,f){var e=h;h=h+4|0;Se(b,Ni(e,i),a[e>>2]);Se(b,5375156,1)...
function Bd (line 5) | function Bd(s,i,f){var e=i|0,n=i+8|0;Pd(s,(a[b>>2]=a[e>>2],a[b+4>>2]=a[e...
function br (line 5) | function br(b,i){var f;f=wf(b,1,i);if(0==(f|0)){return 999}f=a[f+16>>2]>...
function cr (line 5) | function cr(b,i){var f=h;a[i+172>>2]=b;var e=i+32|0,n=a[e>>2];(n|0)!=(i|...
function ir (line 5) | function ir(s,i,f,e){var n,c;c=s>>2;if(1==(i|0)){sl(s,f,e),jr(s),m[s+530...
function kr (line 5) | function kr(s,i,f){var e,n,c,d,h;h=(s+552|0)>>2;d=s+512|0;c=(i-(a[b>>2]=...
function lr (line 5) | function lr(b,i,f){var e=a[b>>2];if(0==(i|0)){i=$f(5375128,1);a[b+32>>2]...
function sl (line 5) | function sl(s,i,f){var e=h;h=h+48|0;var n=e+32,c;c=0==(a[s+356>>2]|0);va...
function mr (line 5) | function mr(b,i){var f,e=0,n=h;f=i>>2;i=h;h=h+32|0;a[i>>2]=a[f];a[i+4>>2...
function nr (line 5) | function nr(b){var i,f;f=(b+576|0)>>2;i=a[f];0!=(i|0)&&(H(i),a[f]=0);b=a...
function or (line 5) | function or(s,i){var f,e=0,n=h;f=i>>2;i=h;h=h+32|0;a[i>>2]=a[f];a[i+4>>2...
function jr (line 5) | function jr(b){var i=b+572|0,f=a[i>>2];if(0!=(f|0)){var e=a[f>>2]<<28>>2...
function tl (line 5) | function tl(b,i){var f,e;f=b+584|0;e=(i+32|0)>>2;(a[e]|0)==(i|0)?0==(a[i...
function pr (line 5) | function pr(b,i){var f,e;e=b+584|0;Bc(e,0,5335648);Bc(e,1,a[i+12>>2]);a[...
function qr (line 5) | function qr(b,i){var f,e,n=0,c=b+584|0;Bc(c,0,5383636);e=i+16|0;Bc(c,1,a...
function Zn (line 5) | function Zn(b,i){var f=b+120|0,e=a[f>>2];0==(e|0)?(e=Z(624),a[f>>2]=e,a[...
function Bc (line 5) | function Bc(b,i,f){var e=b+8|0;if((a[e>>2]|0)>(i|0)){var n=a[b>>2]}else{...
function rr (line 5) | function rr(b){var i=b|0,f=a[i>>2];0!=(f|0)&&H(f);a[i>>2]=0;a[b+8>>2]=0;...
function Lj (line 5) | function Lj(b){var i,f=b+120|0,e=a[f>>2];a:do{if(0!=(e|0)){var n=e;for(i...
function ul (line 5) | function ul(s,i,f,e){var n=i+496|0,n=(a[b>>2]=a[n>>2],a[b+4>>2]=a[n+4>>2...
function qe (line 5) | function qe(s,i,f,e){var n=s+496|0,n=(a[b>>2]=a[n>>2],a[b+4>>2]=a[n+4>>2...
function er (line 5) | function er(b,i,f,e,n,c){var d,g,x=h;h=h+128|0;d=x|0;Uf(d,f,63);var p=Dc...
function wf (line 5) | function wf(b,i,f){var e,n=0,c=h;h=h+128|0;var d=c+64,g=2>(i-3|0)>>>0?0:...
function rl (line 5) | function rl(b,i){var f,e=0;m[5256500]||(Ob(5256484,0,0),m[5256500]=1);va...
function ei (line 5) | function ei(b,i){var f,e,n,c=b>>2;f=a[c];wf(f,3,i);e=a[f+92>>2];if(0==(e...
function Kj (line 5) | function Kj(b){var i=a[b+60>>2];if(0!=(i|0)&&(i=a[i+4>>2],0!=(i|0))){B[i...
function Sj (line 5) | function Sj(b,i,f){var e=h;h=h+4|0;a[f>>2]=i;a[f+32>>2]=5;a[e>>2]=Sq(i);...
function yo (line 5) | function yo(b){var i=a[b+60>>2];if(0!=(i|0)&&(i=a[i+28>>2],0!=(i|0))){B[...
function ek (line 5) | function ek(b){var i=a[b+60>>2];if(0!=(i|0)&&(i=a[i+40>>2],0!=(i|0))){B[...
function fk (line 5) | function fk(b){var i=a[b+60>>2];if(0!=(i|0)&&(i=a[i+44>>2],0!=(i|0))){B[...
function ck (line 5) | function ck(b){var i=a[b+60>>2];if(0!=(i|0)&&(i=a[i+48>>2],0!=(i|0))){B[...
function dk (line 5) | function dk(b){var i=a[b+60>>2];if(0!=(i|0)&&(i=a[i+52>>2],0!=(i|0))){B[...
function Vo (line 5) | function Vo(b){var i=a[b+60>>2];if(0!=(i|0)&&(i=a[i+56>>2],0!=(i|0))){B[...
function Ic (line 5) | function Ic(b,i,f,e,n){var c=a[b+60>>2];if(0!=(c|0)&&(c=a[c+72>>2],0!=(c...
function Zd (line 5) | function Zd(b){var i=a[b+60>>2];if(0!=(i|0)&&(i=a[i+76>>2],0!=(i|0))){B[...
function qp (line 5) | function qp(b,i){var f=a[b+60>>2];if(0!=(f|0)&&(f=a[f+80>>2],0!=(f|0))){...
function rp (line 5) | function rp(b){var i=a[b+60>>2];if(0!=(i|0)&&(i=a[i+84>>2],0!=(i|0))){B[...
function hk (line 5) | function hk(s,i,f,e){var n=h;h=h+16|0;var c=a[s+60>>2],d=a[e>>2];if(0!=(...
function rb (line 5) | function rb(b,i){var f=a[b+60>>2],e=a[b+16>>2]+16|0,n=Dc(i,58),c=0!=(n|0...
function Ub (line 5) | function Ub(b,i){var f=a[b+60>>2],e=a[b+16>>2]+52|0,n=Dc(i,58),c=0!=(n|0...
function Od (line 5) | function Od(s,i,f){var e,n=0,c=h;a[s+104>>2]=f;if(!(0==(i|0)|0==(f|0))){...
function hh (line 5) | function hh(s,i,f){var e,n=h;h=h+32|0;var c=a[s+60>>2];if(0!=(c|0)&&(c=c...
function Hc (line 5) | function Hc(b,i,f,e){var n=a[b+60>>2];if(0!=(n|0)){var n=n+100|0,c=a[n>>...
function Af (line 5) | function Af(s,i,f){var e,n,c=h;h=h+64|0;n=i>>2;i=h;h=h+32|0;a[i>>2]=a[n]...
function kf (line 5) | function kf(b,i,f,e,n,c){var d=a[b+60>>2];if(0!=(d|0)){var d=d+104|0,g=a...
function zd (line 5) | function zd(b,i,f){var e=a[b+60>>2];if(0!=(e|0)){var e=e+108|0,n=a[e>>2]...
function ah (line 5) | function ah(b,i){var f=a[b+60>>2];if(0!=(i|0)&&!(0==m[i]<<24>>24|0==(f|0...
function Uj (line 5) | function Uj(s,i){if(0!=(a[s+60>>2]|0)){var f=a[s+16>>2]+96|0;g[b>>3]=i;a...
function sr (line 5) | function sr(b,i,f,e){if(0==(i|0)){i=e=-1}else{var n=a[i+48>>2];0!=(n|0)&...
function Jk (line 5) | function Jk(s,i,f,e,n,c){var d,G,x,p,r,q,u,v,t,w=h;h=h+72|0;t=w+32;G=w+4...
function tr (line 5) | function tr(b){var i=h;h=h+64|0;var f=a[1347740];if(0==(f|0)){return h=i...
function ur (line 5) | function ur(b){var i=h;0==(b|0)&&sa(5381776,363,5388672,5344740);var f=b...
function vr (line 5) | function vr(b){if(0!=m[b+17|0]<<24>>24){var b=b+20|0,i=a[b>>2];0!=(i|0)&...
function Ik (line 5) | function Ik(s,i,f){0!=(f|0)&&0!=m[f]<<24>>24?(i=a[i+44>>2]+24|0,i=(a[b>>...
function wr (line 5) | function wr(b){var i=h;0==(a[1347740]|0)&&(a[1347740]=pc(5390888,5389092...
function xr (line 5) | function xr(b){var i=0,f=h;h=h+220|0;var e=f+20,n=b+20|0,c=a[n>>2];a:do{...
function yr (line 5) | function yr(b){var i=b>>2,f=0,e=h;h=h+20|0;var n=e+4,c=e+8,d=e+12,g=e+16...
function Ar (line 5) | function Ar(a){var b=1-a;return 3*a*b*b}
function Ae (line 5) | function Ae(s,i,f,e){var n=s|0;g[b>>3]=i*e;a[n>>2]=a[b>>2];a[n+4>>2]=a[b...
function zr (line 5) | function zr(s){var i,f=0,e=h;h=h+220|0;i=e>>2;var n=s+20|0,c=e+20|0;ff(a...
function vl (line 5) | function vl(a,b){if(0==(ea(b,5337312)|0)){var f=72*a;return(0>f?f-.5:f+....
function Te (line 5) | function Te(b,i,f){for(var e=0,n=a[f>>2]=0;;){if(n>>>0>=i>>>0){var c=1,e...
function ug (line 5) | function ug(b,i){for(var f=0,e=a[i>>2]=0;;){if(2<=e>>>0){var n=1,f=1680;...
function oq (line 5) | function oq(s,i,f,e,n,c){var d,G,x,p,m,q=h;h=h+32|0;d=q+16;m=(n|0)>>2;p=...
function uh (line 5) | function uh(s,i,f){var e=i*i+f*f;1e-6<e&&(e=Math.sqrt(e),i/=e,f/=e);e=s|...
function Oi (line 5) | function Oi(s,i,f,e,n,c,d,G){var x,p,m,q,l,v,t,w,y=h;h=h+256|0;var A=y+1...
function xl (line 5) | function xl(a,b,f,e){a=f-a;b=e-b;return Math.sqrt(a*a+b*b)}
function Br (line 5) | function Br(s,i,f,e,n,c,d,G,x,p,m){var q,l,v,t,w,y,A,C,F,N,B,z,D,E=h;h=h...
function wl (line 5) | function wl(b){var i=h;if((a[1312861]|0)<(b|0)){var f=a[1312859];0==(f|0...
function yl (line 5) | function yl(s,i,f,e,n){var c=s|0;g[b>>3]=i+e;a[c>>2]=a[b>>2];a[c+4>>2]=a...
function Pi (line 5) | function Pi(s,i,f,e,n){var c=s|0;g[b>>3]=i-e;a[c>>2]=a[b>>2];a[c+4>>2]=a...
function vh (line 5) | function vh(s,i,f,e,n){var f=3*f,c=n+24|0;g[b>>3]=3*i+e-(f+s);a[c>>2]=a[...
function wh (line 5) | function wh(s,i,f){0<=s&1>=s&&(i=(a[f>>2]<<3)+i|0,g[b>>3]=s,a[i>>2]=a[b>...
function Cr (line 5) | function Cr(s,i,f,e,n,c,d,G,x,p,m,q){var l,v,t,w,y,A,C=0,F=h;h=h+64|0;va...
function Dr (line 5) | function Dr(s,i){if(1>=(i|0)){var f;return 0}for(var e=s|0,n=s+8|0,c=1,d...
function Er (line 5) | function Er(s,i,f){var e,n,c,d=0,G=h;h=h+64|0;var x=G+32,p=x|0;c=x>>2;va...
function Fr (line 5) | function Fr(s,i,f){var e,n,c,d,G,x=h;h=h+84|0;var p=x+32;d=x+56;var m=x+...
function Nc (line 5) | function Nc(a,b,f,e,c,d){a=(b-e)*(c-f)-(d-e)*(a-f);return 0<a?1:0>a?2:3}
function Gr (line 5) | function Gr(b,i){var f,e,c=0,d=a[1310936];e=d>>2;for(var j=0;;){var g=d+...
function Tk (line 5) | function Tk(s,i,f){var e,c,d,j,G,x,p,m,q,u,v,t,w,y,A,C,F=f>>2,N=0,B=h;h=...
function zl (line 5) | function zl(s,i,f){var e;e=a[1310936]>>2;var c=a[a[((52*s&-1)+4>>2)+e]>>...
function Hr (line 5) | function Hr(b){var i=h;if((a[1312402]|0)<(b|0)){var f=a[1312400];0==(f|0...
function xh (line 5) | function xh(b,i){var f,e=a[1315587],c=a[1315588],d=-1<(e-c|0);f=a[131559...
function Kr (line 5) | function Kr(b,i){var f,e=0,c=a[1310936];f=(c+(52*b&-1)|0)>>2;if(0!=(a[f]...
function Bl (line 5) | function Bl(s){var i,f=0,e=a[1315586];i=a[1315590]>>2;for(var s=s|0,c=a[...
function Ir (line 5) | function Ir(s,i,f,e){var f=f>>2,c=0,d=a[a[((s-1+e|0)%(e|0)<<2>>2)+f]>>2]...
function Jr (line 5) | function Jr(b,i,f){var e;e=a[1310938];var c=a[1310937];if((e|0)<(c|0)){c...
function Ri (line 5) | function Ri(a,b,f,e,c,d){var j=f-a,g=e-b,h=c-a,p=d-b;return 3!=(Nc(a,b,f...
function Qi (line 5) | function Qi(s,i){var f=s+24|0,e=(a[b>>2]=a[f>>2],a[b+4>>2]=a[f+4>>2],g[b...
function Uk (line 5) | function Uk(b,i,f){var e,c,d,j,g,h;e=3*i&-1;var p=e-2|0,m=a[1313415];(p|...
function Ob (line 5) | function Ob(b,i,f){b>>=2;0==(f|0)?(i=0==(i|0)?1024:i,a[b+3]=1,f=Hb(i),a[...
function la (line 5) | function la(b,i){var f,e=b+8|0;f=(b|0)>>2;var c=a[f],d=a[e>>2]-c|0,j=d<<...
function xk (line 5) | function xk(b,i,f){var e;e=(b+4|0)>>2;var c=a[e];(c+f|0)>>>0>a[b+8>>2]>>...
function Ib (line 5) | function Ib(a,b){xk(a,b,Wa(b))}
function Yb (line 5) | function Yb(a,b){0!=(b|0)&&H(a)}
function Al (line 5) | function Al(b){var i=h;if((a[1312860]|0)<(b|0)){var f=a[1312858];0==(f|0...
function ui (line 5) | function ui(b){var i=a[b>>2]<<28>>28;return 3==(i|0)?a[a[b+16>>2]+12>>2]...
function Gb (line 5) | function Gb(b,i){if(-1>=(i|0)){var f;return 0}return f=a[a[b+4>>2]+(i<<2...
function Lr (line 5) | function Lr(b,i,f){var e,c=uc(1,16);e=c>>2;a[e]=tc(i);a[e+1]=tc(f);m[c+1...
function ag (line 5) | function ag(b,i,f){var e=0,c=ha(b,i);if(0==(c|0)){var d=1,j=Lr(ui(b),i,f...
function ha (line 5) | function ha(b,i){var f=a[ui(b)+4>>2];return B[a[f>>2]](f,i,512)}
function Nr (line 5) | function Nr(b,i,f){var e=b+20|0,c=wa(a[e>>2]);a:do{if(0!=(c|0)){for(var ...
function Mr (line 5) | function Mr(b,i,f){var e=b+20|0,c=wa(a[e>>2]);a:do{if(0!=(c|0)){for(var ...
function Si (line 5) | function Si(b,i,f){b=0==(b|0)?a[1347994]:b;return(b|0)!=(a[b+32>>2]|0)?0...
function bg (line 5) | function bg(b,i,f){b=0==(b|0)?a[1347994]:b;return(b|0)!=(a[b+32>>2]|0)?0...
function Jf (line 5) | function Jf(b,i,f){b=0==(b|0)?a[1347994]:b;return(b|0)!=(a[b+32>>2]|0)?0...
function Cl (line 5) | function Cl(b){dc(a[b+4>>2]);var i=b+8|0,f=a[i>>2];if(0!=(f|0)){var e=a[...
function Dl (line 5) | function Dl(b){var i,f=uc(1,12);i=f>>2;a[i]=b;a[i+1]=pc(5331292,5389092)...
function El (line 5) | function El(b,i){var f=Lb(a[i+4>>2]);if(0<(f|0)){for(var e=i+8|0,c=0;;){...
function Y (line 5) | function Y(a,b){return Gb(a,Or(a,b))}
function Or (line 5) | function Or(b,i){var f=ha(b,i);return 0==(f|0)?-1:f=a[f+8>>2]}
function sd (line 5) | function sd(a,b,f){oc(a,Or(a,b),f)}
function oc (line 5) | function oc(b,i,f){if(-1>=(i|0)){return-1}var e=(i<<2)+a[b+4>>2]|0;Xb(a[...
function dr (line 5) | function dr(b,i,f){var e=ha(b,i);0==(e|0)?(e=a[b>>2]<<28>>28,i=1==(e|0)?...
function ti (line 5) | function ti(b,i){var f,e=a[b>>2]<<28>>28,c=2==(e|0);if((e|0)==(a[i>>2]<<...
function Ue (line 5) | function Ue(b,i,f){var e=a[i+8>>2];if(0==(f|0)){0==(m[a[b+8>>2]+((e|0)/8...
function hi (line 5) | function hi(b,i,f){var e=b+24|0,c=vg(a[e>>2],i,f,0);return 0!=(c|0)?c:0!...
function vg (line 5) | function vg(b,i,f,e){var c,d=h;h=h+32|0;c=d>>2;var j=d+28|0;a[j>>2]=e;a[...
function Pr (line 5) | function Pr(b,i){var f=a[i>>2];16==(f&240|0)&&(a[i>>2]=f&-241|32);yh(b,i)}
function yh (line 5) | function yh(b,i){var f=b+24|0,e=a[f>>2],c=i|0;if(0==(B[a[e>>2]](e,c,4)|0...
function dh (line 5) | function dh(a,b){if(0==(a|0)|0==(b|0)){var f=0}else{f=Fb(a,b),f=0!=(f|0)...
function Fb (line 5) | function Fb(b,i){var f,e=h;h=h+28|0;f=e>>2;if(0==(b|0)|0==(i|0)){return ...
function cf (line 5) | function cf(b,i){var f,e=h;h=h+28|0;f=e>>2;if(0==(b|0)|0==(i|0)){return ...
function eh (line 5) | function eh(b,i,f){var e=0;if(0==(b|0)|0==(i|0)|0==(f|0)){var c;return 0...
function Jb (line 5) | function Jb(b,i){var f=B[a[b>>2]](b,i|0,8);return 0==(f|0)?f:(a[f+16>>2]...
function zh (line 5) | function zh(b,i){var f=B[a[b>>2]](b,i|0,8);return 0==(f|0)?f:(a[f+12>>2]...
function Fl (line 5) | function Fl(b,i,f,e){var c,d=uc(1,m[5391980]?184:0);c=d>>2;a[d>>2]=a[d>>...
function ye (line 5) | function ye(b,i,f){var e,c,d=h;h=h+128|0;e=(b+40|0)>>2;c=a[a[e]+4>>2];va...
function Qr (line 5) | function Qr(b){var i=b|0;a[b>>2]|=15;var f=Lb(a[a[a[a[a[b+16>>2]+20>>2]+...
function Ti (line 5) | function Ti(b,i){var f,e=h;f=(b+24|0)>>2;var c=a[f],d=i|0;if(0==(B[a[c>>...
function Rr (line 5) | function Rr(b,i){var f=0==(b|0)?0:a[b>>2],e=a[i+4>>2],e=0==(e|0)?0:a[e>>...
function td (line 5) | function td(b){return 0!=(a[a[b+20>>2]+36>>2]|0)?0:b=a[a[b+4>>2]>>2]}
function Gl (line 5) | function Gl(b,i){var f,e=uc(1,12);f=e>>2;var c=b+40|0;a[f+2]=a[c>>2];if(...
function Sr (line 5) | function Sr(b){var i;i=b+40|0;b=a[i>>2];if(0!=(b|0)){a[i>>2]=a[b+8>>2];v...
function $f (line 5) | function $f(b,i){var f=Ui(b,0,i),e=Ui(b,0,7);if(0==(f|0)|0==(e|0)){retur...
function Ui (line 5) | function Ui(b,i,f){var e,c=h;if(!m[5391952]){return W(1,5383720,(l=h,h=h...
function si (line 5) | function si(b,i){var f=b+36|0,e=a[a[f>>2]+20>>2],c=Pe(e,i);if(0==(c|0)){...
function Tr (line 5) | function Tr(b,i){0==(b|0)|0==(i|0)||0==(Ur(i,b)|0)&&ye(a[b+20>>2],b,i)}
function Vr (line 5) | function Vr(b,i){if(0==(b|0)){var f=0}else{f=Pe(a[b+20>>2],i),f=0==(f|0)...
function Ur (line 5) | function Ur(a,b){var f=pc(5331220,5389092),e=Wr(f,a,b);dc(f);return e}
function Fe (line 5) | function Fe(b){var i,f=b>>2;if(0!=(b|0)){i=b>>2;var e=a[i];if(3==(e&15|0...
function kh (line 5) | function kh(b,i){var f=a[i>>2]<<28>>28;1==(f|0)?Vi(b,i):3==(f|0)?Fe(i):2...
function Rc (line 5) | function Rc(b,i){var f=a[i>>2]<<28>>28;2==(f|0)?(f=a[b+24>>2],f=0!=(B[a[...
function sk (line 5) | function sk(b,i){var f=a[i>>2]<<28>>28;1==(f|0)?wg(b,i):3==(f|0)?Tr(a[b+...
function Wr (line 5) | function Wr(b,i,f){var e,c=0;if((i|0)==(f|0)){var d;return 1}e=(i+20|0)>...
function Yr (line 5) | function Yr(a,b){if(0==(Qe(a)|0)){var f=Ah(a,b);return f}m[b]=60;var f=b...
function Zr (line 5) | function Zr(b,i){0!=(b|0)&&(a[1347998]=b);0!=(i|0)&&(a[1347997]=i)}
function Ah (line 5) | function Ah(a,b){var f=0;if(0==(a|0)||0==m[a]<<24>>24){return 5368692}m[...
function nb (line 5) | function nb(b,i){B[a[1347998]](b,1,Wa(b),i)}
function Vd (line 5) | function Vd(b,i){var f=h;h=h+4|0;m[f]=b&255;B[a[1347998]](f,1,1,i);h=f}
function qd (line 5) | function qd(a){return Yr(a,Bh(a))}
function Bh (line 5) | function Bh(b){var b=(Wa(b)<<1)+2|0,b=1024<b>>>0?b:1024,i=a[1314584];if(...
function Kl (line 5) | function Kl(b,i,f,e,c){var d,j=h;h=h+4|0;a[j>>2]=0;var g=f+20|0,x=a[a[a[...
function df (line 5) | function df(a,b){if(0!=(b|0)){for(var f=b;!(f=f-1|0,Vd(9,a),0==(f|0));){}}}
function $r (line 5) | function $r(b,i,f,e){var c=a[i>>2];a[i>>2]=c+1|0;nb(0<(c|0)?5373768:5378...
function Ll (line 5) | function Ll(b,i,f,e){var c,d=h;h=h+4|0;a[d>>2]=0;var j=a[f+16>>2],g=a[a[...
function as (line 5) | function as(a,b,f){nb(qd(b),a);0!=(f|0)&&0!=m[f]<<24>>24&&(0!=(Qe(f)|0)?...
function Ml (line 5) | function Ml(b,i){var f;0==(a[1347998]|0)&&(a[1347998]=312);0==(a[1347997...
function Nl (line 5) | function Nl(b,i){var f=b+4|0;if(0<(Lb(a[f>>2])|0)){for(var e=b+8|0,c=b|0...
function xg (line 5) | function xg(a){return 10>((a<<24>>24)-48|0)>>>0?1:46==a<<24>>24|45==a<<2...
function Ol (line 5) | function Ol(b,i,f,e,c){var d,j,g,h,p=e+1|0;if(0==(e|0)){Ch(i,p,b|0,0,a[a...
function Ch (line 5) | function Ch(b,i,f,e,c){var d,j=c+4|0;if(0<(Lb(a[j>>2])|0)){for(var g=c+8...
function Yn (line 5) | function Yn(b){a[1347652]=b;var i=a[1347999];var f=0==(i|0)?a[1347999]=6...
function bs (line 5) | function bs(){var b,i,f=0,e=h;h=h+1040|0;i=e>>2;var c=e+16;if(m[5391956]...
function Jl (line 5) | function Jl(b){D[2694856]=0;var i=m[b];do{if(0==i<<24>>24){var f=0}else{...
function Pl (line 5) | function Pl(){var b=0,i=h;h=h+8|0;for(var f=i+4|0,e=0;;){var c=a[1347647...
function W (line 5) | function W(b,i,f){var e=h;h=h+4|0;a[e>>2]=f;gs(b,i,a[e>>2]);h=e}
function cs (line 5) | function cs(b){var i=0;a:for(;;){var f=m[b];do{if(0!=f<<24>>24&&!(0==(sf...
function ds (line 5) | function ds(b,i){var f=h,e=m[b],c=b+1|0,d=m[c],j=0==d<<24>>24;a:do{if(d<...
function fs (line 5) | function fs(b,i){var f=0,e=h,c=m[b];if(45==c<<24>>24){c=b+1|0;m[i]=45;va...
function Ql (line 5) | function Ql(b){var i=h,f=D[2695980];D[2695980]=f+1&65535;if(0==f<<16>>16...
function gs (line 5) | function gs(b,i,f){var e=h;h=h+4|0;a[e>>2]=f;if(3==(b|0)){var b=a[133273...
function Pe (line 5) | function Pe(b,i){var f=a[a[b+16>>2]>>2],f=B[a[f>>2]](f,i,512);if(0==(f|0...
function Xr (line 5) | function Xr(b,i){var f=h;h=h+4|0;a[f>>2]=i;var e=B[a[b>>2]](b,f,512);h=f...
function Ef (line 5) | function Ef(b,i){var f=Pe(a[b+32>>2],i);if(0!=(f|0)){return wg(b,f),f}va...
function Hl (line 5) | function Hl(b,i,f){var e,c=uc(1,m[5391984]?304:0);e=c>>2;a[c>>2]=a[c>>2]...
function wg (line 5) | function wg(b,i){var f=b+20|0;if(0==(Xr(a[f>>2],a[i+16>>2])|0)&&(f=a[f>>...
function Vi (line 5) | function Vi(b,i){var f=dh(b,i);a:do{if(0!=(f|0)){for(var e=f;;){var c=eh...
function Il (line 5) | function Il(b){var i=b|0,f=b+20|0,e=a[a[a[f>>2]+16>>2]>>2];B[a[e>>2]](e,...
function wa (line 5) | function wa(b){return B[a[b>>2]](b,0,128)}
function Ba (line 5) | function Ba(b,i){return B[a[b>>2]](b,i|0,8)}
function Ij (line 5) | function Ij(){var b,i,f=0,e=h;h=h+2032|0;var c=e+2e3,d=e+2008,j=e+2016,g...
function Sl (line 5) | function Sl(b,i){if(m[5390880]){var f=a[1347819],f=(a[f+32>>2]|0)==(f|0)...
function js (line 5) | function js(b,i){var f;f=uc(1,20);a[f+16>>2]=a[1347592];a[1347592]=f;var...
function Qe (line 5) | function Qe(b){return 0==(a[1347430]|0)|0==(b|0)?0:b=(m[5390988]?-214748...
function Wi (line 5) | function Wi(b,i){var f,e=uc(1,12);f=(a[1347592]+8|0)>>2;a[a[f]+8>>2]=e;e...
function Xi (line 5) | function Xi(b){a[b>>2]=is()|0;a[b+4>>2]=0}
function ks (line 5) | function ks(){var b=h;h=h+128|0;m[5390880]=0;var i=b|0;hs(i);Rl(si(a[134...
function hs (line 5) | function hs(b){var i=h,f=a[1332576];a[1332576]=f+1|0;wb(b,5369832,(l=h,h...
function tc (line 5) | function tc(b){0==(a[1347430]|0)&&es();if(0==(b|0)){return 0}var i=a[134...
function es (line 5) | function es(){a[1347430]=pc(5390376,5389092);m[5390988]=1;m[5391608]=1}
function Xb (line 5) | function Xb(b){var i=h,f=a[1347430];if(!(0==(f|0)|0==(b|0))){if(f=B[a[f>...
function Ul (line 5) | function Ul(b){Ge(b);var i=a[b+12>>2],f=a[b+16>>2],e=Kf(i,f);0==(e|0)?wd...
function ls (line 5) | function ls(b){var i=b+163|0;if(0==m[i]<<24>>24){m[i]=1;i=b+164|0;m[i]=1...
function ms (line 5) | function ms(c){var i,f,c=(c+20|0)>>2;a[1312865]=Xa(24*Lb(a[c])&-1);a[131...
function Tl (line 5) | function Tl(){var b=a[1347592],i=a[b+4>>2],f=i+8|0,e=a[f>>2];if(0==(e|0)...
function Rl (line 5) | function Rl(b){var i=h,f=a[1347817];63<(f|0)?(W(1,5379836,(l=h,h=h+1|0,h...
function is (line 5) | function is(){var b=h,i=a[1347817];0==(i|0)&&(W(1,5367760,(l=h,h=h+1|0,h...
function ns (line 5) | function ns(){var b=a[1313364];if(0<(b|0)){for(var i=a[1313508],f=0,e=0,...
function os (line 5) | function os(c){Yi(c);var i=a[1313364],f=Math.a(i-1|0,a[c+260>>2])|0;if(0...
function Yi (line 5) | function Yi(c){var i,f,e;a[1313364]=0;var d=a[1313508];if(0!=(d|0)){a:do...
function ps (line 5) | function ps(c){var i,f,e=0,d=a[1313364],k=a[1311738];i=a[1313508];f=i>>2...
function qs (line 5) | function qs(b){var i=b+4|0;if(0>=(a[i>>2]|0)){var f;return 0}for(var b=b...
function rs (line 5) | function rs(b){var i=a[1347850];return 0!=(i|0)&&(b=Gb(b|0,a[i+8>>2]),0!...
function ss (line 5) | function ss(b){Vl(b);var i=b+20|0,f=wa(a[i>>2]);if(0!=(f|0)){for(var e=b...
function ts (line 5) | function ts(b,i,f,e){var c=a[e+16>>2],d=a[c+216>>2],j=a[e+12>>2],g=a[j+2...
function us (line 5) | function us(c,i){var f,e=(c|0)/2&-1|0;f=(i+104|0)>>2;var d=(a[b>>2]=a[f]...
function yg (line 5) | function yg(b,i,f,e){var c=a[a[i+16>>2]+236>>2],d=a[a[i+12>>2]+236>>2],c...
function vs (line 5) | function vs(b,i){return!(0==(b|0)|0==(i|0))&&(a[b+16>>2]|0)==(a[i+16>>2]...
function Wl (line 5) | function Wl(b){var i,f,e,c,d,j,g=b+216|0;a[g>>2]=0;j=(b+240|0)>>2;a[j]=0...
function xs (line 5) | function xs(b,i){var f=ys(a[i+16>>2]),e=ys(a[i+12>>2]),c=(a[f+236>>2]|0)...
function Fh (line 5) | function Fh(c,i,f,e){var d=0==(a[e+108>>2]|0)?-1:(a[f+236>>2]+a[i+236>>2...
function ys (line 5) | function ys(b){return 7==m[b+165|0]<<24>>24?a[a[a[b+216>>2]+276>>2]+(a[b...
function As (line 5) | function As(b){var i,f;f=(b+32|0)>>2;var e=a[f],c=b+20|0,d=wa(a[c>>2]);i...
function Ds (line 5) | function Ds(b,i,f){var e=Es(b),c=Es(i);Fs(e,c,f,a[f+180>>2],(e|0)==(b|0)...
function Es (line 5) | function Es(b){var i=a[b+216>>2];return 0==(i|0)||0!=m[i+280|0]<<24>>24?...
function Gs (line 5) | function Gs(b){var i,f,e;e=(b+32|0)>>2;var c=a[e];i=b+244|0;f=D[i>>1];if...
function Hs (line 5) | function Hs(b){var i=D[b+244>>1],f=b+246|0;if(i<<16>>16<=D[f>>1]<<16>>16...
function Vl (line 5) | function Vl(b){var i=h,f=b+20|0,e=wa(a[f>>2]);a:do{if(0!=(e|0)){for(var ...
function ws (line 5) | function ws(b,i){var f,e;e=(i+246|0)>>1;f=(i+276|0)>>2;a[f]=Z((D[e]<<16>...
function Is (line 5) | function Is(b,i,f,e){var c,d=i+281|0,j=f+1|0;if((m[d]<<24>>24|0)!=(j|0))...
function bm (line 5) | function bm(b){var i=b+20|0,f=wa(a[i>>2]);if(0!=(f|0)){for(var e=b+28|0;...
function cm (line 5) | function cm(b){var i=b+208|0;a:do{if(1<=(a[i>>2]|0)){for(var f=b+212|0,e...
function Yl (line 5) | function Yl(b,i,f,e){var c,d,b=(b+220|0)>>2,j=a[b];d=j>>2;var g=a[((44*i...
function zg (line 5) | function zg(c,i,f){var e=f|0;if((a[b>>2]=a[e>>2],a[b+4>>2]=a[e+4>>2],g[b...
function Fs (line 5) | function Fs(c,i,f,e,d){var k,j;j=(c+236|0)>>2;k=(i+236|0)>>2;(a[j]|0)<(a...
function Js (line 5) | function Js(c,i){var f,e,d,k,j,m,x,p,r,q,u,v,t,w,y,A,C,F,B,z,D,E,I,J,Ca,...
function Ks (line 5) | function Ks(b,i){var f=h;if(0==(i|0)){var e=0}else{0==m[i]<<24>>24?e=0:(...
function Ag (line 5) | function Ag(c,i,f,e,d){var k=c|0;g[b>>3]=.5*(i+e);a[k>>2]=a[b>>2];a[k+4>...
function Ls (line 5) | function Ls(c,i){var f=c+8|0,f=(a[b>>2]=a[f>>2],a[b+4>>2]=a[f+4>>2],g[b>...
function Ms (line 5) | function Ms(c,i){var f=c|0,f=(a[b>>2]=a[f>>2],a[b+4>>2]=a[f+4>>2],g[b>>3...
function Ns (line 5) | function Ns(b){return(1==m[b+162|0]<<24>>24?1!=(a[b+180>>2]|0)?0:1!=(a[b...
function Gh (line 5) | function Gh(c,i,f,e,d,k){var j=h;h=h+400|0;var m=j+100,x=j+200,p=j+300,r...
function dm (line 5) | function dm(c,i){var f,e,d,k,j=h;h=h+128|0;var m=j|0;e=j>>2;k=c>>2;a[e]=...
function $i (line 5) | function $i(c,i,f,e,d,k){var j=0,m=h;h=h+144|0;var x=m+64,p=m+128,l=Ms(c...
function aj (line 5) | function aj(c,i,f,e,d,k){var j=0,m=h;h=h+144|0;var x=m+64,p=m+128,l=Ls(c...
function Zi (line 5) | function Zi(c,i,f){var e=h;wb(f,5381620,(l=h,h=h+16|0,g[b>>3]=c,a[l>>2]=...
function Os (line 5) | function Os(b){var i,f=0;if(2<=((D[b+246>>1]<<16>>16)-(D[b+244>>1]<<16>>...
function Ps (line 5) | function Ps(b){return(1==m[b+162|0]<<24>>24?1!=(a[b+188>>2]|0)?0:1!=(a[b...
function Qs (line 5) | function Qs(b,i){var f=(a[i+236>>2]<<2)+b|0,e=a[f>>2];if(0==(e|0)||(a[e+...
function em (line 5) | function em(b,i){a:do{if(0==m[b+124|0]<<24>>24){var f=b}else{for(var e=b...
function fm (line 5) | function fm(b,i,f,e,c){var d,j=0;d=(b+220|0)>>2;var g=a[d],h=a[g+(44*i&-...
function bj (line 5) | function bj(b,i){var f=0;a[1347818]=b;var e=m[5391460]+1&255;m[5391460]=...
function Cg (line 5) | function Cg(b){var i=a[1347818],f=i+240|0;a[f>>2]=a[f>>2]+1|0;m[b+163|0]...
function gm (line 5) | function gm(b){var i,f,e,c,d=0,j=h,g=b+244|0;f=D[g>>1];c=(b+246|0)>>1;a:...
function Bg (line 5) | function Bg(c,i){var f=h,e=c,c=h;h=h+40|0;for(var e=e>>2,d=c>>2,k=e+10;e...
function Ss (line 5) | function Ss(b){var i;i=(b+20|0)>>2;var f=wa(a[i]);a:do{if(0!=(f|0)){for(...
function hm (line 5) | function hm(b){var i=a[b+216>>2],f;if(0!=(i|0)){for(f=i>>2;;){var e=a[f+...
function Ts (line 5) | function Ts(b){var i=b>>2,f=b+24|0,e=a[i+44];0!=(e|0)&&H(e);e=a[i+46];0!...
function Us (line 5) | function Us(b){var i,f=b+44|0;i=b+208|0;var e=b+212|0,c=a[e>>2];a:do{if(...
function cj (line 5) | function cj(b,i,f,e){var c=b>>2;if(0==(i|0)){var i=a[c+4],d=a[c+3],b=(i|...
function im (line 5) | function im(c,i){var f,e,d,k,j,G,x,p,r,q,u,v=0,t=h;h=h+388|0;var w=t+184...
function Vs (line 5) | function Vs(c){var i;if(0!=(a[c+180>>2]|0)){for(i=a[c+184>>2];;){var f=a...
function Hh (line 5) | function Hh(b){for(;;){var i=a[b+180>>2];if(0==(i|0)){var f=b;break}else...
function Ys (line 5) | function Ys(c,i){var f,e,d,k,j=h;h=h+368|0;k=j>>2;var G=j+184;d=G>>2;var...
function Ws (line 5) | function Ws(c,i,f,e,d,k){var j,G,x,p=0,l=h;h=h+1580|0;x=l>>2;var q=l+184...
function Xs (line 5) | function Xs(c,i,f,e,d,k){var j,G,x,p,l,q,u,v,t,w,y,A,C,F,z,D,E,H,I,J,Ca,...
function Jh (line 5) | function Jh(b){return(1==m[b+162|0]<<24>>24?1<(a[b+180>>2]|0)?1:1<(a[b+1...
function km (line 5) | function km(c,i,f,e){var d,k,j,h,m;k=a[i+16>>2];m=((e<<5)+k|0)>>2;var p=...
function bt (line 5) | function bt(c,i,f){var e,d,k,j,G,x,p,l,q,u,v,t,w,y=0,A=h;h=h+64|0;var C=...
function nf (line 5) | function nf(c,i,f,e,d){var k,j=f>>2,h=i>>2,x=0;k=a[j+5]>>2;var i=f+32|0,...
function Lf (line 5) | function Lf(c,i,f,e){var d,k=h;h=h+64|0;d=i>>2;i=h;h=h+32|0;a[i>>2]=a[d]...
function lm (line 5) | function lm(b,i,f,e,c,d){var j=om(i,-1),i=om(i,1);0!=(j|0)&&th(j);0!=(i|...
function ft (line 5) | function ft(c,i,f,e){var d=c+32|0;g[b>>3]=f|0;a[d>>2]=a[b>>2];a[d+4>>2]=...
function om (line 5) | function om(b,i){var f,e=a[a[b+16>>2]+184>>2],c=a[e>>2];if(0==(c|0)){var...
function pm (line 5) | function pm(b,i){var f,e=a[a[b+12>>2]+176>>2],c=a[e>>2];if(0==(c|0)){var...
function et (line 5) | function et(c,i,f){var e,d,k,j=0,h=i-1|0,m=f+1|0;a:do{if((h|0)<(m|0)){fo...
function dt (line 5) | function dt(c,i,f,e,d){var k=c|0;g[b>>3]=i;a[k>>2]=a[b>>2];a[k+4>>2]=a[b...
function gt (line 5) | function gt(c,i){var f=c+52|0,f=(a[b>>2]=a[f>>2],a[b+4>>2]=a[f+4>>2],g[b...
function ht (line 5) | function ht(b,i,f,e){var c,d=b>>2,b=0,i=(a[d+60]|0)>(i|0);if(1!=(a[d+47]...
function Be (line 5) | function Be(c,i,f,e,d){var k=c|0;g[b>>3]=i+e;a[k>>2]=a[b>>2];a[k+4>>2]=a...
function mm (line 5) | function mm(c,i){var f=i+84|0,e=i+80|0,d=c,k=0;a:for(;;){d=a[d+12>>2];if...
function ct (line 5) | function ct(b,i,f,e,c,d){for(var j=0,g=b+(44*i&-1)|0,b=b+(44*i&-1)+4|0,i...
function nm (line 5) | function nm(b,i){if(0==m[b+162|0]<<24>>24){var f=a[b+216>>2],e=f}else{f=...
function Zs (line 5) | function Zs(c,i,f,e,d,k){var j,l,x,p,r,q,u,v,t,w,y,A,C,F,B,z,D,E,H,I,Ca,...
function $s (line 5) | function $s(c,i,f,e){var d,k,j,l,x,p,r,q,u,v,t=h;h=h+1540|0;for(var w=t+...
function jm (line 5) | function jm(c,i,f,e,d,k){var j,m,x,p,l,q,u,v,t,w,y,A,C,F,B=h;h=h+320|0;v...
function of (line 5) | function of(c,i,f){var e=c|0;g[b>>3]=i;a[e>>2]=a[b>>2];a[e+4>>2]=a[b+4>>...
function at (line 5) | function at(c,i,f,e,d,k,j){var m,x=0,p=h;h=h+1396|0;var l=p+4,q=p+700,u=...
function Ih (line 5) | function Ih(c,i,f,e,d,k){var j,m=h;h=h+96|0;j=m+32;var x=m+64,p=a[f+20>>...
function sm (line 5) | function sm(c,i,f,e,d,k){var j,m=h;h=h+96|0;j=m+32;var x=m+64,p=a[f+20>>...
function it (line 5) | function it(c,i,f,e,d,k,j){var l,x,p,r,q,u,v,t,w,y,A,C,F,B,z,D,E,I,J=0,M...
function jt (line 5) | function jt(c){var i,f=$f(5335792,a[c>>2]>>>4&1);Si(f,5381704,5345e3);va...
function kt (line 5) | function kt(b,i){var f=h,e=Ef(b,a[i+12>>2]),c=e|0;ti(i|0,c);if(2!=(bk(a[...
function Mf (line 5) | function Mf(a,b,f,e,c,d){0==(d|0)?(d=b,b=f):(d=f,b=-b);Be(a,d,b,e,c)}
function nt (line 5) | function nt(b,i,f,e,c,d){var j=0;if(!(0<(f|0)&0<(d|0))){var g;return 0}i...
function Dg (line 5) | function Dg(b,i){var f,e=0;f=(b+4|0)>>2;for(var c=a[f],d=b|0,j=0;;){if((...
function ot (line 5) | function ot(a,b){var f=a+176|0;D[f>>1]=D[f>>1]-D[b+176>>1]&65535;f=a+162...
function Kf (line 5) | function Kf(b,i){return nt(b,a[b+184>>2],a[b+188>>2],i,a[i+176>>2],a[i+1...
function Bs (line 5) | function Bs(b,i){return nt(b,a[b+192>>2],a[b+196>>2],i,a[i+200>>2],a[i+2...
function tm (line 5) | function tm(b){var i,f;f=(b+16|0)>>2;i=a[f]>>2;var e=a[i+46];i=0==(e|0)?...
function Ge (line 5) | function Ge(b){0==(b|0)&&sa(5347080,117,5388848,5374956);Dg(a[b+16>>2]+1...
function mf (line 5) | function mf(b){var i,f;f=(b+16|0)>>2;i=a[f]>>2;var e=a[i+52];i=0==(e|0)?...
function Cs (line 5) | function Cs(b,i){var f,e,c=0;e=(i+4|0)>>2;var d=a[e];f=(i|0)>>2;for(var ...
function dj (line 5) | function dj(b,i,f){var e=Z(184);a[e+16>>2]=b;a[e+12>>2]=i;m[e+124|0]=1;i...
function wd (line 5) | function wd(a,b,f){return tm(dj(a,b,f))}
function Xl (line 5) | function Xl(b,i){var f=b+216|0,e=a[f>>2],c=i+168|0;a[c>>2]=e;0!=(e|0)&&(...
function Zl (line 5) | function Zl(b,i){for(var f=b+216|0;;){var e=a[f>>2];if(0==(e|0)|(e|0)==(...
function te (line 5) | function te(c){var i,f=Z(304);i=f>>2;a[i+3]=5341528;a[i+5]=c;m[f+162|0]=...
function Eh (line 5) | function Eh(b,i){var f,e;e=(i+16|0)>>2;f=a[e]>>2;var c=a[f+48];f=0==(c|0...
function um (line 5) | function um(b){0==(b|0)&&sa(5347080,272,5388808,5374956);var i=a[b+128>>...
function Ve (line 5) | function Ve(b,i){var f=h,e=b+180|0,c=a[e>>2];if((c|0)==(i|0)){W(0,533837...
function pt (line 5) | function pt(b){var i;i=(b+180|0)>>2;var f=a[i];if(0!=(f|0)){for(var e=f;...
function rt (line 5) | function rt(b,i,f,e){var c=(b|0)>(i|0);a[f>>2]=c?i:b;a[e>>2]=c?b:i}
function qt (line 5) | function qt(b){0==(b|0)&&sa(5347080,128,5388368,5374956);var i=b+16|0,f=...
function st (line 5) | function st(c){var i,f,e,d=0,k=c+216|0,j=a[k>>2];a:do{if(0!=(j|0)){for(v...
function tt (line 5) | function tt(b){var i;i=(b+244|0)>>1;0!=D[i]<<16>>16&&sa(5337444,190,5389...
function vm (line 5) | function vm(c){var i,f,e,d,k,j,h,x;x=(c+108|0)>>2;if(0!=(a[x]|0)){h=(c+1...
function vt (line 5) | function vt(b,i,f,e){var c=h;h=h+24|0;var d=c+16,j=c+20,g=f-1|0,f=a[b+(4...
function wt (line 5) | function wt(b,i,f){var e,c;c=(b+220|0)>>2;var d=a[c];e=d+(44*i&-1)|0;d=a...
function wm (line 5) | function wm(b,i,f,e){var i=i>>2,c=b>>2,d=0,j=h;h=h+8|0;var g=j+4;if(1==m...
function xm (line 5) | function xm(b){var i=b+276|0,f=a[i>>2];if(0!=(f|0)){var e=D[b+244>>1],c=...
function lt (line 5) | function lt(c,i){m[5390412]=0;a[1347593]=c;var f=(Lb(a[a[c+32>>2]+28>>2]...
function gj (line 5) | function gj(c,i,f){if(1<(i|0)){var e=Kh(),d=c+216|0;Am(a[d>>2]);var k=e}...
function xt (line 5) | function xt(b,i){Wl(b);a[b+228>>2]=1;a[a[b+224>>2]>>2]=a[b+216>>2];ym(b)...
function zm (line 5) | function zm(b){var i=a[1347427];0!=(i|0)&&(H(i),a[1347427]=0);i=a[134742...
function ut (line 5) | function ut(b){xm(b);var i=b+208|0;if(1<=(a[i>>2]|0)){for(var b=b+212|0,...
function ej (line 5) | function ej(b){var i;i=b+208|0;a:do{if(1<=(a[i>>2]|0)){for(var f=b+212|0...
function Ct (line 5) | function Ct(a,b,f){var e=Dt(b,f);if(0==(e|0)){var c;return b}for(;;){if(...
function Gm (line 5) | function Gm(b,i){var f,e,c=a[i+12>>2],d=a[c+192>>2];e=(i+16|0)>>2;a:do{i...
function ym (line 5) | function ym(b){var i,f;f=(b+246|0)>>1;var e=Z((D[f]<<16>>16<<2)+8|0);i=b...
function Lh (line 5) | function Lh(b,i){var f=a[b+236>>2],e=b+240|0,c=a[e>>2],d=i+240|0,j=a[d>>...
function zs (line 5) | function zs(a){return 1==m[a+162|0]<<24>>24?2:a=2>m[a+166|0]<<24>>24&1}
function Hm (line 5) | function Hm(c,i){var f=0,e=0<(i|0),d=a[c>>2];if(0==(d|0)){var k;return 0...
function Bm (line 5) | function Bm(b,i){var f,e=h,c=Xo(a[b+240>>2]),d=b+216|0;f=a[d>>2];a:do{if...
function am (line 5) | function am(b,i,f){if(0==(f|0)){var f=i+188|0,e=a[f>>2];if(0<(e|0)){for(...
function Kh (line 5) | function Kh(){var b,i=a[1347593],f=D[i+244>>1],e=i+246|0,c=D[e>>1];if(f<...
function hj (line 5) | function hj(b,i){var f,e=b+244|0,c=D[e>>1];f=(b+246|0)>>1;var d=D[f];a:d...
function Et (line 5) | function Et(b,i){var f,e=0;f=(b+220|0)>>2;var c=a[f],d=a[c+(44*i&-1)+4>>...
function $l (line 5) | function $l(b,i){var f,e,c=h,d=a[i+236>>2];e=(b+220|0)>>2;f=a[e]>>2;var ...
function ij (line 5) | function ij(b,i,f){var e=a[i+216>>2],c=a[f+216>>2],d=(e|0)!=(c|0);if(m[5...
function Mh (line 5) | function Mh(c,i){var f=0,e=a[i>>2];if(0==(e|0)){var d;return 0}for(var k...
function Nh (line 5) | function Nh(c,i){var f=0,e=a[i>>2];if(0==(e|0)){var d;return 0}for(var k...
function Gt (line 5) | function Gt(b){for(b>>=2;;){var i=a[b+32];if(0==(i|0)){break}else{b=i,b>...
function Dt (line 5) | function Dt(b,i){var f=a[b+240>>2];return 0<=(i|0)?f=a[a[a[a[1347593]+22...
function Am (line 5) | function Am(c){if(0!=(c|0)){for(;;){var i=c+32|0;g[b>>3]=a[c+240>>2]|0;a...
function Ft (line 5) | function Ft(b,i,f){var e,c,d,j;j=(b+220|0)>>2;m[a[j]+(44*i&-1)+32|0]=0;v...
function fj (line 5) | function fj(b){var i=h,f=a[1347816];if(0!=(f|0)|0!=(a[1347621]|0)){if(f=...
function Ht (line 5) | function Ht(b,i){var f=b+20|0,e=wa(a[f>>2]);if(0!=(e|0)){for(;!(jj(b,e,i...
function jj (line 5) | function jj(b,i,f){var e,c=a[1347429];e=c>>2;if(0==(a[i+216>>2]|0)){f=0!...
function Em (line 5) | function Em(a,b){return(0==m[b+162|0]<<24>>24?0!=(Rc(a,b|0)|0):0)&1}
function Fm (line 5) | function Fm(b,i){do{if(1==m[i+162|0]<<24>>24&&1==(a[i+180>>2]|0)&&1==(a[...
function Cm (line 5) | function Cm(b){var i,f=D[b+244>>1],e=b+246|0;if(f<<16>>16<=D[e>>1]<<16>>...
function Dm (line 5) | function Dm(b){var i;if(0!=m[b+248|0]<<24>>24){var f=D[b+244>>1],e=b+246...
function yt (line 5) | function yt(c){var i=a[c+216>>2];a:do{if(0!=(i|0)){for(var f=i;;){var e=...
function Bt (line 5) | function Bt(b){var i,f,e,c=D[b+246>>1],d=b+244|0;if(c<<16>>16>=D[d>>1]<<...
function Jt (line 5) | function Jt(b){var i,f,b=b>>2;if(0<(a[b+51]|0)){f=a[b+50]>>2;var e=a[a[f...
function It (line 5) | function It(b,i,f,e){var c=0,d=m[f+162|0];if(d<<24>>24!=m[e+162|0]<<24>>...
function At (line 5) | function At(b,i,f){var e,c,d=0,j=a[1347427];c=j>>2;var b=(b+220|0)>>2,g=...
function zt (line 5) | function zt(b,i,f,e){var c,d=a[b+220>>2],j=a[d+(44*i&-1)+4>>2],g=a[d+(44...
function Jm (line 5) | function Jm(b,i,f,e){m[i+163|0]=1;a:do{if(0<(a[i+196>>2]|0)){var c=i+192...
function Im (line 5) | function Im(b,i){var f,e,c,d=0,j=a[a[b+220>>2]+(44*a[i+236>>2]&-1)+40>>2...
function mt (line 5) | function mt(c,i){if(0!=(a[c+216>>2]|0)){bm(c);Km(c);0!=m[5391452]<<24>>2...
function Km (line 5) | function Km(c){var i,f,e,d,k=a[c+220>>2];d=k>>2;e=(c+244|0)>>1;var j=D[e...
function Qt (line 5) | function Qt(b){var i=Y(b|0,5336452);return 0==(i|0)?2147483647:b=Xe(i,Mc...
function Rt (line 5) | function Rt(b){var i=0,f=D[b+244>>1],c=b+246|0,d=D[c>>1];if(f<<16>>16<=d...
function St (line 5) | function St(c,i){var f,e,d;Ut(c,c);a:do{if(0<D[c+246>>1]<<16>>16){var k=...
function Dh (line 5) | function Dh(c,i){var f=m[c+96|0];if(f<<24>>24!=m[i+96|0]<<24>>24){return...
function Xt (line 5) | function Xt(c,i,f,e,d){var k=c|0;g[b>>3]=i-e;a[k>>2]=a[b>>2];a[k+4>>2]=a...
function Tt (line 5) | function Tt(b){var b=(b+216|0)>>2,i=a[b];do{if(0==(i|0)){var f=0,c=0}els...
function Kt (line 5) | function Kt(b){var i=D[b+244>>1],f=b+246|0;if(i<<16>>16<=D[f>>1]<<16>>16...
function Lm (line 5) | function Lm(c,i){var f,e,d=i>>2,k=h;h=h+24|0;var j=k+8,m=k+16;if(2<=(a[d...
function Yt (line 5) | function Yt(c,i,f,e){var d=i+20|0;rk(i,a[a[d>>2]+152>>2]&1);var k=i+40|0...
function Zt (line 5) | function Zt(b,c,f,e,d){var g=a[c+20>>2],j=Qb(c);if((j|0)!=(c|0)){var h;(...
function Ut (line 5) | function Ut(b,c){var f=b+208|0;if(1<=(a[f>>2]|0)){for(var e=b+212|0,d=1;...
function Vt (line 5) | function Vt(c){var i,f=h;h=h+32|0;var e=f+16;i=(c+44|0)>>2;var d=a[i],k=...
function Wt (line 5) | function Wt(c,i,f){var e;e=c+208|0;a:do{if(1<=(a[e>>2]|0)){for(var d=c+2...
function Kc (line 5) | function Kc(b,c,f,e){var d=Z(184);a[d+16>>2]=b;a[d+12>>2]=c;65535<f&&au(...
function au (line 5) | function au(c){W(1,5339712,(l=h,h=h+12|0,g[b>>3]=c,a[l>>2]=a[b>>2],a[l+4...
function $t (line 5) | function $t(c,i){var f;a:do{if((a[c+32>>2]|0)==(c|0)){var e=D[c+244>>1],...
function bu (line 5) | function bu(c,i){var f,e,d,k,j=a[c+32>>2];k=a[j+220>>2]>>2;var h=D[c+246...
function cu (line 5) | function cu(c,i){var f,e,d,k,j=a[c+32>>2];e=a[j+220>>2]>>2;f=D[c+246>>1]...
function Pm (line 5) | function Pm(c){var i,f,e=c+32|0,d=a[e>>2],k=a[d+220>>2];f=(c+156|0)>>2;v...
function Qm (line 5) | function Qm(c,i){var f,e,d;d=(c+32|0)>>2;var k=a[d],j=a[k+220>>2];e=(c+1...
function Lt (line 5) | function Lt(b){if(0!=(b|0)){for(var c=b,b=c>>2;;){var f=c+176|0,e=f,d=c+...
function Nt (line 5) | function Nt(c){var i=a[c+216>>2];if(0!=(i|0)){for(;;){var f=i+256|0,e=a[...
function Om (line 5) | function Om(c){var i=h;kj(c);var f=a[c+264>>2],e=a[c+268>>2],d=D[c+244>>...
function kj (line 5) | function kj(c){var i,f=c+264|0;if(0==(a[f>>2]|0)){i=(c+32|0)>>2;var e=te...
function Ot (line 5) | function Ot(b){if((a[b+32>>2]|0)!=(b|0)){Om(b);var c=a[b+264>>2],f=a[b+2...
function Mm (line 5) | function Mm(c){var i=0,f=D[c+244>>1],e=c+246|0;a:do{if(f<<16>>16<=D[e>>1...
function Pt (line 5) | function Pt(c){kj(c);var i=c+208|0;if(1<=(a[i>>2]|0)){for(var f=c+212|0,...
function Nm (line 5) | function Nm(b){var c;c=(b+208|0)>>2;if(1<=(a[c]|0)){for(var b=(b+212|0)>...
function du (line 5) | function du(b,c){var f;if(1!=m[c+162|0]<<24>>24){return 0}f=a[a[c+256>>2...
function Mt (line 5) | function Mt(c){var i,f,e,d,k=0,j=h;h=h+8|0;d=j>>2;var l=a[c+220>>2],x=0=...
function eu (line 5) | function eu(b){var c;c=(b+4|0)>>2;var f=a[c];if(-1<(f|0)){for(b|=0;;){if...
function Rm (line 5) | function Rm(b,c){var f=0;if((b|0)==(c|0)){var e;return 1}for(var d=a[b+1...
function Rs (line 5) | function Rs(b){var c,f,e;e=(b+244|0)>>1;D[e]=32767;f=(b+246|0)>>1;D[f]=-...
function Sm (line 5) | function Sm(b){var c=Y(b|0,5379160),c=0==(c|0)?2147483647:Xe(c,Mc)*Lb(a[...
function qm (line 5) | function qm(c,i){var f=h;h=h+8|0;if(0!=(m[c+149|0]&1)<<24>>24){var e=c+2...
function fu (line 5) | function fu(b,c){var f=a[c+36>>2],e=a[f+20>>2],f=Fb(e,f);if(0!=(f|0)){fo...
function gu (line 5) | function gu(b,c){var f,e,d=0;e=(c+236|0)>>2;d=a[e];f=(c+232|0)>>2;var g=...
function hu (line 5) | function hu(b,c,f){var e=b+236|0;if(0==(a[e>>2]|0)&&0==(a[b+232>>2]|0)){...
function iu (line 5) | function iu(b,c){var f,e,d=b+20|0,g=wa(a[d>>2]);if(0==(g|0)){D[b+246>>1]...
function ju (line 5) | function ju(b){var c,f=b+224|0;c=(b+228|0)>>2;var e=a[c];a:do{if(0<(e|0)...
function mu (line 5) | function mu(b){var c=a[b+272>>2]+236|0,f=b+244|0;D[f>>1]=Za[f>>1]+a[c>>2...
function ku (line 5) | function ku(b,c){var f=c+250|0;if(0==m[f]<<24>>24&&(m[f]=1,nu(b,c),0!=(w...
function nu (line 5) | function nu(b,c){var f,e=0;f=(c+20|0)>>2;var d=wa(a[f]);a:do{if(0!=(d|0)...
function ou (line 5) | function ou(b){var c=0,f=a[b+216>>2];do{if(0==(f|0)){c=842}else{for(var ...
function lu (line 5) | function lu(b,c,f){var e;e=(c+20|0)>>2;c=wa(a[e]);if(0!=(c|0)){var d=f&2...
function rm (line 5) | function rm(b){var c=0,f=h;h=h+120|0;var e=b+40|0;a[1347832]=ha(a[a[e>>2...
function Tm (line 5) | function Tm(c,i,f,e){var d,k;k=c>>2;d=0;var j=h;h=h+8|0;for(var G=j+4,x=...
function pu (line 5) | function pu(c,i){var f,e,d,k,j,l,x,p,r,q=h;h=h+72|0;var u=q+4,v=q+8;r=(i...
function Nf (line 5) | function Nf(b,c,f){var e=h;h=h+1024|0;var d=e|0,g=Wa(f);wb(d,5352904,(l=...
function qu (line 5) | function qu(c){var c=a[a[c+16>>2]+8>>2],i=a[1310772];if((i|0)!=(a[131077...
function ru (line 5) | function ru(c){var c=a[a[c+16>>2]+8>>2],i=a[1310772];if((i|0)!=(a[131077...
function su (line 5) | function su(c,i,f){var e,d,k=h;h=h+1024|0;e=a[a[c+16>>2]+12>>2];Oh(c);Ph...
function Oh (line 5) | function Oh(c){var i,f,e,d=0,k=h;h=h+1040|0;var j=k+1024,c=(c+16|0)>>2;i...
function Ph (line 5) | function Ph(b){b=b+16|0;tu(a[b>>2]+16|0);Nf(a[a[b>>2]+12>>2],5345372,529...
function Qh (line 5) | function Qh(c,i,f,e){var d,k=h;h=h+1024|0;c=a[(c<<2)+5243020>>2];d=(c+4|...
function tu (line 5) | function tu(b){var c=h,f=E[b+1|0],e=E[b+2|0],d=E[b+3|0];wb(5295080,53786...
function Um (line 5) | function Um(b){b=b+16|0;tu(a[b>>2]+52|0);Nf(a[a[b>>2]+12>>2],5365240,529...
function uu (line 5) | function uu(c){var i=a[1310768];if((i|0)==(a[1310767]|0)){var f=c|0}else...
function vu (line 5) | function vu(b,c,f){var e=Hb(8232);a[1310754]=e;if(0==(a[b+208>>2]|0)){a[...
function wu (line 5) | function wu(c,i,f,e){var d=h,k=a[a[c+16>>2]+16>>2],j=a[1347858],G=e+24|0...
function yu (line 5) | function yu(b,c){var f,e=0,d=h;h=h+4|0;f=(c+32|0)>>2;var g=a[f];if(5==(g...
function lj (line 5) | function lj(c,i,f){f>>=2;1==(c|0)?(a[i>>2]=1,g[b>>3]=10):2==(c|0)?(a[i>>...
function zu (line 5) | function zu(b,c,f,e){var d=0;a[b>>2]=0;for(var g=a[1314668],j=195075,h=-...
function Au (line 5) | function Au(c,i,f){var e,d=h;h=h+12|0;var k=d+4,j=a[c+16>>2];e=j>>2;var ...
function Bu (line 5) | function Bu(c,i,f,e,d,k){var j,m,x,e=h;h=h+92|0;var d=e+4,p=e+12,r=e+76,...
function Vm (line 5) | function Vm(c,i,f,e){var d=h;a:do{if(0<(f|0)){for(var k=c,j=0;;){var m=(...
function xu (line 5) | function xu(b){var c=h,f=a[1314629];0==(f|0)&&(a[1314628]=64,f=Hb(64),a[...
function Cu (line 5) | function Cu(b){var c=a[b+16>>2],f=a[b+64>>2];if(1==(f|0)){var f=c+148|0,...
function mj (line 5) | function mj(c,i,f,e,d,k,j,G){var x,p=h;if(!(0==(f|0)|0==(e|0))){(a[13133...
function Du (line 5) | function Du(b){var c,f=b>>2,e=h;h=h+8|0;var d=a[f+4];m[5246996]=0;c=(b+1...
function Eu (line 5) | function Eu(c){var d,f=c>>2,e=h,n=a[f+112],k=a[f+113],j=a[f+114],m=a[f+1...
function Fu (line 5) | function Fu(c,d,f,e){var n;n=(c+16|0)>>2;do{if(0!=(e|0)){var k=a[n],j=k+...
function Gu (line 5) | function Gu(c,d,f,e,n,k){e=(c+16|0)>>2;do{if(0!=(k|0)){var n=a[e],j=n+76...
function he (line 5) | function he(c,d){var f=h;if(0!=(d|0)){var e=a[a[c+16>>2]+4>>2],n=d|0,n=(...
function Rh (line 5) | function Rh(c){var d=0,f=h,e=c+16|0,n=a[e>>2],k=n+96|0,n=a[n+104>>2];tg(...
function Hu (line 5) | function Hu(c,d,f,e){var n=h,k=a[c+16>>2];z(c,5368104);var j=m[e+72|0]<<...
function Sh (line 5) | function Sh(c,d){var f,e=h,n=a[c+16>>2];f=n>>2;z(c,5373132);if(0==(d|0))...
function Iu (line 5) | function Iu(b,c){var f=h,d=c,c=h;h=h+36|0;for(var d=d>>2,g=c>>2,k=d+9;d<...
function Ju (line 5) | function Ju(c,d,f,e){var n=h,k=a[c+16>>2];if(0!=(a[k+88>>2]|0)){var j=e+...
function Ku (line 5) | function Ku(c,d,f){var e,n,k,j=a[c+16>>2];k=(j+88|0)>>2;if(0!=(a[k]|0)){...
function Lu (line 5) | function Lu(c,d,f,e){var n,k=a[c+16>>2];n=(k+88|0)>>2;0!=(a[n]|0)&&(Th(c...
function Th (line 5) | function Th(b){0==m[b+140|0]<<24>>24?z(b,5364872):z(b,a[b+144>>2])}
function Of (line 5) | function Of(b,c){var f=h,d=c,c=h;h=h+36|0;for(var d=d>>2,g=c>>2,k=d+9;d<...
function Eg (line 5) | function Eg(b){var c,f=h;c=a[b+16>>2]>>2;var d=a[c+3];if(1==(d|0)){var g...
function be (line 5) | function be(b){var c=0,f=h;h=h+16|0;var d=a[1314039];if(0==(d|0)){a[1314...
function Mu (line 5) | function Mu(c){var d=h,f=a[c+16>>2],e=c+228|0,n=c+212|0;a[1314583]=(a[b>...
function Nu (line 5) | function Nu(c,d,f,e){var n,k=h,j=a[c+16>>2],G=m[e+72|0]<<24>>24;if(114==...
function nj (line 5) | function nj(c){var d=h,f=a[c+16>>2];z(c,5350740);Ou(c,f+16|0);var e=f+96...
function Ou (line 5) | function Ou(b,c){var f=h,d=c,c=h;h=h+36|0;for(var d=d>>2,g=c>>2,k=d+9;d<...
function Wm (line 5) | function Wm(b,c){if(0==(c|0)){z(b,5343940)}else{var f=a[b+16>>2];z(b,534...
function Pu (line 5) | function Pu(c,d,f){var e,n=d>>2,k=0,j=h;h=h+72|0;e=f>>2;f=h;h=h+32|0;a[f...
function ce (line 5) | function ce(b){var c;c=(b+4|0)>>2;var f=a[c],d=b|0,g=a[d>>2];a:do{if(0==...
function Qu (line 5) | function Qu(c,d,f){var e,n=h;e=f>>2;f=h;h=h+32|0;a[f>>2]=a[e];a[f+4>>2]=...
function Ru (line 5) | function Ru(c,d,f){var e,n=h;e=f>>2;f=h;h=h+32|0;a[f>>2]=a[e];a[f+4>>2]=...
function Sp (line 5) | function Sp(b){var c,f,d,g=Hb(476);d=g>>2;if(0==(g|0)){return 0}var k=g+...
function Su (line 5) | function Su(b,c){var f,d=b>>2;a[d+66]=156;a[(b+252|0)>>2]=438;f=0==(c|0)...
function Xm (line 5) | function Xm(b,c){var f,d=0;f=(b+12|0)>>2;for(var g=b+8|0,k=c;;){var j=a[...
function Uu (line 5) | function Uu(b){var c,f,d,g=0,k=a[b+340>>2],j=b+400|0;d=(b+412|0)>>2;f=(b...
function Ek (line 5) | function Ek(b){var c,f,d=b>>2;if(0!=(b|0)){var g=b+352|0;f=(b+20|0)>>2;f...
function Ym (line 5) | function Ym(b,c){if(0!=(b|0)){for(var f=c+20|0,d=b;;){var g=a[d+4>>2];B[...
function rj (line 5) | function rj(b){var c=a[b>>2];a:do{if(0!=(c|0)){for(var f=b+20|0,d=c;;){v...
function Zm (line 5) | function Zm(b,c){var f=a[c>>2];a[b>>2]=f;a[b+4>>2]=(a[c+8>>2]<<2)+f|0}
function sj (line 5) | function sj(b){for(var c=0,f=b|0,b=a[b+4>>2],d=a[f>>2];;){if((d|0)==(b|0...
function Vu (line 5) | function Vu(b,c,f){var d,g=h;h=h+8|0;var k=b+20|0;Zm(g,k);var j=sj(g),f=...
function yk (line 5) | function yk(b,c,f,d){var g,k,j,l,x,p=b>>2,r=0,q=h;h=h+4|0;x=q>>2;l=(b+46...
function Wu (line 5) | function Wu(b){var c=b+472|0;if(0==(a[c>>2]|0)){var f=a,c=c>>2;Date.now(...
function Xu (line 5) | function Xu(b,c){var f,d,g,k=b>>2;d=a[k+116];if(3==(d|0)){a[k+67]=33,k=0...
function Yu (line 5) | function Yu(b,c,f){var d,g,k,j=b>>2;k=(b+464|0)>>2;d=a[k];if(2==(d|0)){r...
function wk (line 5) | function wk(b){var c=b+272|0,f=a[c>>2];if(0!=(f|0)){var d=b+280|0,g=a[d>...
function zc (line 5) | function zc(b,c,f,d){var g,k=h;h=h+8|0;g=k>>2;var j=k+4;a[g]=f;if(0!=m[c...
function Kb (line 5) | function Kb(b){var c,f,d,g;d=b>>2;f=(b+4|0)>>2;var k=a[f];c=(b+16|0)>>2;...
function $m (line 5) | function $m(a,b){var c=m[b];if(0==c<<24>>24){var d;return a}for(var g=b,...
function Qd (line 5) | function Qd(b,c,f,d){var g,k,j=0;k=(c+8|0)>>2;var h=a[k];a:do{if(0==(h|0...
function tj (line 5) | function tj(b){var c=b+8|0,f=b+16|0,d=a[a[f>>2]+8>>2],b=b|0,g=a[b>>2];if...
function qj (line 5) | function qj(b,c,f,d,g){var k,j=b>>2,h=0,l=m[d],p=0==l<<24>>24,r=c|0,q=a[...
function Zu (line 5) | function Zu(b,c,f,d){var g,k,j,l=b>>2,x=h;h=h+20|0;j=x>>2;var p=x+4,r=x+...
function av (line 5) | function av(b,c,f,d){c=Fg(b,1,a[b+144>>2],c,f,d,0==m[b+468|0]<<24>>24&1)...
function Fg (line 5) | function Fg(b,c,f,d,g,k,j){var l,x,p,r,q,u,v,t,w,y,A,C,z,D,E,H,I,J,M,Q,L...
function bn (line 5) | function bn(b){for(var c,f=0,d=b+16|0,b=b+348|0;;){var g=a[b>>2];if(0==(...
function Lc (line 5) | function Lc(b,c,f,d){if(0==(vj(b,c,f,d)|0)){return 0}c=(b+12|0)>>2;f=a[c...
function cv (line 5) | function cv(b,c){var f,d,g,k,j=h;h=h+4|0;k=(b+288|0)>>2;f=a[k];if(0==(f|...
function bv (line 5) | function bv(b){var c,f,d,g,k=0,j=h;h=h+8|0;var l=a[b+340>>2];g=(l+136|0)...
function cn (line 5) | function cn(b,c,f,d,g){var k,j,h,l,p,r,q,u,v,t,w,y,A,C,z,D,H,I=b>>2,J=0,...
function ev (line 5) | function ev(a){for(var b=0;;){var c=m[a];if(0==c<<24>>24){b=2801;break}e...
function uj (line 5) | function uj(b,c,f,d){var g,k,j=d>>2,l=0,x=h;h=h+4|0;k=x>>2;a[b+264>>2]=2...
function dn (line 5) | function dn(b,c,f,d,g,k){var j,l,x,p,r,q=0,u=h;h=h+16|0;r=u>>2;var v=u+4...
function en (line 5) | function en(b,c,f,d){var g=b+64|0;if(0==(a[g>>2]|0)){if(0==(a[b+80>>2]|0...
function fn (line 5) | function fn(b,c,f,d){var g=b+68|0;if(0==(a[g>>2]|0)){if(0==(a[b+80>>2]|0...
function jn (line 5) | function jn(b,c,f,d){c=Fg(b,0,a[b+144>>2],c,f,d,0==m[b+468|0]<<24>>24&1)...
function gn (line 5) | function gn(b,c){var f,d,g=0;f=a[b+340>>2];var k=c|0,j=f+80|0;d=(f+92|0)...
function hn (line 5) | function hn(b,c,f,d){var g,k=0,j=a[b+340>>2],h=j+80|0;g=(j+92|0)>>2;var ...
function dv (line 5) | function dv(b,c,f,d,g,k){b=kn(b,c,f,d,g,k);if(0!=(b|0)){return b}b=(k+12...
function kn (line 5) | function kn(b,c,f,d,g,k){var j,l,x,p,r,q=b>>2,u=0,v=h;h=h+8|0;r=v>>2;var...
function vj (line 5) | function vj(b,c,f,d){var g=0,k=h;h=h+4|0;a[k>>2]=f;f=b+12|0;if(0==(a[f>>...
function fv (line 5) | function fv(b,c,f,d){var g=b>>2,k=h;h=h+4|0;var j=b+284|0,l=a[j>>2];if(0...
function an (line 5) | function an(b,c){var f,d,g=b>>2,k=h;h=h+1036|0;var j=a[g+31];if(0==(j|0)...
function hv (line 5) | function hv(b,c,f,d){var g=h;h=h+4|0;a[g>>2]=c;var k=b+144|0,j=a[k>>2],j...
function iv (line 5) | function iv(b,c,f,d,g,k,j,l){var x,p,r,q,u,v,t,w,y,A,C,z,D,H,I,J,M,Q,W,L...
function ln (line 5) | function ln(a){var b=m[a];if(0!=b<<24>>24){for(var c=a,d=a;;){var g=b<<2...
function pj (line 5) | function pj(b,c){m[b+4|0]=0;a[b+8>>2]=0;a[b+12>>2]=0;a[b>>2]=0;a[b+16>>2...
function Ab (line 5) | function Ab(b){a[b>>2]=138}
function mn (line 5) | function mn(b,c,f,d){var g,k=a[b+340>>2];g=k>>2;c=Lc(k+80|0,c,f,d);if(0=...
function nn (line 5) | function nn(b,c,f,d,g,k){var j;j=0;var h=0==d<<24>>24,d=(b+12|0)>>2,l=a[...
function jv (line 5) | function jv(b,c,f,d){var g,k=b>>2,j=0,l=h;h=h+8|0;g=l>>2;var x=l+4,p=a[k...
function on (line 5) | function on(b){var c,f,d=b>>2,g=a[d+85],b=(g+164|0)>>2;if(0==(a[b]|0)){f...
function pn (line 5) | function pn(b,c,f,d,g){var k,j,h=f>>2;j=(a[b+340>>2]+144|0)>>2;k=a[a[j]+...
function oj (line 5) | function oj(b,c){var f;f=b>>2;a[f]=0;a[f+1]=0;a[f+2]=0;a[f+3]=0;a[f+4]=0...
function kv (line 5) | function kv(b,c,f,d,g){var k,j=b>>2,h=0;if(15==(c|0)|-4==(c|0)){var m=0}...
function lv (line 5) | function lv(b,c){var d=b>>2;if(24==(c|0)){var e=b+4|0,g=a[e>>2]-1|0;a[e>...
function mv (line 5) | function mv(b,c,d,e){var g=e>>2,k=b>>2,j=0;a:do{if((c|0)==(d|0)){var h=-...
function ov (line 5) | function ov(a,b,c){var d=0,a=a+72|0;a:for(;;){var g=m[b],k=E[a+(g&255)|0...
function pv (line 5) | function pv(b,c,d,e){var g=e>>2,k=0;if((c|0)==(d|0)){return-4}var j=b+72...
function rv (line 5) | function rv(b,c,d,e){var e=e>>2,g=0;if((c|0)==(d|0)){return-4}var k=b+72...
function sv (line 5) | function sv(b,c,d,e){var g=e>>2,k=0;do{if((c|0)==(d|0)){var j=-4}else{fo...
function tv (line 5) | function tv(b,c,d,e){var g=e>>2,k=0;do{if((c|0)==(d|0)){var j=-4}else{fo...
function uv (line 5) | function uv(b,c,d,e){var g=e>>2,b=b+72|0,k=0,j=0,h=1;a:for(;;){var l=c+1...
function vv (line 5) | function vv(a,b,c){a=c-b|0;if(4==(a|0)){if(a=m[b]<<24>>24,113==(a|0)){if...
function un (line 5) | function un(b,c,d,e){if(c>>>0<d>>>0){for(var g=b+72|0,b=(e+4|0)>>2,e=(e|...
function Gg (line 5) | function Gg(a,b){if(0>(a|0)){return 0}if(128>(a|0)){return m[b]=a&255,1}...
function Vh (line 5) | function Vh(a){var b=0,c=a>>8;if(255==(c|0)){if(2>(a-65534|0)>>>0){var d...
function wv (line 5) | function wv(a,b){for(var c=0,d=a,g=b;;){var k=m[d],j=m[g],k=26>(k-97&255...
function gv (line 5) | function gv(b,c,d,e){for(var g,k=b>>2,j=0,h=0;;){if(m[b+h|0]=m[h+5254036...
function xv (line 5) | function xv(b,c,d,e,g){var k=0,j=h;h=h+4|0;var l=b+364|0,x=b+884|0,p=b+3...
function Tu (line 5) | function Tu(b,c,d){d=yv(d);if(-1==(d|0)){return 0}m[b+69|0]=d&255;a[b>>2...
function yv (line 5) | function yv(b){a:do{if(0==(b|0)){var c=6}else{for(var d=0;;){if(6<=(d|0)...
function $u (line 5) | function $u(b,c,d,e,g,k,j,l,x,p){var r,q,u,v,t,g=g>>2,w=h;h=h+16|0;t=w>>...
function zv (line 5) | function zv(b,c,d,e){var g=e>>2,k=0;a:do{if((c|0)==(d|0)){var j=-4}else{...
function Cv (line 5) | function Cv(b,c,d,e){var g=e>>2,k=0;if((c|0)==(d|0)){return-4}var j=d-c|...
function Ev (line 5) | function Ev(b,c,d,e){var e=e>>2,g=0;if((c|0)==(d|0)){return-4}var k=d-c|...
function Fv (line 5) | function Fv(b,c,d,e){var g=e>>2,k=0;do{if((c|0)==(d|0)){var j=-4}else{fo...
function Gv (line 5) | function Gv(b,c,d,e){var g=e>>2,k=0;if((c|0)==(d|0)){return-4}for(var j=...
function Hv (line 5) | function Hv(a,b,c){var d=0,a=a+72|0;a:for(;;){var g=b+1|0,k=m[g],j=m[b],...
function Iv (line 5) | function Iv(a,b,c){a=(c-b|0)/2&-1;if(4==(a|0)){if(0==m[b+1|0]<<24>>24){i...
function Jv (line 5) | function Jv(b,c,d,e,g){var b=e>>2,c=c>>2,e=0,k=a[c];a:for(;;){if((k|0)==...
function Kv (line 5) | function Kv(b,c,d,e){var g=e>>2,b=b+72|0,k=0,j=0,h=1;a:for(;;){var l=c+2...
function Lv (line 5) | function Lv(a,b){var c=0,d=b+4|0;a:do{if(0==m[b+5|0]<<24>>24){if(120!=m[...
function Mv (line 5) | function Mv(b,c,d,e){if(c>>>0<d>>>0){for(var g=b+72|0,b=(e+4|0)>>2,e=(e|...
function M (line 5) | function M(a,b){var c=0,d=a&255;if(216==(d|0)|217==(d|0)|218==(d|0)|219=...
function Wh (line 5) | function Wh(b,c,d,e){var g=e>>2,k=0;a:do{if((c|0)==(d|0)){var j=-1}else{...
function wn (line 5) | function wn(b,c,d,e){var e=e>>2,g=0;a:do{if((c|0)==(d|0)){var k=-1}else{...
function Nv (line 5) | function Nv(b,c,d,e){var g=0;if((c|0)==(d|0)){var k;return-1}var j=m[c+1...
function Ov (line 5) | function Ov(b,c,d,e){var g=0;if((c|0)==(d|0)){var k;return-1}var j=m[c+1...
function Dv (line 5) | function Dv(b,c,d,e){var g=e>>2,k=0;a:do{if((c|0)==(d|0)){var j=-1}else{...
function yn (line 5) | function yn(b,c,d,e){var g=0;if((c|0)==(d|0)){var k;return-1}do{if(0==m[...
function vn (line 5) | function vn(b,c,d,e){var e=e>>2,g=0,k=h;h=h+4|0;a:do{if((c|0)==(d|0)){va...
function Rv (line 5) | function Rv(b,c,d){a[d>>2]=11;do{if(6==(c-b|0)){if(0!=m[b+1|0]<<24>>24){...
function Pv (line 5) | function Pv(b,c,d,e){var e=e>>2,g=0;if((c|0)==(d|0)){var k;return-1}var ...
function Qv (line 5) | function Qv(b,c,d,e){var g=e>>2,k=0,j=h;h=h+4|0;e=j>>2;a[e]=c;var l=b+72...
function xn (line 5) | function xn(b,c,d,e,g){for(var k=0,c=c+72|0;;){if((d|0)==(e|0)){var j=-1...
function Av (line 5) | function Av(b,c,d,e){var g=e>>2,k=0;if((c|0)==(d|0)){var j;return-1}var ...
function Bv (line 5) | function Bv(b,c,d,e){var e=e>>2,g=0;a:do{if((c|0)==(d|0)){var k=-1}else{...
function Sv (line 5) | function Sv(b,c,d,e){var g=e>>2,k=0;a:do{if((c|0)==(d|0)){var j=-4}else{...
function Vv (line 5) | function Vv(b,c,d,e){var g=e>>2,k=0;if((c|0)==(d|0)){return-4}var j=d-c|...
function Xv (line 5) | function Xv(b,c,d,e){var e=e>>2,g=0;if((c|0)==(d|0)){return-4}var k=d-c|...
function Yv (line 5) | function Yv(b,c,d,e){var g=e>>2,k=0;do{if((c|0)==(d|0)){var j=-4}else{fo...
function Zv (line 5) | function Zv(b,c,d,e){var g=e>>2,k=0;if((c|0)==(d|0)){return-4}for(var j=...
function $v (line 5) | function $v(a,b,c){a=(c-b|0)/2&-1;if(3==(a|0)){if(0==m[b]<<24>>24&&97==m...
function aw (line 5) | function aw(a,b,c){var d=0,a=a+72|0;a:for(;;){var g=m[b],k=b+1|0,j=m[k],...
function bw (line 5) | function bw(b,c,d,e){var g=e>>2,b=b+72|0,k=0,j=0,h=1;a:for(;;){var l=c+2...
function cw (line 5) | function cw(a,b){var c=0,d=b+4|0,g=m[d];a:do{if(0==g<<24>>24){if(120!=m[...
function dw (line 5) | function dw(b,c,d,e){if(c>>>0<d>>>0){for(var g=b+72|0,b=(e+4|0)>>2,e=(e|...
function ew (line 5) | function ew(b,c,d,e,g){var b=e>>2,c=c>>2,e=0,k=a[c];a:for(;;){if((k|0)==...
function Xh (line 5) | function Xh(b,c,d,e){var g=e>>2,k=0;a:do{if((c|0)==(d|0)){var j=-1}else{...
function zn (line 5) | function zn(b,c,d,e){var e=e>>2,g=0;a:do{if((c|0)==(d|0)){var k=-1}else{...
function fw (line 5) | function fw(b,c,d,e){var g=0;if((c|0)==(d|0)){var k;return-1}var j=m[c],...
function gw (line 5) | function gw(b,c,d,e){var g=0;if((c|0)==(d|0)){var k;return-1}var j=m[c],...
function Wv (line 5) | function Wv(b,c,d,e){var g=e>>2,k=0;a:do{if((c|0)==(d|0)){var j=-1}else{...
function Cn (line 5) | function Cn(b,c,d,e){var g=0;if((c|0)==(d|0)){var k;return-1}do{if(0==m[...
function Bn (line 5) | function Bn(b,c,d,e){var e=e>>2,g=0,k=h;h=h+4|0;a:do{if((c|0)==(d|0)){va...
function jw (line 5) | function jw(b,c,d){a[d>>2]=11;do{if(6==(c-b|0)){if(0!=m[b]<<24>>24){var ...
function hw (line 5) | function hw(b,c,d,e){var e=e>>2,g=0;if((c|0)==(d|0)){var k;return-1}var ...
function iw (line 5) | function iw(b,c,d,e){var g=e>>2,k=0,j=h;h=h+4|0;e=j>>2;a[e]=c;var l=b+72...
function An (line 5) | function An(b,c,d,e,g){for(var k=0,c=c+72|0;;){if((d|0)==(e|0)){var j=-1...
function kw (line 5) | function kw(b,c,d,e,g){for(var k=0,j=b+72|0,h=a[c>>2],l=a[e>>2],b=l>>1;;...
function lw (line 5) | function lw(a,b){var c=0,d=m[b+2|0];if(-1<d<<24>>24){return 1}var g=m[b]...
function mw (line 5) | function mw(a,b){var c=E[b+3|0];if(0==(c&128|0)|192==(c&192|0)){return 1...
function Uv (line 5) | function Uv(b,c,d,e){var g=e>>2,k=0;if((c|0)==(d|0)){var j;return-1}var ...
function Tv (line 5) | function Tv(b,c,d,e){var e=e>>2,g=0;a:do{if((c|0)==(d|0)){var k=-1}else{...
function pf (line 5) | function pf(a){return 32==(a|0)|13==(a|0)|10==(a|0)|9==(a|0)?1:0}
function wj (line 5) | function wj(b,c,d,e,g,k,j){var h=j>>2,l=0;if((c|0)==(d|0)){return a[e>>2...
function Ce (line 5) | function Ce(b,c,d){var e=h;h=h+12|0;var g=e+4,k=e+8;a[e>>2]=c;c=g|0;a[k>...
function Dn (line 5) | function Dn(b,c,d,e,g){var k;if((d|0)==(e|0)){return-4}k=a[b+72>>2]>>2;v...
function Uh (line 5) | function Uh(b,c,d,e){var g=e>>2,k=0;a:do{if((c|0)==(d|0)){var j=-1}else{...
function qn (line 5) | function qn(b,c,d,e){var e=e>>2,g=0;a:do{if((c|0)==(d|0)){var k=-1}else{...
function qv (line 5) | function qv(b,c,d,e){var g=e>>2,k=b>>2,j=0;a:do{if((c|0)==(d|0)){var h=-...
function sn (line 5) | function sn(b,c,d,e){var e=e>>2,g=0;a:do{if((c|0)==(d|0)){var h=-1}else{...
function rn (line 5) | function rn(b,c,d,e){var e=e>>2,g=0,k=h;h=h+4|0;a:do{if((c|0)==(d|0)){va...
function nw (line 5) | function nw(b,c,d,e){var e=e>>2,g=0;a:do{if((c|0)==(d|0)){var h=-1}else{...
function pw (line 5) | function pw(b,c,d){a[d>>2]=11;do{if(3==(c-b|0)){var e=m[b]<<24>>24;if(12...
function ow (line 5) | function ow(b,c,d,e){var g=e>>2,k=0,j=h;h=h+4|0;e=j>>2;a[e]=c;var l=b+72...
function tn (line 5) | function tn(b,c,d,e,g){for(var g=g>>2,h=0,j=c+72|0,l=c+352|0,m=c+356|0,p...
function nv (line 5) | function nv(b,c,d,e){var e=e>>2,g=0;a:do{if((c|0)==(d|0)){var h=-1}else{...
function Hb (line 5) | function Hb(b){do{if(245>b>>>0){var c=11>b>>>0?16:b+11&-8,d=c>>>3,e=a[13...
function qw (line 5) | function qw(b){var c,d,e=a[1346943],g=(e&-e)-1|0,e=g>>>12&16,h=g>>>(e>>>...
function rw (line 5) | function rw(b){var c,d,e,g,h,j=b>>2,l=0,m=-b|0,p=b>>>8;if(0==(p|0)){var ...
function sw (line 5) | function sw(b){var c,d=0;0==(a[1313365]|0)&&tw();a:do{if(0==(a[1347052]&...
function ww (line 5) | function ww(){var b;0==(a[1313365]|0)&&tw();b=a[1346948];if(0!=(b|0)){va...
function H (line 5) | function H(b){var c,d,e,g,h,j,l,m=b>>2,p=0;if(0!=(b|0)){var r=b-8|0,q=a[...
function En (line 5) | function En(b){var c,d=0,e=5388212;for(c=e>>2;;){var g=a[c];if(g>>>0<=b>...
function xj (line 5) | function xj(b,c){var d=b+8|0,d=0==(d&7|0)?0:-d&7,e=c-d|0;a[1346948]=b+d|...
function uc (line 5) | function uc(b,c){if(0==(b|0)){var d=0}else{d=Math.a(c,b),d=65535<(c|b)>>...
function cc (line 5) | function cc(a,b){return 0==(a|0)?Hb(b):xw(a,b)}
function xw (line 5) | function xw(b,c){var d,e,g=0;if(4294967231<c>>>0){return a[fb.d>>2]=12,0...
function tw (line 5) | function tw(){if(0==(a[1313365]|0)){var b=Mw();0!=(b-1&b|0)&&ba();a[1313...
function uw (line 5) | function uw(b,c,d){var e,g,h,j=c>>2,l=b>>2,m=0,p=b+8|0,p=0==(p&7|0)?0:-p...
function vw (line 5) | function vw(b,c){var d,e,g=0,h=a[1346948];e=h>>2;var j=En(h),l=a[j>>2];d...
function Cj (line 5) | function Cj(a){function b(){var c=0;Nn=vc;I._main&&($h(yw),c=I.Pa(a),I.n...
function m (line 5) | function m(c){function f(c){l||Q.$(a,b,c,d,g);h&&h();ai("cp "+p)}var u=X...
function e (line 5) | function e(a){a===Mc||10===a?(g.M(g.buffer.join("")),g.buffer=[]):g.buff...
function a (line 5) | function a(b){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",...
function i (line 5) | function i(a){l||(l=vc,I.preloadedAudios[c]=a,d&&d(b))}
function h (line 5) | function h(){l||(l=vc,I.preloadedAudios[c]=new Audio,g&&g())}
function a (line 5) | function a(){var b=Xd;if((document.webkitFullScreenElement||document.web...
function b (line 5) | function b(){Sb.ib=document.pointerLockElement===c||document.mozPointerL...
function b (line 5) | function b(){for(var a=0;3>a;a++){e.push(0)}}
FILE: src/viz_visualizer.js
function nodes (line 59) | function nodes() {
function edges (line 65) | function edges() {
function fields (line 82) | function fields() {
function prototype (line 92) | function prototype() {
Condensed preview — 53 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,630K chars).
[
{
"path": ".gitignore",
"chars": 426,
"preview": "# Mac OS X\n.DS_Store\n\n# WebStorm\n.idea/workspace.xml\n\n# npm\nnode_modules/**/.bin/\n\n\n### npm modules' build artifacts ###"
},
{
"path": ".idea/.name",
"chars": 20,
"preview": "12_object_playground"
},
{
"path": ".idea/12_object_playground.iml",
"chars": 359,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\">\n"
},
{
"path": ".idea/dictionaries/jshore.xml",
"chars": 143,
"preview": "<component name=\"ProjectDictionaryState\">\n <dictionary name=\"jshore\">\n <words>\n <w>proto</w>\n </words>\n </d"
},
{
"path": ".idea/encodings.xml",
"chars": 220,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\" useUTFGuessing=\"true\" native2A"
},
{
"path": ".idea/jsLibraryMappings.xml",
"chars": 243,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"JavaScriptLibraryMappings\">\n <exclude"
},
{
"path": ".idea/libraries/sass_stdlib.xml",
"chars": 227,
"preview": "<component name=\"libraryTable\">\n <library name=\"sass-stdlib\">\n <CLASSES />\n <SOURCES>\n <root url=\"file://$AP"
},
{
"path": ".idea/modules.xml",
"chars": 294,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": ".idea/scopes/scope_settings.xml",
"chars": 139,
"preview": "<component name=\"DependencyValidationManager\">\n <state>\n <option name=\"SKIP_IMPORT_STATEMENTS\" value=\"false\" />\n </"
},
{
"path": ".idea/vcs.xml",
"chars": 180,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "Jakefile.js",
"chars": 3215,
"preview": "// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.\n/*global desc, task, jake, fa"
},
{
"path": "LICENSE.TXT",
"chars": 1071,
"preview": "License\n-------\nCopyright (c) 2013 James Shore\n\nPermission is hereby granted, free of charge, to any person obtaining a\n"
},
{
"path": "build/config/karma.conf.js",
"chars": 1804,
"preview": "// Karma configuration\n// Generated on Tue Sep 24 2013 14:33:42 GMT-0700 (PDT)\n(function() {\n\t\"use strict\";\n\n\tmodule.exp"
},
{
"path": "build/util/build_command.js",
"chars": 576,
"preview": "// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.\n(function() {\n\t\"use strict\";\n"
},
{
"path": "build/util/karma_runner.js",
"chars": 2182,
"preview": "// Copyright (c) 2012-2015 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.\n\n// Helper functions for"
},
{
"path": "build/util/lint_runner.js",
"chars": 1018,
"preview": "// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.\n\"use strict\";\n\nvar jshint = r"
},
{
"path": "build/util/nodeunit_runner.js",
"chars": 391,
"preview": "// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.\n(function() {\n\t\"use strict\";\n"
},
{
"path": "build/util/sh.js",
"chars": 1027,
"preview": "// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.\n(function() {\n\t\"use strict\";\n"
},
{
"path": "build/util/version_checker.js",
"chars": 1475,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.\n(function() {\n\t\"use strict\";\n"
},
{
"path": "convert_sample.pl",
"chars": 594,
"preview": "#!/usr/bin/perl\n\n# Converts input into JavaScript. Intended to make it easier to generate code samples.\n# To use:\n# 1. R"
},
{
"path": "deploy.bat",
"chars": 32,
"preview": "call jake -f deploy.jakefile %*\n"
},
{
"path": "deploy.jakefile",
"chars": 2803,
"preview": "// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.\n/*global desc, task, jake, fa"
},
{
"path": "deploy.sh",
"chars": 32,
"preview": "./jake.sh -f deploy.jakefile $*\n"
},
{
"path": "integrate.bat",
"chars": 35,
"preview": "call jake -f integrate.jakefile %*\n"
},
{
"path": "integrate.jakefile",
"chars": 1404,
"preview": "// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.\n/*global desc, task, jake, fa"
},
{
"path": "integrate.sh",
"chars": 35,
"preview": "./jake.sh -f integrate.jakefile $*\n"
},
{
"path": "jake.bat",
"chars": 93,
"preview": "@echo off\nif not exist node_modules\\.bin\\jake.cmd call npm rebuild\nnode_modules\\.bin\\jake %*\n"
},
{
"path": "jake.sh",
"chars": 84,
"preview": "#!/bin/sh\n\n[ ! -f node_modules/.bin/jake ] && npm rebuild\nnode_modules/.bin/jake $*\n"
},
{
"path": "package.json",
"chars": 721,
"preview": "{\n \"name\": \"12_object_playground\",\n \"version\": \"1.0.0\",\n \"description\": \"A tool for visualizing and experimenting wit"
},
{
"path": "readme.md",
"chars": 3661,
"preview": "Object Playground\n=============\n\nObject Playground is a tool for visualizing and experimenting with JavaScript object re"
},
{
"path": "src/_object_graph_test.js",
"chars": 6791,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.\n(function() {\n\t\"use strict\";\n"
},
{
"path": "src/_object_node_test.js",
"chars": 7230,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.\n\n(function() {\n\t\"use strict\";"
},
{
"path": "src/_ui_test.js",
"chars": 4677,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.\n(function() {\n\t\"use strict\";\n"
},
{
"path": "src/_user_code_test.js",
"chars": 1043,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.\n(function() {\n\t\"use strict\";\n"
},
{
"path": "src/_viz_visualizer_test.js",
"chars": 3026,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.\n(function() {\n\t\"use strict\";\n"
},
{
"path": "src/index.html",
"chars": 41799,
"preview": "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <title>Object Playground: The Definitive Guide to Object-Oriented JavaScript</title"
},
{
"path": "src/object_graph.js",
"chars": 4431,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.\n\nwindow.jdls = window.jdls ||"
},
{
"path": "src/object_node.js",
"chars": 4146,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.\n\nwindow.jdls = window.jdls ||"
},
{
"path": "src/site.css",
"chars": 9431,
"preview": "html, body, div, span, applet, object, iframe,\r\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\r\na, abbr, acronym, address, "
},
{
"path": "src/ui.js",
"chars": 2703,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.\n\nwindow.jdls = window.jdls ||"
},
{
"path": "src/user_code.js",
"chars": 3578,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.\n\nwindow.jdls = window.jdls ||"
},
{
"path": "src/viz/.gitattributes",
"chars": 12,
"preview": "viz.js -diff"
},
{
"path": "src/viz/.gitignore",
"chars": 66,
"preview": "graphviz-src.tar.gz\ngraphviz-src\nlibexpat-src\nlibexpat-src.tar.gz\n"
},
{
"path": "src/viz/COPYING",
"chars": 14461,
"preview": "* The original parts of this project (including files used in compiling the viz.js file) are made available under the fo"
},
{
"path": "src/viz/Makefile",
"chars": 4520,
"preview": "# To compile, emcc must be in your path or EMSCRIPTEN_ROOT must be set.\nEMCC:=$(shell if command -v emcc > /dev/null; th"
},
{
"path": "src/viz/README.txt",
"chars": 311,
"preview": "Viz.js\n======\n\nSimple Graphviz for the web, compiled with Emscripten.\n\nTo render as SVG (produces an XML string):\n\n svg"
},
{
"path": "src/viz/config.h",
"chars": 446,
"preview": "#define GVPLUGIN_CONFIG_FILE \"config6\"\n#define GVPLUGIN_VERSION 6\n#define PACKAGE \"graphviz\"\n#define PACKAGE_BUGREPORT \""
},
{
"path": "src/viz/example.html",
"chars": 10494,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"utf-8\">\n <title>Viz.js</title>\n </head>\n <body>\n \n <script"
},
{
"path": "src/viz/post.js",
"chars": 118,
"preview": " Module[\"ccall\"](\"vizRenderFromString\", \"number\", [\"string\", \"string\"], [src, format]);\n return Module[\"return\"];\n}\n"
},
{
"path": "src/viz/pre.js",
"chars": 227,
"preview": "((typeof exports !== \"undefined\" && exports !== null) ? exports : this)[\"Viz\"] = function(src, format) {\n var Module = "
},
{
"path": "src/viz/viz.c",
"chars": 577,
"preview": "#include \"cdt.h\"\n#include \"gvc.h\"\n\nextern gvplugin_library_t gvplugin_dot_layout_LTX_library;\nextern gvplugin_library_t "
},
{
"path": "src/viz/viz.js",
"chars": 1452528,
"preview": "function Tb(Ig){throw Ig}var ic=void 0,vc=!0,Mc=null,Xd=!1;function Jg(){return(function(){})}function Zh(Ig){return(fun"
},
{
"path": "src/viz_visualizer.js",
"chars": 3547,
"preview": "// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.\n/*global Viz */\n\nwindow.jdls "
}
]
About this extraction
This page contains the full source code of the jamesshore/object_playground GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 53 files (1.5 MB), approximately 902.5k tokens, and a symbol index with 1093 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.