summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bundle.js28
-rw-r--r--bundle.js.map2
-rw-r--r--client/index.js18
3 files changed, 20 insertions, 28 deletions
diff --git a/bundle.js b/bundle.js
index 99524ca..cb094ab 100644
--- a/bundle.js
+++ b/bundle.js
@@ -33203,7 +33203,7 @@ function loadBuffer() {
if (!pcm) return;
var FRAME_LENGTH = 126 * 255;
- var FRAME_OFFSET = FRAME_LENGTH / 4;
+ var FRAME_OFFSET = FRAME_LENGTH / 8;
var zip = new _jszip2.default();
@@ -33213,15 +33213,14 @@ function loadBuffer() {
// console.log('generating', count, offset)
var player = render(pcm.slice(offset, offset + FRAME_LENGTH), count, zip_folder);
register(player, count);
- if (count > 20) break;
- // break
+ // if (count > 20) break
}
console.log('done exporting');
- zip.generateAsync({ type: "blob" }).then(function (content) {
- console.log('saving zip');
- _fileSaver2.default.saveAs(content, "img2pix.zip");
- });
+ // zip.generateAsync({type:"blob"}).then(function(content) {
+ // console.log('saving zip')
+ // FileSaver.saveAs(content, "img2pix.zip")
+ // })
play(0);
}
function render(pcm, count, zip) {
@@ -33229,7 +33228,6 @@ function render(pcm, count, zip) {
// console.log('render', fft)
// const pcm_rev = pcm.slice().reverse()
// const spec_rev = spectrum.toSpectrum(pcm_rev, spec.sr)
- // const { buf, pcm } = spectrum.fromSpectrum(fft)
_draw2.default.clear();
var _draw$raw_spectrum = _draw2.default.raw_spectrum(fft, 0, 256, 0, 256, _r, _i),
@@ -33249,13 +33247,9 @@ function play(i) {
var player = players[(0, _util.clamp)(i, 0, players.length)];
// const { canvas, imageData } = draw.raw_spectrum(fft, 0, 256, 0, 256, 1, 1)
// console.log(_r, _i)
-
- var _draw$raw_spectrum2 = _draw2.default.raw_spectrum(player.fft, 0, 256, 0, 256, _r, _i),
- canvas = _draw$raw_spectrum2.canvas,
- imageData = _draw$raw_spectrum2.imageData;
-
+ // const { canvas, imageData } = draw.raw_spectrum(player.fft, 0, 256, 0, 256, _r, _i)
var new_fft = _spectrum2.default.fromImageData(player.imageData, 44100, _r, _i);
- gallery.innerHTML = '';
+ // gallery.innerHTML = ''
// console.log(player.fft.data, new_fft.data)
var buf = _spectrum2.default.fromSpectrum(new_fft);
@@ -33265,9 +33259,9 @@ function play(i) {
redraw(new_fft);
}
function redraw(new_fft) {
- var _draw$raw_spectrum3 = _draw2.default.raw_spectrum(new_fft, 0, 256, 0, 256, _r, _i),
- canvas = _draw$raw_spectrum3.canvas,
- imageData = _draw$raw_spectrum3.imageData;
+ var _draw$raw_spectrum2 = _draw2.default.raw_spectrum(new_fft, 0, 256, 0, 256, _r, _i),
+ canvas = _draw$raw_spectrum2.canvas,
+ imageData = _draw$raw_spectrum2.imageData;
}
function register(player, i) {
// console.log('register', player)
diff --git a/bundle.js.map b/bundle.js.map
index d00d30e..6871a1f 100644
--- a/bundle.js.map
+++ b/bundle.js.map
@@ -1 +1 @@
-{"version":3,"file":"./bundle.js","sources":["webpack:///webpack/bootstrap b4dd56509567814283dc","webpack:///./~/jszip/lib/utils.js","webpack:///./~/jszip/lib/stream/GenericWorker.js","webpack:///./~/jszip/lib/support.js","webpack:///./~/pako/lib/utils/common.js","webpack:///./~/readable-stream/lib/_stream_duplex.js","webpack:///(webpack)/buildin/global.js","webpack:///./~/inherits/inherits_browser.js","webpack:///./~/jszip/lib/utf8.js","webpack:///./~/buffer/index.js","webpack:///./~/core-util-is/lib/util.js","webpack:///./~/jszip/lib/external.js","webpack:///./~/tone/build/Tone.js","webpack:///./~/jszip/lib/nodejsUtils.js","webpack:///./~/jszip/~/core-js/library/modules/_global.js","webpack:///./~/process-nextick-args/index.js","webpack:///./~/process/browser.js","webpack:///./~/safe-buffer/index.js","webpack:///./client/lib/util.js","webpack:///./~/events/events.js","webpack:///./~/jszip/lib/compressedObject.js","webpack:///./~/jszip/lib/crc32.js","webpack:///./~/jszip/~/core-js/library/modules/_descriptors.js","webpack:///./~/jszip/~/core-js/library/modules/_is-object.js","webpack:///./~/pako/lib/zlib/messages.js","webpack:///./~/readable-stream/lib/_stream_writable.js","webpack:///./~/readable-stream/readable-browser.js","webpack:///./client/lib/mouse.js","webpack:///./~/isarray/index.js","webpack:///./~/jszip/lib/base64.js","webpack:///./~/jszip/lib/compressions.js","webpack:///./~/jszip/lib/defaults.js","webpack:///./~/jszip/lib/readable-stream-browser.js","webpack:///./~/jszip/lib/reader/ArrayReader.js","webpack:///./~/jszip/lib/reader/DataReader.js","webpack:///./~/jszip/lib/reader/Uint8ArrayReader.js","webpack:///./~/jszip/lib/reader/readerFor.js","webpack:///./~/jszip/lib/signature.js","webpack:///./~/jszip/lib/stream/Crc32Probe.js","webpack:///./~/jszip/lib/stream/DataLengthProbe.js","webpack:///./~/jszip/lib/stream/DataWorker.js","webpack:///./~/jszip/lib/stream/StreamHelper.js","webpack:///./~/jszip/~/core-js/library/modules/_core.js","webpack:///./~/jszip/~/core-js/library/modules/_ctx.js","webpack:///./~/jszip/~/core-js/library/modules/_dom-create.js","webpack:///./~/jszip/~/core-js/library/modules/_fails.js","webpack:///./~/pako/lib/utils/strings.js","webpack:///./~/pako/lib/zlib/adler32.js","webpack:///./~/pako/lib/zlib/constants.js","webpack:///./~/pako/lib/zlib/crc32.js","webpack:///./~/pako/lib/zlib/zstream.js","webpack:///./~/readable-stream/lib/_stream_readable.js","webpack:///./~/readable-stream/lib/_stream_transform.js","webpack:///./~/readable-stream/lib/internal/streams/destroy.js","webpack:///./~/readable-stream/lib/internal/streams/stream-browser.js","webpack:///./~/string_decoder/lib/string_decoder.js","webpack:///./client/draw.js","webpack:///./client/lib/keys.js","webpack:///./client/lib/output.js","webpack:///./client/lib/spectrum.js","webpack:///./~/jszip/lib/index.js","webpack:///./client/index.js","webpack:///./client/lib/color.js","webpack:///./client/lib/startAudioContext.js","webpack:///./client/lib/vendor/hidpi-canvas.js","webpack:///./~/base64-js/index.js","webpack:///./~/fft.js/lib/fft.js","webpack:///./~/ieee754/index.js","webpack:///./~/immediate/lib/browser.js","webpack:///./~/jszip/lib/flate.js","webpack:///./~/jszip/lib/generate/ZipFileWorker.js","webpack:///./~/jszip/lib/generate/index.js","webpack:///./~/jszip/lib/load.js","webpack:///./~/jszip/lib/nodejs/NodejsStreamInputAdapter.js","webpack:///./~/jszip/lib/nodejs/NodejsStreamOutputAdapter.js","webpack:///./~/jszip/lib/object.js","webpack:///./~/jszip/lib/reader/NodeBufferReader.js","webpack:///./~/jszip/lib/reader/StringReader.js","webpack:///./~/jszip/lib/stream/ConvertWorker.js","webpack:///./~/jszip/lib/zipEntries.js","webpack:///./~/jszip/lib/zipEntry.js","webpack:///./~/jszip/lib/zipObject.js","webpack:///./~/jszip/~/core-js/library/fn/set-immediate.js","webpack:///./~/jszip/~/core-js/library/modules/_a-function.js","webpack:///./~/jszip/~/core-js/library/modules/_an-object.js","webpack:///./~/jszip/~/core-js/library/modules/_cof.js","webpack:///./~/jszip/~/core-js/library/modules/_export.js","webpack:///./~/jszip/~/core-js/library/modules/_hide.js","webpack:///./~/jszip/~/core-js/library/modules/_html.js","webpack:///./~/jszip/~/core-js/library/modules/_ie8-dom-define.js","webpack:///./~/jszip/~/core-js/library/modules/_invoke.js","webpack:///./~/jszip/~/core-js/library/modules/_object-dp.js","webpack:///./~/jszip/~/core-js/library/modules/_property-desc.js","webpack:///./~/jszip/~/core-js/library/modules/_task.js","webpack:///./~/jszip/~/core-js/library/modules/_to-primitive.js","webpack:///./~/jszip/~/core-js/library/modules/web.immediate.js","webpack:///./~/lie/lib/browser.js","webpack:///./~/pako/index.js","webpack:///./~/pako/lib/deflate.js","webpack:///./~/pako/lib/inflate.js","webpack:///./~/pako/lib/zlib/deflate.js","webpack:///./~/pako/lib/zlib/gzheader.js","webpack:///./~/pako/lib/zlib/inffast.js","webpack:///./~/pako/lib/zlib/inflate.js","webpack:///./~/pako/lib/zlib/inftrees.js","webpack:///./~/pako/lib/zlib/trees.js","webpack:///./~/readable-stream/duplex-browser.js","webpack:///./~/readable-stream/lib/_stream_passthrough.js","webpack:///./~/readable-stream/lib/internal/streams/BufferList.js","webpack:///./~/readable-stream/passthrough.js","webpack:///./~/readable-stream/transform.js","webpack:///./~/readable-stream/writable-browser.js","webpack:///./~/setimmediate/setImmediate.js","webpack:///./~/signal-windows/index.js","webpack:///./~/signal-windows/src/framer.js","webpack:///./~/signal-windows/src/windows.js","webpack:///./~/stream-browserify/index.js","webpack:///./~/timers-browserify/main.js","webpack:///./~/util-deprecate/browser.js","webpack:///./~/sprintf-js/src/sprintf.js","webpack:///./~/file-saver/FileSaver.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 60);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b4dd56509567814283dc","'use strict';\n\nvar support = require('./support');\nvar base64 = require('./base64');\nvar nodejsUtils = require('./nodejsUtils');\nvar setImmediate = require('core-js/library/fn/set-immediate');\nvar external = require(\"./external\");\n\n\n/**\n * Convert a string that pass as a \"binary string\": it should represent a byte\n * array but may have > 255 char codes. Be sure to take only the first byte\n * and returns the byte array.\n * @param {String} str the string to transform.\n * @return {Array|Uint8Array} the string in a binary format.\n */\nfunction string2binary(str) {\n var result = null;\n if (support.uint8array) {\n result = new Uint8Array(str.length);\n } else {\n result = new Array(str.length);\n }\n return stringToArrayLike(str, result);\n}\n\n/**\n * Create a new blob with the given content and the given type.\n * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use\n * an Uint8Array because the stock browser of android 4 won't accept it (it\n * will be silently converted to a string, \"[object Uint8Array]\").\n *\n * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge:\n * when a large amount of Array is used to create the Blob, the amount of\n * memory consumed is nearly 100 times the original data amount.\n *\n * @param {String} type the mime type of the blob.\n * @return {Blob} the created blob.\n */\nexports.newBlob = function(part, type) {\n exports.checkSupport(\"blob\");\n\n try {\n // Blob constructor\n return new Blob([part], {\n type: type\n });\n }\n catch (e) {\n\n try {\n // deprecated, browser only, old way\n var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n var builder = new Builder();\n builder.append(part);\n return builder.getBlob(type);\n }\n catch (e) {\n\n // well, fuck ?!\n throw new Error(\"Bug : can't construct the Blob.\");\n }\n }\n\n\n};\n/**\n * The identity function.\n * @param {Object} input the input.\n * @return {Object} the same input.\n */\nfunction identity(input) {\n return input;\n}\n\n/**\n * Fill in an array with a string.\n * @param {String} str the string to use.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.\n */\nfunction stringToArrayLike(str, array) {\n for (var i = 0; i < str.length; ++i) {\n array[i] = str.charCodeAt(i) & 0xFF;\n }\n return array;\n}\n\n/**\n * An helper for the function arrayLikeToString.\n * This contains static informations and functions that\n * can be optimized by the browser JIT compiler.\n */\nvar arrayToStringHelper = {\n /**\n * Transform an array of int into a string, chunk by chunk.\n * See the performances notes on arrayLikeToString.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @param {String} type the type of the array.\n * @param {Integer} chunk the chunk size.\n * @return {String} the resulting string.\n * @throws Error if the chunk is too big for the stack.\n */\n stringifyByChunk: function(array, type, chunk) {\n var result = [], k = 0, len = array.length;\n // shortcut\n if (len <= chunk) {\n return String.fromCharCode.apply(null, array);\n }\n while (k < len) {\n if (type === \"array\" || type === \"nodebuffer\") {\n result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));\n }\n else {\n result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));\n }\n k += chunk;\n }\n return result.join(\"\");\n },\n /**\n * Call String.fromCharCode on every item in the array.\n * This is the naive implementation, which generate A LOT of intermediate string.\n * This should be used when everything else fail.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @return {String} the result.\n */\n stringifyByChar: function(array){\n var resultStr = \"\";\n for(var i = 0; i < array.length; i++) {\n resultStr += String.fromCharCode(array[i]);\n }\n return resultStr;\n },\n applyCanBeUsed : {\n /**\n * true if the browser accepts to use String.fromCharCode on Uint8Array\n */\n uint8array : (function () {\n try {\n return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;\n } catch (e) {\n return false;\n }\n })(),\n /**\n * true if the browser accepts to use String.fromCharCode on nodejs Buffer.\n */\n nodebuffer : (function () {\n try {\n return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1;\n } catch (e) {\n return false;\n }\n })()\n }\n};\n\n/**\n * Transform an array-like object to a string.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @return {String} the result.\n */\nfunction arrayLikeToString(array) {\n // Performances notes :\n // --------------------\n // String.fromCharCode.apply(null, array) is the fastest, see\n // see http://jsperf.com/converting-a-uint8array-to-a-string/2\n // but the stack is limited (and we can get huge arrays !).\n //\n // result += String.fromCharCode(array[i]); generate too many strings !\n //\n // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2\n // TODO : we now have workers that split the work. Do we still need that ?\n var chunk = 65536,\n type = exports.getTypeOf(array),\n canUseApply = true;\n if (type === \"uint8array\") {\n canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;\n } else if (type === \"nodebuffer\") {\n canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;\n }\n\n if (canUseApply) {\n while (chunk > 1) {\n try {\n return arrayToStringHelper.stringifyByChunk(array, type, chunk);\n } catch (e) {\n chunk = Math.floor(chunk / 2);\n }\n }\n }\n\n // no apply or chunk error : slow and painful algorithm\n // default browser on android 4.*\n return arrayToStringHelper.stringifyByChar(array);\n}\n\nexports.applyFromCharCode = arrayLikeToString;\n\n\n/**\n * Copy the data from an array-like to an other array-like.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.\n */\nfunction arrayLikeToArrayLike(arrayFrom, arrayTo) {\n for (var i = 0; i < arrayFrom.length; i++) {\n arrayTo[i] = arrayFrom[i];\n }\n return arrayTo;\n}\n\n// a matrix containing functions to transform everything into everything.\nvar transform = {};\n\n// string to ?\ntransform[\"string\"] = {\n \"string\": identity,\n \"array\": function(input) {\n return stringToArrayLike(input, new Array(input.length));\n },\n \"arraybuffer\": function(input) {\n return transform[\"string\"][\"uint8array\"](input).buffer;\n },\n \"uint8array\": function(input) {\n return stringToArrayLike(input, new Uint8Array(input.length));\n },\n \"nodebuffer\": function(input) {\n return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length));\n }\n};\n\n// array to ?\ntransform[\"array\"] = {\n \"string\": arrayLikeToString,\n \"array\": identity,\n \"arraybuffer\": function(input) {\n return (new Uint8Array(input)).buffer;\n },\n \"uint8array\": function(input) {\n return new Uint8Array(input);\n },\n \"nodebuffer\": function(input) {\n return nodejsUtils.newBufferFrom(input);\n }\n};\n\n// arraybuffer to ?\ntransform[\"arraybuffer\"] = {\n \"string\": function(input) {\n return arrayLikeToString(new Uint8Array(input));\n },\n \"array\": function(input) {\n return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));\n },\n \"arraybuffer\": identity,\n \"uint8array\": function(input) {\n return new Uint8Array(input);\n },\n \"nodebuffer\": function(input) {\n return nodejsUtils.newBufferFrom(new Uint8Array(input));\n }\n};\n\n// uint8array to ?\ntransform[\"uint8array\"] = {\n \"string\": arrayLikeToString,\n \"array\": function(input) {\n return arrayLikeToArrayLike(input, new Array(input.length));\n },\n \"arraybuffer\": function(input) {\n return input.buffer;\n },\n \"uint8array\": identity,\n \"nodebuffer\": function(input) {\n return nodejsUtils.newBufferFrom(input);\n }\n};\n\n// nodebuffer to ?\ntransform[\"nodebuffer\"] = {\n \"string\": arrayLikeToString,\n \"array\": function(input) {\n return arrayLikeToArrayLike(input, new Array(input.length));\n },\n \"arraybuffer\": function(input) {\n return transform[\"nodebuffer\"][\"uint8array\"](input).buffer;\n },\n \"uint8array\": function(input) {\n return arrayLikeToArrayLike(input, new Uint8Array(input.length));\n },\n \"nodebuffer\": identity\n};\n\n/**\n * Transform an input into any type.\n * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.\n * If no output type is specified, the unmodified input will be returned.\n * @param {String} outputType the output type.\n * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.\n * @throws {Error} an Error if the browser doesn't support the requested output type.\n */\nexports.transformTo = function(outputType, input) {\n if (!input) {\n // undefined, null, etc\n // an empty string won't harm.\n input = \"\";\n }\n if (!outputType) {\n return input;\n }\n exports.checkSupport(outputType);\n var inputType = exports.getTypeOf(input);\n var result = transform[inputType][outputType](input);\n return result;\n};\n\n/**\n * Return the type of the input.\n * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.\n * @param {Object} input the input to identify.\n * @return {String} the (lowercase) type of the input.\n */\nexports.getTypeOf = function(input) {\n if (typeof input === \"string\") {\n return \"string\";\n }\n if (Object.prototype.toString.call(input) === \"[object Array]\") {\n return \"array\";\n }\n if (support.nodebuffer && nodejsUtils.isBuffer(input)) {\n return \"nodebuffer\";\n }\n if (support.uint8array && input instanceof Uint8Array) {\n return \"uint8array\";\n }\n if (support.arraybuffer && input instanceof ArrayBuffer) {\n return \"arraybuffer\";\n }\n};\n\n/**\n * Throw an exception if the type is not supported.\n * @param {String} type the type to check.\n * @throws {Error} an Error if the browser doesn't support the requested type.\n */\nexports.checkSupport = function(type) {\n var supported = support[type.toLowerCase()];\n if (!supported) {\n throw new Error(type + \" is not supported by this platform\");\n }\n};\n\nexports.MAX_VALUE_16BITS = 65535;\nexports.MAX_VALUE_32BITS = -1; // well, \"\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\" is parsed as -1\n\n/**\n * Prettify a string read as binary.\n * @param {string} str the string to prettify.\n * @return {string} a pretty string.\n */\nexports.pretty = function(str) {\n var res = '',\n code, i;\n for (i = 0; i < (str || \"\").length; i++) {\n code = str.charCodeAt(i);\n res += '\\\\x' + (code < 16 ? \"0\" : \"\") + code.toString(16).toUpperCase();\n }\n return res;\n};\n\n/**\n * Defer the call of a function.\n * @param {Function} callback the function to call asynchronously.\n * @param {Array} args the arguments to give to the callback.\n */\nexports.delay = function(callback, args, self) {\n setImmediate(function () {\n callback.apply(self || null, args || []);\n });\n};\n\n/**\n * Extends a prototype with an other, without calling a constructor with\n * side effects. Inspired by nodejs' `utils.inherits`\n * @param {Function} ctor the constructor to augment\n * @param {Function} superCtor the parent constructor to use\n */\nexports.inherits = function (ctor, superCtor) {\n var Obj = function() {};\n Obj.prototype = superCtor.prototype;\n ctor.prototype = new Obj();\n};\n\n/**\n * Merge the objects passed as parameters into a new one.\n * @private\n * @param {...Object} var_args All objects to merge.\n * @return {Object} a new object with the data of the others.\n */\nexports.extend = function() {\n var result = {}, i, attr;\n for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers\n for (attr in arguments[i]) {\n if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === \"undefined\") {\n result[attr] = arguments[i][attr];\n }\n }\n }\n return result;\n};\n\n/**\n * Transform arbitrary content into a Promise.\n * @param {String} name a name for the content being processed.\n * @param {Object} inputData the content to process.\n * @param {Boolean} isBinary true if the content is not an unicode string\n * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character.\n * @param {Boolean} isBase64 true if the string content is encoded with base64.\n * @return {Promise} a promise in a format usable by JSZip.\n */\nexports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {\n\n // if inputData is already a promise, this flatten it.\n var promise = external.Promise.resolve(inputData).then(function(data) {\n \n \n var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1);\n\n if (isBlob && typeof FileReader !== \"undefined\") {\n return new external.Promise(function (resolve, reject) {\n var reader = new FileReader();\n\n reader.onload = function(e) {\n resolve(e.target.result);\n };\n reader.onerror = function(e) {\n reject(e.target.error);\n };\n reader.readAsArrayBuffer(data);\n });\n } else {\n return data;\n }\n });\n\n return promise.then(function(data) {\n var dataType = exports.getTypeOf(data);\n\n if (!dataType) {\n return external.Promise.reject(\n new Error(\"Can't read the data of '\" + name + \"'. Is it \" +\n \"in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?\")\n );\n }\n // special case : it's way easier to work with Uint8Array than with ArrayBuffer\n if (dataType === \"arraybuffer\") {\n data = exports.transformTo(\"uint8array\", data);\n } else if (dataType === \"string\") {\n if (isBase64) {\n data = base64.decode(data);\n }\n else if (isBinary) {\n // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask\n if (isOptimizedBinaryString !== true) {\n // this is a string, not in a base64 format.\n // Be sure that this is a correct \"binary string\"\n data = string2binary(data);\n }\n }\n }\n return data;\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/utils.js\n// module id = 0\n// module chunks = 0","'use strict';\n\n/**\n * A worker that does nothing but passing chunks to the next one. This is like\n * a nodejs stream but with some differences. On the good side :\n * - it works on IE 6-9 without any issue / polyfill\n * - it weights less than the full dependencies bundled with browserify\n * - it forwards errors (no need to declare an error handler EVERYWHERE)\n *\n * A chunk is an object with 2 attributes : `meta` and `data`. The former is an\n * object containing anything (`percent` for example), see each worker for more\n * details. The latter is the real data (String, Uint8Array, etc).\n *\n * @constructor\n * @param {String} name the name of the stream (mainly used for debugging purposes)\n */\nfunction GenericWorker(name) {\n // the name of the worker\n this.name = name || \"default\";\n // an object containing metadata about the workers chain\n this.streamInfo = {};\n // an error which happened when the worker was paused\n this.generatedError = null;\n // an object containing metadata to be merged by this worker into the general metadata\n this.extraStreamInfo = {};\n // true if the stream is paused (and should not do anything), false otherwise\n this.isPaused = true;\n // true if the stream is finished (and should not do anything), false otherwise\n this.isFinished = false;\n // true if the stream is locked to prevent further structure updates (pipe), false otherwise\n this.isLocked = false;\n // the event listeners\n this._listeners = {\n 'data':[],\n 'end':[],\n 'error':[]\n };\n // the previous worker, if any\n this.previous = null;\n}\n\nGenericWorker.prototype = {\n /**\n * Push a chunk to the next workers.\n * @param {Object} chunk the chunk to push\n */\n push : function (chunk) {\n this.emit(\"data\", chunk);\n },\n /**\n * End the stream.\n * @return {Boolean} true if this call ended the worker, false otherwise.\n */\n end : function () {\n if (this.isFinished) {\n return false;\n }\n\n this.flush();\n try {\n this.emit(\"end\");\n this.cleanUp();\n this.isFinished = true;\n } catch (e) {\n this.emit(\"error\", e);\n }\n return true;\n },\n /**\n * End the stream with an error.\n * @param {Error} e the error which caused the premature end.\n * @return {Boolean} true if this call ended the worker with an error, false otherwise.\n */\n error : function (e) {\n if (this.isFinished) {\n return false;\n }\n\n if(this.isPaused) {\n this.generatedError = e;\n } else {\n this.isFinished = true;\n\n this.emit(\"error\", e);\n\n // in the workers chain exploded in the middle of the chain,\n // the error event will go downward but we also need to notify\n // workers upward that there has been an error.\n if(this.previous) {\n this.previous.error(e);\n }\n\n this.cleanUp();\n }\n return true;\n },\n /**\n * Add a callback on an event.\n * @param {String} name the name of the event (data, end, error)\n * @param {Function} listener the function to call when the event is triggered\n * @return {GenericWorker} the current object for chainability\n */\n on : function (name, listener) {\n this._listeners[name].push(listener);\n return this;\n },\n /**\n * Clean any references when a worker is ending.\n */\n cleanUp : function () {\n this.streamInfo = this.generatedError = this.extraStreamInfo = null;\n this._listeners = [];\n },\n /**\n * Trigger an event. This will call registered callback with the provided arg.\n * @param {String} name the name of the event (data, end, error)\n * @param {Object} arg the argument to call the callback with.\n */\n emit : function (name, arg) {\n if (this._listeners[name]) {\n for(var i = 0; i < this._listeners[name].length; i++) {\n this._listeners[name][i].call(this, arg);\n }\n }\n },\n /**\n * Chain a worker with an other.\n * @param {Worker} next the worker receiving events from the current one.\n * @return {worker} the next worker for chainability\n */\n pipe : function (next) {\n return next.registerPrevious(this);\n },\n /**\n * Same as `pipe` in the other direction.\n * Using an API with `pipe(next)` is very easy.\n * Implementing the API with the point of view of the next one registering\n * a source is easier, see the ZipFileWorker.\n * @param {Worker} previous the previous worker, sending events to this one\n * @return {Worker} the current worker for chainability\n */\n registerPrevious : function (previous) {\n if (this.isLocked) {\n throw new Error(\"The stream '\" + this + \"' has already been used.\");\n }\n\n // sharing the streamInfo...\n this.streamInfo = previous.streamInfo;\n // ... and adding our own bits\n this.mergeStreamInfo();\n this.previous = previous;\n var self = this;\n previous.on('data', function (chunk) {\n self.processChunk(chunk);\n });\n previous.on('end', function () {\n self.end();\n });\n previous.on('error', function (e) {\n self.error(e);\n });\n return this;\n },\n /**\n * Pause the stream so it doesn't send events anymore.\n * @return {Boolean} true if this call paused the worker, false otherwise.\n */\n pause : function () {\n if(this.isPaused || this.isFinished) {\n return false;\n }\n this.isPaused = true;\n\n if(this.previous) {\n this.previous.pause();\n }\n return true;\n },\n /**\n * Resume a paused stream.\n * @return {Boolean} true if this call resumed the worker, false otherwise.\n */\n resume : function () {\n if(!this.isPaused || this.isFinished) {\n return false;\n }\n this.isPaused = false;\n\n // if true, the worker tried to resume but failed\n var withError = false;\n if(this.generatedError) {\n this.error(this.generatedError);\n withError = true;\n }\n if(this.previous) {\n this.previous.resume();\n }\n\n return !withError;\n },\n /**\n * Flush any remaining bytes as the stream is ending.\n */\n flush : function () {},\n /**\n * Process a chunk. This is usually the method overridden.\n * @param {Object} chunk the chunk to process.\n */\n processChunk : function(chunk) {\n this.push(chunk);\n },\n /**\n * Add a key/value to be added in the workers chain streamInfo once activated.\n * @param {String} key the key to use\n * @param {Object} value the associated value\n * @return {Worker} the current worker for chainability\n */\n withStreamInfo : function (key, value) {\n this.extraStreamInfo[key] = value;\n this.mergeStreamInfo();\n return this;\n },\n /**\n * Merge this worker's streamInfo into the chain's streamInfo.\n */\n mergeStreamInfo : function () {\n for(var key in this.extraStreamInfo) {\n if (!this.extraStreamInfo.hasOwnProperty(key)) {\n continue;\n }\n this.streamInfo[key] = this.extraStreamInfo[key];\n }\n },\n\n /**\n * Lock the stream to prevent further updates on the workers chain.\n * After calling this method, all calls to pipe will fail.\n */\n lock: function () {\n if (this.isLocked) {\n throw new Error(\"The stream '\" + this + \"' has already been used.\");\n }\n this.isLocked = true;\n if (this.previous) {\n this.previous.lock();\n }\n },\n\n /**\n *\n * Pretty print the workers chain.\n */\n toString : function () {\n var me = \"Worker \" + this.name;\n if (this.previous) {\n return this.previous + \" -> \" + me;\n } else {\n return me;\n }\n }\n};\n\nmodule.exports = GenericWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/GenericWorker.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nexports.base64 = true;\nexports.array = true;\nexports.string = true;\nexports.arraybuffer = typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\";\nexports.nodebuffer = typeof Buffer !== \"undefined\";\n// contains true if JSZip can read/generate Uint8Array, false otherwise.\nexports.uint8array = typeof Uint8Array !== \"undefined\";\n\nif (typeof ArrayBuffer === \"undefined\") {\n exports.blob = false;\n}\nelse {\n var buffer = new ArrayBuffer(0);\n try {\n exports.blob = new Blob([buffer], {\n type: \"application/zip\"\n }).size === 0;\n }\n catch (e) {\n try {\n var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n var builder = new Builder();\n builder.append(buffer);\n exports.blob = builder.getBlob('application/zip').size === 0;\n }\n catch (e) {\n exports.blob = false;\n }\n }\n}\n\ntry {\n exports.nodestream = !!require('readable-stream').Readable;\n} catch(e) {\n exports.nodestream = false;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/support.js\n// module id = 2\n// module chunks = 0","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/utils/common.js\n// module id = 3\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/*<replacement>*/\n\nvar processNextTick = require('process-nextick-args').nextTick;\n/*</replacement>*/\n\n/*<replacement>*/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/*</replacement>*/\n\nmodule.exports = Duplex;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\nvar keys = objectKeys(Writable.prototype);\nfor (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n processNextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n this.push(null);\n this.end();\n\n processNextTick(cb, err);\n};\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_duplex.js\n// module id = 4\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 5\n// module chunks = 0","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inherits/inherits_browser.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar support = require('./support');\nvar nodejsUtils = require('./nodejsUtils');\nvar GenericWorker = require('./stream/GenericWorker');\n\n/**\n * The following functions come from pako, from pako/lib/utils/strings\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new Array(256);\nfor (var i=0; i<256; i++) {\n _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);\n}\n_utf8len[254]=_utf8len[254]=1; // Invalid sequence start\n\n// convert string to array (typed, when possible)\nvar string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n c2 = str.charCodeAt(m_pos+1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n if (support.uint8array) {\n buf = new Uint8Array(buf_len);\n } else {\n buf = new Array(buf_len);\n }\n\n // convert\n for (i=0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n c2 = str.charCodeAt(m_pos+1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nvar utf8border = function(buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max-1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Fuckup - very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means vuffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n// convert array to string\nvar buf2string = function (buf) {\n var str, i, out, c, c_len;\n var len = buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len*2);\n\n for (out=0, i=0; i<len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n // shrinkBuf(utf16buf, out)\n if (utf16buf.length !== out) {\n if(utf16buf.subarray) {\n utf16buf = utf16buf.subarray(0, out);\n } else {\n utf16buf.length = out;\n }\n }\n\n // return String.fromCharCode.apply(null, utf16buf);\n return utils.applyFromCharCode(utf16buf);\n};\n\n\n// That's all for the pako functions.\n\n\n/**\n * Transform a javascript string into an array (typed if possible) of bytes,\n * UTF-8 encoded.\n * @param {String} str the string to encode\n * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.\n */\nexports.utf8encode = function utf8encode(str) {\n if (support.nodebuffer) {\n return nodejsUtils.newBufferFrom(str, \"utf-8\");\n }\n\n return string2buf(str);\n};\n\n\n/**\n * Transform a bytes array (or a representation) representing an UTF-8 encoded\n * string into a javascript string.\n * @param {Array|Uint8Array|Buffer} buf the data de decode\n * @return {String} the decoded string.\n */\nexports.utf8decode = function utf8decode(buf) {\n if (support.nodebuffer) {\n return utils.transformTo(\"nodebuffer\", buf).toString(\"utf-8\");\n }\n\n buf = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", buf);\n\n return buf2string(buf);\n};\n\n/**\n * A worker to decode utf8 encoded binary chunks into string chunks.\n * @constructor\n */\nfunction Utf8DecodeWorker() {\n GenericWorker.call(this, \"utf-8 decode\");\n // the last bytes if a chunk didn't end with a complete codepoint.\n this.leftOver = null;\n}\nutils.inherits(Utf8DecodeWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8DecodeWorker.prototype.processChunk = function (chunk) {\n\n var data = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", chunk.data);\n\n // 1st step, re-use what's left of the previous chunk\n if (this.leftOver && this.leftOver.length) {\n if(support.uint8array) {\n var previousData = data;\n data = new Uint8Array(previousData.length + this.leftOver.length);\n data.set(this.leftOver, 0);\n data.set(previousData, this.leftOver.length);\n } else {\n data = this.leftOver.concat(data);\n }\n this.leftOver = null;\n }\n\n var nextBoundary = utf8border(data);\n var usableData = data;\n if (nextBoundary !== data.length) {\n if (support.uint8array) {\n usableData = data.subarray(0, nextBoundary);\n this.leftOver = data.subarray(nextBoundary, data.length);\n } else {\n usableData = data.slice(0, nextBoundary);\n this.leftOver = data.slice(nextBoundary, data.length);\n }\n }\n\n this.push({\n data : exports.utf8decode(usableData),\n meta : chunk.meta\n });\n};\n\n/**\n * @see GenericWorker.flush\n */\nUtf8DecodeWorker.prototype.flush = function () {\n if(this.leftOver && this.leftOver.length) {\n this.push({\n data : exports.utf8decode(this.leftOver),\n meta : {}\n });\n this.leftOver = null;\n }\n};\nexports.Utf8DecodeWorker = Utf8DecodeWorker;\n\n/**\n * A worker to endcode string chunks into utf8 encoded binary chunks.\n * @constructor\n */\nfunction Utf8EncodeWorker() {\n GenericWorker.call(this, \"utf-8 encode\");\n}\nutils.inherits(Utf8EncodeWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8EncodeWorker.prototype.processChunk = function (chunk) {\n this.push({\n data : exports.utf8encode(chunk.data),\n meta : chunk.meta\n });\n};\nexports.Utf8EncodeWorker = Utf8EncodeWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/utf8.js\n// module id = 7\n// module chunks = 0","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/buffer/index.js\n// module id = 8\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-util-is/lib/util.js\n// module id = 9\n// module chunks = 0","/* global Promise */\n'use strict';\n\n// load the global object first:\n// - it should be better integrated in the system (unhandledRejection in node)\n// - the environment may have a custom Promise implementation (see zone.js)\nvar ES6Promise = null;\nif (typeof Promise !== \"undefined\") {\n ES6Promise = Promise;\n} else {\n ES6Promise = require(\"lie\");\n}\n\n/**\n * Let the user use/change some implementations.\n */\nmodule.exports = {\n Promise: ES6Promise\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/external.js\n// module id = 10\n// module chunks = 0","(function(root, factory){\n\n\t//UMD\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine(function() {\n\t\t\treturn factory();\n\t\t});\n\t} else if (typeof module === \"object\") {\n\t\tmodule.exports = factory();\n \t} else {\n\t\troot.Tone = factory();\n\t}\n\n}(this, function(){\n\n\t\"use strict\";\n\t\n\tvar Tone;\n\t//constructs the main Tone object\n\tfunction Main(func){\n\t\tTone = func();\n\t}\n\t//invokes each of the modules with the main Tone object as the argument\n\tfunction Module(func){\n\t\tfunc(Tone);\n\t}\t/**\n\t * Tone.js\n\t * @author Yotam Mann\n\t * @license http://opensource.org/licenses/MIT MIT License\n\t * @copyright 2014-2017 Yotam Mann\n\t */\n\tMain(function () {\n\t \n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tTONE\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * @class Tone is the base class of all other classes.\n\t\t * @constructor\n\t\t */\n\t var Tone = function () {\n\t if (!(this instanceof Tone)) {\n\t throw new Error('constructor needs to be called with the \\'new\\' keyword');\n\t }\n\t };\n\t /**\n\t\t * @memberOf Tone#\n\t\t * @returns {string} returns the name of the class as a string\n\t\t */\n\t Tone.prototype.toString = function () {\n\t for (var className in Tone) {\n\t var isLetter = className[0].match(/^[A-Z]$/);\n\t var sameConstructor = Tone[className] === this.constructor;\n\t if (Tone.isFunction(Tone[className]) && isLetter && sameConstructor) {\n\t return className;\n\t }\n\t }\n\t return 'Tone';\n\t };\n\t /**\n\t\t * @memberOf Tone#\n\t\t * disconnect and dispose\n\t\t * @returns {Tone} this\n\t\t */\n\t Tone.prototype.dispose = function () {\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tGET/SET\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Set the parameters at once. Either pass in an\n\t\t * object mapping parameters to values, or to set a\n\t\t * single parameter, by passing in a string and value.\n\t\t * The last argument is an optional ramp time which\n\t\t * will ramp any signal values to their destination value\n\t\t * over the duration of the rampTime.\n\t\t * @param {Object|string} params\n\t\t * @param {number=} value\n\t\t * @param {Time=} rampTime\n\t\t * @returns {Tone} this\n\t\t * @memberOf Tone#\n\t\t * @example\n\t\t * //set values using an object\n\t\t * filter.set({\n\t\t * \t\"frequency\" : 300,\n\t\t * \t\"type\" : highpass\n\t\t * });\n\t\t * @example\n\t\t * filter.set(\"type\", \"highpass\");\n\t\t * @example\n\t\t * //ramp to the value 220 over 3 seconds.\n\t\t * oscillator.set({\n\t\t * \t\"frequency\" : 220\n\t\t * }, 3);\n\t\t */\n\t Tone.prototype.set = function (params, value, rampTime) {\n\t if (Tone.isObject(params)) {\n\t rampTime = value;\n\t } else if (Tone.isString(params)) {\n\t var tmpObj = {};\n\t tmpObj[params] = value;\n\t params = tmpObj;\n\t }\n\t paramLoop:\n\t for (var attr in params) {\n\t value = params[attr];\n\t var parent = this;\n\t if (attr.indexOf('.') !== -1) {\n\t var attrSplit = attr.split('.');\n\t for (var i = 0; i < attrSplit.length - 1; i++) {\n\t parent = parent[attrSplit[i]];\n\t if (parent instanceof Tone) {\n\t attrSplit.splice(0, i + 1);\n\t var innerParam = attrSplit.join('.');\n\t parent.set(innerParam, value);\n\t continue paramLoop;\n\t }\n\t }\n\t attr = attrSplit[attrSplit.length - 1];\n\t }\n\t var param = parent[attr];\n\t if (Tone.isUndef(param)) {\n\t continue;\n\t }\n\t if (Tone.Signal && param instanceof Tone.Signal || Tone.Param && param instanceof Tone.Param) {\n\t if (param.value !== value) {\n\t if (Tone.isUndef(rampTime)) {\n\t param.value = value;\n\t } else {\n\t param.rampTo(value, rampTime);\n\t }\n\t }\n\t } else if (param instanceof AudioParam) {\n\t if (param.value !== value) {\n\t param.value = value;\n\t }\n\t } else if (Tone.TimeBase && param instanceof Tone.TimeBase) {\n\t parent[attr] = value;\n\t } else if (param instanceof Tone) {\n\t param.set(value);\n\t } else if (param !== value) {\n\t parent[attr] = value;\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Get the object's attributes. Given no arguments get\n\t\t * will return all available object properties and their corresponding\n\t\t * values. Pass in a single attribute to retrieve or an array\n\t\t * of attributes. The attribute strings can also include a \".\"\n\t\t * to access deeper properties.\n\t\t * @memberOf Tone#\n\t\t * @example\n\t\t * osc.get();\n\t\t * //returns {\"type\" : \"sine\", \"frequency\" : 440, ...etc}\n\t\t * @example\n\t\t * osc.get(\"type\");\n\t\t * //returns { \"type\" : \"sine\"}\n\t\t * @example\n\t\t * //use dot notation to access deep properties\n\t\t * synth.get([\"envelope.attack\", \"envelope.release\"]);\n\t\t * //returns {\"envelope\" : {\"attack\" : 0.2, \"release\" : 0.4}}\n\t\t * @param {Array=|string|undefined} params the parameters to get, otherwise will return\n\t\t * \t\t\t\t\t all available.\n\t\t * @returns {Object}\n\t\t */\n\t Tone.prototype.get = function (params) {\n\t if (Tone.isUndef(params)) {\n\t params = this._collectDefaults(this.constructor);\n\t } else if (Tone.isString(params)) {\n\t params = [params];\n\t }\n\t var ret = {};\n\t for (var i = 0; i < params.length; i++) {\n\t var attr = params[i];\n\t var parent = this;\n\t var subRet = ret;\n\t if (attr.indexOf('.') !== -1) {\n\t var attrSplit = attr.split('.');\n\t for (var j = 0; j < attrSplit.length - 1; j++) {\n\t var subAttr = attrSplit[j];\n\t subRet[subAttr] = subRet[subAttr] || {};\n\t subRet = subRet[subAttr];\n\t parent = parent[subAttr];\n\t }\n\t attr = attrSplit[attrSplit.length - 1];\n\t }\n\t var param = parent[attr];\n\t if (Tone.isObject(params[attr])) {\n\t subRet[attr] = param.get();\n\t } else if (Tone.Signal && param instanceof Tone.Signal) {\n\t subRet[attr] = param.value;\n\t } else if (Tone.Param && param instanceof Tone.Param) {\n\t subRet[attr] = param.value;\n\t } else if (param instanceof AudioParam) {\n\t subRet[attr] = param.value;\n\t } else if (param instanceof Tone) {\n\t subRet[attr] = param.get();\n\t } else if (!Tone.isFunction(param) && !Tone.isUndef(param)) {\n\t subRet[attr] = param;\n\t }\n\t }\n\t return ret;\n\t };\n\t /**\n\t\t * collect all of the default attributes in one\n\t\t * @private\n\t\t * @param {function} constr the constructor to find the defaults from\n\t\t * @return {Array} all of the attributes which belong to the class\n\t\t */\n\t Tone.prototype._collectDefaults = function (constr) {\n\t var ret = [];\n\t if (!Tone.isUndef(constr.defaults)) {\n\t ret = Object.keys(constr.defaults);\n\t }\n\t if (!Tone.isUndef(constr._super)) {\n\t var superDefs = this._collectDefaults(constr._super);\n\t //filter out repeats\n\t for (var i = 0; i < superDefs.length; i++) {\n\t if (ret.indexOf(superDefs[i]) === -1) {\n\t ret.push(superDefs[i]);\n\t }\n\t }\n\t }\n\t return ret;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tDEFAULTS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * @memberOf Tone\n\t\t * @param {Array} values The arguments array\n\t\t * @param {Array} keys The names of the arguments\n\t\t * @param {Function|Object} constr The class constructor\n\t\t * @return {Object} An object composed of the defaults between the class' defaults\n\t\t * and the passed in arguments.\n\t\t */\n\t Tone.defaults = function (values, keys, constr) {\n\t var options = {};\n\t if (values.length === 1 && Tone.isObject(values[0])) {\n\t options = values[0];\n\t } else {\n\t for (var i = 0; i < keys.length; i++) {\n\t options[keys[i]] = values[i];\n\t }\n\t }\n\t if (!Tone.isUndef(constr.defaults)) {\n\t return Tone.defaultArg(options, constr.defaults);\n\t } else if (Tone.isObject(constr)) {\n\t return Tone.defaultArg(options, constr);\n\t } else {\n\t return options;\n\t }\n\t };\n\t /**\n\t\t * If the `given` parameter is undefined, use the `fallback`.\n\t\t * If both `given` and `fallback` are object literals, it will\n\t\t * return a deep copy which includes all of the parameters from both\n\t\t * objects. If a parameter is undefined in given, it will return\n\t\t * the fallback property.\n\t\t * <br><br>\n\t\t * WARNING: if object is self referential, it will go into an an\n\t\t * infinite recursive loop.\n\t\t * @memberOf Tone\n\t\t * @param {*} given\n\t\t * @param {*} fallback\n\t\t * @return {*}\n\t\t */\n\t Tone.defaultArg = function (given, fallback) {\n\t if (Tone.isObject(given) && Tone.isObject(fallback)) {\n\t var ret = {};\n\t //make a deep copy of the given object\n\t for (var givenProp in given) {\n\t ret[givenProp] = Tone.defaultArg(fallback[givenProp], given[givenProp]);\n\t }\n\t for (var fallbackProp in fallback) {\n\t ret[fallbackProp] = Tone.defaultArg(given[fallbackProp], fallback[fallbackProp]);\n\t }\n\t return ret;\n\t } else {\n\t return Tone.isUndef(given) ? fallback : given;\n\t }\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tCONNECTIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * connect together all of the arguments in series\n\t\t * @param {...AudioParam|Tone|AudioNode} nodes\n\t\t * @returns {Tone}\n\t\t * @memberOf Tone\n\t\t * @static\n\t\t */\n\t Tone.connectSeries = function () {\n\t var currentUnit = arguments[0];\n\t for (var i = 1; i < arguments.length; i++) {\n\t var toUnit = arguments[i];\n\t currentUnit.connect(toUnit);\n\t currentUnit = toUnit;\n\t }\n\t return Tone;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t // TYPE CHECKING\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * test if the arg is undefined\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is undefined\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isUndef = function (val) {\n\t return typeof val === 'undefined';\n\t };\n\t /**\n\t\t * test if the arg is a function\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is a function\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isFunction = function (val) {\n\t return typeof val === 'function';\n\t };\n\t /**\n\t\t * Test if the argument is a number.\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is a number\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isNumber = function (arg) {\n\t return typeof arg === 'number';\n\t };\n\t /**\n\t\t * Test if the given argument is an object literal (i.e. `{}`);\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is an object literal.\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isObject = function (arg) {\n\t return Object.prototype.toString.call(arg) === '[object Object]' && arg.constructor === Object;\n\t };\n\t /**\n\t\t * Test if the argument is a boolean.\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is a boolean\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isBoolean = function (arg) {\n\t return typeof arg === 'boolean';\n\t };\n\t /**\n\t\t * Test if the argument is an Array\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is an array\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isArray = function (arg) {\n\t return Array.isArray(arg);\n\t };\n\t /**\n\t\t * Test if the argument is a string.\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is a string\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isString = function (arg) {\n\t return typeof arg === 'string';\n\t };\n\t /**\n\t\t * Test if the argument is in the form of a note in scientific pitch notation.\n\t\t * e.g. \"C4\"\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is a string\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isNote = function (arg) {\n\t return Tone.isString(arg) && /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(arg);\n\t };\n\t /**\n\t\t * An empty function.\n\t\t * @static\n\t\t */\n\t Tone.noOp = function () {\n\t };\n\t /**\n\t\t * Make the property not writable. Internal use only.\n\t\t * @private\n\t\t * @param {string} property the property to make not writable\n\t\t */\n\t Tone.prototype._readOnly = function (property) {\n\t if (Array.isArray(property)) {\n\t for (var i = 0; i < property.length; i++) {\n\t this._readOnly(property[i]);\n\t }\n\t } else {\n\t Object.defineProperty(this, property, {\n\t writable: false,\n\t enumerable: true\n\t });\n\t }\n\t };\n\t /**\n\t\t * Make an attribute writeable. Interal use only.\n\t\t * @private\n\t\t * @param {string} property the property to make writable\n\t\t */\n\t Tone.prototype._writable = function (property) {\n\t if (Array.isArray(property)) {\n\t for (var i = 0; i < property.length; i++) {\n\t this._writable(property[i]);\n\t }\n\t } else {\n\t Object.defineProperty(this, property, { writable: true });\n\t }\n\t };\n\t /**\n\t\t * Possible play states.\n\t\t * @enum {string}\n\t\t */\n\t Tone.State = {\n\t Started: 'started',\n\t Stopped: 'stopped',\n\t Paused: 'paused'\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t // CONVERSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Equal power gain scale. Good for cross-fading.\n\t\t * @param {NormalRange} percent (0-1)\n\t\t * @return {Number} output gain (0-1)\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.equalPowerScale = function (percent) {\n\t var piFactor = 0.5 * Math.PI;\n\t return Math.sin(percent * piFactor);\n\t };\n\t /**\n\t\t * Convert decibels into gain.\n\t\t * @param {Decibels} db\n\t\t * @return {Number}\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.dbToGain = function (db) {\n\t return Math.pow(10, db / 20);\n\t };\n\t /**\n\t\t * Convert gain to decibels.\n\t\t * @param {Number} gain (0-1)\n\t\t * @return {Decibels}\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.gainToDb = function (gain) {\n\t return 20 * (Math.log(gain) / Math.LN10);\n\t };\n\t /**\n\t\t * Convert an interval (in semitones) to a frequency ratio.\n\t\t * @param {Interval} interval the number of semitones above the base note\n\t\t * @return {number} the frequency ratio\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t * @example\n\t\t * tone.intervalToFrequencyRatio(0); // 1\n\t\t * tone.intervalToFrequencyRatio(12); // 2\n\t\t * tone.intervalToFrequencyRatio(-12); // 0.5\n\t\t */\n\t Tone.intervalToFrequencyRatio = function (interval) {\n\t return Math.pow(2, interval / 12);\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tTIMING\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Return the current time of the AudioContext clock.\n\t\t * @return {Number} the currentTime from the AudioContext\n\t\t * @memberOf Tone#\n\t\t */\n\t Tone.prototype.now = function () {\n\t return Tone.context.now();\n\t };\n\t /**\n\t\t * Return the current time of the AudioContext clock.\n\t\t * @return {Number} the currentTime from the AudioContext\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.now = function () {\n\t return Tone.context.now();\n\t };\n\t /**\n\t\t * Adds warning in the console if the scheduled time has passed.\n\t\t * @type {Time}\n\t\t */\n\t Tone.isPast = function (time) {\n\t if (time < Tone.context.currentTime) {\n\t // eslint-disable-next-line no-console\n\t console.warn('Time \\'' + time + '\\' is in the past. Scheduled time must be \\u2265 AudioContext.currentTime');\n\t }\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tINHERITANCE\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * have a child inherit all of Tone's (or a parent's) prototype\n\t\t * to inherit the parent's properties, make sure to call\n\t\t * Parent.call(this) in the child's constructor\n\t\t *\n\t\t * based on closure library's inherit function\n\t\t *\n\t\t * @memberOf Tone\n\t\t * @static\n\t\t * @param {function} \tchild\n\t\t * @param {function=} parent (optional) parent to inherit from\n\t\t * if no parent is supplied, the child\n\t\t * will inherit from Tone\n\t\t */\n\t Tone.extend = function (child, parent) {\n\t if (Tone.isUndef(parent)) {\n\t parent = Tone;\n\t }\n\t function TempConstructor() {\n\t }\n\t TempConstructor.prototype = parent.prototype;\n\t child.prototype = new TempConstructor();\n\t /** @override */\n\t child.prototype.constructor = child;\n\t child._super = parent;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tCONTEXT\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * A static pointer to the audio context accessible as Tone.context.\n\t\t * @type {Tone.Context}\n\t\t * @name context\n\t\t * @memberOf Tone\n\t\t */\n\t Object.defineProperty(Tone, 'context', {\n\t get: function () {\n\t return window.TONE_AUDIO_CONTEXT;\n\t },\n\t set: function (context) {\n\t if (Tone.Context && context instanceof Tone.Context) {\n\t window.TONE_AUDIO_CONTEXT = context;\n\t } else {\n\t window.TONE_AUDIO_CONTEXT = new Tone.Context(context);\n\t }\n\t //initialize the new audio context\n\t Tone.Context.emit('init', window.TONE_AUDIO_CONTEXT);\n\t }\n\t });\n\t /**\n\t\t * The AudioContext\n\t\t * @type {Tone.Context}\n\t\t * @name context\n\t\t * @memberOf Tone#\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.prototype, 'context', {\n\t get: function () {\n\t return Tone.context;\n\t }\n\t });\n\t /**\n\t\t * Tone automatically creates a context on init, but if you are working\n\t\t * with other libraries which also create an AudioContext, it can be\n\t\t * useful to set your own. If you are going to set your own context,\n\t\t * be sure to do it at the start of your code, before creating any objects.\n\t\t * @static\n\t\t * @param {AudioContext} ctx The new audio context to set\n\t\t */\n\t Tone.setContext = function (ctx) {\n\t Tone.context = ctx;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tATTRIBUTES\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * The number of seconds of 1 processing block (128 samples)\n\t\t * @type {Number}\n\t\t * @name blockTime\n\t\t * @memberOf Tone\n\t\t * @static\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.prototype, 'blockTime', {\n\t get: function () {\n\t return 128 / this.context.sampleRate;\n\t }\n\t });\n\t /**\n\t\t * The duration in seconds of one sample.\n\t\t * @type {Number}\n\t\t * @name sampleTime\n\t\t * @memberOf Tone\n\t\t * @static\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.prototype, 'sampleTime', {\n\t get: function () {\n\t return 1 / this.context.sampleRate;\n\t }\n\t });\n\t /**\n\t\t * Whether or not all the technologies that Tone.js relies on are supported by the current browser.\n\t\t * @type {Boolean}\n\t\t * @name supported\n\t\t * @memberOf Tone\n\t\t * @readOnly\n\t\t * @static\n\t\t */\n\t Object.defineProperty(Tone, 'supported', {\n\t get: function () {\n\t var hasAudioContext = window.hasOwnProperty('AudioContext') || window.hasOwnProperty('webkitAudioContext');\n\t var hasPromises = window.hasOwnProperty('Promise');\n\t var hasWorkers = window.hasOwnProperty('Worker');\n\t return hasAudioContext && hasPromises && hasWorkers;\n\t }\n\t });\n\t /**\n\t\t * Boolean value if the audio context has been initialized.\n\t\t * @type {Boolean}\n\t\t * @memberOf Tone\n\t\t * @static\n\t\t * @name initialized\n\t\t */\n\t Object.defineProperty(Tone, 'initialized', {\n\t get: function () {\n\t return !Tone.isUndef(window.TONE_AUDIO_CONTEXT);\n\t }\n\t });\n\t /**\n\t\t * Get the context when it becomes available\n\t\t * @param {Function} resolve Callback when the context is initialized\n\t\t * @return {Tone}\n\t\t */\n\t Tone.getContext = function (resolve) {\n\t if (Tone.initialized) {\n\t resolve(Tone.context);\n\t } else {\n\t var resCallback = function () {\n\t resolve(Tone.context);\n\t Tone.Context.off('init', resCallback);\n\t };\n\t Tone.Context.on('init', resCallback);\n\t }\n\t return Tone;\n\t };\n\t /**\n\t\t * The version number\n\t\t * @type {String}\n\t\t * @static\n\t\t */\n\t Tone.version = 'r12-dev';\n\t return Tone;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Emitter gives classes which extend it\n\t\t * the ability to listen for and emit events.\n\t\t * Inspiration and reference from Jerome Etienne's [MicroEvent](https://github.com/jeromeetienne/microevent.js).\n\t\t * MIT (c) 2011 Jerome Etienne.\n\t\t *\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.Emitter = function () {\n\t Tone.call(this);\n\t /**\n\t\t\t * Contains all of the events.\n\t\t\t * @private\n\t\t\t * @type {Object}\n\t\t\t */\n\t this._events = {};\n\t };\n\t Tone.extend(Tone.Emitter);\n\t /**\n\t\t * Bind a callback to a specific event.\n\t\t * @param {String} event The name of the event to listen for.\n\t\t * @param {Function} callback The callback to invoke when the\n\t\t * event is emitted\n\t\t * @return {Tone.Emitter} this\n\t\t */\n\t Tone.Emitter.prototype.on = function (event, callback) {\n\t //split the event\n\t var events = event.split(/\\W+/);\n\t for (var i = 0; i < events.length; i++) {\n\t var eventName = events[i];\n\t if (!this._events.hasOwnProperty(eventName)) {\n\t this._events[eventName] = [];\n\t }\n\t this._events[eventName].push(callback);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Bind a callback which is only invoked once\n\t\t * @param {String} event The name of the event to listen for.\n\t\t * @param {Function} callback The callback to invoke when the\n\t\t * event is emitted\n\t\t * @return {Tone.Emitter} this\n\t\t */\n\t Tone.Emitter.prototype.once = function (event, callback) {\n\t var boundCallback = function () {\n\t //invoke the callback\n\t callback.apply(this, arguments);\n\t this.off(event, boundCallback);\n\t }.bind(this);\n\t this.on(event, boundCallback);\n\t return this;\n\t };\n\t /**\n\t\t * Remove the event listener.\n\t\t * @param {String} event The event to stop listening to.\n\t\t * @param {Function=} callback The callback which was bound to\n\t\t * the event with Tone.Emitter.on.\n\t\t * If no callback is given, all callbacks\n\t\t * events are removed.\n\t\t * @return {Tone.Emitter} this\n\t\t */\n\t Tone.Emitter.prototype.off = function (event, callback) {\n\t var events = event.split(/\\W+/);\n\t for (var ev = 0; ev < events.length; ev++) {\n\t event = events[ev];\n\t if (this._events.hasOwnProperty(event)) {\n\t if (Tone.isUndef(callback)) {\n\t this._events[event] = [];\n\t } else {\n\t var eventList = this._events[event];\n\t for (var i = 0; i < eventList.length; i++) {\n\t if (eventList[i] === callback) {\n\t eventList.splice(i, 1);\n\t }\n\t }\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Invoke all of the callbacks bound to the event\n\t\t * with any arguments passed in.\n\t\t * @param {String} event The name of the event.\n\t\t * @param {*} args... The arguments to pass to the functions listening.\n\t\t * @return {Tone.Emitter} this\n\t\t */\n\t Tone.Emitter.prototype.emit = function (event) {\n\t if (this._events) {\n\t var args = Array.apply(null, arguments).slice(1);\n\t if (this._events.hasOwnProperty(event)) {\n\t var eventList = this._events[event].slice(0);\n\t for (var i = 0, len = eventList.length; i < len; i++) {\n\t eventList[i].apply(this, args);\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Add Emitter functions (on/off/emit) to the object\n\t\t * @param {Object|Function} object The object or class to extend.\n\t\t * @returns {Tone.Emitter}\n\t\t */\n\t Tone.Emitter.mixin = function (object) {\n\t var functions = [\n\t 'on',\n\t 'once',\n\t 'off',\n\t 'emit'\n\t ];\n\t object._events = {};\n\t for (var i = 0; i < functions.length; i++) {\n\t var func = functions[i];\n\t var emitterFunc = Tone.Emitter.prototype[func];\n\t object[func] = emitterFunc;\n\t }\n\t return Tone.Emitter;\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Emitter} this\n\t\t */\n\t Tone.Emitter.prototype.dispose = function () {\n\t Tone.prototype.dispose.call(this);\n\t this._events = null;\n\t return this;\n\t };\n\t return Tone.Emitter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A Timeline class for scheduling and maintaining state\n\t\t * along a timeline. All events must have a \"time\" property.\n\t\t * Internally, events are stored in time order for fast\n\t\t * retrieval.\n\t\t * @extends {Tone}\n\t\t * @param {Positive} [memory=Infinity] The number of previous events that are retained.\n\t\t */\n\t Tone.Timeline = function () {\n\t var options = Tone.defaults(arguments, ['memory'], Tone.Timeline);\n\t Tone.call(this);\n\t /**\n\t\t\t * The array of scheduled timeline events\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._timeline = [];\n\t /**\n\t\t\t * The memory of the timeline, i.e.\n\t\t\t * how many events in the past it will retain\n\t\t\t * @type {Positive}\n\t\t\t */\n\t this.memory = options.memory;\n\t };\n\t Tone.extend(Tone.Timeline);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t */\n\t Tone.Timeline.defaults = { 'memory': Infinity };\n\t /**\n\t\t * The number of items in the timeline.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Timeline#\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Timeline.prototype, 'length', {\n\t get: function () {\n\t return this._timeline.length;\n\t }\n\t });\n\t /**\n\t\t * Insert an event object onto the timeline. Events must have a \"time\" attribute.\n\t\t * @param {Object} event The event object to insert into the\n\t\t * timeline.\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.add = function (event) {\n\t //the event needs to have a time attribute\n\t if (Tone.isUndef(event.time)) {\n\t throw new Error('Tone.Timeline: events must have a time attribute');\n\t }\n\t event.time = event.time.valueOf();\n\t var index = this._search(event.time);\n\t this._timeline.splice(index + 1, 0, event);\n\t //if the length is more than the memory, remove the previous ones\n\t if (this.length > this.memory) {\n\t var diff = this.length - this.memory;\n\t this._timeline.splice(0, diff);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Remove an event from the timeline.\n\t\t * @param {Object} event The event object to remove from the list.\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.remove = function (event) {\n\t var index = this._timeline.indexOf(event);\n\t if (index !== -1) {\n\t this._timeline.splice(index, 1);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Get the nearest event whose time is less than or equal to the given time.\n\t\t * @param {Number} time The time to query.\n\t\t * @param {String} comparator Which value in the object to compare\n\t\t * @returns {Object} The event object set after that time.\n\t\t */\n\t Tone.Timeline.prototype.get = function (time, comparator) {\n\t comparator = Tone.defaultArg(comparator, 'time');\n\t var index = this._search(time, comparator);\n\t if (index !== -1) {\n\t return this._timeline[index];\n\t } else {\n\t return null;\n\t }\n\t };\n\t /**\n\t\t * Return the first event in the timeline without removing it\n\t\t * @returns {Object} The first event object\n\t\t */\n\t Tone.Timeline.prototype.peek = function () {\n\t return this._timeline[0];\n\t };\n\t /**\n\t\t * Return the first event in the timeline and remove it\n\t\t * @returns {Object} The first event object\n\t\t */\n\t Tone.Timeline.prototype.shift = function () {\n\t return this._timeline.shift();\n\t };\n\t /**\n\t\t * Get the event which is scheduled after the given time.\n\t\t * @param {Number} time The time to query.\n\t\t * @param {String} comparator Which value in the object to compare\n\t\t * @returns {Object} The event object after the given time\n\t\t */\n\t Tone.Timeline.prototype.getAfter = function (time, comparator) {\n\t comparator = Tone.defaultArg(comparator, 'time');\n\t var index = this._search(time, comparator);\n\t if (index + 1 < this._timeline.length) {\n\t return this._timeline[index + 1];\n\t } else {\n\t return null;\n\t }\n\t };\n\t /**\n\t\t * Get the event before the event at the given time.\n\t\t * @param {Number} time The time to query.\n\t\t * @param {String} comparator Which value in the object to compare\n\t\t * @returns {Object} The event object before the given time\n\t\t */\n\t Tone.Timeline.prototype.getBefore = function (time, comparator) {\n\t comparator = Tone.defaultArg(comparator, 'time');\n\t var len = this._timeline.length;\n\t //if it's after the last item, return the last item\n\t if (len > 0 && this._timeline[len - 1][comparator] < time) {\n\t return this._timeline[len - 1];\n\t }\n\t var index = this._search(time, comparator);\n\t if (index - 1 >= 0) {\n\t return this._timeline[index - 1];\n\t } else {\n\t return null;\n\t }\n\t };\n\t /**\n\t\t * Cancel events after the given time\n\t\t * @param {Number} time The time to query.\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.cancel = function (after) {\n\t if (this._timeline.length > 1) {\n\t var index = this._search(after);\n\t if (index >= 0) {\n\t if (this._timeline[index].time === after) {\n\t //get the first item with that time\n\t for (var i = index; i >= 0; i--) {\n\t if (this._timeline[i].time === after) {\n\t index = i;\n\t } else {\n\t break;\n\t }\n\t }\n\t this._timeline = this._timeline.slice(0, index);\n\t } else {\n\t this._timeline = this._timeline.slice(0, index + 1);\n\t }\n\t } else {\n\t this._timeline = [];\n\t }\n\t } else if (this._timeline.length === 1) {\n\t //the first item's time\n\t if (this._timeline[0].time >= after) {\n\t this._timeline = [];\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Cancel events before or equal to the given time.\n\t\t * @param {Number} time The time to cancel before.\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.cancelBefore = function (time) {\n\t var index = this._search(time);\n\t if (index >= 0) {\n\t this._timeline = this._timeline.slice(index + 1);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Returns the previous event if there is one. null otherwise\n\t\t * @param {Object} event The event to find the previous one of\n\t\t * @return {Object} The event right before the given event\n\t\t */\n\t Tone.Timeline.prototype.previousEvent = function (event) {\n\t var index = this._timeline.indexOf(event);\n\t if (index > 0) {\n\t return this._timeline[index - 1];\n\t } else {\n\t return null;\n\t }\n\t };\n\t /**\n\t\t * Does a binary search on the timeline array and returns the\n\t\t * nearest event index whose time is after or equal to the given time.\n\t\t * If a time is searched before the first index in the timeline, -1 is returned.\n\t\t * If the time is after the end, the index of the last item is returned.\n\t\t * @param {Number} time\n\t\t * @param {String} comparator Which value in the object to compare\n\t\t * @return {Number} the index in the timeline array\n\t\t * @private\n\t\t */\n\t Tone.Timeline.prototype._search = function (time, comparator) {\n\t if (this._timeline.length === 0) {\n\t return -1;\n\t }\n\t comparator = Tone.defaultArg(comparator, 'time');\n\t var beginning = 0;\n\t var len = this._timeline.length;\n\t var end = len;\n\t if (len > 0 && this._timeline[len - 1][comparator] <= time) {\n\t return len - 1;\n\t }\n\t while (beginning < end) {\n\t // calculate the midpoint for roughly equal partition\n\t var midPoint = Math.floor(beginning + (end - beginning) / 2);\n\t var event = this._timeline[midPoint];\n\t var nextEvent = this._timeline[midPoint + 1];\n\t if (event[comparator] === time) {\n\t //choose the last one that has the same time\n\t for (var i = midPoint; i < this._timeline.length; i++) {\n\t var testEvent = this._timeline[i];\n\t if (testEvent[comparator] === time) {\n\t midPoint = i;\n\t }\n\t }\n\t return midPoint;\n\t } else if (event[comparator] < time && nextEvent[comparator] > time) {\n\t return midPoint;\n\t } else if (event[comparator] > time) {\n\t //search lower\n\t end = midPoint;\n\t } else {\n\t //search upper\n\t beginning = midPoint + 1;\n\t }\n\t }\n\t return -1;\n\t };\n\t /**\n\t\t * Internal iterator. Applies extra safety checks for\n\t\t * removing items from the array.\n\t\t * @param {Function} callback\n\t\t * @param {Number=} lowerBound\n\t\t * @param {Number=} upperBound\n\t\t * @private\n\t\t */\n\t Tone.Timeline.prototype._iterate = function (callback, lowerBound, upperBound) {\n\t lowerBound = Tone.defaultArg(lowerBound, 0);\n\t upperBound = Tone.defaultArg(upperBound, this._timeline.length - 1);\n\t this._timeline.slice(lowerBound, upperBound + 1).forEach(function (event) {\n\t callback.call(this, event);\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Iterate over everything in the array\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEach = function (callback) {\n\t this._iterate(callback);\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array at or before the given time.\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEachBefore = function (time, callback) {\n\t //iterate over the items in reverse so that removing an item doesn't break things\n\t var upperBound = this._search(time);\n\t if (upperBound !== -1) {\n\t this._iterate(callback, 0, upperBound);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array after the given time.\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEachAfter = function (time, callback) {\n\t //iterate over the items in reverse so that removing an item doesn't break things\n\t var lowerBound = this._search(time);\n\t this._iterate(callback, lowerBound + 1);\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array after the given time.\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEachBetween = function (startTime, endTime, callback) {\n\t var lowerBound = this._search(startTime);\n\t var upperBound = this._search(endTime);\n\t if (lowerBound !== -1 && upperBound !== -1) {\n\t if (this._timeline[lowerBound].time !== startTime) {\n\t lowerBound += 1;\n\t }\n\t this._iterate(callback, lowerBound, upperBound);\n\t } else if (lowerBound === -1) {\n\t this._iterate(callback, 0, upperBound);\n\t }\n\t /*this.forEachFrom(startTime, function(event){\n\t\t\t\tif (event.time <= endTime){\n\t\t\t\t\tcallback(event);\n\t\t\t\t}\n\t\t\t});*/\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array at or after the given time. Similar to\n\t\t * forEachAfter, but includes the item(s) at the given time.\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEachFrom = function (time, callback) {\n\t //iterate over the items in reverse so that removing an item doesn't break things\n\t var lowerBound = this._search(time);\n\t //work backwards until the event time is less than time\n\t while (lowerBound >= 0 && this._timeline[lowerBound].time >= time) {\n\t lowerBound--;\n\t }\n\t this._iterate(callback, lowerBound + 1);\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array at the given time\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEachAtTime = function (time, callback) {\n\t //iterate over the items in reverse so that removing an item doesn't break things\n\t var upperBound = this._search(time);\n\t if (upperBound !== -1) {\n\t this._iterate(function (event) {\n\t if (event.time === time) {\n\t callback.call(this, event);\n\t }\n\t }, 0, upperBound);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.dispose = function () {\n\t Tone.prototype.dispose.call(this);\n\t this._timeline = null;\n\t return this;\n\t };\n\t return Tone.Timeline;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported) {\n\t if (!window.hasOwnProperty('OfflineAudioContext') && window.hasOwnProperty('webkitOfflineAudioContext')) {\n\t window.OfflineAudioContext = window.webkitOfflineAudioContext;\n\t }\n\t //returns promise?\n\t var context = new OfflineAudioContext(1, 1, 44100);\n\t var ret = context.startRendering();\n\t if (!(ret instanceof Promise)) {\n\t OfflineAudioContext.prototype._native_startRendering = OfflineAudioContext.prototype.startRendering;\n\t OfflineAudioContext.prototype.startRendering = function () {\n\t return new Promise(function (done) {\n\t this.oncomplete = function (e) {\n\t done(e.renderedBuffer);\n\t };\n\t this._native_startRendering();\n\t }.bind(this));\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported) {\n\t if (!window.hasOwnProperty('AudioContext') && window.hasOwnProperty('webkitAudioContext')) {\n\t window.AudioContext = window.webkitAudioContext;\n\t }\n\t //not functionally equivalent, but only an API placeholder\n\t if (!AudioContext.prototype.close) {\n\t AudioContext.prototype.close = function () {\n\t if (Tone.isFunction(this.suspend)) {\n\t this.suspend();\n\t }\n\t return Promise.resolve();\n\t };\n\t }\n\t //not functionally equivalent\n\t if (!AudioContext.prototype.resume) {\n\t AudioContext.prototype.resume = function () {\n\t return Promise.resolve();\n\t };\n\t }\n\t //createGain\n\t if (!AudioContext.prototype.createGain && AudioContext.prototype.createGainNode) {\n\t AudioContext.prototype.createGain = AudioContext.prototype.createGainNode;\n\t }\n\t //createDelay\n\t if (!AudioContext.prototype.createDelay && AudioContext.prototype.createDelayNode) {\n\t AudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode;\n\t }\n\t //test decodeAudioData returns a promise\n\t // https://github.com/mohayonao/web-audio-api-shim/blob/master/src/AudioContext.js\n\t // MIT License (c) 2015 @mohayonao\n\t var decodeAudioDataPromise = false;\n\t var offlineContext = new OfflineAudioContext(1, 1, 44100);\n\t var audioData = new Uint32Array([\n\t 1179011410,\n\t 48,\n\t 1163280727,\n\t 544501094,\n\t 16,\n\t 131073,\n\t 44100,\n\t 176400,\n\t 1048580,\n\t 1635017060,\n\t 8,\n\t 0,\n\t 0,\n\t 0,\n\t 0\n\t ]).buffer;\n\t try {\n\t var ret = offlineContext.decodeAudioData(audioData);\n\t if (ret instanceof Promise) {\n\t decodeAudioDataPromise = true;\n\t }\n\t } catch (e) {\n\t decodeAudioDataPromise = false;\n\t }\n\t if (!decodeAudioDataPromise) {\n\t AudioContext.prototype._native_decodeAudioData = AudioContext.prototype.decodeAudioData;\n\t AudioContext.prototype.decodeAudioData = function (audioData) {\n\t return new Promise(function (success, error) {\n\t this._native_decodeAudioData(audioData, success, error);\n\t }.bind(this));\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Wrapper around the native AudioContext.\n\t\t * @extends {Tone.Emitter}\n\t\t * @param {AudioContext=} context optionally pass in a context\n\t\t */\n\t Tone.Context = function () {\n\t Tone.Emitter.call(this);\n\t var options = Tone.defaults(arguments, ['context'], Tone.Context);\n\t if (!options.context) {\n\t options.context = new window.AudioContext();\n\t if (!options.context) {\n\t throw new Error('could not create AudioContext. Possibly too many AudioContexts running already.');\n\t }\n\t }\n\t this._context = options.context;\n\t // extend all of the methods\n\t for (var prop in this._context) {\n\t this._defineProperty(this._context, prop);\n\t }\n\t /**\n\t\t\t * The default latency hint\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._latencyHint = options.latencyHint;\n\t /**\n\t\t\t * An object containing all of the constants AudioBufferSourceNodes\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t this._constants = {};\n\t ///////////////////////////////////////////////////////////////////////\n\t // WORKER\n\t ///////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t * The amount of time events are scheduled\n\t\t\t * into the future\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this.lookAhead = options.lookAhead;\n\t /**\n\t\t\t * A reference to the actual computed update interval\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._computedUpdateInterval = 0;\n\t /**\n\t\t\t * A reliable callback method\n\t\t\t * @private\n\t\t\t * @type {Ticker}\n\t\t\t */\n\t this._ticker = new Ticker(this.emit.bind(this, 'tick'), options.clockSource, options.updateInterval);\n\t ///////////////////////////////////////////////////////////////////////\n\t // TIMEOUTS\n\t ///////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t * All of the setTimeout events.\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t this._timeouts = new Tone.Timeline();\n\t /**\n\t\t\t * The timeout id counter\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._timeoutIds = 0;\n\t this.on('tick', this._timeoutLoop.bind(this));\n\t };\n\t Tone.extend(Tone.Context, Tone.Emitter);\n\t Tone.Emitter.mixin(Tone.Context);\n\t /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Context.defaults = {\n\t 'clockSource': 'worker',\n\t 'latencyHint': 'interactive',\n\t 'lookAhead': 0.1,\n\t 'updateInterval': 0.03\n\t };\n\t /**\n\t\t * Define a property on this Tone.Context.\n\t\t * This is used to extend the native AudioContext\n\t\t * @param {AudioContext} context\n\t\t * @param {String} prop\n\t\t * @private\n\t\t */\n\t Tone.Context.prototype._defineProperty = function (context, prop) {\n\t if (Tone.isUndef(this[prop])) {\n\t Object.defineProperty(this, prop, {\n\t get: function () {\n\t if (typeof context[prop] === 'function') {\n\t return context[prop].bind(context);\n\t } else {\n\t return context[prop];\n\t }\n\t },\n\t set: function (val) {\n\t context[prop] = val;\n\t }\n\t });\n\t }\n\t };\n\t /**\n\t\t * The current audio context time\n\t\t * @return {Number}\n\t\t */\n\t Tone.Context.prototype.now = function () {\n\t return this._context.currentTime + this.lookAhead;\n\t };\n\t /**\n\t\t * Promise which is invoked when the context is running.\n\t\t * Tries to resume the context if it's not started.\n\t\t * @return {Promise}\n\t\t */\n\t Tone.Context.prototype.ready = function () {\n\t return new Promise(function (done) {\n\t if (this._context.state === 'running') {\n\t done();\n\t } else {\n\t this._context.resume().then(function () {\n\t done();\n\t });\n\t }\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Promise which is invoked when the context is running.\n\t\t * Tries to resume the context if it's not started.\n\t\t * @return {Promise}\n\t\t */\n\t Tone.Context.prototype.close = function () {\n\t return this._context.close().then(function () {\n\t Tone.Context.emit('close', this);\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Generate a looped buffer at some constant value.\n\t\t * @param {Number} val\n\t\t * @return {BufferSourceNode}\n\t\t */\n\t Tone.Context.prototype.getConstant = function (val) {\n\t if (this._constants[val]) {\n\t return this._constants[val];\n\t } else {\n\t var buffer = this._context.createBuffer(1, 128, this._context.sampleRate);\n\t var arr = buffer.getChannelData(0);\n\t for (var i = 0; i < arr.length; i++) {\n\t arr[i] = val;\n\t }\n\t var constant = this._context.createBufferSource();\n\t constant.channelCount = 1;\n\t constant.channelCountMode = 'explicit';\n\t constant.buffer = buffer;\n\t constant.loop = true;\n\t constant.start(0);\n\t this._constants[val] = constant;\n\t return constant;\n\t }\n\t };\n\t /**\n\t\t * The private loop which keeps track of the context scheduled timeouts\n\t\t * Is invoked from the clock source\n\t\t * @private\n\t\t */\n\t Tone.Context.prototype._timeoutLoop = function () {\n\t var now = this.now();\n\t while (this._timeouts && this._timeouts.length && this._timeouts.peek().time <= now) {\n\t this._timeouts.shift().callback();\n\t }\n\t };\n\t /**\n\t\t * A setTimeout which is gaurenteed by the clock source.\n\t\t * Also runs in the offline context.\n\t\t * @param {Function} fn The callback to invoke\n\t\t * @param {Seconds} timeout The timeout in seconds\n\t\t * @returns {Number} ID to use when invoking Tone.Context.clearTimeout\n\t\t */\n\t Tone.Context.prototype.setTimeout = function (fn, timeout) {\n\t this._timeoutIds++;\n\t var now = this.now();\n\t this._timeouts.add({\n\t callback: fn,\n\t time: now + timeout,\n\t id: this._timeoutIds\n\t });\n\t return this._timeoutIds;\n\t };\n\t /**\n\t\t * Clears a previously scheduled timeout with Tone.context.setTimeout\n\t\t * @param {Number} id The ID returned from setTimeout\n\t\t * @return {Tone.Context} this\n\t\t */\n\t Tone.Context.prototype.clearTimeout = function (id) {\n\t this._timeouts.forEach(function (event) {\n\t if (event.id === id) {\n\t this.remove(event);\n\t }\n\t });\n\t return this;\n\t };\n\t /**\n\t\t * How often the Web Worker callback is invoked.\n\t\t * This number corresponds to how responsive the scheduling\n\t\t * can be. Context.updateInterval + Context.lookAhead gives you the\n\t\t * total latency between scheduling an event and hearing it.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Context#\n\t\t * @name updateInterval\n\t\t */\n\t Object.defineProperty(Tone.Context.prototype, 'updateInterval', {\n\t get: function () {\n\t return this._ticker.updateInterval;\n\t },\n\t set: function (interval) {\n\t this._ticker.updateInterval = interval;\n\t }\n\t });\n\t /**\n\t\t * What the source of the clock is, either \"worker\" (Web Worker [default]),\n\t\t * \"timeout\" (setTimeout), or \"offline\" (none).\n\t\t * @type {String}\n\t\t * @memberOf Tone.Context#\n\t\t * @name clockSource\n\t\t */\n\t Object.defineProperty(Tone.Context.prototype, 'clockSource', {\n\t get: function () {\n\t return this._ticker.type;\n\t },\n\t set: function (type) {\n\t this._ticker.type = type;\n\t }\n\t });\n\t /**\n\t\t * The type of playback, which affects tradeoffs between audio\n\t\t * output latency and responsiveness.\n\t\t *\n\t\t * In addition to setting the value in seconds, the latencyHint also\n\t\t * accepts the strings \"interactive\" (prioritizes low latency),\n\t\t * \"playback\" (prioritizes sustained playback), \"balanced\" (balances\n\t\t * latency and performance), and \"fastest\" (lowest latency, might glitch more often).\n\t\t * @type {String|Seconds}\n\t\t * @memberOf Tone.Context#\n\t\t * @name latencyHint\n\t\t * @example\n\t\t * //set the lookAhead to 0.3 seconds\n\t\t * Tone.context.latencyHint = 0.3;\n\t\t */\n\t Object.defineProperty(Tone.Context.prototype, 'latencyHint', {\n\t get: function () {\n\t return this._latencyHint;\n\t },\n\t set: function (hint) {\n\t var lookAhead = hint;\n\t this._latencyHint = hint;\n\t if (Tone.isString(hint)) {\n\t switch (hint) {\n\t case 'interactive':\n\t lookAhead = 0.1;\n\t this._context.latencyHint = hint;\n\t break;\n\t case 'playback':\n\t lookAhead = 0.8;\n\t this._context.latencyHint = hint;\n\t break;\n\t case 'balanced':\n\t lookAhead = 0.25;\n\t this._context.latencyHint = hint;\n\t break;\n\t case 'fastest':\n\t this._context.latencyHint = 'interactive';\n\t lookAhead = 0.01;\n\t break;\n\t }\n\t }\n\t this.lookAhead = lookAhead;\n\t this.updateInterval = lookAhead / 3;\n\t }\n\t });\n\t /**\n\t\t * Unlike other dispose methods, this returns a Promise\n\t\t * which executes when the context is closed and disposed\n\t\t * @returns {Promise} this\n\t\t */\n\t Tone.Context.prototype.dispose = function () {\n\t return this.close().then(function () {\n\t Tone.Emitter.prototype.dispose.call(this);\n\t this._ticker.dispose();\n\t this._ticker = null;\n\t this._timeouts.dispose();\n\t this._timeouts = null;\n\t for (var con in this._constants) {\n\t this._constants[con].disconnect();\n\t }\n\t this._constants = null;\n\t }.bind(this));\n\t };\n\t /**\n\t\t * @class A class which provides a reliable callback using either\n\t\t * a Web Worker, or if that isn't supported, falls back to setTimeout.\n\t\t * @private\n\t\t */\n\t var Ticker = function (callback, type, updateInterval) {\n\t /**\n\t\t\t * Either \"worker\" or \"timeout\"\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._type = type;\n\t /**\n\t\t\t * The update interval of the worker\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._updateInterval = updateInterval;\n\t /**\n\t\t\t * The callback to invoke at regular intervals\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._callback = Tone.defaultArg(callback, Tone.noOp);\n\t //create the clock source for the first time\n\t this._createClock();\n\t };\n\t /**\n\t\t * The possible ticker types\n\t\t * @private\n\t\t * @type {Object}\n\t\t */\n\t Ticker.Type = {\n\t Worker: 'worker',\n\t Timeout: 'timeout',\n\t Offline: 'offline'\n\t };\n\t /**\n\t\t * Generate a web worker\n\t\t * @return {WebWorker}\n\t\t * @private\n\t\t */\n\t Ticker.prototype._createWorker = function () {\n\t //URL Shim\n\t window.URL = window.URL || window.webkitURL;\n\t var blob = new Blob([//the initial timeout time\n\t 'var timeoutTime = ' + (this._updateInterval * 1000).toFixed(1) + ';' + //onmessage callback\n\t 'self.onmessage = function(msg){' + '\\ttimeoutTime = parseInt(msg.data);' + '};' + //the tick function which posts a message\n\t //and schedules a new tick\n\t 'function tick(){' + '\\tsetTimeout(tick, timeoutTime);' + '\\tself.postMessage(\\'tick\\');' + '}' + //call tick initially\n\t 'tick();']);\n\t var blobUrl = URL.createObjectURL(blob);\n\t var worker = new Worker(blobUrl);\n\t worker.onmessage = this._callback.bind(this);\n\t this._worker = worker;\n\t };\n\t /**\n\t\t * Create a timeout loop\n\t\t * @private\n\t\t */\n\t Ticker.prototype._createTimeout = function () {\n\t this._timeout = setTimeout(function () {\n\t this._createTimeout();\n\t this._callback();\n\t }.bind(this), this._updateInterval * 1000);\n\t };\n\t /**\n\t\t * Create the clock source.\n\t\t * @private\n\t\t */\n\t Ticker.prototype._createClock = function () {\n\t if (this._type === Ticker.Type.Worker) {\n\t try {\n\t this._createWorker();\n\t } catch (e) {\n\t // workers not supported, fallback to timeout\n\t this._type = Ticker.Type.Timeout;\n\t this._createClock();\n\t }\n\t } else if (this._type === Ticker.Type.Timeout) {\n\t this._createTimeout();\n\t }\n\t };\n\t /**\n\t\t * @memberOf Ticker#\n\t\t * @type {Number}\n\t\t * @name updateInterval\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Ticker.prototype, 'updateInterval', {\n\t get: function () {\n\t return this._updateInterval;\n\t },\n\t set: function (interval) {\n\t this._updateInterval = Math.max(interval, 128 / 44100);\n\t if (this._type === Ticker.Type.Worker) {\n\t this._worker.postMessage(Math.max(interval * 1000, 1));\n\t }\n\t }\n\t });\n\t /**\n\t\t * The type of the ticker, either a worker or a timeout\n\t\t * @memberOf Ticker#\n\t\t * @type {Number}\n\t\t * @name type\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Ticker.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t this._disposeClock();\n\t this._type = type;\n\t this._createClock();\n\t }\n\t });\n\t /**\n\t\t * Clean up the current clock source\n\t\t * @private\n\t\t */\n\t Ticker.prototype._disposeClock = function () {\n\t if (this._timeout) {\n\t clearTimeout(this._timeout);\n\t this._timeout = null;\n\t }\n\t if (this._worker) {\n\t this._worker.terminate();\n\t this._worker.onmessage = null;\n\t this._worker = null;\n\t }\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @private\n\t\t */\n\t Ticker.prototype.dispose = function () {\n\t this._disposeClock();\n\t this._callback = null;\n\t };\n\t /**\n\t\t * Shim all connect/disconnect and some deprecated methods which are still in\n\t\t * some older implementations.\n\t\t * @private\n\t\t */\n\t Tone.getContext(function () {\n\t var nativeConnect = AudioNode.prototype.connect;\n\t var nativeDisconnect = AudioNode.prototype.disconnect;\n\t //replace the old connect method\n\t function toneConnect(B, outNum, inNum) {\n\t if (B.input) {\n\t inNum = Tone.defaultArg(inNum, 0);\n\t if (Tone.isArray(B.input)) {\n\t return this.connect(B.input[inNum]);\n\t } else {\n\t return this.connect(B.input, outNum, inNum);\n\t }\n\t } else {\n\t try {\n\t if (B instanceof AudioNode) {\n\t nativeConnect.call(this, B, outNum, inNum);\n\t return B;\n\t } else {\n\t nativeConnect.call(this, B, outNum);\n\t return B;\n\t }\n\t } catch (e) {\n\t throw new Error('error connecting to node: ' + B + '\\n' + e);\n\t }\n\t }\n\t }\n\t //replace the old disconnect method\n\t function toneDisconnect(B, outNum, inNum) {\n\t if (B && B.input && Tone.isArray(B.input)) {\n\t inNum = Tone.defaultArg(inNum, 0);\n\t this.disconnect(B.input[inNum], outNum, 0);\n\t } else if (B && B.input) {\n\t this.disconnect(B.input, outNum, inNum);\n\t } else {\n\t try {\n\t nativeDisconnect.apply(this, arguments);\n\t } catch (e) {\n\t throw new Error('error disconnecting node: ' + B + '\\n' + e);\n\t }\n\t }\n\t }\n\t if (AudioNode.prototype.connect !== toneConnect) {\n\t AudioNode.prototype.connect = toneConnect;\n\t AudioNode.prototype.disconnect = toneDisconnect;\n\t }\n\t });\n\t // set the audio context initially, and if one is not already created\n\t if (Tone.supported && !Tone.initialized) {\n\t Tone.context = new Tone.Context();\n\t // log on first initialization\n\t // allow optional silencing of this log\n\t if (!window.TONE_SILENCE_VERSION_LOGGING) {\n\t // eslint-disable-next-line no-console\n\t console.log('%c * Tone.js ' + Tone.version + ' * ', 'background: #000; color: #fff');\n\t }\n\t } else if (!Tone.supported) {\n\t // eslint-disable-next-line no-console\n\t console.warn('This browser does not support Tone.js');\n\t }\n\t return Tone.Context;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.AudioNode is the base class for classes which process audio.\n\t\t * AudioNodes have inputs and outputs.\n\t\t * @param\t{AudioContext=} context\tThe audio context to use with the class\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.AudioNode = function () {\n\t Tone.call(this);\n\t //use the default context if one is not passed in\n\t var options = Tone.defaults(arguments, ['context'], { 'context': Tone.context });\n\t /**\n\t\t\t * The AudioContext of this instance\n\t\t\t * @private\n\t\t\t * @type {AudioContext}\n\t\t\t */\n\t this._context = options.context;\n\t };\n\t Tone.extend(Tone.AudioNode);\n\t /**\n\t\t * Get the audio context belonging to this instance.\n\t\t * @type {Tone.Context}\n\t\t * @memberOf Tone.AudioNode#\n\t\t * @name context\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'context', {\n\t get: function () {\n\t return this._context;\n\t }\n\t });\n\t /**\n\t\t * Create input and outputs for this object.\n\t\t * @param {Number} [input=0] The number of inputs\n\t\t * @param {Number} [outputs=0] The number of outputs\n\t\t * @return {Tone.AudioNode} this\n\t\t * @private\n\t\t */\n\t Tone.AudioNode.prototype.createInsOuts = function (inputs, outputs) {\n\t if (inputs === 1) {\n\t this.input = this.context.createGain();\n\t } else if (inputs > 1) {\n\t this.input = new Array(inputs);\n\t }\n\t if (outputs === 1) {\n\t this.output = this.context.createGain();\n\t } else if (outputs > 1) {\n\t this.output = new Array(outputs);\n\t }\n\t };\n\t /**\n\t\t * channelCount is the number of channels used when up-mixing and down-mixing\n\t\t * connections to any inputs to the node. The default value is 2 except for\n\t\t * specific nodes where its value is specially determined.\n\t\t *\n\t\t * @memberof Tone.AudioNode#\n\t\t * @type {Number}\n\t\t * @name channelCount\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'channelCount', {\n\t get: function () {\n\t return this.output.channelCount;\n\t },\n\t set: function (c) {\n\t return this.output.channelCount = c;\n\t }\n\t });\n\t /**\n\t\t * channelCountMode determines how channels will be counted when up-mixing and\n\t\t * down-mixing connections to any inputs to the node.\n\t\t * The default value is \"max\". This attribute has no effect for nodes with no inputs.\n\t\t * @memberof Tone.AudioNode#\n\t\t * @type {String}\n\t\t * @name channelCountMode\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'channelCountMode', {\n\t get: function () {\n\t return this.output.channelCountMode;\n\t },\n\t set: function (m) {\n\t return this.output.channelCountMode = m;\n\t }\n\t });\n\t /**\n\t\t * channelInterpretation determines how individual channels will be treated\n\t\t * when up-mixing and down-mixing connections to any inputs to the node.\n\t\t * The default value is \"speakers\".\n\t\t * @memberof Tone.AudioNode#\n\t\t * @type {String}\n\t\t * @name channelInterpretation\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'channelInterpretation', {\n\t get: function () {\n\t return this.output.channelInterpretation;\n\t },\n\t set: function (i) {\n\t return this.output.channelInterpretation = i;\n\t }\n\t });\n\t /**\n\t\t * The number of inputs feeding into the AudioNode.\n\t\t * For source nodes, this will be 0.\n\t\t * @type {Number}\n\t\t * @name numberOfInputs\n\t\t * @memberof Tone.AudioNode#\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'numberOfInputs', {\n\t get: function () {\n\t if (this.input) {\n\t if (Tone.isArray(this.input)) {\n\t return this.input.length;\n\t } else {\n\t return 1;\n\t }\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The number of outputs coming out of the AudioNode.\n\t\t * @type {Number}\n\t\t * @name numberOfOutputs\n\t\t * @memberof Tone.AudioNode#\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'numberOfOutputs', {\n\t get: function () {\n\t if (this.output) {\n\t if (Tone.isArray(this.output)) {\n\t return this.output.length;\n\t } else {\n\t return 1;\n\t }\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Called when an audio param connects to this node\n\t\t * @private\n\t\t */\n\t Tone.AudioNode.prototype._onConnect = function () {\n\t };\n\t /**\n\t\t * connect the output of a ToneNode to an AudioParam, AudioNode, or ToneNode\n\t\t * @param {Tone | AudioParam | AudioNode} unit\n\t\t * @param {number} [outputNum=0] optionally which output to connect from\n\t\t * @param {number} [inputNum=0] optionally which input to connect to\n\t\t * @returns {Tone.AudioNode} this\n\t\t */\n\t Tone.AudioNode.prototype.connect = function (unit, outputNum, inputNum) {\n\t if (unit._onConnect) {\n\t unit._onConnect(this);\n\t }\n\t if (Tone.isArray(this.output)) {\n\t outputNum = Tone.defaultArg(outputNum, 0);\n\t this.output[outputNum].connect(unit, 0, inputNum);\n\t } else {\n\t this.output.connect(unit, outputNum, inputNum);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * disconnect the output\n\t\t * @param {Number|AudioNode} output Either the output index to disconnect\n\t\t * if the output is an array, or the\n\t\t * node to disconnect from.\n\t\t * @returns {Tone.AudioNode} this\n\t\t */\n\t Tone.AudioNode.prototype.disconnect = function (destination, outputNum, inputNum) {\n\t if (Tone.isArray(this.output)) {\n\t if (Tone.isNumber(destination)) {\n\t this.output[destination].disconnect();\n\t } else {\n\t outputNum = Tone.defaultArg(outputNum, 0);\n\t this.output[outputNum].disconnect(destination, 0, inputNum);\n\t }\n\t } else {\n\t this.output.disconnect.apply(this.output, arguments);\n\t }\n\t };\n\t /**\n\t\t * Connect the output of this node to the rest of the nodes in series.\n\t\t * @example\n\t\t * //connect a node to an effect, panVol and then to the master output\n\t\t * node.chain(effect, panVol, Tone.Master);\n\t\t * @param {...AudioParam|Tone|AudioNode} nodes\n\t\t * @returns {Tone.AudioNode} this\n\t\t * @private\n\t\t */\n\t Tone.AudioNode.prototype.chain = function () {\n\t var currentUnit = this;\n\t for (var i = 0; i < arguments.length; i++) {\n\t var toUnit = arguments[i];\n\t currentUnit.connect(toUnit);\n\t currentUnit = toUnit;\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * connect the output of this node to the rest of the nodes in parallel.\n\t\t * @param {...AudioParam|Tone|AudioNode} nodes\n\t\t * @returns {Tone.AudioNode} this\n\t\t * @private\n\t\t */\n\t Tone.AudioNode.prototype.fan = function () {\n\t for (var i = 0; i < arguments.length; i++) {\n\t this.connect(arguments[i]);\n\t }\n\t return this;\n\t };\n\t if (window.AudioNode) {\n\t //give native nodes chain and fan methods\n\t AudioNode.prototype.chain = Tone.AudioNode.prototype.chain;\n\t AudioNode.prototype.fan = Tone.AudioNode.prototype.fan;\n\t }\n\t /**\n\t\t * Dispose and disconnect\n\t\t * @return {Tone.AudioNode} this\n\t\t */\n\t Tone.AudioNode.prototype.dispose = function () {\n\t if (!Tone.isUndef(this.input)) {\n\t if (this.input instanceof AudioNode) {\n\t this.input.disconnect();\n\t }\n\t this.input = null;\n\t }\n\t if (!Tone.isUndef(this.output)) {\n\t if (this.output instanceof AudioNode) {\n\t this.output.disconnect();\n\t }\n\t this.output = null;\n\t }\n\t this._context = null;\n\t return this;\n\t };\n\t return Tone.AudioNode;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Base class for all Signals. Used Internally.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.SignalBase = function () {\n\t Tone.AudioNode.call(this);\n\t };\n\t Tone.extend(Tone.SignalBase, Tone.AudioNode);\n\t /**\n\t\t * When signals connect to other signals or AudioParams,\n\t\t * they take over the output value of that signal or AudioParam.\n\t\t * For all other nodes, the behavior is the same as a default <code>connect</code>.\n\t\t *\n\t\t * @override\n\t\t * @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n\t\t * @param {number} [outputNumber=0] The output number to connect from.\n\t\t * @param {number} [inputNumber=0] The input number to connect to.\n\t\t * @returns {Tone.SignalBase} this\n\t\t */\n\t Tone.SignalBase.prototype.connect = function (node, outputNumber, inputNumber) {\n\t //zero it out so that the signal can have full control\n\t if (Tone.Signal && Tone.Signal === node.constructor || Tone.Param && Tone.Param === node.constructor) {\n\t //cancel changes\n\t node._param.cancelScheduledValues(0);\n\t //reset the value\n\t node._param.value = 0;\n\t //mark the value as overridden\n\t node.overridden = true;\n\t } else if (node instanceof AudioParam) {\n\t node.cancelScheduledValues(0);\n\t node.value = 0;\n\t }\n\t Tone.AudioNode.prototype.connect.call(this, node, outputNumber, inputNumber);\n\t return this;\n\t };\n\t return Tone.SignalBase;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported) {\n\t //fixes safari only bug which is still present in 11\n\t var ua = navigator.userAgent.toLowerCase();\n\t var isSafari = ua.includes('safari') && !ua.includes('chrome');\n\t if (isSafari) {\n\t var WaveShaperNode = function (context) {\n\t this._internalNode = this.input = this.output = context._native_createWaveShaper();\n\t this._curve = null;\n\t for (var prop in this._internalNode) {\n\t this._defineProperty(this._internalNode, prop);\n\t }\n\t };\n\t Object.defineProperty(WaveShaperNode.prototype, 'curve', {\n\t get: function () {\n\t return this._curve;\n\t },\n\t set: function (curve) {\n\t this._curve = curve;\n\t var array = new Float32Array(curve.length + 1);\n\t array.set(curve, 1);\n\t array[0] = curve[0];\n\t this._internalNode.curve = array;\n\t }\n\t });\n\t WaveShaperNode.prototype._defineProperty = function (context, prop) {\n\t if (Tone.isUndef(this[prop])) {\n\t Object.defineProperty(this, prop, {\n\t get: function () {\n\t if (typeof context[prop] === 'function') {\n\t return context[prop].bind(context);\n\t } else {\n\t return context[prop];\n\t }\n\t },\n\t set: function (val) {\n\t context[prop] = val;\n\t }\n\t });\n\t }\n\t };\n\t AudioContext.prototype._native_createWaveShaper = AudioContext.prototype.createWaveShaper;\n\t AudioContext.prototype.createWaveShaper = function () {\n\t return new WaveShaperNode(this);\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Wraps the native Web Audio API\n\t\t * [WaveShaperNode](http://webaudio.github.io/web-audio-api/#the-waveshapernode-interface).\n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @param {function|Array|Number} mapping The function used to define the values.\n\t\t * The mapping function should take two arguments:\n\t\t * the first is the value at the current position\n\t\t * and the second is the array position.\n\t\t * If the argument is an array, that array will be\n\t\t * set as the wave shaping function. The input\n\t\t * signal is an AudioRange [-1, 1] value and the output\n\t\t * signal can take on any numerical values.\n\t\t *\n\t\t * @param {Number} [bufferLen=1024] The length of the WaveShaperNode buffer.\n\t\t * @example\n\t\t * var timesTwo = new Tone.WaveShaper(function(val){\n\t\t * \treturn val * 2;\n\t\t * }, 2048);\n\t\t * @example\n\t\t * //a waveshaper can also be constructed with an array of values\n\t\t * var invert = new Tone.WaveShaper([1, -1]);\n\t\t */\n\t Tone.WaveShaper = function (mapping, bufferLen) {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * the waveshaper\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._shaper = this.input = this.output = this.context.createWaveShaper();\n\t /**\n\t\t\t * the waveshapers curve\n\t\t\t * @type {Float32Array}\n\t\t\t * @private\n\t\t\t */\n\t this._curve = null;\n\t if (Array.isArray(mapping)) {\n\t this.curve = mapping;\n\t } else if (isFinite(mapping) || Tone.isUndef(mapping)) {\n\t this._curve = new Float32Array(Tone.defaultArg(mapping, 1024));\n\t } else if (Tone.isFunction(mapping)) {\n\t this._curve = new Float32Array(Tone.defaultArg(bufferLen, 1024));\n\t this.setMap(mapping);\n\t }\n\t };\n\t Tone.extend(Tone.WaveShaper, Tone.SignalBase);\n\t /**\n\t\t * Uses a mapping function to set the value of the curve.\n\t\t * @param {function} mapping The function used to define the values.\n\t\t * The mapping function take two arguments:\n\t\t * the first is the value at the current position\n\t\t * which goes from -1 to 1 over the number of elements\n\t\t * in the curve array. The second argument is the array position.\n\t\t * @returns {Tone.WaveShaper} this\n\t\t * @example\n\t\t * //map the input signal from [-1, 1] to [0, 10]\n\t\t * shaper.setMap(function(val, index){\n\t\t * \treturn (val + 1) * 5;\n\t\t * })\n\t\t */\n\t Tone.WaveShaper.prototype.setMap = function (mapping) {\n\t var array = new Array(this._curve.length);\n\t for (var i = 0, len = this._curve.length; i < len; i++) {\n\t var normalized = i / (len - 1) * 2 - 1;\n\t array[i] = mapping(normalized, i);\n\t }\n\t this.curve = array;\n\t return this;\n\t };\n\t /**\n\t\t * The array to set as the waveshaper curve. For linear curves\n\t\t * array length does not make much difference, but for complex curves\n\t\t * longer arrays will provide smoother interpolation.\n\t\t * @memberOf Tone.WaveShaper#\n\t\t * @type {Array}\n\t\t * @name curve\n\t\t */\n\t Object.defineProperty(Tone.WaveShaper.prototype, 'curve', {\n\t get: function () {\n\t return this._shaper.curve;\n\t },\n\t set: function (mapping) {\n\t this._curve = new Float32Array(mapping);\n\t this._shaper.curve = this._curve;\n\t }\n\t });\n\t /**\n\t\t * Specifies what type of oversampling (if any) should be used when\n\t\t * applying the shaping curve. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.WaveShaper#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t Object.defineProperty(Tone.WaveShaper.prototype, 'oversample', {\n\t get: function () {\n\t return this._shaper.oversample;\n\t },\n\t set: function (oversampling) {\n\t if ([\n\t 'none',\n\t '2x',\n\t '4x'\n\t ].includes(oversampling)) {\n\t this._shaper.oversample = oversampling;\n\t } else {\n\t throw new RangeError('Tone.WaveShaper: oversampling must be either \\'none\\', \\'2x\\', or \\'4x\\'');\n\t }\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.WaveShaper} this\n\t\t */\n\t Tone.WaveShaper.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._shaper.disconnect();\n\t this._shaper = null;\n\t this._curve = null;\n\t return this;\n\t };\n\t return Tone.WaveShaper;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TimeBase is a flexible encoding of time\n\t\t * which can be evaluated to and from a string.\n\t\t * @extends {Tone}\n\t\t * @param {Time} val The time value as a number or string\n\t\t * @param {String=} units Unit values\n\t\t * @example\n\t\t * Tone.TimeBase(4, \"n\")\n\t\t * Tone.TimeBase(2, \"t\")\n\t\t * Tone.TimeBase(\"2t\")\n\t\t * Tone.TimeBase(\"2t\") + Tone.TimeBase(\"4n\");\n\t\t */\n\t Tone.TimeBase = function (val, units) {\n\t //allows it to be constructed with or without 'new'\n\t if (this instanceof Tone.TimeBase) {\n\t /**\n\t\t\t\t * The value\n\t\t\t\t * @type {Number|String|Tone.TimeBase}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._val = val;\n\t /**\n\t\t\t\t * The units\n\t\t\t\t * @type {String?}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._units = units;\n\t //test if the value is a string representation of a number\n\t if (Tone.isUndef(this._units) && Tone.isString(this._val) && // eslint-disable-next-line eqeqeq\n\t parseFloat(this._val) == this._val && this._val.charAt(0) !== '+') {\n\t this._val = parseFloat(this._val);\n\t this._units = this._defaultUnits;\n\t } else if (val && val.constructor === this.constructor) {\n\t //if they're the same type, just copy values over\n\t this._val = val._val;\n\t this._units = val._units;\n\t } else if (val instanceof Tone.TimeBase) {\n\t switch (this._defaultUnits) {\n\t case 's':\n\t this._val = val.toSeconds();\n\t break;\n\t case 'i':\n\t this._val = val.toTicks();\n\t break;\n\t case 'hz':\n\t this._val = val.toFrequency();\n\t break;\n\t case 'midi':\n\t this._val = val.toMidi();\n\t break;\n\t default:\n\t throw new Error('Unrecognized default units ' + this._defaultUnits);\n\t }\n\t }\n\t } else {\n\t return new Tone.TimeBase(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.TimeBase);\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tABSTRACT SYNTAX TREE PARSER\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * All the primary expressions.\n\t\t * @private\n\t\t * @type {Object}\n\t\t */\n\t Tone.TimeBase.prototype._expressions = {\n\t 'n': {\n\t regexp: /^(\\d+)n(\\.?)$/i,\n\t method: function (value, dot) {\n\t value = parseInt(value);\n\t var scalar = dot === '.' ? 1.5 : 1;\n\t if (value === 1) {\n\t return this._beatsToUnits(this._getTimeSignature()) * scalar;\n\t } else {\n\t return this._beatsToUnits(4 / value) * scalar;\n\t }\n\t }\n\t },\n\t 't': {\n\t regexp: /^(\\d+)t$/i,\n\t method: function (value) {\n\t value = parseInt(value);\n\t return this._beatsToUnits(8 / (parseInt(value) * 3));\n\t }\n\t },\n\t 'm': {\n\t regexp: /^(\\d+)m$/i,\n\t method: function (value) {\n\t return this._beatsToUnits(parseInt(value) * this._getTimeSignature());\n\t }\n\t },\n\t 'i': {\n\t regexp: /^(\\d+)i$/i,\n\t method: function (value) {\n\t return this._ticksToUnits(parseInt(value));\n\t }\n\t },\n\t 'hz': {\n\t regexp: /^(\\d+(?:\\.\\d+)?)hz$/i,\n\t method: function (value) {\n\t return this._frequencyToUnits(parseFloat(value));\n\t }\n\t },\n\t 'tr': {\n\t regexp: /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?$/,\n\t method: function (m, q, s) {\n\t var total = 0;\n\t if (m && m !== '0') {\n\t total += this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t }\n\t if (q && q !== '0') {\n\t total += this._beatsToUnits(parseFloat(q));\n\t }\n\t if (s && s !== '0') {\n\t total += this._beatsToUnits(parseFloat(s) / 4);\n\t }\n\t return total;\n\t }\n\t },\n\t 's': {\n\t regexp: /^(\\d+(?:\\.\\d+)?)s$/,\n\t method: function (value) {\n\t return this._secondsToUnits(parseFloat(value));\n\t }\n\t },\n\t 'samples': {\n\t regexp: /^(\\d+)samples$/,\n\t method: function (value) {\n\t return parseInt(value) / this.context.sampleRate;\n\t }\n\t },\n\t 'default': {\n\t regexp: /^(\\d+(?:\\.\\d+)?)$/,\n\t method: function (value) {\n\t return this._expressions[this._defaultUnits].method.call(this, value);\n\t }\n\t }\n\t };\n\t /**\n\t\t * The default units if none are given.\n\t\t * @type {String}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._defaultUnits = 's';\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tTRANSPORT FALLBACKS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Return the bpm, or 120 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._getBpm = function () {\n\t if (Tone.Transport) {\n\t return Tone.Transport.bpm.value;\n\t } else {\n\t return 120;\n\t }\n\t };\n\t /**\n\t\t * Return the timeSignature or 4 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._getTimeSignature = function () {\n\t if (Tone.Transport) {\n\t return Tone.Transport.timeSignature;\n\t } else {\n\t return 4;\n\t }\n\t };\n\t /**\n\t\t * Return the PPQ or 192 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._getPPQ = function () {\n\t if (Tone.Transport) {\n\t return Tone.Transport.PPQ;\n\t } else {\n\t return 192;\n\t }\n\t };\n\t /**\n\t\t * Return the current time in whichever context is relevant\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._now = function () {\n\t return this.now();\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tUNIT CONVERSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Returns the value of a frequency in the current units\n\t\t * @param {Frequency} freq\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._frequencyToUnits = function (freq) {\n\t return 1 / freq;\n\t };\n\t /**\n\t\t * Return the value of the beats in the current units\n\t\t * @param {Number} beats\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._beatsToUnits = function (beats) {\n\t return 60 / this._getBpm() * beats;\n\t };\n\t /**\n\t\t * Returns the value of a second in the current units\n\t\t * @param {Seconds} seconds\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._secondsToUnits = function (seconds) {\n\t return seconds;\n\t };\n\t /**\n\t\t * Returns the value of a tick in the current time units\n\t\t * @param {Ticks} ticks\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._ticksToUnits = function (ticks) {\n\t return ticks * (this._beatsToUnits(1) / this._getPPQ());\n\t };\n\t /**\n\t\t * With no arguments, return 'now'\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._noArg = function () {\n\t return this._now();\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tEXPRESSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Evaluate the time value. Returns the time\n\t\t * in seconds.\n\t\t * @return {Seconds}\n\t\t */\n\t Tone.TimeBase.prototype.valueOf = function () {\n\t if (Tone.isUndef(this._val)) {\n\t return this._noArg();\n\t } else if (Tone.isString(this._val) && Tone.isUndef(this._units)) {\n\t for (var units in this._expressions) {\n\t if (this._expressions[units].regexp.test(this._val.trim())) {\n\t this._units = units;\n\t break;\n\t }\n\t }\n\t }\n\t if (!Tone.isUndef(this._units)) {\n\t var expr = this._expressions[this._units];\n\t var matching = this._val.toString().trim().match(expr.regexp);\n\t if (matching) {\n\t return expr.method.apply(this, matching.slice(1));\n\t } else {\n\t return expr.method.call(this, parseFloat(this._val));\n\t }\n\t } else {\n\t return this._val;\n\t }\n\t };\n\t /**\n\t\t * Return the value in seconds\n\t\t * @return {Seconds}\n\t\t */\n\t Tone.TimeBase.prototype.toSeconds = function () {\n\t return this.valueOf();\n\t };\n\t /**\n\t\t * Return the value in hertz\n\t\t * @return {Frequency}\n\t\t */\n\t Tone.TimeBase.prototype.toFrequency = function () {\n\t return 1 / this.toSeconds();\n\t };\n\t /**\n\t\t * Return the time in samples\n\t\t * @return {Samples}\n\t\t */\n\t Tone.TimeBase.prototype.toSamples = function () {\n\t return this.toSeconds() * this.context.sampleRate;\n\t };\n\t /**\n\t\t * Return the time in milliseconds.\n\t\t * @return {Milliseconds}\n\t\t */\n\t Tone.TimeBase.prototype.toMilliseconds = function () {\n\t return this.toSeconds() * 1000;\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.TimeBase} this\n\t\t */\n\t Tone.TimeBase.prototype.dispose = function () {\n\t this._val = null;\n\t this._units = null;\n\t };\n\t return Tone.TimeBase;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Frequency is a primitive type for encoding Frequency values.\n\t\t * Eventually all time values are evaluated to hertz\n\t\t * using the `eval` method.\n\t\t * @constructor\n\t\t * @extends {Tone.TimeBase}\n\t\t * @param {String|Number} val The time value.\n\t\t * @param {String=} units The units of the value.\n\t\t * @example\n\t\t * Tone.Frequency(\"C3\") // 261\n\t\t * Tone.Frequency(38, \"midi\") //\n\t\t * Tone.Frequency(\"C3\").transpose(4);\n\t\t */\n\t Tone.Frequency = function (val, units) {\n\t if (this instanceof Tone.Frequency) {\n\t Tone.TimeBase.call(this, val, units);\n\t } else {\n\t return new Tone.Frequency(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.Frequency, Tone.TimeBase);\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tAUGMENT BASE EXPRESSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t Tone.Frequency.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t 'midi': {\n\t regexp: /^(\\d+(?:\\.\\d+)?midi)/,\n\t method: function (value) {\n\t if (this._defaultUnits === 'midi') {\n\t return value;\n\t } else {\n\t return Tone.Frequency.mtof(value);\n\t }\n\t }\n\t },\n\t 'note': {\n\t regexp: /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,\n\t method: function (pitch, octave) {\n\t var index = noteToScaleIndex[pitch.toLowerCase()];\n\t var noteNumber = index + (parseInt(octave) + 1) * 12;\n\t if (this._defaultUnits === 'midi') {\n\t return noteNumber;\n\t } else {\n\t return Tone.Frequency.mtof(noteNumber);\n\t }\n\t }\n\t },\n\t 'tr': {\n\t regexp: /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?/,\n\t method: function (m, q, s) {\n\t var total = 1;\n\t if (m && m !== '0') {\n\t total *= this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t }\n\t if (q && q !== '0') {\n\t total *= this._beatsToUnits(parseFloat(q));\n\t }\n\t if (s && s !== '0') {\n\t total *= this._beatsToUnits(parseFloat(s) / 4);\n\t }\n\t return total;\n\t }\n\t }\n\t });\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tEXPRESSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Transposes the frequency by the given number of semitones.\n\t\t * @param {Interval} interval\n\t\t * @return {Tone.Frequency} A new transposed frequency\n\t\t * @example\n\t\t * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n\t\t */\n\t Tone.Frequency.prototype.transpose = function (interval) {\n\t return new this.constructor(this.valueOf() * Tone.intervalToFrequencyRatio(interval));\n\t };\n\t /**\n\t\t * Takes an array of semitone intervals and returns\n\t\t * an array of frequencies transposed by those intervals.\n\t\t * @param {Array} intervals\n\t\t * @return {Array<Tone.Frequency>} Returns an array of Frequencies\n\t\t * @example\n\t\t * Tone.Frequency(\"A4\").harmonize([0, 3, 7]); //[\"A4\", \"C5\", \"E5\"]\n\t\t */\n\t Tone.Frequency.prototype.harmonize = function (intervals) {\n\t return intervals.map(function (interval) {\n\t return this.transpose(interval);\n\t }.bind(this));\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tUNIT CONVERSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Return the value of the frequency as a MIDI note\n\t\t * @return {MIDI}\n\t\t * @example\n\t\t * Tone.Frequency(\"C4\").toMidi(); //60\n\t\t */\n\t Tone.Frequency.prototype.toMidi = function () {\n\t return Tone.Frequency.ftom(this.valueOf());\n\t };\n\t /**\n\t\t * Return the value of the frequency in Scientific Pitch Notation\n\t\t * @return {Note}\n\t\t * @example\n\t\t * Tone.Frequency(69, \"midi\").toNote(); //\"A4\"\n\t\t */\n\t Tone.Frequency.prototype.toNote = function () {\n\t var freq = this.toFrequency();\n\t var log = Math.log2(freq / Tone.Frequency.A4);\n\t var noteNumber = Math.round(12 * log) + 57;\n\t var octave = Math.floor(noteNumber / 12);\n\t if (octave < 0) {\n\t noteNumber += -12 * octave;\n\t }\n\t var noteName = scaleIndexToNote[noteNumber % 12];\n\t return noteName + octave.toString();\n\t };\n\t /**\n\t\t * Return the duration of one cycle in seconds.\n\t\t * @return {Seconds}\n\t\t */\n\t Tone.Frequency.prototype.toSeconds = function () {\n\t return 1 / Tone.TimeBase.prototype.toSeconds.call(this);\n\t };\n\t /**\n\t\t * Return the value in Hertz\n\t\t * @return {Frequency}\n\t\t */\n\t Tone.Frequency.prototype.toFrequency = function () {\n\t return Tone.TimeBase.prototype.toFrequency.call(this);\n\t };\n\t /**\n\t\t * Return the duration of one cycle in ticks\n\t\t * @return {Ticks}\n\t\t */\n\t Tone.Frequency.prototype.toTicks = function () {\n\t var quarterTime = this._beatsToUnits(1);\n\t var quarters = this.valueOf() / quarterTime;\n\t return Math.floor(quarters * Tone.Transport.PPQ);\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tUNIT CONVERSIONS HELPERS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * With no arguments, return 0\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._noArg = function () {\n\t return 0;\n\t };\n\t /**\n\t\t * Returns the value of a frequency in the current units\n\t\t * @param {Frequency} freq\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._frequencyToUnits = function (freq) {\n\t return freq;\n\t };\n\t /**\n\t\t * Returns the value of a tick in the current time units\n\t\t * @param {Ticks} ticks\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._ticksToUnits = function (ticks) {\n\t return 1 / (ticks * 60 / (Tone.Transport.bpm.value * Tone.Transport.PPQ));\n\t };\n\t /**\n\t\t * Return the value of the beats in the current units\n\t\t * @param {Number} beats\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._beatsToUnits = function (beats) {\n\t return 1 / Tone.TimeBase.prototype._beatsToUnits.call(this, beats);\n\t };\n\t /**\n\t\t * Returns the value of a second in the current units\n\t\t * @param {Seconds} seconds\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._secondsToUnits = function (seconds) {\n\t return 1 / seconds;\n\t };\n\t /**\n\t\t * The default units if none are given.\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._defaultUnits = 'hz';\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tFREQUENCY CONVERSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Note to scale index\n\t\t * @type {Object}\n\t\t */\n\t var noteToScaleIndex = {\n\t 'cbb': -2,\n\t 'cb': -1,\n\t 'c': 0,\n\t 'c#': 1,\n\t 'cx': 2,\n\t 'dbb': 0,\n\t 'db': 1,\n\t 'd': 2,\n\t 'd#': 3,\n\t 'dx': 4,\n\t 'ebb': 2,\n\t 'eb': 3,\n\t 'e': 4,\n\t 'e#': 5,\n\t 'ex': 6,\n\t 'fbb': 3,\n\t 'fb': 4,\n\t 'f': 5,\n\t 'f#': 6,\n\t 'fx': 7,\n\t 'gbb': 5,\n\t 'gb': 6,\n\t 'g': 7,\n\t 'g#': 8,\n\t 'gx': 9,\n\t 'abb': 7,\n\t 'ab': 8,\n\t 'a': 9,\n\t 'a#': 10,\n\t 'ax': 11,\n\t 'bbb': 9,\n\t 'bb': 10,\n\t 'b': 11,\n\t 'b#': 12,\n\t 'bx': 13\n\t };\n\t /**\n\t\t * scale index to note (sharps)\n\t\t * @type {Array}\n\t\t */\n\t var scaleIndexToNote = [\n\t 'C',\n\t 'C#',\n\t 'D',\n\t 'D#',\n\t 'E',\n\t 'F',\n\t 'F#',\n\t 'G',\n\t 'G#',\n\t 'A',\n\t 'A#',\n\t 'B'\n\t ];\n\t /**\n\t\t * The [concert pitch](https://en.wikipedia.org/wiki/Concert_pitch)\n\t\t * A4's values in Hertz.\n\t\t * @type {Frequency}\n\t\t * @static\n\t\t */\n\t Tone.Frequency.A4 = 440;\n\t /**\n\t\t * Convert a MIDI note to frequency value.\n\t\t * @param {MIDI} midi The midi number to convert.\n\t\t * @return {Frequency} the corresponding frequency value\n\t\t * @static\n\t\t * @example\n\t\t * Tone.Frequency.mtof(69); // returns 440\n\t\t */\n\t Tone.Frequency.mtof = function (midi) {\n\t return Tone.Frequency.A4 * Math.pow(2, (midi - 69) / 12);\n\t };\n\t /**\n\t\t * Convert a frequency value to a MIDI note.\n\t\t * @param {Frequency} frequency The value to frequency value to convert.\n\t\t * @returns {MIDI}\n\t\t * @static\n\t\t * @example\n\t\t * Tone.Frequency.ftom(440); // returns 69\n\t\t */\n\t Tone.Frequency.ftom = function (frequency) {\n\t return 69 + Math.round(12 * Math.log2(frequency / Tone.Frequency.A4));\n\t };\n\t return Tone.Frequency;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Time is a primitive type for encoding Time values.\n\t\t * Tone.Time can be constructed with or without the `new` keyword. Tone.Time can be passed\n\t\t * into the parameter of any method which takes time as an argument.\n\t\t * @constructor\n\t\t * @extends {Tone.TimeBase}\n\t\t * @param {String|Number} val The time value.\n\t\t * @param {String=} units The units of the value.\n\t\t * @example\n\t\t * var t = Tone.Time(\"4n\");//a quarter note\n\t\t */\n\t Tone.Time = function (val, units) {\n\t if (this instanceof Tone.Time) {\n\t Tone.TimeBase.call(this, val, units);\n\t } else {\n\t return new Tone.Time(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.Time, Tone.TimeBase);\n\t /**\n\t\t * Extend the base expressions\n\t\t */\n\t Tone.Time.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t 'quantize': {\n\t regexp: /^@(.+)/,\n\t method: function (capture) {\n\t if (Tone.Transport) {\n\t var quantTo = new this.constructor(capture);\n\t return Tone.Transport.nextSubdivision(quantTo);\n\t } else {\n\t return 0;\n\t }\n\t }\n\t },\n\t 'now': {\n\t regexp: /^\\+(.+)/,\n\t method: function (capture) {\n\t return this._now() + new this.constructor(capture);\n\t }\n\t }\n\t });\n\t /**\n\t\t * Quantize the time by the given subdivision. Optionally add a\n\t\t * percentage which will move the time value towards the ideal\n\t\t * quantized value by that percentage.\n\t\t * @param {Number|Time} val The subdivision to quantize to\n\t\t * @param {NormalRange} [percent=1] Move the time value\n\t\t * towards the quantized value by\n\t\t * a percentage.\n\t\t * @return {Number} this\n\t\t * @example\n\t\t * Tone.Time(21).quantize(2) //returns 22\n\t\t * Tone.Time(0.6).quantize(\"4n\", 0.5) //returns 0.55\n\t\t */\n\t Tone.Time.prototype.quantize = function (subdiv, percent) {\n\t percent = Tone.defaultArg(percent, 1);\n\t var subdivision = new this.constructor(subdiv);\n\t var value = this.valueOf();\n\t var multiple = Math.round(value / subdivision);\n\t var ideal = multiple * subdivision;\n\t var diff = ideal - value;\n\t return value + diff * percent;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t // CONVERSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Convert a Time to Notation. The notation values are will be the\n\t\t * closest representation between 1m to 128th note.\n\t\t * @return {Notation}\n\t\t * @example\n\t\t * //if the Transport is at 120bpm:\n\t\t * Tone.Time(2).toNotation();//returns \"1m\"\n\t\t */\n\t Tone.Time.prototype.toNotation = function () {\n\t var time = this.toSeconds();\n\t var testNotations = ['1m'];\n\t for (var power = 1; power < 8; power++) {\n\t var subdiv = Math.pow(2, power);\n\t testNotations.push(subdiv + 'n.');\n\t testNotations.push(subdiv + 'n');\n\t testNotations.push(subdiv + 't');\n\t }\n\t testNotations.push('0');\n\t //find the closets notation representation\n\t var closest = testNotations[0];\n\t var closestSeconds = Tone.Time(testNotations[0]).toSeconds();\n\t testNotations.forEach(function (notation) {\n\t var notationSeconds = Tone.Time(notation).toSeconds();\n\t if (Math.abs(notationSeconds - time) < Math.abs(closestSeconds - time)) {\n\t closest = notation;\n\t closestSeconds = notationSeconds;\n\t }\n\t });\n\t return closest;\n\t };\n\t /**\n\t\t * Return the time encoded as Bars:Beats:Sixteenths.\n\t\t * @return {BarsBeatsSixteenths}\n\t\t */\n\t Tone.Time.prototype.toBarsBeatsSixteenths = function () {\n\t var quarterTime = this._beatsToUnits(1);\n\t var quarters = this.valueOf() / quarterTime;\n\t var measures = Math.floor(quarters / this._getTimeSignature());\n\t var sixteenths = quarters % 1 * 4;\n\t quarters = Math.floor(quarters) % this._getTimeSignature();\n\t sixteenths = sixteenths.toString();\n\t if (sixteenths.length > 3) {\n\t // the additional parseFloat removes insignificant trailing zeroes\n\t sixteenths = parseFloat(parseFloat(sixteenths).toFixed(3));\n\t }\n\t var progress = [\n\t measures,\n\t quarters,\n\t sixteenths\n\t ];\n\t return progress.join(':');\n\t };\n\t /**\n\t\t * Return the time in ticks.\n\t\t * @return {Ticks}\n\t\t */\n\t Tone.Time.prototype.toTicks = function () {\n\t var quarterTime = this._beatsToUnits(1);\n\t var quarters = this.valueOf() / quarterTime;\n\t return Math.round(quarters * this._getPPQ());\n\t };\n\t /**\n\t\t * Return the time in seconds.\n\t\t * @return {Seconds}\n\t\t */\n\t Tone.Time.prototype.toSeconds = function () {\n\t return this.valueOf();\n\t };\n\t /**\n\t\t * Return the value as a midi note.\n\t\t * @return {Midi}\n\t\t */\n\t Tone.Time.prototype.toMidi = function () {\n\t return Tone.Frequency.ftom(this.toFrequency());\n\t };\n\t return Tone.Time;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TransportTime is a the time along the Transport's\n\t\t * timeline. It is similar to Tone.Time, but instead of evaluating\n\t\t * against the AudioContext's clock, it is evaluated against\n\t\t * the Transport's position. See [TransportTime wiki](https://github.com/Tonejs/Tone.js/wiki/TransportTime).\n\t\t * @constructor\n\t\t * @param {Time} val The time value as a number or string\n\t\t * @param {String=} units Unit values\n\t\t * @extends {Tone.Time}\n\t\t */\n\t Tone.TransportTime = function (val, units) {\n\t if (this instanceof Tone.TransportTime) {\n\t Tone.Time.call(this, val, units);\n\t } else {\n\t return new Tone.TransportTime(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.TransportTime, Tone.Time);\n\t /**\n\t\t * Return the current time in whichever context is relevant\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.TransportTime.prototype._now = function () {\n\t return Tone.Transport.seconds;\n\t };\n\t return Tone.TransportTime;\n\t});\n\tModule(function (Tone) {\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tTYPES\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Units which a value can take on.\n\t\t * @enum {String}\n\t\t */\n\t Tone.Type = {\n\t /**\n\t\t\t * Default units\n\t\t\t * @typedef {Default}\n\t\t\t */\n\t Default: 'number',\n\t /**\n\t\t\t * Time can be described in a number of ways. Read more [Time](https://github.com/Tonejs/Tone.js/wiki/Time).\n\t\t\t *\n\t\t\t * * Numbers, which will be taken literally as the time (in seconds).\n\t\t\t * * Notation, (\"4n\", \"8t\") describes time in BPM and time signature relative values.\n\t\t\t * * TransportTime, (\"4:3:2\") will also provide tempo and time signature relative times\n\t\t\t * in the form BARS:QUARTERS:SIXTEENTHS.\n\t\t\t * * Frequency, (\"8hz\") is converted to the length of the cycle in seconds.\n\t\t\t * * Now-Relative, (\"+1\") prefix any of the above with \"+\" and it will be interpreted as\n\t\t\t * \"the current time plus whatever expression follows\".\n\t\t\t * * Expressions, (\"3:0 + 2 - (1m / 7)\") any of the above can also be combined\n\t\t\t * into a mathematical expression which will be evaluated to compute the desired time.\n\t\t\t * * No Argument, for methods which accept time, no argument will be interpreted as\n\t\t\t * \"now\" (i.e. the currentTime).\n\t\t\t *\n\t\t\t * @typedef {Time}\n\t\t\t */\n\t Time: 'time',\n\t /**\n\t\t\t * Frequency can be described similar to time, except ultimately the\n\t\t\t * values are converted to frequency instead of seconds. A number\n\t\t\t * is taken literally as the value in hertz. Additionally any of the\n\t\t\t * Time encodings can be used. Note names in the form\n\t\t\t * of NOTE OCTAVE (i.e. C4) are also accepted and converted to their\n\t\t\t * frequency value.\n\t\t\t * @typedef {Frequency}\n\t\t\t */\n\t Frequency: 'frequency',\n\t /**\n\t\t\t * TransportTime describes a position along the Transport's timeline. It is\n\t\t\t * similar to Time in that it uses all the same encodings, but TransportTime specifically\n\t\t\t * pertains to the Transport's timeline, which is startable, stoppable, loopable, and seekable.\n\t\t\t * [Read more](https://github.com/Tonejs/Tone.js/wiki/TransportTime)\n\t\t\t * @typedef {TransportTime}\n\t\t\t */\n\t TransportTime: 'transportTime',\n\t /**\n\t\t\t * Ticks are the basic subunit of the Transport. They are\n\t\t\t * the smallest unit of time that the Transport supports.\n\t\t\t * @typedef {Ticks}\n\t\t\t */\n\t Ticks: 'ticks',\n\t /**\n\t\t\t * Normal values are within the range [0, 1].\n\t\t\t * @typedef {NormalRange}\n\t\t\t */\n\t NormalRange: 'normalRange',\n\t /**\n\t\t\t * AudioRange values are between [-1, 1].\n\t\t\t * @typedef {AudioRange}\n\t\t\t */\n\t AudioRange: 'audioRange',\n\t /**\n\t\t\t * Decibels are a logarithmic unit of measurement which is useful for volume\n\t\t\t * because of the logarithmic way that we perceive loudness. 0 decibels\n\t\t\t * means no change in volume. -10db is approximately half as loud and 10db\n\t\t\t * is twice is loud.\n\t\t\t * @typedef {Decibels}\n\t\t\t */\n\t Decibels: 'db',\n\t /**\n\t\t\t * Half-step note increments, i.e. 12 is an octave above the root. and 1 is a half-step up.\n\t\t\t * @typedef {Interval}\n\t\t\t */\n\t Interval: 'interval',\n\t /**\n\t\t\t * Beats per minute.\n\t\t\t * @typedef {BPM}\n\t\t\t */\n\t BPM: 'bpm',\n\t /**\n\t\t\t * The value must be greater than or equal to 0.\n\t\t\t * @typedef {Positive}\n\t\t\t */\n\t Positive: 'positive',\n\t /**\n\t\t\t * Gain is the ratio between input and output of a signal.\n\t\t\t * A gain of 0 is the same as silencing the signal. A gain of\n\t\t\t * 1, causes no change to the incoming signal.\n\t\t\t * @typedef {Gain}\n\t\t\t */\n\t Gain: 'gain',\n\t /**\n\t\t\t * A cent is a hundredth of a semitone.\n\t\t\t * @typedef {Cents}\n\t\t\t */\n\t Cents: 'cents',\n\t /**\n\t\t\t * Angle between 0 and 360.\n\t\t\t * @typedef {Degrees}\n\t\t\t */\n\t Degrees: 'degrees',\n\t /**\n\t\t\t * A number representing a midi note.\n\t\t\t * @typedef {MIDI}\n\t\t\t */\n\t MIDI: 'midi',\n\t /**\n\t\t\t * A colon-separated representation of time in the form of\n\t\t\t * Bars:Beats:Sixteenths.\n\t\t\t * @typedef {BarsBeatsSixteenths}\n\t\t\t */\n\t BarsBeatsSixteenths: 'barsBeatsSixteenths',\n\t /**\n\t\t\t * Sampling is the reduction of a continuous signal to a discrete signal.\n\t\t\t * Audio is typically sampled 44100 times per second.\n\t\t\t * @typedef {Samples}\n\t\t\t */\n\t Samples: 'samples',\n\t /**\n\t\t\t * Hertz are a frequency representation defined as one cycle per second.\n\t\t\t * @typedef {Hertz}\n\t\t\t */\n\t Hertz: 'hertz',\n\t /**\n\t\t\t * A frequency represented by a letter name,\n\t\t\t * accidental and octave. This system is known as\n\t\t\t * [Scientific Pitch Notation](https://en.wikipedia.org/wiki/Scientific_pitch_notation).\n\t\t\t * @typedef {Note}\n\t\t\t */\n\t Note: 'note',\n\t /**\n\t\t\t * One millisecond is a thousandth of a second.\n\t\t\t * @typedef {Milliseconds}\n\t\t\t */\n\t Milliseconds: 'milliseconds',\n\t /**\n\t\t\t * Seconds are the time unit of the AudioContext. In the end,\n\t\t\t * all values need to be evaluated to seconds.\n\t\t\t * @typedef {Seconds}\n\t\t\t */\n\t Seconds: 'seconds',\n\t /**\n\t\t\t * A string representing a duration relative to a measure.\n\t\t\t * * \"4n\" = quarter note\n\t\t\t * * \"2m\" = two measures\n\t\t\t * * \"8t\" = eighth-note triplet\n\t\t\t * @typedef {Notation}\n\t\t\t */\n\t Notation: 'notation'\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t // AUGMENT TONE's PROTOTYPE\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Convert Time into seconds.\n\t\t *\n\t\t * Unlike the method which it overrides, this takes into account\n\t\t * transporttime and musical notation.\n\t\t *\n\t\t * Time : 1.40\n\t\t * Notation: 4n or 1m or 2t\n\t\t * Now Relative: +3n\n\t\t * Math: 3n+16n or even complicated expressions ((3n*2)/6 + 1)\n\t\t *\n\t\t * @param {Time} time\n\t\t * @return {Seconds}\n\t\t */\n\t Tone.prototype.toSeconds = function (time) {\n\t if (Tone.isNumber(time)) {\n\t return time;\n\t } else if (Tone.isUndef(time)) {\n\t return this.now();\n\t } else if (Tone.isString(time)) {\n\t return new Tone.Time(time).toSeconds();\n\t } else if (time instanceof Tone.TimeBase) {\n\t return time.toSeconds();\n\t }\n\t };\n\t /**\n\t\t * Convert a frequency representation into a number.\n\t\t * @param {Frequency} freq\n\t\t * @return {Hertz} the frequency in hertz\n\t\t */\n\t Tone.prototype.toFrequency = function (freq) {\n\t if (Tone.isNumber(freq)) {\n\t return freq;\n\t } else if (Tone.isString(freq) || Tone.isUndef(freq)) {\n\t return new Tone.Frequency(freq).valueOf();\n\t } else if (freq instanceof Tone.TimeBase) {\n\t return freq.toFrequency();\n\t }\n\t };\n\t /**\n\t\t * Convert a time representation into ticks.\n\t\t * @param {Time} time\n\t\t * @return {Ticks} the time in ticks\n\t\t */\n\t Tone.prototype.toTicks = function (time) {\n\t if (Tone.isNumber(time) || Tone.isString(time)) {\n\t return new Tone.TransportTime(time).toTicks();\n\t } else if (Tone.isUndef(time)) {\n\t return Tone.Transport.ticks;\n\t } else if (time instanceof Tone.TimeBase) {\n\t return time.toTicks();\n\t }\n\t };\n\t return Tone;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Param wraps the native Web Audio's AudioParam to provide\n\t\t * additional unit conversion functionality. It also\n\t\t * serves as a base-class for classes which have a single,\n\t\t * automatable parameter.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {AudioParam} param The parameter to wrap.\n\t\t * @param {Tone.Type} units The units of the audio param.\n\t\t * @param {Boolean} convert If the param should be converted.\n\t\t */\n\t Tone.Param = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'param',\n\t 'units',\n\t 'convert'\n\t ], Tone.Param);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The native parameter to control\n\t\t\t * @type {AudioParam}\n\t\t\t * @private\n\t\t\t */\n\t this._param = this.input = options.param;\n\t /**\n\t\t\t * The units of the parameter\n\t\t\t * @type {Tone.Type}\n\t\t\t */\n\t this.units = options.units;\n\t /**\n\t\t\t * If the value should be converted or not\n\t\t\t * @type {Boolean}\n\t\t\t */\n\t this.convert = options.convert;\n\t /**\n\t\t\t * True if the signal value is being overridden by\n\t\t\t * a connected signal.\n\t\t\t * @readOnly\n\t\t\t * @type {boolean}\n\t\t\t * @private\n\t\t\t */\n\t this.overridden = false;\n\t /**\n\t\t\t * The timeline which tracks all of the automations.\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t this._events = new Tone.Timeline(1000);\n\t if (!Tone.isUndef(options.value) && this._param) {\n\t this.value = options.value;\n\t }\n\t };\n\t Tone.extend(Tone.Param, Tone.AudioNode);\n\t /**\n\t\t * Defaults\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Param.defaults = {\n\t 'units': Tone.Type.Default,\n\t 'convert': true,\n\t 'param': undefined\n\t };\n\t /**\n\t\t * The current value of the parameter.\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.Param.prototype, 'value', {\n\t get: function () {\n\t var now = this.now();\n\t return this._toUnits(this.getValueAtTime(now));\n\t },\n\t set: function (value) {\n\t this._initialValue = this._fromUnits(value);\n\t this.setValueAtTime(value, this.now());\n\t }\n\t });\n\t /**\n\t\t * The minimum output value of the parameter\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.Param.prototype, 'minValue', {\n\t get: function () {\n\t if (this.units === Tone.Type.Time || this.units === Tone.Type.Frequency || this.units === Tone.Type.NormalRange || this.units === Tone.Type.Positive || this.units === Tone.Type.BPM) {\n\t return 0;\n\t } else if (this.units === Tone.Type.AudioRange) {\n\t return -1;\n\t } else if (this.units === Tone.Type.Decibels) {\n\t return -Infinity;\n\t } else {\n\t return this._param.minValue;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The maximum output value of the parameter\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.Param.prototype, 'maxValue', {\n\t get: function () {\n\t if (this.units === Tone.Type.NormalRange || this.units === Tone.Type.AudioRange) {\n\t return 1;\n\t } else {\n\t return this._param.maxValue;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Convert the given value from the type specified by Tone.Param.units\n\t\t * into the destination value (such as Gain or Frequency).\n\t\t * @private\n\t\t * @param {*} val the value to convert\n\t\t * @return {number} the number which the value should be set to\n\t\t */\n\t Tone.Param.prototype._fromUnits = function (val) {\n\t if ((this.convert || Tone.isUndef(this.convert)) && !this.overridden) {\n\t switch (this.units) {\n\t case Tone.Type.Time:\n\t return this.toSeconds(val);\n\t case Tone.Type.Frequency:\n\t return this.toFrequency(val);\n\t case Tone.Type.Decibels:\n\t return Tone.dbToGain(val);\n\t case Tone.Type.NormalRange:\n\t return Math.min(Math.max(val, 0), 1);\n\t case Tone.Type.AudioRange:\n\t return Math.min(Math.max(val, -1), 1);\n\t case Tone.Type.Positive:\n\t return Math.max(val, 0);\n\t default:\n\t return val;\n\t }\n\t } else {\n\t return val;\n\t }\n\t };\n\t /**\n\t\t * Convert the parameters value into the units specified by Tone.Param.units.\n\t\t * @private\n\t\t * @param {number} val the value to convert\n\t\t * @return {number}\n\t\t */\n\t Tone.Param.prototype._toUnits = function (val) {\n\t if (this.convert || Tone.isUndef(this.convert)) {\n\t switch (this.units) {\n\t case Tone.Type.Decibels:\n\t return Tone.gainToDb(val);\n\t default:\n\t return val;\n\t }\n\t } else {\n\t return val;\n\t }\n\t };\n\t /**\n\t\t * the minimum output value\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.Param.prototype._minOutput = 0.00001;\n\t /**\n\t\t * If scheduling past events should create a warning notification\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t Tone.Param.prototype._ignorePast = false;\n\t /**\n\t\t * The event types\n\t\t * @enum {String}\n\t\t * @private\n\t\t */\n\t Tone.Param.AutomationType = {\n\t Linear: 'linearRampToValueAtTime',\n\t Exponential: 'exponentialRampToValueAtTime',\n\t Target: 'setTargetAtTime',\n\t SetValue: 'setValueAtTime'\n\t };\n\t /**\n\t\t * Schedules a parameter value change at the given time.\n\t\t * @param {*}\tvalue The value to set the signal.\n\t\t * @param {Time} time The time when the change should occur.\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //set the frequency to \"G4\" in exactly 1 second from now.\n\t\t * freq.setValueAtTime(\"G4\", \"+1\");\n\t\t */\n\t Tone.Param.prototype.setValueAtTime = function (value, time) {\n\t time = this.toSeconds(time);\n\t value = this._fromUnits(value);\n\t if (!this._ignorePast) {\n\t Tone.isPast(time);\n\t }\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.SetValue,\n\t 'value': value,\n\t 'time': time\n\t });\n\t this._param.setValueAtTime(value, time);\n\t return this;\n\t };\n\t /**\n\t\t * Get the signals value at the given time. Subsequent scheduling\n\t\t * may invalidate the returned value.\n\t\t * @param {Time} time When to get the value\n\t\t * @returns {Number} The value at the given time\n\t\t */\n\t Tone.Param.prototype.getValueAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t var after = this._events.getAfter(time);\n\t var before = this._events.get(time);\n\t var initialValue = Tone.defaultArg(this._initialValue, this._param.defaultValue);\n\t var value = initialValue;\n\t //if it was set by\n\t if (before === null) {\n\t value = initialValue;\n\t } else if (before.type === Tone.Param.AutomationType.Target) {\n\t var previous = this._events.getBefore(before.time);\n\t var previousVal;\n\t if (previous === null) {\n\t previousVal = initialValue;\n\t } else {\n\t previousVal = previous.value;\n\t }\n\t value = this._exponentialApproach(before.time, previousVal, before.value, before.constant, time);\n\t } else if (after === null) {\n\t value = before.value;\n\t } else if (after.type === Tone.Param.AutomationType.Linear) {\n\t value = this._linearInterpolate(before.time, before.value, after.time, after.value, time);\n\t } else if (after.type === Tone.Param.AutomationType.Exponential) {\n\t value = this._exponentialInterpolate(before.time, before.value, after.time, after.value, time);\n\t } else {\n\t value = before.value;\n\t }\n\t return value;\n\t };\n\t /**\n\t\t * Creates a schedule point with the current value at the current time.\n\t\t * This is useful for creating an automation anchor point in order to\n\t\t * schedule changes from the current value.\n\t\t *\n\t\t * @param {number=} now (Optionally) pass the now value in.\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.setRampPoint = function (time) {\n\t time = this.toSeconds(time);\n\t var currentVal = this.getValueAtTime(time);\n\t this.cancelAndHoldAtTime(time);\n\t if (currentVal === 0) {\n\t currentVal = this._minOutput;\n\t }\n\t this.setValueAtTime(this._toUnits(currentVal), time);\n\t return this;\n\t };\n\t /**\n\t\t * Schedules a linear continuous change in parameter value from the\n\t\t * previous scheduled parameter value to the given value.\n\t\t *\n\t\t * @param {number} value\n\t\t * @param {Time} endTime\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.linearRampToValueAtTime = function (value, endTime) {\n\t value = this._fromUnits(value);\n\t endTime = this.toSeconds(endTime);\n\t if (!this._ignorePast) {\n\t Tone.isPast(endTime);\n\t }\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.Linear,\n\t 'value': value,\n\t 'time': endTime\n\t });\n\t this._param.linearRampToValueAtTime(value, endTime);\n\t return this;\n\t };\n\t /**\n\t\t * Schedules an exponential continuous change in parameter value from\n\t\t * the previous scheduled parameter value to the given value.\n\t\t *\n\t\t * @param {number} value\n\t\t * @param {Time} endTime\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.exponentialRampToValueAtTime = function (value, endTime) {\n\t value = this._fromUnits(value);\n\t value = Math.max(this._minOutput, value);\n\t endTime = this.toSeconds(endTime);\n\t if (!this._ignorePast) {\n\t Tone.isPast(endTime);\n\t }\n\t //store the event\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.Exponential,\n\t 'time': endTime,\n\t 'value': value\n\t });\n\t this._param.exponentialRampToValueAtTime(value, endTime);\n\t return this;\n\t };\n\t /**\n\t\t * Schedules an exponential continuous change in parameter value from\n\t\t * the current time and current value to the given value over the\n\t\t * duration of the rampTime.\n\t\t *\n\t\t * @param {number} value The value to ramp to.\n\t\t * @param {Time} rampTime the time that it takes the\n\t\t * value to ramp from it's current value\n\t\t * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t Tone.Param.prototype.exponentialRampTo = function (value, rampTime, startTime) {\n\t startTime = this.toSeconds(startTime);\n\t this.setRampPoint(startTime);\n\t this.exponentialRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\t return this;\n\t };\n\t /**\n\t\t * Schedules an linear continuous change in parameter value from\n\t\t * the current time and current value to the given value over the\n\t\t * duration of the rampTime.\n\t\t *\n\t\t * @param {number} value The value to ramp to.\n\t\t * @param {Time} rampTime the time that it takes the\n\t\t * value to ramp from it's current value\n\t\t * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //linearly ramp to the value 4 over 3 seconds.\n\t\t * signal.linearRampTo(4, 3);\n\t\t */\n\t Tone.Param.prototype.linearRampTo = function (value, rampTime, startTime) {\n\t startTime = this.toSeconds(startTime);\n\t this.setRampPoint(startTime);\n\t this.linearRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\t return this;\n\t };\n\t /**\n\t\t * Start exponentially approaching the target value at the given time. Since it\n\t\t * is an exponential approach it will continue approaching after the ramp duration. The\n\t\t * rampTime is the time that it takes to reach over 99% of the way towards the value.\n\t\t * @param {number} value The value to ramp to.\n\t\t * @param {Time} rampTime the time that it takes the\n\t\t * value to ramp from it's current value\n\t\t * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t Tone.Param.prototype.targetRampTo = function (value, rampTime, startTime) {\n\t startTime = this.toSeconds(startTime);\n\t this.setRampPoint(startTime);\n\t this.exponentialApproachValueAtTime(value, startTime, rampTime);\n\t return this;\n\t };\n\t /**\n\t\t * Start exponentially approaching the target value at the given time. Since it\n\t\t * is an exponential approach it will continue approaching after the ramp duration. The\n\t\t * rampTime is the time that it takes to reach over 99% of the way towards the value. This methods\n\t\t * is similar to setTargetAtTime except the third argument is a time instead of a 'timeConstant'\n\t\t * @param {number} value The value to ramp to.\n\t\t * @param {Time}\ttime \tWhen the ramp should start.\n\t\t * @param {Time} rampTime the time that it takes the\n\t\t * value to ramp from it's current value\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t Tone.Param.prototype.exponentialApproachValueAtTime = function (value, time, rampTime) {\n\t var timeConstant = Math.log(this.toSeconds(rampTime) + 1) / Math.log(200);\n\t time = this.toSeconds(time);\n\t if (!this._ignorePast) {\n\t Tone.isPast(time);\n\t }\n\t return this.setTargetAtTime(value, time, timeConstant);\n\t };\n\t /**\n\t\t * Start exponentially approaching the target value at the given time with\n\t\t * a rate having the given time constant.\n\t\t * @param {number} value\n\t\t * @param {Time} startTime\n\t\t * @param {number} timeConstant\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.setTargetAtTime = function (value, startTime, timeConstant) {\n\t value = this._fromUnits(value);\n\t // The value will never be able to approach without timeConstant > 0.\n\t if (timeConstant <= 0) {\n\t throw new Error('timeConstant must be greater than 0');\n\t }\n\t startTime = this.toSeconds(startTime);\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.Target,\n\t 'value': value,\n\t 'time': startTime,\n\t 'constant': timeConstant\n\t });\n\t this._param.setTargetAtTime(value, startTime, timeConstant);\n\t return this;\n\t };\n\t /**\n\t\t * Sets an array of arbitrary parameter values starting at the given time\n\t\t * for the given duration.\n\t\t *\n\t\t * @param {Array} values\n\t\t * @param {Time} startTime\n\t\t * @param {Time} duration\n\t\t * @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {\n\t scaling = Tone.defaultArg(scaling, 1);\n\t duration = this.toSeconds(duration);\n\t startTime = this.toSeconds(startTime);\n\t this.setValueAtTime(values[0] * scaling, startTime);\n\t var segTime = duration / (values.length - 1);\n\t for (var i = 1; i < values.length; i++) {\n\t this.linearRampToValueAtTime(values[i] * scaling, startTime + i * segTime);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Cancels all scheduled parameter changes with times greater than or\n\t\t * equal to startTime.\n\t\t *\n\t\t * @param {Time} time\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.cancelScheduledValues = function (time) {\n\t time = this.toSeconds(time);\n\t this._events.cancel(time);\n\t this._param.cancelScheduledValues(time);\n\t return this;\n\t };\n\t /**\n\t\t * This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n\t\t * it holds the automated value at time until the next automated event.\n\t\t * @param {Time} time\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.cancelAndHoldAtTime = function (time) {\n\t var valueAtTime = this.getValueAtTime(time);\n\t //if there is an event at the given time\n\t //and that even is not a \"set\"\n\t var before = this._events.get(time);\n\t var after = this._events.getAfter(time);\n\t if (before && before.time === time) {\n\t //remove everything after\n\t if (after) {\n\t this._events.cancel(after.time);\n\t } else {\n\t this._events.cancel(time + 0.000001);\n\t }\n\t } else if (after) {\n\t //cancel the next event(s)\n\t this._events.cancel(after.time);\n\t if (!this._param.cancelAndHoldAtTime) {\n\t this._param.cancelScheduledValues(time);\n\t }\n\t if (after.type === Tone.Param.AutomationType.Linear) {\n\t if (!this._param.cancelAndHoldAtTime) {\n\t this.linearRampToValueAtTime(valueAtTime, time);\n\t } else {\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.Linear,\n\t 'value': valueAtTime,\n\t 'time': time\n\t });\n\t }\n\t } else if (after.type === Tone.Param.AutomationType.Exponential) {\n\t if (!this._param.cancelAndHoldAtTime) {\n\t this.exponentialRampToValueAtTime(valueAtTime, time);\n\t } else {\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.Exponential,\n\t 'value': valueAtTime,\n\t 'time': time\n\t });\n\t }\n\t }\n\t }\n\t //set the value at the given time\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.SetValue,\n\t 'value': valueAtTime,\n\t 'time': time\n\t });\n\t if (this._param.cancelAndHoldAtTime) {\n\t this._param.cancelAndHoldAtTime(time);\n\t } else {\n\t this._param.setValueAtTime(valueAtTime, time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Ramps to the given value over the duration of the rampTime.\n\t\t * Automatically selects the best ramp type (exponential or linear)\n\t\t * depending on the `units` of the signal\n\t\t *\n\t\t * @param {number} value\n\t\t * @param {Time} rampTime \tThe time that it takes the\n\t\t * value to ramp from it's current value\n\t\t * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //ramp to the value either linearly or exponentially\n\t\t * //depending on the \"units\" value of the signal\n\t\t * signal.rampTo(0, 10);\n\t\t * @example\n\t\t * //schedule it to ramp starting at a specific time\n\t\t * signal.rampTo(0, 10, 5)\n\t\t */\n\t Tone.Param.prototype.rampTo = function (value, rampTime, startTime) {\n\t rampTime = Tone.defaultArg(rampTime, 0.1);\n\t if (this.units === Tone.Type.Frequency || this.units === Tone.Type.BPM || this.units === Tone.Type.Decibels) {\n\t this.exponentialRampTo(value, rampTime, startTime);\n\t } else {\n\t this.linearRampTo(value, rampTime, startTime);\n\t }\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tAUTOMATION CURVE CALCULATIONS\n\t //\tMIT License, copyright (c) 2014 Jordan Santell\n\t ///////////////////////////////////////////////////////////////////////////\n\t // Calculates the the value along the curve produced by setTargetAtTime\n\t Tone.Param.prototype._exponentialApproach = function (t0, v0, v1, timeConstant, t) {\n\t return v1 + (v0 - v1) * Math.exp(-(t - t0) / timeConstant);\n\t };\n\t // Calculates the the value along the curve produced by linearRampToValueAtTime\n\t Tone.Param.prototype._linearInterpolate = function (t0, v0, t1, v1, t) {\n\t return v0 + (v1 - v0) * ((t - t0) / (t1 - t0));\n\t };\n\t // Calculates the the value along the curve produced by exponentialRampToValueAtTime\n\t Tone.Param.prototype._exponentialInterpolate = function (t0, v0, t1, v1, t) {\n\t return v0 * Math.pow(v1 / v0, (t - t0) / (t1 - t0));\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._param = null;\n\t this._events = null;\n\t return this;\n\t };\n\t return Tone.Param;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Wrapper around the OfflineAudioContext\n\t\t * @extends {Tone.Context}\n\t\t * @param {Number} channels The number of channels to render\n\t\t * @param {Number} duration The duration to render in samples\n\t\t * @param {Number} sampleRate the sample rate to render at\n\t\t */\n\t Tone.OfflineContext = function (channels, duration, sampleRate) {\n\t /**\n\t\t\t * The offline context\n\t\t\t * @private\n\t\t\t * @type {OfflineAudioContext}\n\t\t\t */\n\t var offlineContext = new OfflineAudioContext(channels, duration * sampleRate, sampleRate);\n\t //wrap the methods/members\n\t Tone.Context.call(this, {\n\t 'context': offlineContext,\n\t 'clockSource': 'offline',\n\t 'lookAhead': 0,\n\t 'updateInterval': 128 / sampleRate\n\t });\n\t /**\n\t\t\t * A private reference to the duration\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._duration = duration;\n\t /**\n\t\t\t * An artificial clock source\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._currentTime = 0;\n\t };\n\t Tone.extend(Tone.OfflineContext, Tone.Context);\n\t /**\n\t\t * Override the now method to point to the internal clock time\n\t\t * @return {Number}\n\t\t */\n\t Tone.OfflineContext.prototype.now = function () {\n\t return this._currentTime;\n\t };\n\t /**\n\t\t * Render the output of the OfflineContext\n\t\t * @return {Promise}\n\t\t */\n\t Tone.OfflineContext.prototype.render = function () {\n\t while (this._duration - this._currentTime >= 0) {\n\t //invoke all the callbacks on that time\n\t this.emit('tick');\n\t //increment the clock\n\t this._currentTime += this.blockTime;\n\t }\n\t return this._context.startRendering();\n\t };\n\t /**\n\t\t * Close the context\n\t\t * @return {Promise}\n\t\t */\n\t Tone.OfflineContext.prototype.close = function () {\n\t this._context = null;\n\t return Promise.resolve();\n\t };\n\t return Tone.OfflineContext;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported) {\n\t var ua = navigator.userAgent.toLowerCase();\n\t var isMobileSafari = ua.includes('safari') && !ua.includes('chrome') && ua.includes('mobile');\n\t if (isMobileSafari) {\n\t //mobile safari has a bizarre bug with the offline context\n\t //when a BufferSourceNode is started, it starts the offline context\n\t //\n\t //deferring all BufferSource starts till the last possible moment\n\t //reduces the likelihood of this happening\n\t Tone.OfflineContext.prototype.createBufferSource = function () {\n\t var bufferSource = this._context.createBufferSource();\n\t var _native_start = bufferSource.start;\n\t bufferSource.start = function (time) {\n\t this.setTimeout(function () {\n\t _native_start.call(bufferSource, time);\n\t }.bind(this), 0);\n\t }.bind(this);\n\t return bufferSource;\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A thin wrapper around the Native Web Audio GainNode.\n\t\t * The GainNode is a basic building block of the Web Audio\n\t\t * API and is useful for routing audio and adjusting gains.\n\t\t * @extends {Tone}\n\t\t * @param {Number=} gain The initial gain of the GainNode\n\t\t * @param {Tone.Type=} units The units of the gain parameter.\n\t\t */\n\t Tone.Gain = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'gain',\n\t 'units'\n\t ], Tone.Gain);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The GainNode\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.input = this.output = this._gainNode = this.context.createGain();\n\t /**\n\t\t\t * The gain parameter of the gain node.\n\t\t\t * @type {Gain}\n\t\t\t * @signal\n\t\t\t */\n\t this.gain = new Tone.Param({\n\t 'param': this._gainNode.gain,\n\t 'units': options.units,\n\t 'value': options.gain,\n\t 'convert': options.convert\n\t });\n\t this._readOnly('gain');\n\t };\n\t Tone.extend(Tone.Gain, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Gain.defaults = {\n\t 'gain': 1,\n\t 'convert': true\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Gain} this\n\t\t */\n\t Tone.Gain.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._gainNode.disconnect();\n\t this._gainNode = null;\n\t this._writable('gain');\n\t this.gain.dispose();\n\t this.gain = null;\n\t };\n\t return Tone.Gain;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported && !AudioContext.prototype.createConstantSource) {\n\t var ConstantSourceNode = function (context) {\n\t this.context = context;\n\t var buffer = context.createBuffer(1, 128, context.sampleRate);\n\t var arr = buffer.getChannelData(0);\n\t for (var i = 0; i < arr.length; i++) {\n\t arr[i] = 1;\n\t }\n\t this._bufferSource = context.createBufferSource();\n\t this._bufferSource.channelCount = 1;\n\t this._bufferSource.channelCountMode = 'explicit';\n\t this._bufferSource.buffer = buffer;\n\t this._bufferSource.loop = true;\n\t var gainNode = this._output = context.createGain();\n\t this.offset = gainNode.gain;\n\t this._bufferSource.connect(gainNode);\n\t };\n\t ConstantSourceNode.prototype.start = function (time) {\n\t this._bufferSource.start(time);\n\t return this;\n\t };\n\t ConstantSourceNode.prototype.stop = function (time) {\n\t this._bufferSource.stop(time);\n\t return this;\n\t };\n\t ConstantSourceNode.prototype.connect = function () {\n\t this._output.connect.apply(this._output, arguments);\n\t return this;\n\t };\n\t ConstantSourceNode.prototype.disconnect = function () {\n\t this._output.disconnect.apply(this._output, arguments);\n\t return this;\n\t };\n\t AudioContext.prototype.createConstantSource = function () {\n\t return new ConstantSourceNode(this);\n\t };\n\t Tone.Context.prototype.createConstantSource = function () {\n\t return new ConstantSourceNode(this);\n\t };\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A signal is an audio-rate value. Tone.Signal is a core component of the library.\n\t\t * Unlike a number, Signals can be scheduled with sample-level accuracy. Tone.Signal\n\t\t * has all of the methods available to native Web Audio\n\t\t * [AudioParam](http://webaudio.github.io/web-audio-api/#the-audioparam-interface)\n\t\t * as well as additional conveniences. Read more about working with signals\n\t\t * [here](https://github.com/Tonejs/Tone.js/wiki/Signals).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Param}\n\t\t * @param {Number|AudioParam} [value] Initial value of the signal. If an AudioParam\n\t\t * is passed in, that parameter will be wrapped\n\t\t * and controlled by the Signal.\n\t\t * @param {string} [units=Number] unit The units the signal is in.\n\t\t * @example\n\t\t * var signal = new Tone.Signal(10);\n\t\t */\n\t Tone.Signal = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'value',\n\t 'units'\n\t ], Tone.Signal);\n\t Tone.Param.call(this, options);\n\t /**\n\t\t\t* When a signal is connected to another signal or audio param,\n\t\t\t* this signal becomes a proxy for it\n\t\t\t* @type {Array}\n\t\t\t* @private\n\t\t\t*/\n\t this._proxies = [];\n\t /**\n\t\t\t* Indicates if the constant source was started or not\n\t\t\t* @private\n\t\t\t* @type {Boolean}\n\t\t\t*/\n\t this._sourceStarted = false;\n\t /**\n\t\t\t * The constant source node which generates the signal\n\t\t\t * @type {ConstantSourceNode}\n\t\t\t * @private\n\t\t\t */\n\t this._constantSource = this.context.createConstantSource();\n\t this._param = this._constantSource.offset;\n\t this.value = options.value;\n\t /**\n\t\t\t * The node where the constant signal value is scaled.\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.output = this._constantSource;\n\t /**\n\t\t\t * The node where the value is set.\n\t\t\t * @type {Tone.Param}\n\t\t\t * @private\n\t\t\t */\n\t this.input = this._param = this.output.offset;\n\t };\n\t Tone.extend(Tone.Signal, Tone.Param);\n\t /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t * @static\n\t\t * @const\n\t\t */\n\t Tone.Signal.defaults = {\n\t 'value': 0,\n\t 'units': Tone.Type.Default,\n\t 'convert': true\n\t };\n\t /**\n\t\t * When signals connect to other signals or AudioParams,\n\t\t * they take over the output value of that signal or AudioParam.\n\t\t * For all other nodes, the behavior is the same as a default <code>connect</code>.\n\t\t *\n\t\t * @override\n\t\t * @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n\t\t * @param {number} [outputNumber=0] The output number to connect from.\n\t\t * @param {number} [inputNumber=0] The input number to connect to.\n\t\t * @returns {Tone.Signal} this\n\t\t * @method\n\t\t */\n\t Tone.Signal.prototype.connect = function (node) {\n\t //this is an optimization where this node will forward automations\n\t //to connected nodes without any signal if possible.\n\t if (this._isParam(node) && !this._sourceStarted) {\n\t this._proxies.push(node);\n\t node.overridden = true;\n\t this._applyAutomations(node);\n\t } else {\n\t Tone.SignalBase.prototype.connect.apply(this, arguments);\n\t if (!this._sourceStarted) {\n\t this._sourceStarted = true;\n\t this._constantSource.start(0);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Takes a node as an argument and returns if it is a Param or AudioParam\n\t\t * @param {*} node The node to test\n\t\t * @return {Boolean}\n\t\t * @private\n\t\t */\n\t Tone.Signal.prototype._isParam = function (node) {\n\t return Tone.Param && Tone.Param === node.constructor || node instanceof AudioParam;\n\t };\n\t /**\n\t\t * Discard the optimization and connect all of the proxies\n\t\t * @private\n\t\t */\n\t Tone.Signal.prototype._connectProxies = function () {\n\t if (!this._sourceStarted) {\n\t this._sourceStarted = true;\n\t this._constantSource.start(0);\n\t }\n\t this._proxies.forEach(function (proxy) {\n\t Tone.SignalBase.prototype.connect.call(this, proxy);\n\t if (proxy._proxies) {\n\t proxy._connectProxies();\n\t }\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Invoked when a node is connected to this\n\t\t * @param {AudioNode} from\n\t\t * @private\n\t\t */\n\t Tone.Signal.prototype._onConnect = function (from) {\n\t if (!this._isParam(from)) {\n\t //connect all the proxies\n\t this._connectProxies();\n\t }\n\t };\n\t /**\n\t\t * Apply all the current automations to the given parameter\n\t\t * @param {AudioParam} param\n\t\t * @private\n\t\t */\n\t Tone.Signal.prototype._applyAutomations = function (param) {\n\t var now = this.context.currentTime;\n\t param.cancelScheduledValues(now);\n\t var currentVal = this.getValueAtTime(now);\n\t param.setValueAtTime(currentVal, now);\n\t this._events.forEachFrom(now, function (event) {\n\t param[event.type](event.value, event.time, event.constant);\n\t });\n\t };\n\t /**\n\t\t * Disconnect from the given node or all nodes if no param is given.\n\t\t * @param {AudioNode|AudioParam} node\n\t\t * @return {Tone.Signal} this\n\t\t */\n\t Tone.Signal.prototype.disconnect = function (node) {\n\t if (this._proxies.includes(node)) {\n\t var index = this._proxies.indexOf(node);\n\t this._proxies.splice(index, 1);\n\t } else if (!node) {\n\t //no argument, disconnect everything\n\t this._proxies = [];\n\t }\n\t return Tone.SignalBase.prototype.disconnect.apply(this, arguments);\n\t };\n\t /**\n\t\t * Return the current signal value at the given time.\n\t\t * @param {Time} time When to get the signal value\n\t\t * @return {Number}\n\t\t */\n\t Tone.Signal.prototype.getValueAtTime = function (time) {\n\t if (this._param.getValueAtTime) {\n\t return this._param.getValueAtTime(time);\n\t } else {\n\t return Tone.Param.prototype.getValueAtTime.call(this, time);\n\t }\n\t };\n\t //wrap all of the automation methods\n\t [\n\t 'setValueAtTime',\n\t 'linearRampToValueAtTime',\n\t 'exponentialRampToValueAtTime',\n\t 'setTargetAtTime'\n\t ].forEach(function (method) {\n\t var previousMethod = Tone.Signal.prototype[method];\n\t Tone.Signal.prototype[method] = function () {\n\t var args = arguments;\n\t previousMethod.apply(this, arguments);\n\t args[0] = this._fromUnits(args[0]);\n\t args[1] = this.toSeconds(args[1]);\n\t //apply it to the proxies\n\t this._proxies.forEach(function (signal) {\n\t signal[method].apply(signal, args);\n\t });\n\t };\n\t });\n\t [\n\t 'cancelScheduledValues',\n\t 'cancelAndHoldAtTime'\n\t ].forEach(function (method) {\n\t var previousMethod = Tone.Signal.prototype[method];\n\t Tone.Signal.prototype[method] = function () {\n\t var args = arguments;\n\t previousMethod.apply(this, arguments);\n\t args[0] = this.toSeconds(args[0]);\n\t //apply it to the proxies\n\t this._proxies.forEach(function (signal) {\n\t signal[method].apply(signal, args);\n\t });\n\t };\n\t });\n\t /**\n\t\t * dispose and disconnect\n\t\t * @returns {Tone.Signal} this\n\t\t */\n\t Tone.Signal.prototype.dispose = function () {\n\t Tone.Param.prototype.dispose.call(this);\n\t this._constantSource.disconnect();\n\t this._constantSource = null;\n\t this._proxies = null;\n\t return this;\n\t };\n\t return Tone.Signal;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Pow applies an exponent to the incoming signal. The incoming signal\n\t\t * must be AudioRange.\n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @param {Positive} exp The exponent to apply to the incoming signal, must be at least 2. \n\t\t * @example\n\t\t * var pow = new Tone.Pow(2);\n\t\t * var sig = new Tone.Signal(0.5).connect(pow);\n\t\t * //output of pow is 0.25. \n\t\t */\n\t Tone.Pow = function (exp) {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * the exponent\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._exp = Tone.defaultArg(exp, 1);\n\t /**\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._expScaler = this.input = this.output = new Tone.WaveShaper(this._expFunc(this._exp), 8192);\n\t };\n\t Tone.extend(Tone.Pow, Tone.SignalBase);\n\t /**\n\t\t * The value of the exponent.\n\t\t * @memberOf Tone.Pow#\n\t\t * @type {number}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.Pow.prototype, 'value', {\n\t get: function () {\n\t return this._exp;\n\t },\n\t set: function (exp) {\n\t this._exp = exp;\n\t this._expScaler.setMap(this._expFunc(this._exp));\n\t }\n\t });\n\t /**\n\t\t * the function which maps the waveshaper\n\t\t * @param {number} exp\n\t\t * @return {function}\n\t\t * @private\n\t\t */\n\t Tone.Pow.prototype._expFunc = function (exp) {\n\t return function (val) {\n\t return Math.pow(Math.abs(val), exp);\n\t };\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Pow} this\n\t\t */\n\t Tone.Pow.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._expScaler.dispose();\n\t this._expScaler = null;\n\t return this;\n\t };\n\t return Tone.Pow;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Envelope is an [ADSR](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope)\n\t\t * envelope generator. Tone.Envelope outputs a signal which\n\t\t * can be connected to an AudioParam or Tone.Signal.\n\t\t * <img src=\"https://upload.wikimedia.org/wikipedia/commons/e/ea/ADSR_parameter.svg\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Time} [attack] The amount of time it takes for the envelope to go from\n\t\t * 0 to it's maximum value.\n\t\t * @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n\t\t * \tto fall to the sustain value.\n\t\t * @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n\t\t * \tthe release is triggered.\n\t\t * @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n\t\t * @example\n\t\t * //an amplitude envelope\n\t\t * var gainNode = Tone.context.createGain();\n\t\t * var env = new Tone.Envelope({\n\t\t * \t\"attack\" : 0.1,\n\t\t * \t\"decay\" : 0.2,\n\t\t * \t\"sustain\" : 1,\n\t\t * \t\"release\" : 0.8,\n\t\t * });\n\t\t * env.connect(gainNode.gain);\n\t\t */\n\t Tone.Envelope = function () {\n\t //get all of the defaults\n\t var options = Tone.defaults(arguments, [\n\t 'attack',\n\t 'decay',\n\t 'sustain',\n\t 'release'\n\t ], Tone.Envelope);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * When triggerAttack is called, the attack time is the amount of\n\t\t\t * time it takes for the envelope to reach it's maximum value.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.attack = options.attack;\n\t /**\n\t\t\t * After the attack portion of the envelope, the value will fall\n\t\t\t * over the duration of the decay time to it's sustain value.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.decay = options.decay;\n\t /**\n\t\t\t * \tThe sustain value is the value\n\t\t\t * \twhich the envelope rests at after triggerAttack is\n\t\t\t * \tcalled, but before triggerRelease is invoked.\n\t\t\t * @type {NormalRange}\n\t\t\t */\n\t this.sustain = options.sustain;\n\t /**\n\t\t\t * After triggerRelease is called, the envelope's\n\t\t\t * value will fall to it's miminum value over the\n\t\t\t * duration of the release time.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.release = options.release;\n\t /**\n\t\t\t * the next time the envelope is at standby\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._attackCurve = 'linear';\n\t /**\n\t\t\t * the next time the envelope is at standby\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._releaseCurve = 'exponential';\n\t /**\n\t\t\t * the signal\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t this._sig = this.output = new Tone.Signal(0);\n\t //set the attackCurve initially\n\t this.attackCurve = options.attackCurve;\n\t this.releaseCurve = options.releaseCurve;\n\t };\n\t Tone.extend(Tone.Envelope, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t */\n\t Tone.Envelope.defaults = {\n\t 'attack': 0.01,\n\t 'decay': 0.1,\n\t 'sustain': 0.5,\n\t 'release': 1,\n\t 'attackCurve': 'linear',\n\t 'releaseCurve': 'exponential'\n\t };\n\t /**\n\t\t * Read the current value of the envelope. Useful for\n\t\t * syncronizing visual output to the envelope.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Envelope.prototype, 'value', {\n\t get: function () {\n\t return this.getValueAtTime(this.now());\n\t }\n\t });\n\t /**\n\t\t * The shape of the attack.\n\t\t * Can be any of these strings:\n\t\t * <ul>\n\t\t * <li>linear</li>\n\t\t * <li>exponential</li>\n\t\t * <li>sine</li>\n\t\t * <li>cosine</li>\n\t\t * <li>bounce</li>\n\t\t * <li>ripple</li>\n\t\t * <li>step</li>\n\t\t * </ul>\n\t\t * Can also be an array which describes the curve. Values\n\t\t * in the array are evenly subdivided and linearly\n\t\t * interpolated over the duration of the attack.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {String|Array}\n\t\t * @name attackCurve\n\t\t * @example\n\t\t * env.attackCurve = \"linear\";\n\t\t * @example\n\t\t * //can also be an array\n\t\t * env.attackCurve = [0, 0.2, 0.3, 0.4, 1]\n\t\t */\n\t Object.defineProperty(Tone.Envelope.prototype, 'attackCurve', {\n\t get: function () {\n\t if (Tone.isString(this._attackCurve)) {\n\t return this._attackCurve;\n\t } else if (Tone.isArray(this._attackCurve)) {\n\t //look up the name in the curves array\n\t for (var type in Tone.Envelope.Type) {\n\t if (Tone.Envelope.Type[type].In === this._attackCurve) {\n\t return type;\n\t }\n\t }\n\t //otherwise just return the array\n\t return this._attackCurve;\n\t }\n\t },\n\t set: function (curve) {\n\t //check if it's a valid type\n\t if (Tone.Envelope.Type.hasOwnProperty(curve)) {\n\t var curveDef = Tone.Envelope.Type[curve];\n\t if (Tone.isObject(curveDef)) {\n\t this._attackCurve = curveDef.In;\n\t } else {\n\t this._attackCurve = curveDef;\n\t }\n\t } else if (Tone.isArray(curve)) {\n\t this._attackCurve = curve;\n\t } else {\n\t throw new Error('Tone.Envelope: invalid curve: ' + curve);\n\t }\n\t }\n\t });\n\t /**\n\t\t * The shape of the release. See the attack curve types.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {String|Array}\n\t\t * @name releaseCurve\n\t\t * @example\n\t\t * env.releaseCurve = \"linear\";\n\t\t */\n\t Object.defineProperty(Tone.Envelope.prototype, 'releaseCurve', {\n\t get: function () {\n\t if (Tone.isString(this._releaseCurve)) {\n\t return this._releaseCurve;\n\t } else if (Tone.isArray(this._releaseCurve)) {\n\t //look up the name in the curves array\n\t for (var type in Tone.Envelope.Type) {\n\t if (Tone.Envelope.Type[type].Out === this._releaseCurve) {\n\t return type;\n\t }\n\t }\n\t //otherwise just return the array\n\t return this._releaseCurve;\n\t }\n\t },\n\t set: function (curve) {\n\t //check if it's a valid type\n\t if (Tone.Envelope.Type.hasOwnProperty(curve)) {\n\t var curveDef = Tone.Envelope.Type[curve];\n\t if (Tone.isObject(curveDef)) {\n\t this._releaseCurve = curveDef.Out;\n\t } else {\n\t this._releaseCurve = curveDef;\n\t }\n\t } else if (Tone.isArray(curve)) {\n\t this._releaseCurve = curve;\n\t } else {\n\t throw new Error('Tone.Envelope: invalid curve: ' + curve);\n\t }\n\t }\n\t });\n\t /**\n\t\t * Trigger the attack/decay portion of the ADSR envelope.\n\t\t * @param {Time} [time=now] When the attack should start.\n\t\t * @param {NormalRange} [velocity=1] The velocity of the envelope scales the vales.\n\t\t * number between 0-1\n\t\t * @returns {Tone.Envelope} this\n\t\t * @example\n\t\t * //trigger the attack 0.5 seconds from now with a velocity of 0.2\n\t\t * env.triggerAttack(\"+0.5\", 0.2);\n\t\t */\n\t Tone.Envelope.prototype.triggerAttack = function (time, velocity) {\n\t time = this.toSeconds(time);\n\t var originalAttack = this.toSeconds(this.attack);\n\t var attack = originalAttack;\n\t var decay = this.toSeconds(this.decay);\n\t velocity = Tone.defaultArg(velocity, 1);\n\t //check if it's not a complete attack\n\t var currentValue = this.getValueAtTime(time);\n\t if (currentValue > 0) {\n\t //subtract the current value from the attack time\n\t var attackRate = 1 / attack;\n\t var remainingDistance = 1 - currentValue;\n\t //the attack is now the remaining time\n\t attack = remainingDistance / attackRate;\n\t }\n\t //attack\n\t if (this._attackCurve === 'linear') {\n\t this._sig.linearRampTo(velocity, attack, time);\n\t } else if (this._attackCurve === 'exponential') {\n\t this._sig.targetRampTo(velocity, attack, time);\n\t } else if (attack > 0) {\n\t this._sig.cancelAndHoldAtTime(time);\n\t var curve = this._attackCurve;\n\t //take only a portion of the curve\n\t if (attack < originalAttack) {\n\t var percentComplete = 1 - attack / originalAttack;\n\t var sliceIndex = Math.floor(percentComplete * this._attackCurve.length);\n\t curve = this._attackCurve.slice(sliceIndex);\n\t //the first index is the current value\n\t curve[0] = currentValue;\n\t }\n\t this._sig.setValueCurveAtTime(curve, time, attack, velocity);\n\t }\n\t //decay\n\t if (decay) {\n\t this._sig.targetRampTo(velocity * this.sustain, decay, attack + time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Triggers the release of the envelope.\n\t\t * @param {Time} [time=now] When the release portion of the envelope should start.\n\t\t * @returns {Tone.Envelope} this\n\t\t * @example\n\t\t * //trigger release immediately\n\t\t * env.triggerRelease();\n\t\t */\n\t Tone.Envelope.prototype.triggerRelease = function (time) {\n\t time = this.toSeconds(time);\n\t var currentValue = this.getValueAtTime(time);\n\t if (currentValue > 0) {\n\t var release = this.toSeconds(this.release);\n\t if (this._releaseCurve === 'linear') {\n\t this._sig.linearRampTo(0, release, time);\n\t } else if (this._releaseCurve === 'exponential') {\n\t this._sig.targetRampTo(0, release, time);\n\t } else {\n\t var curve = this._releaseCurve;\n\t if (Tone.isArray(curve)) {\n\t this._sig.cancelAndHoldAtTime(time);\n\t this._sig.setValueCurveAtTime(curve, time, release, currentValue);\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Get the scheduled value at the given time. This will\n\t\t * return the unconverted (raw) value.\n\t\t * @param {Number} time The time in seconds.\n\t\t * @return {Number} The scheduled value at the given time.\n\t\t */\n\t Tone.Envelope.prototype.getValueAtTime = function (time) {\n\t return this._sig.getValueAtTime(time);\n\t };\n\t /**\n\t\t * triggerAttackRelease is shorthand for triggerAttack, then waiting\n\t\t * some duration, then triggerRelease.\n\t\t * @param {Time} duration The duration of the sustain.\n\t\t * @param {Time} [time=now] When the attack should be triggered.\n\t\t * @param {number} [velocity=1] The velocity of the envelope.\n\t\t * @returns {Tone.Envelope} this\n\t\t * @example\n\t\t * //trigger the attack and then the release after 0.6 seconds.\n\t\t * env.triggerAttackRelease(0.6);\n\t\t */\n\t Tone.Envelope.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t this.triggerAttack(time, velocity);\n\t this.triggerRelease(time + this.toSeconds(duration));\n\t return this;\n\t };\n\t /**\n\t\t * Cancels all scheduled envelope changes after the given time.\n\t\t * @param {Time} after\n\t\t * @returns {Tone.Envelope} this\n\t\t */\n\t Tone.Envelope.prototype.cancel = function (after) {\n\t this._sig.cancelScheduledValues(after);\n\t return this;\n\t };\n\t /**\n\t\t * Borrows the connect method from Tone.Signal.\n\t\t * @function\n\t\t * @private\n\t\t */\n\t Tone.Envelope.prototype.connect = Tone.SignalBase.prototype.connect;\n\t /**\n\t \t * Generate some complex envelope curves.\n\t \t */\n\t (function _createCurves() {\n\t var curveLen = 128;\n\t var i, k;\n\t //cosine curve\n\t var cosineCurve = [];\n\t for (i = 0; i < curveLen; i++) {\n\t cosineCurve[i] = Math.sin(i / (curveLen - 1) * (Math.PI / 2));\n\t }\n\t //ripple curve\n\t var rippleCurve = [];\n\t var rippleCurveFreq = 6.4;\n\t for (i = 0; i < curveLen - 1; i++) {\n\t k = i / (curveLen - 1);\n\t var sineWave = Math.sin(k * (Math.PI * 2) * rippleCurveFreq - Math.PI / 2) + 1;\n\t rippleCurve[i] = sineWave / 10 + k * 0.83;\n\t }\n\t rippleCurve[curveLen - 1] = 1;\n\t //stairs curve\n\t var stairsCurve = [];\n\t var steps = 5;\n\t for (i = 0; i < curveLen; i++) {\n\t stairsCurve[i] = Math.ceil(i / (curveLen - 1) * steps) / steps;\n\t }\n\t //in-out easing curve\n\t var sineCurve = [];\n\t for (i = 0; i < curveLen; i++) {\n\t k = i / (curveLen - 1);\n\t sineCurve[i] = 0.5 * (1 - Math.cos(Math.PI * k));\n\t }\n\t //a bounce curve\n\t var bounceCurve = [];\n\t for (i = 0; i < curveLen; i++) {\n\t k = i / (curveLen - 1);\n\t var freq = Math.pow(k, 3) * 4 + 0.2;\n\t var val = Math.cos(freq * Math.PI * 2 * k);\n\t bounceCurve[i] = Math.abs(val * (1 - k));\n\t }\n\t /**\n\t\t\t * Invert a value curve to make it work for the release\n\t\t\t * @private\n\t\t\t */\n\t function invertCurve(curve) {\n\t var out = new Array(curve.length);\n\t for (var j = 0; j < curve.length; j++) {\n\t out[j] = 1 - curve[j];\n\t }\n\t return out;\n\t }\n\t /**\n\t\t\t * reverse the curve\n\t\t\t * @private\n\t\t\t */\n\t function reverseCurve(curve) {\n\t return curve.slice(0).reverse();\n\t }\n\t /**\n\t\t\t * attack and release curve arrays\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t Tone.Envelope.Type = {\n\t 'linear': 'linear',\n\t 'exponential': 'exponential',\n\t 'bounce': {\n\t In: invertCurve(bounceCurve),\n\t Out: bounceCurve\n\t },\n\t 'cosine': {\n\t In: cosineCurve,\n\t Out: reverseCurve(cosineCurve)\n\t },\n\t 'step': {\n\t In: stairsCurve,\n\t Out: invertCurve(stairsCurve)\n\t },\n\t 'ripple': {\n\t In: rippleCurve,\n\t Out: invertCurve(rippleCurve)\n\t },\n\t 'sine': {\n\t In: sineCurve,\n\t Out: invertCurve(sineCurve)\n\t }\n\t };\n\t }());\n\t /**\n\t\t * Disconnect and dispose.\n\t\t * @returns {Tone.Envelope} this\n\t\t */\n\t Tone.Envelope.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._sig.dispose();\n\t this._sig = null;\n\t this._attackCurve = null;\n\t this._releaseCurve = null;\n\t return this;\n\t };\n\t return Tone.Envelope;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.AmplitudeEnvelope is a Tone.Envelope connected to a gain node.\n\t\t * Unlike Tone.Envelope, which outputs the envelope's value, Tone.AmplitudeEnvelope accepts\n\t\t * an audio signal as the input and will apply the envelope to the amplitude\n\t\t * of the signal. Read more about ADSR Envelopes on [Wikipedia](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Envelope}\n\t\t * @param {Time|Object} [attack] The amount of time it takes for the envelope to go from\n\t\t * 0 to it's maximum value.\n\t\t * @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n\t\t * \tto fall to the sustain value.\n\t\t * @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n\t\t * \tthe release is triggered.\n\t\t * @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n\t\t * @example\n\t\t * var ampEnv = new Tone.AmplitudeEnvelope({\n\t\t * \t\"attack\": 0.1,\n\t\t * \t\"decay\": 0.2,\n\t\t * \t\"sustain\": 1.0,\n\t\t * \t\"release\": 0.8\n\t\t * }).toMaster();\n\t\t * //create an oscillator and connect it\n\t\t * var osc = new Tone.Oscillator().connect(ampEnv).start();\n\t\t * //trigger the envelopes attack and release \"8t\" apart\n\t\t * ampEnv.triggerAttackRelease(\"8t\");\n\t\t */\n\t Tone.AmplitudeEnvelope = function () {\n\t Tone.Envelope.apply(this, arguments);\n\t /**\n\t\t\t * the input node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.input = this.output = new Tone.Gain();\n\t this._sig.connect(this.output.gain);\n\t };\n\t Tone.extend(Tone.AmplitudeEnvelope, Tone.Envelope);\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.AmplitudeEnvelope} this\n\t\t */\n\t Tone.AmplitudeEnvelope.prototype.dispose = function () {\n\t Tone.Envelope.prototype.dispose.call(this);\n\t return this;\n\t };\n\t return Tone.AmplitudeEnvelope;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * AnalyserNode.getFloatTimeDomainData polyfill\n\t\t * @private\n\t\t */\n\t if (Tone.supported) {\n\t if (!AnalyserNode.prototype.getFloatTimeDomainData) {\n\t //referenced https://github.com/mohayonao/get-float-time-domain-data\n\t AnalyserNode.prototype.getFloatTimeDomainData = function (array) {\n\t var uint8 = new Uint8Array(array.length);\n\t this.getByteTimeDomainData(uint8);\n\t for (var i = 0; i < uint8.length; i++) {\n\t array[i] = (uint8[i] - 128) / 128;\n\t }\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Wrapper around the native Web Audio's\n\t\t * [AnalyserNode](http://webaudio.github.io/web-audio-api/#idl-def-AnalyserNode).\n\t\t * Extracts FFT or Waveform data from the incoming signal.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {String=} type The return type of the analysis, either \"fft\", or \"waveform\".\n\t\t * @param {Number=} size The size of the FFT. Value must be a power of\n\t\t * two in the range 32 to 32768.\n\t\t */\n\t Tone.Analyser = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'type',\n\t 'size'\n\t ], Tone.Analyser);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The analyser node.\n\t\t\t * @private\n\t\t\t * @type {AnalyserNode}\n\t\t\t */\n\t this._analyser = this.input = this.output = this.context.createAnalyser();\n\t /**\n\t\t\t * The analysis type\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._type = options.type;\n\t /**\n\t\t\t * The buffer that the FFT data is written to\n\t\t\t * @type {TypedArray}\n\t\t\t * @private\n\t\t\t */\n\t this._buffer = null;\n\t //set the values initially\n\t this.size = options.size;\n\t this.type = options.type;\n\t };\n\t Tone.extend(Tone.Analyser, Tone.AudioNode);\n\t /**\n\t\t * The default values.\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Analyser.defaults = {\n\t 'size': 1024,\n\t 'type': 'fft',\n\t 'smoothing': 0.8\n\t };\n\t /**\n\t\t * Possible return types of analyser.getValue()\n\t\t * @enum {String}\n\t\t */\n\t Tone.Analyser.Type = {\n\t Waveform: 'waveform',\n\t FFT: 'fft'\n\t };\n\t /**\n\t\t * Run the analysis given the current settings and return the\n\t\t * result as a TypedArray.\n\t\t * @returns {TypedArray}\n\t\t */\n\t Tone.Analyser.prototype.getValue = function () {\n\t if (this._type === Tone.Analyser.Type.FFT) {\n\t this._analyser.getFloatFrequencyData(this._buffer);\n\t } else if (this._type === Tone.Analyser.Type.Waveform) {\n\t this._analyser.getFloatTimeDomainData(this._buffer);\n\t }\n\t return this._buffer;\n\t };\n\t /**\n\t\t * The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t * @memberOf Tone.Analyser#\n\t\t * @type {Number}\n\t\t * @name size\n\t\t */\n\t Object.defineProperty(Tone.Analyser.prototype, 'size', {\n\t get: function () {\n\t return this._analyser.frequencyBinCount;\n\t },\n\t set: function (size) {\n\t this._analyser.fftSize = size * 2;\n\t this._buffer = new Float32Array(size);\n\t }\n\t });\n\t /**\n\t\t * The analysis function returned by analyser.getValue(), either \"fft\" or \"waveform\".\n\t\t * @memberOf Tone.Analyser#\n\t\t * @type {String}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.Analyser.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t if (type !== Tone.Analyser.Type.Waveform && type !== Tone.Analyser.Type.FFT) {\n\t throw new TypeError('Tone.Analyser: invalid type: ' + type);\n\t }\n\t this._type = type;\n\t }\n\t });\n\t /**\n\t\t * 0 represents no time averaging with the last analysis frame.\n\t\t * @memberOf Tone.Analyser#\n\t\t * @type {NormalRange}\n\t\t * @name smoothing\n\t\t */\n\t Object.defineProperty(Tone.Analyser.prototype, 'smoothing', {\n\t get: function () {\n\t return this._analyser.smoothingTimeConstant;\n\t },\n\t set: function (val) {\n\t this._analyser.smoothingTimeConstant = val;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Analyser} this\n\t\t */\n\t Tone.Analyser.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._analyser.disconnect();\n\t this._analyser = null;\n\t this._buffer = null;\n\t };\n\t return Tone.Analyser;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Compressor is a thin wrapper around the Web Audio\n\t\t * [DynamicsCompressorNode](http://webaudio.github.io/web-audio-api/#the-dynamicscompressornode-interface).\n\t\t * Compression reduces the volume of loud sounds or amplifies quiet sounds\n\t\t * by narrowing or \"compressing\" an audio signal's dynamic range.\n\t\t * Read more on [Wikipedia](https://en.wikipedia.org/wiki/Dynamic_range_compression).\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Decibels|Object} [threshold] The value above which the compression starts to be applied.\n\t\t * @param {Positive} [ratio] The gain reduction ratio.\n\t\t * @example\n\t\t * var comp = new Tone.Compressor(-30, 3);\n\t\t */\n\t Tone.Compressor = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'threshold',\n\t 'ratio'\n\t ], Tone.Compressor);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the compressor node\n\t\t\t * @type {DynamicsCompressorNode}\n\t\t\t * @private\n\t\t\t */\n\t this._compressor = this.input = this.output = this.context.createDynamicsCompressor();\n\t /**\n\t\t\t * the threshold vaue\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.threshold = new Tone.Param({\n\t 'param': this._compressor.threshold,\n\t 'units': Tone.Type.Decibels,\n\t 'convert': false\n\t });\n\t /**\n\t\t\t * The attack parameter\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.attack = new Tone.Param(this._compressor.attack, Tone.Type.Time);\n\t /**\n\t\t\t * The release parameter\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.release = new Tone.Param(this._compressor.release, Tone.Type.Time);\n\t /**\n\t\t\t * The knee parameter\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.knee = new Tone.Param({\n\t 'param': this._compressor.knee,\n\t 'units': Tone.Type.Decibels,\n\t 'convert': false\n\t });\n\t /**\n\t\t\t * The ratio value\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t this.ratio = new Tone.Param({\n\t 'param': this._compressor.ratio,\n\t 'convert': false\n\t });\n\t //set the defaults\n\t this._readOnly([\n\t 'knee',\n\t 'release',\n\t 'attack',\n\t 'ratio',\n\t 'threshold'\n\t ]);\n\t this.set(options);\n\t };\n\t Tone.extend(Tone.Compressor, Tone.AudioNode);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Compressor.defaults = {\n\t 'ratio': 12,\n\t 'threshold': -24,\n\t 'release': 0.25,\n\t 'attack': 0.003,\n\t 'knee': 30\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Compressor} this\n\t\t */\n\t Tone.Compressor.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'knee',\n\t 'release',\n\t 'attack',\n\t 'ratio',\n\t 'threshold'\n\t ]);\n\t this._compressor.disconnect();\n\t this._compressor = null;\n\t this.attack.dispose();\n\t this.attack = null;\n\t this.release.dispose();\n\t this.release = null;\n\t this.threshold.dispose();\n\t this.threshold = null;\n\t this.ratio.dispose();\n\t this.ratio = null;\n\t this.knee.dispose();\n\t this.knee = null;\n\t return this;\n\t };\n\t return Tone.Compressor;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Add a signal and a number or two signals. When no value is\n\t\t * passed into the constructor, Tone.Add will sum <code>input[0]</code>\n\t\t * and <code>input[1]</code>. If a value is passed into the constructor, \n\t\t * the it will be added to the input.\n\t\t * \n\t\t * @constructor\n\t\t * @extends {Tone.Signal}\n\t\t * @param {number=} value If no value is provided, Tone.Add will sum the first\n\t\t * and second inputs. \n\t\t * @example\n\t\t * var signal = new Tone.Signal(2);\n\t\t * var add = new Tone.Add(2);\n\t\t * signal.connect(add);\n\t\t * //the output of add equals 4\n\t\t * @example\n\t\t * //if constructed with no arguments\n\t\t * //it will add the first and second inputs\n\t\t * var add = new Tone.Add();\n\t\t * var sig0 = new Tone.Signal(3).connect(add, 0, 0);\n\t\t * var sig1 = new Tone.Signal(4).connect(add, 0, 1);\n\t\t * //the output of add equals 7. \n\t\t */\n\t Tone.Add = function (value) {\n\t Tone.Signal.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * the summing node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this._sum = this.input[0] = this.input[1] = this.output = new Tone.Gain();\n\t /**\n\t\t\t * @private\n\t\t\t * @type {Tone.Signal}\n\t\t\t */\n\t this._param = this.input[1] = new Tone.Signal(value);\n\t this._param.connect(this._sum);\n\t };\n\t Tone.extend(Tone.Add, Tone.Signal);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Add} this\n\t\t */\n\t Tone.Add.prototype.dispose = function () {\n\t Tone.Signal.prototype.dispose.call(this);\n\t this._sum.dispose();\n\t this._sum = null;\n\t return this;\n\t };\n\t return Tone.Add;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Multiply two incoming signals. Or, if a number is given in the constructor,\n\t\t * multiplies the incoming signal by that value.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Signal}\n\t\t * @param {number=} value Constant value to multiple. If no value is provided,\n\t\t * it will return the product of the first and second inputs\n\t\t * @example\n\t\t * var mult = new Tone.Multiply();\n\t\t * var sigA = new Tone.Signal(3);\n\t\t * var sigB = new Tone.Signal(4);\n\t\t * sigA.connect(mult, 0, 0);\n\t\t * sigB.connect(mult, 0, 1);\n\t\t * //output of mult is 12.\n\t\t * @example\n\t\t * var mult = new Tone.Multiply(10);\n\t\t * var sig = new Tone.Signal(2).connect(mult);\n\t\t * //the output of mult is 20.\n\t\t */\n\t Tone.Multiply = function (value) {\n\t Tone.Signal.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * the input node is the same as the output node\n\t\t\t * it is also the GainNode which handles the scaling of incoming signal\n\t\t\t *\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this._mult = this.input[0] = this.output = new Tone.Gain();\n\t /**\n\t\t\t * the scaling parameter\n\t\t\t * @type {AudioParam}\n\t\t\t * @private\n\t\t\t */\n\t this._param = this.input[1] = this.output.gain;\n\t this.value = Tone.defaultArg(value, 0);\n\t };\n\t Tone.extend(Tone.Multiply, Tone.Signal);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Multiply} this\n\t\t */\n\t Tone.Multiply.prototype.dispose = function () {\n\t Tone.Signal.prototype.dispose.call(this);\n\t this._mult.dispose();\n\t this._mult = null;\n\t this._param = null;\n\t return this;\n\t };\n\t return Tone.Multiply;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Negate the incoming signal. i.e. an input signal of 10 will output -10\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @example\n\t\t * var neg = new Tone.Negate();\n\t\t * var sig = new Tone.Signal(-2).connect(neg);\n\t\t * //output of neg is positive 2. \n\t\t */\n\t Tone.Negate = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * negation is done by multiplying by -1\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._multiply = this.input = this.output = new Tone.Multiply(-1);\n\t };\n\t Tone.extend(Tone.Negate, Tone.SignalBase);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Negate} this\n\t\t */\n\t Tone.Negate.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._multiply.dispose();\n\t this._multiply = null;\n\t return this;\n\t };\n\t return Tone.Negate;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Subtract the signal connected to <code>input[1]</code> from the signal connected \n\t\t * to <code>input[0]</code>. If an argument is provided in the constructor, the \n\t\t * signals <code>.value</code> will be subtracted from the incoming signal.\n\t\t *\n\t\t * @extends {Tone.Signal}\n\t\t * @constructor\n\t\t * @param {number=} value The value to subtract from the incoming signal. If the value\n\t\t * is omitted, it will subtract the second signal from the first.\n\t\t * @example\n\t\t * var sub = new Tone.Subtract(1);\n\t\t * var sig = new Tone.Signal(4).connect(sub);\n\t\t * //the output of sub is 3. \n\t\t * @example\n\t\t * var sub = new Tone.Subtract();\n\t\t * var sigA = new Tone.Signal(10);\n\t\t * var sigB = new Tone.Signal(2.5);\n\t\t * sigA.connect(sub, 0, 0);\n\t\t * sigB.connect(sub, 0, 1);\n\t\t * //output of sub is 7.5\n\t\t */\n\t Tone.Subtract = function (value) {\n\t Tone.Signal.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * the summing node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this._sum = this.input[0] = this.output = new Tone.Gain();\n\t /**\n\t\t\t * negate the input of the second input before connecting it\n\t\t\t * to the summing node.\n\t\t\t * @type {Tone.Negate}\n\t\t\t * @private\n\t\t\t */\n\t this._neg = new Tone.Negate();\n\t /**\n\t\t\t * the node where the value is set\n\t\t\t * @private\n\t\t\t * @type {Tone.Signal}\n\t\t\t */\n\t this._param = this.input[1] = new Tone.Signal(value);\n\t this._param.chain(this._neg, this._sum);\n\t };\n\t Tone.extend(Tone.Subtract, Tone.Signal);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.SignalBase} this\n\t\t */\n\t Tone.Subtract.prototype.dispose = function () {\n\t Tone.Signal.prototype.dispose.call(this);\n\t this._neg.dispose();\n\t this._neg = null;\n\t this._sum.disconnect();\n\t this._sum = null;\n\t return this;\n\t };\n\t return Tone.Subtract;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Convert an incoming signal between 0, 1 to an equal power gain scale.\n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @example\n\t\t * var eqPowGain = new Tone.EqualPowerGain();\n\t\t */\n\t Tone.EqualPowerGain = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * @type {Tone.WaveShaper}\n\t\t\t * @private\n\t\t\t */\n\t this._eqPower = this.input = this.output = new Tone.WaveShaper(function (val) {\n\t if (Math.abs(val) < 0.001) {\n\t //should output 0 when input is 0\n\t return 0;\n\t } else {\n\t return Tone.equalPowerScale(val);\n\t }\n\t }.bind(this), 4096);\n\t };\n\t Tone.extend(Tone.EqualPowerGain, Tone.SignalBase);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.EqualPowerGain} this\n\t\t */\n\t Tone.EqualPowerGain.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._eqPower.dispose();\n\t this._eqPower = null;\n\t return this;\n\t };\n\t return Tone.EqualPowerGain;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Crossfade provides equal power fading between two inputs.\n\t\t * More on crossfading technique [here](https://en.wikipedia.org/wiki/Fade_(audio_engineering)#Crossfading).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {NormalRange} [initialFade=0.5]\n\t\t * @example\n\t\t * var crossFade = new Tone.CrossFade(0.5);\n\t\t * //connect effect A to crossfade from\n\t\t * //effect output 0 to crossfade input 0\n\t\t * effectA.connect(crossFade, 0, 0);\n\t\t * //connect effect B to crossfade from\n\t\t * //effect output 0 to crossfade input 1\n\t\t * effectB.connect(crossFade, 0, 1);\n\t\t * crossFade.fade.value = 0;\n\t\t * // ^ only effectA is output\n\t\t * crossFade.fade.value = 1;\n\t\t * // ^ only effectB is output\n\t\t * crossFade.fade.value = 0.5;\n\t\t * // ^ the two signals are mixed equally.\n\t\t */\n\t Tone.CrossFade = function (initialFade) {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(2, 1);\n\t /**\n\t\t\t * Alias for <code>input[0]</code>.\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.a = this.input[0] = new Tone.Gain();\n\t /**\n\t\t\t * Alias for <code>input[1]</code>.\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.b = this.input[1] = new Tone.Gain();\n\t /**\n\t\t\t * \tThe mix between the two inputs. A fade value of 0\n\t\t\t * \twill output 100% <code>input[0]</code> and\n\t\t\t * \ta value of 1 will output 100% <code>input[1]</code>.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.fade = new Tone.Signal(Tone.defaultArg(initialFade, 0.5), Tone.Type.NormalRange);\n\t /**\n\t\t\t * equal power gain cross fade\n\t\t\t * @private\n\t\t\t * @type {Tone.EqualPowerGain}\n\t\t\t */\n\t this._equalPowerA = new Tone.EqualPowerGain();\n\t /**\n\t\t\t * equal power gain cross fade\n\t\t\t * @private\n\t\t\t * @type {Tone.EqualPowerGain}\n\t\t\t */\n\t this._equalPowerB = new Tone.EqualPowerGain();\n\t /**\n\t\t\t * invert the incoming signal\n\t\t\t * @private\n\t\t\t * @type {Tone}\n\t\t\t */\n\t this._one = this.context.getConstant(1);\n\t /**\n\t\t\t * invert the incoming signal\n\t\t\t * @private\n\t\t\t * @type {Tone.Subtract}\n\t\t\t */\n\t this._invert = new Tone.Subtract();\n\t //connections\n\t this.a.connect(this.output);\n\t this.b.connect(this.output);\n\t this.fade.chain(this._equalPowerB, this.b.gain);\n\t this._one.connect(this._invert, 0, 0);\n\t this.fade.connect(this._invert, 0, 1);\n\t this._invert.chain(this._equalPowerA, this.a.gain);\n\t this._readOnly('fade');\n\t };\n\t Tone.extend(Tone.CrossFade, Tone.AudioNode);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.CrossFade} this\n\t\t */\n\t Tone.CrossFade.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable('fade');\n\t this._equalPowerA.dispose();\n\t this._equalPowerA = null;\n\t this._equalPowerB.dispose();\n\t this._equalPowerB = null;\n\t this.fade.dispose();\n\t this.fade = null;\n\t this._invert.dispose();\n\t this._invert = null;\n\t this._one = null;\n\t this.a.dispose();\n\t this.a = null;\n\t this.b.dispose();\n\t this.b = null;\n\t return this;\n\t };\n\t return Tone.CrossFade;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Filter is a filter which allows for all of the same native methods\n\t\t * as the [BiquadFilterNode](http://webaudio.github.io/web-audio-api/#the-biquadfilternode-interface).\n\t\t * Tone.Filter has the added ability to set the filter rolloff at -12\n\t\t * (default), -24 and -48.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Frequency|Object} [frequency] The cutoff frequency of the filter.\n\t\t * @param {string=} type The type of filter.\n\t\t * @param {number=} rolloff The drop in decibels per octave after the cutoff frequency.\n\t\t * 3 choices: -12, -24, and -48\n\t\t * @example\n\t\t * var filter = new Tone.Filter(200, \"highpass\");\n\t\t */\n\t Tone.Filter = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type',\n\t 'rolloff'\n\t ], Tone.Filter);\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * the filter(s)\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._filters = [];\n\t /**\n\t\t\t * The cutoff frequency of the filter.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune parameter\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(0, Tone.Type.Cents);\n\t /**\n\t\t\t * The gain of the filter, only used in certain filter types\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t this.gain = new Tone.Signal({\n\t 'value': options.gain,\n\t 'convert': false\n\t });\n\t /**\n\t\t\t * The Q or Quality of the filter\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.Q = new Tone.Signal(options.Q);\n\t /**\n\t\t\t * the type of the filter\n\t\t\t * @type {string}\n\t\t\t * @private\n\t\t\t */\n\t this._type = options.type;\n\t /**\n\t\t\t * the rolloff value of the filter\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._rolloff = options.rolloff;\n\t //set the rolloff;\n\t this.rolloff = options.rolloff;\n\t this._readOnly([\n\t 'detune',\n\t 'frequency',\n\t 'gain',\n\t 'Q'\n\t ]);\n\t };\n\t Tone.extend(Tone.Filter, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t *\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Filter.defaults = {\n\t 'type': 'lowpass',\n\t 'frequency': 350,\n\t 'rolloff': -12,\n\t 'Q': 1,\n\t 'gain': 0\n\t };\n\t /**\n\t\t * The type of the filter. Types: \"lowpass\", \"highpass\",\n\t\t * \"bandpass\", \"lowshelf\", \"highshelf\", \"notch\", \"allpass\", or \"peaking\".\n\t\t * @memberOf Tone.Filter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.Filter.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t var types = [\n\t 'lowpass',\n\t 'highpass',\n\t 'bandpass',\n\t 'lowshelf',\n\t 'highshelf',\n\t 'notch',\n\t 'allpass',\n\t 'peaking'\n\t ];\n\t if (types.indexOf(type) === -1) {\n\t throw new TypeError('Tone.Filter: invalid type ' + type);\n\t }\n\t this._type = type;\n\t for (var i = 0; i < this._filters.length; i++) {\n\t this._filters[i].type = type;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The rolloff of the filter which is the drop in db\n\t\t * per octave. Implemented internally by cascading filters.\n\t\t * Only accepts the values -12, -24, -48 and -96.\n\t\t * @memberOf Tone.Filter#\n\t\t * @type {number}\n\t\t * @name rolloff\n\t\t */\n\t Object.defineProperty(Tone.Filter.prototype, 'rolloff', {\n\t get: function () {\n\t return this._rolloff;\n\t },\n\t set: function (rolloff) {\n\t rolloff = parseInt(rolloff, 10);\n\t var possibilities = [\n\t -12,\n\t -24,\n\t -48,\n\t -96\n\t ];\n\t var cascadingCount = possibilities.indexOf(rolloff);\n\t //check the rolloff is valid\n\t if (cascadingCount === -1) {\n\t throw new RangeError('Tone.Filter: rolloff can only be -12, -24, -48 or -96');\n\t }\n\t cascadingCount += 1;\n\t this._rolloff = rolloff;\n\t //first disconnect the filters and throw them away\n\t this.input.disconnect();\n\t for (var i = 0; i < this._filters.length; i++) {\n\t this._filters[i].disconnect();\n\t this._filters[i] = null;\n\t }\n\t this._filters = new Array(cascadingCount);\n\t for (var count = 0; count < cascadingCount; count++) {\n\t var filter = this.context.createBiquadFilter();\n\t filter.type = this._type;\n\t this.frequency.connect(filter.frequency);\n\t this.detune.connect(filter.detune);\n\t this.Q.connect(filter.Q);\n\t this.gain.connect(filter.gain);\n\t this._filters[count] = filter;\n\t }\n\t //connect them up\n\t var connectionChain = [this.input].concat(this._filters).concat([this.output]);\n\t Tone.connectSeries.apply(Tone, connectionChain);\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Filter} this\n\t\t */\n\t Tone.Filter.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t for (var i = 0; i < this._filters.length; i++) {\n\t this._filters[i].disconnect();\n\t this._filters[i] = null;\n\t }\n\t this._filters = null;\n\t this._writable([\n\t 'detune',\n\t 'frequency',\n\t 'gain',\n\t 'Q'\n\t ]);\n\t this.frequency.dispose();\n\t this.Q.dispose();\n\t this.frequency = null;\n\t this.Q = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t this.gain.dispose();\n\t this.gain = null;\n\t return this;\n\t };\n\t return Tone.Filter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Split the incoming signal into three bands (low, mid, high)\n\t\t * with two crossover frequency controls.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Frequency|Object} [lowFrequency] the low/mid crossover frequency\n\t\t * @param {Frequency} [highFrequency] the mid/high crossover frequency\n\t\t */\n\t Tone.MultibandSplit = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'lowFrequency',\n\t 'highFrequency'\n\t ], Tone.MultibandSplit);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the input\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this.input = new Tone.Gain();\n\t /**\n\t\t\t * the outputs\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this.output = new Array(3);\n\t /**\n\t\t\t * The low band. Alias for <code>output[0]</code>\n\t\t\t * @type {Tone.Filter}\n\t\t\t */\n\t this.low = this.output[0] = new Tone.Filter(0, 'lowpass');\n\t /**\n\t\t\t * the lower filter of the mid band\n\t\t\t * @type {Tone.Filter}\n\t\t\t * @private\n\t\t\t */\n\t this._lowMidFilter = new Tone.Filter(0, 'highpass');\n\t /**\n\t\t\t * The mid band output. Alias for <code>output[1]</code>\n\t\t\t * @type {Tone.Filter}\n\t\t\t */\n\t this.mid = this.output[1] = new Tone.Filter(0, 'lowpass');\n\t /**\n\t\t\t * The high band output. Alias for <code>output[2]</code>\n\t\t\t * @type {Tone.Filter}\n\t\t\t */\n\t this.high = this.output[2] = new Tone.Filter(0, 'highpass');\n\t /**\n\t\t\t * The low/mid crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.lowFrequency = new Tone.Signal(options.lowFrequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The mid/high crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.highFrequency = new Tone.Signal(options.highFrequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The quality of all the filters\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t this.Q = new Tone.Signal(options.Q);\n\t this.input.fan(this.low, this.high);\n\t this.input.chain(this._lowMidFilter, this.mid);\n\t //the frequency control signal\n\t this.lowFrequency.connect(this.low.frequency);\n\t this.lowFrequency.connect(this._lowMidFilter.frequency);\n\t this.highFrequency.connect(this.mid.frequency);\n\t this.highFrequency.connect(this.high.frequency);\n\t //the Q value\n\t this.Q.connect(this.low.Q);\n\t this.Q.connect(this._lowMidFilter.Q);\n\t this.Q.connect(this.mid.Q);\n\t this.Q.connect(this.high.Q);\n\t this._readOnly([\n\t 'high',\n\t 'mid',\n\t 'low',\n\t 'highFrequency',\n\t 'lowFrequency'\n\t ]);\n\t };\n\t Tone.extend(Tone.MultibandSplit, Tone.AudioNode);\n\t /**\n\t\t * @private\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.MultibandSplit.defaults = {\n\t 'lowFrequency': 400,\n\t 'highFrequency': 2500,\n\t 'Q': 1\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.MultibandSplit} this\n\t\t */\n\t Tone.MultibandSplit.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'high',\n\t 'mid',\n\t 'low',\n\t 'highFrequency',\n\t 'lowFrequency'\n\t ]);\n\t this.low.dispose();\n\t this.low = null;\n\t this._lowMidFilter.dispose();\n\t this._lowMidFilter = null;\n\t this.mid.dispose();\n\t this.mid = null;\n\t this.high.dispose();\n\t this.high = null;\n\t this.lowFrequency.dispose();\n\t this.lowFrequency = null;\n\t this.highFrequency.dispose();\n\t this.highFrequency = null;\n\t this.Q.dispose();\n\t this.Q = null;\n\t return this;\n\t };\n\t return Tone.MultibandSplit;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.EQ3 is a three band EQ with control over low, mid, and high gain as\n\t\t * well as the low and high crossover frequencies.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t *\n\t\t * @param {Decibels|Object} [lowLevel] The gain applied to the lows.\n\t\t * @param {Decibels} [midLevel] The gain applied to the mid.\n\t\t * @param {Decibels} [highLevel] The gain applied to the high.\n\t\t * @example\n\t\t * var eq = new Tone.EQ3(-10, 3, -20);\n\t\t */\n\t Tone.EQ3 = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'low',\n\t 'mid',\n\t 'high'\n\t ], Tone.EQ3);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the output node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.output = new Tone.Gain();\n\t /**\n\t\t\t * the multiband split\n\t\t\t * @type {Tone.MultibandSplit}\n\t\t\t * @private\n\t\t\t */\n\t this._multibandSplit = this.input = new Tone.MultibandSplit({\n\t 'lowFrequency': options.lowFrequency,\n\t 'highFrequency': options.highFrequency\n\t });\n\t /**\n\t\t\t * The gain for the lower signals\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._lowGain = new Tone.Gain(options.low, Tone.Type.Decibels);\n\t /**\n\t\t\t * The gain for the mid signals\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._midGain = new Tone.Gain(options.mid, Tone.Type.Decibels);\n\t /**\n\t\t\t * The gain in decibels of the high part\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._highGain = new Tone.Gain(options.high, Tone.Type.Decibels);\n\t /**\n\t\t\t * The gain in decibels of the low part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.low = this._lowGain.gain;\n\t /**\n\t\t\t * The gain in decibels of the mid part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.mid = this._midGain.gain;\n\t /**\n\t\t\t * The gain in decibels of the high part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.high = this._highGain.gain;\n\t /**\n\t\t\t * The Q value for all of the filters.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.Q = this._multibandSplit.Q;\n\t /**\n\t\t\t * The low/mid crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.lowFrequency = this._multibandSplit.lowFrequency;\n\t /**\n\t\t\t * The mid/high crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.highFrequency = this._multibandSplit.highFrequency;\n\t //the frequency bands\n\t this._multibandSplit.low.chain(this._lowGain, this.output);\n\t this._multibandSplit.mid.chain(this._midGain, this.output);\n\t this._multibandSplit.high.chain(this._highGain, this.output);\n\t this._readOnly([\n\t 'low',\n\t 'mid',\n\t 'high',\n\t 'lowFrequency',\n\t 'highFrequency'\n\t ]);\n\t };\n\t Tone.extend(Tone.EQ3, Tone.AudioNode);\n\t /**\n\t\t * the default values\n\t\t */\n\t Tone.EQ3.defaults = {\n\t 'low': 0,\n\t 'mid': 0,\n\t 'high': 0,\n\t 'lowFrequency': 400,\n\t 'highFrequency': 2500\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.EQ3} this\n\t\t */\n\t Tone.EQ3.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'low',\n\t 'mid',\n\t 'high',\n\t 'lowFrequency',\n\t 'highFrequency'\n\t ]);\n\t this._multibandSplit.dispose();\n\t this._multibandSplit = null;\n\t this.lowFrequency = null;\n\t this.highFrequency = null;\n\t this._lowGain.dispose();\n\t this._lowGain = null;\n\t this._midGain.dispose();\n\t this._midGain = null;\n\t this._highGain.dispose();\n\t this._highGain = null;\n\t this.low = null;\n\t this.mid = null;\n\t this.high = null;\n\t this.Q = null;\n\t return this;\n\t };\n\t return Tone.EQ3;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Performs a linear scaling on an input signal.\n\t\t * Scales a NormalRange input to between\n\t\t * outputMin and outputMax.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @param {number} [outputMin=0] The output value when the input is 0. \n\t\t * @param {number} [outputMax=1]\tThe output value when the input is 1. \n\t\t * @example\n\t\t * var scale = new Tone.Scale(50, 100);\n\t\t * var signal = new Tone.Signal(0.5).connect(scale);\n\t\t * //the output of scale equals 75\n\t\t */\n\t Tone.Scale = function (outputMin, outputMax) {\n\t Tone.SignalBase.call(this);\n\t /** \n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._outputMin = Tone.defaultArg(outputMin, 0);\n\t /** \n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._outputMax = Tone.defaultArg(outputMax, 1);\n\t /** \n\t\t\t * @private\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._scale = this.input = new Tone.Multiply(1);\n\t /** \n\t\t\t * @private\n\t\t\t * @type {Tone.Add}\n\t\t\t * @private\n\t\t\t */\n\t this._add = this.output = new Tone.Add(0);\n\t this._scale.connect(this._add);\n\t this._setRange();\n\t };\n\t Tone.extend(Tone.Scale, Tone.SignalBase);\n\t /**\n\t\t * The minimum output value. This number is output when \n\t\t * the value input value is 0. \n\t\t * @memberOf Tone.Scale#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.Scale.prototype, 'min', {\n\t get: function () {\n\t return this._outputMin;\n\t },\n\t set: function (min) {\n\t this._outputMin = min;\n\t this._setRange();\n\t }\n\t });\n\t /**\n\t\t * The maximum output value. This number is output when \n\t\t * the value input value is 1. \n\t\t * @memberOf Tone.Scale#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t Object.defineProperty(Tone.Scale.prototype, 'max', {\n\t get: function () {\n\t return this._outputMax;\n\t },\n\t set: function (max) {\n\t this._outputMax = max;\n\t this._setRange();\n\t }\n\t });\n\t /**\n\t\t * set the values\n\t\t * @private\n\t\t */\n\t Tone.Scale.prototype._setRange = function () {\n\t this._add.value = this._outputMin;\n\t this._scale.value = this._outputMax - this._outputMin;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Scale} this\n\t\t */\n\t Tone.Scale.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._add.dispose();\n\t this._add = null;\n\t this._scale.dispose();\n\t this._scale = null;\n\t return this;\n\t };\n\t return Tone.Scale;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Performs an exponential scaling on an input signal.\n\t\t * Scales a NormalRange value [0,1] exponentially\n\t\t * to the output range of outputMin to outputMax.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @param {number} [outputMin=0] The output value when the input is 0.\n\t\t * @param {number} [outputMax=1]\tThe output value when the input is 1.\n\t\t * @param {number} [exponent=2] The exponent which scales the incoming signal.\n\t\t * @example\n\t\t * var scaleExp = new Tone.ScaleExp(0, 100, 2);\n\t\t * var signal = new Tone.Signal(0.5).connect(scaleExp);\n\t\t */\n\t Tone.ScaleExp = function (outputMin, outputMax, exponent) {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * scale the input to the output range\n\t\t\t * @type {Tone.Scale}\n\t\t\t * @private\n\t\t\t */\n\t this._scale = this.output = new Tone.Scale(outputMin, outputMax);\n\t /**\n\t\t\t * @private\n\t\t\t * @type {Tone.Pow}\n\t\t\t * @private\n\t\t\t */\n\t this._exp = this.input = new Tone.Pow(Tone.defaultArg(exponent, 2));\n\t this._exp.connect(this._scale);\n\t };\n\t Tone.extend(Tone.ScaleExp, Tone.SignalBase);\n\t /**\n\t\t * Instead of interpolating linearly between the <code>min</code> and\n\t\t * <code>max</code> values, setting the exponent will interpolate between\n\t\t * the two values with an exponential curve.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t Object.defineProperty(Tone.ScaleExp.prototype, 'exponent', {\n\t get: function () {\n\t return this._exp.value;\n\t },\n\t set: function (exp) {\n\t this._exp.value = exp;\n\t }\n\t });\n\t /**\n\t\t * The minimum output value. This number is output when\n\t\t * the value input value is 0.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.ScaleExp.prototype, 'min', {\n\t get: function () {\n\t return this._scale.min;\n\t },\n\t set: function (min) {\n\t this._scale.min = min;\n\t }\n\t });\n\t /**\n\t\t * The maximum output value. This number is output when\n\t\t * the value input value is 1.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t Object.defineProperty(Tone.ScaleExp.prototype, 'max', {\n\t get: function () {\n\t return this._scale.max;\n\t },\n\t set: function (max) {\n\t this._scale.max = max;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.ScaleExp} this\n\t\t */\n\t Tone.ScaleExp.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._scale.dispose();\n\t this._scale = null;\n\t this._exp.dispose();\n\t this._exp = null;\n\t return this;\n\t };\n\t return Tone.ScaleExp;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Wrapper around Web Audio's native [DelayNode](http://webaudio.github.io/web-audio-api/#the-delaynode-interface).\n\t\t * @extends {Tone}\n\t\t * @param {Time=} delayTime The delay applied to the incoming signal.\n\t\t * @param {Time=} maxDelay The maximum delay time.\n\t\t */\n\t Tone.Delay = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'delayTime',\n\t 'maxDelay'\n\t ], Tone.Delay);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The maximum delay time initialized with the node\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._maxDelay = Math.max(this.toSeconds(options.maxDelay), this.toSeconds(options.delayTime));\n\t /**\n\t\t\t * The native delay node\n\t\t\t * @type {DelayNode}\n\t\t\t * @private\n\t\t\t */\n\t this._delayNode = this.input = this.output = this.context.createDelay(this._maxDelay);\n\t /**\n\t\t\t * The amount of time the incoming signal is\n\t\t\t * delayed.\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = new Tone.Param({\n\t 'param': this._delayNode.delayTime,\n\t 'units': Tone.Type.Time,\n\t 'value': options.delayTime\n\t });\n\t this._readOnly('delayTime');\n\t };\n\t Tone.extend(Tone.Delay, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Delay.defaults = {\n\t 'maxDelay': 1,\n\t 'delayTime': 0\n\t };\n\t /**\n\t\t * The maximum delay time. This cannot be changed. The value is passed into the constructor.\n\t\t * @memberof Tone.Delay#\n\t\t * @type {Time}\n\t\t * @name maxDelay\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Delay.prototype, 'maxDelay', {\n\t get: function () {\n\t return this._maxDelay;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Delay} this\n\t\t */\n\t Tone.Delay.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._delayNode.disconnect();\n\t this._delayNode = null;\n\t this._writable('delayTime');\n\t this.delayTime = null;\n\t return this;\n\t };\n\t return Tone.Delay;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Comb filters are basic building blocks for physical modeling. Read more\n\t\t * about comb filters on [CCRMA's website](https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html).\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Time|Object} [delayTime] The delay time of the filter.\n\t\t * @param {NormalRange=} resonance The amount of feedback the filter has.\n\t\t */\n\t Tone.FeedbackCombFilter = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'delayTime',\n\t 'resonance'\n\t ], Tone.FeedbackCombFilter);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the delay node\n\t\t\t * @type {DelayNode}\n\t\t\t * @private\n\t\t\t */\n\t this._delay = this.input = this.output = new Tone.Delay(options.delayTime);\n\t /**\n\t\t\t * The amount of delay of the comb filter.\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = this._delay.delayTime;\n\t /**\n\t\t\t * the feedback node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\t /**\n\t\t\t * The amount of feedback of the delayed signal.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.resonance = this._feedback.gain;\n\t this._delay.chain(this._feedback, this._delay);\n\t this._readOnly([\n\t 'resonance',\n\t 'delayTime'\n\t ]);\n\t };\n\t Tone.extend(Tone.FeedbackCombFilter, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.FeedbackCombFilter.defaults = {\n\t 'delayTime': 0.1,\n\t 'resonance': 0.5\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.FeedbackCombFilter} this\n\t\t */\n\t Tone.FeedbackCombFilter.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'resonance',\n\t 'delayTime'\n\t ]);\n\t this._delay.dispose();\n\t this._delay = null;\n\t this.delayTime = null;\n\t this._feedback.dispose();\n\t this._feedback = null;\n\t this.resonance = null;\n\t return this;\n\t };\n\t return Tone.FeedbackCombFilter;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Get the current waveform data of the connected audio source.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Number=} size The size of the FFT. Value must be a power of\n\t\t * two in the range 32 to 32768.\n\t\t */\n\t Tone.FFT = function () {\n\t var options = Tone.defaults(arguments, ['size'], Tone.FFT);\n\t options.type = Tone.Analyser.Type.FFT;\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The analyser node.\n\t\t\t * @private\n\t\t\t * @type {Tone.Analyser}\n\t\t\t */\n\t this._analyser = this.input = this.output = new Tone.Analyser(options);\n\t };\n\t Tone.extend(Tone.FFT, Tone.AudioNode);\n\t /**\n\t\t * The default values.\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.FFT.defaults = { 'size': 1024 };\n\t /**\n\t\t * Gets the waveform of the audio source. Returns the waveform data\n\t\t * of length [size](#size) as a Float32Array with values between -1 and 1.\n\t\t * @returns {TypedArray}\n\t\t */\n\t Tone.FFT.prototype.getValue = function () {\n\t return this._analyser.getValue();\n\t };\n\t /**\n\t\t * The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t * @memberOf Tone.FFT#\n\t\t * @type {Number}\n\t\t * @name size\n\t\t */\n\t Object.defineProperty(Tone.FFT.prototype, 'size', {\n\t get: function () {\n\t return this._analyser.size;\n\t },\n\t set: function (size) {\n\t this._analyser.size = size;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.FFT} this\n\t\t */\n\t Tone.FFT.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._analyser.dispose();\n\t this._analyser = null;\n\t };\n\t return Tone.FFT;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Return the absolute value of an incoming signal.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @example\n\t\t * var signal = new Tone.Signal(-1);\n\t\t * var abs = new Tone.Abs();\n\t\t * signal.connect(abs);\n\t\t * //the output of abs is 1.\n\t\t */\n\t Tone.Abs = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * @type {Tone.LessThan}\n\t\t\t * @private\n\t\t\t */\n\t this._abs = this.input = this.output = new Tone.WaveShaper(function (val) {\n\t if (Math.abs(val) < 0.001) {\n\t return 0;\n\t } else {\n\t return Math.abs(val);\n\t }\n\t }, 1024);\n\t };\n\t Tone.extend(Tone.Abs, Tone.SignalBase);\n\t /**\n\t\t * dispose method\n\t\t * @returns {Tone.Abs} this\n\t\t */\n\t Tone.Abs.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._abs.dispose();\n\t this._abs = null;\n\t return this;\n\t };\n\t return Tone.Abs;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Follower is a crude envelope follower which will follow\n\t\t * the amplitude of an incoming signal.\n\t\t * Take care with small (< 0.02) attack or decay values\n\t\t * as follower has some ripple which is exaggerated\n\t\t * at these values. Read more about envelope followers (also known\n\t\t * as envelope detectors) on [Wikipedia](https://en.wikipedia.org/wiki/Envelope_detector).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Time|Object} [attack] The rate at which the follower rises.\n\t\t * @param {Time=} release The rate at which the folower falls.\n\t\t * @example\n\t\t * var follower = new Tone.Follower(0.2, 0.4);\n\t\t */\n\t Tone.Follower = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'attack',\n\t 'release'\n\t ], Tone.Follower);\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * @type {Tone.Abs}\n\t\t\t * @private\n\t\t\t */\n\t this._abs = new Tone.Abs();\n\t /**\n\t\t\t * the lowpass filter which smooths the input\n\t\t\t * @type {BiquadFilterNode}\n\t\t\t * @private\n\t\t\t */\n\t this._filter = this.context.createBiquadFilter();\n\t this._filter.type = 'lowpass';\n\t this._filter.frequency.value = 0;\n\t this._filter.Q.value = -100;\n\t /**\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._frequencyValues = new Tone.WaveShaper();\n\t /**\n\t\t\t * @type {Tone.Subtract}\n\t\t\t * @private\n\t\t\t */\n\t this._sub = new Tone.Subtract();\n\t /**\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._delay = new Tone.Delay(this.blockTime);\n\t /**\n\t\t\t * this keeps it far from 0, even for very small differences\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._mult = new Tone.Multiply(10000);\n\t /**\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._attack = options.attack;\n\t /**\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._release = options.release;\n\t //the smoothed signal to get the values\n\t this.input.chain(this._abs, this._filter, this.output);\n\t //the difference path\n\t this._abs.connect(this._sub, 0, 1);\n\t this._filter.chain(this._delay, this._sub);\n\t //threshold the difference and use the thresh to set the frequency\n\t this._sub.chain(this._mult, this._frequencyValues, this._filter.frequency);\n\t //set the attack and release values in the table\n\t this._setAttackRelease(this._attack, this._release);\n\t };\n\t Tone.extend(Tone.Follower, Tone.AudioNode);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Follower.defaults = {\n\t 'attack': 0.05,\n\t 'release': 0.5\n\t };\n\t /**\n\t\t * sets the attack and release times in the wave shaper\n\t\t * @param {Time} attack\n\t\t * @param {Time} release\n\t\t * @private\n\t\t */\n\t Tone.Follower.prototype._setAttackRelease = function (attack, release) {\n\t var minTime = this.blockTime;\n\t attack = Tone.Time(attack).toFrequency();\n\t release = Tone.Time(release).toFrequency();\n\t attack = Math.max(attack, minTime);\n\t release = Math.max(release, minTime);\n\t this._frequencyValues.setMap(function (val) {\n\t if (val <= 0) {\n\t return attack;\n\t } else {\n\t return release;\n\t }\n\t });\n\t };\n\t /**\n\t\t * The attack time.\n\t\t * @memberOf Tone.Follower#\n\t\t * @type {Time}\n\t\t * @name attack\n\t\t */\n\t Object.defineProperty(Tone.Follower.prototype, 'attack', {\n\t get: function () {\n\t return this._attack;\n\t },\n\t set: function (attack) {\n\t this._attack = attack;\n\t this._setAttackRelease(this._attack, this._release);\n\t }\n\t });\n\t /**\n\t\t * The release time.\n\t\t * @memberOf Tone.Follower#\n\t\t * @type {Time}\n\t\t * @name release\n\t\t */\n\t Object.defineProperty(Tone.Follower.prototype, 'release', {\n\t get: function () {\n\t return this._release;\n\t },\n\t set: function (release) {\n\t this._release = release;\n\t this._setAttackRelease(this._attack, this._release);\n\t }\n\t });\n\t /**\n\t\t * Borrows the connect method from Signal so that the output can be used\n\t\t * as a Tone.Signal control signal.\n\t\t * @function\n\t\t */\n\t Tone.Follower.prototype.connect = Tone.SignalBase.prototype.connect;\n\t /**\n\t\t * dispose\n\t\t * @returns {Tone.Follower} this\n\t\t */\n\t Tone.Follower.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._filter.disconnect();\n\t this._filter = null;\n\t this._frequencyValues.disconnect();\n\t this._frequencyValues = null;\n\t this._delay.dispose();\n\t this._delay = null;\n\t this._sub.disconnect();\n\t this._sub = null;\n\t this._abs.dispose();\n\t this._abs = null;\n\t this._mult.dispose();\n\t this._mult = null;\n\t this._curve = null;\n\t return this;\n\t };\n\t return Tone.Follower;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.ScaledEnvelop is an envelope which can be scaled\n\t\t * to any range. It's useful for applying an envelope\n\t\t * to a frequency or any other non-NormalRange signal\n\t\t * parameter.\n\t\t *\n\t\t * @extends {Tone.Envelope}\n\t\t * @constructor\n\t\t * @param {Time|Object} [attack]\tthe attack time in seconds\n\t\t * @param {Time} [decay]\tthe decay time in seconds\n\t\t * @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n\t\t * @param {Time} [release]\tthe release time in seconds\n\t\t * @example\n\t\t * var scaledEnv = new Tone.ScaledEnvelope({\n\t\t * \t\"attack\" : 0.2,\n\t\t * \t\"min\" : 200,\n\t\t * \t\"max\" : 2000\n\t\t * });\n\t\t * scaledEnv.connect(oscillator.frequency);\n\t\t */\n\t Tone.ScaledEnvelope = function () {\n\t //get all of the defaults\n\t var options = Tone.defaults(arguments, [\n\t 'attack',\n\t 'decay',\n\t 'sustain',\n\t 'release'\n\t ], Tone.Envelope);\n\t Tone.Envelope.call(this, options);\n\t options = Tone.defaultArg(options, Tone.ScaledEnvelope.defaults);\n\t /**\n\t\t\t * scale the incoming signal by an exponent\n\t\t\t * @type {Tone.Pow}\n\t\t\t * @private\n\t\t\t */\n\t this._exp = this.output = new Tone.Pow(options.exponent);\n\t /**\n\t\t\t * scale the signal to the desired range\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._scale = this.output = new Tone.Scale(options.min, options.max);\n\t this._sig.chain(this._exp, this._scale);\n\t };\n\t Tone.extend(Tone.ScaledEnvelope, Tone.Envelope);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t */\n\t Tone.ScaledEnvelope.defaults = {\n\t 'min': 0,\n\t 'max': 1,\n\t 'exponent': 1\n\t };\n\t /**\n\t\t * The envelope's min output value. This is the value which it\n\t\t * starts at.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.ScaledEnvelope.prototype, 'min', {\n\t get: function () {\n\t return this._scale.min;\n\t },\n\t set: function (min) {\n\t this._scale.min = min;\n\t }\n\t });\n\t /**\n\t\t * The envelope's max output value. In other words, the value\n\t\t * at the peak of the attack portion of the envelope.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t Object.defineProperty(Tone.ScaledEnvelope.prototype, 'max', {\n\t get: function () {\n\t return this._scale.max;\n\t },\n\t set: function (max) {\n\t this._scale.max = max;\n\t }\n\t });\n\t /**\n\t\t * The envelope's exponent value.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t Object.defineProperty(Tone.ScaledEnvelope.prototype, 'exponent', {\n\t get: function () {\n\t return this._exp.value;\n\t },\n\t set: function (exp) {\n\t this._exp.value = exp;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.ScaledEnvelope} this\n\t\t */\n\t Tone.ScaledEnvelope.prototype.dispose = function () {\n\t Tone.Envelope.prototype.dispose.call(this);\n\t this._scale.dispose();\n\t this._scale = null;\n\t this._exp.dispose();\n\t this._exp = null;\n\t return this;\n\t };\n\t return Tone.ScaledEnvelope;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.FrequencyEnvelope is a Tone.ScaledEnvelope, but instead of `min` and `max`\n\t\t * it's got a `baseFrequency` and `octaves` parameter.\n\t\t *\n\t\t * @extends {Tone.Envelope}\n\t\t * @constructor\n\t\t * @param {Time|Object} [attack]\tthe attack time in seconds\n\t\t * @param {Time} [decay]\tthe decay time in seconds\n\t\t * @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n\t\t * @param {Time} [release]\tthe release time in seconds\n\t\t * @example\n\t\t * var env = new Tone.FrequencyEnvelope({\n\t\t * \t\"attack\" : 0.2,\n\t\t * \t\"baseFrequency\" : \"C2\",\n\t\t * \t\"octaves\" : 4\n\t\t * });\n\t\t * scaledEnv.connect(oscillator.frequency);\n\t\t */\n\t Tone.FrequencyEnvelope = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'attack',\n\t 'decay',\n\t 'sustain',\n\t 'release'\n\t ], Tone.Envelope);\n\t Tone.ScaledEnvelope.call(this, options);\n\t //merge it with the frequency envelope defaults\n\t options = Tone.defaultArg(options, Tone.FrequencyEnvelope.defaults);\n\t /**\n\t\t\t * Stores the octave value\n\t\t\t * @type {Positive}\n\t\t\t * @private\n\t\t\t */\n\t this._octaves = options.octaves;\n\t //setup\n\t this.baseFrequency = options.baseFrequency;\n\t this.octaves = options.octaves;\n\t };\n\t Tone.extend(Tone.FrequencyEnvelope, Tone.Envelope);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t */\n\t Tone.FrequencyEnvelope.defaults = {\n\t 'baseFrequency': 200,\n\t 'octaves': 4,\n\t 'exponent': 2\n\t };\n\t /**\n\t\t * The envelope's mininum output value. This is the value which it\n\t\t * starts at.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {Frequency}\n\t\t * @name baseFrequency\n\t\t */\n\t Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'baseFrequency', {\n\t get: function () {\n\t return this._scale.min;\n\t },\n\t set: function (min) {\n\t this._scale.min = this.toFrequency(min);\n\t //also update the octaves\n\t this.octaves = this._octaves;\n\t }\n\t });\n\t /**\n\t\t * The number of octaves above the baseFrequency that the\n\t\t * envelope will scale to.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'octaves', {\n\t get: function () {\n\t return this._octaves;\n\t },\n\t set: function (octaves) {\n\t this._octaves = octaves;\n\t this._scale.max = this.baseFrequency * Math.pow(2, octaves);\n\t }\n\t });\n\t /**\n\t\t * The envelope's exponent value.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'exponent', {\n\t get: function () {\n\t return this._exp.value;\n\t },\n\t set: function (exp) {\n\t this._exp.value = exp;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.FrequencyEnvelope} this\n\t\t */\n\t Tone.FrequencyEnvelope.prototype.dispose = function () {\n\t Tone.ScaledEnvelope.prototype.dispose.call(this);\n\t return this;\n\t };\n\t return Tone.FrequencyEnvelope;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class GreaterThanZero outputs 1 when the input is strictly greater than zero\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @example\n\t\t * var gt0 = new Tone.GreaterThanZero();\n\t\t * var sig = new Tone.Signal(0.01).connect(gt0);\n\t\t * //the output of gt0 is 1.\n\t\t * sig.value = 0;\n\t\t * //the output of gt0 is 0.\n\t\t */\n\t Tone.GreaterThanZero = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * @type {Tone.WaveShaper}\n\t\t\t * @private\n\t\t\t */\n\t this._thresh = this.output = new Tone.WaveShaper(function (val) {\n\t if (val <= 0) {\n\t return 0;\n\t } else {\n\t return 1;\n\t }\n\t }, 127);\n\t /**\n\t\t\t * scale the first thresholded signal by a large value.\n\t\t\t * this will help with values which are very close to 0\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._scale = this.input = new Tone.Multiply(10000);\n\t //connections\n\t this._scale.connect(this._thresh);\n\t };\n\t Tone.extend(Tone.GreaterThanZero, Tone.SignalBase);\n\t /**\n\t\t * dispose method\n\t\t * @returns {Tone.GreaterThanZero} this\n\t\t */\n\t Tone.GreaterThanZero.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._scale.dispose();\n\t this._scale = null;\n\t this._thresh.dispose();\n\t this._thresh = null;\n\t return this;\n\t };\n\t return Tone.GreaterThanZero;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Output 1 if the signal is greater than the value, otherwise outputs 0.\n\t\t * can compare two signals or a signal and a number.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Signal}\n\t\t * @param {number} [value=0] the value to compare to the incoming signal\n\t\t * @example\n\t\t * var gt = new Tone.GreaterThan(2);\n\t\t * var sig = new Tone.Signal(4).connect(gt);\n\t\t * //output of gt is equal 1.\n\t\t */\n\t Tone.GreaterThan = function (value) {\n\t Tone.Signal.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * subtract the amount from the incoming signal\n\t\t\t * @type {Tone.Subtract}\n\t\t\t * @private\n\t\t\t */\n\t this._param = this.input[0] = new Tone.Subtract(value);\n\t this.input[1] = this._param.input[1];\n\t /**\n\t\t\t * compare that amount to zero\n\t\t\t * @type {Tone.GreaterThanZero}\n\t\t\t * @private\n\t\t\t */\n\t this._gtz = this.output = new Tone.GreaterThanZero();\n\t //connect\n\t this._param.connect(this._gtz);\n\t };\n\t Tone.extend(Tone.GreaterThan, Tone.Signal);\n\t /**\n\t\t * dispose method\n\t\t * @returns {Tone.GreaterThan} this\n\t\t */\n\t Tone.GreaterThan.prototype.dispose = function () {\n\t Tone.Signal.prototype.dispose.call(this);\n\t this._gtz.dispose();\n\t this._gtz = null;\n\t return this;\n\t };\n\t return Tone.GreaterThan;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Gate only passes a signal through when the incoming\n\t\t * signal exceeds a specified threshold. To do this, Gate uses\n\t\t * a Tone.Follower to follow the amplitude of the incoming signal.\n\t\t * A common implementation of this class is a [Noise Gate](https://en.wikipedia.org/wiki/Noise_gate).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Decibels|Object} [threshold] The threshold above which the gate will open.\n\t\t * @param {Time=} attack The follower's attack time\n\t\t * @param {Time=} release The follower's release time\n\t\t * @example\n\t\t * var gate = new Tone.Gate(-30, 0.2, 0.3).toMaster();\n\t\t * var mic = new Tone.UserMedia().connect(gate);\n\t\t * //the gate will only pass through the incoming\n\t\t * //signal when it's louder than -30db\n\t\t */\n\t Tone.Gate = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'threshold',\n\t 'attack',\n\t 'release'\n\t ], Tone.Gate);\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * @type {Tone.Follower}\n\t\t\t * @private\n\t\t\t */\n\t this._follower = new Tone.Follower(options.attack, options.release);\n\t /**\n\t\t\t * @type {Tone.GreaterThan}\n\t\t\t * @private\n\t\t\t */\n\t this._gt = new Tone.GreaterThan(Tone.dbToGain(options.threshold));\n\t //the connections\n\t this.input.connect(this.output);\n\t //the control signal\n\t this.input.chain(this._gt, this._follower, this.output.gain);\n\t };\n\t Tone.extend(Tone.Gate, Tone.AudioNode);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Gate.defaults = {\n\t 'attack': 0.1,\n\t 'release': 0.1,\n\t 'threshold': -40\n\t };\n\t /**\n\t\t * The threshold of the gate in decibels\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Decibels}\n\t\t * @name threshold\n\t\t */\n\t Object.defineProperty(Tone.Gate.prototype, 'threshold', {\n\t get: function () {\n\t return Tone.gainToDb(this._gt.value);\n\t },\n\t set: function (thresh) {\n\t this._gt.value = Tone.dbToGain(thresh);\n\t }\n\t });\n\t /**\n\t\t * The attack speed of the gate\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Time}\n\t\t * @name attack\n\t\t */\n\t Object.defineProperty(Tone.Gate.prototype, 'attack', {\n\t get: function () {\n\t return this._follower.attack;\n\t },\n\t set: function (attackTime) {\n\t this._follower.attack = attackTime;\n\t }\n\t });\n\t /**\n\t\t * The release speed of the gate\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Time}\n\t\t * @name release\n\t\t */\n\t Object.defineProperty(Tone.Gate.prototype, 'release', {\n\t get: function () {\n\t return this._follower.release;\n\t },\n\t set: function (releaseTime) {\n\t this._follower.release = releaseTime;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Gate} this\n\t\t */\n\t Tone.Gate.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._follower.dispose();\n\t this._gt.dispose();\n\t this._follower = null;\n\t this._gt = null;\n\t return this;\n\t };\n\t return Tone.Gate;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TickSignal extends Tone.Signal, but adds the capability\n\t\t * to calculate the number of elapsed ticks. exponential and target curves\n\t\t * are approximated with multiple linear ramps.\n\t\t *\n\t\t * Thank you Bruno Dias, H. Sofia Pinto, and David M. Matos, for your [WAC paper](https://smartech.gatech.edu/bitstream/handle/1853/54588/WAC2016-49.pdf)\n\t\t * describing integrating timing functions for tempo calculations.\n\t\t *\n\t\t * @param {Number} value The initial value of the signal\n\t\t * @extends {Tone.Signal}\n\t\t */\n\t Tone.TickSignal = function (value) {\n\t value = Tone.defaultArg(value, 1);\n\t Tone.Signal.call(this, {\n\t 'units': Tone.Type.Ticks,\n\t 'value': value\n\t });\n\t //extend the memory\n\t this._events.memory = Infinity;\n\t //clear the clock from the beginning\n\t this.cancelScheduledValues(0);\n\t //set an initial event\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.SetValue,\n\t 'time': 0,\n\t 'value': value\n\t });\n\t };\n\t Tone.extend(Tone.TickSignal, Tone.Signal);\n\t /**\n\t\t * If scheduling past events should create a warning notification\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t Tone.TickSignal.prototype._ignorePast = true;\n\t /**\n\t\t * Wraps Tone.Signal methods so that they also\n\t\t * record the ticks.\n\t\t * @param {Function} method\n\t\t * @return {Function}\n\t\t * @private\n\t\t */\n\t function _wrapScheduleMethods(method) {\n\t return function (value, time) {\n\t time = this.toSeconds(time);\n\t method.apply(this, arguments);\n\t var event = this._events.get(time);\n\t var previousEvent = this._events.previousEvent(event);\n\t var ticksUntilTime = this._getTicksUntilEvent(previousEvent, time - this.sampleTime);\n\t event.ticks = Math.max(ticksUntilTime, 0);\n\t return this;\n\t };\n\t }\n\t Tone.TickSignal.prototype.setValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.setValueAtTime);\n\t Tone.TickSignal.prototype.linearRampToValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.linearRampToValueAtTime);\n\t /**\n\t\t * Start exponentially approaching the target value at the given time with\n\t\t * a rate having the given time constant.\n\t\t * @param {number} value\n\t\t * @param {Time} startTime\n\t\t * @param {number} timeConstant\n\t\t * @returns {Tone.TickSignal} this\n\t\t */\n\t Tone.TickSignal.prototype.setTargetAtTime = function (value, time, constant) {\n\t //aproximate it with multiple linear ramps\n\t time = this.toSeconds(time);\n\t this.setRampPoint(time);\n\t value = this._fromUnits(value);\n\t //start from previously scheduled value\n\t var prevEvent = this._events.get(time);\n\t var segments = Math.round(Math.max(1 / constant, 1));\n\t for (var i = 0; i <= segments; i++) {\n\t var segTime = constant * i + time;\n\t var rampVal = this._exponentialApproach(prevEvent.time, prevEvent.value, value, constant, segTime);\n\t this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Schedules an exponential continuous change in parameter value from\n\t\t * the previous scheduled parameter value to the given value.\n\t\t * @param {number} value\n\t\t * @param {Time} endTime\n\t\t * @returns {Tone.TickSignal} this\n\t\t */\n\t Tone.TickSignal.prototype.exponentialRampToValueAtTime = function (value, time) {\n\t //aproximate it with multiple linear ramps\n\t time = this.toSeconds(time);\n\t value = this._fromUnits(value);\n\t //start from previously scheduled value\n\t var prevEvent = this._events.get(time);\n\t if (prevEvent === null) {\n\t prevEvent = {\n\t 'value': this._initialValue,\n\t 'time': 0\n\t };\n\t }\n\t //approx 10 segments per second\n\t var segments = Math.round(Math.max((time - prevEvent.time) * 10, 1));\n\t var segmentDur = (time - prevEvent.time) / segments;\n\t for (var i = 0; i <= segments; i++) {\n\t var segTime = segmentDur * i + prevEvent.time;\n\t var rampVal = this._exponentialInterpolate(prevEvent.time, prevEvent.value, time, value, segTime);\n\t this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Returns the tick value at the time. Takes into account\n\t\t * any automation curves scheduled on the signal.\n\t\t * @private\n\t\t * @param {Time} time The time to get the tick count at\n\t\t * @return {Ticks} The number of ticks which have elapsed at the time\n\t\t * given any automations.\n\t\t */\n\t Tone.TickSignal.prototype._getTicksUntilEvent = function (event, time) {\n\t if (event === null) {\n\t event = {\n\t 'ticks': 0,\n\t 'time': 0\n\t };\n\t } else if (Tone.isUndef(event.ticks)) {\n\t var previousEvent = this._events.previousEvent(event);\n\t event.ticks = this._getTicksUntilEvent(previousEvent, event.time - this.sampleTime);\n\t }\n\t var val0 = this.getValueAtTime(event.time);\n\t var val1 = this.getValueAtTime(time);\n\t return 0.5 * (time - event.time) * (val0 + val1) + event.ticks;\n\t };\n\t /**\n\t\t * Returns the tick value at the time. Takes into account\n\t\t * any automation curves scheduled on the signal.\n\t\t * @param {Time} time The time to get the tick count at\n\t\t * @return {Ticks} The number of ticks which have elapsed at the time\n\t\t * given any automations.\n\t\t */\n\t Tone.TickSignal.prototype.getTicksAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t var event = this._events.get(time);\n\t return this._getTicksUntilEvent(event, time);\n\t };\n\t /**\n\t\t * Return the elapsed time of the number of ticks from the given time\n\t\t * @param {Ticks} ticks The number of ticks to calculate\n\t\t * @param {Time} time The time to get the next tick from\n\t\t * @return {Seconds} The duration of the number of ticks from the given time in seconds\n\t\t */\n\t Tone.TickSignal.prototype.getDurationOfTicks = function (ticks, time) {\n\t time = this.toSeconds(time);\n\t var currentTick = this.getTicksAtTime(time);\n\t return this.getTimeOfTick(currentTick + ticks) - time;\n\t };\n\t /**\n\t\t * Given a tick, returns the time that tick occurs at.\n\t\t * @param {Ticks} tick\n\t\t * @return {Time} The time that the tick occurs.\n\t\t */\n\t Tone.TickSignal.prototype.getTimeOfTick = function (tick) {\n\t var before = this._events.get(tick, 'ticks');\n\t var after = this._events.getAfter(tick, 'ticks');\n\t if (before && before.ticks === tick) {\n\t return before.time;\n\t } else if (before && after && after.type === Tone.Param.AutomationType.Linear && before.value !== after.value) {\n\t var val0 = this.getValueAtTime(before.time);\n\t var val1 = this.getValueAtTime(after.time);\n\t var delta = (val1 - val0) / (after.time - before.time);\n\t var k = Math.sqrt(Math.pow(val0, 2) - 2 * delta * (before.ticks - tick));\n\t var sol1 = (-val0 + k) / delta;\n\t var sol2 = (-val0 - k) / delta;\n\t return (sol1 > 0 ? sol1 : sol2) + before.time;\n\t } else if (before) {\n\t if (before.value === 0) {\n\t return Infinity;\n\t } else {\n\t return before.time + (tick - before.ticks) / before.value;\n\t }\n\t } else {\n\t return tick / this._initialValue;\n\t }\n\t };\n\t /**\n\t\t * Convert some number of ticks their the duration in seconds accounting\n\t\t * for any automation curves starting at the given time.\n\t\t * @param {Ticks} ticks The number of ticks to convert to seconds.\n\t\t * @param {Time} [when=now] When along the automation timeline to convert the ticks.\n\t\t * @return {Tone.Time} The duration in seconds of the ticks.\n\t\t */\n\t Tone.TickSignal.prototype.ticksToTime = function (ticks, when) {\n\t when = this.toSeconds(when);\n\t return new Tone.Time(this.getDurationOfTicks(ticks, when));\n\t };\n\t /**\n\t\t * The inverse of [ticksToTime](#tickstotime). Convert a duration in\n\t\t * seconds to the corresponding number of ticks accounting for any\n\t\t * automation curves starting at the given time.\n\t\t * @param {Time} duration The time interval to convert to ticks.\n\t\t * @param {Time} [when=now] When along the automation timeline to convert the ticks.\n\t\t * @return {Tone.Ticks} The duration in ticks.\n\t\t */\n\t Tone.TickSignal.prototype.timeToTicks = function (duration, when) {\n\t when = this.toSeconds(when);\n\t duration = this.toSeconds(duration);\n\t var startTicks = this.getTicksAtTime(when);\n\t var endTicks = this.getTicksAtTime(when + duration);\n\t return new Tone.Ticks(endTicks - startTicks);\n\t };\n\t return Tone.TickSignal;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A Timeline State. Provides the methods: <code>setStateAtTime(\"state\", time)</code>\n\t\t * and <code>getValueAtTime(time)</code>.\n\t\t *\n\t\t * @extends {Tone.Timeline}\n\t\t * @param {String} initial The initial state of the TimelineState. \n\t\t * Defaults to <code>undefined</code>\n\t\t */\n\t Tone.TimelineState = function (initial) {\n\t Tone.Timeline.call(this);\n\t /**\n\t\t\t * The initial state\n\t\t\t * @private\n\t\t\t * @type {String}\n\t\t\t */\n\t this._initial = initial;\n\t };\n\t Tone.extend(Tone.TimelineState, Tone.Timeline);\n\t /**\n\t\t * Returns the scheduled state scheduled before or at\n\t\t * the given time.\n\t\t * @param {Number} time The time to query.\n\t\t * @return {String} The name of the state input in setStateAtTime.\n\t\t */\n\t Tone.TimelineState.prototype.getValueAtTime = function (time) {\n\t var event = this.get(time);\n\t if (event !== null) {\n\t return event.state;\n\t } else {\n\t return this._initial;\n\t }\n\t };\n\t /**\n\t\t * Add a state to the timeline.\n\t\t * @param {String} state The name of the state to set.\n\t\t * @param {Number} time The time to query.\n\t\t * @returns {Tone.TimelineState} this\n\t\t */\n\t Tone.TimelineState.prototype.setStateAtTime = function (state, time) {\n\t this.add({\n\t 'state': state,\n\t 'time': time\n\t });\n\t return this;\n\t };\n\t return Tone.TimelineState;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A sample accurate clock which provides a callback at the given rate.\n\t\t * While the callback is not sample-accurate (it is still susceptible to\n\t\t * loose JS timing), the time passed in as the argument to the callback\n\t\t * is precise. For most applications, it is better to use Tone.Transport\n\t\t * instead of the Clock by itself since you can synchronize multiple callbacks.\n\t\t *\n\t\t * \t@constructor\n\t\t * @extends {Tone.Emitter}\n\t\t * \t@param {function} callback The callback to be invoked with the time of the audio event\n\t\t * \t@param {Frequency} frequency The rate of the callback\n\t\t * \t@example\n\t\t * //the callback will be invoked approximately once a second\n\t\t * //and will print the time exactly once a second apart.\n\t\t * var clock = new Tone.Clock(function(time){\n\t\t * \tconsole.log(time);\n\t\t * }, 1);\n\t\t */\n\t Tone.Clock = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'frequency'\n\t ], Tone.Clock);\n\t Tone.Emitter.call(this);\n\t /**\n\t\t\t * The callback function to invoke at the scheduled tick.\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.callback = options.callback;\n\t /**\n\t\t\t * The next time the callback is scheduled.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._nextTick = 0;\n\t /**\n\t\t\t * The last state of the clock.\n\t\t\t * @type {State}\n\t\t\t * @private\n\t\t\t */\n\t this._lastState = Tone.State.Stopped;\n\t /**\n\t\t\t * The rate the callback function should be invoked.\n\t\t\t * @type {BPM}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.TickSignal(options.frequency, Tone.Type.Frequency);\n\t this._readOnly('frequency');\n\t /**\n\t\t\t * The number of times the callback was invoked. Starts counting at 0\n\t\t\t * and increments after the callback was invoked.\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this._ticks = 0;\n\t /**\n\t\t\t * The state timeline\n\t\t\t * @type {Tone.TimelineState}\n\t\t\t * @private\n\t\t\t */\n\t this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t /**\n\t\t\t * The offset values of the ticks\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t this._tickOffset = new Tone.Timeline();\n\t //add the first event\n\t this._tickOffset.add({\n\t 'time': 0,\n\t 'ticks': 0\n\t });\n\t /**\n\t\t\t * The loop function bound to its context.\n\t\t\t * This is necessary to remove the event in the end.\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._boundLoop = this._loop.bind(this);\n\t //bind a callback to the worker thread\n\t this.context.on('tick', this._boundLoop);\n\t };\n\t Tone.extend(Tone.Clock, Tone.Emitter);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Clock.defaults = {\n\t 'callback': Tone.noOp,\n\t 'frequency': 1\n\t };\n\t /**\n\t\t * Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.Clock#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.Clock.prototype, 'state', {\n\t get: function () {\n\t return this._state.getValueAtTime(this.now());\n\t }\n\t });\n\t /**\n\t\t * Start the clock at the given time. Optionally pass in an offset\n\t\t * of where to start the tick counter from.\n\t\t * @param {Time=} time The time the clock should start\n\t\t * @param {Ticks=} offset Where the tick counter starts counting from.\n\t\t * @return {Tone.Clock} this\n\t\t */\n\t Tone.Clock.prototype.start = function (time, offset) {\n\t time = this.toSeconds(time);\n\t if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t var ticksAtTime = Math.floor(this.getTicksAtTime(time));\n\t offset = Tone.defaultArg(offset, ticksAtTime);\n\t this._state.setStateAtTime(Tone.State.Started, time);\n\t this._state.get(time).offset = offset;\n\t this.setTicksAtTime(offset, time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop the clock. Stopping the clock resets the tick counter to 0.\n\t\t * @param {Time} [time=now] The time when the clock should stop.\n\t\t * @returns {Tone.Clock} this\n\t\t * @example\n\t\t * clock.stop();\n\t\t */\n\t Tone.Clock.prototype.stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._state.cancel(time);\n\t this._state.setStateAtTime(Tone.State.Stopped, time);\n\t this.setTicksAtTime(0, time);\n\t return this;\n\t };\n\t /**\n\t\t * Pause the clock. Pausing does not reset the tick counter.\n\t\t * @param {Time} [time=now] The time when the clock should stop.\n\t\t * @returns {Tone.Clock} this\n\t\t */\n\t Tone.Clock.prototype.pause = function (time) {\n\t time = this.toSeconds(time);\n\t if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t var pausedTicks = this.getTicksAtTime(time);\n\t this.setTicksAtTime(pausedTicks, time);\n\t this._state.setStateAtTime(Tone.State.Paused, time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * The number of times the callback was invoked. Starts counting at 0\n\t\t * and increments after the callback was invoked.\n\t\t * @type {Ticks}\n\t\t */\n\t Object.defineProperty(Tone.Clock.prototype, 'ticks', {\n\t get: function () {\n\t return this._ticks;\n\t },\n\t set: function (t) {\n\t this._ticks = t;\n\t this.setTicksAtTime(t, this.now());\n\t }\n\t });\n\t /**\n\t\t * The time since ticks=0 that the Clock has been running. Accounts\n\t\t * for tempo curves\n\t\t * @type {Seconds}\n\t\t */\n\t Object.defineProperty(Tone.Clock.prototype, 'seconds', {\n\t get: function () {\n\t var time = this.now();\n\t var ticks = this.getTicksAtTime(time);\n\t var totalTicks = this.frequency.getTicksAtTime(time);\n\t if (totalTicks - ticks > 0) {\n\t var tickTime = this.frequency.getTimeOfTick(totalTicks - ticks);\n\t return this.frequency.ticksToTime(ticks, tickTime).toSeconds();\n\t } else {\n\t return this.frequency.ticksToTime(ticks, time).toSeconds();\n\t }\n\t },\n\t set: function (s) {\n\t var now = this.now();\n\t var ticks = this.frequency.timeToTicks(s, now - s);\n\t this.setTicksAtTime(ticks, now);\n\t }\n\t });\n\t /**\n\t\t * Get the elapsed ticks at the given time\n\t\t * @param {Time} time When to get the ticks\n\t\t * @return {Ticks} The elapsed ticks at the given time.\n\t\t */\n\t Tone.Clock.prototype.getTicksAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t var tickEvent = this._tickOffset.get(time);\n\t var offset = tickEvent.ticks;\n\t var elapsedTicks = this.frequency.getTicksAtTime(time) - tickEvent.position;\n\t if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t return offset;\n\t } else {\n\t return elapsedTicks + offset;\n\t }\n\t };\n\t /**\n\t\t * Set the clock's ticks at the given time.\n\t\t * @param {Ticks} ticks The tick value to set\n\t\t * @param {Time} time When to set the tick value\n\t\t * @return {Tone.Clock} this\n\t\t */\n\t Tone.Clock.prototype.setTicksAtTime = function (ticks, time) {\n\t time = this.toSeconds(time);\n\t this._ticks = ticks;\n\t this._tickOffset.cancel(time);\n\t this._tickOffset.add({\n\t 'time': time,\n\t 'ticks': ticks,\n\t 'position': this.frequency.getTicksAtTime(time)\n\t });\n\t return this;\n\t };\n\t /**\n\t\t * The scheduling loop.\n\t\t * @private\n\t\t */\n\t Tone.Clock.prototype._loop = function () {\n\t //the end of the update interval\n\t var endTime = this.now() + this.context.updateInterval;\n\t //the current event at the time of the loop\n\t var event = this._state.get(endTime);\n\t if (event) {\n\t //state change events\n\t if (event.state !== this._lastState) {\n\t this._lastState = event.state;\n\t switch (event.state) {\n\t case Tone.State.Started:\n\t this._ticks = event.offset;\n\t this._nextTick = event.time;\n\t this.emit('start', event.time, this._ticks);\n\t break;\n\t case Tone.State.Stopped:\n\t this._ticks = 0;\n\t this.emit('stop', event.time);\n\t break;\n\t case Tone.State.Paused:\n\t this.emit('pause', event.time);\n\t break;\n\t }\n\t }\n\t //all the tick events\n\t while (endTime > this._nextTick && this._state) {\n\t var tickTime = this._nextTick;\n\t if (this.frequency) {\n\t this._nextTick += this.frequency.getDurationOfTicks(1, this._nextTick);\n\t if (event.state === Tone.State.Started) {\n\t try {\n\t this.callback(tickTime);\n\t this._ticks++;\n\t } catch (e) {\n\t this._ticks++;\n\t throw e;\n\t }\n\t }\n\t }\n\t }\n\t }\n\t };\n\t /**\n\t\t * Returns the scheduled state at the given time.\n\t\t * @param {Time} time The time to query.\n\t\t * @return {String} The name of the state input in setStateAtTime.\n\t\t * @example\n\t\t * clock.start(\"+0.1\");\n\t\t * clock.getStateAtTime(\"+0.1\"); //returns \"started\"\n\t\t */\n\t Tone.Clock.prototype.getStateAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t return this._state.getValueAtTime(time);\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @returns {Tone.Clock} this\n\t\t */\n\t Tone.Clock.prototype.dispose = function () {\n\t Tone.Emitter.prototype.dispose.call(this);\n\t this.context.off('tick', this._boundLoop);\n\t this._writable('frequency');\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this._tickOffset.dispose();\n\t this._tickOffset = null;\n\t this._boundLoop = null;\n\t this._nextTick = Infinity;\n\t this.callback = null;\n\t this._state.dispose();\n\t this._state = null;\n\t };\n\t return Tone.Clock;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Similar to Tone.Timeline, but all events represent\n\t\t * intervals with both \"time\" and \"duration\" times. The\n\t\t * events are placed in a tree structure optimized\n\t\t * for querying an intersection point with the timeline\n\t\t * events. Internally uses an [Interval Tree](https://en.wikipedia.org/wiki/Interval_tree)\n\t\t * to represent the data.\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.IntervalTimeline = function () {\n\t Tone.call(this);\n\t /**\n\t\t\t * The root node of the inteval tree\n\t\t\t * @type {IntervalNode}\n\t\t\t * @private\n\t\t\t */\n\t this._root = null;\n\t /**\n\t\t\t * Keep track of the length of the timeline.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._length = 0;\n\t };\n\t Tone.extend(Tone.IntervalTimeline);\n\t /**\n\t\t * The event to add to the timeline. All events must\n\t\t * have a time and duration value\n\t\t * @param {Object} event The event to add to the timeline\n\t\t * @return {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.add = function (event) {\n\t if (Tone.isUndef(event.time) || Tone.isUndef(event.duration)) {\n\t throw new Error('Tone.IntervalTimeline: events must have time and duration parameters');\n\t }\n\t event.time = event.time.valueOf();\n\t var node = new IntervalNode(event.time, event.time + event.duration, event);\n\t if (this._root === null) {\n\t this._root = node;\n\t } else {\n\t this._root.insert(node);\n\t }\n\t this._length++;\n\t // Restructure tree to be balanced\n\t while (node !== null) {\n\t node.updateHeight();\n\t node.updateMax();\n\t this._rebalance(node);\n\t node = node.parent;\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Remove an event from the timeline.\n\t\t * @param {Object} event The event to remove from the timeline\n\t\t * @return {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.remove = function (event) {\n\t if (this._root !== null) {\n\t var results = [];\n\t this._root.search(event.time, results);\n\t for (var i = 0; i < results.length; i++) {\n\t var node = results[i];\n\t if (node.event === event) {\n\t this._removeNode(node);\n\t this._length--;\n\t break;\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * The number of items in the timeline.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.IntervalTimeline#\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.IntervalTimeline.prototype, 'length', {\n\t get: function () {\n\t return this._length;\n\t }\n\t });\n\t /**\n\t\t * Remove events whose time time is after the given time\n\t\t * @param {Number} time The time to query.\n\t\t * @returns {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.cancel = function (after) {\n\t this.forEachAfter(after, function (event) {\n\t this.remove(event);\n\t }.bind(this));\n\t return this;\n\t };\n\t /**\n\t\t * Set the root node as the given node\n\t\t * @param {IntervalNode} node\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._setRoot = function (node) {\n\t this._root = node;\n\t if (this._root !== null) {\n\t this._root.parent = null;\n\t }\n\t };\n\t /**\n\t\t * Replace the references to the node in the node's parent\n\t\t * with the replacement node.\n\t\t * @param {IntervalNode} node\n\t\t * @param {IntervalNode} replacement\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._replaceNodeInParent = function (node, replacement) {\n\t if (node.parent !== null) {\n\t if (node.isLeftChild()) {\n\t node.parent.left = replacement;\n\t } else {\n\t node.parent.right = replacement;\n\t }\n\t this._rebalance(node.parent);\n\t } else {\n\t this._setRoot(replacement);\n\t }\n\t };\n\t /**\n\t\t * Remove the node from the tree and replace it with\n\t\t * a successor which follows the schema.\n\t\t * @param {IntervalNode} node\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._removeNode = function (node) {\n\t if (node.left === null && node.right === null) {\n\t this._replaceNodeInParent(node, null);\n\t } else if (node.right === null) {\n\t this._replaceNodeInParent(node, node.left);\n\t } else if (node.left === null) {\n\t this._replaceNodeInParent(node, node.right);\n\t } else {\n\t var balance = node.getBalance();\n\t var replacement, temp;\n\t if (balance > 0) {\n\t if (node.left.right === null) {\n\t replacement = node.left;\n\t replacement.right = node.right;\n\t temp = replacement;\n\t } else {\n\t replacement = node.left.right;\n\t while (replacement.right !== null) {\n\t replacement = replacement.right;\n\t }\n\t replacement.parent.right = replacement.left;\n\t temp = replacement.parent;\n\t replacement.left = node.left;\n\t replacement.right = node.right;\n\t }\n\t } else if (node.right.left === null) {\n\t replacement = node.right;\n\t replacement.left = node.left;\n\t temp = replacement;\n\t } else {\n\t replacement = node.right.left;\n\t while (replacement.left !== null) {\n\t replacement = replacement.left;\n\t }\n\t replacement.parent = replacement.parent;\n\t replacement.parent.left = replacement.right;\n\t temp = replacement.parent;\n\t replacement.left = node.left;\n\t replacement.right = node.right;\n\t }\n\t if (node.parent !== null) {\n\t if (node.isLeftChild()) {\n\t node.parent.left = replacement;\n\t } else {\n\t node.parent.right = replacement;\n\t }\n\t } else {\n\t this._setRoot(replacement);\n\t }\n\t // this._replaceNodeInParent(node, replacement);\n\t this._rebalance(temp);\n\t }\n\t node.dispose();\n\t };\n\t /**\n\t\t * Rotate the tree to the left\n\t\t * @param {IntervalNode} node\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._rotateLeft = function (node) {\n\t var parent = node.parent;\n\t var isLeftChild = node.isLeftChild();\n\t // Make node.right the new root of this sub tree (instead of node)\n\t var pivotNode = node.right;\n\t node.right = pivotNode.left;\n\t pivotNode.left = node;\n\t if (parent !== null) {\n\t if (isLeftChild) {\n\t parent.left = pivotNode;\n\t } else {\n\t parent.right = pivotNode;\n\t }\n\t } else {\n\t this._setRoot(pivotNode);\n\t }\n\t };\n\t /**\n\t\t * Rotate the tree to the right\n\t\t * @param {IntervalNode} node\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._rotateRight = function (node) {\n\t var parent = node.parent;\n\t var isLeftChild = node.isLeftChild();\n\t // Make node.left the new root of this sub tree (instead of node)\n\t var pivotNode = node.left;\n\t node.left = pivotNode.right;\n\t pivotNode.right = node;\n\t if (parent !== null) {\n\t if (isLeftChild) {\n\t parent.left = pivotNode;\n\t } else {\n\t parent.right = pivotNode;\n\t }\n\t } else {\n\t this._setRoot(pivotNode);\n\t }\n\t };\n\t /**\n\t\t * Balance the BST\n\t\t * @param {IntervalNode} node\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._rebalance = function (node) {\n\t var balance = node.getBalance();\n\t if (balance > 1) {\n\t if (node.left.getBalance() < 0) {\n\t this._rotateLeft(node.left);\n\t } else {\n\t this._rotateRight(node);\n\t }\n\t } else if (balance < -1) {\n\t if (node.right.getBalance() > 0) {\n\t this._rotateRight(node.right);\n\t } else {\n\t this._rotateLeft(node);\n\t }\n\t }\n\t };\n\t /**\n\t\t * Get an event whose time and duration span the give time. Will\n\t\t * return the match whose \"time\" value is closest to the given time.\n\t\t * @param {Object} event The event to add to the timeline\n\t\t * @return {Object} The event which spans the desired time\n\t\t */\n\t Tone.IntervalTimeline.prototype.get = function (time) {\n\t if (this._root !== null) {\n\t var results = [];\n\t this._root.search(time, results);\n\t if (results.length > 0) {\n\t var max = results[0];\n\t for (var i = 1; i < results.length; i++) {\n\t if (results[i].low > max.low) {\n\t max = results[i];\n\t }\n\t }\n\t return max.event;\n\t }\n\t }\n\t return null;\n\t };\n\t /**\n\t\t * Iterate over everything in the timeline.\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.forEach = function (callback) {\n\t if (this._root !== null) {\n\t var allNodes = [];\n\t this._root.traverse(function (node) {\n\t allNodes.push(node);\n\t });\n\t for (var i = 0; i < allNodes.length; i++) {\n\t var ev = allNodes[i].event;\n\t if (ev) {\n\t callback(ev);\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array in which the given time\n\t\t * overlaps with the time and duration time of the event.\n\t\t * @param {Number} time The time to check if items are overlapping\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.forEachAtTime = function (time, callback) {\n\t if (this._root !== null) {\n\t var results = [];\n\t this._root.search(time, results);\n\t for (var i = results.length - 1; i >= 0; i--) {\n\t var ev = results[i].event;\n\t if (ev) {\n\t callback(ev);\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array in which the time is greater\n\t\t * than the given time.\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.forEachAfter = function (time, callback) {\n\t if (this._root !== null) {\n\t var results = [];\n\t this._root.searchAfter(time, results);\n\t for (var i = results.length - 1; i >= 0; i--) {\n\t var ev = results[i].event;\n\t callback(ev);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.dispose = function () {\n\t var allNodes = [];\n\t if (this._root !== null) {\n\t this._root.traverse(function (node) {\n\t allNodes.push(node);\n\t });\n\t }\n\t for (var i = 0; i < allNodes.length; i++) {\n\t allNodes[i].dispose();\n\t }\n\t allNodes = null;\n\t this._root = null;\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tINTERVAL NODE HELPER\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Represents a node in the binary search tree, with the addition\n\t\t * of a \"high\" value which keeps track of the highest value of\n\t\t * its children.\n\t\t * References:\n\t\t * https://brooknovak.wordpress.com/2013/12/07/augmented-interval-tree-in-c/\n\t\t * http://www.mif.vu.lt/~valdas/ALGORITMAI/LITERATURA/Cormen/Cormen.pdf\n\t\t * @param {Number} low\n\t\t * @param {Number} high\n\t\t * @private\n\t\t */\n\t var IntervalNode = function (low, high, event) {\n\t //the event container\n\t this.event = event;\n\t //the low value\n\t this.low = low;\n\t //the high value\n\t this.high = high;\n\t //the high value for this and all child nodes\n\t this.max = this.high;\n\t //the nodes to the left\n\t this._left = null;\n\t //the nodes to the right\n\t this._right = null;\n\t //the parent node\n\t this.parent = null;\n\t //the number of child nodes\n\t this.height = 0;\n\t };\n\t /**\n\t\t * Insert a node into the correct spot in the tree\n\t\t * @param {IntervalNode} node\n\t\t */\n\t IntervalNode.prototype.insert = function (node) {\n\t if (node.low <= this.low) {\n\t if (this.left === null) {\n\t this.left = node;\n\t } else {\n\t this.left.insert(node);\n\t }\n\t } else if (this.right === null) {\n\t this.right = node;\n\t } else {\n\t this.right.insert(node);\n\t }\n\t };\n\t /**\n\t\t * Search the tree for nodes which overlap\n\t\t * with the given point\n\t\t * @param {Number} point The point to query\n\t\t * @param {Array} results The array to put the results\n\t\t */\n\t IntervalNode.prototype.search = function (point, results) {\n\t // If p is to the right of the rightmost point of any interval\n\t // in this node and all children, there won't be any matches.\n\t if (point > this.max) {\n\t return;\n\t }\n\t // Search left children\n\t if (this.left !== null) {\n\t this.left.search(point, results);\n\t }\n\t // Check this node\n\t if (this.low <= point && this.high > point) {\n\t results.push(this);\n\t }\n\t // If p is to the left of the time of this interval,\n\t // then it can't be in any child to the right.\n\t if (this.low > point) {\n\t return;\n\t }\n\t // Search right children\n\t if (this.right !== null) {\n\t this.right.search(point, results);\n\t }\n\t };\n\t /**\n\t\t * Search the tree for nodes which are less\n\t\t * than the given point\n\t\t * @param {Number} point The point to query\n\t\t * @param {Array} results The array to put the results\n\t\t */\n\t IntervalNode.prototype.searchAfter = function (point, results) {\n\t // Check this node\n\t if (this.low >= point) {\n\t results.push(this);\n\t if (this.left !== null) {\n\t this.left.searchAfter(point, results);\n\t }\n\t }\n\t // search the right side\n\t if (this.right !== null) {\n\t this.right.searchAfter(point, results);\n\t }\n\t };\n\t /**\n\t\t * Invoke the callback on this element and both it's branches\n\t\t * @param {Function} callback\n\t\t */\n\t IntervalNode.prototype.traverse = function (callback) {\n\t callback(this);\n\t if (this.left !== null) {\n\t this.left.traverse(callback);\n\t }\n\t if (this.right !== null) {\n\t this.right.traverse(callback);\n\t }\n\t };\n\t /**\n\t\t * Update the height of the node\n\t\t */\n\t IntervalNode.prototype.updateHeight = function () {\n\t if (this.left !== null && this.right !== null) {\n\t this.height = Math.max(this.left.height, this.right.height) + 1;\n\t } else if (this.right !== null) {\n\t this.height = this.right.height + 1;\n\t } else if (this.left !== null) {\n\t this.height = this.left.height + 1;\n\t } else {\n\t this.height = 0;\n\t }\n\t };\n\t /**\n\t\t * Update the height of the node\n\t\t */\n\t IntervalNode.prototype.updateMax = function () {\n\t this.max = this.high;\n\t if (this.left !== null) {\n\t this.max = Math.max(this.max, this.left.max);\n\t }\n\t if (this.right !== null) {\n\t this.max = Math.max(this.max, this.right.max);\n\t }\n\t };\n\t /**\n\t\t * The balance is how the leafs are distributed on the node\n\t\t * @return {Number} Negative numbers are balanced to the right\n\t\t */\n\t IntervalNode.prototype.getBalance = function () {\n\t var balance = 0;\n\t if (this.left !== null && this.right !== null) {\n\t balance = this.left.height - this.right.height;\n\t } else if (this.left !== null) {\n\t balance = this.left.height + 1;\n\t } else if (this.right !== null) {\n\t balance = -(this.right.height + 1);\n\t }\n\t return balance;\n\t };\n\t /**\n\t\t * @returns {Boolean} true if this node is the left child\n\t\t * of its parent\n\t\t */\n\t IntervalNode.prototype.isLeftChild = function () {\n\t return this.parent !== null && this.parent.left === this;\n\t };\n\t /**\n\t\t * get/set the left node\n\t\t * @type {IntervalNode}\n\t\t */\n\t Object.defineProperty(IntervalNode.prototype, 'left', {\n\t get: function () {\n\t return this._left;\n\t },\n\t set: function (node) {\n\t this._left = node;\n\t if (node !== null) {\n\t node.parent = this;\n\t }\n\t this.updateHeight();\n\t this.updateMax();\n\t }\n\t });\n\t /**\n\t\t * get/set the right node\n\t\t * @type {IntervalNode}\n\t\t */\n\t Object.defineProperty(IntervalNode.prototype, 'right', {\n\t get: function () {\n\t return this._right;\n\t },\n\t set: function (node) {\n\t this._right = node;\n\t if (node !== null) {\n\t node.parent = this;\n\t }\n\t this.updateHeight();\n\t this.updateMax();\n\t }\n\t });\n\t /**\n\t\t * null out references.\n\t\t */\n\t IntervalNode.prototype.dispose = function () {\n\t this.parent = null;\n\t this._left = null;\n\t this._right = null;\n\t this.event = null;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tEND INTERVAL NODE HELPER\n\t ///////////////////////////////////////////////////////////////////////////\n\t return Tone.IntervalTimeline;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Ticks is a primitive type for encoding Time values.\n\t\t * Tone.Ticks can be constructed with or without the `new` keyword. Tone.Ticks can be passed\n\t\t * into the parameter of any method which takes time as an argument.\n\t\t * @constructor\n\t\t * @extends {Tone.TransportTime}\n\t\t * @param {String|Number} val The time value.\n\t\t * @param {String=} units The units of the value.\n\t\t * @example\n\t\t * var t = Tone.Ticks(\"4n\");//a quarter note\n\t\t */\n\t Tone.Ticks = function (val, units) {\n\t if (this instanceof Tone.Ticks) {\n\t Tone.TransportTime.call(this, val, units);\n\t } else {\n\t return new Tone.Ticks(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.Ticks, Tone.TransportTime);\n\t /**\n\t\t * The default units if none are given.\n\t\t * @type {String}\n\t\t * @private\n\t\t */\n\t Tone.Ticks.prototype._defaultUnits = 'i';\n\t /**\n\t\t * Get the current time in the given units\n\t\t * @return {Ticks}\n\t\t * @private\n\t\t */\n\t Tone.Ticks.prototype._now = function () {\n\t return Tone.Transport.ticks;\n\t };\n\t /**\n\t\t * Return the value of the beats in the current units\n\t\t * @param {Number} beats\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Ticks.prototype._beatsToUnits = function (beats) {\n\t return this._getPPQ() * beats;\n\t };\n\t /**\n\t\t * Returns the value of a second in the current units\n\t\t * @param {Seconds} seconds\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Ticks.prototype._secondsToUnits = function (seconds) {\n\t return seconds / (60 / this._getBpm()) * this._getPPQ();\n\t };\n\t /**\n\t\t * Returns the value of a tick in the current time units\n\t\t * @param {Ticks} ticks\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Ticks.prototype._ticksToUnits = function (ticks) {\n\t return ticks;\n\t };\n\t /**\n\t\t * Return the time in ticks\n\t\t * @return {Ticks}\n\t\t */\n\t Tone.Ticks.prototype.toTicks = function () {\n\t return this.valueOf();\n\t };\n\t /**\n\t\t * Return the time in ticks\n\t\t * @return {Ticks}\n\t\t */\n\t Tone.Ticks.prototype.toSeconds = function () {\n\t return this.valueOf() / this._getPPQ() * (60 / this._getBpm());\n\t };\n\t return Tone.Ticks;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TransportEvent is an internal class used by (Tone.Transport)[Transport]\n\t\t * to schedule events. Do no invoke this class directly, it is\n\t\t * handled from within Tone.Transport.\n\t\t * @extends {Tone}\n\t\t * @param {Object} options\n\t\t */\n\t Tone.TransportEvent = function (Transport, options) {\n\t options = Tone.defaultArg(options, Tone.TransportEvent.defaults);\n\t Tone.call(this);\n\t /**\n\t\t\t * Reference to the Transport that created it\n\t\t\t * @type {Tone.Transport}\n\t\t\t */\n\t this.Transport = Transport;\n\t /**\n\t\t\t * The unique id of the event\n\t\t\t * @type {Number}\n\t\t\t */\n\t this.id = Tone.TransportEvent._eventId++;\n\t /**\n\t\t\t * The time the event starts\n\t\t\t * @type {Ticks}\n\t\t\t */\n\t this.time = Tone.Ticks(options.time);\n\t /**\n\t\t\t * The callback to invoke\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.callback = options.callback;\n\t /**\n\t\t\t * If the event should be removed after being created.\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t this._once = options.once;\n\t };\n\t Tone.extend(Tone.TransportEvent);\n\t /**\n\t\t * The defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.TransportEvent.defaults = {\n\t 'once': false,\n\t 'callback': Tone.noOp\n\t };\n\t /**\n\t\t * Current ID counter\n\t\t * @private\n\t\t * @static\n\t\t * @type {Number}\n\t\t */\n\t Tone.TransportEvent._eventId = 0;\n\t /**\n\t\t * Invoke the event callback.\n\t\t * @param {Time} time The AudioContext time in seconds of the event\n\t\t */\n\t Tone.TransportEvent.prototype.invoke = function (time) {\n\t if (this.callback) {\n\t this.callback(time);\n\t if (this._once && this.Transport) {\n\t this.Transport.clear(this.id);\n\t }\n\t }\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.TransportEvent} this\n\t\t */\n\t Tone.TransportEvent.prototype.dispose = function () {\n\t Tone.prototype.dispose.call(this);\n\t this.Transport = null;\n\t this.callback = null;\n\t this.time = null;\n\t return this;\n\t };\n\t return Tone.TransportEvent;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TransportRepeatEvent is an internal class used by Tone.Transport\n\t\t * to schedule repeat events. This class should not be instantiated directly.\n\t\t * @extends {Tone.TransportEvent}\n\t\t * @param {Object} options\n\t\t */\n\t Tone.TransportRepeatEvent = function (Transport, options) {\n\t Tone.TransportEvent.call(this, Transport, options);\n\t options = Tone.defaultArg(options, Tone.TransportRepeatEvent.defaults);\n\t /**\n\t\t\t * When the event should stop repeating\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this.duration = Tone.Ticks(options.duration);\n\t /**\n\t\t\t * The interval of the repeated event\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this._interval = Tone.Ticks(options.interval);\n\t /**\n\t\t\t * The ID of the current timeline event\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._currentId = -1;\n\t /**\n\t\t\t * The ID of the next timeline event\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._nextId = -1;\n\t /**\n\t\t\t * The time of the next event\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this._nextTick = this.time;\n\t /**\n\t\t\t * a reference to the bound start method\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._boundRestart = this._restart.bind(this);\n\t this.Transport.on('start loopStart', this._boundRestart);\n\t this._restart();\n\t };\n\t Tone.extend(Tone.TransportRepeatEvent, Tone.TransportEvent);\n\t /**\n\t\t * The defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.TransportRepeatEvent.defaults = {\n\t 'duration': Infinity,\n\t 'interval': 1\n\t };\n\t /**\n\t\t * Invoke the callback. Returns the tick time which\n\t\t * the next event should be scheduled at.\n\t\t * @param {Number} time The AudioContext time in seconds of the event\n\t\t */\n\t Tone.TransportRepeatEvent.prototype.invoke = function (time) {\n\t //create more events if necessary\n\t this._createEvents();\n\t //call the super class\n\t Tone.TransportEvent.prototype.invoke.call(this, time);\n\t };\n\t /**\n\t\t * Push more events onto the timeline to keep up with the position of the timeline\n\t\t * @private\n\t\t */\n\t Tone.TransportRepeatEvent.prototype._createEvents = function () {\n\t // schedule the next event\n\t var ticks = this.Transport.ticks;\n\t if (ticks >= this.time && ticks >= this._nextTick && this._nextTick + this._interval < this.time + this.duration) {\n\t this._nextTick += this._interval;\n\t this._currentId = this._nextId;\n\t this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t }\n\t };\n\t /**\n\t\t * Push more events onto the timeline to keep up with the position of the timeline\n\t\t * @private\n\t\t */\n\t Tone.TransportRepeatEvent.prototype._restart = function () {\n\t this.Transport.clear(this._currentId);\n\t this.Transport.clear(this._nextId);\n\t var ticks = this.Transport.ticks;\n\t this._nextTick = this.time;\n\t if (ticks > this.time) {\n\t this._nextTick = this.time + Math.ceil((ticks - this.time) / this._interval) * this._interval;\n\t }\n\t this._currentId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t this._nextTick += this._interval;\n\t this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.TransportRepeatEvent} this\n\t\t */\n\t Tone.TransportRepeatEvent.prototype.dispose = function () {\n\t this.Transport.clear(this._currentId);\n\t this.Transport.clear(this._nextId);\n\t this.Transport.off('start loopStart', this._boundRestart);\n\t this._boundCreateEvents = null;\n\t Tone.TransportEvent.prototype.dispose.call(this);\n\t this.duration = null;\n\t this._interval = null;\n\t return this;\n\t };\n\t return Tone.TransportRepeatEvent;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Transport for timing musical events.\n\t\t * Supports tempo curves and time changes. Unlike browser-based timing (setInterval, requestAnimationFrame)\n\t\t * Tone.Transport timing events pass in the exact time of the scheduled event\n\t\t * in the argument of the callback function. Pass that time value to the object\n\t\t * you're scheduling. <br><br>\n\t\t * A single transport is created for you when the library is initialized.\n\t\t * <br><br>\n\t\t * The transport emits the events: \"start\", \"stop\", \"pause\", and \"loop\" which are\n\t\t * called with the time of that event as the argument.\n\t\t *\n\t\t * @extends {Tone.Emitter}\n\t\t * @singleton\n\t\t * @example\n\t\t * //repeated event every 8th note\n\t\t * Tone.Transport.scheduleRepeat(function(time){\n\t\t * \t//do something with the time\n\t\t * }, \"8n\");\n\t\t * @example\n\t\t * //schedule an event on the 16th measure\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \t//do something with the time\n\t\t * }, \"16:0:0\");\n\t\t */\n\t Tone.Transport = function () {\n\t Tone.Emitter.call(this);\n\t Tone.getContext(function () {\n\t ///////////////////////////////////////////////////////////////////////\n\t //\tLOOPING\n\t //////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t\t * \tIf the transport loops or not.\n\t\t\t\t * @type {boolean}\n\t\t\t\t */\n\t this.loop = false;\n\t /**\n\t\t\t\t * \tThe loop start position in ticks\n\t\t\t\t * @type {Ticks}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._loopStart = 0;\n\t /**\n\t\t\t\t * \tThe loop end position in ticks\n\t\t\t\t * @type {Ticks}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._loopEnd = 0;\n\t ///////////////////////////////////////////////////////////////////////\n\t //\tCLOCK/TEMPO\n\t //////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t\t * Pulses per quarter is the number of ticks per quarter note.\n\t\t\t\t * @private\n\t\t\t\t * @type {Number}\n\t\t\t\t */\n\t this._ppq = TransportConstructor.defaults.PPQ;\n\t /**\n\t\t\t\t * watches the main oscillator for timing ticks\n\t\t\t\t * initially starts at 120bpm\n\t\t\t\t * @private\n\t\t\t\t * @type {Tone.Clock}\n\t\t\t\t */\n\t this._clock = new Tone.Clock({\n\t 'callback': this._processTick.bind(this),\n\t 'frequency': 0\n\t });\n\t this._bindClockEvents();\n\t /**\n\t\t\t\t * The Beats Per Minute of the Transport.\n\t\t\t\t * @type {BPM}\n\t\t\t\t * @signal\n\t\t\t\t * @example\n\t\t\t\t * Tone.Transport.bpm.value = 80;\n\t\t\t\t * //ramp the bpm to 120 over 10 seconds\n\t\t\t\t * Tone.Transport.bpm.rampTo(120, 10);\n\t\t\t\t */\n\t this.bpm = this._clock.frequency;\n\t this.bpm._toUnits = this._toUnits.bind(this);\n\t this.bpm._fromUnits = this._fromUnits.bind(this);\n\t this.bpm.units = Tone.Type.BPM;\n\t this.bpm.value = TransportConstructor.defaults.bpm;\n\t this._readOnly('bpm');\n\t /**\n\t\t\t\t * The time signature, or more accurately the numerator\n\t\t\t\t * of the time signature over a denominator of 4.\n\t\t\t\t * @type {Number}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._timeSignature = TransportConstructor.defaults.timeSignature;\n\t ///////////////////////////////////////////////////////////////////////\n\t //\tTIMELINE EVENTS\n\t //////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t\t * All the events in an object to keep track by ID\n\t\t\t\t * @type {Object}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._scheduledEvents = {};\n\t /**\n\t\t\t\t * \tThe scheduled events.\n\t\t\t\t * @type {Tone.Timeline}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._timeline = new Tone.Timeline();\n\t /**\n\t\t\t\t * Repeated events\n\t\t\t\t * @type {Array}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._repeatedEvents = new Tone.IntervalTimeline();\n\t /**\n\t\t\t\t * All of the synced Signals\n\t\t\t\t * @private\n\t\t\t\t * @type {Array}\n\t\t\t\t */\n\t this._syncedSignals = [];\n\t ///////////////////////////////////////////////////////////////////////\n\t //\tSWING\n\t //////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t\t * The subdivision of the swing\n\t\t\t\t * @type {Ticks}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._swingTicks = TransportConstructor.defaults.PPQ / 2;\n\t //8n\n\t /**\n\t\t\t\t * The swing amount\n\t\t\t\t * @type {NormalRange}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._swingAmount = 0;\n\t }.bind(this));\n\t };\n\t Tone.extend(Tone.Transport, Tone.Emitter);\n\t /**\n\t\t * the defaults\n\t\t * @type {Object}\n\t\t * @const\n\t\t * @static\n\t\t */\n\t Tone.Transport.defaults = {\n\t 'bpm': 120,\n\t 'swing': 0,\n\t 'swingSubdivision': '8n',\n\t 'timeSignature': 4,\n\t 'loopStart': 0,\n\t 'loopEnd': '4m',\n\t 'PPQ': 192\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tTICKS\n\t ///////////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * called on every tick\n\t\t * @param {number} tickTime clock relative tick time\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype._processTick = function (tickTime) {\n\t var ticks = this._clock.ticks;\n\t //handle swing\n\t if (this._swingAmount > 0 && ticks % this._ppq !== 0 && //not on a downbeat\n\t ticks % (this._swingTicks * 2) !== 0) {\n\t //add some swing\n\t var progress = ticks % (this._swingTicks * 2) / (this._swingTicks * 2);\n\t var amount = Math.sin(progress * Math.PI) * this._swingAmount;\n\t tickTime += Tone.Ticks(this._swingTicks * 2 / 3).toSeconds() * amount;\n\t }\n\t //do the loop test\n\t if (this.loop) {\n\t if (ticks >= this._loopEnd) {\n\t this.emit('loopEnd', tickTime);\n\t this._clock.setTicksAtTime(this._loopStart, tickTime);\n\t ticks = this._loopStart;\n\t this.emit('loopStart', tickTime, this.seconds);\n\t this.emit('loop', tickTime);\n\t }\n\t }\n\t //invoke the timeline events scheduled on this tick\n\t this._timeline.forEachAtTime(ticks, function (event) {\n\t event.invoke(tickTime);\n\t });\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tSCHEDULABLE EVENTS\n\t ///////////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Schedule an event along the timeline.\n\t\t * @param {Function} callback The callback to be invoked at the time.\n\t\t * @param {TransportTime} time The time to invoke the callback at.\n\t\t * @return {Number} The id of the event which can be used for canceling the event.\n\t\t * @example\n\t\t * //trigger the callback when the Transport reaches the desired time\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \tenvelope.triggerAttack(time);\n\t\t * }, \"128i\");\n\t\t */\n\t Tone.Transport.prototype.schedule = function (callback, time) {\n\t var event = new Tone.TransportEvent(this, {\n\t 'time': Tone.TransportTime(time),\n\t 'callback': callback\n\t });\n\t return this._addEvent(event, this._timeline);\n\t };\n\t /**\n\t\t * Schedule a repeated event along the timeline. The event will fire\n\t\t * at the `interval` starting at the `startTime` and for the specified\n\t\t * `duration`.\n\t\t * @param {Function} callback The callback to invoke.\n\t\t * @param {Time} interval The duration between successive\n\t\t * callbacks. Must be a positive number.\n\t\t * @param {TransportTime=} startTime When along the timeline the events should\n\t\t * start being invoked.\n\t\t * @param {Time} [duration=Infinity] How long the event should repeat.\n\t\t * @return {Number} The ID of the scheduled event. Use this to cancel\n\t\t * the event.\n\t\t * @example\n\t\t * //a callback invoked every eighth note after the first measure\n\t\t * Tone.Transport.scheduleRepeat(callback, \"8n\", \"1m\");\n\t\t */\n\t Tone.Transport.prototype.scheduleRepeat = function (callback, interval, startTime, duration) {\n\t var event = new Tone.TransportRepeatEvent(this, {\n\t 'callback': callback,\n\t 'interval': Tone.Time(interval),\n\t 'time': Tone.TransportTime(startTime),\n\t 'duration': Tone.Time(Tone.defaultArg(duration, Infinity))\n\t });\n\t //kick it off if the Transport is started\n\t return this._addEvent(event, this._repeatedEvents);\n\t };\n\t /**\n\t\t * Schedule an event that will be removed after it is invoked.\n\t\t * Note that if the given time is less than the current transport time,\n\t\t * the event will be invoked immediately.\n\t\t * @param {Function} callback The callback to invoke once.\n\t\t * @param {TransportTime} time The time the callback should be invoked.\n\t\t * @returns {Number} The ID of the scheduled event.\n\t\t */\n\t Tone.Transport.prototype.scheduleOnce = function (callback, time) {\n\t var event = new Tone.TransportEvent(this, {\n\t 'time': Tone.TransportTime(time),\n\t 'callback': callback,\n\t 'once': true\n\t });\n\t return this._addEvent(event, this._timeline);\n\t };\n\t /**\n\t\t * Clear the passed in event id from the timeline\n\t\t * @param {Number} eventId The id of the event.\n\t\t * @returns {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.clear = function (eventId) {\n\t if (this._scheduledEvents.hasOwnProperty(eventId)) {\n\t var item = this._scheduledEvents[eventId.toString()];\n\t item.timeline.remove(item.event);\n\t item.event.dispose();\n\t delete this._scheduledEvents[eventId.toString()];\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Add an event to the correct timeline. Keep track of the\n\t\t * timeline it was added to.\n\t\t * @param {Tone.TransportEvent}\tevent\n\t\t * @param {Tone.Timeline} timeline\n\t\t * @returns {Number} the event id which was just added\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype._addEvent = function (event, timeline) {\n\t this._scheduledEvents[event.id.toString()] = {\n\t 'event': event,\n\t 'timeline': timeline\n\t };\n\t timeline.add(event);\n\t return event.id;\n\t };\n\t /**\n\t\t * Remove scheduled events from the timeline after\n\t\t * the given time. Repeated events will be removed\n\t\t * if their startTime is after the given time\n\t\t * @param {TransportTime} [after=0] Clear all events after\n\t\t * this time.\n\t\t * @returns {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.cancel = function (after) {\n\t after = Tone.defaultArg(after, 0);\n\t after = this.toTicks(after);\n\t this._timeline.cancel(after);\n\t this._repeatedEvents.cancel(after);\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tSTART/STOP/PAUSE\n\t ///////////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Bind start/stop/pause events from the clock and emit them.\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype._bindClockEvents = function () {\n\t this._clock.on('start', function (time, offset) {\n\t offset = Tone.Ticks(this._clock.ticks).toSeconds();\n\t this.emit('start', time, offset);\n\t }.bind(this));\n\t this._clock.on('stop', function (time) {\n\t this.emit('stop', time);\n\t }.bind(this));\n\t this._clock.on('pause', function (time) {\n\t this.emit('pause', time);\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Returns the playback state of the source, either \"started\", \"stopped\", or \"paused\"\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.Transport#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'state', {\n\t get: function () {\n\t return this._clock.getStateAtTime(this.now());\n\t }\n\t });\n\t /**\n\t\t * Start the transport and all sources synced to the transport.\n\t\t * @param {Time} [time=now] The time when the transport should start.\n\t\t * @param {TransportTime=} offset The timeline offset to start the transport.\n\t\t * @returns {Tone.Transport} this\n\t\t * @example\n\t\t * //start the transport in one second starting at beginning of the 5th measure.\n\t\t * Tone.Transport.start(\"+1\", \"4:0:0\");\n\t\t */\n\t Tone.Transport.prototype.start = function (time, offset) {\n\t //start the clock\n\t if (!Tone.isUndef(offset)) {\n\t offset = this.toTicks(offset);\n\t }\n\t this._clock.start(time, offset);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the transport and all sources synced to the transport.\n\t\t * @param {Time} [time=now] The time when the transport should stop.\n\t\t * @returns {Tone.Transport} this\n\t\t * @example\n\t\t * Tone.Transport.stop();\n\t\t */\n\t Tone.Transport.prototype.stop = function (time) {\n\t this._clock.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Pause the transport and all sources synced to the transport.\n\t\t * @param {Time} [time=now]\n\t\t * @returns {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.pause = function (time) {\n\t this._clock.pause(time);\n\t return this;\n\t };\n\t /**\n\t\t * Toggle the current state of the transport. If it is\n\t\t * started, it will stop it, otherwise it will start the Transport.\n\t\t * @param {Time=} time The time of the event\n\t\t * @return {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.toggle = function (time) {\n\t time = this.toSeconds(time);\n\t if (this._clock.getStateAtTime(time) !== Tone.State.Started) {\n\t this.start(time);\n\t } else {\n\t this.stop(time);\n\t }\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tSETTERS/GETTERS\n\t ///////////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * The time signature as just the numerator over 4.\n\t\t * For example 4/4 would be just 4 and 6/8 would be 3.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Number|Array}\n\t\t * @name timeSignature\n\t\t * @example\n\t\t * //common time\n\t\t * Tone.Transport.timeSignature = 4;\n\t\t * // 7/8\n\t\t * Tone.Transport.timeSignature = [7, 8];\n\t\t * //this will be reduced to a single number\n\t\t * Tone.Transport.timeSignature; //returns 3.5\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'timeSignature', {\n\t get: function () {\n\t return this._timeSignature;\n\t },\n\t set: function (timeSig) {\n\t if (Tone.isArray(timeSig)) {\n\t timeSig = timeSig[0] / timeSig[1] * 4;\n\t }\n\t this._timeSignature = timeSig;\n\t }\n\t });\n\t /**\n\t\t * When the Tone.Transport.loop = true, this is the starting position of the loop.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'loopStart', {\n\t get: function () {\n\t return Tone.Ticks(this._loopStart).toSeconds();\n\t },\n\t set: function (startPosition) {\n\t this._loopStart = this.toTicks(startPosition);\n\t }\n\t });\n\t /**\n\t\t * When the Tone.Transport.loop = true, this is the ending position of the loop.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'loopEnd', {\n\t get: function () {\n\t return Tone.Ticks(this._loopEnd).toSeconds();\n\t },\n\t set: function (endPosition) {\n\t this._loopEnd = this.toTicks(endPosition);\n\t }\n\t });\n\t /**\n\t\t * Set the loop start and stop at the same time.\n\t\t * @param {TransportTime} startPosition\n\t\t * @param {TransportTime} endPosition\n\t\t * @returns {Tone.Transport} this\n\t\t * @example\n\t\t * //loop over the first measure\n\t\t * Tone.Transport.setLoopPoints(0, \"1m\");\n\t\t * Tone.Transport.loop = true;\n\t\t */\n\t Tone.Transport.prototype.setLoopPoints = function (startPosition, endPosition) {\n\t this.loopStart = startPosition;\n\t this.loopEnd = endPosition;\n\t return this;\n\t };\n\t /**\n\t\t * The swing value. Between 0-1 where 1 equal to\n\t\t * the note + half the subdivision.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {NormalRange}\n\t\t * @name swing\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'swing', {\n\t get: function () {\n\t return this._swingAmount;\n\t },\n\t set: function (amount) {\n\t //scale the values to a normal range\n\t this._swingAmount = amount;\n\t }\n\t });\n\t /**\n\t\t * Set the subdivision which the swing will be applied to.\n\t\t * The default value is an 8th note. Value must be less\n\t\t * than a quarter note.\n\t\t *\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name swingSubdivision\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'swingSubdivision', {\n\t get: function () {\n\t return Tone.Ticks(this._swingTicks).toNotation();\n\t },\n\t set: function (subdivision) {\n\t this._swingTicks = this.toTicks(subdivision);\n\t }\n\t });\n\t /**\n\t\t * The Transport's position in Bars:Beats:Sixteenths.\n\t\t * Setting the value will jump to that position right away.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {BarsBeatsSixteenths}\n\t\t * @name position\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'position', {\n\t get: function () {\n\t var now = this.now();\n\t var ticks = this._clock.getTicksAtTime(now);\n\t return Tone.Ticks(ticks).toBarsBeatsSixteenths();\n\t },\n\t set: function (progress) {\n\t var ticks = this.toTicks(progress);\n\t this.ticks = ticks;\n\t }\n\t });\n\t /**\n\t\t * The Transport's position in seconds\n\t\t * Setting the value will jump to that position right away.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Seconds}\n\t\t * @name seconds\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'seconds', {\n\t get: function () {\n\t return this._clock.seconds;\n\t },\n\t set: function (s) {\n\t var now = this.now();\n\t var ticks = this.bpm.timeToTicks(s, now);\n\t this.ticks = ticks;\n\t }\n\t });\n\t /**\n\t\t * The Transport's loop position as a normalized value. Always\n\t\t * returns 0 if the transport if loop is not true.\n\t\t * @memberOf Tone.Transport#\n\t\t * @name progress\n\t\t * @type {NormalRange}\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'progress', {\n\t get: function () {\n\t if (this.loop) {\n\t var now = this.now();\n\t var ticks = this._clock.getTicksAtTime(now);\n\t return (ticks - this._loopStart) / (this._loopEnd - this._loopStart);\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The transports current tick position.\n\t\t *\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Ticks}\n\t\t * @name ticks\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'ticks', {\n\t get: function () {\n\t return this._clock.ticks;\n\t },\n\t set: function (t) {\n\t if (this._clock.ticks !== t) {\n\t var now = this.now();\n\t //stop everything synced to the transport\n\t if (this.state === Tone.State.Started) {\n\t this.emit('stop', now);\n\t this._clock.setTicksAtTime(t, now);\n\t //restart it with the new time\n\t this.emit('start', now, this.seconds);\n\t } else {\n\t this._clock.setTicksAtTime(t, now);\n\t }\n\t }\n\t }\n\t });\n\t /**\n\t\t * Pulses Per Quarter note. This is the smallest resolution\n\t\t * the Transport timing supports. This should be set once\n\t\t * on initialization and not set again. Changing this value\n\t\t * after other objects have been created can cause problems.\n\t\t *\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Number}\n\t\t * @name PPQ\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'PPQ', {\n\t get: function () {\n\t return this._ppq;\n\t },\n\t set: function (ppq) {\n\t var bpm = this.bpm.value;\n\t this._ppq = ppq;\n\t this.bpm.value = bpm;\n\t }\n\t });\n\t /**\n\t\t * Convert from BPM to frequency (factoring in PPQ)\n\t\t * @param {BPM} bpm The BPM value to convert to frequency\n\t\t * @return {Frequency} The BPM as a frequency with PPQ factored in.\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype._fromUnits = function (bpm) {\n\t return 1 / (60 / bpm / this.PPQ);\n\t };\n\t /**\n\t\t * Convert from frequency (with PPQ) into BPM\n\t\t * @param {Frequency} freq The clocks frequency to convert to BPM\n\t\t * @return {BPM} The frequency value as BPM.\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype._toUnits = function (freq) {\n\t return freq / this.PPQ * 60;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tSYNCING\n\t ///////////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Returns the time aligned to the next subdivision\n\t\t * of the Transport. If the Transport is not started,\n\t\t * it will return 0.\n\t\t * Note: this will not work precisely during tempo ramps.\n\t\t * @param {Time} subdivision The subdivision to quantize to\n\t\t * @return {Number} The context time of the next subdivision.\n\t\t * @example\n\t\t * Tone.Transport.start(); //the transport must be started\n\t\t * Tone.Transport.nextSubdivision(\"4n\");\n\t\t */\n\t Tone.Transport.prototype.nextSubdivision = function (subdivision) {\n\t subdivision = this.toSeconds(subdivision);\n\t //if the transport's not started, return 0\n\t var now;\n\t if (this.state === Tone.State.Started) {\n\t now = this._clock._nextTick;\n\t } else {\n\t return 0;\n\t }\n\t var transportPos = Tone.Time(this.ticks, 'i');\n\t var remainingTime = subdivision - transportPos % subdivision;\n\t if (remainingTime === 0) {\n\t remainingTime = subdivision;\n\t }\n\t return now + remainingTime;\n\t };\n\t /**\n\t\t * Attaches the signal to the tempo control signal so that\n\t\t * any changes in the tempo will change the signal in the same\n\t\t * ratio.\n\t\t *\n\t\t * @param {Tone.Signal} signal\n\t\t * @param {number=} ratio Optionally pass in the ratio between\n\t\t * the two signals. Otherwise it will be computed\n\t\t * based on their current values.\n\t\t * @returns {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.syncSignal = function (signal, ratio) {\n\t if (!ratio) {\n\t //get the sync ratio\n\t var now = this.now();\n\t if (signal.getValueAtTime(now) !== 0) {\n\t ratio = signal.getValueAtTime(now) / this.bpm.getValueAtTime(now);\n\t } else {\n\t ratio = 0;\n\t }\n\t }\n\t var ratioSignal = new Tone.Gain(ratio);\n\t this.bpm.chain(ratioSignal, signal._param);\n\t this._syncedSignals.push({\n\t 'ratio': ratioSignal,\n\t 'signal': signal,\n\t 'initial': signal.value\n\t });\n\t signal.value = 0;\n\t return this;\n\t };\n\t /**\n\t\t * Unsyncs a previously synced signal from the transport's control.\n\t\t * See Tone.Transport.syncSignal.\n\t\t * @param {Tone.Signal} signal\n\t\t * @returns {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.unsyncSignal = function (signal) {\n\t for (var i = this._syncedSignals.length - 1; i >= 0; i--) {\n\t var syncedSignal = this._syncedSignals[i];\n\t if (syncedSignal.signal === signal) {\n\t syncedSignal.ratio.dispose();\n\t syncedSignal.signal.value = syncedSignal.initial;\n\t this._syncedSignals.splice(i, 1);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Transport} this\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype.dispose = function () {\n\t Tone.Emitter.prototype.dispose.call(this);\n\t this._clock.dispose();\n\t this._clock = null;\n\t this._writable('bpm');\n\t this.bpm = null;\n\t this._timeline.dispose();\n\t this._timeline = null;\n\t this._repeatedEvents.dispose();\n\t this._repeatedEvents = null;\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tINITIALIZATION\n\t ///////////////////////////////////////////////////////////////////////////////\n\t var TransportConstructor = Tone.Transport;\n\t Tone.Transport = new TransportConstructor();\n\t Tone.Context.on('init', function (context) {\n\t if (context.Transport instanceof TransportConstructor) {\n\t Tone.Transport = context.Transport;\n\t } else {\n\t Tone.Transport = new TransportConstructor();\n\t }\n\t //store the Transport on the context so it can be retrieved later\n\t context.Transport = Tone.Transport;\n\t });\n\t Tone.Context.on('close', function (context) {\n\t if (context.Transport instanceof TransportConstructor) {\n\t context.Transport.dispose();\n\t }\n\t });\n\t return Tone.Transport;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Volume is a simple volume node, useful for creating a volume fader.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Decibels} [volume=0] the initial volume\n\t\t * @example\n\t\t * var vol = new Tone.Volume(-12);\n\t\t * instrument.chain(vol, Tone.Master);\n\t\t */\n\t Tone.Volume = function () {\n\t var options = Tone.defaults(arguments, ['volume'], Tone.Volume);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the output node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.output = this.input = new Tone.Gain(options.volume, Tone.Type.Decibels);\n\t /**\n\t\t\t * The unmuted volume\n\t\t\t * @type {Decibels}\n\t\t\t * @private\n\t\t\t */\n\t this._unmutedVolume = options.volume;\n\t /**\n\t\t\t * The volume control in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.volume = this.output.gain;\n\t this._readOnly('volume');\n\t //set the mute initially\n\t this.mute = options.mute;\n\t };\n\t Tone.extend(Tone.Volume, Tone.AudioNode);\n\t /**\n\t\t * Defaults\n\t\t * @type {Object}\n\t\t * @const\n\t\t * @static\n\t\t */\n\t Tone.Volume.defaults = {\n\t 'volume': 0,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Volume#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * volume.mute = true;\n\t\t */\n\t Object.defineProperty(Tone.Volume.prototype, 'mute', {\n\t get: function () {\n\t return this.volume.value === -Infinity;\n\t },\n\t set: function (mute) {\n\t if (!this.mute && mute) {\n\t this._unmutedVolume = this.volume.value;\n\t //maybe it should ramp here?\n\t this.volume.value = -Infinity;\n\t } else if (this.mute && !mute) {\n\t this.volume.value = this._unmutedVolume;\n\t }\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Volume} this\n\t\t */\n\t Tone.Volume.prototype.dispose = function () {\n\t this.input.dispose();\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable('volume');\n\t this.volume.dispose();\n\t this.volume = null;\n\t return this;\n\t };\n\t return Tone.Volume;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A single master output which is connected to the\n\t\t * AudioDestinationNode (aka your speakers).\n\t\t * It provides useful conveniences such as the ability\n\t\t * to set the volume and mute the entire application.\n\t\t * It also gives you the ability to apply master effects to your application.\n\t\t * <br><br>\n\t\t * Like Tone.Transport, A single Tone.Master is created\n\t\t * on initialization and you do not need to explicitly construct one.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone}\n\t\t * @singleton\n\t\t * @example\n\t\t * //the audio will go from the oscillator to the speakers\n\t\t * oscillator.connect(Tone.Master);\n\t\t * //a convenience for connecting to the master output is also provided:\n\t\t * oscillator.toMaster();\n\t\t * //the above two examples are equivalent.\n\t\t */\n\t Tone.Master = function () {\n\t Tone.AudioNode.call(this);\n\t Tone.getContext(function () {\n\t this.createInsOuts(1, 0);\n\t /**\n\t\t\t\t * The private volume node\n\t\t\t\t * @type {Tone.Volume}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._volume = this.output = new Tone.Volume();\n\t /**\n\t\t\t\t * The volume of the master output.\n\t\t\t\t * @type {Decibels}\n\t\t\t\t * @signal\n\t\t\t\t */\n\t this.volume = this._volume.volume;\n\t this._readOnly('volume');\n\t //connections\n\t this.input.chain(this.output, this.context.destination);\n\t }.bind(this));\n\t };\n\t Tone.extend(Tone.Master, Tone.AudioNode);\n\t /**\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Master.defaults = {\n\t 'volume': 0,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Master#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * Tone.Master.mute = true;\n\t\t */\n\t Object.defineProperty(Tone.Master.prototype, 'mute', {\n\t get: function () {\n\t return this._volume.mute;\n\t },\n\t set: function (mute) {\n\t this._volume.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * Add a master effects chain. NOTE: this will disconnect any nodes which were previously\n\t\t * chained in the master effects chain.\n\t\t * @param {AudioNode|Tone} args... All arguments will be connected in a row\n\t\t * and the Master will be routed through it.\n\t\t * @return {Tone.Master} this\n\t\t * @example\n\t\t * //some overall compression to keep the levels in check\n\t\t * var masterCompressor = new Tone.Compressor({\n\t\t * \t\"threshold\" : -6,\n\t\t * \t\"ratio\" : 3,\n\t\t * \t\"attack\" : 0.5,\n\t\t * \t\"release\" : 0.1\n\t\t * });\n\t\t * //give a little boost to the lows\n\t\t * var lowBump = new Tone.Filter(200, \"lowshelf\");\n\t\t * //route everything through the filter\n\t\t * //and compressor before going to the speakers\n\t\t * Tone.Master.chain(lowBump, masterCompressor);\n\t\t */\n\t Tone.Master.prototype.chain = function () {\n\t this.input.disconnect();\n\t this.input.chain.apply(this.input, arguments);\n\t arguments[arguments.length - 1].connect(this.output);\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Master} this\n\t\t */\n\t Tone.Master.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable('volume');\n\t this._volume.dispose();\n\t this._volume = null;\n\t this.volume = null;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tAUGMENT TONE's PROTOTYPE\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Connect 'this' to the master output. Shorthand for this.connect(Tone.Master)\n\t\t * @returns {Tone.AudioNode} this\n\t\t * @example\n\t\t * //connect an oscillator to the master output\n\t\t * var osc = new Tone.Oscillator().toMaster();\n\t\t */\n\t Tone.AudioNode.prototype.toMaster = function () {\n\t this.connect(Tone.Master);\n\t return this;\n\t };\n\t if (window.AudioNode) {\n\t // Also augment AudioNode's prototype to include toMaster as a convenience\n\t AudioNode.prototype.toMaster = function () {\n\t this.connect(Tone.Master);\n\t return this;\n\t };\n\t }\n\t /**\n\t\t * initialize the module and listen for new audio contexts\n\t\t */\n\t var MasterConstructor = Tone.Master;\n\t Tone.Master = new MasterConstructor();\n\t Tone.Context.on('init', function (context) {\n\t // if it already exists, just restore it\n\t if (context.Master instanceof MasterConstructor) {\n\t Tone.Master = context.Master;\n\t } else {\n\t Tone.Master = new MasterConstructor();\n\t }\n\t context.Master = Tone.Master;\n\t });\n\t Tone.Context.on('close', function (context) {\n\t if (context.Master instanceof MasterConstructor) {\n\t context.Master.dispose();\n\t }\n\t });\n\t return Tone.Master;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Base class for sources. Sources have start/stop methods\n\t\t * and the ability to be synced to the\n\t\t * start/stop of Tone.Transport.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @example\n\t\t * //Multiple state change events can be chained together,\n\t\t * //but must be set in the correct order and with ascending times\n\t\t *\n\t\t * // OK\n\t\t * state.start().stop(\"+0.2\");\n\t\t * // AND\n\t\t * state.start().stop(\"+0.2\").start(\"+0.4\").stop(\"+0.7\")\n\t\t *\n\t\t * // BAD\n\t\t * state.stop(\"+0.2\").start();\n\t\t * // OR\n\t\t * state.start(\"+0.3\").stop(\"+0.2\");\n\t\t *\n\t\t */\n\t Tone.Source = function (options) {\n\t options = Tone.defaultArg(options, Tone.Source.defaults);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The output volume node\n\t\t\t * @type {Tone.Volume}\n\t\t\t * @private\n\t\t\t */\n\t this._volume = this.output = new Tone.Volume(options.volume);\n\t /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t this.volume = this._volume.volume;\n\t this._readOnly('volume');\n\t /**\n\t\t\t * \tKeep track of the scheduled state.\n\t\t\t * @type {Tone.TimelineState}\n\t\t\t * @private\n\t\t\t */\n\t this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t this._state.memory = 100;\n\t /**\n\t\t\t * The synced `start` callback function from the transport\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._synced = false;\n\t /**\n\t\t\t * Keep track of all of the scheduled event ids\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._scheduled = [];\n\t //make the output explicitly stereo\n\t this._volume.output.output.channelCount = 2;\n\t this._volume.output.output.channelCountMode = 'explicit';\n\t //mute initially\n\t this.mute = options.mute;\n\t };\n\t Tone.extend(Tone.Source, Tone.AudioNode);\n\t /**\n\t\t * The default parameters\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Source.defaults = {\n\t 'volume': 0,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.Source#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.Source.prototype, 'state', {\n\t get: function () {\n\t if (this._synced) {\n\t if (Tone.Transport.state === Tone.State.Started) {\n\t return this._state.getValueAtTime(Tone.Transport.seconds);\n\t } else {\n\t return Tone.State.Stopped;\n\t }\n\t } else {\n\t return this._state.getValueAtTime(this.now());\n\t }\n\t }\n\t });\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * source.mute = true;\n\t\t */\n\t Object.defineProperty(Tone.Source.prototype, 'mute', {\n\t get: function () {\n\t return this._volume.mute;\n\t },\n\t set: function (mute) {\n\t this._volume.mute = mute;\n\t }\n\t });\n\t //overwrite these functions\n\t Tone.Source.prototype._start = Tone.noOp;\n\t Tone.Source.prototype.restart = Tone.noOp;\n\t Tone.Source.prototype._stop = Tone.noOp;\n\t /**\n\t\t * Start the source at the specified time. If no time is given,\n\t\t * start the source now.\n\t\t * @param {Time} [time=now] When the source should be started.\n\t\t * @returns {Tone.Source} this\n\t\t * @example\n\t\t * source.start(\"+0.5\"); //starts the source 0.5 seconds from now\n\t\t */\n\t Tone.Source.prototype.start = function (time, offset, duration) {\n\t if (Tone.isUndef(time) && this._synced) {\n\t time = Tone.Transport.seconds;\n\t } else {\n\t time = this.toSeconds(time);\n\t }\n\t //if it's started, stop it and restart it\n\t if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t this._state.cancel(time);\n\t this._state.setStateAtTime(Tone.State.Started, time);\n\t this.restart(time, offset, duration);\n\t } else {\n\t this._state.setStateAtTime(Tone.State.Started, time);\n\t if (this._synced) {\n\t // add the offset time to the event\n\t var event = this._state.get(time);\n\t event.offset = Tone.defaultArg(offset, 0);\n\t event.duration = duration;\n\t var sched = Tone.Transport.schedule(function (t) {\n\t this._start(t, offset, duration);\n\t }.bind(this), time);\n\t this._scheduled.push(sched);\n\t //if it's already started\n\t if (Tone.Transport.state === Tone.State.Started) {\n\t this._syncedStart(this.now(), Tone.Transport.seconds);\n\t }\n\t } else {\n\t this._start.apply(this, arguments);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop the source at the specified time. If no time is given,\n\t\t * stop the source now.\n\t\t * @param {Time} [time=now] When the source should be stopped.\n\t\t * @returns {Tone.Source} this\n\t\t * @example\n\t\t * source.stop(); // stops the source immediately\n\t\t */\n\t Tone.Source.prototype.stop = function (time) {\n\t if (Tone.isUndef(time) && this._synced) {\n\t time = Tone.Transport.seconds;\n\t } else {\n\t time = this.toSeconds(time);\n\t }\n\t if (!this._synced) {\n\t this._stop.apply(this, arguments);\n\t } else {\n\t var sched = Tone.Transport.schedule(this._stop.bind(this), time);\n\t this._scheduled.push(sched);\n\t }\n\t this._state.cancel(time);\n\t this._state.setStateAtTime(Tone.State.Stopped, time);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the source to the Transport so that all subsequent\n\t\t * calls to `start` and `stop` are synced to the TransportTime\n\t\t * instead of the AudioContext time.\n\t\t *\n\t\t * @returns {Tone.Source} this\n\t\t * @example\n\t\t * //sync the source so that it plays between 0 and 0.3 on the Transport's timeline\n\t\t * source.sync().start(0).stop(0.3);\n\t\t * //start the transport.\n\t\t * Tone.Transport.start();\n\t\t *\n\t\t * @example\n\t\t * //start the transport with an offset and the sync'ed sources\n\t\t * //will start in the correct position\n\t\t * source.sync().start(0.1);\n\t\t * //the source will be invoked with an offset of 0.4\n\t\t * Tone.Transport.start(\"+0.5\", 0.5);\n\t\t */\n\t Tone.Source.prototype.sync = function () {\n\t this._synced = true;\n\t this._syncedStart = function (time, offset) {\n\t if (offset > 0) {\n\t // get the playback state at that time\n\t var stateEvent = this._state.get(offset);\n\t // listen for start events which may occur in the middle of the sync'ed time\n\t if (stateEvent && stateEvent.state === Tone.State.Started && stateEvent.time !== offset) {\n\t // get the offset\n\t var startOffset = offset - this.toSeconds(stateEvent.time);\n\t var duration;\n\t if (stateEvent.duration) {\n\t duration = this.toSeconds(stateEvent.duration) - startOffset;\n\t }\n\t this._start(time, this.toSeconds(stateEvent.offset) + startOffset, duration);\n\t }\n\t }\n\t }.bind(this);\n\t this._syncedStop = function (time) {\n\t if (this._state.getValueAtTime(Tone.Transport.seconds) === Tone.State.Started) {\n\t this._stop(time);\n\t }\n\t }.bind(this);\n\t Tone.Transport.on('start loopStart', this._syncedStart);\n\t Tone.Transport.on('stop pause loopEnd', this._syncedStop);\n\t return this;\n\t };\n\t /**\n\t\t * Unsync the source to the Transport. See Tone.Source.sync\n\t\t * @returns {Tone.Source} this\n\t\t */\n\t Tone.Source.prototype.unsync = function () {\n\t if (this._synced) {\n\t Tone.Transport.off('stop pause loopEnd', this._syncedStop);\n\t Tone.Transport.off('start loopStart', this._syncedStart);\n\t }\n\t this._synced = false;\n\t // clear all of the scheduled ids\n\t for (var i = 0; i < this._scheduled.length; i++) {\n\t var id = this._scheduled[i];\n\t Tone.Transport.clear(id);\n\t }\n\t this._scheduled = [];\n\t this._state.cancel(0);\n\t return this;\n\t };\n\t /**\n\t\t *\tClean up.\n\t\t * @return {Tone.Source} this\n\t\t */\n\t Tone.Source.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.unsync();\n\t this._scheduled = null;\n\t this._writable('volume');\n\t this._volume.dispose();\n\t this._volume = null;\n\t this.volume = null;\n\t this._state.dispose();\n\t this._state = null;\n\t };\n\t return Tone.Source;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * AudioBuffer.copyTo/FromChannel polyfill\n\t\t * @private\n\t\t */\n\t if (Tone.supported) {\n\t if (!AudioBuffer.prototype.copyToChannel) {\n\t AudioBuffer.prototype.copyToChannel = function (src, chanNum, start) {\n\t var channel = this.getChannelData(chanNum);\n\t start = start || 0;\n\t for (var i = 0; i < channel.length; i++) {\n\t channel[i + start] = src[i];\n\t }\n\t };\n\t AudioBuffer.prototype.copyFromChannel = function (dest, chanNum, start) {\n\t var channel = this.getChannelData(chanNum);\n\t start = start || 0;\n\t for (var i = 0; i < dest.length; i++) {\n\t dest[i] = channel[i + start];\n\t }\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Buffer loading and storage. Tone.Buffer is used internally by all\n\t\t * classes that make requests for audio files such as Tone.Player,\n\t\t * Tone.Sampler and Tone.Convolver.\n\t\t *\n\t\t * Aside from load callbacks from individual buffers, Tone.Buffer\n\t\t * \t\tprovides events which keep track of the loading progress\n\t\t * \t\tof _all_ of the buffers. These are Tone.Buffer.on(\"load\" / \"progress\" / \"error\")\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone}\n\t\t * @param {AudioBuffer|String} url The url to load, or the audio buffer to set.\n\t\t * @param {Function=} onload A callback which is invoked after the buffer is loaded.\n\t\t * It's recommended to use `Tone.Buffer.on('load', callback)` instead\n\t\t * since it will give you a callback when _all_ buffers are loaded.\n\t\t * @param {Function=} onerror The callback to invoke if there is an error\n\t\t * @example\n\t\t * var buffer = new Tone.Buffer(\"path/to/sound.mp3\", function(){\n\t\t * \t//the buffer is now available.\n\t\t * \tvar buff = buffer.get();\n\t\t * });\n\t\t * @example\n\t\t * //can load provide fallback extension types if the first type is not supported.\n\t\t * var buffer = new Tone.Buffer(\"path/to/sound.[mp3|ogg|wav]\");\n\t\t */\n\t Tone.Buffer = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'url',\n\t 'onload',\n\t 'onerror'\n\t ], Tone.Buffer);\n\t Tone.call(this);\n\t /**\n\t\t\t * stores the loaded AudioBuffer\n\t\t\t * @type {AudioBuffer}\n\t\t\t * @private\n\t\t\t */\n\t this._buffer = null;\n\t /**\n\t\t\t * indicates if the buffer should be reversed or not\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t this._reversed = options.reverse;\n\t /**\n\t\t\t * The XHR\n\t\t\t * @type {XMLHttpRequest}\n\t\t\t * @private\n\t\t\t */\n\t this._xhr = null;\n\t /**\n\t\t\t * Private callback when the buffer is loaded.\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._onload = Tone.noOp;\n\t if (options.url instanceof AudioBuffer || options.url instanceof Tone.Buffer) {\n\t this.set(options.url);\n\t // invoke the onload callback\n\t if (options.onload) {\n\t if (this.loaded) {\n\t options.onload(this);\n\t } else {\n\t this._onload = options.onload;\n\t }\n\t }\n\t } else if (Tone.isString(options.url)) {\n\t this.load(options.url).then(options.onload).catch(options.onerror);\n\t }\n\t };\n\t Tone.extend(Tone.Buffer);\n\t /**\n\t\t * the default parameters\n\t\t * @type {Object}\n\t\t */\n\t Tone.Buffer.defaults = {\n\t 'url': undefined,\n\t 'reverse': false,\n\t 'onload': Tone.noOp,\n\t 'onerror': Tone.noOp\n\t };\n\t /**\n\t\t * Pass in an AudioBuffer or Tone.Buffer to set the value\n\t\t * of this buffer.\n\t\t * @param {AudioBuffer|Tone.Buffer} buffer the buffer\n\t\t * @returns {Tone.Buffer} this\n\t\t */\n\t Tone.Buffer.prototype.set = function (buffer) {\n\t if (buffer instanceof Tone.Buffer) {\n\t if (buffer.loaded) {\n\t this._buffer = buffer.get();\n\t } else {\n\t buffer._onload = function () {\n\t this.set(buffer);\n\t this._onload(this);\n\t }.bind(this);\n\t }\n\t } else {\n\t this._buffer = buffer;\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * @return {AudioBuffer} The audio buffer stored in the object.\n\t\t */\n\t Tone.Buffer.prototype.get = function () {\n\t return this._buffer;\n\t };\n\t /**\n\t\t * Makes an xhr reqest for the selected url then decodes\n\t\t * the file as an audio buffer. Invokes\n\t\t * the callback once the audio buffer loads.\n\t\t * @param {String} url The url of the buffer to load.\n\t\t * filetype support depends on the\n\t\t * browser.\n\t\t * @returns {Promise} returns a Promise which resolves with the Tone.Buffer\n\t\t */\n\t Tone.Buffer.prototype.load = function (url, onload, onerror) {\n\t var promise = new Promise(function (load, error) {\n\t this._xhr = Tone.Buffer.load(url, //success\n\t function (buff) {\n\t this._xhr = null;\n\t this.set(buff);\n\t load(this);\n\t this._onload(this);\n\t if (onload) {\n\t onload(this);\n\t }\n\t }.bind(this), //error\n\t function (err) {\n\t this._xhr = null;\n\t error(err);\n\t if (onerror) {\n\t onerror(err);\n\t }\n\t }.bind(this));\n\t }.bind(this));\n\t return promise;\n\t };\n\t /**\n\t\t * dispose and disconnect\n\t\t * @returns {Tone.Buffer} this\n\t\t */\n\t Tone.Buffer.prototype.dispose = function () {\n\t Tone.prototype.dispose.call(this);\n\t this._buffer = null;\n\t if (this._xhr) {\n\t Tone.Buffer._removeFromDownloadQueue(this._xhr);\n\t this._xhr.abort();\n\t this._xhr = null;\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * If the buffer is loaded or not\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Buffer.prototype, 'loaded', {\n\t get: function () {\n\t return this.length > 0;\n\t }\n\t });\n\t /**\n\t\t * The duration of the buffer.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name duration\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Buffer.prototype, 'duration', {\n\t get: function () {\n\t if (this._buffer) {\n\t return this._buffer.duration;\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The length of the buffer in samples\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Buffer.prototype, 'length', {\n\t get: function () {\n\t if (this._buffer) {\n\t return this._buffer.length;\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The number of discrete audio channels. Returns 0 if no buffer\n\t\t * is loaded.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name numberOfChannels\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Buffer.prototype, 'numberOfChannels', {\n\t get: function () {\n\t if (this._buffer) {\n\t return this._buffer.numberOfChannels;\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Set the audio buffer from the array. To create a multichannel AudioBuffer,\n\t\t * pass in a multidimensional array.\n\t\t * @param {Float32Array} array The array to fill the audio buffer\n\t\t * @return {Tone.Buffer} this\n\t\t */\n\t Tone.Buffer.prototype.fromArray = function (array) {\n\t var isMultidimensional = array[0].length > 0;\n\t var channels = isMultidimensional ? array.length : 1;\n\t var len = isMultidimensional ? array[0].length : array.length;\n\t var buffer = this.context.createBuffer(channels, len, this.context.sampleRate);\n\t if (!isMultidimensional && channels === 1) {\n\t array = [array];\n\t }\n\t for (var c = 0; c < channels; c++) {\n\t buffer.copyToChannel(array[c], c);\n\t }\n\t this._buffer = buffer;\n\t return this;\n\t };\n\t /**\n\t\t * \tSums muliple channels into 1 channel\n\t\t * @param {Number=} channel Optionally only copy a single channel from the array.\n\t\t * @return {Array}\n\t\t */\n\t Tone.Buffer.prototype.toMono = function (chanNum) {\n\t if (Tone.isNumber(chanNum)) {\n\t this.fromArray(this.toArray(chanNum));\n\t } else {\n\t var outputArray = new Float32Array(this.length);\n\t var numChannels = this.numberOfChannels;\n\t for (var channel = 0; channel < numChannels; channel++) {\n\t var channelArray = this.toArray(channel);\n\t for (var i = 0; i < channelArray.length; i++) {\n\t outputArray[i] += channelArray[i];\n\t }\n\t }\n\t //divide by the number of channels\n\t outputArray = outputArray.map(function (sample) {\n\t return sample / numChannels;\n\t });\n\t this.fromArray(outputArray);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * \tGet the buffer as an array. Single channel buffers will return a 1-dimensional\n\t\t * \tFloat32Array, and multichannel buffers will return multidimensional arrays.\n\t\t * @param {Number=} channel Optionally only copy a single channel from the array.\n\t\t * @return {Array}\n\t\t */\n\t Tone.Buffer.prototype.toArray = function (channel) {\n\t if (Tone.isNumber(channel)) {\n\t return this.getChannelData(channel);\n\t } else if (this.numberOfChannels === 1) {\n\t return this.toArray(0);\n\t } else {\n\t var ret = [];\n\t for (var c = 0; c < this.numberOfChannels; c++) {\n\t ret[c] = this.getChannelData(c);\n\t }\n\t return ret;\n\t }\n\t };\n\t /**\n\t\t * Returns the Float32Array representing the PCM audio data for the specific channel.\n\t\t * @param {Number} channel The channel number to return\n\t\t * @return {Float32Array} The audio as a TypedArray\n\t\t */\n\t Tone.Buffer.prototype.getChannelData = function (channel) {\n\t return this._buffer.getChannelData(channel);\n\t };\n\t /**\n\t\t * Cut a subsection of the array and return a buffer of the\n\t\t * subsection. Does not modify the original buffer\n\t\t * @param {Time} start The time to start the slice\n\t\t * @param {Time=} end The end time to slice. If none is given\n\t\t * will default to the end of the buffer\n\t\t * @return {Tone.Buffer} this\n\t\t */\n\t Tone.Buffer.prototype.slice = function (start, end) {\n\t end = Tone.defaultArg(end, this.duration);\n\t var startSamples = Math.floor(this.context.sampleRate * this.toSeconds(start));\n\t var endSamples = Math.floor(this.context.sampleRate * this.toSeconds(end));\n\t var replacement = [];\n\t for (var i = 0; i < this.numberOfChannels; i++) {\n\t replacement[i] = this.toArray(i).slice(startSamples, endSamples);\n\t }\n\t var retBuffer = new Tone.Buffer().fromArray(replacement);\n\t return retBuffer;\n\t };\n\t /**\n\t\t * Reverse the buffer.\n\t\t * @private\n\t\t * @return {Tone.Buffer} this\n\t\t */\n\t Tone.Buffer.prototype._reverse = function () {\n\t if (this.loaded) {\n\t for (var i = 0; i < this.numberOfChannels; i++) {\n\t Array.prototype.reverse.call(this.getChannelData(i));\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Reverse the buffer.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Boolean}\n\t\t * @name reverse\n\t\t */\n\t Object.defineProperty(Tone.Buffer.prototype, 'reverse', {\n\t get: function () {\n\t return this._reversed;\n\t },\n\t set: function (rev) {\n\t if (this._reversed !== rev) {\n\t this._reversed = rev;\n\t this._reverse();\n\t }\n\t }\n\t });\n\t ///////////////////////////////////////////////////////////////////////////\n\t // STATIC METHODS\n\t ///////////////////////////////////////////////////////////////////////////\n\t //statically inherits Emitter methods\n\t Tone.Emitter.mixin(Tone.Buffer);\n\t /**\n\t\t * the static queue for all of the xhr requests\n\t\t * @type {Array}\n\t\t * @private\n\t\t */\n\t Tone.Buffer._downloadQueue = [];\n\t /**\n\t\t * A path which is prefixed before every url.\n\t\t * @type {String}\n\t\t * @static\n\t\t */\n\t Tone.Buffer.baseUrl = '';\n\t /**\n\t\t * Create a Tone.Buffer from the array. To create a multichannel AudioBuffer,\n\t\t * pass in a multidimensional array.\n\t\t * @param {Float32Array} array The array to fill the audio buffer\n\t\t * @return {Tone.Buffer} A Tone.Buffer created from the array\n\t\t */\n\t Tone.Buffer.fromArray = function (array) {\n\t return new Tone.Buffer().fromArray(array);\n\t };\n\t /**\n\t\t * Creates a Tone.Buffer from a URL, returns a promise\n\t\t * which resolves to a Tone.Buffer\n\t\t * @param {String} url The url to load.\n\t\t * @return {Promise<Tone.Buffer>} A promise which resolves to a Tone.Buffer\n\t\t */\n\t Tone.Buffer.fromUrl = function (url) {\n\t var buffer = new Tone.Buffer();\n\t return buffer.load(url).then(function () {\n\t return buffer;\n\t });\n\t };\n\t /**\n\t\t * Remove an xhr request from the download queue\n\t\t * @private\n\t\t */\n\t Tone.Buffer._removeFromDownloadQueue = function (request) {\n\t var index = Tone.Buffer._downloadQueue.indexOf(request);\n\t if (index !== -1) {\n\t Tone.Buffer._downloadQueue.splice(index, 1);\n\t }\n\t };\n\t /**\n\t\t * Loads a url using XMLHttpRequest.\n\t\t * @param {String} url\n\t\t * @param {Function} onload\n\t\t * @param {Function} onerror\n\t\t * @param {Function} onprogress\n\t\t * @return {XMLHttpRequest}\n\t\t */\n\t Tone.Buffer.load = function (url, onload, onerror) {\n\t //default\n\t onload = Tone.defaultArg(onload, Tone.noOp);\n\t // test if the url contains multiple extensions\n\t var matches = url.match(/\\[(.+\\|?)+\\]$/);\n\t if (matches) {\n\t var extensions = matches[1].split('|');\n\t var extension = extensions[0];\n\t for (var i = 0; i < extensions.length; i++) {\n\t if (Tone.Buffer.supportsType(extensions[i])) {\n\t extension = extensions[i];\n\t break;\n\t }\n\t }\n\t url = url.replace(matches[0], extension);\n\t }\n\t function onError(e) {\n\t Tone.Buffer._removeFromDownloadQueue(request);\n\t Tone.Buffer.emit('error', e);\n\t if (onerror) {\n\t onerror(e);\n\t } else {\n\t throw e;\n\t }\n\t }\n\t function onProgress() {\n\t //calculate the progress\n\t var totalProgress = 0;\n\t for (var i = 0; i < Tone.Buffer._downloadQueue.length; i++) {\n\t totalProgress += Tone.Buffer._downloadQueue[i].progress;\n\t }\n\t Tone.Buffer.emit('progress', totalProgress / Tone.Buffer._downloadQueue.length);\n\t }\n\t var request = new XMLHttpRequest();\n\t request.open('GET', Tone.Buffer.baseUrl + url, true);\n\t request.responseType = 'arraybuffer';\n\t //start out as 0\n\t request.progress = 0;\n\t Tone.Buffer._downloadQueue.push(request);\n\t request.addEventListener('load', function () {\n\t if (request.status === 200) {\n\t Tone.context.decodeAudioData(request.response).then(function (buff) {\n\t request.progress = 1;\n\t onProgress();\n\t onload(buff);\n\t Tone.Buffer._removeFromDownloadQueue(request);\n\t if (Tone.Buffer._downloadQueue.length === 0) {\n\t //emit the event at the end\n\t Tone.Buffer.emit('load');\n\t }\n\t }).catch(function () {\n\t Tone.Buffer._removeFromDownloadQueue(request);\n\t onError('Tone.Buffer: could not decode audio data: ' + url);\n\t });\n\t } else {\n\t onError('Tone.Buffer: could not locate file: ' + url);\n\t }\n\t });\n\t request.addEventListener('error', onError);\n\t request.addEventListener('progress', function (event) {\n\t if (event.lengthComputable) {\n\t //only go to 95%, the last 5% is when the audio is decoded\n\t request.progress = event.loaded / event.total * 0.95;\n\t onProgress();\n\t }\n\t });\n\t request.send();\n\t return request;\n\t };\n\t /**\n\t\t * Stop all of the downloads in progress\n\t\t * @return {Tone.Buffer}\n\t\t * @static\n\t\t */\n\t Tone.Buffer.cancelDownloads = function () {\n\t Tone.Buffer._downloadQueue.slice().forEach(function (request) {\n\t Tone.Buffer._removeFromDownloadQueue(request);\n\t request.abort();\n\t });\n\t return Tone.Buffer;\n\t };\n\t /**\n\t\t * Checks a url's extension to see if the current browser can play that file type.\n\t\t * @param {String} url The url/extension to test\n\t\t * @return {Boolean} If the file extension can be played\n\t\t * @static\n\t\t * @example\n\t\t * Tone.Buffer.supportsType(\"wav\"); //returns true\n\t\t * Tone.Buffer.supportsType(\"path/to/file.wav\"); //returns true\n\t\t */\n\t Tone.Buffer.supportsType = function (url) {\n\t var extension = url.split('.');\n\t extension = extension[extension.length - 1];\n\t var response = document.createElement('audio').canPlayType('audio/' + extension);\n\t return response !== '';\n\t };\n\t /**\n\t\t * Returns a Promise which resolves when all of the buffers have loaded\n\t\t * @return {Promise}\n\t\t */\n\t Tone.loaded = function () {\n\t var onload, onerror;\n\t function removeEvents() {\n\t //remove the events when it's resolved\n\t Tone.Buffer.off('load', onload);\n\t Tone.Buffer.off('error', onerror);\n\t }\n\t return new Promise(function (success, fail) {\n\t onload = function () {\n\t success();\n\t };\n\t onerror = function () {\n\t fail();\n\t };\n\t //add the event listeners\n\t Tone.Buffer.on('load', onload);\n\t Tone.Buffer.on('error', onerror);\n\t }).then(removeEvents).catch(function (e) {\n\t removeEvents();\n\t throw new Error(e);\n\t });\n\t };\n\t return Tone.Buffer;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Wrapper around the native fire-and-forget OscillatorNode. Adds the\n\t\t * ability to reschedule the stop method.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {AudioBuffer|Tone.Buffer} buffer The buffer to play\n\t\t * @param {Function} onload The callback to invoke when the\n\t\t * buffer is done playing.\n\t\t */\n\t Tone.OscillatorNode = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type'\n\t ], Tone.OscillatorNode);\n\t Tone.AudioNode.call(this, options);\n\t /**\n\t\t\t * The callback to invoke after the\n\t\t\t * buffer source is done playing.\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.onended = options.onended;\n\t /**\n\t\t\t * The oscillator start time\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._startTime = -1;\n\t /**\n\t\t\t * The oscillator stop time\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._stopTime = -1;\n\t /**\n\t\t\t * The gain node which envelopes the OscillatorNode\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._gainNode = this.output = new Tone.Gain();\n\t this._gainNode.gain.setValueAtTime(0, this.context.currentTime);\n\t /**\n\t\t\t * The oscillator\n\t\t\t * @type {OscillatorNode}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillator = this.context.createOscillator();\n\t this._oscillator.connect(this._gainNode);\n\t this.type = options.type;\n\t /**\n\t\t\t * The frequency of the oscillator\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Param(this._oscillator.frequency, Tone.Type.Frequency);\n\t this.frequency.value = options.frequency;\n\t /**\n\t\t\t * The detune of the oscillator\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Param(this._oscillator.detune, Tone.Type.Cents);\n\t this.detune.value = options.detune;\n\t /**\n\t\t\t * The value that the buffer ramps to\n\t\t\t * @type {Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._gain = 1;\n\t };\n\t Tone.extend(Tone.OscillatorNode, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.OscillatorNode.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'type': 'sine',\n\t 'onended': Tone.noOp\n\t };\n\t /**\n\t\t * Returns the playback state of the oscillator, either \"started\" or \"stopped\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.OscillatorNode#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.OscillatorNode.prototype, 'state', {\n\t get: function () {\n\t return this.getStateAtTime(this.now());\n\t }\n\t });\n\t Tone.OscillatorNode.prototype.getStateAtTime = function (time) {\n\t if (this._startTime !== -1 && time >= this._startTime && (this._stopTime === -1 || time <= this._stopTime)) {\n\t return Tone.State.Started;\n\t } else {\n\t return Tone.State.Stopped;\n\t }\n\t };\n\t /**\n\t * Start the oscillator node at the given time\n\t * @param {Time=} time When to start the oscillator\n\t * @return {OscillatorNode} this\n\t */\n\t Tone.OscillatorNode.prototype.start = function (time) {\n\t if (this._startTime === -1) {\n\t this._startTime = this.toSeconds(time);\n\t this._oscillator.start(this._startTime);\n\t var now = this.context.currentTime;\n\t this._gainNode.gain.cancelScheduledValues(now);\n\t this._gainNode.gain.setValueAtTime(0, now);\n\t this._gainNode.gain.setValueAtTime(1, this._startTime);\n\t } else {\n\t throw new Error('cannot call OscillatorNode.start more than once');\n\t }\n\t return this;\n\t };\n\t /**\n\t * Sets an arbitrary custom periodic waveform given a PeriodicWave.\n\t * @param {PeriodicWave} periodicWave PeriodicWave should be created with context.createPeriodicWave\n\t * @return {OscillatorNode} this\n\t */\n\t Tone.OscillatorNode.prototype.setPeriodicWave = function (periodicWave) {\n\t this._oscillator.setPeriodicWave(periodicWave);\n\t return this;\n\t };\n\t /**\n\t * Stop the oscillator node at the given time\n\t * @param {Time=} time When to stop the oscillator\n\t * @return {OscillatorNode} this\n\t */\n\t Tone.OscillatorNode.prototype.stop = function (time) {\n\t //cancel the previous stop\n\t this.cancelStop();\n\t //reschedule it\n\t this._stopTime = this.toSeconds(time);\n\t this._gainNode.gain.setValueAtTime(0, this._stopTime);\n\t this.context.clearTimeout(this._timeout);\n\t this._timeout = this.context.setTimeout(function () {\n\t this._oscillator.stop(this.now());\n\t this.onended();\n\t }.bind(this), this._stopTime - this.now());\n\t return this;\n\t };\n\t Tone.OscillatorNode.prototype.cancelStop = function () {\n\t if (this._startTime !== -1) {\n\t //cancel the stop envelope\n\t this._gainNode.gain.cancelScheduledValues(this._startTime + this.sampleTime);\n\t this._gainNode.gain.setValueAtTime(1, Math.max(this.now(), this._startTime));\n\t this.context.clearTimeout(this._timeout);\n\t this._stopTime = -1;\n\t }\n\t };\n\t /**\n\t\t * The oscillator type. Either 'sine', 'sawtooth', 'square', or 'triangle'\n\t\t * @memberOf Tone.OscillatorNode#\n\t\t * @type {Time}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.OscillatorNode.prototype, 'type', {\n\t get: function () {\n\t return this._oscillator.type;\n\t },\n\t set: function (type) {\n\t this._oscillator.type = type;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.OscillatorNode} this\n\t\t */\n\t Tone.OscillatorNode.prototype.dispose = function () {\n\t this.context.clearTimeout(this._timeout);\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.onended = null;\n\t this._oscillator.disconnect();\n\t this._oscillator = null;\n\t this._gainNode.dispose();\n\t this._gainNode = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t return this;\n\t };\n\t return Tone.OscillatorNode;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Oscillator supports a number of features including\n\t\t * phase rotation, multiple oscillator types (see Tone.Oscillator.type),\n\t\t * and Transport syncing (see Tone.Oscillator.syncFrequency).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Source}\n\t\t * @param {Frequency} [frequency] Starting frequency\n\t\t * @param {string} [type] The oscillator type. Read more about type below.\n\t\t * @example\n\t\t * //make and start a 440hz sine tone\n\t\t * var osc = new Tone.Oscillator(440, \"sine\").toMaster().start();\n\t\t */\n\t Tone.Oscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type'\n\t ], Tone.Oscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * the main oscillator\n\t\t\t * @type {OscillatorNode}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillator = null;\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune control signal.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t /**\n\t\t\t * the periodic wave\n\t\t\t * @type {PeriodicWave}\n\t\t\t * @private\n\t\t\t */\n\t this._wave = null;\n\t /**\n\t\t\t * The partials of the oscillator\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._partials = Tone.defaultArg(options.partials, [1]);\n\t /**\n\t\t\t * the phase of the oscillator\n\t\t\t * between 0 - 360\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._phase = options.phase;\n\t /**\n\t\t\t * the type of the oscillator\n\t\t\t * @type {string}\n\t\t\t * @private\n\t\t\t */\n\t this._type = null;\n\t //setup\n\t this.type = options.type;\n\t this.phase = this._phase;\n\t this._readOnly([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.Oscillator, Tone.Source);\n\t /**\n\t\t * the default parameters\n\t\t * @type {Object}\n\t\t */\n\t Tone.Oscillator.defaults = {\n\t 'type': 'sine',\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'partials': []\n\t };\n\t /**\n\t\t * The Oscillator types\n\t\t * @enum {String}\n\t\t */\n\t Tone.Oscillator.Type = {\n\t Sine: 'sine',\n\t Triangle: 'triangle',\n\t Sawtooth: 'sawtooth',\n\t Square: 'square',\n\t Custom: 'custom'\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now]\n\t\t * @private\n\t\t */\n\t Tone.Oscillator.prototype._start = function (time) {\n\t //new oscillator with previous values\n\t this._oscillator = new Tone.OscillatorNode();\n\t if (this._wave) {\n\t this._oscillator.setPeriodicWave(this._wave);\n\t } else {\n\t this._oscillator.type = this._type;\n\t }\n\t //connect the control signal to the oscillator frequency & detune\n\t this._oscillator.connect(this.output);\n\t this.frequency.connect(this._oscillator.frequency);\n\t this.detune.connect(this._oscillator.detune);\n\t //start the oscillator\n\t time = this.toSeconds(time);\n\t Tone.isPast(time);\n\t this._oscillator.start(time);\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @private\n\t\t * @param {Time} [time=now] (optional) timing parameter\n\t\t * @returns {Tone.Oscillator} this\n\t\t */\n\t Tone.Oscillator.prototype._stop = function (time) {\n\t if (this._oscillator) {\n\t time = this.toSeconds(time);\n\t Tone.isPast(time);\n\t this._oscillator.stop(time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Restart the oscillator. Does not stop the oscillator, but instead\n\t\t * just cancels any scheduled 'stop' from being invoked.\n\t\t * @param {Time=} time\n\t\t * @return {Tone.Oscillator} this\n\t\t */\n\t Tone.Oscillator.prototype.restart = function (time) {\n\t this._oscillator.cancelStop();\n\t this._state.cancel(this.toSeconds(time));\n\t return this;\n\t };\n\t /**\n\t\t * Sync the signal to the Transport's bpm. Any changes to the transports bpm,\n\t\t * will also affect the oscillators frequency.\n\t\t * @returns {Tone.Oscillator} this\n\t\t * @example\n\t\t * Tone.Transport.bpm.value = 120;\n\t\t * osc.frequency.value = 440;\n\t\t * //the ration between the bpm and the frequency will be maintained\n\t\t * osc.syncFrequency();\n\t\t * Tone.Transport.bpm.value = 240;\n\t\t * // the frequency of the oscillator is doubled to 880\n\t\t */\n\t Tone.Oscillator.prototype.syncFrequency = function () {\n\t Tone.Transport.syncSignal(this.frequency);\n\t return this;\n\t };\n\t /**\n\t\t * Unsync the oscillator's frequency from the Transport.\n\t\t * See Tone.Oscillator.syncFrequency\n\t\t * @returns {Tone.Oscillator} this\n\t\t */\n\t Tone.Oscillator.prototype.unsyncFrequency = function () {\n\t Tone.Transport.unsyncSignal(this.frequency);\n\t return this;\n\t };\n\t /**\n\t\t * The type of the oscillator: either sine, square, triangle, or sawtooth. Also capable of\n\t\t * setting the first x number of partials of the oscillator. For example: \"sine4\" would\n\t\t * set be the first 4 partials of the sine wave and \"triangle8\" would set the first\n\t\t * 8 partials of the triangle wave.\n\t\t * <br><br>\n\t\t * Uses PeriodicWave internally even for native types so that it can set the phase.\n\t\t * PeriodicWave equations are from the\n\t\t * [Webkit Web Audio implementation](https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp&sq=package:chromium).\n\t\t *\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t * @example\n\t\t * //set it to a square wave\n\t\t * osc.type = \"square\";\n\t\t * @example\n\t\t * //set the first 6 partials of a sawtooth wave\n\t\t * osc.type = \"sawtooth6\";\n\t\t */\n\t Object.defineProperty(Tone.Oscillator.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t var isBasicType = [\n\t Tone.Oscillator.Type.Sine,\n\t Tone.Oscillator.Type.Square,\n\t Tone.Oscillator.Type.Triangle,\n\t Tone.Oscillator.Type.Sawtooth\n\t ].includes(type);\n\t if (this._phase === 0 && isBasicType) {\n\t this._wave = null;\n\t //just go with the basic approach\n\t if (this._oscillator !== null) {\n\t this._oscillator.type === type;\n\t }\n\t } else {\n\t var coefs = this._getRealImaginary(type, this._phase);\n\t var periodicWave = this.context.createPeriodicWave(coefs[0], coefs[1]);\n\t this._wave = periodicWave;\n\t if (this._oscillator !== null) {\n\t this._oscillator.setPeriodicWave(this._wave);\n\t }\n\t }\n\t this._type = type;\n\t }\n\t });\n\t /**\n\t\t * Returns the real and imaginary components based\n\t\t * on the oscillator type.\n\t\t * @returns {Array} [real, imaginary]\n\t\t * @private\n\t\t */\n\t Tone.Oscillator.prototype._getRealImaginary = function (type, phase) {\n\t var fftSize = 4096;\n\t var periodicWaveSize = fftSize / 2;\n\t var real = new Float32Array(periodicWaveSize);\n\t var imag = new Float32Array(periodicWaveSize);\n\t var partialCount = 1;\n\t if (type === Tone.Oscillator.Type.Custom) {\n\t partialCount = this._partials.length + 1;\n\t periodicWaveSize = partialCount;\n\t } else {\n\t var partial = /^(sine|triangle|square|sawtooth)(\\d+)$/.exec(type);\n\t if (partial) {\n\t partialCount = parseInt(partial[2]) + 1;\n\t type = partial[1];\n\t partialCount = Math.max(partialCount, 2);\n\t periodicWaveSize = partialCount;\n\t }\n\t }\n\t for (var n = 1; n < periodicWaveSize; ++n) {\n\t var piFactor = 2 / (n * Math.PI);\n\t var b;\n\t switch (type) {\n\t case Tone.Oscillator.Type.Sine:\n\t b = n <= partialCount ? 1 : 0;\n\t break;\n\t case Tone.Oscillator.Type.Square:\n\t b = n & 1 ? 2 * piFactor : 0;\n\t break;\n\t case Tone.Oscillator.Type.Sawtooth:\n\t b = piFactor * (n & 1 ? 1 : -1);\n\t break;\n\t case Tone.Oscillator.Type.Triangle:\n\t if (n & 1) {\n\t b = 2 * (piFactor * piFactor) * (n - 1 >> 1 & 1 ? -1 : 1);\n\t } else {\n\t b = 0;\n\t }\n\t break;\n\t case Tone.Oscillator.Type.Custom:\n\t b = this._partials[n - 1];\n\t break;\n\t default:\n\t throw new TypeError('Tone.Oscillator: invalid type: ' + type);\n\t }\n\t if (b !== 0) {\n\t real[n] = -b * Math.sin(phase * n);\n\t imag[n] = b * Math.cos(phase * n);\n\t } else {\n\t real[n] = 0;\n\t imag[n] = 0;\n\t }\n\t }\n\t return [\n\t real,\n\t imag\n\t ];\n\t };\n\t /**\n\t\t * Compute the inverse FFT for a given phase.\n\t\t * @param {Float32Array} real\n\t\t * @param {Float32Array} imag\n\t\t * @param {NormalRange} phase\n\t\t * @return {AudioRange}\n\t\t * @private\n\t\t */\n\t Tone.Oscillator.prototype._inverseFFT = function (real, imag, phase) {\n\t var sum = 0;\n\t var len = real.length;\n\t for (var i = 0; i < len; i++) {\n\t sum += real[i] * Math.cos(i * phase) + imag[i] * Math.sin(i * phase);\n\t }\n\t return sum;\n\t };\n\t /**\n\t\t * Returns the initial value of the oscillator.\n\t\t * @return {AudioRange}\n\t\t * @private\n\t\t */\n\t Tone.Oscillator.prototype._getInitialValue = function () {\n\t var coefs = this._getRealImaginary(this._type, 0);\n\t var real = coefs[0];\n\t var imag = coefs[1];\n\t var maxValue = 0;\n\t var twoPi = Math.PI * 2;\n\t //check for peaks in 8 places\n\t for (var i = 0; i < 8; i++) {\n\t maxValue = Math.max(this._inverseFFT(real, imag, i / 8 * twoPi), maxValue);\n\t }\n\t return -this._inverseFFT(real, imag, this._phase) / maxValue;\n\t };\n\t /**\n\t\t * The partials of the waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t Object.defineProperty(Tone.Oscillator.prototype, 'partials', {\n\t get: function () {\n\t if (this._type !== Tone.Oscillator.Type.Custom) {\n\t return [];\n\t } else {\n\t return this._partials;\n\t }\n\t },\n\t set: function (partials) {\n\t this._partials = partials;\n\t this.type = Tone.Oscillator.Type.Custom;\n\t }\n\t });\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t * @example\n\t\t * osc.phase = 180; //flips the phase of the oscillator\n\t\t */\n\t Object.defineProperty(Tone.Oscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._phase * (180 / Math.PI);\n\t },\n\t set: function (phase) {\n\t this._phase = phase * Math.PI / 180;\n\t //reset the type\n\t this.type = this._type;\n\t }\n\t });\n\t /**\n\t\t * Dispose and disconnect.\n\t\t * @return {Tone.Oscillator} this\n\t\t */\n\t Tone.Oscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t if (this._oscillator !== null) {\n\t this._oscillator.dispose();\n\t this._oscillator = null;\n\t }\n\t this._wave = null;\n\t this._writable([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t this._partials = null;\n\t return this;\n\t };\n\t return Tone.Oscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class AudioToGain converts an input in AudioRange [-1,1] to NormalRange [0,1]. \n\t\t * See Tone.GainToAudio.\n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @example\n\t\t * var a2g = new Tone.AudioToGain();\n\t\t */\n\t Tone.AudioToGain = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {\n\t return (x + 1) / 2;\n\t });\n\t };\n\t Tone.extend(Tone.AudioToGain, Tone.SignalBase);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.AudioToGain} this\n\t\t */\n\t Tone.AudioToGain.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._norm.dispose();\n\t this._norm = null;\n\t return this;\n\t };\n\t return Tone.AudioToGain;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Zero outputs 0's at audio-rate. The reason this has to be\n\t\t * it's own class is that many browsers optimize out Tone.Signal\n\t\t * with a value of 0 and will not process nodes further down the graph.\n\t\t * @extends {Tone.SignalBase}\n\t\t */\n\t Tone.Zero = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * The gain node\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._gain = this.input = this.output = new Tone.Gain();\n\t this.context.getConstant(0).connect(this._gain);\n\t };\n\t Tone.extend(Tone.Zero, Tone.SignalBase);\n\t /**\n\t\t * clean up\n\t\t * @return {Tone.Zero} this\n\t\t */\n\t Tone.Zero.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._gain.dispose();\n\t this._gain = null;\n\t return this;\n\t };\n\t return Tone.Zero;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class LFO stands for low frequency oscillator. Tone.LFO produces an output signal\n\t\t * which can be attached to an AudioParam or Tone.Signal\n\t\t * in order to modulate that parameter with an oscillator. The LFO can\n\t\t * also be synced to the transport to start/stop and change when the tempo changes.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Frequency|Object} [frequency] The frequency of the oscillation. Typically, LFOs will be\n\t\t * in the frequency range of 0.1 to 10 hertz.\n\t\t * @param {number=} min The minimum output value of the LFO.\n\t\t * @param {number=} max The maximum value of the LFO.\n\t\t * @example\n\t\t * var lfo = new Tone.LFO(\"4n\", 400, 4000);\n\t\t * lfo.connect(filter.frequency);\n\t\t */\n\t Tone.LFO = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'min',\n\t 'max'\n\t ], Tone.LFO);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The oscillator.\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillator = new Tone.Oscillator({\n\t 'frequency': options.frequency,\n\t 'type': options.type\n\t });\n\t /**\n\t\t\t * the lfo's frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._oscillator.frequency;\n\t /**\n\t\t\t * The amplitude of the LFO, which controls the output range between\n\t\t\t * the min and max output. For example if the min is -10 and the max\n\t\t\t * is 10, setting the amplitude to 0.5 would make the LFO modulate\n\t\t\t * between -5 and 5.\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t this.amplitude = this._oscillator.volume;\n\t this.amplitude.units = Tone.Type.NormalRange;\n\t this.amplitude.value = options.amplitude;\n\t /**\n\t\t\t * The signal which is output when the LFO is stopped\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t this._stoppedSignal = new Tone.Signal(0, Tone.Type.AudioRange);\n\t /**\n\t\t\t * Just outputs zeros.\n\t\t\t * @type {Tone.Zero}\n\t\t\t * @private\n\t\t\t */\n\t this._zeros = new Tone.Zero();\n\t /**\n\t\t\t * The value that the LFO outputs when it's stopped\n\t\t\t * @type {AudioRange}\n\t\t\t * @private\n\t\t\t */\n\t this._stoppedValue = 0;\n\t /**\n\t\t\t * @type {Tone.AudioToGain}\n\t\t\t * @private\n\t\t\t */\n\t this._a2g = new Tone.AudioToGain();\n\t /**\n\t\t\t * @type {Tone.Scale}\n\t\t\t * @private\n\t\t\t */\n\t this._scaler = this.output = new Tone.Scale(options.min, options.max);\n\t /**\n\t\t\t * the units of the LFO (used for converting)\n\t\t\t * @type {Tone.Type}\n\t\t\t * @private\n\t\t\t */\n\t this._units = Tone.Type.Default;\n\t this.units = options.units;\n\t //connect it up\n\t this._oscillator.chain(this._a2g, this._scaler);\n\t this._zeros.connect(this._a2g);\n\t this._stoppedSignal.connect(this._a2g);\n\t this._readOnly([\n\t 'amplitude',\n\t 'frequency'\n\t ]);\n\t this.phase = options.phase;\n\t };\n\t Tone.extend(Tone.LFO, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t *\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.LFO.defaults = {\n\t 'type': 'sine',\n\t 'min': 0,\n\t 'max': 1,\n\t 'phase': 0,\n\t 'frequency': '4n',\n\t 'amplitude': 1,\n\t 'units': Tone.Type.Default\n\t };\n\t /**\n\t\t * Start the LFO.\n\t\t * @param {Time} [time=now] the time the LFO will start\n\t\t * @returns {Tone.LFO} this\n\t\t */\n\t Tone.LFO.prototype.start = function (time) {\n\t time = this.toSeconds(time);\n\t this._stoppedSignal.setValueAtTime(0, time);\n\t this._oscillator.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the LFO.\n\t\t * @param {Time} [time=now] the time the LFO will stop\n\t\t * @returns {Tone.LFO} this\n\t\t */\n\t Tone.LFO.prototype.stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._stoppedSignal.setValueAtTime(this._stoppedValue, time);\n\t this._oscillator.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the start/stop/pause to the transport\n\t\t * and the frequency to the bpm of the transport\n\t\t * @returns {Tone.LFO} this\n\t\t * @example\n\t\t * lfo.frequency.value = \"8n\";\n\t\t * lfo.sync().start(0)\n\t\t * //the rate of the LFO will always be an eighth note,\n\t\t * //even as the tempo changes\n\t\t */\n\t Tone.LFO.prototype.sync = function () {\n\t this._oscillator.sync();\n\t this._oscillator.syncFrequency();\n\t return this;\n\t };\n\t /**\n\t\t * unsync the LFO from transport control\n\t\t * @returns {Tone.LFO} this\n\t\t */\n\t Tone.LFO.prototype.unsync = function () {\n\t this._oscillator.unsync();\n\t this._oscillator.unsyncFrequency();\n\t return this;\n\t };\n\t /**\n\t\t * The miniumum output of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'min', {\n\t get: function () {\n\t return this._toUnits(this._scaler.min);\n\t },\n\t set: function (min) {\n\t min = this._fromUnits(min);\n\t this._scaler.min = min;\n\t }\n\t });\n\t /**\n\t\t * The maximum output of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'max', {\n\t get: function () {\n\t return this._toUnits(this._scaler.max);\n\t },\n\t set: function (max) {\n\t max = this._fromUnits(max);\n\t this._scaler.max = max;\n\t }\n\t });\n\t /**\n\t\t * The type of the oscillator: sine, square, sawtooth, triangle.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'type', {\n\t get: function () {\n\t return this._oscillator.type;\n\t },\n\t set: function (type) {\n\t this._oscillator.type = type;\n\t this._stoppedValue = this._oscillator._getInitialValue();\n\t this._stoppedSignal.value = this._stoppedValue;\n\t }\n\t });\n\t /**\n\t\t * The phase of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'phase', {\n\t get: function () {\n\t return this._oscillator.phase;\n\t },\n\t set: function (phase) {\n\t this._oscillator.phase = phase;\n\t this._stoppedValue = this._oscillator._getInitialValue();\n\t this._stoppedSignal.value = this._stoppedValue;\n\t }\n\t });\n\t /**\n\t\t * The output units of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {Tone.Type}\n\t\t * @name units\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'units', {\n\t get: function () {\n\t return this._units;\n\t },\n\t set: function (val) {\n\t var currentMin = this.min;\n\t var currentMax = this.max;\n\t //convert the min and the max\n\t this._units = val;\n\t this.min = currentMin;\n\t this.max = currentMax;\n\t }\n\t });\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {Boolean}\n\t\t * @name mute\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'mute', {\n\t get: function () {\n\t return this._oscillator.mute;\n\t },\n\t set: function (mute) {\n\t this._oscillator.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.LFO#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'state', {\n\t get: function () {\n\t return this._oscillator.state;\n\t }\n\t });\n\t /**\n\t\t * Connect the output of the LFO to an AudioParam, AudioNode, or Tone Node.\n\t\t * Tone.LFO will automatically convert to the destination units of the\n\t\t * will get the units from the connected node.\n\t\t * @param {Tone | AudioParam | AudioNode} node\n\t\t * @param {number} [outputNum=0] optionally which output to connect from\n\t\t * @param {number} [inputNum=0] optionally which input to connect to\n\t\t * @returns {Tone.LFO} this\n\t\t * @private\n\t\t */\n\t Tone.LFO.prototype.connect = function (node) {\n\t if (node.constructor === Tone.Signal || node.constructor === Tone.Param) {\n\t this.convert = node.convert;\n\t this.units = node.units;\n\t }\n\t Tone.SignalBase.prototype.connect.apply(this, arguments);\n\t return this;\n\t };\n\t /**\n\t\t * private method borrowed from Param converts\n\t\t * units from their destination value\n\t\t * @function\n\t\t * @private\n\t\t */\n\t Tone.LFO.prototype._fromUnits = Tone.Param.prototype._fromUnits;\n\t /**\n\t\t * private method borrowed from Param converts\n\t\t * units to their destination value\n\t\t * @function\n\t\t * @private\n\t\t */\n\t Tone.LFO.prototype._toUnits = Tone.Param.prototype._toUnits;\n\t /**\n\t\t * disconnect and dispose\n\t\t * @returns {Tone.LFO} this\n\t\t */\n\t Tone.LFO.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'amplitude',\n\t 'frequency'\n\t ]);\n\t this._oscillator.dispose();\n\t this._oscillator = null;\n\t this._stoppedSignal.dispose();\n\t this._stoppedSignal = null;\n\t this._zeros.dispose();\n\t this._zeros = null;\n\t this._scaler.dispose();\n\t this._scaler = null;\n\t this._a2g.dispose();\n\t this._a2g = null;\n\t this.frequency = null;\n\t this.amplitude = null;\n\t return this;\n\t };\n\t return Tone.LFO;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Limiter will limit the loudness of an incoming signal.\n\t\t * It is composed of a Tone.Compressor with a fast attack\n\t\t * and release. Limiters are commonly used to safeguard against\n\t\t * signal clipping. Unlike a compressor, limiters do not provide\n\t\t * smooth gain reduction and almost completely prevent\n\t\t * additional gain above the threshold.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {number} threshold The theshold above which the limiting is applied.\n\t\t * @example\n\t\t * var limiter = new Tone.Limiter(-6);\n\t\t */\n\t Tone.Limiter = function () {\n\t var options = Tone.defaults(arguments, ['threshold'], Tone.Limiter);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the compressor\n\t\t\t * @private\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this._compressor = this.input = this.output = new Tone.Compressor({\n\t 'attack': 0.001,\n\t 'decay': 0.001,\n\t 'threshold': options.threshold\n\t });\n\t /**\n\t\t\t * The threshold of of the limiter\n\t\t\t * @type {Decibel}\n\t\t\t * @signal\n\t\t\t */\n\t this.threshold = this._compressor.threshold;\n\t this._readOnly('threshold');\n\t };\n\t Tone.extend(Tone.Limiter, Tone.AudioNode);\n\t /**\n\t\t * The default value\n\t\t * @type {Object}\n\t\t * @const\n\t\t * @static\n\t\t */\n\t Tone.Limiter.defaults = { 'threshold': -12 };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Limiter} this\n\t\t */\n\t Tone.Limiter.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._compressor.dispose();\n\t this._compressor = null;\n\t this._writable('threshold');\n\t this.threshold = null;\n\t return this;\n\t };\n\t return Tone.Limiter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Lowpass is a lowpass feedback comb filter. It is similar to\n\t\t * Tone.FeedbackCombFilter, but includes a lowpass filter.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Time|Object} [delayTime] The delay time of the comb filter\n\t\t * @param {NormalRange=} resonance The resonance (feedback) of the comb filter\n\t\t * @param {Frequency=} dampening The cutoff of the lowpass filter dampens the\n\t\t * signal as it is fedback.\n\t\t */\n\t Tone.LowpassCombFilter = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'delayTime',\n\t 'resonance',\n\t 'dampening'\n\t ], Tone.LowpassCombFilter);\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * the delay node\n\t\t\t * @type {DelayNode}\n\t\t\t * @private\n\t\t\t */\n\t this._delay = this.input = new Tone.Delay(options.delayTime);\n\t /**\n\t\t\t * The delayTime of the comb filter.\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = this._delay.delayTime;\n\t /**\n\t\t\t * the lowpass filter\n\t\t\t * @type {BiquadFilterNode}\n\t\t\t * @private\n\t\t\t */\n\t this._lowpass = this.output = this.context.createBiquadFilter();\n\t this._lowpass.Q.value = -3.0102999566398125;\n\t this._lowpass.type = 'lowpass';\n\t /**\n\t\t\t * The dampening control of the feedback\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.dampening = new Tone.Param({\n\t 'param': this._lowpass.frequency,\n\t 'units': Tone.Type.Frequency,\n\t 'value': options.dampening\n\t });\n\t /**\n\t\t\t * the feedback gain\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\t /**\n\t\t\t * The amount of feedback of the delayed signal.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.resonance = this._feedback.gain;\n\t //connections\n\t this._delay.chain(this._lowpass, this._feedback, this._delay);\n\t this._readOnly([\n\t 'dampening',\n\t 'resonance',\n\t 'delayTime'\n\t ]);\n\t };\n\t Tone.extend(Tone.LowpassCombFilter, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.LowpassCombFilter.defaults = {\n\t 'delayTime': 0.1,\n\t 'resonance': 0.5,\n\t 'dampening': 3000\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.LowpassCombFilter} this\n\t\t */\n\t Tone.LowpassCombFilter.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'dampening',\n\t 'resonance',\n\t 'delayTime'\n\t ]);\n\t this.dampening.dispose();\n\t this.dampening = null;\n\t this.resonance.dispose();\n\t this.resonance = null;\n\t this._delay.dispose();\n\t this._delay = null;\n\t this.delayTime = null;\n\t this._lowpass.disconnect();\n\t this._lowpass = null;\n\t this._feedback.disconnect();\n\t this._feedback = null;\n\t return this;\n\t };\n\t return Tone.LowpassCombFilter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Merge brings two signals into the left and right\n\t\t * channels of a single stereo channel.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @example\n\t\t * var merge = new Tone.Merge().toMaster();\n\t\t * //routing a sine tone in the left channel\n\t\t * //and noise in the right channel\n\t\t * var osc = new Tone.Oscillator().connect(merge.left);\n\t\t * var noise = new Tone.Noise().connect(merge.right);\n\t\t * //starting our oscillators\n\t\t * noise.start();\n\t\t * osc.start();\n\t\t */\n\t Tone.Merge = function () {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * The left input channel.\n\t\t\t * Alias for <code>input[0]</code>\n\t\t\t * @type {GainNode}\n\t\t\t */\n\t this.left = this.input[0] = new Tone.Gain();\n\t /**\n\t\t\t * The right input channel.\n\t\t\t * Alias for <code>input[1]</code>.\n\t\t\t * @type {GainNode}\n\t\t\t */\n\t this.right = this.input[1] = new Tone.Gain();\n\t /**\n\t\t\t * the merger node for the two channels\n\t\t\t * @type {ChannelMergerNode}\n\t\t\t * @private\n\t\t\t */\n\t this._merger = this.output = this.context.createChannelMerger(2);\n\t //connections\n\t this.left.connect(this._merger, 0, 0);\n\t this.right.connect(this._merger, 0, 1);\n\t this.left.channelCount = 1;\n\t this.right.channelCount = 1;\n\t this.left.channelCountMode = 'explicit';\n\t this.right.channelCountMode = 'explicit';\n\t };\n\t Tone.extend(Tone.Merge, Tone.AudioNode);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Merge} this\n\t\t */\n\t Tone.Merge.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.left.dispose();\n\t this.left = null;\n\t this.right.dispose();\n\t this.right = null;\n\t this._merger.disconnect();\n\t this._merger = null;\n\t return this;\n\t };\n\t return Tone.Merge;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Meter gets the [RMS](https://en.wikipedia.org/wiki/Root_mean_square)\n\t\t * of an input signal with some averaging applied. It can also get the raw\n\t\t * value of the input signal.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Number} smoothing The amount of smoothing applied between frames.\n\t\t * @example\n\t\t * var meter = new Tone.Meter();\n\t\t * var mic = new Tone.UserMedia().open();\n\t\t * //connect mic to the meter\n\t\t * mic.connect(meter);\n\t\t * //the current level of the mic input in decibels\n\t\t * var level = meter.getValue();\n\t\t */\n\t Tone.Meter = function () {\n\t var options = Tone.defaults(arguments, ['smoothing'], Tone.Meter);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The analyser node which computes the levels.\n\t\t\t * @private\n\t\t\t * @type {Tone.Analyser}\n\t\t\t */\n\t this.input = this.output = this._analyser = new Tone.Analyser('waveform', 1024);\n\t /**\n\t\t\t * The amount of carryover between the current and last frame.\n\t\t\t * Only applied meter for \"level\" type.\n\t\t\t * @type {Number}\n\t\t\t */\n\t this.smoothing = options.smoothing;\n\t };\n\t Tone.extend(Tone.Meter, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @static\n\t\t * @const\n\t\t */\n\t Tone.Meter.defaults = { 'smoothing': 0.8 };\n\t /**\n\t\t * Get the current decibel value of the incoming signal\n\t\t * @returns {Decibels}\n\t\t */\n\t Tone.Meter.prototype.getLevel = function () {\n\t this._analyser.type = 'fft';\n\t var values = this._analyser.getValue();\n\t var offset = 28;\n\t // normalizes most signal levels\n\t // TODO: compute loudness from FFT\n\t return Math.max.apply(this, values) + offset;\n\t };\n\t /**\n\t\t * Get the signal value of the incoming signal\n\t\t * @returns {Number}\n\t\t */\n\t Tone.Meter.prototype.getValue = function () {\n\t this._analyser.type = 'waveform';\n\t var value = this._analyser.getValue();\n\t return value[0];\n\t };\n\t /**\n\t\t * A value from 0 -> 1 where 0 represents no time averaging with the last analysis frame.\n\t\t * @memberOf Tone.Meter#\n\t\t * @type {Number}\n\t\t * @name smoothing\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Meter.prototype, 'smoothing', {\n\t get: function () {\n\t return this._analyser.smoothing;\n\t },\n\t set: function (val) {\n\t this._analyser.smoothing = val;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Meter} this\n\t\t */\n\t Tone.Meter.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._analyser.dispose();\n\t this._analyser = null;\n\t return this;\n\t };\n\t return Tone.Meter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t *\t@class Tone.Split splits an incoming signal into left and right channels.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @example\n\t\t * var split = new Tone.Split();\n\t\t * stereoSignal.connect(split);\n\t\t */\n\t Tone.Split = function () {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(0, 2);\n\t /**\n\t\t\t * @type {ChannelSplitterNode}\n\t\t\t * @private\n\t\t\t */\n\t this._splitter = this.input = this.context.createChannelSplitter(2);\n\t this._splitter.channelCount = 2;\n\t this._splitter.channelCountMode = 'explicit';\n\t /**\n\t\t\t * Left channel output.\n\t\t\t * Alias for <code>output[0]</code>\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.left = this.output[0] = new Tone.Gain();\n\t /**\n\t\t\t * Right channel output.\n\t\t\t * Alias for <code>output[1]</code>\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.right = this.output[1] = new Tone.Gain();\n\t //connections\n\t this._splitter.connect(this.left, 0, 0);\n\t this._splitter.connect(this.right, 1, 0);\n\t };\n\t Tone.extend(Tone.Split, Tone.AudioNode);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Split} this\n\t\t */\n\t Tone.Split.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._splitter.disconnect();\n\t this.left.dispose();\n\t this.left = null;\n\t this.right.dispose();\n\t this.right = null;\n\t this._splitter = null;\n\t return this;\n\t };\n\t return Tone.Split;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Mid/Side processing separates the the 'mid' signal\n\t\t * (which comes out of both the left and the right channel)\n\t\t * and the 'side' (which only comes out of the the side channels). <br><br>\n\t\t * <code>\n\t\t * Mid = (Left+Right)/sqrt(2); // obtain mid-signal from left and right<br>\n\t\t * Side = (Left-Right)/sqrt(2); // obtain side-signal from left and righ<br>\n\t\t * </code>\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t */\n\t Tone.MidSideSplit = function () {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(0, 2);\n\t /**\n\t\t\t * split the incoming signal into left and right channels\n\t\t\t * @type {Tone.Split}\n\t\t\t * @private\n\t\t\t */\n\t this._split = this.input = new Tone.Split();\n\t /**\n\t\t\t * The mid send. Connect to mid processing. Alias for\n\t\t\t * <code>output[0]</code>\n\t\t\t * @type {Tone.Add}\n\t\t\t */\n\t this._midAdd = new Tone.Add();\n\t /**\n\t\t\t * Multiply the _midAdd by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t this.mid = this.output[0] = new Tone.Multiply(Math.SQRT1_2);\n\t /**\n\t\t\t * The side output. Connect to side processing. Also Output 1\n\t\t\t * @type {Tone.Subtract}\n\t\t\t */\n\t this._sideSubtract = new Tone.Subtract();\n\t /**\n\t\t\t * Multiply the _midAdd by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t this.side = this.output[1] = new Tone.Multiply(Math.SQRT1_2);\n\t this._split.connect(this._midAdd, 0, 0);\n\t this._split.connect(this._midAdd, 1, 1);\n\t this._split.connect(this._sideSubtract, 0, 0);\n\t this._split.connect(this._sideSubtract, 1, 1);\n\t this._midAdd.connect(this.mid);\n\t this._sideSubtract.connect(this.side);\n\t };\n\t Tone.extend(Tone.MidSideSplit, Tone.AudioNode);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.MidSideSplit} this\n\t\t */\n\t Tone.MidSideSplit.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.mid.dispose();\n\t this.mid = null;\n\t this.side.dispose();\n\t this.side = null;\n\t this._midAdd.dispose();\n\t this._midAdd = null;\n\t this._sideSubtract.dispose();\n\t this._sideSubtract = null;\n\t this._split.dispose();\n\t this._split = null;\n\t return this;\n\t };\n\t return Tone.MidSideSplit;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Mid/Side processing separates the the 'mid' signal\n\t\t * (which comes out of both the left and the right channel)\n\t\t * and the 'side' (which only comes out of the the side channels).\n\t\t * MidSideMerge merges the mid and side signal after they've been seperated\n\t\t * by Tone.MidSideSplit.<br><br>\n\t\t * <code>\n\t\t * Left = (Mid+Side)/sqrt(2); // obtain left signal from mid and side<br>\n\t\t * Right = (Mid-Side)/sqrt(2); // obtain right signal from mid and side<br>\n\t\t * </code>\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t */\n\t Tone.MidSideMerge = function () {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * The mid signal input. Alias for\n\t\t\t * <code>input[0]</code>\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.mid = this.input[0] = new Tone.Gain();\n\t /**\n\t\t\t * recombine the mid/side into Left\n\t\t\t * @type {Tone.Add}\n\t\t\t * @private\n\t\t\t */\n\t this._left = new Tone.Add();\n\t /**\n\t\t\t * Multiply the left by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t this._timesTwoLeft = new Tone.Multiply(Math.SQRT1_2);\n\t /**\n\t\t\t * The side signal input. Alias for\n\t\t\t * <code>input[1]</code>\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.side = this.input[1] = new Tone.Gain();\n\t /**\n\t\t\t * recombine the mid/side into Right\n\t\t\t * @type {Tone.Subtract}\n\t\t\t * @private\n\t\t\t */\n\t this._right = new Tone.Subtract();\n\t /**\n\t\t\t * Multiply the right by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t this._timesTwoRight = new Tone.Multiply(Math.SQRT1_2);\n\t /**\n\t\t\t * Merge the left/right signal back into a stereo signal.\n\t\t\t * @type {Tone.Merge}\n\t\t\t * @private\n\t\t\t */\n\t this._merge = this.output = new Tone.Merge();\n\t this.mid.connect(this._left, 0, 0);\n\t this.side.connect(this._left, 0, 1);\n\t this.mid.connect(this._right, 0, 0);\n\t this.side.connect(this._right, 0, 1);\n\t this._left.connect(this._timesTwoLeft);\n\t this._right.connect(this._timesTwoRight);\n\t this._timesTwoLeft.connect(this._merge, 0, 0);\n\t this._timesTwoRight.connect(this._merge, 0, 1);\n\t };\n\t Tone.extend(Tone.MidSideMerge, Tone.AudioNode);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.MidSideMerge} this\n\t\t */\n\t Tone.MidSideMerge.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.mid.dispose();\n\t this.mid = null;\n\t this.side.dispose();\n\t this.side = null;\n\t this._left.dispose();\n\t this._left = null;\n\t this._timesTwoLeft.dispose();\n\t this._timesTwoLeft = null;\n\t this._right.dispose();\n\t this._right = null;\n\t this._timesTwoRight.dispose();\n\t this._timesTwoRight = null;\n\t this._merge.dispose();\n\t this._merge = null;\n\t return this;\n\t };\n\t return Tone.MidSideMerge;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.MidSideCompressor applies two different compressors to the mid\n\t\t * and side signal components. See Tone.MidSideSplit.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Object} options The options that are passed to the mid and side\n\t\t * compressors.\n\t\t * @constructor\n\t\t */\n\t Tone.MidSideCompressor = function (options) {\n\t Tone.AudioNode.call(this);\n\t options = Tone.defaultArg(options, Tone.MidSideCompressor.defaults);\n\t /**\n\t\t\t * the mid/side split\n\t\t\t * @type {Tone.MidSideSplit}\n\t\t\t * @private\n\t\t\t */\n\t this._midSideSplit = this.input = new Tone.MidSideSplit();\n\t /**\n\t\t\t * the mid/side recombination\n\t\t\t * @type {Tone.MidSideMerge}\n\t\t\t * @private\n\t\t\t */\n\t this._midSideMerge = this.output = new Tone.MidSideMerge();\n\t /**\n\t\t\t * The compressor applied to the mid signal\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this.mid = new Tone.Compressor(options.mid);\n\t /**\n\t\t\t * The compressor applied to the side signal\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this.side = new Tone.Compressor(options.side);\n\t this._midSideSplit.mid.chain(this.mid, this._midSideMerge.mid);\n\t this._midSideSplit.side.chain(this.side, this._midSideMerge.side);\n\t this._readOnly([\n\t 'mid',\n\t 'side'\n\t ]);\n\t };\n\t Tone.extend(Tone.MidSideCompressor, Tone.AudioNode);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.MidSideCompressor.defaults = {\n\t 'mid': {\n\t 'ratio': 3,\n\t 'threshold': -24,\n\t 'release': 0.03,\n\t 'attack': 0.02,\n\t 'knee': 16\n\t },\n\t 'side': {\n\t 'ratio': 6,\n\t 'threshold': -30,\n\t 'release': 0.25,\n\t 'attack': 0.03,\n\t 'knee': 10\n\t }\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.MidSideCompressor} this\n\t\t */\n\t Tone.MidSideCompressor.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'mid',\n\t 'side'\n\t ]);\n\t this.mid.dispose();\n\t this.mid = null;\n\t this.side.dispose();\n\t this.side = null;\n\t this._midSideSplit.dispose();\n\t this._midSideSplit = null;\n\t this._midSideMerge.dispose();\n\t this._midSideMerge = null;\n\t return this;\n\t };\n\t return Tone.MidSideCompressor;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Mono coerces the incoming mono or stereo signal into a mono signal\n\t\t * where both left and right channels have the same value. This can be useful\n\t\t * for [stereo imaging](https://en.wikipedia.org/wiki/Stereo_imaging).\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t */\n\t Tone.Mono = function () {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 0);\n\t /**\n\t\t\t * merge the signal\n\t\t\t * @type {Tone.Merge}\n\t\t\t * @private\n\t\t\t */\n\t this._merge = this.output = new Tone.Merge();\n\t this.input.connect(this._merge, 0, 0);\n\t this.input.connect(this._merge, 0, 1);\n\t };\n\t Tone.extend(Tone.Mono, Tone.AudioNode);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Mono} this\n\t\t */\n\t Tone.Mono.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._merge.dispose();\n\t this._merge = null;\n\t return this;\n\t };\n\t return Tone.Mono;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A compressor with seperate controls over low/mid/high dynamics\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Object} options The low/mid/high compressor settings.\n\t\t * @example\n\t\t * var multiband = new Tone.MultibandCompressor({\n\t\t * \t\"lowFrequency\" : 200,\n\t\t * \t\"highFrequency\" : 1300\n\t\t * \t\"low\" : {\n\t\t * \t\t\"threshold\" : -12\n\t\t * \t}\n\t\t * })\n\t\t */\n\t Tone.MultibandCompressor = function (options) {\n\t Tone.AudioNode.call(this);\n\t options = Tone.defaultArg(arguments, Tone.MultibandCompressor.defaults);\n\t /**\n\t\t\t * split the incoming signal into high/mid/low\n\t\t\t * @type {Tone.MultibandSplit}\n\t\t\t * @private\n\t\t\t */\n\t this._splitter = this.input = new Tone.MultibandSplit({\n\t 'lowFrequency': options.lowFrequency,\n\t 'highFrequency': options.highFrequency\n\t });\n\t /**\n\t\t\t * low/mid crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.lowFrequency = this._splitter.lowFrequency;\n\t /**\n\t\t\t * mid/high crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.highFrequency = this._splitter.highFrequency;\n\t /**\n\t\t\t * the output\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this.output = new Tone.Gain();\n\t /**\n\t\t\t * The compressor applied to the low frequencies.\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this.low = new Tone.Compressor(options.low);\n\t /**\n\t\t\t * The compressor applied to the mid frequencies.\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this.mid = new Tone.Compressor(options.mid);\n\t /**\n\t\t\t * The compressor applied to the high frequencies.\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this.high = new Tone.Compressor(options.high);\n\t //connect the compressor\n\t this._splitter.low.chain(this.low, this.output);\n\t this._splitter.mid.chain(this.mid, this.output);\n\t this._splitter.high.chain(this.high, this.output);\n\t this._readOnly([\n\t 'high',\n\t 'mid',\n\t 'low',\n\t 'highFrequency',\n\t 'lowFrequency'\n\t ]);\n\t };\n\t Tone.extend(Tone.MultibandCompressor, Tone.AudioNode);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.MultibandCompressor.defaults = {\n\t 'low': Tone.Compressor.defaults,\n\t 'mid': Tone.Compressor.defaults,\n\t 'high': Tone.Compressor.defaults,\n\t 'lowFrequency': 250,\n\t 'highFrequency': 2000\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.MultibandCompressor} this\n\t\t */\n\t Tone.MultibandCompressor.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._splitter.dispose();\n\t this._writable([\n\t 'high',\n\t 'mid',\n\t 'low',\n\t 'highFrequency',\n\t 'lowFrequency'\n\t ]);\n\t this.low.dispose();\n\t this.mid.dispose();\n\t this.high.dispose();\n\t this._splitter = null;\n\t this.low = null;\n\t this.mid = null;\n\t this.high = null;\n\t this.lowFrequency = null;\n\t this.highFrequency = null;\n\t return this;\n\t };\n\t return Tone.MultibandCompressor;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported && !window.StereoPannerNode) {\n\t /**\n\t\t\t * @class Shimmed StereoPannerNode\n\t\t\t * @param {AudioContext} context\n\t\t\t * @private\n\t\t\t */\n\t var StereoPannerNode = function (context) {\n\t /**\n\t\t\t\t * The audio context\n\t\t\t\t * @type {AudioContext}\n\t\t\t\t */\n\t this.context = context;\n\t /**\n\t\t\t\t * The left/right panning. [-1, 1]\n\t\t\t\t * @type {AudioRange}\n\t\t\t\t * @signal\n\t\t\t\t */\n\t this.pan = new Tone.Signal(0, Tone.Type.AudioRange);\n\t /**\n\t\t\t\t * Equal power scaling of the right gain\n\t\t\t\t * @type {Tone.WaveShaper}\n\t\t\t\t */\n\t var rightWaveShaper = new Tone.WaveShaper(function (val) {\n\t return Tone.equalPowerScale((val + 1) / 2);\n\t }, 4096);\n\t /**\n\t\t\t\t * Equal power scaling of the left gain\n\t\t\t\t * @type {Tone.WaveShaper}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var leftWaveShaper = new Tone.WaveShaper(function (val) {\n\t return Tone.equalPowerScale(1 - (val + 1) / 2);\n\t }, 4096);\n\t /**\n\t\t\t\t * The left gain value\n\t\t\t\t * @type {Tone.Gain}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var leftGain = new Tone.Gain();\n\t /**\n\t\t\t\t * The right gain value\n\t\t\t\t * @type {Tone.Gain}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var rightGain = new Tone.Gain();\n\t /**\n\t\t\t\t * Split the incoming signal\n\t\t\t\t * @type {Tone.Split}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var split = this.input = new Tone.Split();\n\t /**\n\t\t\t\t * Keeps the waveshapers from optimizing 0s\n\t\t\t\t * @type {Tone.Zero}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var zero = new Tone.Zero();\n\t zero.fan(rightWaveShaper, leftWaveShaper);\n\t /**\n\t\t\t\t * Merge the outgoing signal\n\t\t\t\t * @type {Tone.Merge}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var merge = this.output = new Tone.Merge();\n\t //connections\n\t split.left.chain(leftGain, merge.left);\n\t split.right.chain(rightGain, merge.right);\n\t this.pan.chain(leftWaveShaper, leftGain.gain);\n\t this.pan.chain(rightWaveShaper, rightGain.gain);\n\t };\n\t StereoPannerNode.prototype.disconnect = function () {\n\t this.output.disconnect.apply(this.output, arguments);\n\t };\n\t StereoPannerNode.prototype.connect = function () {\n\t this.output.connect.apply(this.output, arguments);\n\t };\n\t //add it to the AudioContext\n\t AudioContext.prototype.createStereoPanner = function () {\n\t return new StereoPannerNode(this);\n\t };\n\t Tone.Context.prototype.createStereoPanner = function () {\n\t return new StereoPannerNode(this);\n\t };\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Panner is an equal power Left/Right Panner and does not\n\t\t * support 3D. Panner uses the StereoPannerNode when available.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {NormalRange} [initialPan=0] The initail panner value (center).\n\t\t * @example\n\t\t * //pan the input signal hard right.\n\t\t * var panner = new Tone.Panner(1);\n\t\t */\n\t Tone.Panner = function (initialPan) {\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t* the panner node\n\t\t\t* @type {StereoPannerNode}\n\t\t\t* @private\n\t\t\t*/\n\t this._panner = this.input = this.output = this.context.createStereoPanner();\n\t /**\n\t\t\t* The pan control. -1 = hard left, 1 = hard right.\n\t\t\t* @type {AudioRange}\n\t\t\t* @signal\n\t\t\t*/\n\t this.pan = this._panner.pan;\n\t //initial value\n\t this.pan.value = Tone.defaultArg(initialPan, 0);\n\t this._readOnly('pan');\n\t };\n\t Tone.extend(Tone.Panner, Tone.AudioNode);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Panner} this\n\t\t */\n\t Tone.Panner.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable('pan');\n\t this._panner.disconnect();\n\t this._panner = null;\n\t this.pan = null;\n\t return this;\n\t };\n\t return Tone.Panner;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A spatialized panner node which supports equalpower or HRTF panning.\n\t\t * Tries to normalize the API across various browsers. See Tone.Listener\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Number} positionX The initial x position.\n\t\t * @param {Number} positionY The initial y position.\n\t\t * @param {Number} positionZ The initial z position.\n\t\t */\n\t Tone.Panner3D = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'positionX',\n\t 'positionY',\n\t 'positionZ'\n\t ], Tone.Panner3D);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The panner node\n\t\t\t * @type {PannerNode}\n\t\t\t * @private\n\t\t\t */\n\t this._panner = this.input = this.output = this.context.createPanner();\n\t //set some values\n\t this._panner.panningModel = options.panningModel;\n\t this._panner.maxDistance = options.maxDistance;\n\t this._panner.distanceModel = options.distanceModel;\n\t this._panner.coneOuterGain = options.coneOuterGain;\n\t this._panner.coneOuterAngle = options.coneOuterAngle;\n\t this._panner.coneInnerAngle = options.coneInnerAngle;\n\t this._panner.refDistance = options.refDistance;\n\t this._panner.rolloffFactor = options.rolloffFactor;\n\t /**\n\t\t\t * Holds the current orientation\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._orientation = [\n\t options.orientationX,\n\t options.orientationY,\n\t options.orientationZ\n\t ];\n\t /**\n\t\t\t * Holds the current position\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._position = [\n\t options.positionX,\n\t options.positionY,\n\t options.positionZ\n\t ];\n\t // set the default position/orientation\n\t this.orientationX = options.orientationX;\n\t this.orientationY = options.orientationY;\n\t this.orientationZ = options.orientationZ;\n\t this.positionX = options.positionX;\n\t this.positionY = options.positionY;\n\t this.positionZ = options.positionZ;\n\t };\n\t Tone.extend(Tone.Panner3D, Tone.AudioNode);\n\t /**\n\t\t * Defaults according to the specification\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Panner3D.defaults = {\n\t 'positionX': 0,\n\t 'positionY': 0,\n\t 'positionZ': 0,\n\t 'orientationX': 0,\n\t 'orientationY': 0,\n\t 'orientationZ': 0,\n\t 'panningModel': 'equalpower',\n\t 'maxDistance': 10000,\n\t 'distanceModel': 'inverse',\n\t 'coneOuterGain': 0,\n\t 'coneOuterAngle': 360,\n\t 'coneInnerAngle': 360,\n\t 'refDistance': 1,\n\t 'rolloffFactor': 1\n\t };\n\t /**\n\t\t * The ramp time which is applied to the setTargetAtTime\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.Panner3D.prototype._rampTimeConstant = 0.01;\n\t /**\n\t\t * Sets the position of the source in 3d space.\n\t\t * @param {Number} x\n\t\t * @param {Number} y\n\t\t * @param {Number} z\n\t\t * @return {Tone.Panner3D} this\n\t\t */\n\t Tone.Panner3D.prototype.setPosition = function (x, y, z) {\n\t if (this._panner.positionX) {\n\t var now = this.now();\n\t this._panner.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t this._panner.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t this._panner.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t } else {\n\t this._panner.setPosition(x, y, z);\n\t }\n\t this._position = Array.prototype.slice.call(arguments);\n\t return this;\n\t };\n\t /**\n\t\t * Sets the orientation of the source in 3d space.\n\t\t * @param {Number} x\n\t\t * @param {Number} y\n\t\t * @param {Number} z\n\t\t * @return {Tone.Panner3D} this\n\t\t */\n\t Tone.Panner3D.prototype.setOrientation = function (x, y, z) {\n\t if (this._panner.orientationX) {\n\t var now = this.now();\n\t this._panner.orientationX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t this._panner.orientationY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t this._panner.orientationZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t } else {\n\t this._panner.setOrientation(x, y, z);\n\t }\n\t this._orientation = Array.prototype.slice.call(arguments);\n\t return this;\n\t };\n\t /**\n\t\t * The x position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name positionX\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'positionX', {\n\t set: function (pos) {\n\t this._position[0] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[0];\n\t }\n\t });\n\t /**\n\t\t * The y position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name positionY\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'positionY', {\n\t set: function (pos) {\n\t this._position[1] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[1];\n\t }\n\t });\n\t /**\n\t\t * The z position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name positionZ\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'positionZ', {\n\t set: function (pos) {\n\t this._position[2] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[2];\n\t }\n\t });\n\t /**\n\t\t * The x orientation of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name orientationX\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'orientationX', {\n\t set: function (pos) {\n\t this._orientation[0] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[0];\n\t }\n\t });\n\t /**\n\t\t * The y orientation of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name orientationY\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'orientationY', {\n\t set: function (pos) {\n\t this._orientation[1] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[1];\n\t }\n\t });\n\t /**\n\t\t * The z orientation of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name orientationZ\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'orientationZ', {\n\t set: function (pos) {\n\t this._orientation[2] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[2];\n\t }\n\t });\n\t /**\n\t\t * Proxy a property on the panner to an exposed public propery\n\t\t * @param {String} prop\n\t\t * @private\n\t\t */\n\t Tone.Panner3D._aliasProperty = function (prop) {\n\t Object.defineProperty(Tone.Panner3D.prototype, prop, {\n\t set: function (val) {\n\t this._panner[prop] = val;\n\t },\n\t get: function () {\n\t return this._panner[prop];\n\t }\n\t });\n\t };\n\t /**\n\t\t * The panning model. Either \"equalpower\" or \"HRTF\".\n\t\t * @type {String}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name panningModel\n\t\t */\n\t Tone.Panner3D._aliasProperty('panningModel');\n\t /**\n\t\t * A reference distance for reducing volume as source move further from the listener\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name refDistance\n\t\t */\n\t Tone.Panner3D._aliasProperty('refDistance');\n\t /**\n\t\t * Describes how quickly the volume is reduced as source moves away from listener.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name rolloffFactor\n\t\t */\n\t Tone.Panner3D._aliasProperty('rolloffFactor');\n\t /**\n\t\t * The distance model used by, \"linear\", \"inverse\", or \"exponential\".\n\t\t * @type {String}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name distanceModel\n\t\t */\n\t Tone.Panner3D._aliasProperty('distanceModel');\n\t /**\n\t\t * The angle, in degrees, inside of which there will be no volume reduction\n\t\t * @type {Degrees}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name coneInnerAngle\n\t\t */\n\t Tone.Panner3D._aliasProperty('coneInnerAngle');\n\t /**\n\t\t * The angle, in degrees, outside of which the volume will be reduced\n\t\t * to a constant value of coneOuterGain\n\t\t * @type {Degrees}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name coneOuterAngle\n\t\t */\n\t Tone.Panner3D._aliasProperty('coneOuterAngle');\n\t /**\n\t\t * The gain outside of the coneOuterAngle\n\t\t * @type {Gain}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name coneOuterGain\n\t\t */\n\t Tone.Panner3D._aliasProperty('coneOuterGain');\n\t /**\n\t\t * The maximum distance between source and listener,\n\t\t * after which the volume will not be reduced any further.\n\t\t * @type {Positive}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name maxDistance\n\t\t */\n\t Tone.Panner3D._aliasProperty('maxDistance');\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Panner3D} this\n\t\t */\n\t Tone.Panner3D.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._panner.disconnect();\n\t this._panner = null;\n\t this._orientation = null;\n\t this._position = null;\n\t return this;\n\t };\n\t return Tone.Panner3D;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PanVol is a Tone.Panner and Tone.Volume in one.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {AudioRange} pan the initial pan\n\t\t * @param {number} volume The output volume.\n\t\t * @example\n\t\t * //pan the incoming signal left and drop the volume\n\t\t * var panVol = new Tone.PanVol(-0.25, -12);\n\t\t */\n\t Tone.PanVol = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'pan',\n\t 'volume'\n\t ], Tone.PanVol);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The panning node\n\t\t\t * @type {Tone.Panner}\n\t\t\t * @private\n\t\t\t */\n\t this._panner = this.input = new Tone.Panner(options.pan);\n\t /**\n\t\t\t * The L/R panning control.\n\t\t\t * @type {AudioRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.pan = this._panner.pan;\n\t /**\n\t\t\t * The volume node\n\t\t\t * @type {Tone.Volume}\n\t\t\t * @private\n\t\t\t */\n\t this._volume = this.output = new Tone.Volume(options.volume);\n\t /**\n\t\t\t * The volume control in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.volume = this._volume.volume;\n\t //connections\n\t this._panner.connect(this._volume);\n\t this.mute = options.mute;\n\t this._readOnly([\n\t 'pan',\n\t 'volume'\n\t ]);\n\t };\n\t Tone.extend(Tone.PanVol, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @const\n\t\t * @static\n\t\t */\n\t Tone.PanVol.defaults = {\n\t 'pan': 0,\n\t 'volume': 0,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Mute/unmute the volume\n\t\t * @memberOf Tone.PanVol#\n\t\t * @name mute\n\t\t * @type {Boolean}\n\t\t */\n\t Object.defineProperty(Tone.PanVol.prototype, 'mute', {\n\t get: function () {\n\t return this._volume.mute;\n\t },\n\t set: function (mute) {\n\t this._volume.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.PanVol} this\n\t\t */\n\t Tone.PanVol.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'pan',\n\t 'volume'\n\t ]);\n\t this._panner.dispose();\n\t this._panner = null;\n\t this.pan = null;\n\t this._volume.dispose();\n\t this._volume = null;\n\t this.volume = null;\n\t return this;\n\t };\n\t return Tone.PanVol;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Solo lets you isolate a specific audio stream. When\n\t\t * an instance is set to `solo=true`, it will mute all other instances.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @example\n\t\t * var soloA = new Tone.Solo()\n\t\t * var soloB = new Tone.Solo()\n\t\t * soloA.solo = true\n\t\t * //no audio will pass through soloB\n\t\t */\n\t Tone.Solo = function () {\n\t var options = Tone.defaults(arguments, ['solo'], Tone.Solo);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The input and output node\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.input = this.output = new Tone.Gain();\n\t /**\n\t\t\t * A bound _soloed method\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._soloBind = this._soloed.bind(this);\n\t //listen for solo events class-wide.\n\t this.context.on('solo', this._soloBind);\n\t //set initially\n\t this.solo = options.solo;\n\t };\n\t Tone.extend(Tone.Solo, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @static\n\t\t */\n\t Tone.Solo.defaults = { solo: false };\n\t /**\n\t\t * Isolates this instance and mutes all other instances of Tone.Solo.\n\t\t * Only one instance can be soloed at a time. A soloed\n\t\t * instance will report `solo=false` when another instance is soloed.\n\t\t * @memberOf Tone.Solo#\n\t\t * @type {Boolean}\n\t\t * @name solo\n\t\t */\n\t Object.defineProperty(Tone.Solo.prototype, 'solo', {\n\t get: function () {\n\t return this._isSoloed();\n\t },\n\t set: function (solo) {\n\t if (solo) {\n\t this._addSolo();\n\t } else {\n\t this._removeSolo();\n\t }\n\t this.context.emit('solo', this);\n\t }\n\t });\n\t /**\n\t\t * If the current instance is muted, i.e. another instance is soloed\n\t\t * @memberOf Tone.Solo#\n\t\t * @type {Boolean}\n\t\t * @name muted\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Solo.prototype, 'muted', {\n\t get: function () {\n\t return this.input.gain.value === 0;\n\t }\n\t });\n\t /**\n\t\t * Add this to the soloed array\n\t\t * @private\n\t\t */\n\t Tone.Solo.prototype._addSolo = function () {\n\t if (!Tone.isArray(this.context._currentSolo)) {\n\t this.context._currentSolo = [];\n\t }\n\t if (!this._isSoloed()) {\n\t this.context._currentSolo.push(this);\n\t }\n\t };\n\t /**\n\t\t * Remove this from the soloed array\n\t\t * @private\n\t\t */\n\t Tone.Solo.prototype._removeSolo = function () {\n\t if (this._isSoloed()) {\n\t var index = this.context._currentSolo.indexOf(this);\n\t this.context._currentSolo.splice(index, 1);\n\t }\n\t };\n\t /**\n\t\t * @return {Boolean} Is this on the soloed array\n\t\t * @private\n\t\t */\n\t Tone.Solo.prototype._isSoloed = function () {\n\t if (Tone.isArray(this.context._currentSolo)) {\n\t return this.context._currentSolo.length !== 0 && this.context._currentSolo.indexOf(this) !== -1;\n\t } else {\n\t return false;\n\t }\n\t };\n\t /**\n\t\t * @return {Boolean} Returns true if no one is soloed\n\t\t * @private\n\t\t */\n\t Tone.Solo.prototype._noSolos = function () {\n\t return !Tone.isArray(this.context._currentSolo) || this.context._currentSolo.length === 0;\n\t };\n\t /**\n\t\t * Solo the current instance and unsolo all other instances.\n\t\t * @param {Tone.Solo} instance The instance which is being soloed/unsoloed.\n\t\t * @private\n\t\t */\n\t Tone.Solo.prototype._soloed = function () {\n\t if (this._isSoloed()) {\n\t this.input.gain.value = 1;\n\t } else if (this._noSolos()) {\n\t //no one is soloed\n\t this.input.gain.value = 1;\n\t } else {\n\t this.input.gain.value = 0;\n\t }\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Solo} this\n\t\t */\n\t Tone.Solo.prototype.dispose = function () {\n\t this.context.off('solo', this._soloBind);\n\t this._removeSolo();\n\t this._soloBind = null;\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t return this;\n\t };\n\t return Tone.Solo;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Get the current waveform data of the connected audio source.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Number=} size The size of the FFT. Value must be a power of\n\t\t * two in the range 32 to 32768.\n\t\t */\n\t Tone.Waveform = function () {\n\t var options = Tone.defaults(arguments, ['size'], Tone.Waveform);\n\t options.type = Tone.Analyser.Type.Waveform;\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The analyser node.\n\t\t\t * @private\n\t\t\t * @type {Tone.Analyser}\n\t\t\t */\n\t this._analyser = this.input = this.output = new Tone.Analyser(options);\n\t };\n\t Tone.extend(Tone.Waveform, Tone.AudioNode);\n\t /**\n\t\t * The default values.\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Waveform.defaults = { 'size': 1024 };\n\t /**\n\t\t * Gets the waveform of the audio source. Returns the waveform data\n\t\t * of length [size](#size) as a Float32Array with values between -1 and 1.\n\t\t * @returns {TypedArray}\n\t\t */\n\t Tone.Waveform.prototype.getValue = function () {\n\t return this._analyser.getValue();\n\t };\n\t /**\n\t\t * The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t * @memberOf Tone.Waveform#\n\t\t * @type {Number}\n\t\t * @name size\n\t\t */\n\t Object.defineProperty(Tone.Waveform.prototype, 'size', {\n\t get: function () {\n\t return this._analyser.size;\n\t },\n\t set: function (size) {\n\t this._analyser.size = size;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Waveform} this\n\t\t */\n\t Tone.Waveform.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._analyser.dispose();\n\t this._analyser = null;\n\t };\n\t return Tone.Waveform;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.CtrlInterpolate will interpolate between given values based\n\t\t * on the \"index\" property. Passing in an array or object literal\n\t\t * will interpolate each of the parameters. Note (i.e. \"C3\")\n\t\t * and Time (i.e. \"4n + 2\") can be interpolated. All other values are\n\t\t * assumed to be numbers. \n\t\t * @example\n\t\t * var interp = new Tone.CtrlInterpolate([0, 2, 9, 4]);\n\t\t * interp.index = 0.75;\n\t\t * interp.value; //returns 1.5\n\t\t *\n\t\t * @example\n\t\t * var interp = new Tone.CtrlInterpolate([\n\t\t * \t[2, 4, 5],\n\t\t * \t[9, 3, 2],\n\t\t * ]);\n\t\t * @param {Array} values The array of values to interpolate over\n\t\t * @param {Positive} index The initial interpolation index.\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.CtrlInterpolate = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'values',\n\t 'index'\n\t ], Tone.CtrlInterpolate);\n\t Tone.call(this);\n\t /**\n\t\t\t * The values to interpolate between\n\t\t\t * @type {Array}\n\t\t\t */\n\t this.values = options.values;\n\t /**\n\t\t\t * The interpolated index between values. For example: a value of 1.5\n\t\t\t * would interpolate equally between the value at index 1\n\t\t\t * and the value at index 2. \n\t\t\t * @example\n\t\t\t * interp.index = 0; \n\t\t\t * interp.value; //returns the value at 0\n\t\t\t * interp.index = 0.5;\n\t\t\t * interp.value; //returns the value between indices 0 and 1. \n\t\t\t * @type {Positive}\n\t\t\t */\n\t this.index = options.index;\n\t };\n\t Tone.extend(Tone.CtrlInterpolate);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.CtrlInterpolate.defaults = {\n\t 'index': 0,\n\t 'values': []\n\t };\n\t /**\n\t\t * The current interpolated value based on the index\n\t\t * @readOnly\n\t\t * @memberOf Tone.CtrlInterpolate#\n\t\t * @type {*}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.CtrlInterpolate.prototype, 'value', {\n\t get: function () {\n\t var index = this.index;\n\t index = Math.min(index, this.values.length - 1);\n\t var lowerPosition = Math.floor(index);\n\t var lower = this.values[lowerPosition];\n\t var upper = this.values[Math.ceil(index)];\n\t return this._interpolate(index - lowerPosition, lower, upper);\n\t }\n\t });\n\t /**\n\t\t * Internal interpolation routine\n\t\t * @param {NormalRange} index The index between the lower and upper\n\t\t * @param {*} lower \n\t\t * @param {*} upper \n\t\t * @return {*} The interpolated value\n\t\t * @private\n\t\t */\n\t Tone.CtrlInterpolate.prototype._interpolate = function (index, lower, upper) {\n\t if (Tone.isArray(lower)) {\n\t var retArray = [];\n\t for (var i = 0; i < lower.length; i++) {\n\t retArray[i] = this._interpolate(index, lower[i], upper[i]);\n\t }\n\t return retArray;\n\t } else if (Tone.isObject(lower)) {\n\t var retObj = {};\n\t for (var attr in lower) {\n\t retObj[attr] = this._interpolate(index, lower[attr], upper[attr]);\n\t }\n\t return retObj;\n\t } else {\n\t lower = this._toNumber(lower);\n\t upper = this._toNumber(upper);\n\t return (1 - index) * lower + index * upper;\n\t }\n\t };\n\t /**\n\t\t * Convert from the given type into a number\n\t\t * @param {Number|String} value\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.CtrlInterpolate.prototype._toNumber = function (val) {\n\t if (Tone.isNumber(val)) {\n\t return val;\n\t } else {\n\t //otherwise assume that it's Time...\n\t return this.toSeconds(val);\n\t }\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.CtrlInterpolate} this\n\t\t */\n\t Tone.CtrlInterpolate.prototype.dispose = function () {\n\t this.values = null;\n\t };\n\t return Tone.CtrlInterpolate;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.CtrlMarkov represents a Markov Chain where each call\n\t\t * to Tone.CtrlMarkov.next will move to the next state. If the next\n\t\t * state choice is an array, the next state is chosen randomly with\n\t\t * even probability for all of the choices. For a weighted probability\n\t\t * of the next choices, pass in an object with \"state\" and \"probability\" attributes. \n\t\t * The probabilities will be normalized and then chosen. If no next options\n\t\t * are given for the current state, the state will stay there. \n\t\t * @extends {Tone}\n\t\t * @example\n\t\t * var chain = new Tone.CtrlMarkov({\n\t\t * \t\"beginning\" : [\"end\", \"middle\"],\n\t\t * \t\"middle\" : \"end\"\n\t\t * });\n\t\t * chain.value = \"beginning\";\n\t\t * chain.next(); //returns \"end\" or \"middle\" with 50% probability\n\t\t *\n\t\t * @example\n\t\t * var chain = new Tone.CtrlMarkov({\n\t\t * \t\"beginning\" : [{\"value\" : \"end\", \"probability\" : 0.8}, \n\t\t * \t\t\t\t\t{\"value\" : \"middle\", \"probability\" : 0.2}],\n\t\t * \t\"middle\" : \"end\"\n\t\t * });\n\t\t * chain.value = \"beginning\";\n\t\t * chain.next(); //returns \"end\" with 80% probability or \"middle\" with 20%.\n\t\t * @param {Object} values An object with the state names as the keys\n\t\t * and the next state(s) as the values. \n\t\t */\n\t Tone.CtrlMarkov = function (values, initial) {\n\t Tone.call(this);\n\t /**\n\t\t\t * The Markov values with states as the keys\n\t\t\t * and next state(s) as the values. \n\t\t\t * @type {Object}\n\t\t\t */\n\t this.values = Tone.defaultArg(values, {});\n\t /**\n\t\t\t * The current state of the Markov values. The next\n\t\t\t * state will be evaluated and returned when Tone.CtrlMarkov.next\n\t\t\t * is invoked.\n\t\t\t * @type {String}\n\t\t\t */\n\t this.value = Tone.defaultArg(initial, Object.keys(this.values)[0]);\n\t };\n\t Tone.extend(Tone.CtrlMarkov);\n\t /**\n\t\t * Returns the next state of the Markov values. \n\t\t * @return {String}\n\t\t */\n\t Tone.CtrlMarkov.prototype.next = function () {\n\t if (this.values.hasOwnProperty(this.value)) {\n\t var next = this.values[this.value];\n\t if (Tone.isArray(next)) {\n\t var distribution = this._getProbDistribution(next);\n\t var rand = Math.random();\n\t var total = 0;\n\t for (var i = 0; i < distribution.length; i++) {\n\t var dist = distribution[i];\n\t if (rand > total && rand < total + dist) {\n\t var chosen = next[i];\n\t if (Tone.isObject(chosen)) {\n\t this.value = chosen.value;\n\t } else {\n\t this.value = chosen;\n\t }\n\t }\n\t total += dist;\n\t }\n\t } else {\n\t this.value = next;\n\t }\n\t }\n\t return this.value;\n\t };\n\t /**\n\t\t * Choose randomly from an array weighted options in the form \n\t\t * {\"state\" : string, \"probability\" : number} or an array of values\n\t\t * @param {Array} options \n\t\t * @return {Array} The randomly selected choice\n\t\t * @private\n\t\t */\n\t Tone.CtrlMarkov.prototype._getProbDistribution = function (options) {\n\t var distribution = [];\n\t var total = 0;\n\t var needsNormalizing = false;\n\t for (var i = 0; i < options.length; i++) {\n\t var option = options[i];\n\t if (Tone.isObject(option)) {\n\t needsNormalizing = true;\n\t distribution[i] = option.probability;\n\t } else {\n\t distribution[i] = 1 / options.length;\n\t }\n\t total += distribution[i];\n\t }\n\t if (needsNormalizing) {\n\t //normalize the values\n\t for (var j = 0; j < distribution.length; j++) {\n\t distribution[j] = distribution[j] / total;\n\t }\n\t }\n\t return distribution;\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.CtrlMarkov} this\n\t\t */\n\t Tone.CtrlMarkov.prototype.dispose = function () {\n\t this.values = null;\n\t };\n\t return Tone.CtrlMarkov;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Generate patterns from an array of values.\n\t\t * Has a number of arpeggiation and randomized\n\t\t * selection patterns. \n\t\t * <ul>\n\t\t * \t <li>\"up\" - cycles upward</li>\n\t\t * \t\t\t<li>\"down\" - cycles downward</li>\n\t\t * \t\t\t<li>\"upDown\" - up then and down</li>\n\t\t * \t\t\t<li>\"downUp\" - cycles down then and up</li>\n\t\t * \t\t\t<li>\"alternateUp\" - jump up two and down one</li>\n\t\t * \t\t\t<li>\"alternateDown\" - jump down two and up one</li>\n\t\t * \t\t\t<li>\"random\" - randomly select an index</li>\n\t\t * \t\t\t<li>\"randomWalk\" - randomly moves one index away from the current position</li>\n\t\t * \t\t\t<li>\"randomOnce\" - randomly select an index without repeating until all values have been chosen.</li>\n\t\t * \t\t</ul>\n\t\t * @param {Array} values An array of options to choose from.\n\t\t * @param {Tone.CtrlPattern.Type=} type The name of the pattern.\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.CtrlPattern = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'values',\n\t 'type'\n\t ], Tone.CtrlPattern);\n\t Tone.call(this);\n\t /**\n\t\t\t * The array of values to arpeggiate over\n\t\t\t * @type {Array}\n\t\t\t */\n\t this.values = options.values;\n\t /**\n\t\t\t * The current position in the values array\n\t\t\t * @type {Number}\n\t\t\t */\n\t this.index = 0;\n\t /**\n\t\t\t * The type placeholder\n\t\t\t * @type {Tone.CtrlPattern.Type}\n\t\t\t * @private\n\t\t\t */\n\t this._type = null;\n\t /**\n\t\t\t * Shuffled values for the RandomOnce type\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._shuffled = null;\n\t /**\n\t\t\t * The direction of the movement\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._direction = null;\n\t this.type = options.type;\n\t };\n\t Tone.extend(Tone.CtrlPattern);\n\t /**\n\t\t * The Control Patterns\n\t\t * @type {Object}\n\t\t * @static\n\t\t */\n\t Tone.CtrlPattern.Type = {\n\t Up: 'up',\n\t Down: 'down',\n\t UpDown: 'upDown',\n\t DownUp: 'downUp',\n\t AlternateUp: 'alternateUp',\n\t AlternateDown: 'alternateDown',\n\t Random: 'random',\n\t RandomWalk: 'randomWalk',\n\t RandomOnce: 'randomOnce'\n\t };\n\t /**\n\t\t * The default values. \n\t\t * @type {Object}\n\t\t */\n\t Tone.CtrlPattern.defaults = {\n\t 'type': Tone.CtrlPattern.Type.Up,\n\t 'values': []\n\t };\n\t /**\n\t\t * The value at the current index of the pattern.\n\t\t * @readOnly\n\t\t * @memberOf Tone.CtrlPattern#\n\t\t * @type {*}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.CtrlPattern.prototype, 'value', {\n\t get: function () {\n\t //some safeguards\n\t if (this.values.length === 0) {\n\t return;\n\t } else if (this.values.length === 1) {\n\t return this.values[0];\n\t }\n\t this.index = Math.min(this.index, this.values.length - 1);\n\t var val = this.values[this.index];\n\t if (this.type === Tone.CtrlPattern.Type.RandomOnce) {\n\t if (this.values.length !== this._shuffled.length) {\n\t this._shuffleValues();\n\t }\n\t val = this.values[this._shuffled[this.index]];\n\t }\n\t return val;\n\t }\n\t });\n\t /**\n\t\t * The pattern used to select the next\n\t\t * item from the values array\n\t\t * @memberOf Tone.CtrlPattern#\n\t\t * @type {Tone.CtrlPattern.Type}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.CtrlPattern.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t this._type = type;\n\t this._shuffled = null;\n\t //the first index\n\t if (this._type === Tone.CtrlPattern.Type.Up || this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.RandomOnce || this._type === Tone.CtrlPattern.Type.AlternateUp) {\n\t this.index = 0;\n\t } else if (this._type === Tone.CtrlPattern.Type.Down || this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {\n\t this.index = this.values.length - 1;\n\t }\n\t //the direction\n\t if (this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.AlternateUp) {\n\t this._direction = Tone.CtrlPattern.Type.Up;\n\t } else if (this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {\n\t this._direction = Tone.CtrlPattern.Type.Down;\n\t }\n\t //randoms\n\t if (this._type === Tone.CtrlPattern.Type.RandomOnce) {\n\t this._shuffleValues();\n\t } else if (this._type === Tone.CtrlPattern.Random) {\n\t this.index = Math.floor(Math.random() * this.values.length);\n\t }\n\t }\n\t });\n\t /**\n\t\t * Return the next value given the current position\n\t\t * and pattern.\n\t\t * @return {*} The next value\n\t\t */\n\t Tone.CtrlPattern.prototype.next = function () {\n\t var type = this.type;\n\t //choose the next index\n\t if (type === Tone.CtrlPattern.Type.Up) {\n\t this.index++;\n\t if (this.index >= this.values.length) {\n\t this.index = 0;\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.Down) {\n\t this.index--;\n\t if (this.index < 0) {\n\t this.index = this.values.length - 1;\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.UpDown || type === Tone.CtrlPattern.Type.DownUp) {\n\t if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t this.index++;\n\t } else {\n\t this.index--;\n\t }\n\t if (this.index < 0) {\n\t this.index = 1;\n\t this._direction = Tone.CtrlPattern.Type.Up;\n\t } else if (this.index >= this.values.length) {\n\t this.index = this.values.length - 2;\n\t this._direction = Tone.CtrlPattern.Type.Down;\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.Random) {\n\t this.index = Math.floor(Math.random() * this.values.length);\n\t } else if (type === Tone.CtrlPattern.Type.RandomWalk) {\n\t if (Math.random() < 0.5) {\n\t this.index--;\n\t this.index = Math.max(this.index, 0);\n\t } else {\n\t this.index++;\n\t this.index = Math.min(this.index, this.values.length - 1);\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.RandomOnce) {\n\t this.index++;\n\t if (this.index >= this.values.length) {\n\t this.index = 0;\n\t //reshuffle the values for next time\n\t this._shuffleValues();\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.AlternateUp) {\n\t if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t this.index += 2;\n\t this._direction = Tone.CtrlPattern.Type.Down;\n\t } else {\n\t this.index -= 1;\n\t this._direction = Tone.CtrlPattern.Type.Up;\n\t }\n\t if (this.index >= this.values.length) {\n\t this.index = 0;\n\t this._direction = Tone.CtrlPattern.Type.Up;\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.AlternateDown) {\n\t if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t this.index += 1;\n\t this._direction = Tone.CtrlPattern.Type.Down;\n\t } else {\n\t this.index -= 2;\n\t this._direction = Tone.CtrlPattern.Type.Up;\n\t }\n\t if (this.index < 0) {\n\t this.index = this.values.length - 1;\n\t this._direction = Tone.CtrlPattern.Type.Down;\n\t }\n\t }\n\t return this.value;\n\t };\n\t /**\n\t\t * Shuffles the values and places the results into the _shuffled\n\t\t * @private\n\t\t */\n\t Tone.CtrlPattern.prototype._shuffleValues = function () {\n\t var copy = [];\n\t this._shuffled = [];\n\t for (var i = 0; i < this.values.length; i++) {\n\t copy[i] = i;\n\t }\n\t while (copy.length > 0) {\n\t var randVal = copy.splice(Math.floor(copy.length * Math.random()), 1);\n\t this._shuffled.push(randVal[0]);\n\t }\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @returns {Tone.CtrlPattern} this\n\t\t */\n\t Tone.CtrlPattern.prototype.dispose = function () {\n\t this._shuffled = null;\n\t this.values = null;\n\t };\n\t return Tone.CtrlPattern;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Choose a random value.\n\t\t * @extends {Tone}\n\t\t * @example\n\t\t * var randomWalk = new Tone.CtrlRandom({\n\t\t * \t\"min\" : 0,\n\t\t * \t\"max\" : 10,\n\t\t * \t\"integer\" : true\n\t\t * });\n\t\t * randomWalk.eval();\n\t\t *\n\t\t * @param {Number|Time=} min The minimum return value.\n\t\t * @param {Number|Time=} max The maximum return value.\n\t\t */\n\t Tone.CtrlRandom = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'min',\n\t 'max'\n\t ], Tone.CtrlRandom);\n\t Tone.call(this);\n\t /**\n\t\t\t * The minimum return value\n\t\t\t * @type {Number|Time}\n\t\t\t */\n\t this.min = options.min;\n\t /**\n\t\t\t * The maximum return value\n\t\t\t * @type {Number|Time}\n\t\t\t */\n\t this.max = options.max;\n\t /**\n\t\t\t * If the return value should be an integer\n\t\t\t * @type {Boolean}\n\t\t\t */\n\t this.integer = options.integer;\n\t };\n\t Tone.extend(Tone.CtrlRandom);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.CtrlRandom.defaults = {\n\t 'min': 0,\n\t 'max': 1,\n\t 'integer': false\n\t };\n\t /**\n\t\t * Return a random value between min and max. \n\t\t * @readOnly\n\t\t * @memberOf Tone.CtrlRandom#\n\t\t * @type {*}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.CtrlRandom.prototype, 'value', {\n\t get: function () {\n\t var min = this.toSeconds(this.min);\n\t var max = this.toSeconds(this.max);\n\t var rand = Math.random();\n\t var val = rand * min + (1 - rand) * max;\n\t if (this.integer) {\n\t val = Math.floor(val);\n\t }\n\t return val;\n\t }\n\t });\n\t return Tone.CtrlRandom;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class A data structure for holding multiple buffers.\n\t\t * \n\t\t * @param {Object|Array} urls An object literal or array\n\t\t * of urls to load.\n\t\t * @param {Function=} callback The callback to invoke when\n\t\t * the buffers are loaded. \n\t\t * @extends {Tone}\n\t\t * @example\n\t\t * //load a whole bank of piano samples\n\t\t * var pianoSamples = new Tone.Buffers({\n\t\t * \t\"C4\" : \"path/to/C4.mp3\"\n\t\t * \t\"C#4\" : \"path/to/C#4.mp3\"\n\t\t * \t\"D4\" : \"path/to/D4.mp3\"\n\t\t * \t\"D#4\" : \"path/to/D#4.mp3\"\n\t\t * \t...\n\t\t * }, function(){\n\t\t * \t//play one of the samples when they all load\n\t\t * \tplayer.buffer = pianoSamples.get(\"C4\");\n\t\t * \tplayer.start();\n\t\t * });\n\t\t * \t@example\n\t\t * //To pass in additional parameters in the second parameter\n\t\t * var buffers = new Tone.Buffers(urls, {\n\t\t * \t\"onload\" : callback,\n\t\t * \t\"baseUrl\" : \"../path/to/audio/\"\n\t\t * })\n\t\t */\n\t Tone.Buffers = function (urls) {\n\t //remove the urls from the options\n\t var args = Array.prototype.slice.call(arguments);\n\t args.shift();\n\t var options = Tone.defaults(args, [\n\t 'onload',\n\t 'baseUrl'\n\t ], Tone.Buffers);\n\t Tone.call(this);\n\t /**\n\t\t\t * All of the buffers\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t this._buffers = {};\n\t /**\n\t\t\t * A path which is prefixed before every url.\n\t\t\t * @type {String}\n\t\t\t */\n\t this.baseUrl = options.baseUrl;\n\t this._loadingCount = 0;\n\t //add each one\n\t for (var key in urls) {\n\t this._loadingCount++;\n\t this.add(key, urls[key], this._bufferLoaded.bind(this, options.onload));\n\t }\n\t };\n\t Tone.extend(Tone.Buffers);\n\t /**\n\t\t * Defaults\n\t\t * @type {Object}\n\t\t */\n\t Tone.Buffers.defaults = {\n\t 'onload': Tone.noOp,\n\t 'baseUrl': ''\n\t };\n\t /**\n\t\t * True if the buffers object has a buffer by that name.\n\t\t * @param {String|Number} name The key or index of the \n\t\t * buffer.\n\t\t * @return {Boolean}\n\t\t */\n\t Tone.Buffers.prototype.has = function (name) {\n\t return this._buffers.hasOwnProperty(name);\n\t };\n\t /**\n\t\t * Get a buffer by name. If an array was loaded, \n\t\t * then use the array index.\n\t\t * @param {String|Number} name The key or index of the \n\t\t * buffer.\n\t\t * @return {Tone.Buffer}\n\t\t */\n\t Tone.Buffers.prototype.get = function (name) {\n\t if (this.has(name)) {\n\t return this._buffers[name];\n\t } else {\n\t throw new Error('Tone.Buffers: no buffer named ' + name);\n\t }\n\t };\n\t /**\n\t\t * A buffer was loaded. decrement the counter.\n\t\t * @param {Function} callback \n\t\t * @private\n\t\t */\n\t Tone.Buffers.prototype._bufferLoaded = function (callback) {\n\t this._loadingCount--;\n\t if (this._loadingCount === 0 && callback) {\n\t callback(this);\n\t }\n\t };\n\t /**\n\t\t * If the buffers are loaded or not\n\t\t * @memberOf Tone.Buffers#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Buffers.prototype, 'loaded', {\n\t get: function () {\n\t var isLoaded = true;\n\t for (var buffName in this._buffers) {\n\t var buff = this.get(buffName);\n\t isLoaded = isLoaded && buff.loaded;\n\t }\n\t return isLoaded;\n\t }\n\t });\n\t /**\n\t\t * Add a buffer by name and url to the Buffers\n\t\t * @param {String} name A unique name to give\n\t\t * the buffer\n\t\t * @param {String|Tone.Buffer|Audiobuffer} url Either the url of the bufer, \n\t\t * or a buffer which will be added\n\t\t * with the given name.\n\t\t * @param {Function=} callback The callback to invoke \n\t\t * when the url is loaded.\n\t\t */\n\t Tone.Buffers.prototype.add = function (name, url, callback) {\n\t callback = Tone.defaultArg(callback, Tone.noOp);\n\t if (url instanceof Tone.Buffer) {\n\t this._buffers[name] = url;\n\t callback(this);\n\t } else if (url instanceof AudioBuffer) {\n\t this._buffers[name] = new Tone.Buffer(url);\n\t callback(this);\n\t } else if (Tone.isString(url)) {\n\t this._buffers[name] = new Tone.Buffer(this.baseUrl + url, callback);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Buffers} this\n\t\t */\n\t Tone.Buffers.prototype.dispose = function () {\n\t Tone.prototype.dispose.call(this);\n\t for (var name in this._buffers) {\n\t this._buffers[name].dispose();\n\t }\n\t this._buffers = null;\n\t return this;\n\t };\n\t return Tone.Buffers;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * buses are another way of routing audio\n\t\t *\n\t\t * augments Tone.prototype to include send and recieve\n\t\t */\n\t /**\n\t\t * All of the routes\n\t\t *\n\t\t * @type {Object}\n\t\t * @static\n\t\t * @private\n\t\t */\n\t var Buses = {};\n\t /**\n\t\t * Send this signal to the channel name.\n\t\t * @param {String} channelName A named channel to send the signal to.\n\t\t * @param {Decibels} amount The amount of the source to send to the bus.\n\t\t * @return {GainNode} The gain node which connects this node to the desired channel.\n\t\t * Can be used to adjust the levels of the send.\n\t\t * @example\n\t\t * source.send(\"reverb\", -12);\n\t\t */\n\t Tone.prototype.send = function (channelName, amount) {\n\t if (!Buses.hasOwnProperty(channelName)) {\n\t Buses[channelName] = this.context.createGain();\n\t }\n\t amount = Tone.defaultArg(amount, 0);\n\t var sendKnob = new Tone.Gain(amount, Tone.Type.Decibels);\n\t this.connect(sendKnob);\n\t sendKnob.connect(Buses[channelName]);\n\t return sendKnob;\n\t };\n\t /**\n\t\t * Recieve the input from the desired channelName to the input\n\t\t *\n\t\t * @param {String} channelName A named channel to send the signal to.\n\t\t * @param {Number=} channelNumber The channel to connect to\n\t\t * @returns {Tone} this\n\t\t * @example\n\t\t * reverbEffect.receive(\"reverb\");\n\t\t */\n\t Tone.prototype.receive = function (channelName, inputNum) {\n\t if (!Buses.hasOwnProperty(channelName)) {\n\t Buses[channelName] = this.context.createGain();\n\t }\n\t Buses[channelName].connect(this, 0, inputNum);\n\t return this;\n\t };\n\t //remove all the send/receives when a new audio context is passed in\n\t Tone.Context.on('init', function (context) {\n\t if (context.Buses) {\n\t Buses = context.Buses;\n\t } else {\n\t Buses = {};\n\t context.Buses = Buses;\n\t }\n\t });\n\t return Tone;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Draw is useful for synchronizing visuals and audio events.\n\t\t * Callbacks from Tone.Transport or any of the Tone.Event classes\n\t\t * always happen _before_ the scheduled time and are not synchronized\n\t\t * to the animation frame so they are not good for triggering tightly\n\t\t * synchronized visuals and sound. Tone.Draw makes it easy to schedule\n\t\t * callbacks using the AudioContext time and uses requestAnimationFrame.\n\t\t * \n\t\t * @singleton\n\t\t * @extends {Tone}\n\t\t * @example\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \t//use the time argument to schedule a callback with Tone.Draw\n\t\t * \tTone.Draw.schedule(function(){\n\t\t * \t\t//do drawing or DOM manipulation here\n\t\t * \t}, time)\n\t\t * }, \"+0.5\")\n\t\t */\n\t Tone.Draw = function () {\n\t Tone.call(this);\n\t /**\n\t\t\t * All of the events.\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t this._events = new Tone.Timeline();\n\t /**\n\t\t\t * The duration after which events are not invoked.\n\t\t\t * @type {Number}\n\t\t\t * @default 0.25\n\t\t\t */\n\t this.expiration = 0.25;\n\t /**\n\t\t\t * The amount of time before the scheduled time \n\t\t\t * that the callback can be invoked. Default is\n\t\t\t * half the time of an animation frame (0.008 seconds).\n\t\t\t * @type {Number}\n\t\t\t * @default 0.008\n\t\t\t */\n\t this.anticipation = 0.008;\n\t /**\n\t\t\t * The draw loop\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._boundDrawLoop = this._drawLoop.bind(this);\n\t };\n\t Tone.extend(Tone.Draw);\n\t /**\n\t\t * Schedule a function at the given time to be invoked\n\t\t * on the nearest animation frame.\n\t\t * @param {Function} callback Callback is invoked at the given time.\n\t\t * @param {Time} time The time relative to the AudioContext time\n\t\t * to invoke the callback.\n\t\t * @return {Tone.Draw} this\n\t\t */\n\t Tone.Draw.prototype.schedule = function (callback, time) {\n\t this._events.add({\n\t callback: callback,\n\t time: this.toSeconds(time)\n\t });\n\t //start the draw loop on the first event\n\t if (this._events.length === 1) {\n\t requestAnimationFrame(this._boundDrawLoop);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Cancel events scheduled after the given time\n\t\t * @param {Time=} after Time after which scheduled events will \n\t\t * be removed from the scheduling timeline.\n\t\t * @return {Tone.Draw} this\n\t\t */\n\t Tone.Draw.prototype.cancel = function (after) {\n\t this._events.cancel(this.toSeconds(after));\n\t return this;\n\t };\n\t /**\n\t\t * The draw loop\n\t\t * @private\n\t\t */\n\t Tone.Draw.prototype._drawLoop = function () {\n\t var now = Tone.now();\n\t while (this._events.length && this._events.peek().time - this.anticipation <= now) {\n\t var event = this._events.shift();\n\t if (now - event.time <= this.expiration) {\n\t event.callback();\n\t }\n\t }\n\t if (this._events.length > 0) {\n\t requestAnimationFrame(this._boundDrawLoop);\n\t }\n\t };\n\t //make a singleton\n\t Tone.Draw = new Tone.Draw();\n\t return Tone.Draw;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Both Tone.Panner3D and Tone.Listener have a position in 3D space\n\t\t * using a right-handed cartesian coordinate system.\n\t\t * The units used in the coordinate system are not defined;\n\t\t * these coordinates are independent/invariant of any particular\n\t\t * units such as meters or feet. Tone.Panner3D objects have an forward\n\t\t * vector representing the direction the sound is projecting. Additionally,\n\t\t * they have a sound cone representing how directional the sound is.\n\t\t * For example, the sound could be omnidirectional, in which case it would\n\t\t * be heard anywhere regardless of its forward, or it can be more directional\n\t\t * and heard only if it is facing the listener. Tone.Listener objects\n\t\t * (representing a person's ears) have an forward and up vector\n\t\t * representing in which direction the person is facing. Because both the\n\t\t * source stream and the listener can be moving, they both have a velocity\n\t\t * vector representing both the speed and direction of movement. Taken together,\n\t\t * these two velocities can be used to generate a doppler shift effect which changes the pitch.\n\t\t * <br><br>\n\t\t * Note: the position of the Listener will have no effect on nodes not connected to a Tone.Panner3D\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone}\n\t\t * @singleton\n\t\t */\n\t Tone.Listener = function () {\n\t Tone.call(this);\n\t /**\n\t\t\t * Holds the current forward orientation\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._orientation = [\n\t 0,\n\t 0,\n\t 0,\n\t 0,\n\t 0,\n\t 0\n\t ];\n\t /**\n\t\t\t * Holds the current position\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._position = [\n\t 0,\n\t 0,\n\t 0\n\t ];\n\t Tone.getContext(function () {\n\t // set the default position/forward\n\t this.set(ListenerConstructor.defaults);\n\t }.bind(this));\n\t };\n\t Tone.extend(Tone.Listener);\n\t /**\n\t\t * Defaults according to the specification\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Listener.defaults = {\n\t 'positionX': 0,\n\t 'positionY': 0,\n\t 'positionZ': 0,\n\t 'forwardX': 0,\n\t 'forwardY': 0,\n\t 'forwardZ': 1,\n\t 'upX': 0,\n\t 'upY': 1,\n\t 'upZ': 0\n\t };\n\t /**\n\t\t * The ramp time which is applied to the setTargetAtTime\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.Listener.prototype._rampTimeConstant = 0.01;\n\t /**\n\t\t * Sets the position of the listener in 3d space.\n\t\t * @param {Number} x\n\t\t * @param {Number} y\n\t\t * @param {Number} z\n\t\t * @return {Tone.Listener} this\n\t\t */\n\t Tone.Listener.prototype.setPosition = function (x, y, z) {\n\t if (this.context.listener.positionX) {\n\t var now = this.now();\n\t this.context.listener.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t this.context.listener.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t this.context.listener.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t } else {\n\t this.context.listener.setPosition(x, y, z);\n\t }\n\t this._position = Array.prototype.slice.call(arguments);\n\t return this;\n\t };\n\t /**\n\t\t * Sets the orientation of the listener using two vectors, the forward\n\t\t * vector (which direction the listener is facing) and the up vector\n\t\t * (which the up direction of the listener). An up vector\n\t\t * of 0, 0, 1 is equivalent to the listener standing up in the Z direction.\n\t\t * @param {Number} x\n\t\t * @param {Number} y\n\t\t * @param {Number} z\n\t\t * @param {Number} upX\n\t\t * @param {Number} upY\n\t\t * @param {Number} upZ\n\t\t * @return {Tone.Listener} this\n\t\t */\n\t Tone.Listener.prototype.setOrientation = function (x, y, z, upX, upY, upZ) {\n\t if (this.context.listener.forwardX) {\n\t var now = this.now();\n\t this.context.listener.forwardX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t this.context.listener.forwardY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t this.context.listener.forwardZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t this.context.listener.upX.setTargetAtTime(upX, now, this._rampTimeConstant);\n\t this.context.listener.upY.setTargetAtTime(upY, now, this._rampTimeConstant);\n\t this.context.listener.upZ.setTargetAtTime(upZ, now, this._rampTimeConstant);\n\t } else {\n\t this.context.listener.setOrientation(x, y, z, upX, upY, upZ);\n\t }\n\t this._orientation = Array.prototype.slice.call(arguments);\n\t return this;\n\t };\n\t /**\n\t\t * The x position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name positionX\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'positionX', {\n\t set: function (pos) {\n\t this._position[0] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[0];\n\t }\n\t });\n\t /**\n\t\t * The y position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name positionY\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'positionY', {\n\t set: function (pos) {\n\t this._position[1] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[1];\n\t }\n\t });\n\t /**\n\t\t * The z position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name positionZ\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'positionZ', {\n\t set: function (pos) {\n\t this._position[2] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[2];\n\t }\n\t });\n\t /**\n\t\t * The x coordinate of the listeners front direction. i.e.\n\t\t * which way they are facing.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name forwardX\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'forwardX', {\n\t set: function (pos) {\n\t this._orientation[0] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[0];\n\t }\n\t });\n\t /**\n\t\t * The y coordinate of the listeners front direction. i.e.\n\t\t * which way they are facing.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name forwardY\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'forwardY', {\n\t set: function (pos) {\n\t this._orientation[1] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[1];\n\t }\n\t });\n\t /**\n\t\t * The z coordinate of the listeners front direction. i.e.\n\t\t * which way they are facing.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name forwardZ\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'forwardZ', {\n\t set: function (pos) {\n\t this._orientation[2] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[2];\n\t }\n\t });\n\t /**\n\t\t * The x coordinate of the listener's up direction. i.e.\n\t\t * the direction the listener is standing in.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name upX\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'upX', {\n\t set: function (pos) {\n\t this._orientation[3] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[3];\n\t }\n\t });\n\t /**\n\t\t * The y coordinate of the listener's up direction. i.e.\n\t\t * the direction the listener is standing in.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name upY\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'upY', {\n\t set: function (pos) {\n\t this._orientation[4] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[4];\n\t }\n\t });\n\t /**\n\t\t * The z coordinate of the listener's up direction. i.e.\n\t\t * the direction the listener is standing in.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name upZ\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'upZ', {\n\t set: function (pos) {\n\t this._orientation[5] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[5];\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Listener} this\n\t\t */\n\t Tone.Listener.prototype.dispose = function () {\n\t this._orientation = null;\n\t this._position = null;\n\t return this;\n\t };\n\t //SINGLETON SETUP\n\t var ListenerConstructor = Tone.Listener;\n\t Tone.Listener = new ListenerConstructor();\n\t Tone.Context.on('init', function (context) {\n\t if (context.Listener instanceof ListenerConstructor) {\n\t //a single listener object\n\t Tone.Listener = context.Listener;\n\t } else {\n\t //make new Listener insides\n\t Tone.Listener = new ListenerConstructor();\n\t }\n\t context.Listener = Tone.Listener;\n\t });\n\t //END SINGLETON SETUP\n\t return Tone.Listener;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * Because of a bug in iOS causing the currentTime to increment\n\t\t * before the rendering is started, sometimes it takes multiple\n\t\t * attemps to render the audio correctly.\n\t\t * @private\n\t\t */\n\t function attemptRender(callback, duration, sampleRate, tries) {\n\t tries = Tone.defaultArg(tries, 0);\n\t var context = new Tone.OfflineContext(2, duration, sampleRate);\n\t Tone.context = context;\n\t var isPast = Tone.isPast;\n\t Tone.isPast = Tone.noOp;\n\t //invoke the callback/scheduling\n\t var response = callback(Tone.Transport);\n\t if (context.currentTime > 0 && tries < 1000) {\n\t return attemptRender(callback, duration, sampleRate, ++tries);\n\t } else {\n\t Tone.isPast = isPast;\n\t return {\n\t 'response': response,\n\t 'context': context\n\t };\n\t }\n\t }\n\t /**\n\t\t * Generate a buffer by rendering all of the Tone.js code within the callback using the OfflineAudioContext.\n\t\t * The OfflineAudioContext is capable of rendering much faster than real time in many cases.\n\t\t * The callback function also passes in an offline instance of Tone.Transport which can be used\n\t\t * to schedule events along the Transport.\n\t\t * @param {Function} callback All Tone.js nodes which are created and scheduled within this callback are recorded into the output Buffer.\n\t\t * @param {Time} duration the amount of time to record for.\n\t\t * @return {Promise} The promise which is invoked with the Tone.Buffer of the recorded output.\n\t\t * @example\n\t\t * //render 2 seconds of the oscillator\n\t\t * Tone.Offline(function(){\n\t\t * \t//only nodes created in this callback will be recorded\n\t\t * \tvar oscillator = new Tone.Oscillator().toMaster().start(0)\n\t\t * \t//schedule their events\n\t\t * }, 2).then(function(buffer){\n\t\t * \t//do something with the output buffer\n\t\t * })\n\t\t * @example\n\t\t * //can also schedule events along the Transport\n\t\t * //using the passed in Offline Transport\n\t\t * Tone.Offline(function(Transport){\n\t\t * \tvar osc = new Tone.Oscillator().toMaster()\n\t\t * \tTransport.schedule(function(time){\n\t\t * \t\tosc.start(time).stop(time + 0.1)\n\t\t * \t}, 1)\n\t\t * \tTransport.start(0.2)\n\t\t * }, 4).then(function(buffer){\n\t\t * \t//do something with the output buffer\n\t\t * })\n\t\t */\n\t Tone.Offline = function (callback, duration) {\n\t //set the OfflineAudioContext\n\t var sampleRate = Tone.context.sampleRate;\n\t var originalContext = Tone.context;\n\t var renderRet = attemptRender(callback, duration, sampleRate);\n\t var response = renderRet.response;\n\t var context = renderRet.context;\n\t var ret;\n\t if (response instanceof Promise) {\n\t //wait for the promise to resolve\n\t ret = response.then(function () {\n\t //then render the audio\n\t return context.render();\n\t });\n\t } else {\n\t //process the audio\n\t ret = context.render();\n\t }\n\t //return the original AudioContext\n\t Tone.context = originalContext;\n\t //return the audio\n\t return ret.then(function (buffer) {\n\t //wrap it in a Tone.Buffer\n\t return new Tone.Buffer(buffer);\n\t });\n\t };\n\t return Tone.Offline;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * \t@class Tone.Effect is the base class for effects. Connect the effect between\n\t\t * \t the effectSend and effectReturn GainNodes, then control the amount of\n\t\t * \t effect which goes to the output using the wet control.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {NormalRange|Object} [wet] The starting wet value.\n\t\t */\n\t Tone.Effect = function () {\n\t var options = Tone.defaults(arguments, ['wet'], Tone.Effect);\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * the drywet knob to control the amount of effect\n\t\t\t * @type {Tone.CrossFade}\n\t\t\t * @private\n\t\t\t */\n\t this._dryWet = new Tone.CrossFade(options.wet);\n\t /**\n\t\t\t * The wet control is how much of the effected\n\t\t\t * will pass through to the output. 1 = 100% effected\n\t\t\t * signal, 0 = 100% dry signal.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.wet = this._dryWet.fade;\n\t /**\n\t\t\t * connect the effectSend to the input of hte effect\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this.effectSend = new Tone.Gain();\n\t /**\n\t\t\t * connect the output of the effect to the effectReturn\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this.effectReturn = new Tone.Gain();\n\t //connections\n\t this.input.connect(this._dryWet.a);\n\t this.input.connect(this.effectSend);\n\t this.effectReturn.connect(this._dryWet.b);\n\t this._dryWet.connect(this.output);\n\t this._readOnly(['wet']);\n\t };\n\t Tone.extend(Tone.Effect, Tone.AudioNode);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Effect.defaults = { 'wet': 1 };\n\t /**\n\t\t * chains the effect in between the effectSend and effectReturn\n\t\t * @param {Tone} effect\n\t\t * @private\n\t\t * @returns {Tone.Effect} this\n\t\t */\n\t Tone.Effect.prototype.connectEffect = function (effect) {\n\t this.effectSend.chain(effect, this.effectReturn);\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Effect} this\n\t\t */\n\t Tone.Effect.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._dryWet.dispose();\n\t this._dryWet = null;\n\t this.effectSend.dispose();\n\t this.effectSend = null;\n\t this.effectReturn.dispose();\n\t this.effectReturn = null;\n\t this._writable(['wet']);\n\t this.wet = null;\n\t return this;\n\t };\n\t return Tone.Effect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.AutoFilter is a Tone.Filter with a Tone.LFO connected to the filter cutoff frequency.\n\t\t * Setting the LFO rate and depth allows for control over the filter modulation rate \n\t\t * and depth.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {Time|Object} [frequency] The rate of the LFO.\n\t\t * @param {Frequency=} baseFrequency The lower value of the LFOs oscillation\n\t \t * @param {Frequency=} octaves The number of octaves above the baseFrequency\n\t\t * @example\n\t\t * //create an autofilter and start it's LFO\n\t\t * var autoFilter = new Tone.AutoFilter(\"4n\").toMaster().start();\n\t\t * //route an oscillator through the filter and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(autoFilter).start();\n\t\t */\n\t Tone.AutoFilter = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'baseFrequency',\n\t 'octaves'\n\t ], Tone.AutoFilter);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * the lfo which drives the filter cutoff\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfo = new Tone.LFO({\n\t 'frequency': options.frequency,\n\t 'amplitude': options.depth\n\t });\n\t /**\n\t\t\t * The range of the filter modulating between the min and max frequency. \n\t\t\t * 0 = no modulation. 1 = full modulation.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.depth = this._lfo.amplitude;\n\t /**\n\t\t\t * How fast the filter modulates between min and max. \n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._lfo.frequency;\n\t /**\n\t\t\t * The filter node\n\t\t\t * @type {Tone.Filter}\n\t\t\t */\n\t this.filter = new Tone.Filter(options.filter);\n\t /**\n\t\t\t * The octaves placeholder\n\t\t\t * @type {Positive}\n\t\t\t * @private\n\t\t\t */\n\t this._octaves = 0;\n\t //connections\n\t this.connectEffect(this.filter);\n\t this._lfo.connect(this.filter.frequency);\n\t this.type = options.type;\n\t this._readOnly([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this.octaves = options.octaves;\n\t this.baseFrequency = options.baseFrequency;\n\t };\n\t //extend Effect\n\t Tone.extend(Tone.AutoFilter, Tone.Effect);\n\t /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.AutoFilter.defaults = {\n\t 'frequency': 1,\n\t 'type': 'sine',\n\t 'depth': 1,\n\t 'baseFrequency': 200,\n\t 'octaves': 2.6,\n\t 'filter': {\n\t 'type': 'lowpass',\n\t 'rolloff': -12,\n\t 'Q': 1\n\t }\n\t };\n\t /**\n\t\t * Start the effect.\n\t\t * @param {Time} [time=now] When the LFO will start. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.AutoFilter.prototype.start = function (time) {\n\t this._lfo.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the effect.\n\t\t * @param {Time} [time=now] When the LFO will stop. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.AutoFilter.prototype.stop = function (time) {\n\t this._lfo.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the filter to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t * Transport has started. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.AutoFilter.prototype.sync = function (delay) {\n\t this._lfo.sync(delay);\n\t return this;\n\t };\n\t /**\n\t\t * Unsync the filter from the transport.\n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.AutoFilter.prototype.unsync = function () {\n\t this._lfo.unsync();\n\t return this;\n\t };\n\t /**\n\t\t * Type of oscillator attached to the AutoFilter. \n\t\t * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.AutoFilter.prototype, 'type', {\n\t get: function () {\n\t return this._lfo.type;\n\t },\n\t set: function (type) {\n\t this._lfo.type = type;\n\t }\n\t });\n\t /**\n\t\t * The minimum value of the filter's cutoff frequency.\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {Frequency}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.AutoFilter.prototype, 'baseFrequency', {\n\t get: function () {\n\t return this._lfo.min;\n\t },\n\t set: function (freq) {\n\t this._lfo.min = this.toFrequency(freq);\n\t //and set the max\n\t this.octaves = this._octaves;\n\t }\n\t });\n\t /**\n\t\t * The maximum value of the filter's cutoff frequency. \n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t Object.defineProperty(Tone.AutoFilter.prototype, 'octaves', {\n\t get: function () {\n\t return this._octaves;\n\t },\n\t set: function (oct) {\n\t this._octaves = oct;\n\t this._lfo.max = this.baseFrequency * Math.pow(2, oct);\n\t }\n\t });\n\t /**\n\t\t * Clean up. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.AutoFilter.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._lfo.dispose();\n\t this._lfo = null;\n\t this.filter.dispose();\n\t this.filter = null;\n\t this._writable([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this.frequency = null;\n\t this.depth = null;\n\t return this;\n\t };\n\t return Tone.AutoFilter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.AutoPanner is a Tone.Panner with an LFO connected to the pan amount. \n\t\t * More on using autopanners [here](https://www.ableton.com/en/blog/autopan-chopper-effect-and-more-liveschool/).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {Frequency|Object} [frequency] Rate of left-right oscillation. \n\t\t * @example\n\t\t * //create an autopanner and start it's LFO\n\t\t * var autoPanner = new Tone.AutoPanner(\"4n\").toMaster().start();\n\t\t * //route an oscillator through the panner and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(autoPanner).start();\n\t\t */\n\t Tone.AutoPanner = function () {\n\t var options = Tone.defaults(arguments, ['frequency'], Tone.AutoPanner);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * the lfo which drives the panning\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfo = new Tone.LFO({\n\t 'frequency': options.frequency,\n\t 'amplitude': options.depth,\n\t 'min': -1,\n\t 'max': 1\n\t });\n\t /**\n\t\t\t * The amount of panning between left and right. \n\t\t\t * 0 = always center. 1 = full range between left and right. \n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.depth = this._lfo.amplitude;\n\t /**\n\t\t\t * the panner node which does the panning\n\t\t\t * @type {Tone.Panner}\n\t\t\t * @private\n\t\t\t */\n\t this._panner = new Tone.Panner();\n\t /**\n\t\t\t * How fast the panner modulates between left and right. \n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._lfo.frequency;\n\t //connections\n\t this.connectEffect(this._panner);\n\t this._lfo.connect(this._panner.pan);\n\t this.type = options.type;\n\t this._readOnly([\n\t 'depth',\n\t 'frequency'\n\t ]);\n\t };\n\t //extend Effect\n\t Tone.extend(Tone.AutoPanner, Tone.Effect);\n\t /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.AutoPanner.defaults = {\n\t 'frequency': 1,\n\t 'type': 'sine',\n\t 'depth': 1\n\t };\n\t /**\n\t\t * Start the effect.\n\t\t * @param {Time} [time=now] When the LFO will start. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t Tone.AutoPanner.prototype.start = function (time) {\n\t this._lfo.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the effect.\n\t\t * @param {Time} [time=now] When the LFO will stop. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t Tone.AutoPanner.prototype.stop = function (time) {\n\t this._lfo.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the panner to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t * Transport has started. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t Tone.AutoPanner.prototype.sync = function (delay) {\n\t this._lfo.sync(delay);\n\t return this;\n\t };\n\t /**\n\t\t * Unsync the panner from the transport\n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t Tone.AutoPanner.prototype.unsync = function () {\n\t this._lfo.unsync();\n\t return this;\n\t };\n\t /**\n\t\t * Type of oscillator attached to the AutoFilter. \n\t\t * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.AutoPanner.prototype, 'type', {\n\t get: function () {\n\t return this._lfo.type;\n\t },\n\t set: function (type) {\n\t this._lfo.type = type;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t Tone.AutoPanner.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._lfo.dispose();\n\t this._lfo = null;\n\t this._panner.dispose();\n\t this._panner = null;\n\t this._writable([\n\t 'depth',\n\t 'frequency'\n\t ]);\n\t this.frequency = null;\n\t this.depth = null;\n\t return this;\n\t };\n\t return Tone.AutoPanner;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.AutoWah connects a Tone.Follower to a bandpass filter (Tone.Filter).\n\t\t * The frequency of the filter is adjusted proportionally to the\n\t\t * incoming signal's amplitude. Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {Frequency|Object} [baseFrequency] The frequency the filter is set\n\t\t * to at the low point of the wah\n\t\t * @param {Positive} [octaves] The number of octaves above the baseFrequency\n\t\t * the filter will sweep to when fully open\n\t\t * @param {Decibels} [sensitivity] The decibel threshold sensitivity for\n\t\t * the incoming signal. Normal range of -40 to 0.\n\t\t * @example\n\t\t * var autoWah = new Tone.AutoWah(50, 6, -30).toMaster();\n\t\t * //initialize the synth and connect to autowah\n\t\t * var synth = new Synth.connect(autoWah);\n\t\t * //Q value influences the effect of the wah - default is 2\n\t\t * autoWah.Q.value = 6;\n\t\t * //more audible on higher notes\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\")\n\t\t */\n\t Tone.AutoWah = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'baseFrequency',\n\t 'octaves',\n\t 'sensitivity'\n\t ], Tone.AutoWah);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * The envelope follower. Set the attack/release\n\t\t\t * timing to adjust how the envelope is followed.\n\t\t\t * @type {Tone.Follower}\n\t\t\t * @private\n\t\t\t */\n\t this.follower = new Tone.Follower(options.follower);\n\t /**\n\t\t\t * scales the follower value to the frequency domain\n\t\t\t * @type {Tone}\n\t\t\t * @private\n\t\t\t */\n\t this._sweepRange = new Tone.ScaleExp(0, 1, 0.5);\n\t /**\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._baseFrequency = options.baseFrequency;\n\t /**\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._octaves = options.octaves;\n\t /**\n\t\t\t * the input gain to adjust the sensitivity\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._inputBoost = new Tone.Gain();\n\t /**\n\t\t\t * @type {BiquadFilterNode}\n\t\t\t * @private\n\t\t\t */\n\t this._bandpass = new Tone.Filter({\n\t 'rolloff': -48,\n\t 'frequency': 0,\n\t 'Q': options.Q\n\t });\n\t /**\n\t\t\t * @type {Tone.Filter}\n\t\t\t * @private\n\t\t\t */\n\t this._peaking = new Tone.Filter(0, 'peaking');\n\t this._peaking.gain.value = options.gain;\n\t /**\n\t\t\t * The gain of the filter.\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t this.gain = this._peaking.gain;\n\t /**\n\t\t\t * The quality of the filter.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.Q = this._bandpass.Q;\n\t //the control signal path\n\t this.effectSend.chain(this._inputBoost, this.follower, this._sweepRange);\n\t this._sweepRange.connect(this._bandpass.frequency);\n\t this._sweepRange.connect(this._peaking.frequency);\n\t //the filtered path\n\t this.effectSend.chain(this._bandpass, this._peaking, this.effectReturn);\n\t //set the initial value\n\t this._setSweepRange();\n\t this.sensitivity = options.sensitivity;\n\t this._readOnly([\n\t 'gain',\n\t 'Q'\n\t ]);\n\t };\n\t Tone.extend(Tone.AutoWah, Tone.Effect);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.AutoWah.defaults = {\n\t 'baseFrequency': 100,\n\t 'octaves': 6,\n\t 'sensitivity': 0,\n\t 'Q': 2,\n\t 'gain': 2,\n\t 'follower': {\n\t 'attack': 0.3,\n\t 'release': 0.5\n\t }\n\t };\n\t /**\n\t\t * The number of octaves that the filter will sweep above the\n\t\t * baseFrequency.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Number}\n\t\t * @name octaves\n\t\t */\n\t Object.defineProperty(Tone.AutoWah.prototype, 'octaves', {\n\t get: function () {\n\t return this._octaves;\n\t },\n\t set: function (octaves) {\n\t this._octaves = octaves;\n\t this._setSweepRange();\n\t }\n\t });\n\t /**\n\t\t * The base frequency from which the sweep will start from.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Frequency}\n\t\t * @name baseFrequency\n\t\t */\n\t Object.defineProperty(Tone.AutoWah.prototype, 'baseFrequency', {\n\t get: function () {\n\t return this._baseFrequency;\n\t },\n\t set: function (baseFreq) {\n\t this._baseFrequency = baseFreq;\n\t this._setSweepRange();\n\t }\n\t });\n\t /**\n\t\t * The sensitivity to control how responsive to the input signal the filter is.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Decibels}\n\t\t * @name sensitivity\n\t\t */\n\t Object.defineProperty(Tone.AutoWah.prototype, 'sensitivity', {\n\t get: function () {\n\t return Tone.gainToDb(1 / this._inputBoost.gain.value);\n\t },\n\t set: function (sensitivy) {\n\t this._inputBoost.gain.value = 1 / Tone.dbToGain(sensitivy);\n\t }\n\t });\n\t /**\n\t\t * sets the sweep range of the scaler\n\t\t * @private\n\t\t */\n\t Tone.AutoWah.prototype._setSweepRange = function () {\n\t this._sweepRange.min = this._baseFrequency;\n\t this._sweepRange.max = Math.min(this._baseFrequency * Math.pow(2, this._octaves), this.context.sampleRate / 2);\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.AutoWah} this\n\t\t */\n\t Tone.AutoWah.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this.follower.dispose();\n\t this.follower = null;\n\t this._sweepRange.dispose();\n\t this._sweepRange = null;\n\t this._bandpass.dispose();\n\t this._bandpass = null;\n\t this._peaking.dispose();\n\t this._peaking = null;\n\t this._inputBoost.dispose();\n\t this._inputBoost = null;\n\t this._writable([\n\t 'gain',\n\t 'Q'\n\t ]);\n\t this.gain = null;\n\t this.Q = null;\n\t return this;\n\t };\n\t return Tone.AutoWah;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Signal-rate modulo operator. Only works in AudioRange [-1, 1] and for modulus\n\t\t * values in the NormalRange.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @param {NormalRange} modulus The modulus to apply.\n\t\t * @example\n\t\t * var mod = new Tone.Modulo(0.2)\n\t\t * var sig = new Tone.Signal(0.5).connect(mod);\n\t\t * //mod outputs 0.1\n\t\t */\n\t Tone.Modulo = function (modulus) {\n\t Tone.SignalBase.call(this);\n\t this.createInsOuts(1, 0);\n\t /**\n\t\t\t * A waveshaper gets the integer multiple of\n\t\t\t * the input signal and the modulus.\n\t\t\t * @private\n\t\t\t * @type {Tone.WaveShaper}\n\t\t\t */\n\t this._shaper = new Tone.WaveShaper(Math.pow(2, 16));\n\t /**\n\t\t\t * the integer multiple is multiplied by the modulus\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._multiply = new Tone.Multiply();\n\t /**\n\t\t\t * and subtracted from the input signal\n\t\t\t * @type {Tone.Subtract}\n\t\t\t * @private\n\t\t\t */\n\t this._subtract = this.output = new Tone.Subtract();\n\t /**\n\t\t\t * the modulus signal\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t this._modSignal = new Tone.Signal(modulus);\n\t //connections\n\t this.input.fan(this._shaper, this._subtract);\n\t this._modSignal.connect(this._multiply, 0, 0);\n\t this._shaper.connect(this._multiply, 0, 1);\n\t this._multiply.connect(this._subtract, 0, 1);\n\t this._setWaveShaper(modulus);\n\t };\n\t Tone.extend(Tone.Modulo, Tone.SignalBase);\n\t /**\n\t\t * @param {number} mod the modulus to apply\n\t\t * @private\n\t\t */\n\t Tone.Modulo.prototype._setWaveShaper = function (mod) {\n\t this._shaper.setMap(function (val) {\n\t var multiple = Math.floor((val + 0.0001) / mod);\n\t return multiple;\n\t });\n\t };\n\t /**\n\t\t * The modulus value.\n\t\t * @memberOf Tone.Modulo#\n\t\t * @type {NormalRange}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.Modulo.prototype, 'value', {\n\t get: function () {\n\t return this._modSignal.value;\n\t },\n\t set: function (mod) {\n\t this._modSignal.value = mod;\n\t this._setWaveShaper(mod);\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Modulo} this\n\t\t */\n\t Tone.Modulo.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._shaper.dispose();\n\t this._shaper = null;\n\t this._multiply.dispose();\n\t this._multiply = null;\n\t this._subtract.dispose();\n\t this._subtract = null;\n\t this._modSignal.dispose();\n\t this._modSignal = null;\n\t return this;\n\t };\n\t return Tone.Modulo;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Bitcrusher downsamples the incoming signal to a different bitdepth.\n\t\t * Lowering the bitdepth of the signal creates distortion. Read more about Bitcrushing\n\t\t * on [Wikipedia](https://en.wikipedia.org/wiki/Bitcrusher).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {Number} bits The number of bits to downsample the signal. Nominal range\n\t\t * of 1 to 8.\n\t\t * @example\n\t\t * //initialize crusher and route a synth through it\n\t\t * var crusher = new Tone.BitCrusher(4).toMaster();\n\t\t * var synth = new Tone.MonoSynth().connect(crusher);\n\t\t */\n\t Tone.BitCrusher = function () {\n\t var options = Tone.defaults(arguments, ['bits'], Tone.BitCrusher);\n\t Tone.Effect.call(this, options);\n\t var invStepSize = 1 / Math.pow(2, options.bits - 1);\n\t /**\n\t\t\t * Subtract the input signal and the modulus of the input signal\n\t\t\t * @type {Tone.Subtract}\n\t\t\t * @private\n\t\t\t */\n\t this._subtract = new Tone.Subtract();\n\t /**\n\t\t\t * The mod function\n\t\t\t * @type {Tone.Modulo}\n\t\t\t * @private\n\t\t\t */\n\t this._modulo = new Tone.Modulo(invStepSize);\n\t /**\n\t\t\t * keeps track of the bits\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._bits = options.bits;\n\t //connect it up\n\t this.effectSend.fan(this._subtract, this._modulo);\n\t this._modulo.connect(this._subtract, 0, 1);\n\t this._subtract.connect(this.effectReturn);\n\t };\n\t Tone.extend(Tone.BitCrusher, Tone.Effect);\n\t /**\n\t\t * the default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.BitCrusher.defaults = { 'bits': 4 };\n\t /**\n\t\t * The bit depth of the effect. Nominal range of 1-8.\n\t\t * @memberOf Tone.BitCrusher#\n\t\t * @type {number}\n\t\t * @name bits\n\t\t */\n\t Object.defineProperty(Tone.BitCrusher.prototype, 'bits', {\n\t get: function () {\n\t return this._bits;\n\t },\n\t set: function (bits) {\n\t this._bits = bits;\n\t var invStepSize = 1 / Math.pow(2, bits - 1);\n\t this._modulo.value = invStepSize;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.BitCrusher} this\n\t\t */\n\t Tone.BitCrusher.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._subtract.dispose();\n\t this._subtract = null;\n\t this._modulo.dispose();\n\t this._modulo = null;\n\t return this;\n\t };\n\t return Tone.BitCrusher;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.ChebyShev is a Chebyshev waveshaper, an effect which is good \n\t\t * for making different types of distortion sounds.\n\t\t * Note that odd orders sound very different from even ones, \n\t\t * and order = 1 is no change. \n\t\t * Read more at [music.columbia.edu](http://music.columbia.edu/cmc/musicandcomputers/chapter4/04_06.php).\n\t\t *\n\t\t * @extends {Tone.Effect}\n\t\t * @constructor\n\t\t * @param {Positive|Object} [order] The order of the chebyshev polynomial. Normal range between 1-100. \n\t\t * @example\n\t\t * //create a new cheby\n\t\t * var cheby = new Tone.Chebyshev(50);\n\t\t * //create a monosynth connected to our cheby\n\t\t * synth = new Tone.MonoSynth().connect(cheby);\n\t\t */\n\t Tone.Chebyshev = function () {\n\t var options = Tone.defaults(arguments, ['order'], Tone.Chebyshev);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._shaper = new Tone.WaveShaper(4096);\n\t /**\n\t\t\t * holds onto the order of the filter\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._order = options.order;\n\t this.connectEffect(this._shaper);\n\t this.order = options.order;\n\t this.oversample = options.oversample;\n\t };\n\t Tone.extend(Tone.Chebyshev, Tone.Effect);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Chebyshev.defaults = {\n\t 'order': 1,\n\t 'oversample': 'none'\n\t };\n\t /**\n\t\t * get the coefficient for that degree\n\t\t * @param {number} x the x value\n\t\t * @param {number} degree \n\t\t * @param {Object} memo memoize the computed value. \n\t\t * this speeds up computation greatly. \n\t\t * @return {number} the coefficient \n\t\t * @private\n\t\t */\n\t Tone.Chebyshev.prototype._getCoefficient = function (x, degree, memo) {\n\t if (memo.hasOwnProperty(degree)) {\n\t return memo[degree];\n\t } else if (degree === 0) {\n\t memo[degree] = 0;\n\t } else if (degree === 1) {\n\t memo[degree] = x;\n\t } else {\n\t memo[degree] = 2 * x * this._getCoefficient(x, degree - 1, memo) - this._getCoefficient(x, degree - 2, memo);\n\t }\n\t return memo[degree];\n\t };\n\t /**\n\t\t * The order of the Chebyshev polynomial which creates\n\t\t * the equation which is applied to the incoming \n\t\t * signal through a Tone.WaveShaper. The equations\n\t\t * are in the form:<br>\n\t\t * order 2: 2x^2 + 1<br>\n\t\t * order 3: 4x^3 + 3x <br>\n\t\t * @memberOf Tone.Chebyshev#\n\t\t * @type {Positive}\n\t\t * @name order\n\t\t */\n\t Object.defineProperty(Tone.Chebyshev.prototype, 'order', {\n\t get: function () {\n\t return this._order;\n\t },\n\t set: function (order) {\n\t this._order = order;\n\t var curve = new Array(4096);\n\t var len = curve.length;\n\t for (var i = 0; i < len; ++i) {\n\t var x = i * 2 / len - 1;\n\t if (x === 0) {\n\t //should output 0 when input is 0\n\t curve[i] = 0;\n\t } else {\n\t curve[i] = this._getCoefficient(x, order, {});\n\t }\n\t }\n\t this._shaper.curve = curve;\n\t }\n\t });\n\t /**\n\t\t * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.Chebyshev#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t Object.defineProperty(Tone.Chebyshev.prototype, 'oversample', {\n\t get: function () {\n\t return this._shaper.oversample;\n\t },\n\t set: function (oversampling) {\n\t this._shaper.oversample = oversampling;\n\t }\n\t });\n\t /**\n\t\t * Clean up. \n\t\t * @returns {Tone.Chebyshev} this\n\t\t */\n\t Tone.Chebyshev.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._shaper.dispose();\n\t this._shaper = null;\n\t return this;\n\t };\n\t return Tone.Chebyshev;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Base class for Stereo effects. Provides effectSendL/R and effectReturnL/R.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.Effect}\n\t\t */\n\t Tone.StereoEffect = function () {\n\t //get the defaults\n\t Tone.AudioNode.call(this);\n\t var options = Tone.defaults(arguments, ['wet'], Tone.Effect);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * the drywet knob to control the amount of effect\n\t\t\t * @type {Tone.CrossFade}\n\t\t\t * @private\n\t\t\t */\n\t this._dryWet = new Tone.CrossFade(options.wet);\n\t /**\n\t\t\t * The wet control, i.e. how much of the effected\n\t\t\t * will pass through to the output.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.wet = this._dryWet.fade;\n\t /**\n\t\t\t * then split it\n\t\t\t * @type {Tone.Split}\n\t\t\t * @private\n\t\t\t */\n\t this._split = new Tone.Split();\n\t /**\n\t\t\t * the effects send LEFT\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.effectSendL = this._split.left;\n\t /**\n\t\t\t * the effects send RIGHT\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.effectSendR = this._split.right;\n\t /**\n\t\t\t * the stereo effect merger\n\t\t\t * @type {Tone.Merge}\n\t\t\t * @private\n\t\t\t */\n\t this._merge = new Tone.Merge();\n\t /**\n\t\t\t * the effect return LEFT\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.effectReturnL = this._merge.left;\n\t /**\n\t\t\t * the effect return RIGHT\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.effectReturnR = this._merge.right;\n\t //connections\n\t this.input.connect(this._split);\n\t //dry wet connections\n\t this.input.connect(this._dryWet, 0, 0);\n\t this._merge.connect(this._dryWet, 0, 1);\n\t this._dryWet.connect(this.output);\n\t this._readOnly(['wet']);\n\t };\n\t Tone.extend(Tone.StereoEffect, Tone.Effect);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.StereoEffect} this\n\t\t */\n\t Tone.StereoEffect.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._dryWet.dispose();\n\t this._dryWet = null;\n\t this._split.dispose();\n\t this._split = null;\n\t this._merge.dispose();\n\t this._merge = null;\n\t this.effectSendL = null;\n\t this.effectSendR = null;\n\t this.effectReturnL = null;\n\t this.effectReturnR = null;\n\t this._writable(['wet']);\n\t this.wet = null;\n\t return this;\n\t };\n\t return Tone.StereoEffect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Chorus is a stereo chorus effect composed of\n\t\t * a left and right delay with a Tone.LFO applied to the delayTime of each channel.\n\t\t * Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna/blob/master/tuna.js).\n\t\t * Read more on the chorus effect on [SoundOnSound](http://www.soundonsound.com/sos/jun04/articles/synthsecrets.htm).\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t *\t@param {Frequency|Object} [frequency] The frequency of the LFO.\n\t\t *\t@param {Milliseconds} [delayTime] The delay of the chorus effect in ms.\n\t\t *\t@param {NormalRange} [depth] The depth of the chorus.\n\t\t *\t@example\n\t\t * var chorus = new Tone.Chorus(4, 2.5, 0.5);\n\t\t * var synth = new Tone.PolySynth(4, Tone.MonoSynth).connect(chorus);\n\t\t * synth.triggerAttackRelease([\"C3\",\"E3\",\"G3\"], \"8n\");\n\t\t */\n\t Tone.Chorus = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'delayTime',\n\t 'depth'\n\t ], Tone.Chorus);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * the depth of the chorus\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._depth = options.depth;\n\t /**\n\t\t\t * the delayTime\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._delayTime = options.delayTime / 1000;\n\t /**\n\t\t\t * the lfo which controls the delayTime\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoL = new Tone.LFO({\n\t 'frequency': options.frequency,\n\t 'min': 0,\n\t 'max': 1\n\t });\n\t /**\n\t\t\t * another LFO for the right side with a 180 degree phase diff\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoR = new Tone.LFO({\n\t 'frequency': options.frequency,\n\t 'min': 0,\n\t 'max': 1,\n\t 'phase': 180\n\t });\n\t /**\n\t\t\t * delay for left\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._delayNodeL = new Tone.Delay();\n\t /**\n\t\t\t * delay for right\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._delayNodeR = new Tone.Delay();\n\t /**\n\t\t\t * The frequency of the LFO which modulates the delayTime.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._lfoL.frequency;\n\t //connections\n\t this.effectSendL.chain(this._delayNodeL, this.effectReturnL);\n\t this.effectSendR.chain(this._delayNodeR, this.effectReturnR);\n\t //and pass through to make the detune apparent\n\t this.effectSendL.connect(this.effectReturnL);\n\t this.effectSendR.connect(this.effectReturnR);\n\t //lfo setup\n\t this._lfoL.connect(this._delayNodeL.delayTime);\n\t this._lfoR.connect(this._delayNodeR.delayTime);\n\t //start the lfo\n\t this._lfoL.start();\n\t this._lfoR.start();\n\t //have one LFO frequency control the other\n\t this._lfoL.frequency.connect(this._lfoR.frequency);\n\t //set the initial values\n\t this.depth = this._depth;\n\t this.frequency.value = options.frequency;\n\t this.type = options.type;\n\t this._readOnly(['frequency']);\n\t this.spread = options.spread;\n\t };\n\t Tone.extend(Tone.Chorus, Tone.StereoEffect);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Chorus.defaults = {\n\t 'frequency': 1.5,\n\t 'delayTime': 3.5,\n\t 'depth': 0.7,\n\t 'type': 'sine',\n\t 'spread': 180\n\t };\n\t /**\n\t\t * The depth of the effect. A depth of 1 makes the delayTime\n\t\t * modulate between 0 and 2*delayTime (centered around the delayTime).\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {NormalRange}\n\t\t * @name depth\n\t\t */\n\t Object.defineProperty(Tone.Chorus.prototype, 'depth', {\n\t get: function () {\n\t return this._depth;\n\t },\n\t set: function (depth) {\n\t this._depth = depth;\n\t var deviation = this._delayTime * depth;\n\t this._lfoL.min = Math.max(this._delayTime - deviation, 0);\n\t this._lfoL.max = this._delayTime + deviation;\n\t this._lfoR.min = Math.max(this._delayTime - deviation, 0);\n\t this._lfoR.max = this._delayTime + deviation;\n\t }\n\t });\n\t /**\n\t\t * The delayTime in milliseconds of the chorus. A larger delayTime\n\t\t * will give a more pronounced effect. Nominal range a delayTime\n\t\t * is between 2 and 20ms.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {Milliseconds}\n\t\t * @name delayTime\n\t\t */\n\t Object.defineProperty(Tone.Chorus.prototype, 'delayTime', {\n\t get: function () {\n\t return this._delayTime * 1000;\n\t },\n\t set: function (delayTime) {\n\t this._delayTime = delayTime / 1000;\n\t this.depth = this._depth;\n\t }\n\t });\n\t /**\n\t\t * The oscillator type of the LFO.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.Chorus.prototype, 'type', {\n\t get: function () {\n\t return this._lfoL.type;\n\t },\n\t set: function (type) {\n\t this._lfoL.type = type;\n\t this._lfoR.type = type;\n\t }\n\t });\n\t /**\n\t\t * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n\t\t * When set to 180, LFO's will be panned hard left and right respectively.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {Degrees}\n\t\t * @name spread\n\t\t */\n\t Object.defineProperty(Tone.Chorus.prototype, 'spread', {\n\t get: function () {\n\t return this._lfoR.phase - this._lfoL.phase;\n\t },\n\t set: function (spread) {\n\t this._lfoL.phase = 90 - spread / 2;\n\t this._lfoR.phase = spread / 2 + 90;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Chorus} this\n\t\t */\n\t Tone.Chorus.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t this._lfoL.dispose();\n\t this._lfoL = null;\n\t this._lfoR.dispose();\n\t this._lfoR = null;\n\t this._delayNodeL.dispose();\n\t this._delayNodeL = null;\n\t this._delayNodeR.dispose();\n\t this._delayNodeR = null;\n\t this._writable('frequency');\n\t this.frequency = null;\n\t return this;\n\t };\n\t return Tone.Chorus;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Convolver is a wrapper around the Native Web Audio\n\t\t * [ConvolverNode](http://webaudio.github.io/web-audio-api/#the-convolvernode-interface).\n\t\t * Convolution is useful for reverb and filter emulation. Read more about convolution reverb on\n\t\t * [Wikipedia](https://en.wikipedia.org/wiki/Convolution_reverb).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {string|Tone.Buffer|Object} [url] The URL of the impulse response or the Tone.Buffer\n\t\t * contianing the impulse response.\n\t\t * @param {Function=} onload The callback to invoke when the url is loaded.\n\t\t * @example\n\t\t * //initializing the convolver with an impulse response\n\t\t * var convolver = new Tone.Convolver(\"./path/to/ir.wav\").toMaster();\n\t\t */\n\t Tone.Convolver = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'url',\n\t 'onload'\n\t ], Tone.Convolver);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * convolver node\n\t\t\t * @type {ConvolverNode}\n\t\t\t * @private\n\t\t\t */\n\t this._convolver = this.context.createConvolver();\n\t /**\n\t\t\t * the convolution buffer\n\t\t\t * @type {Tone.Buffer}\n\t\t\t * @private\n\t\t\t */\n\t this._buffer = new Tone.Buffer(options.url, function (buffer) {\n\t this._convolver.buffer = buffer.get();\n\t options.onload();\n\t }.bind(this));\n\t this.connectEffect(this._convolver);\n\t };\n\t Tone.extend(Tone.Convolver, Tone.Effect);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Convolver.defaults = { 'onload': Tone.noOp };\n\t /**\n\t\t * The convolver's buffer\n\t\t * @memberOf Tone.Convolver#\n\t\t * @type {AudioBuffer}\n\t\t * @name buffer\n\t\t */\n\t Object.defineProperty(Tone.Convolver.prototype, 'buffer', {\n\t get: function () {\n\t return this._buffer.get();\n\t },\n\t set: function (buffer) {\n\t this._buffer.set(buffer);\n\t this._convolver.buffer = this._buffer.get();\n\t }\n\t });\n\t /**\n\t\t * Load an impulse response url as an audio buffer.\n\t\t * Decodes the audio asynchronously and invokes\n\t\t * the callback once the audio buffer loads.\n\t\t * @param {string} url The url of the buffer to load.\n\t\t * filetype support depends on the\n\t\t * browser.\n\t\t * @param {function=} callback\n\t\t * @returns {Promise}\n\t\t */\n\t Tone.Convolver.prototype.load = function (url, callback) {\n\t return this._buffer.load(url, function (buff) {\n\t this.buffer = buff;\n\t if (callback) {\n\t callback();\n\t }\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Convolver} this\n\t\t */\n\t Tone.Convolver.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._convolver.disconnect();\n\t this._convolver = null;\n\t this._buffer.dispose();\n\t this._buffer = null;\n\t return this;\n\t };\n\t return Tone.Convolver;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Distortion is a simple distortion effect using Tone.WaveShaper.\n\t\t * Algorithm from [a stackoverflow answer](http://stackoverflow.com/a/22313408).\n\t\t *\n\t\t * @extends {Tone.Effect}\n\t\t * @constructor\n\t\t * @param {Number|Object} [distortion] The amount of distortion (nominal range of 0-1)\n\t\t * @example\n\t\t * var dist = new Tone.Distortion(0.8).toMaster();\n\t\t * var fm = new Tone.SimpleFM().connect(dist);\n\t\t * //this sounds good on bass notes\n\t\t * fm.triggerAttackRelease(\"A1\", \"8n\");\n\t\t */\n\t Tone.Distortion = function () {\n\t var options = Tone.defaults(arguments, ['distortion'], Tone.Distortion);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * @type {Tone.WaveShaper}\n\t\t\t * @private\n\t\t\t */\n\t this._shaper = new Tone.WaveShaper(4096);\n\t /**\n\t\t\t * holds the distortion amount\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._distortion = options.distortion;\n\t this.connectEffect(this._shaper);\n\t this.distortion = options.distortion;\n\t this.oversample = options.oversample;\n\t };\n\t Tone.extend(Tone.Distortion, Tone.Effect);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Distortion.defaults = {\n\t 'distortion': 0.4,\n\t 'oversample': 'none'\n\t };\n\t /**\n\t\t * The amount of distortion.\n\t\t * @memberOf Tone.Distortion#\n\t\t * @type {NormalRange}\n\t\t * @name distortion\n\t\t */\n\t Object.defineProperty(Tone.Distortion.prototype, 'distortion', {\n\t get: function () {\n\t return this._distortion;\n\t },\n\t set: function (amount) {\n\t this._distortion = amount;\n\t var k = amount * 100;\n\t var deg = Math.PI / 180;\n\t this._shaper.setMap(function (x) {\n\t if (Math.abs(x) < 0.001) {\n\t //should output 0 when input is 0\n\t return 0;\n\t } else {\n\t return (3 + k) * x * 20 * deg / (Math.PI + k * Math.abs(x));\n\t }\n\t });\n\t }\n\t });\n\t /**\n\t\t * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.Distortion#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t Object.defineProperty(Tone.Distortion.prototype, 'oversample', {\n\t get: function () {\n\t return this._shaper.oversample;\n\t },\n\t set: function (oversampling) {\n\t this._shaper.oversample = oversampling;\n\t }\n\t });\n\t /**\n\t\t * Clean up. \n\t\t * @returns {Tone.Distortion} this\n\t\t */\n\t Tone.Distortion.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._shaper.dispose();\n\t this._shaper = null;\n\t return this;\n\t };\n\t return Tone.Distortion;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * \t@class Tone.FeedbackEffect provides a loop between an \n\t\t * \t audio source and its own output. This is a base-class\n\t\t * \t for feedback effects. \n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {NormalRange|Object} [feedback] The initial feedback value.\n\t\t */\n\t Tone.FeedbackEffect = function () {\n\t var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * the gain which controls the feedback\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackGain = new Tone.Gain(options.feedback, Tone.Type.NormalRange);\n\t /**\n\t\t\t * The amount of signal which is fed back into the effect input. \n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.feedback = this._feedbackGain.gain;\n\t //the feedback loop\n\t this.effectReturn.chain(this._feedbackGain, this.effectSend);\n\t this._readOnly(['feedback']);\n\t };\n\t Tone.extend(Tone.FeedbackEffect, Tone.Effect);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.FeedbackEffect.defaults = { 'feedback': 0.125 };\n\t /**\n\t\t * Clean up. \n\t\t * @returns {Tone.FeedbackEffect} this\n\t\t */\n\t Tone.FeedbackEffect.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._writable(['feedback']);\n\t this._feedbackGain.dispose();\n\t this._feedbackGain = null;\n\t this.feedback = null;\n\t return this;\n\t };\n\t return Tone.FeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.FeedbackDelay is a DelayNode in which part of output\n\t\t * signal is fed back into the delay.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.FeedbackEffect}\n\t\t * @param {Time|Object} [delayTime] The delay applied to the incoming signal.\n\t\t * @param {NormalRange=} feedback The amount of the effected signal which\n\t\t * is fed back through the delay.\n\t\t * @example\n\t\t * var feedbackDelay = new Tone.FeedbackDelay(\"8n\", 0.5).toMaster();\n\t\t * var tom = new Tone.DrumSynth({\n\t\t * \t\"octaves\" : 4,\n\t\t * \t\"pitchDecay\" : 0.1\n\t\t * }).connect(feedbackDelay);\n\t\t * tom.triggerAttackRelease(\"A2\",\"32n\");\n\t\t */\n\t Tone.FeedbackDelay = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'delayTime',\n\t 'feedback'\n\t ], Tone.FeedbackDelay);\n\t Tone.FeedbackEffect.call(this, options);\n\t /**\n\t\t\t * the delay node\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._delayNode = new Tone.Delay(options.delayTime, options.maxDelay);\n\t /**\n\t\t\t * The delayTime of the DelayNode.\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = this._delayNode.delayTime;\n\t // connect it up\n\t this.connectEffect(this._delayNode);\n\t this._readOnly(['delayTime']);\n\t };\n\t Tone.extend(Tone.FeedbackDelay, Tone.FeedbackEffect);\n\t /**\n\t\t * The default values.\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.FeedbackDelay.defaults = {\n\t 'delayTime': 0.25,\n\t 'maxDelay': 1\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.FeedbackDelay} this\n\t\t */\n\t Tone.FeedbackDelay.prototype.dispose = function () {\n\t Tone.FeedbackEffect.prototype.dispose.call(this);\n\t this._delayNode.dispose();\n\t this._delayNode = null;\n\t this._writable(['delayTime']);\n\t this.delayTime = null;\n\t return this;\n\t };\n\t return Tone.FeedbackDelay;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * an array of comb filter delay values from Freeverb implementation\n\t\t * @static\n\t\t * @private\n\t\t * @type {Array}\n\t\t */\n\t var combFilterTunings = [\n\t 1557 / 44100,\n\t 1617 / 44100,\n\t 1491 / 44100,\n\t 1422 / 44100,\n\t 1277 / 44100,\n\t 1356 / 44100,\n\t 1188 / 44100,\n\t 1116 / 44100\n\t ];\n\t /**\n\t\t * an array of allpass filter frequency values from Freeverb implementation\n\t\t * @private\n\t\t * @static\n\t\t * @type {Array}\n\t\t */\n\t var allpassFilterFrequencies = [\n\t 225,\n\t 556,\n\t 441,\n\t 341\n\t ];\n\t /**\n\t\t * @class Tone.Freeverb is a reverb based on [Freeverb](https://ccrma.stanford.edu/~jos/pasp/Freeverb.html).\n\t\t * Read more on reverb on [Sound On Sound](https://web.archive.org/web/20160404083902/http://www.soundonsound.com:80/sos/feb01/articles/synthsecrets.asp).\n\t\t *\n\t\t * @extends {Tone.Effect}\n\t\t * @constructor\n\t\t * @param {NormalRange|Object} [roomSize] Correlated to the decay time.\n\t\t * @param {Frequency} [dampening] The cutoff frequency of a lowpass filter as part\n\t\t * of the reverb.\n\t\t * @example\n\t\t * var freeverb = new Tone.Freeverb().toMaster();\n\t\t * freeverb.dampening.value = 1000;\n\t\t * //routing synth through the reverb\n\t\t * var synth = new Tone.AMSynth().connect(freeverb);\n\t\t */\n\t Tone.Freeverb = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'roomSize',\n\t 'dampening'\n\t ], Tone.Freeverb);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * The roomSize value between. A larger roomSize\n\t\t\t * will result in a longer decay.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\t /**\n\t\t\t * The amount of dampening of the reverberant signal.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.dampening = new Tone.Signal(options.dampening, Tone.Type.Frequency);\n\t /**\n\t\t\t * the comb filters\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._combFilters = [];\n\t /**\n\t\t\t * the allpass filters on the left\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._allpassFiltersL = [];\n\t /**\n\t\t\t * the allpass filters on the right\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._allpassFiltersR = [];\n\t //make the allpass filters on the right\n\t for (var l = 0; l < allpassFilterFrequencies.length; l++) {\n\t var allpassL = this.context.createBiquadFilter();\n\t allpassL.type = 'allpass';\n\t allpassL.frequency.value = allpassFilterFrequencies[l];\n\t this._allpassFiltersL.push(allpassL);\n\t }\n\t //make the allpass filters on the left\n\t for (var r = 0; r < allpassFilterFrequencies.length; r++) {\n\t var allpassR = this.context.createBiquadFilter();\n\t allpassR.type = 'allpass';\n\t allpassR.frequency.value = allpassFilterFrequencies[r];\n\t this._allpassFiltersR.push(allpassR);\n\t }\n\t //make the comb filters\n\t for (var c = 0; c < combFilterTunings.length; c++) {\n\t var lfpf = new Tone.LowpassCombFilter(combFilterTunings[c]);\n\t if (c < combFilterTunings.length / 2) {\n\t this.effectSendL.chain(lfpf, this._allpassFiltersL[0]);\n\t } else {\n\t this.effectSendR.chain(lfpf, this._allpassFiltersR[0]);\n\t }\n\t this.roomSize.connect(lfpf.resonance);\n\t this.dampening.connect(lfpf.dampening);\n\t this._combFilters.push(lfpf);\n\t }\n\t //chain the allpass filters togetehr\n\t Tone.connectSeries.apply(Tone, this._allpassFiltersL);\n\t Tone.connectSeries.apply(Tone, this._allpassFiltersR);\n\t this._allpassFiltersL[this._allpassFiltersL.length - 1].connect(this.effectReturnL);\n\t this._allpassFiltersR[this._allpassFiltersR.length - 1].connect(this.effectReturnR);\n\t this._readOnly([\n\t 'roomSize',\n\t 'dampening'\n\t ]);\n\t };\n\t Tone.extend(Tone.Freeverb, Tone.StereoEffect);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Freeverb.defaults = {\n\t 'roomSize': 0.7,\n\t 'dampening': 3000\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Freeverb} this\n\t\t */\n\t Tone.Freeverb.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t for (var al = 0; al < this._allpassFiltersL.length; al++) {\n\t this._allpassFiltersL[al].disconnect();\n\t this._allpassFiltersL[al] = null;\n\t }\n\t this._allpassFiltersL = null;\n\t for (var ar = 0; ar < this._allpassFiltersR.length; ar++) {\n\t this._allpassFiltersR[ar].disconnect();\n\t this._allpassFiltersR[ar] = null;\n\t }\n\t this._allpassFiltersR = null;\n\t for (var cf = 0; cf < this._combFilters.length; cf++) {\n\t this._combFilters[cf].dispose();\n\t this._combFilters[cf] = null;\n\t }\n\t this._combFilters = null;\n\t this._writable([\n\t 'roomSize',\n\t 'dampening'\n\t ]);\n\t this.roomSize.dispose();\n\t this.roomSize = null;\n\t this.dampening.dispose();\n\t this.dampening = null;\n\t return this;\n\t };\n\t return Tone.Freeverb;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * an array of the comb filter delay time values\n\t\t * @private\n\t\t * @static\n\t\t * @type {Array}\n\t\t */\n\t var combFilterDelayTimes = [\n\t 1687 / 25000,\n\t 1601 / 25000,\n\t 2053 / 25000,\n\t 2251 / 25000\n\t ];\n\t /**\n\t\t * the resonances of each of the comb filters\n\t\t * @private\n\t\t * @static\n\t\t * @type {Array}\n\t\t */\n\t var combFilterResonances = [\n\t 0.773,\n\t 0.802,\n\t 0.753,\n\t 0.733\n\t ];\n\t /**\n\t\t * the allpass filter frequencies\n\t\t * @private\n\t\t * @static\n\t\t * @type {Array}\n\t\t */\n\t var allpassFilterFreqs = [\n\t 347,\n\t 113,\n\t 37\n\t ];\n\t /**\n\t\t * @class Tone.JCReverb is a simple [Schroeder Reverberator](https://ccrma.stanford.edu/~jos/pasp/Schroeder_Reverberators.html)\n\t\t * tuned by John Chowning in 1970.\n\t\t * It is made up of three allpass filters and four Tone.FeedbackCombFilter.\n\t\t *\n\t\t *\n\t\t * @extends {Tone.Effect}\n\t\t * @constructor\n\t\t * @param {NormalRange|Object} [roomSize] Coorelates to the decay time.\n\t\t * @example\n\t\t * var reverb = new Tone.JCReverb(0.4).connect(Tone.Master);\n\t\t * var delay = new Tone.FeedbackDelay(0.5);\n\t\t * //connecting the synth to reverb through delay\n\t\t * var synth = new Tone.DuoSynth().chain(delay, reverb);\n\t\t * synth.triggerAttackRelease(\"A4\",\"8n\");\n\t\t */\n\t Tone.JCReverb = function () {\n\t var options = Tone.defaults(arguments, ['roomSize'], Tone.JCReverb);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * room size control values between [0,1]\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\t /**\n\t\t\t * scale the room size\n\t\t\t * @type {Tone.Scale}\n\t\t\t * @private\n\t\t\t */\n\t this._scaleRoomSize = new Tone.Scale(-0.733, 0.197);\n\t /**\n\t\t\t * a series of allpass filters\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._allpassFilters = [];\n\t /**\n\t\t\t * parallel feedback comb filters\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackCombFilters = [];\n\t //make the allpass filters\n\t for (var af = 0; af < allpassFilterFreqs.length; af++) {\n\t var allpass = this.context.createBiquadFilter();\n\t allpass.type = 'allpass';\n\t allpass.frequency.value = allpassFilterFreqs[af];\n\t this._allpassFilters.push(allpass);\n\t }\n\t //and the comb filters\n\t for (var cf = 0; cf < combFilterDelayTimes.length; cf++) {\n\t var fbcf = new Tone.FeedbackCombFilter(combFilterDelayTimes[cf], 0.1);\n\t this._scaleRoomSize.connect(fbcf.resonance);\n\t fbcf.resonance.value = combFilterResonances[cf];\n\t this._allpassFilters[this._allpassFilters.length - 1].connect(fbcf);\n\t if (cf < combFilterDelayTimes.length / 2) {\n\t fbcf.connect(this.effectReturnL);\n\t } else {\n\t fbcf.connect(this.effectReturnR);\n\t }\n\t this._feedbackCombFilters.push(fbcf);\n\t }\n\t //chain the allpass filters together\n\t this.roomSize.connect(this._scaleRoomSize);\n\t Tone.connectSeries.apply(Tone, this._allpassFilters);\n\t this.effectSendL.connect(this._allpassFilters[0]);\n\t this.effectSendR.connect(this._allpassFilters[0]);\n\t this._readOnly(['roomSize']);\n\t };\n\t Tone.extend(Tone.JCReverb, Tone.StereoEffect);\n\t /**\n\t\t * the default values\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.JCReverb.defaults = { 'roomSize': 0.5 };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.JCReverb} this\n\t\t */\n\t Tone.JCReverb.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t for (var apf = 0; apf < this._allpassFilters.length; apf++) {\n\t this._allpassFilters[apf].disconnect();\n\t this._allpassFilters[apf] = null;\n\t }\n\t this._allpassFilters = null;\n\t for (var fbcf = 0; fbcf < this._feedbackCombFilters.length; fbcf++) {\n\t this._feedbackCombFilters[fbcf].dispose();\n\t this._feedbackCombFilters[fbcf] = null;\n\t }\n\t this._feedbackCombFilters = null;\n\t this._writable(['roomSize']);\n\t this.roomSize.dispose();\n\t this.roomSize = null;\n\t this._scaleRoomSize.dispose();\n\t this._scaleRoomSize = null;\n\t return this;\n\t };\n\t return Tone.JCReverb;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Mid/Side processing separates the the 'mid' signal\n\t\t * (which comes out of both the left and the right channel)\n\t\t * and the 'side' (which only comes out of the the side channels)\n\t\t * and effects them separately before being recombined.\n\t\t * Applies a Mid/Side seperation and recombination.\n\t\t * Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n\t\t * <br><br>\n\t\t * This is a base-class for Mid/Side Effects.\n\t\t *\n\t\t * @extends {Tone.Effect}\n\t\t * @constructor\n\t\t */\n\t Tone.MidSideEffect = function () {\n\t Tone.Effect.apply(this, arguments);\n\t /**\n\t\t\t * The mid/side split\n\t\t\t * @type {Tone.MidSideSplit}\n\t\t\t * @private\n\t\t\t */\n\t this._midSideSplit = new Tone.MidSideSplit();\n\t /**\n\t\t\t * The mid/side merge\n\t\t\t * @type {Tone.MidSideMerge}\n\t\t\t * @private\n\t\t\t */\n\t this._midSideMerge = new Tone.MidSideMerge();\n\t /**\n\t\t\t * The mid send. Connect to mid processing\n\t\t\t * @type {Tone}\n\t\t\t * @private\n\t\t\t */\n\t this.midSend = this._midSideSplit.mid;\n\t /**\n\t\t\t * The side send. Connect to side processing\n\t\t\t * @type {Tone}\n\t\t\t * @private\n\t\t\t */\n\t this.sideSend = this._midSideSplit.side;\n\t /**\n\t\t\t * The mid return connection\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.midReturn = this._midSideMerge.mid;\n\t /**\n\t\t\t * The side return connection\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.sideReturn = this._midSideMerge.side;\n\t //the connections\n\t this.effectSend.connect(this._midSideSplit);\n\t this._midSideMerge.connect(this.effectReturn);\n\t };\n\t Tone.extend(Tone.MidSideEffect, Tone.Effect);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.MidSideEffect} this\n\t\t */\n\t Tone.MidSideEffect.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._midSideSplit.dispose();\n\t this._midSideSplit = null;\n\t this._midSideMerge.dispose();\n\t this._midSideMerge = null;\n\t this.midSend = null;\n\t this.sideSend = null;\n\t this.midReturn = null;\n\t this.sideReturn = null;\n\t return this;\n\t };\n\t return Tone.MidSideEffect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Phaser is a phaser effect. Phasers work by changing the phase\n\t\t * of different frequency components of an incoming signal. Read more on\n\t\t * [Wikipedia](https://en.wikipedia.org/wiki/Phaser_(effect)).\n\t\t * Inspiration for this phaser comes from [Tuna.js](https://github.com/Dinahmoe/tuna/).\n\t\t *\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t *\t@constructor\n\t\t *\t@param {Frequency|Object} [frequency] The speed of the phasing.\n\t\t *\t@param {number} [octaves] The octaves of the effect.\n\t\t *\t@param {Frequency} [baseFrequency] The base frequency of the filters.\n\t\t *\t@example\n\t\t * var phaser = new Tone.Phaser({\n\t\t * \t\"frequency\" : 15,\n\t\t * \t\"octaves\" : 5,\n\t\t * \t\"baseFrequency\" : 1000\n\t\t * }).toMaster();\n\t\t * var synth = new Tone.FMSynth().connect(phaser);\n\t\t * synth.triggerAttackRelease(\"E3\", \"2n\");\n\t\t */\n\t Tone.Phaser = function () {\n\t //set the defaults\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'octaves',\n\t 'baseFrequency'\n\t ], Tone.Phaser);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * the lfo which controls the frequency on the left side\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoL = new Tone.LFO(options.frequency, 0, 1);\n\t /**\n\t\t\t * the lfo which controls the frequency on the right side\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoR = new Tone.LFO(options.frequency, 0, 1);\n\t this._lfoR.phase = 180;\n\t /**\n\t\t\t * the base modulation frequency\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._baseFrequency = options.baseFrequency;\n\t /**\n\t\t\t * the octaves of the phasing\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._octaves = options.octaves;\n\t /**\n\t\t\t * The quality factor of the filters\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.Q = new Tone.Signal(options.Q, Tone.Type.Positive);\n\t /**\n\t\t\t * the array of filters for the left side\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._filtersL = this._makeFilters(options.stages, this._lfoL, this.Q);\n\t /**\n\t\t\t * the array of filters for the left side\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._filtersR = this._makeFilters(options.stages, this._lfoR, this.Q);\n\t /**\n\t\t\t * the frequency of the effect\n\t\t\t * @type {Tone.Signal}\n\t\t\t */\n\t this.frequency = this._lfoL.frequency;\n\t this.frequency.value = options.frequency;\n\t //connect them up\n\t this.effectSendL.connect(this._filtersL[0]);\n\t this.effectSendR.connect(this._filtersR[0]);\n\t this._filtersL[options.stages - 1].connect(this.effectReturnL);\n\t this._filtersR[options.stages - 1].connect(this.effectReturnR);\n\t //control the frequency with one LFO\n\t this._lfoL.frequency.connect(this._lfoR.frequency);\n\t //set the options\n\t this.baseFrequency = options.baseFrequency;\n\t this.octaves = options.octaves;\n\t //start the lfo\n\t this._lfoL.start();\n\t this._lfoR.start();\n\t this._readOnly([\n\t 'frequency',\n\t 'Q'\n\t ]);\n\t };\n\t Tone.extend(Tone.Phaser, Tone.StereoEffect);\n\t /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {object}\n\t\t */\n\t Tone.Phaser.defaults = {\n\t 'frequency': 0.5,\n\t 'octaves': 3,\n\t 'stages': 10,\n\t 'Q': 10,\n\t 'baseFrequency': 350\n\t };\n\t /**\n\t\t * @param {number} stages\n\t\t * @returns {Array} the number of filters all connected together\n\t\t * @private\n\t\t */\n\t Tone.Phaser.prototype._makeFilters = function (stages, connectToFreq, Q) {\n\t var filters = new Array(stages);\n\t //make all the filters\n\t for (var i = 0; i < stages; i++) {\n\t var filter = this.context.createBiquadFilter();\n\t filter.type = 'allpass';\n\t Q.connect(filter.Q);\n\t connectToFreq.connect(filter.frequency);\n\t filters[i] = filter;\n\t }\n\t Tone.connectSeries.apply(Tone, filters);\n\t return filters;\n\t };\n\t /**\n\t\t * The number of octaves the phase goes above\n\t\t * the baseFrequency\n\t\t * @memberOf Tone.Phaser#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t Object.defineProperty(Tone.Phaser.prototype, 'octaves', {\n\t get: function () {\n\t return this._octaves;\n\t },\n\t set: function (octaves) {\n\t this._octaves = octaves;\n\t var max = this._baseFrequency * Math.pow(2, octaves);\n\t this._lfoL.max = max;\n\t this._lfoR.max = max;\n\t }\n\t });\n\t /**\n\t\t * The the base frequency of the filters.\n\t\t * @memberOf Tone.Phaser#\n\t\t * @type {number}\n\t\t * @name baseFrequency\n\t\t */\n\t Object.defineProperty(Tone.Phaser.prototype, 'baseFrequency', {\n\t get: function () {\n\t return this._baseFrequency;\n\t },\n\t set: function (freq) {\n\t this._baseFrequency = freq;\n\t this._lfoL.min = freq;\n\t this._lfoR.min = freq;\n\t this.octaves = this._octaves;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Phaser} this\n\t\t */\n\t Tone.Phaser.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'Q'\n\t ]);\n\t this.Q.dispose();\n\t this.Q = null;\n\t this._lfoL.dispose();\n\t this._lfoL = null;\n\t this._lfoR.dispose();\n\t this._lfoR = null;\n\t for (var i = 0; i < this._filtersL.length; i++) {\n\t this._filtersL[i].disconnect();\n\t this._filtersL[i] = null;\n\t }\n\t this._filtersL = null;\n\t for (var j = 0; j < this._filtersR.length; j++) {\n\t this._filtersR[j].disconnect();\n\t this._filtersR[j] = null;\n\t }\n\t this._filtersR = null;\n\t this.frequency = null;\n\t return this;\n\t };\n\t return Tone.Phaser;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Just like a stereo feedback effect, but the feedback is routed from left to right\n\t\t * and right to left instead of on the same channel.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t */\n\t Tone.StereoXFeedbackEffect = function () {\n\t var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * The amount of feedback from the output\n\t\t\t * back into the input of the effect (routed\n\t\t\t * across left and right channels).\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\t /**\n\t\t\t * the left side feeback\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackLR = new Tone.Gain();\n\t /**\n\t\t\t * the right side feeback\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackRL = new Tone.Gain();\n\t //connect it up\n\t this.effectReturnL.chain(this._feedbackLR, this.effectSendR);\n\t this.effectReturnR.chain(this._feedbackRL, this.effectSendL);\n\t this.feedback.fan(this._feedbackLR.gain, this._feedbackRL.gain);\n\t this._readOnly(['feedback']);\n\t };\n\t Tone.extend(Tone.StereoXFeedbackEffect, Tone.StereoEffect);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.StereoXFeedbackEffect} this\n\t\t */\n\t Tone.StereoXFeedbackEffect.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t this._writable(['feedback']);\n\t this.feedback.dispose();\n\t this.feedback = null;\n\t this._feedbackLR.dispose();\n\t this._feedbackLR = null;\n\t this._feedbackRL.dispose();\n\t this._feedbackRL = null;\n\t return this;\n\t };\n\t return Tone.StereoXFeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PingPongDelay is a feedback delay effect where the echo is heard\n\t\t * first in one channel and next in the opposite channel. In a stereo\n\t\t * system these are the right and left channels.\n\t\t * PingPongDelay in more simplified terms is two Tone.FeedbackDelays\n\t\t * with independent delay values. Each delay is routed to one channel\n\t\t * (left or right), and the channel triggered second will always\n\t\t * trigger at the same interval after the first.\n\t\t *\n\t\t * \t@constructor\n\t\t * \t@extends {Tone.StereoXFeedbackEffect}\n\t\t * @param {Time|Object} [delayTime] The delayTime between consecutive echos.\n\t\t * @param {NormalRange=} feedback The amount of the effected signal which\n\t\t * is fed back through the delay.\n\t\t * @example\n\t\t * var pingPong = new Tone.PingPongDelay(\"4n\", 0.2).toMaster();\n\t\t * var drum = new Tone.DrumSynth().connect(pingPong);\n\t\t * drum.triggerAttackRelease(\"C4\", \"32n\");\n\t\t */\n\t Tone.PingPongDelay = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'delayTime',\n\t 'feedback'\n\t ], Tone.PingPongDelay);\n\t Tone.StereoXFeedbackEffect.call(this, options);\n\t /**\n\t\t\t * the delay node on the left side\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._leftDelay = new Tone.Delay(0, options.maxDelayTime);\n\t /**\n\t\t\t * the delay node on the right side\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._rightDelay = new Tone.Delay(0, options.maxDelayTime);\n\t /**\n\t\t\t * the predelay on the right side\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._rightPreDelay = new Tone.Delay(0, options.maxDelayTime);\n\t /**\n\t\t\t * the delay time signal\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = new Tone.Signal(options.delayTime, Tone.Type.Time);\n\t //connect it up\n\t this.effectSendL.chain(this._leftDelay, this.effectReturnL);\n\t this.effectSendR.chain(this._rightPreDelay, this._rightDelay, this.effectReturnR);\n\t this.delayTime.fan(this._leftDelay.delayTime, this._rightDelay.delayTime, this._rightPreDelay.delayTime);\n\t //rearranged the feedback to be after the rightPreDelay\n\t this._feedbackLR.disconnect();\n\t this._feedbackLR.connect(this._rightDelay);\n\t this._readOnly(['delayTime']);\n\t };\n\t Tone.extend(Tone.PingPongDelay, Tone.StereoXFeedbackEffect);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.PingPongDelay.defaults = {\n\t 'delayTime': 0.25,\n\t 'maxDelayTime': 1\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.PingPongDelay} this\n\t\t */\n\t Tone.PingPongDelay.prototype.dispose = function () {\n\t Tone.StereoXFeedbackEffect.prototype.dispose.call(this);\n\t this._leftDelay.dispose();\n\t this._leftDelay = null;\n\t this._rightDelay.dispose();\n\t this._rightDelay = null;\n\t this._rightPreDelay.dispose();\n\t this._rightPreDelay = null;\n\t this._writable(['delayTime']);\n\t this.delayTime.dispose();\n\t this.delayTime = null;\n\t return this;\n\t };\n\t return Tone.PingPongDelay;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PitchShift does near-realtime pitch shifting to the incoming signal.\n\t\t * The effect is achieved by speeding up or slowing down the delayTime\n\t\t * of a DelayNode using a sawtooth wave.\n\t\t * Algorithm found in [this pdf](http://dsp-book.narod.ru/soundproc.pdf).\n\t\t * Additional reference by [Miller Pucket](http://msp.ucsd.edu/techniques/v0.11/book-html/node115.html).\n\t\t *\n\t\t * @extends {Tone.FeedbackEffect}\n\t\t * @param {Interval=} pitch The interval to transpose the incoming signal by.\n\t\t */\n\t Tone.PitchShift = function () {\n\t var options = Tone.defaults(arguments, ['pitch'], Tone.PitchShift);\n\t Tone.FeedbackEffect.call(this, options);\n\t /**\n\t\t\t * The pitch signal\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t this._frequency = new Tone.Signal(0);\n\t /**\n\t\t\t * Uses two DelayNodes to cover up the jump in\n\t\t\t * the sawtooth wave.\n\t\t\t * @type {DelayNode}\n\t\t\t * @private\n\t\t\t */\n\t this._delayA = new Tone.Delay(0, 1);\n\t /**\n\t\t\t * The first LFO.\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoA = new Tone.LFO({\n\t 'min': 0,\n\t 'max': 0.1,\n\t 'type': 'sawtooth'\n\t }).connect(this._delayA.delayTime);\n\t /**\n\t\t\t * The second DelayNode\n\t\t\t * @type {DelayNode}\n\t\t\t * @private\n\t\t\t */\n\t this._delayB = new Tone.Delay(0, 1);\n\t /**\n\t\t\t * The first LFO.\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoB = new Tone.LFO({\n\t 'min': 0,\n\t 'max': 0.1,\n\t 'type': 'sawtooth',\n\t 'phase': 180\n\t }).connect(this._delayB.delayTime);\n\t /**\n\t\t\t * Crossfade quickly between the two delay lines\n\t\t\t * to cover up the jump in the sawtooth wave\n\t\t\t * @type {Tone.CrossFade}\n\t\t\t * @private\n\t\t\t */\n\t this._crossFade = new Tone.CrossFade();\n\t /**\n\t\t\t * LFO which alternates between the two\n\t\t\t * delay lines to cover up the disparity in the\n\t\t\t * sawtooth wave.\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._crossFadeLFO = new Tone.LFO({\n\t 'min': 0,\n\t 'max': 1,\n\t 'type': 'triangle',\n\t 'phase': 90\n\t }).connect(this._crossFade.fade);\n\t /**\n\t\t\t * The delay node\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackDelay = new Tone.Delay(options.delayTime);\n\t /**\n\t\t\t * The amount of delay on the input signal\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = this._feedbackDelay.delayTime;\n\t this._readOnly('delayTime');\n\t /**\n\t\t\t * Hold the current pitch\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._pitch = options.pitch;\n\t /**\n\t\t\t * Hold the current windowSize\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._windowSize = options.windowSize;\n\t //connect the two delay lines up\n\t this._delayA.connect(this._crossFade.a);\n\t this._delayB.connect(this._crossFade.b);\n\t //connect the frequency\n\t this._frequency.fan(this._lfoA.frequency, this._lfoB.frequency, this._crossFadeLFO.frequency);\n\t //route the input\n\t this.effectSend.fan(this._delayA, this._delayB);\n\t this._crossFade.chain(this._feedbackDelay, this.effectReturn);\n\t //start the LFOs at the same time\n\t var now = this.now();\n\t this._lfoA.start(now);\n\t this._lfoB.start(now);\n\t this._crossFadeLFO.start(now);\n\t //set the initial value\n\t this.windowSize = this._windowSize;\n\t };\n\t Tone.extend(Tone.PitchShift, Tone.FeedbackEffect);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.PitchShift.defaults = {\n\t 'pitch': 0,\n\t 'windowSize': 0.1,\n\t 'delayTime': 0,\n\t 'feedback': 0\n\t };\n\t /**\n\t\t * Repitch the incoming signal by some interval (measured\n\t\t * in semi-tones).\n\t\t * @memberOf Tone.PitchShift#\n\t\t * @type {Interval}\n\t\t * @name pitch\n\t\t * @example\n\t\t * pitchShift.pitch = -12; //down one octave\n\t\t * pitchShift.pitch = 7; //up a fifth\n\t\t */\n\t Object.defineProperty(Tone.PitchShift.prototype, 'pitch', {\n\t get: function () {\n\t return this._pitch;\n\t },\n\t set: function (interval) {\n\t this._pitch = interval;\n\t var factor = 0;\n\t if (interval < 0) {\n\t this._lfoA.min = 0;\n\t this._lfoA.max = this._windowSize;\n\t this._lfoB.min = 0;\n\t this._lfoB.max = this._windowSize;\n\t factor = Tone.intervalToFrequencyRatio(interval - 1) + 1;\n\t } else {\n\t this._lfoA.min = this._windowSize;\n\t this._lfoA.max = 0;\n\t this._lfoB.min = this._windowSize;\n\t this._lfoB.max = 0;\n\t factor = Tone.intervalToFrequencyRatio(interval) - 1;\n\t }\n\t this._frequency.value = factor * (1.2 / this._windowSize);\n\t }\n\t });\n\t /**\n\t\t * The window size corresponds roughly to the sample length in a looping sampler.\n\t\t * Smaller values are desirable for a less noticeable delay time of the pitch shifted\n\t\t * signal, but larger values will result in smoother pitch shifting for larger intervals.\n\t\t * A nominal range of 0.03 to 0.1 is recommended.\n\t\t * @memberOf Tone.PitchShift#\n\t\t * @type {Time}\n\t\t * @name windowSize\n\t\t * @example\n\t\t * pitchShift.windowSize = 0.1;\n\t\t */\n\t Object.defineProperty(Tone.PitchShift.prototype, 'windowSize', {\n\t get: function () {\n\t return this._windowSize;\n\t },\n\t set: function (size) {\n\t this._windowSize = this.toSeconds(size);\n\t this.pitch = this._pitch;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.PitchShift} this\n\t\t */\n\t Tone.PitchShift.prototype.dispose = function () {\n\t Tone.FeedbackEffect.prototype.dispose.call(this);\n\t this._frequency.dispose();\n\t this._frequency = null;\n\t this._delayA.disconnect();\n\t this._delayA = null;\n\t this._delayB.disconnect();\n\t this._delayB = null;\n\t this._lfoA.dispose();\n\t this._lfoA = null;\n\t this._lfoB.dispose();\n\t this._lfoB = null;\n\t this._crossFade.dispose();\n\t this._crossFade = null;\n\t this._crossFadeLFO.dispose();\n\t this._crossFadeLFO = null;\n\t this._writable('delayTime');\n\t this._feedbackDelay.dispose();\n\t this._feedbackDelay = null;\n\t this.delayTime = null;\n\t return this;\n\t };\n\t return Tone.PitchShift;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Wrapper around the native BufferSourceNode.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {AudioBuffer|Tone.Buffer} buffer The buffer to play\n\t\t * @param {Function} onload The callback to invoke when the\n\t\t * buffer is done playing.\n\t\t */\n\t Tone.BufferSource = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'buffer',\n\t 'onload'\n\t ], Tone.BufferSource);\n\t Tone.AudioNode.call(this, options);\n\t /**\n\t\t\t * The callback to invoke after the\n\t\t\t * buffer source is done playing.\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.onended = options.onended;\n\t /**\n\t\t\t * The time that the buffer was started.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._startTime = -1;\n\t /**\n\t\t\t * An additional flag if the actual BufferSourceNode\n\t\t\t * has been started. b/c stopping an unstarted buffer\n\t\t\t * will throw it into an invalid state\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t this._sourceStarted = false;\n\t /**\n\t\t\t * Flag if the source has already been stopped\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t this._sourceStopped = false;\n\t /**\n\t\t\t * The time that the buffer is scheduled to stop.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._stopTime = -1;\n\t /**\n\t\t\t * The gain node which envelopes the BufferSource\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._gainNode = this.output = new Tone.Gain();\n\t /**\n\t\t\t * The buffer source\n\t\t\t * @type {AudioBufferSourceNode}\n\t\t\t * @private\n\t\t\t */\n\t this._source = this.context.createBufferSource();\n\t this._source.connect(this._gainNode);\n\t this._source.onended = this._onended.bind(this);\n\t /**\n\t\t\t * The private buffer instance\n\t\t\t * @type {Tone.Buffer}\n\t\t\t * @private\n\t\t\t */\n\t this._buffer = new Tone.Buffer(options.buffer, options.onload);\n\t /**\n\t\t\t * The playbackRate of the buffer\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.playbackRate = new Tone.Param(this._source.playbackRate, Tone.Type.Positive);\n\t /**\n\t\t\t * The fadeIn time of the amplitude envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.fadeIn = options.fadeIn;\n\t /**\n\t\t\t * The fadeOut time of the amplitude envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.fadeOut = options.fadeOut;\n\t /**\n\t\t\t * The curve applied to the fades, either \"linear\" or \"exponential\"\n\t\t\t * @type {String}\n\t\t\t */\n\t this.curve = options.curve;\n\t /**\n\t\t\t * The value that the buffer ramps to\n\t\t\t * @type {Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._gain = 1;\n\t /**\n\t\t\t * The onended timeout\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._onendedTimeout = -1;\n\t //set some values initially\n\t this.loop = options.loop;\n\t this.loopStart = options.loopStart;\n\t this.loopEnd = options.loopEnd;\n\t this.playbackRate.value = options.playbackRate;\n\t };\n\t Tone.extend(Tone.BufferSource, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.BufferSource.defaults = {\n\t 'onended': Tone.noOp,\n\t 'onload': Tone.noOp,\n\t 'loop': false,\n\t 'loopStart': 0,\n\t 'loopEnd': 0,\n\t 'fadeIn': 0,\n\t 'fadeOut': 0,\n\t 'curve': 'linear',\n\t 'playbackRate': 1\n\t };\n\t /**\n\t\t * Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.BufferSource.prototype, 'state', {\n\t get: function () {\n\t var now = this.now();\n\t if (this._startTime !== -1 && now >= this._startTime && !this._sourceStopped) {\n\t return Tone.State.Started;\n\t } else {\n\t return Tone.State.Stopped;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Start the buffer\n\t\t * @param {Time} [startTime=now] When the player should start.\n\t\t * @param {Time} [offset=0] The offset from the beginning of the sample\n\t\t * to start at.\n\t\t * @param {Time=} duration How long the sample should play. If no duration\n\t\t * is given, it will default to the full length\n\t\t * of the sample (minus any offset)\n\t\t * @param {Gain} [gain=1] The gain to play the buffer back at.\n\t\t * @param {Time=} fadeInTime The optional fadeIn ramp time.\n\t\t * @return {Tone.BufferSource} this\n\t\t */\n\t Tone.BufferSource.prototype.start = function (time, offset, duration, gain, fadeInTime) {\n\t if (this._startTime !== -1) {\n\t throw new Error('Tone.BufferSource can only be started once.');\n\t }\n\t if (this.buffer.loaded) {\n\t time = this.toSeconds(time);\n\t //if it's a loop the default offset is the loopstart point\n\t if (this.loop) {\n\t offset = Tone.defaultArg(offset, this.loopStart);\n\t } else {\n\t //otherwise the default offset is 0\n\t offset = Tone.defaultArg(offset, 0);\n\t }\n\t offset = this.toSeconds(offset);\n\t gain = Tone.defaultArg(gain, 1);\n\t this._gain = gain;\n\t fadeInTime = this.toSeconds(Tone.defaultArg(fadeInTime, this.fadeIn));\n\t this.fadeIn = fadeInTime;\n\t if (fadeInTime > 0) {\n\t this._gainNode.gain.setValueAtTime(0, time);\n\t if (this.curve === 'linear') {\n\t this._gainNode.gain.linearRampToValueAtTime(this._gain, time + fadeInTime);\n\t } else {\n\t this._gainNode.gain.exponentialApproachValueAtTime(this._gain, time, fadeInTime);\n\t }\n\t } else {\n\t this._gainNode.gain.setValueAtTime(gain, time);\n\t }\n\t this._startTime = time;\n\t var computedDur = this.toSeconds(Tone.defaultArg(duration, this.buffer.duration - offset % this.buffer.duration));\n\t computedDur = Math.max(computedDur, 0);\n\t if (!Tone.isUndef(duration)) {\n\t //clip the duration when not looping\n\t if (!this.loop) {\n\t computedDur = Math.min(computedDur, this.buffer.duration - offset % this.buffer.duration);\n\t }\n\t this.stop(time + computedDur, this.fadeOut);\n\t }\n\t //start the buffer source\n\t if (this.loop) {\n\t //modify the offset if it's greater than the loop time\n\t var loopEnd = this.loopEnd || this.buffer.duration;\n\t var loopStart = this.loopStart;\n\t var loopDuration = loopEnd - loopStart;\n\t //move the offset back\n\t if (offset > loopEnd) {\n\t offset = (offset - loopStart) % loopDuration + loopStart;\n\t }\n\t }\n\t this._source.buffer = this.buffer.get();\n\t this._source.loopEnd = this.loopEnd || this.buffer.duration;\n\t Tone.isPast(time);\n\t if (offset < this.buffer.duration) {\n\t this._sourceStarted = true;\n\t this._source.start(time, offset);\n\t }\n\t } else {\n\t throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop the buffer. Optionally add a ramp time to fade the\n\t\t * buffer out.\n\t\t * @param {Time=} time The time the buffer should stop.\n\t\t * @param {Time=} fadeOutTime How long the gain should fade out for\n\t\t * @return {Tone.BufferSource} this\n\t\t */\n\t Tone.BufferSource.prototype.stop = function (time, fadeOutTime) {\n\t if (this.buffer.loaded) {\n\t time = this.toSeconds(time);\n\t //if this is before the previous stop\n\t if (this._stopTime === -1 || this._stopTime > time) {\n\t //stop if it's schedule before the start time\n\t if (time <= this._startTime) {\n\t this._gainNode.gain.cancelScheduledValues(time);\n\t this._gainNode.gain.value = 0;\n\t return this;\n\t }\n\t time = Math.max(this._startTime + this.fadeIn + this.sampleTime, time);\n\t //cancel the previous curve\n\t this._gainNode.gain.cancelScheduledValues(time);\n\t this._stopTime = time;\n\t //the fadeOut time\n\t fadeOutTime = this.toSeconds(Tone.defaultArg(fadeOutTime, this.fadeOut));\n\t var heldDuration = time - this._startTime - this.fadeIn - this.sampleTime;\n\t if (!this.loop) {\n\t //make sure the fade does not go beyond the length of the buffer\n\t heldDuration = Math.min(heldDuration, this.buffer.duration);\n\t }\n\t fadeOutTime = Math.min(heldDuration, fadeOutTime);\n\t var startFade = time - fadeOutTime;\n\t if (fadeOutTime > this.sampleTime) {\n\t this._gainNode.gain.setValueAtTime(this._gain, startFade);\n\t if (this.curve === 'linear') {\n\t this._gainNode.gain.linearRampToValueAtTime(0, time);\n\t } else {\n\t this._gainNode.gain.exponentialApproachValueAtTime(0, startFade, fadeOutTime);\n\t }\n\t } else {\n\t this._gainNode.gain.setValueAtTime(0, time);\n\t }\n\t Tone.context.clearTimeout(this._onendedTimeout);\n\t this._onendedTimeout = Tone.context.setTimeout(this._onended.bind(this), this._stopTime - this.now());\n\t }\n\t } else {\n\t throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Internal callback when the buffer is ended.\n\t\t * Invokes `onended` and disposes the node.\n\t\t * @private\n\t\t */\n\t Tone.BufferSource.prototype._onended = function () {\n\t if (!this._sourceStopped) {\n\t this._sourceStopped = true;\n\t //allow additional time for the exponential curve to fully decay\n\t var additionalTail = this.curve === 'exponential' ? this.fadeOut * 2 : 0;\n\t if (this._sourceStarted && this._stopTime !== -1) {\n\t this._source.stop(this._stopTime + additionalTail);\n\t }\n\t this.onended(this);\n\t }\n\t };\n\t /**\n\t\t * If loop is true, the loop will start at this position.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.BufferSource.prototype, 'loopStart', {\n\t get: function () {\n\t return this._source.loopStart;\n\t },\n\t set: function (loopStart) {\n\t this._source.loopStart = this.toSeconds(loopStart);\n\t }\n\t });\n\t /**\n\t\t * If loop is true, the loop will end at this position.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.BufferSource.prototype, 'loopEnd', {\n\t get: function () {\n\t return this._source.loopEnd;\n\t },\n\t set: function (loopEnd) {\n\t this._source.loopEnd = this.toSeconds(loopEnd);\n\t }\n\t });\n\t /**\n\t\t * The audio buffer belonging to the player.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Tone.Buffer}\n\t\t * @name buffer\n\t\t */\n\t Object.defineProperty(Tone.BufferSource.prototype, 'buffer', {\n\t get: function () {\n\t return this._buffer;\n\t },\n\t set: function (buffer) {\n\t this._buffer.set(buffer);\n\t }\n\t });\n\t /**\n\t\t * If the buffer should loop once it's over.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Boolean}\n\t\t * @name loop\n\t\t */\n\t Object.defineProperty(Tone.BufferSource.prototype, 'loop', {\n\t get: function () {\n\t return this._source.loop;\n\t },\n\t set: function (loop) {\n\t this._source.loop = loop;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.BufferSource} this\n\t\t */\n\t Tone.BufferSource.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.onended = null;\n\t this._source.onended = null;\n\t this._source.disconnect();\n\t this._source = null;\n\t this._gainNode.dispose();\n\t this._gainNode = null;\n\t this._buffer.dispose();\n\t this._buffer = null;\n\t this._startTime = -1;\n\t this.playbackRate = null;\n\t Tone.context.clearTimeout(this._onendedTimeout);\n\t return this;\n\t };\n\t return Tone.BufferSource;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Noise is a noise generator. It uses looped noise buffers to save on performance.\n\t\t * Tone.Noise supports the noise types: \"pink\", \"white\", and \"brown\". Read more about\n\t\t * colors of noise on [Wikipedia](https://en.wikipedia.org/wiki/Colors_of_noise).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Source}\n\t\t * @param {string} type the noise type (white|pink|brown)\n\t\t * @example\n\t\t * //initialize the noise and start\n\t\t * var noise = new Tone.Noise(\"pink\").start();\n\t\t *\n\t\t * //make an autofilter to shape the noise\n\t\t * var autoFilter = new Tone.AutoFilter({\n\t\t * \t\"frequency\" : \"8m\",\n\t\t * \t\"min\" : 800,\n\t\t * \t\"max\" : 15000\n\t\t * }).connect(Tone.Master);\n\t\t *\n\t\t * //connect the noise\n\t\t * noise.connect(autoFilter);\n\t\t * //start the autofilter LFO\n\t\t * autoFilter.start()\n\t\t */\n\t Tone.Noise = function () {\n\t var options = Tone.defaults(arguments, ['type'], Tone.Noise);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * @private\n\t\t\t * @type {AudioBufferSourceNode}\n\t\t\t */\n\t this._source = null;\n\t /**\n\t\t\t * the buffer\n\t\t\t * @private\n\t\t\t * @type {AudioBuffer}\n\t\t\t */\n\t this._type = options.type;\n\t /**\n\t\t\t * The playback rate of the noise. Affects\n\t\t\t * the \"frequency\" of the noise.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this._playbackRate = options.playbackRate;\n\t };\n\t Tone.extend(Tone.Noise, Tone.Source);\n\t /**\n\t\t * the default parameters\n\t\t *\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Noise.defaults = {\n\t 'type': 'white',\n\t 'playbackRate': 1\n\t };\n\t /**\n\t\t * The type of the noise. Can be \"white\", \"brown\", or \"pink\".\n\t\t * @memberOf Tone.Noise#\n\t\t * @type {string}\n\t\t * @name type\n\t\t * @example\n\t\t * noise.type = \"white\";\n\t\t */\n\t Object.defineProperty(Tone.Noise.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t if (this._type !== type) {\n\t if (type in _noiseBuffers) {\n\t this._type = type;\n\t //if it's playing, stop and restart it\n\t if (this.state === Tone.State.Started) {\n\t var now = this.now();\n\t this._stop(now);\n\t this._start(now);\n\t }\n\t } else {\n\t throw new TypeError('Tone.Noise: invalid type: ' + type);\n\t }\n\t }\n\t }\n\t });\n\t /**\n\t\t * The playback rate of the noise. Affects\n\t\t * the \"frequency\" of the noise.\n\t\t * @type {Positive}\n\t\t * @signal\n\t\t */\n\t Object.defineProperty(Tone.Noise.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._playbackRate;\n\t },\n\t set: function (rate) {\n\t this._playbackRate = rate;\n\t if (this._source) {\n\t this._source.playbackRate.value = rate;\n\t }\n\t }\n\t });\n\t /**\n\t\t * internal start method\n\t\t *\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.Noise.prototype._start = function (time) {\n\t var buffer = _noiseBuffers[this._type];\n\t this._source = new Tone.BufferSource(buffer).connect(this.output);\n\t this._source.loop = true;\n\t this._source.playbackRate.value = this._playbackRate;\n\t this._source.start(this.toSeconds(time), Math.random() * (buffer.duration - 0.001));\n\t };\n\t /**\n\t\t * internal stop method\n\t\t *\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.Noise.prototype._stop = function (time) {\n\t if (this._source) {\n\t this._source.stop(this.toSeconds(time));\n\t this._source = null;\n\t }\n\t };\n\t /**\n\t\t * Restarts the noise.\n\t\t * @param {[type]} time [description]\n\t\t * @return {[type]} [description]\n\t\t */\n\t Tone.Noise.prototype.restart = function (time) {\n\t //TODO could be optimized by cancelling the buffer source 'stop'\n\t //stop and restart\n\t this._stop(time);\n\t this._start(time);\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Noise} this\n\t\t */\n\t Tone.Noise.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t if (this._source !== null) {\n\t this._source.disconnect();\n\t this._source = null;\n\t }\n\t this._buffer = null;\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t // THE BUFFERS\n\t ///////////////////////////////////////////////////////////////////////////\n\t //Noise buffer stats\n\t var bufferLength = 44100 * 5;\n\t var channels = 2;\n\t /**\n\t\t *\tThe noise arrays. Generated on initialization.\n\t\t * borrowed heavily from https://github.com/zacharydenton/noise.js\n\t\t * (c) 2013 Zach Denton (MIT)\n\t\t * @static\n\t\t * @private\n\t\t * @type {Array}\n\t\t */\n\t var _noiseArrays = {\n\t 'pink': function () {\n\t var buffer = [];\n\t for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t var channel = new Float32Array(bufferLength);\n\t buffer[channelNum] = channel;\n\t var b0, b1, b2, b3, b4, b5, b6;\n\t b0 = b1 = b2 = b3 = b4 = b5 = b6 = 0;\n\t for (var i = 0; i < bufferLength; i++) {\n\t var white = Math.random() * 2 - 1;\n\t b0 = 0.99886 * b0 + white * 0.0555179;\n\t b1 = 0.99332 * b1 + white * 0.0750759;\n\t b2 = 0.969 * b2 + white * 0.153852;\n\t b3 = 0.8665 * b3 + white * 0.3104856;\n\t b4 = 0.55 * b4 + white * 0.5329522;\n\t b5 = -0.7616 * b5 - white * 0.016898;\n\t channel[i] = b0 + b1 + b2 + b3 + b4 + b5 + b6 + white * 0.5362;\n\t channel[i] *= 0.11;\n\t // (roughly) compensate for gain\n\t b6 = white * 0.115926;\n\t }\n\t }\n\t return buffer;\n\t }(),\n\t 'brown': function () {\n\t var buffer = [];\n\t for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t var channel = new Float32Array(bufferLength);\n\t buffer[channelNum] = channel;\n\t var lastOut = 0;\n\t for (var i = 0; i < bufferLength; i++) {\n\t var white = Math.random() * 2 - 1;\n\t channel[i] = (lastOut + 0.02 * white) / 1.02;\n\t lastOut = channel[i];\n\t channel[i] *= 3.5; // (roughly) compensate for gain\n\t }\n\t }\n\t return buffer;\n\t }(),\n\t 'white': function () {\n\t var buffer = [];\n\t for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t var channel = new Float32Array(bufferLength);\n\t buffer[channelNum] = channel;\n\t for (var i = 0; i < bufferLength; i++) {\n\t channel[i] = Math.random() * 2 - 1;\n\t }\n\t }\n\t return buffer;\n\t }()\n\t };\n\t /**\n\t\t *\tstatic noise buffers\n\t\t * @static\n\t\t * @private\n\t\t * @type {Tone.Buffer}\n\t\t */\n\t var _noiseBuffers = {};\n\t //create the Tone.Buffers\n\t function createBuffers() {\n\t for (var type in _noiseArrays) {\n\t _noiseBuffers[type] = new Tone.Buffer().fromArray(_noiseArrays[type]);\n\t }\n\t }\n\t //create the noise buffers\n\t Tone.getContext(createBuffers);\n\t Tone.Context.on('init', createBuffers);\n\t return Tone.Noise;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Simple convolution created with decaying noise.\n\t\t * \t\tGenerates an Impulse Response Buffer\n\t\t * \t\t\twith Tone.Offline then feeds the IR into ConvolverNode.\n\t\t * \t\t\tNote: the Reverb will not make any sound until [generate](#generate)\n\t\t * \t\t\thas been invoked and resolved.\n\t\t *\n\t\t * \t\t\tInspiration from [ReverbGen](https://github.com/adelespinasse/reverbGen).\n\t\t * \t\t\tCopyright (c) 2014 Alan deLespinasse Apache 2.0 License.\n\t\t *\n\t\t * @extends {Tone.Convolver}\n\t\t * @param {Time=} decay The amount of time it will reverberate for.\n\t\t */\n\t Tone.Reverb = function () {\n\t var options = Tone.defaults(arguments, ['decay'], Tone.Reverb);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * Convolver node\n\t\t\t * @type {ConvolverNode}\n\t\t\t * @private\n\t\t\t */\n\t this._convolver = this.context.createConvolver();\n\t /**\n\t\t\t * The duration of the reverb\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.decay = options.decay;\n\t /**\n\t\t\t * The amount of time before the reverb is fully\n\t\t\t * ramped in.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.preDelay = options.preDelay;\n\t this.connectEffect(this._convolver);\n\t };\n\t Tone.extend(Tone.Reverb, Tone.Effect);\n\t /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @static\n\t\t */\n\t Tone.Reverb.defaults = {\n\t 'decay': 1.5,\n\t 'preDelay': 0.01\n\t };\n\t /**\n\t\t * Generate the Impulse Response. Returns a promise while the IR is being\n\t\t * generated.\n\t\t * @return {Promise<Tone.Reverb>} Promise which returns this object.\n\t\t */\n\t Tone.Reverb.prototype.generate = function () {\n\t return Tone.Offline(function () {\n\t //create a noise burst which decays over the duration\n\t var noiseL = new Tone.Noise();\n\t var noiseR = new Tone.Noise();\n\t var merge = new Tone.Merge();\n\t noiseL.connect(merge.left);\n\t noiseR.connect(merge.right);\n\t var gainNode = new Tone.Gain().toMaster();\n\t merge.connect(gainNode);\n\t noiseL.start(0);\n\t noiseR.start(0);\n\t //short fade in\n\t gainNode.gain.setValueAtTime(0, 0);\n\t gainNode.gain.linearRampToValueAtTime(1, this.preDelay);\n\t //decay\n\t gainNode.gain.exponentialApproachValueAtTime(0, this.preDelay, this.decay - this.preDelay);\n\t }.bind(this), this.decay).then(function (buffer) {\n\t this._convolver.buffer = buffer.get();\n\t return this;\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Reverb} this\n\t\t */\n\t Tone.Reverb.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._convolver.disconnect();\n\t this._convolver = null;\n\t return this;\n\t };\n\t return Tone.Reverb;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Base class for stereo feedback effects where the effectReturn\n\t\t * is fed back into the same channel.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t */\n\t Tone.StereoFeedbackEffect = function () {\n\t var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * controls the amount of feedback\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\t /**\n\t\t\t * the left side feeback\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackL = new Tone.Gain();\n\t /**\n\t\t\t * the right side feeback\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackR = new Tone.Gain();\n\t //connect it up\n\t this.effectReturnL.chain(this._feedbackL, this.effectSendL);\n\t this.effectReturnR.chain(this._feedbackR, this.effectSendR);\n\t this.feedback.fan(this._feedbackL.gain, this._feedbackR.gain);\n\t this._readOnly(['feedback']);\n\t };\n\t Tone.extend(Tone.StereoFeedbackEffect, Tone.StereoEffect);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.StereoFeedbackEffect} this\n\t\t */\n\t Tone.StereoFeedbackEffect.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t this._writable(['feedback']);\n\t this.feedback.dispose();\n\t this.feedback = null;\n\t this._feedbackL.dispose();\n\t this._feedbackL = null;\n\t this._feedbackR.dispose();\n\t this._feedbackR = null;\n\t return this;\n\t };\n\t return Tone.StereoFeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Applies a width factor to the mid/side seperation.\n\t\t * 0 is all mid and 1 is all side.\n\t\t * Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n\t\t * <br><br>\n\t\t * <code>\n\t\t * Mid *= 2*(1-width)<br>\n\t\t * Side *= 2*width\n\t\t * </code>\n\t\t *\n\t\t * @extends {Tone.MidSideEffect}\n\t\t * @constructor\n\t\t * @param {NormalRange|Object} [width] The stereo width. A width of 0 is mono and 1 is stereo. 0.5 is no change.\n\t\t */\n\t Tone.StereoWidener = function () {\n\t var options = Tone.defaults(arguments, ['width'], Tone.StereoWidener);\n\t Tone.MidSideEffect.call(this, options);\n\t /**\n\t\t\t * The width control. 0 = 100% mid. 1 = 100% side. 0.5 = no change.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\t this._readOnly(['width']);\n\t /**\n\t\t\t * Two times the (1-width) for the mid channel\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._twoTimesWidthMid = new Tone.Multiply(2);\n\t /**\n\t\t\t * Two times the width for the side channel\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._twoTimesWidthSide = new Tone.Multiply(2);\n\t /**\n\t\t\t * Mid multiplier\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._midMult = new Tone.Multiply();\n\t this._twoTimesWidthMid.connect(this._midMult, 0, 1);\n\t this.midSend.chain(this._midMult, this.midReturn);\n\t /**\n\t\t\t * 1 - width\n\t\t\t * @type {Tone}\n\t\t\t */\n\t this._oneMinusWidth = new Tone.Subtract();\n\t this._oneMinusWidth.connect(this._twoTimesWidthMid);\n\t this.context.getConstant(1).connect(this._oneMinusWidth, 0, 0);\n\t this.width.connect(this._oneMinusWidth, 0, 1);\n\t /**\n\t\t\t * Side multiplier\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._sideMult = new Tone.Multiply();\n\t this.width.connect(this._twoTimesWidthSide);\n\t this._twoTimesWidthSide.connect(this._sideMult, 0, 1);\n\t this.sideSend.chain(this._sideMult, this.sideReturn);\n\t };\n\t Tone.extend(Tone.StereoWidener, Tone.MidSideEffect);\n\t /**\n\t\t * the default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.StereoWidener.defaults = { 'width': 0.5 };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.StereoWidener} this\n\t\t */\n\t Tone.StereoWidener.prototype.dispose = function () {\n\t Tone.MidSideEffect.prototype.dispose.call(this);\n\t this._writable(['width']);\n\t this.width.dispose();\n\t this.width = null;\n\t this._midMult.dispose();\n\t this._midMult = null;\n\t this._sideMult.dispose();\n\t this._sideMult = null;\n\t this._twoTimesWidthMid.dispose();\n\t this._twoTimesWidthMid = null;\n\t this._twoTimesWidthSide.dispose();\n\t this._twoTimesWidthSide = null;\n\t this._oneMinusWidth.dispose();\n\t this._oneMinusWidth = null;\n\t return this;\n\t };\n\t return Tone.StereoWidener;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Tremolo modulates the amplitude of an incoming signal using a Tone.LFO.\n\t\t * The type, frequency, and depth of the LFO is controllable.\n\t\t *\n\t\t * @extends {Tone.StereoEffect}\n\t\t * @constructor\n\t\t * @param {Frequency} [frequency] The rate of the effect.\n\t\t * @param {NormalRange} [depth] The depth of the effect.\n\t\t * @example\n\t\t * //create a tremolo and start it's LFO\n\t\t * var tremolo = new Tone.Tremolo(9, 0.75).toMaster().start();\n\t\t * //route an oscillator through the tremolo and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(tremolo).start();\n\t\t */\n\t Tone.Tremolo = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'depth'\n\t ], Tone.Tremolo);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * The tremelo LFO in the left channel\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoL = new Tone.LFO({\n\t 'phase': options.spread,\n\t 'min': 1,\n\t 'max': 0\n\t });\n\t /**\n\t\t\t * The tremelo LFO in the left channel\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoR = new Tone.LFO({\n\t 'phase': options.spread,\n\t 'min': 1,\n\t 'max': 0\n\t });\n\t /**\n\t\t\t * Where the gain is multiplied\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._amplitudeL = new Tone.Gain();\n\t /**\n\t\t\t * Where the gain is multiplied\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._amplitudeR = new Tone.Gain();\n\t /**\n\t\t\t * The frequency of the tremolo.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The depth of the effect. A depth of 0, has no effect\n\t\t\t * on the amplitude, and a depth of 1 makes the amplitude\n\t\t\t * modulate fully between 0 and 1.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.depth = new Tone.Signal(options.depth, Tone.Type.NormalRange);\n\t this._readOnly([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this.effectSendL.chain(this._amplitudeL, this.effectReturnL);\n\t this.effectSendR.chain(this._amplitudeR, this.effectReturnR);\n\t this._lfoL.connect(this._amplitudeL.gain);\n\t this._lfoR.connect(this._amplitudeR.gain);\n\t this.frequency.fan(this._lfoL.frequency, this._lfoR.frequency);\n\t this.depth.fan(this._lfoR.amplitude, this._lfoL.amplitude);\n\t this.type = options.type;\n\t this.spread = options.spread;\n\t };\n\t Tone.extend(Tone.Tremolo, Tone.StereoEffect);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Tremolo.defaults = {\n\t 'frequency': 10,\n\t 'type': 'sine',\n\t 'depth': 0.5,\n\t 'spread': 180\n\t };\n\t /**\n\t\t * Start the tremolo.\n\t\t * @param {Time} [time=now] When the tremolo begins.\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t Tone.Tremolo.prototype.start = function (time) {\n\t this._lfoL.start(time);\n\t this._lfoR.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the tremolo.\n\t\t * @param {Time} [time=now] When the tremolo stops.\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t Tone.Tremolo.prototype.stop = function (time) {\n\t this._lfoL.stop(time);\n\t this._lfoR.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the effect to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t * Transport has started.\n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.Tremolo.prototype.sync = function (delay) {\n\t this._lfoL.sync(delay);\n\t this._lfoR.sync(delay);\n\t Tone.Transport.syncSignal(this.frequency);\n\t return this;\n\t };\n\t /**\n\t\t * Unsync the filter from the transport\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t Tone.Tremolo.prototype.unsync = function () {\n\t this._lfoL.unsync();\n\t this._lfoR.unsync();\n\t Tone.Transport.unsyncSignal(this.frequency);\n\t return this;\n\t };\n\t /**\n\t\t * The Tremolo's oscillator type.\n\t\t * @memberOf Tone.Tremolo#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.Tremolo.prototype, 'type', {\n\t get: function () {\n\t return this._lfoL.type;\n\t },\n\t set: function (type) {\n\t this._lfoL.type = type;\n\t this._lfoR.type = type;\n\t }\n\t });\n\t /**\n\t\t * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n\t\t * When set to 180, LFO's will be panned hard left and right respectively.\n\t\t * @memberOf Tone.Tremolo#\n\t\t * @type {Degrees}\n\t\t * @name spread\n\t\t */\n\t Object.defineProperty(Tone.Tremolo.prototype, 'spread', {\n\t get: function () {\n\t return this._lfoR.phase - this._lfoL.phase; //180\n\t },\n\t set: function (spread) {\n\t this._lfoL.phase = 90 - spread / 2;\n\t this._lfoR.phase = spread / 2 + 90;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t Tone.Tremolo.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this._lfoL.dispose();\n\t this._lfoL = null;\n\t this._lfoR.dispose();\n\t this._lfoR = null;\n\t this._amplitudeL.dispose();\n\t this._amplitudeL = null;\n\t this._amplitudeR.dispose();\n\t this._amplitudeR = null;\n\t this.frequency = null;\n\t this.depth = null;\n\t return this;\n\t };\n\t return Tone.Tremolo;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A Vibrato effect composed of a Tone.Delay and a Tone.LFO. The LFO\n\t\t * modulates the delayTime of the delay, causing the pitch to rise\n\t\t * and fall. \n\t\t * @extends {Tone.Effect}\n\t\t * @param {Frequency} frequency The frequency of the vibrato.\n\t\t * @param {NormalRange} depth The amount the pitch is modulated.\n\t\t */\n\t Tone.Vibrato = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'depth'\n\t ], Tone.Vibrato);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * The delay node used for the vibrato effect\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._delayNode = new Tone.Delay(0, options.maxDelay);\n\t /**\n\t\t\t * The LFO used to control the vibrato\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfo = new Tone.LFO({\n\t 'type': options.type,\n\t 'min': 0,\n\t 'max': options.maxDelay,\n\t 'frequency': options.frequency,\n\t 'phase': -90 //offse the phase so the resting position is in the center\n\t }).start().connect(this._delayNode.delayTime);\n\t /**\n\t\t\t * The frequency of the vibrato\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._lfo.frequency;\n\t /**\n\t\t\t * The depth of the vibrato. \n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.depth = this._lfo.amplitude;\n\t this.depth.value = options.depth;\n\t this._readOnly([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this.effectSend.chain(this._delayNode, this.effectReturn);\n\t };\n\t Tone.extend(Tone.Vibrato, Tone.Effect);\n\t /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Vibrato.defaults = {\n\t 'maxDelay': 0.005,\n\t 'frequency': 5,\n\t 'depth': 0.1,\n\t 'type': 'sine'\n\t };\n\t /**\n\t\t * Type of oscillator attached to the Vibrato.\n\t\t * @memberOf Tone.Vibrato#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.Vibrato.prototype, 'type', {\n\t get: function () {\n\t return this._lfo.type;\n\t },\n\t set: function (type) {\n\t this._lfo.type = type;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Vibrato} this\n\t\t */\n\t Tone.Vibrato.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._delayNode.dispose();\n\t this._delayNode = null;\n\t this._lfo.dispose();\n\t this._lfo = null;\n\t this._writable([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this.frequency = null;\n\t this.depth = null;\n\t };\n\t return Tone.Vibrato;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Event abstracts away Tone.Transport.schedule and provides a schedulable\n\t\t * callback for a single or repeatable events along the timeline.\n\t\t *\n\t\t * @extends {Tone}\n\t\t * @param {function} callback The callback to invoke at the time.\n\t\t * @param {*} value The value or values which should be passed to\n\t\t * the callback function on invocation.\n\t\t * @example\n\t\t * var chord = new Tone.Event(function(time, chord){\n\t\t * \t//the chord as well as the exact time of the event\n\t\t * \t//are passed in as arguments to the callback function\n\t\t * }, [\"D4\", \"E4\", \"F4\"]);\n\t\t * //start the chord at the beginning of the transport timeline\n\t\t * chord.start();\n\t\t * //loop it every measure for 8 measures\n\t\t * chord.loop = 8;\n\t\t * chord.loopEnd = \"1m\";\n\t\t */\n\t Tone.Event = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'value'\n\t ], Tone.Event);\n\t Tone.call(this);\n\t /**\n\t\t\t * Loop value\n\t\t\t * @type {Boolean|Positive}\n\t\t\t * @private\n\t\t\t */\n\t this._loop = options.loop;\n\t /**\n\t\t\t * The callback to invoke.\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.callback = options.callback;\n\t /**\n\t\t\t * The value which is passed to the\n\t\t\t * callback function.\n\t\t\t * @type {*}\n\t\t\t * @private\n\t\t\t */\n\t this.value = options.value;\n\t /**\n\t\t\t * When the note is scheduled to start.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._loopStart = this.toTicks(options.loopStart);\n\t /**\n\t\t\t * When the note is scheduled to start.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._loopEnd = this.toTicks(options.loopEnd);\n\t /**\n\t\t\t * Tracks the scheduled events\n\t\t\t * @type {Tone.TimelineState}\n\t\t\t * @private\n\t\t\t */\n\t this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t /**\n\t\t\t * The playback speed of the note. A speed of 1\n\t\t\t * is no change.\n\t\t\t * @private\n\t\t\t * @type {Positive}\n\t\t\t */\n\t this._playbackRate = 1;\n\t /**\n\t\t\t * A delay time from when the event is scheduled to start\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this._startOffset = 0;\n\t /**\n\t\t\t * private holder of probability value\n\t\t\t * @type {NormalRange}\n\t\t\t * @private\n\t\t\t */\n\t this._probability = options.probability;\n\t /**\n\t\t\t * the amount of variation from the\n\t\t\t * given time.\n\t\t\t * @type {Boolean|Time}\n\t\t\t * @private\n\t\t\t */\n\t this._humanize = options.humanize;\n\t /**\n\t\t\t * If mute is true, the callback won't be\n\t\t\t * invoked.\n\t\t\t * @type {Boolean}\n\t\t\t */\n\t this.mute = options.mute;\n\t //set the initial values\n\t this.playbackRate = options.playbackRate;\n\t };\n\t Tone.extend(Tone.Event);\n\t /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Event.defaults = {\n\t 'callback': Tone.noOp,\n\t 'loop': false,\n\t 'loopEnd': '1m',\n\t 'loopStart': 0,\n\t 'playbackRate': 1,\n\t 'value': null,\n\t 'probability': 1,\n\t 'mute': false,\n\t 'humanize': false\n\t };\n\t /**\n\t\t * Reschedule all of the events along the timeline\n\t\t * with the updated values.\n\t\t * @param {Time} after Only reschedules events after the given time.\n\t\t * @return {Tone.Event} this\n\t\t * @private\n\t\t */\n\t Tone.Event.prototype._rescheduleEvents = function (after) {\n\t //if no argument is given, schedules all of the events\n\t after = Tone.defaultArg(after, -1);\n\t this._state.forEachFrom(after, function (event) {\n\t var duration;\n\t if (event.state === Tone.State.Started) {\n\t if (!Tone.isUndef(event.id)) {\n\t Tone.Transport.clear(event.id);\n\t }\n\t var startTick = event.time + Math.round(this.startOffset / this._playbackRate);\n\t if (this._loop) {\n\t duration = Infinity;\n\t if (Tone.isNumber(this._loop)) {\n\t duration = this._loop * this._getLoopDuration();\n\t }\n\t var nextEvent = this._state.getAfter(startTick);\n\t if (nextEvent !== null) {\n\t duration = Math.min(duration, nextEvent.time - startTick);\n\t }\n\t if (duration !== Infinity) {\n\t //schedule a stop since it's finite duration\n\t this._state.setStateAtTime(Tone.State.Stopped, startTick + duration + 1);\n\t duration = Tone.Ticks(duration);\n\t }\n\t var interval = Tone.Ticks(this._getLoopDuration());\n\t event.id = Tone.Transport.scheduleRepeat(this._tick.bind(this), interval, Tone.Ticks(startTick), duration);\n\t } else {\n\t event.id = Tone.Transport.schedule(this._tick.bind(this), Tone.Ticks(startTick));\n\t }\n\t }\n\t }.bind(this));\n\t return this;\n\t };\n\t /**\n\t\t * Returns the playback state of the note, either \"started\" or \"stopped\".\n\t\t * @type {String}\n\t\t * @readOnly\n\t\t * @memberOf Tone.Event#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'state', {\n\t get: function () {\n\t return this._state.getValueAtTime(Tone.Transport.ticks);\n\t }\n\t });\n\t /**\n\t\t * The start from the scheduled start time\n\t\t * @type {Ticks}\n\t\t * @memberOf Tone.Event#\n\t\t * @name startOffset\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'startOffset', {\n\t get: function () {\n\t return this._startOffset;\n\t },\n\t set: function (offset) {\n\t this._startOffset = offset;\n\t }\n\t });\n\t /**\n\t\t * The probability of the notes being triggered.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {NormalRange}\n\t\t * @name probability\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'probability', {\n\t get: function () {\n\t return this._probability;\n\t },\n\t set: function (prob) {\n\t this._probability = prob;\n\t }\n\t });\n\t /**\n\t\t * If set to true, will apply small random variation\n\t\t * to the callback time. If the value is given as a time, it will randomize\n\t\t * by that amount.\n\t\t * @example\n\t\t * event.humanize = true;\n\t\t * @type {Boolean|Time}\n\t\t * @name humanize\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'humanize', {\n\t get: function () {\n\t return this._humanize;\n\t },\n\t set: function (variation) {\n\t this._humanize = variation;\n\t }\n\t });\n\t /**\n\t\t * Start the note at the given time.\n\t\t * @param {TimelinePosition} time When the note should start.\n\t\t * @return {Tone.Event} this\n\t\t */\n\t Tone.Event.prototype.start = function (time) {\n\t time = this.toTicks(time);\n\t if (this._state.getValueAtTime(time) === Tone.State.Stopped) {\n\t this._state.add({\n\t 'state': Tone.State.Started,\n\t 'time': time,\n\t 'id': undefined\n\t });\n\t this._rescheduleEvents(time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop the Event at the given time.\n\t\t * @param {TimelinePosition} time When the note should stop.\n\t\t * @return {Tone.Event} this\n\t\t */\n\t Tone.Event.prototype.stop = function (time) {\n\t this.cancel(time);\n\t time = this.toTicks(time);\n\t if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t this._state.setStateAtTime(Tone.State.Stopped, time);\n\t var previousEvent = this._state.getBefore(time);\n\t var reschedulTime = time;\n\t if (previousEvent !== null) {\n\t reschedulTime = previousEvent.time;\n\t }\n\t this._rescheduleEvents(reschedulTime);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Cancel all scheduled events greater than or equal to the given time\n\t\t * @param {TimelinePosition} [time=0] The time after which events will be cancel.\n\t\t * @return {Tone.Event} this\n\t\t */\n\t Tone.Event.prototype.cancel = function (time) {\n\t time = Tone.defaultArg(time, -Infinity);\n\t time = this.toTicks(time);\n\t this._state.forEachFrom(time, function (event) {\n\t Tone.Transport.clear(event.id);\n\t });\n\t this._state.cancel(time);\n\t return this;\n\t };\n\t /**\n\t\t * The callback function invoker. Also\n\t\t * checks if the Event is done playing\n\t\t * @param {Number} time The time of the event in seconds\n\t\t * @private\n\t\t */\n\t Tone.Event.prototype._tick = function (time) {\n\t if (!this.mute && this._state.getValueAtTime(Tone.Transport.ticks) === Tone.State.Started) {\n\t if (this.probability < 1 && Math.random() > this.probability) {\n\t return;\n\t }\n\t if (this.humanize) {\n\t var variation = 0.02;\n\t if (!Tone.isBoolean(this.humanize)) {\n\t variation = this.toSeconds(this.humanize);\n\t }\n\t time += (Math.random() * 2 - 1) * variation;\n\t }\n\t this.callback(time, this.value);\n\t }\n\t };\n\t /**\n\t\t * Get the duration of the loop.\n\t\t * @return {Ticks}\n\t\t * @private\n\t\t */\n\t Tone.Event.prototype._getLoopDuration = function () {\n\t return Math.round((this._loopEnd - this._loopStart) / this._playbackRate);\n\t };\n\t /**\n\t\t * If the note should loop or not\n\t\t * between Tone.Event.loopStart and\n\t\t * Tone.Event.loopEnd. An integer\n\t\t * value corresponds to the number of\n\t\t * loops the Event does after it starts.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {Boolean|Positive}\n\t\t * @name loop\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'loop', {\n\t get: function () {\n\t return this._loop;\n\t },\n\t set: function (loop) {\n\t this._loop = loop;\n\t this._rescheduleEvents();\n\t }\n\t });\n\t /**\n\t\t * \tThe playback rate of the note. Defaults to 1.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {Positive}\n\t\t * @name playbackRate\n\t\t * @example\n\t\t * note.loop = true;\n\t\t * //repeat the note twice as fast\n\t\t * note.playbackRate = 2;\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._playbackRate;\n\t },\n\t set: function (rate) {\n\t this._playbackRate = rate;\n\t this._rescheduleEvents();\n\t }\n\t });\n\t /**\n\t\t * The loopEnd point is the time the event will loop\n\t\t * if Tone.Event.loop is true.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'loopEnd', {\n\t get: function () {\n\t return Tone.Ticks(this._loopEnd).toSeconds();\n\t },\n\t set: function (loopEnd) {\n\t this._loopEnd = this.toTicks(loopEnd);\n\t if (this._loop) {\n\t this._rescheduleEvents();\n\t }\n\t }\n\t });\n\t /**\n\t\t * The time when the loop should start.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'loopStart', {\n\t get: function () {\n\t return Tone.Ticks(this._loopStart).toSeconds();\n\t },\n\t set: function (loopStart) {\n\t this._loopStart = this.toTicks(loopStart);\n\t if (this._loop) {\n\t this._rescheduleEvents();\n\t }\n\t }\n\t });\n\t /**\n\t\t * The current progress of the loop interval.\n\t\t * Returns 0 if the event is not started yet or\n\t\t * it is not set to loop.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {NormalRange}\n\t\t * @name progress\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'progress', {\n\t get: function () {\n\t if (this._loop) {\n\t var ticks = Tone.Transport.ticks;\n\t var lastEvent = this._state.get(ticks);\n\t if (lastEvent !== null && lastEvent.state === Tone.State.Started) {\n\t var loopDuration = this._getLoopDuration();\n\t var progress = (ticks - lastEvent.time) % loopDuration;\n\t return progress / loopDuration;\n\t } else {\n\t return 0;\n\t }\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Event} this\n\t\t */\n\t Tone.Event.prototype.dispose = function () {\n\t this.cancel();\n\t this._state.dispose();\n\t this._state = null;\n\t this.callback = null;\n\t this.value = null;\n\t };\n\t return Tone.Event;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Loop creates a looped callback at the \n\t\t * specified interval. The callback can be \n\t\t * started, stopped and scheduled along\n\t\t * the Transport's timeline. \n\t\t * @example\n\t\t * var loop = new Tone.Loop(function(time){\n\t\t * \t//triggered every eighth note. \n\t\t * \tconsole.log(time);\n\t\t * }, \"8n\").start(0);\n\t\t * Tone.Transport.start();\n\t\t * @extends {Tone}\n\t\t * @param {Function} callback The callback to invoke with the event.\n\t\t * @param {Time} interval The time between successive callback calls. \n\t\t */\n\t Tone.Loop = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'interval'\n\t ], Tone.Loop);\n\t Tone.call(this);\n\t /**\n\t\t\t * The event which produces the callbacks\n\t\t\t */\n\t this._event = new Tone.Event({\n\t 'callback': this._tick.bind(this),\n\t 'loop': true,\n\t 'loopEnd': options.interval,\n\t 'playbackRate': options.playbackRate,\n\t 'probability': options.probability\n\t });\n\t /**\n\t\t\t * The callback to invoke with the next event in the pattern\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.callback = options.callback;\n\t //set the iterations\n\t this.iterations = options.iterations;\n\t };\n\t Tone.extend(Tone.Loop);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Loop.defaults = {\n\t 'interval': '4n',\n\t 'callback': Tone.noOp,\n\t 'playbackRate': 1,\n\t 'iterations': Infinity,\n\t 'probability': true,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Start the loop at the specified time along the Transport's\n\t\t * timeline.\n\t\t * @param {TimelinePosition=} time When to start the Loop.\n\t\t * @return {Tone.Loop} this\n\t\t */\n\t Tone.Loop.prototype.start = function (time) {\n\t this._event.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the loop at the given time.\n\t\t * @param {TimelinePosition=} time When to stop the Arpeggio\n\t\t * @return {Tone.Loop} this\n\t\t */\n\t Tone.Loop.prototype.stop = function (time) {\n\t this._event.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Cancel all scheduled events greater than or equal to the given time\n\t\t * @param {TimelinePosition} [time=0] The time after which events will be cancel.\n\t\t * @return {Tone.Loop} this\n\t\t */\n\t Tone.Loop.prototype.cancel = function (time) {\n\t this._event.cancel(time);\n\t return this;\n\t };\n\t /**\n\t\t * Internal function called when the notes should be called\n\t\t * @param {Number} time The time the event occurs\n\t\t * @private\n\t\t */\n\t Tone.Loop.prototype._tick = function (time) {\n\t this.callback(time);\n\t };\n\t /**\n\t\t * The state of the Loop, either started or stopped.\n\t\t * @memberOf Tone.Loop#\n\t\t * @type {String}\n\t\t * @name state\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'state', {\n\t get: function () {\n\t return this._event.state;\n\t }\n\t });\n\t /**\n\t\t * The progress of the loop as a value between 0-1. 0, when\n\t\t * the loop is stopped or done iterating. \n\t\t * @memberOf Tone.Loop#\n\t\t * @type {NormalRange}\n\t\t * @name progress\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'progress', {\n\t get: function () {\n\t return this._event.progress;\n\t }\n\t });\n\t /**\n\t\t * The time between successive callbacks. \n\t\t * @example\n\t\t * loop.interval = \"8n\"; //loop every 8n\n\t\t * @memberOf Tone.Loop#\n\t\t * @type {Time}\n\t\t * @name interval\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'interval', {\n\t get: function () {\n\t return this._event.loopEnd;\n\t },\n\t set: function (interval) {\n\t this._event.loopEnd = interval;\n\t }\n\t });\n\t /**\n\t\t * The playback rate of the loop. The normal playback rate is 1 (no change). \n\t\t * A `playbackRate` of 2 would be twice as fast. \n\t\t * @memberOf Tone.Loop#\n\t\t * @type {Time}\n\t\t * @name playbackRate\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._event.playbackRate;\n\t },\n\t set: function (rate) {\n\t this._event.playbackRate = rate;\n\t }\n\t });\n\t /**\n\t\t * Random variation +/-0.01s to the scheduled time. \n\t\t * Or give it a time value which it will randomize by.\n\t\t * @type {Boolean|Time}\n\t\t * @memberOf Tone.Loop#\n\t\t * @name humanize\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'humanize', {\n\t get: function () {\n\t return this._event.humanize;\n\t },\n\t set: function (variation) {\n\t this._event.humanize = variation;\n\t }\n\t });\n\t /**\n\t\t * The probably of the callback being invoked.\n\t\t * @memberOf Tone.Loop#\n\t\t * @type {NormalRange}\n\t\t * @name probability\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'probability', {\n\t get: function () {\n\t return this._event.probability;\n\t },\n\t set: function (prob) {\n\t this._event.probability = prob;\n\t }\n\t });\n\t /**\n\t\t * Muting the Loop means that no callbacks are invoked.\n\t\t * @memberOf Tone.Loop#\n\t\t * @type {Boolean}\n\t\t * @name mute\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'mute', {\n\t get: function () {\n\t return this._event.mute;\n\t },\n\t set: function (mute) {\n\t this._event.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * The number of iterations of the loop. The default\n\t\t * value is Infinity (loop forever).\n\t\t * @memberOf Tone.Loop#\n\t\t * @type {Positive}\n\t\t * @name iterations\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'iterations', {\n\t get: function () {\n\t if (this._event.loop === true) {\n\t return Infinity;\n\t } else {\n\t return this._event.loop;\n\t }\n\t },\n\t set: function (iters) {\n\t if (iters === Infinity) {\n\t this._event.loop = true;\n\t } else {\n\t this._event.loop = iters;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Loop} this\n\t\t */\n\t Tone.Loop.prototype.dispose = function () {\n\t this._event.dispose();\n\t this._event = null;\n\t this.callback = null;\n\t };\n\t return Tone.Loop;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Part is a collection Tone.Events which can be\n\t\t * started/stopped and looped as a single unit.\n\t\t *\n\t\t * @extends {Tone.Event}\n\t\t * @param {Function} callback The callback to invoke on each event\n\t\t * @param {Array} events the array of events\n\t\t * @example\n\t\t * var part = new Tone.Part(function(time, note){\n\t\t * \t//the notes given as the second element in the array\n\t\t * \t//will be passed in as the second argument\n\t\t * \tsynth.triggerAttackRelease(note, \"8n\", time);\n\t\t * }, [[0, \"C2\"], [\"0:2\", \"C3\"], [\"0:3:2\", \"G2\"]]);\n\t\t * @example\n\t\t * //use an array of objects as long as the object has a \"time\" attribute\n\t\t * var part = new Tone.Part(function(time, value){\n\t\t * \t//the value is an object which contains both the note and the velocity\n\t\t * \tsynth.triggerAttackRelease(value.note, \"8n\", time, value.velocity);\n\t\t * }, [{\"time\" : 0, \"note\" : \"C3\", \"velocity\": 0.9},\n\t\t * \t {\"time\" : \"0:2\", \"note\" : \"C4\", \"velocity\": 0.5}\n\t\t * ]).start(0);\n\t\t */\n\t Tone.Part = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'events'\n\t ], Tone.Part);\n\t Tone.Event.call(this, options);\n\t /**\n\t\t\t * An array of Objects.\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._events = [];\n\t //add the events\n\t for (var i = 0; i < options.events.length; i++) {\n\t if (Array.isArray(options.events[i])) {\n\t this.add(options.events[i][0], options.events[i][1]);\n\t } else {\n\t this.add(options.events[i]);\n\t }\n\t }\n\t };\n\t Tone.extend(Tone.Part, Tone.Event);\n\t /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Part.defaults = {\n\t 'callback': Tone.noOp,\n\t 'loop': false,\n\t 'loopEnd': '1m',\n\t 'loopStart': 0,\n\t 'playbackRate': 1,\n\t 'probability': 1,\n\t 'humanize': false,\n\t 'mute': false,\n\t 'events': []\n\t };\n\t /**\n\t\t * Start the part at the given time.\n\t\t * @param {TransportTime} time When to start the part.\n\t\t * @param {Time=} offset The offset from the start of the part\n\t\t * to begin playing at.\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.start = function (time, offset) {\n\t var ticks = this.toTicks(time);\n\t if (this._state.getValueAtTime(ticks) !== Tone.State.Started) {\n\t if (this._loop) {\n\t offset = Tone.defaultArg(offset, this._loopStart);\n\t } else {\n\t offset = Tone.defaultArg(offset, 0);\n\t }\n\t offset = this.toTicks(offset);\n\t this._state.add({\n\t 'state': Tone.State.Started,\n\t 'time': ticks,\n\t 'offset': offset\n\t });\n\t this._forEach(function (event) {\n\t this._startNote(event, ticks, offset);\n\t });\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Start the event in the given event at the correct time given\n\t\t * the ticks and offset and looping.\n\t\t * @param {Tone.Event} event\n\t\t * @param {Ticks} ticks\n\t\t * @param {Ticks} offset\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._startNote = function (event, ticks, offset) {\n\t ticks -= offset;\n\t if (this._loop) {\n\t if (event.startOffset >= this._loopStart && event.startOffset < this._loopEnd) {\n\t if (event.startOffset < offset) {\n\t //start it on the next loop\n\t ticks += this._getLoopDuration();\n\t }\n\t event.start(Tone.Ticks(ticks));\n\t } else if (event.startOffset < this._loopStart && event.startOffset >= offset) {\n\t event.loop = false;\n\t event.start(Tone.Ticks(ticks));\n\t }\n\t } else if (event.startOffset >= offset) {\n\t event.start(Tone.Ticks(ticks));\n\t }\n\t };\n\t /**\n\t\t * The start from the scheduled start time\n\t\t * @type {Ticks}\n\t\t * @memberOf Tone.Part#\n\t\t * @name startOffset\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'startOffset', {\n\t get: function () {\n\t return this._startOffset;\n\t },\n\t set: function (offset) {\n\t this._startOffset = offset;\n\t this._forEach(function (event) {\n\t event.startOffset += this._startOffset;\n\t });\n\t }\n\t });\n\t /**\n\t\t * Stop the part at the given time.\n\t\t * @param {TimelinePosition} time When to stop the part.\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.stop = function (time) {\n\t var ticks = this.toTicks(time);\n\t this._state.cancel(ticks);\n\t this._state.setStateAtTime(Tone.State.Stopped, ticks);\n\t this._forEach(function (event) {\n\t event.stop(time);\n\t });\n\t return this;\n\t };\n\t /**\n\t\t * Get/Set an Event's value at the given time.\n\t\t * If a value is passed in and no event exists at\n\t\t * the given time, one will be created with that value.\n\t\t * If two events are at the same time, the first one will\n\t\t * be returned.\n\t\t * @example\n\t\t * part.at(\"1m\"); //returns the part at the first measure\n\t\t *\n\t\t * part.at(\"2m\", \"C2\"); //set the value at \"2m\" to C2.\n\t\t * //if an event didn't exist at that time, it will be created.\n\t\t * @param {TransportTime} time The time of the event to get or set.\n\t\t * @param {*=} value If a value is passed in, the value of the\n\t\t * event at the given time will be set to it.\n\t\t * @return {Tone.Event} the event at the time\n\t\t */\n\t Tone.Part.prototype.at = function (time, value) {\n\t time = Tone.TransportTime(time);\n\t var tickTime = Tone.Ticks(1).toSeconds();\n\t for (var i = 0; i < this._events.length; i++) {\n\t var event = this._events[i];\n\t if (Math.abs(time.toTicks() - event.startOffset) < tickTime) {\n\t if (!Tone.isUndef(value)) {\n\t event.value = value;\n\t }\n\t return event;\n\t }\n\t }\n\t //if there was no event at that time, create one\n\t if (!Tone.isUndef(value)) {\n\t this.add(time, value);\n\t //return the new event\n\t return this._events[this._events.length - 1];\n\t } else {\n\t return null;\n\t }\n\t };\n\t /**\n\t\t * Add a an event to the part.\n\t\t * @param {Time} time The time the note should start.\n\t\t * If an object is passed in, it should\n\t\t * have a 'time' attribute and the rest\n\t\t * of the object will be used as the 'value'.\n\t\t * @param {Tone.Event|*} value\n\t\t * @returns {Tone.Part} this\n\t\t * @example\n\t\t * part.add(\"1m\", \"C#+11\");\n\t\t */\n\t Tone.Part.prototype.add = function (time, value) {\n\t //extract the parameters\n\t if (time.hasOwnProperty('time')) {\n\t value = time;\n\t time = value.time;\n\t }\n\t time = this.toTicks(time);\n\t var event;\n\t if (value instanceof Tone.Event) {\n\t event = value;\n\t event.callback = this._tick.bind(this);\n\t } else {\n\t event = new Tone.Event({\n\t 'callback': this._tick.bind(this),\n\t 'value': value\n\t });\n\t }\n\t //the start offset\n\t event.startOffset = time;\n\t //initialize the values\n\t event.set({\n\t 'loopEnd': this.loopEnd,\n\t 'loopStart': this.loopStart,\n\t 'loop': this.loop,\n\t 'humanize': this.humanize,\n\t 'playbackRate': this.playbackRate,\n\t 'probability': this.probability\n\t });\n\t this._events.push(event);\n\t //start the note if it should be played right now\n\t this._restartEvent(event);\n\t return this;\n\t };\n\t /**\n\t\t * Restart the given event\n\t\t * @param {Tone.Event} event\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._restartEvent = function (event) {\n\t this._state.forEach(function (stateEvent) {\n\t if (stateEvent.state === Tone.State.Started) {\n\t this._startNote(event, stateEvent.time, stateEvent.offset);\n\t } else {\n\t //stop the note\n\t event.stop(Tone.Ticks(stateEvent.time));\n\t }\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Remove an event from the part. Will recursively iterate\n\t\t * into nested parts to find the event.\n\t\t * @param {Time} time The time of the event\n\t\t * @param {*} value Optionally select only a specific event value\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.remove = function (time, value) {\n\t //extract the parameters\n\t if (time.hasOwnProperty('time')) {\n\t value = time;\n\t time = value.time;\n\t }\n\t time = this.toTicks(time);\n\t for (var i = this._events.length - 1; i >= 0; i--) {\n\t var event = this._events[i];\n\t if (event instanceof Tone.Part) {\n\t event.remove(time, value);\n\t } else if (event.startOffset === time) {\n\t if (Tone.isUndef(value) || !Tone.isUndef(value) && event.value === value) {\n\t this._events.splice(i, 1);\n\t event.dispose();\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Remove all of the notes from the group.\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.removeAll = function () {\n\t this._forEach(function (event) {\n\t event.dispose();\n\t });\n\t this._events = [];\n\t return this;\n\t };\n\t /**\n\t\t * Cancel scheduled state change events: i.e. \"start\" and \"stop\".\n\t\t * @param {TimelinePosition} after The time after which to cancel the scheduled events.\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.cancel = function (after) {\n\t this._forEach(function (event) {\n\t event.cancel(after);\n\t });\n\t this._state.cancel(this.toTicks(after));\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over all of the events\n\t\t * @param {Function} callback\n\t\t * @param {Object} ctx The context\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._forEach = function (callback, ctx) {\n\t if (this._events) {\n\t ctx = Tone.defaultArg(ctx, this);\n\t for (var i = this._events.length - 1; i >= 0; i--) {\n\t var e = this._events[i];\n\t if (e instanceof Tone.Part) {\n\t e._forEach(callback, ctx);\n\t } else {\n\t callback.call(ctx, e);\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Set the attribute of all of the events\n\t\t * @param {String} attr the attribute to set\n\t\t * @param {*} value The value to set it to\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._setAll = function (attr, value) {\n\t this._forEach(function (event) {\n\t event[attr] = value;\n\t });\n\t };\n\t /**\n\t\t * Internal tick method\n\t\t * @param {Number} time The time of the event in seconds\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._tick = function (time, value) {\n\t if (!this.mute) {\n\t this.callback(time, value);\n\t }\n\t };\n\t /**\n\t\t * Determine if the event should be currently looping\n\t\t * given the loop boundries of this Part.\n\t\t * @param {Tone.Event} event The event to test\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._testLoopBoundries = function (event) {\n\t if (event.startOffset < this._loopStart || event.startOffset >= this._loopEnd) {\n\t event.cancel(0);\n\t } else if (event.state === Tone.State.Stopped) {\n\t //reschedule it if it's stopped\n\t this._restartEvent(event);\n\t }\n\t };\n\t /**\n\t\t * The probability of the notes being triggered.\n\t\t * @memberOf Tone.Part#\n\t\t * @type {NormalRange}\n\t\t * @name probability\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'probability', {\n\t get: function () {\n\t return this._probability;\n\t },\n\t set: function (prob) {\n\t this._probability = prob;\n\t this._setAll('probability', prob);\n\t }\n\t });\n\t /**\n\t\t * If set to true, will apply small random variation\n\t\t * to the callback time. If the value is given as a time, it will randomize\n\t\t * by that amount.\n\t\t * @example\n\t\t * event.humanize = true;\n\t\t * @type {Boolean|Time}\n\t\t * @name humanize\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'humanize', {\n\t get: function () {\n\t return this._humanize;\n\t },\n\t set: function (variation) {\n\t this._humanize = variation;\n\t this._setAll('humanize', variation);\n\t }\n\t });\n\t /**\n\t\t * If the part should loop or not\n\t\t * between Tone.Part.loopStart and\n\t\t * Tone.Part.loopEnd. An integer\n\t\t * value corresponds to the number of\n\t\t * loops the Part does after it starts.\n\t\t * @memberOf Tone.Part#\n\t\t * @type {Boolean|Positive}\n\t\t * @name loop\n\t\t * @example\n\t\t * //loop the part 8 times\n\t\t * part.loop = 8;\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'loop', {\n\t get: function () {\n\t return this._loop;\n\t },\n\t set: function (loop) {\n\t this._loop = loop;\n\t this._forEach(function (event) {\n\t event._loopStart = this._loopStart;\n\t event._loopEnd = this._loopEnd;\n\t event.loop = loop;\n\t this._testLoopBoundries(event);\n\t });\n\t }\n\t });\n\t /**\n\t\t * The loopEnd point determines when it will\n\t\t * loop if Tone.Part.loop is true.\n\t\t * @memberOf Tone.Part#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'loopEnd', {\n\t get: function () {\n\t return Tone.Ticks(this._loopEnd).toSeconds();\n\t },\n\t set: function (loopEnd) {\n\t this._loopEnd = this.toTicks(loopEnd);\n\t if (this._loop) {\n\t this._forEach(function (event) {\n\t event.loopEnd = loopEnd;\n\t this._testLoopBoundries(event);\n\t });\n\t }\n\t }\n\t });\n\t /**\n\t\t * The loopStart point determines when it will\n\t\t * loop if Tone.Part.loop is true.\n\t\t * @memberOf Tone.Part#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'loopStart', {\n\t get: function () {\n\t return Tone.Ticks(this._loopStart).toSeconds();\n\t },\n\t set: function (loopStart) {\n\t this._loopStart = this.toTicks(loopStart);\n\t if (this._loop) {\n\t this._forEach(function (event) {\n\t event.loopStart = this.loopStart;\n\t this._testLoopBoundries(event);\n\t });\n\t }\n\t }\n\t });\n\t /**\n\t\t * \tThe playback rate of the part\n\t\t * @memberOf Tone.Part#\n\t\t * @type {Positive}\n\t\t * @name playbackRate\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._playbackRate;\n\t },\n\t set: function (rate) {\n\t this._playbackRate = rate;\n\t this._setAll('playbackRate', rate);\n\t }\n\t });\n\t /**\n\t\t * \tThe number of scheduled notes in the part.\n\t\t * @memberOf Tone.Part#\n\t\t * @type {Positive}\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'length', {\n\t get: function () {\n\t return this._events.length;\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.dispose = function () {\n\t this.removeAll();\n\t this._state.dispose();\n\t this._state = null;\n\t this.callback = null;\n\t this._events = null;\n\t return this;\n\t };\n\t return Tone.Part;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Pattern arpeggiates between the given notes\n\t\t * in a number of patterns. See Tone.CtrlPattern for\n\t\t * a full list of patterns.\n\t\t * @example\n\t\t * var pattern = new Tone.Pattern(function(time, note){\n\t\t * //the order of the notes passed in depends on the pattern\n\t\t * }, [\"C2\", \"D4\", \"E5\", \"A6\"], \"upDown\");\n\t\t * @extends {Tone.Loop}\n\t\t * @param {Function} callback The callback to invoke with the\n\t\t * event.\n\t\t * @param {Array} values The values to arpeggiate over.\n\t\t */\n\t Tone.Pattern = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'values',\n\t 'pattern'\n\t ], Tone.Pattern);\n\t Tone.Loop.call(this, options);\n\t /**\n\t\t\t * The pattern manager\n\t\t\t * @type {Tone.CtrlPattern}\n\t\t\t * @private\n\t\t\t */\n\t this._pattern = new Tone.CtrlPattern({\n\t 'values': options.values,\n\t 'type': options.pattern,\n\t 'index': options.index\n\t });\n\t };\n\t Tone.extend(Tone.Pattern, Tone.Loop);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Pattern.defaults = {\n\t 'pattern': Tone.CtrlPattern.Type.Up,\n\t 'callback': Tone.noOp,\n\t 'values': []\n\t };\n\t /**\n\t\t * Internal function called when the notes should be called\n\t\t * @param {Number} time The time the event occurs\n\t\t * @private\n\t\t */\n\t Tone.Pattern.prototype._tick = function (time) {\n\t this.callback(time, this._pattern.value);\n\t this._pattern.next();\n\t };\n\t /**\n\t\t * The current index in the values array.\n\t\t * @memberOf Tone.Pattern#\n\t\t * @type {Positive}\n\t\t * @name index\n\t\t */\n\t Object.defineProperty(Tone.Pattern.prototype, 'index', {\n\t get: function () {\n\t return this._pattern.index;\n\t },\n\t set: function (i) {\n\t this._pattern.index = i;\n\t }\n\t });\n\t /**\n\t\t * The array of events.\n\t\t * @memberOf Tone.Pattern#\n\t\t * @type {Array}\n\t\t * @name values\n\t\t */\n\t Object.defineProperty(Tone.Pattern.prototype, 'values', {\n\t get: function () {\n\t return this._pattern.values;\n\t },\n\t set: function (vals) {\n\t this._pattern.values = vals;\n\t }\n\t });\n\t /**\n\t\t * The current value of the pattern.\n\t\t * @memberOf Tone.Pattern#\n\t\t * @type {*}\n\t\t * @name value\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Pattern.prototype, 'value', {\n\t get: function () {\n\t return this._pattern.value;\n\t }\n\t });\n\t /**\n\t\t * The pattern type. See Tone.CtrlPattern for the full list of patterns.\n\t\t * @memberOf Tone.Pattern#\n\t\t * @type {String}\n\t\t * @name pattern\n\t\t */\n\t Object.defineProperty(Tone.Pattern.prototype, 'pattern', {\n\t get: function () {\n\t return this._pattern.type;\n\t },\n\t set: function (pattern) {\n\t this._pattern.type = pattern;\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Pattern} this\n\t\t */\n\t Tone.Pattern.prototype.dispose = function () {\n\t Tone.Loop.prototype.dispose.call(this);\n\t this._pattern.dispose();\n\t this._pattern = null;\n\t };\n\t return Tone.Pattern;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A sequence is an alternate notation of a part. Instead\n\t\t * of passing in an array of [time, event] pairs, pass\n\t\t * in an array of events which will be spaced at the\n\t\t * given subdivision. Sub-arrays will subdivide that beat\n\t\t * by the number of items are in the array.\n\t\t * Sequence notation inspiration from [Tidal](http://yaxu.org/tidal/)\n\t\t * @param {Function} callback The callback to invoke with every note\n\t\t * @param {Array} events The sequence\n\t\t * @param {Time} subdivision The subdivision between which events are placed.\n\t\t * @extends {Tone.Part}\n\t\t * @example\n\t\t * var seq = new Tone.Sequence(function(time, note){\n\t\t * \tconsole.log(note);\n\t\t * //straight quater notes\n\t\t * }, [\"C4\", \"E4\", \"G4\", \"A4\"], \"4n\");\n\t\t * @example\n\t\t * var seq = new Tone.Sequence(function(time, note){\n\t\t * \tconsole.log(note);\n\t\t * //subdivisions are given as subarrays\n\t\t * }, [\"C4\", [\"E4\", \"D4\", \"E4\"], \"G4\", [\"A4\", \"G4\"]]);\n\t\t */\n\t Tone.Sequence = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'events',\n\t 'subdivision'\n\t ], Tone.Sequence);\n\t //remove the events\n\t var events = options.events;\n\t delete options.events;\n\t Tone.Part.call(this, options);\n\t /**\n\t\t\t * The subdivison of each note\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this._subdivision = this.toTicks(options.subdivision);\n\t //if no time was passed in, the loop end is the end of the cycle\n\t if (Tone.isUndef(options.loopEnd) && !Tone.isUndef(events)) {\n\t this._loopEnd = events.length * this._subdivision;\n\t }\n\t //defaults to looping\n\t this._loop = true;\n\t //add all of the events\n\t if (!Tone.isUndef(events)) {\n\t for (var i = 0; i < events.length; i++) {\n\t this.add(i, events[i]);\n\t }\n\t }\n\t };\n\t Tone.extend(Tone.Sequence, Tone.Part);\n\t /**\n\t\t * The default values.\n\t\t * @type {Object}\n\t\t */\n\t Tone.Sequence.defaults = { 'subdivision': '4n' };\n\t /**\n\t\t * The subdivision of the sequence. This can only be\n\t\t * set in the constructor. The subdivision is the\n\t\t * interval between successive steps.\n\t\t * @type {Time}\n\t\t * @memberOf Tone.Sequence#\n\t\t * @name subdivision\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Sequence.prototype, 'subdivision', {\n\t get: function () {\n\t return Tone.Ticks(this._subdivision).toSeconds();\n\t }\n\t });\n\t /**\n\t\t * Get/Set an index of the sequence. If the index contains a subarray,\n\t\t * a Tone.Sequence representing that sub-array will be returned.\n\t\t * @example\n\t\t * var sequence = new Tone.Sequence(playNote, [\"E4\", \"C4\", \"F#4\", [\"A4\", \"Bb3\"]])\n\t\t * sequence.at(0)// => returns \"E4\"\n\t\t * //set a value\n\t\t * sequence.at(0, \"G3\");\n\t\t * //get a nested sequence\n\t\t * sequence.at(3).at(1)// => returns \"Bb3\"\n\t\t * @param {Positive} index The index to get or set\n\t\t * @param {*} value Optionally pass in the value to set at the given index.\n\t\t */\n\t Tone.Sequence.prototype.at = function (index, value) {\n\t //if the value is an array,\n\t if (Tone.isArray(value)) {\n\t //remove the current event at that index\n\t this.remove(index);\n\t }\n\t //call the parent's method\n\t return Tone.Part.prototype.at.call(this, this._indexTime(index), value);\n\t };\n\t /**\n\t\t * Add an event at an index, if there's already something\n\t\t * at that index, overwrite it. If `value` is an array,\n\t\t * it will be parsed as a subsequence.\n\t\t * @param {Number} index The index to add the event to\n\t\t * @param {*} value The value to add at that index\n\t\t * @returns {Tone.Sequence} this\n\t\t */\n\t Tone.Sequence.prototype.add = function (index, value) {\n\t if (value === null) {\n\t return this;\n\t }\n\t if (Tone.isArray(value)) {\n\t //make a subsequence and add that to the sequence\n\t var subSubdivision = Math.round(this._subdivision / value.length);\n\t value = new Tone.Sequence(this._tick.bind(this), value, Tone.Ticks(subSubdivision));\n\t }\n\t Tone.Part.prototype.add.call(this, this._indexTime(index), value);\n\t return this;\n\t };\n\t /**\n\t\t * Remove a value from the sequence by index\n\t\t * @param {Number} index The index of the event to remove\n\t\t * @returns {Tone.Sequence} this\n\t\t */\n\t Tone.Sequence.prototype.remove = function (index, value) {\n\t Tone.Part.prototype.remove.call(this, this._indexTime(index), value);\n\t return this;\n\t };\n\t /**\n\t\t * Get the time of the index given the Sequence's subdivision\n\t\t * @param {Number} index\n\t\t * @return {Time} The time of that index\n\t\t * @private\n\t\t */\n\t Tone.Sequence.prototype._indexTime = function (index) {\n\t if (index instanceof Tone.TransportTime) {\n\t return index;\n\t } else {\n\t return Tone.Ticks(index * this._subdivision + this.startOffset).toSeconds();\n\t }\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Sequence} this\n\t\t */\n\t Tone.Sequence.prototype.dispose = function () {\n\t Tone.Part.prototype.dispose.call(this);\n\t return this;\n\t };\n\t return Tone.Sequence;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PulseOscillator is a pulse oscillator with control over pulse width,\n\t\t * also known as the duty cycle. At 50% duty cycle (width = 0.5) the wave is\n\t\t * a square and only odd-numbered harmonics are present. At all other widths\n\t\t * even-numbered harmonics are present. Read more\n\t\t * [here](https://wigglewave.wordpress.com/2014/08/16/pulse-waveforms-and-harmonics/).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Source}\n\t\t * @param {Frequency} [frequency] The frequency of the oscillator\n\t\t * @param {NormalRange} [width] The width of the pulse\n\t\t * @example\n\t\t * var pulse = new Tone.PulseOscillator(\"E5\", 0.4).toMaster().start();\n\t\t */\n\t Tone.PulseOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'width'\n\t ], Tone.Oscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The width of the pulse.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\t /**\n\t\t\t * gate the width amount\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._widthGate = new Tone.Gain();\n\t /**\n\t\t\t * the sawtooth oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._sawtooth = new Tone.Oscillator({\n\t frequency: options.frequency,\n\t detune: options.detune,\n\t type: 'sawtooth',\n\t phase: options.phase\n\t });\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._sawtooth.frequency;\n\t /**\n\t\t\t * The detune in cents.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this._sawtooth.detune;\n\t /**\n\t\t\t * Threshold the signal to turn it into a square\n\t\t\t * @type {Tone.WaveShaper}\n\t\t\t * @private\n\t\t\t */\n\t this._thresh = new Tone.WaveShaper(function (val) {\n\t if (val < 0) {\n\t return -1;\n\t } else {\n\t return 1;\n\t }\n\t });\n\t //connections\n\t this._sawtooth.chain(this._thresh, this.output);\n\t this.width.chain(this._widthGate, this._thresh);\n\t this._readOnly([\n\t 'width',\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.PulseOscillator, Tone.Source);\n\t /**\n\t\t * The default parameters.\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.PulseOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'width': 0.2\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.PulseOscillator.prototype._start = function (time) {\n\t time = this.toSeconds(time);\n\t this._sawtooth.start(time);\n\t this._widthGate.gain.setValueAtTime(1, time);\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.PulseOscillator.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._sawtooth.stop(time);\n\t //the width is still connected to the output.\n\t //that needs to be stopped also\n\t this._widthGate.gain.setValueAtTime(0, time);\n\t };\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.PulseOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._sawtooth.phase;\n\t },\n\t set: function (phase) {\n\t this._sawtooth.phase = phase;\n\t }\n\t });\n\t /**\n\t\t * The type of the oscillator. Always returns \"pulse\".\n\t\t * @readOnly\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.PulseOscillator.prototype, 'type', {\n\t get: function () {\n\t return 'pulse';\n\t }\n\t });\n\t /**\n\t\t * The partials of the waveform. Cannot set partials for this waveform type\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Tone.PulseOscillator.prototype, 'partials', {\n\t get: function () {\n\t return [];\n\t }\n\t });\n\t /**\n\t\t * Clean up method.\n\t\t * @return {Tone.PulseOscillator} this\n\t\t */\n\t Tone.PulseOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._sawtooth.dispose();\n\t this._sawtooth = null;\n\t this._writable([\n\t 'width',\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t this.width.dispose();\n\t this.width = null;\n\t this._widthGate.dispose();\n\t this._widthGate = null;\n\t this._thresh.dispose();\n\t this._thresh = null;\n\t this.frequency = null;\n\t this.detune = null;\n\t return this;\n\t };\n\t return Tone.PulseOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PWMOscillator modulates the width of a Tone.PulseOscillator\n\t\t * at the modulationFrequency. This has the effect of continuously\n\t\t * changing the timbre of the oscillator by altering the harmonics\n\t\t * generated.\n\t\t *\n\t\t * @extends {Tone.Source}\n\t\t * @constructor\n\t\t * @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t * @param {Frequency} modulationFrequency The modulation frequency of the width of the pulse.\n\t\t * @example\n\t\t * var pwm = new Tone.PWMOscillator(\"Ab3\", 0.3).toMaster().start();\n\t\t */\n\t Tone.PWMOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'modulationFrequency'\n\t ], Tone.PWMOscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * the pulse oscillator\n\t\t\t * @type {Tone.PulseOscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._pulse = new Tone.PulseOscillator(options.modulationFrequency);\n\t //change the pulse oscillator type\n\t this._pulse._sawtooth.type = 'sine';\n\t /**\n\t\t\t * the modulator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._modulator = new Tone.Oscillator({\n\t 'frequency': options.frequency,\n\t 'detune': options.detune,\n\t 'phase': options.phase\n\t });\n\t /**\n\t\t\t * Scale the oscillator so it doesn't go silent\n\t\t\t * at the extreme values.\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._scale = new Tone.Multiply(2);\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._modulator.frequency;\n\t /**\n\t\t\t * The detune of the oscillator.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this._modulator.detune;\n\t /**\n\t\t\t * The modulation rate of the oscillator.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.modulationFrequency = this._pulse.frequency;\n\t //connections\n\t this._modulator.chain(this._scale, this._pulse.width);\n\t this._pulse.connect(this.output);\n\t this._readOnly([\n\t 'modulationFrequency',\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.PWMOscillator, Tone.Source);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.PWMOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'modulationFrequency': 0.4\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now]\n\t\t * @private\n\t\t */\n\t Tone.PWMOscillator.prototype._start = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.start(time);\n\t this._pulse.start(time);\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @param {Time} time (optional) timing parameter\n\t\t * @private\n\t\t */\n\t Tone.PWMOscillator.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.stop(time);\n\t this._pulse.stop(time);\n\t };\n\t /**\n\t\t * The type of the oscillator. Always returns \"pwm\".\n\t\t * @readOnly\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.PWMOscillator.prototype, 'type', {\n\t get: function () {\n\t return 'pwm';\n\t }\n\t });\n\t /**\n\t\t * The partials of the waveform. Cannot set partials for this waveform type\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Tone.PWMOscillator.prototype, 'partials', {\n\t get: function () {\n\t return [];\n\t }\n\t });\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.PWMOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._modulator.phase;\n\t },\n\t set: function (phase) {\n\t this._modulator.phase = phase;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.PWMOscillator} this\n\t\t */\n\t Tone.PWMOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._pulse.dispose();\n\t this._pulse = null;\n\t this._scale.dispose();\n\t this._scale = null;\n\t this._modulator.dispose();\n\t this._modulator = null;\n\t this._writable([\n\t 'modulationFrequency',\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t this.frequency = null;\n\t this.detune = null;\n\t this.modulationFrequency = null;\n\t return this;\n\t };\n\t return Tone.PWMOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.FMOscillator\n\t\t *\n\t\t * @extends {Tone.Source}\n\t\t * @constructor\n\t\t * @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t * @param {String} type The type of the carrier oscillator.\n\t\t * @param {String} modulationType The type of the modulator oscillator.\n\t\t * @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.FMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t Tone.FMOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type',\n\t 'modulationType'\n\t ], Tone.FMOscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The carrier oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._carrier = new Tone.Oscillator(options.frequency, options.type);\n\t /**\n\t\t\t * The oscillator's frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune control signal.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this._carrier.detune;\n\t this.detune.value = options.detune;\n\t /**\n\t\t\t * The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t\t\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t\t * modulating signal (ma) -- as in ma/mf.\n\t\t\t *\t@type {Positive}\n\t\t\t *\t@signal\n\t\t\t */\n\t this.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\t this.modulationIndex.units = Tone.Type.Positive;\n\t /**\n\t\t\t * The modulating oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\t /**\n\t\t\t * Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t\t * A harmonicity of 1 gives both oscillators the same frequency.\n\t\t\t * Harmonicity = 2 means a change of an octave.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * //pitch the modulator an octave below carrier\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t this.harmonicity.units = Tone.Type.Positive;\n\t /**\n\t\t\t * the node where the modulation happens\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationNode = new Tone.Gain(0);\n\t //connections\n\t this.frequency.connect(this._carrier.frequency);\n\t this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t this.frequency.chain(this.modulationIndex, this._modulationNode);\n\t this._modulator.connect(this._modulationNode.gain);\n\t this._modulationNode.connect(this._carrier.frequency);\n\t this._carrier.connect(this.output);\n\t this.detune.connect(this._modulator.detune);\n\t this.phase = options.phase;\n\t this._readOnly([\n\t 'modulationIndex',\n\t 'frequency',\n\t 'detune',\n\t 'harmonicity'\n\t ]);\n\t };\n\t Tone.extend(Tone.FMOscillator, Tone.Source);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.FMOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'modulationIndex': 2,\n\t 'modulationType': 'square',\n\t 'harmonicity': 1\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now]\n\t\t * @private\n\t\t */\n\t Tone.FMOscillator.prototype._start = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.start(time);\n\t this._carrier.start(time);\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @param {Time} time (optional) timing parameter\n\t\t * @private\n\t\t */\n\t Tone.FMOscillator.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.stop(time);\n\t this._carrier.stop(time);\n\t };\n\t /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.FMOscillator.prototype, 'type', {\n\t get: function () {\n\t return this._carrier.type;\n\t },\n\t set: function (type) {\n\t this._carrier.type = type;\n\t }\n\t });\n\t /**\n\t\t * The type of the modulator oscillator\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {String}\n\t\t * @name modulationType\n\t\t */\n\t Object.defineProperty(Tone.FMOscillator.prototype, 'modulationType', {\n\t get: function () {\n\t return this._modulator.type;\n\t },\n\t set: function (type) {\n\t this._modulator.type = type;\n\t }\n\t });\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.FMOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._carrier.phase;\n\t },\n\t set: function (phase) {\n\t this._carrier.phase = phase;\n\t this._modulator.phase = phase;\n\t }\n\t });\n\t /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t Object.defineProperty(Tone.FMOscillator.prototype, 'partials', {\n\t get: function () {\n\t return this._carrier.partials;\n\t },\n\t set: function (partials) {\n\t this._carrier.partials = partials;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.FMOscillator} this\n\t\t */\n\t Tone.FMOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._writable([\n\t 'modulationIndex',\n\t 'frequency',\n\t 'detune',\n\t 'harmonicity'\n\t ]);\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune = null;\n\t this.harmonicity.dispose();\n\t this.harmonicity = null;\n\t this._carrier.dispose();\n\t this._carrier = null;\n\t this._modulator.dispose();\n\t this._modulator = null;\n\t this._modulationNode.dispose();\n\t this._modulationNode = null;\n\t this.modulationIndex.dispose();\n\t this.modulationIndex = null;\n\t return this;\n\t };\n\t return Tone.FMOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.AMOscillator\n\t\t *\n\t\t * @extends {Tone.Oscillator}\n\t\t * @constructor\n\t\t * @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t * @param {String} type The type of the carrier oscillator.\n\t\t * @param {String} modulationType The type of the modulator oscillator.\n\t\t * @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.AMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t Tone.AMOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type',\n\t 'modulationType'\n\t ], Tone.AMOscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The carrier oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._carrier = new Tone.Oscillator(options.frequency, options.type);\n\t /**\n\t\t\t * The oscillator's frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._carrier.frequency;\n\t /**\n\t\t\t * The detune control signal.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this._carrier.detune;\n\t this.detune.value = options.detune;\n\t /**\n\t\t\t * The modulating oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\t /**\n\t\t\t * convert the -1,1 output to 0,1\n\t\t\t * @type {Tone.AudioToGain}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationScale = new Tone.AudioToGain();\n\t /**\n\t\t\t * Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t\t * A harmonicity of 1 gives both oscillators the same frequency.\n\t\t\t * Harmonicity = 2 means a change of an octave.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * //pitch the modulator an octave below carrier\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t this.harmonicity.units = Tone.Type.Positive;\n\t /**\n\t\t\t * the node where the modulation happens\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationNode = new Tone.Gain(0);\n\t //connections\n\t this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t this.detune.connect(this._modulator.detune);\n\t this._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\t this._carrier.chain(this._modulationNode, this.output);\n\t this.phase = options.phase;\n\t this._readOnly([\n\t 'frequency',\n\t 'detune',\n\t 'harmonicity'\n\t ]);\n\t };\n\t Tone.extend(Tone.AMOscillator, Tone.Oscillator);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.AMOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'modulationType': 'square',\n\t 'harmonicity': 1\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now]\n\t\t * @private\n\t\t */\n\t Tone.AMOscillator.prototype._start = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.start(time);\n\t this._carrier.start(time);\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @param {Time} time (optional) timing parameter\n\t\t * @private\n\t\t */\n\t Tone.AMOscillator.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.stop(time);\n\t this._carrier.stop(time);\n\t };\n\t /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.AMOscillator.prototype, 'type', {\n\t get: function () {\n\t return this._carrier.type;\n\t },\n\t set: function (type) {\n\t this._carrier.type = type;\n\t }\n\t });\n\t /**\n\t\t * The type of the modulator oscillator\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {string}\n\t\t * @name modulationType\n\t\t */\n\t Object.defineProperty(Tone.AMOscillator.prototype, 'modulationType', {\n\t get: function () {\n\t return this._modulator.type;\n\t },\n\t set: function (type) {\n\t this._modulator.type = type;\n\t }\n\t });\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.AMOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._carrier.phase;\n\t },\n\t set: function (phase) {\n\t this._carrier.phase = phase;\n\t this._modulator.phase = phase;\n\t }\n\t });\n\t /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t Object.defineProperty(Tone.AMOscillator.prototype, 'partials', {\n\t get: function () {\n\t return this._carrier.partials;\n\t },\n\t set: function (partials) {\n\t this._carrier.partials = partials;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.AMOscillator} this\n\t\t */\n\t Tone.AMOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'detune',\n\t 'harmonicity'\n\t ]);\n\t this.frequency = null;\n\t this.detune = null;\n\t this.harmonicity.dispose();\n\t this.harmonicity = null;\n\t this._carrier.dispose();\n\t this._carrier = null;\n\t this._modulator.dispose();\n\t this._modulator = null;\n\t this._modulationNode.dispose();\n\t this._modulationNode = null;\n\t this._modulationScale.dispose();\n\t this._modulationScale = null;\n\t return this;\n\t };\n\t return Tone.AMOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.FatOscillator\n\t\t *\n\t\t * @extends {Tone.Source}\n\t\t * @constructor\n\t\t * @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t * @param {String} type The type of the carrier oscillator.\n\t\t * @param {String} modulationType The type of the modulator oscillator.\n\t\t * @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.FatOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t Tone.FatOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type',\n\t 'spread'\n\t ], Tone.FatOscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The oscillator's frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune control signal.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t /**\n\t\t\t * The array of oscillators\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillators = [];\n\t /**\n\t\t\t * The total spread of the oscillators\n\t\t\t * @type {Cents}\n\t\t\t * @private\n\t\t\t */\n\t this._spread = options.spread;\n\t /**\n\t\t\t * The type of the oscillator\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._type = options.type;\n\t /**\n\t\t\t * The phase of the oscillators\n\t\t\t * @type {Degrees}\n\t\t\t * @private\n\t\t\t */\n\t this._phase = options.phase;\n\t /**\n\t\t\t * The partials array\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._partials = Tone.defaultArg(options.partials, []);\n\t //set the count initially\n\t this.count = options.count;\n\t this._readOnly([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.FatOscillator, Tone.Source);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.FatOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'spread': 20,\n\t 'count': 3,\n\t 'type': 'sawtooth'\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now]\n\t\t * @private\n\t\t */\n\t Tone.FatOscillator.prototype._start = function (time) {\n\t time = this.toSeconds(time);\n\t this._forEach(function (osc) {\n\t osc.start(time);\n\t });\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @param {Time} time (optional) timing parameter\n\t\t * @private\n\t\t */\n\t Tone.FatOscillator.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._forEach(function (osc) {\n\t osc.stop(time);\n\t });\n\t };\n\t /**\n\t\t * Iterate over all of the oscillators\n\t\t * @param {Function} iterator The iterator function\n\t\t * @private\n\t\t */\n\t Tone.FatOscillator.prototype._forEach = function (iterator) {\n\t for (var i = 0; i < this._oscillators.length; i++) {\n\t iterator.call(this, this._oscillators[i], i);\n\t }\n\t };\n\t /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.FatOscillator.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t this._type = type;\n\t this._forEach(function (osc) {\n\t osc.type = type;\n\t });\n\t }\n\t });\n\t /**\n\t\t * The detune spread between the oscillators. If \"count\" is\n\t\t * set to 3 oscillators and the \"spread\" is set to 40,\n\t\t * the three oscillators would be detuned like this: [-20, 0, 20]\n\t\t * for a total detune spread of 40 cents.\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Cents}\n\t\t * @name spread\n\t\t */\n\t Object.defineProperty(Tone.FatOscillator.prototype, 'spread', {\n\t get: function () {\n\t return this._spread;\n\t },\n\t set: function (spread) {\n\t this._spread = spread;\n\t if (this._oscillators.length > 1) {\n\t var start = -spread / 2;\n\t var step = spread / (this._oscillators.length - 1);\n\t this._forEach(function (osc, i) {\n\t osc.detune.value = start + step * i;\n\t });\n\t }\n\t }\n\t });\n\t /**\n\t\t * The number of detuned oscillators\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Number}\n\t\t * @name count\n\t\t */\n\t Object.defineProperty(Tone.FatOscillator.prototype, 'count', {\n\t get: function () {\n\t return this._oscillators.length;\n\t },\n\t set: function (count) {\n\t count = Math.max(count, 1);\n\t if (this._oscillators.length !== count) {\n\t // var partials = this.partials;\n\t // var type = this.type;\n\t //dispose the previous oscillators\n\t this._forEach(function (osc) {\n\t osc.dispose();\n\t });\n\t this._oscillators = [];\n\t for (var i = 0; i < count; i++) {\n\t var osc = new Tone.Oscillator();\n\t if (this.type === Tone.Oscillator.Type.Custom) {\n\t osc.partials = this._partials;\n\t } else {\n\t osc.type = this._type;\n\t }\n\t osc.phase = this._phase;\n\t osc.volume.value = -6 - count * 1.1;\n\t this.frequency.connect(osc.frequency);\n\t this.detune.connect(osc.detune);\n\t osc.connect(this.output);\n\t this._oscillators[i] = osc;\n\t }\n\t //set the spread\n\t this.spread = this._spread;\n\t if (this.state === Tone.State.Started) {\n\t this._forEach(function (osc) {\n\t osc.start();\n\t });\n\t }\n\t }\n\t }\n\t });\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Number}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.FatOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._phase;\n\t },\n\t set: function (phase) {\n\t this._phase = phase;\n\t this._forEach(function (osc) {\n\t osc.phase = phase;\n\t });\n\t }\n\t });\n\t /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t Object.defineProperty(Tone.FatOscillator.prototype, 'partials', {\n\t get: function () {\n\t return this._partials;\n\t },\n\t set: function (partials) {\n\t this._partials = partials;\n\t this._type = Tone.Oscillator.Type.Custom;\n\t this._forEach(function (osc) {\n\t osc.partials = partials;\n\t });\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.FatOscillator} this\n\t\t */\n\t Tone.FatOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t this._forEach(function (osc) {\n\t osc.dispose();\n\t });\n\t this._oscillators = null;\n\t this._partials = null;\n\t return this;\n\t };\n\t return Tone.FatOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.OmniOscillator aggregates Tone.Oscillator, Tone.PulseOscillator,\n\t\t * Tone.PWMOscillator, Tone.FMOscillator, Tone.AMOscillator, and Tone.FatOscillator\n\t\t * into one class. The oscillator class can be changed by setting the `type`.\n\t\t * `omniOsc.type = \"pwm\"` will set it to the Tone.PWMOscillator. Prefixing\n\t\t * any of the basic types (\"sine\", \"square4\", etc.) with \"fm\", \"am\", or \"fat\"\n\t\t * will use the FMOscillator, AMOscillator or FatOscillator respectively.\n\t\t * For example: `omniOsc.type = \"fatsawtooth\"` will create set the oscillator\n\t\t * to a FatOscillator of type \"sawtooth\".\n\t\t *\n\t\t * @extends {Tone.Source}\n\t\t * @constructor\n\t\t * @param {Frequency} frequency The initial frequency of the oscillator.\n\t\t * @param {String} type The type of the oscillator.\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(\"C#4\", \"pwm\");\n\t\t */\n\t Tone.OmniOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type'\n\t ], Tone.OmniOscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune control\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t /**\n\t\t\t * the type of the oscillator source\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._sourceType = undefined;\n\t /**\n\t\t\t * the oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillator = null;\n\t //set the oscillator\n\t this.type = options.type;\n\t this._readOnly([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t //set the options\n\t this.set(options);\n\t };\n\t Tone.extend(Tone.OmniOscillator, Tone.Source);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.OmniOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'type': 'sine',\n\t 'phase': 0\n\t };\n\t /**\n\t\t * @enum {String}\n\t\t * @private\n\t\t */\n\t var OmniOscType = {\n\t Pulse: 'PulseOscillator',\n\t PWM: 'PWMOscillator',\n\t Osc: 'Oscillator',\n\t FM: 'FMOscillator',\n\t AM: 'AMOscillator',\n\t Fat: 'FatOscillator'\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now] the time to start the oscillator\n\t\t * @private\n\t\t */\n\t Tone.OmniOscillator.prototype._start = function (time) {\n\t this._oscillator.start(time);\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now] the time to start the oscillator\n\t\t * @private\n\t\t */\n\t Tone.OmniOscillator.prototype._stop = function (time) {\n\t this._oscillator.stop(time);\n\t };\n\t Tone.OmniOscillator.prototype.restart = function (time) {\n\t this._oscillator.restart(time);\n\t };\n\t /**\n\t\t * The type of the oscillator. Can be any of the basic types: sine, square, triangle, sawtooth. Or\n\t\t * prefix the basic types with \"fm\", \"am\", or \"fat\" to use the FMOscillator, AMOscillator or FatOscillator\n\t\t * types. The oscillator could also be set to \"pwm\" or \"pulse\". All of the parameters of the\n\t\t * oscillator's class are accessible when the oscillator is set to that type, but throws an error\n\t\t * when it's not.\n\t\t *\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {String}\n\t\t * @name type\n\t\t * @example\n\t\t * omniOsc.type = \"pwm\";\n\t\t * //modulationFrequency is parameter which is available\n\t\t * //only when the type is \"pwm\".\n\t\t * omniOsc.modulationFrequency.value = 0.5;\n\t\t * @example\n\t\t * //an square wave frequency modulated by a sawtooth\n\t\t * omniOsc.type = \"fmsquare\";\n\t\t * omniOsc.modulationType = \"sawtooth\";\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'type', {\n\t get: function () {\n\t var prefix = '';\n\t if (this._sourceType === OmniOscType.FM) {\n\t prefix = 'fm';\n\t } else if (this._sourceType === OmniOscType.AM) {\n\t prefix = 'am';\n\t } else if (this._sourceType === OmniOscType.Fat) {\n\t prefix = 'fat';\n\t }\n\t return prefix + this._oscillator.type;\n\t },\n\t set: function (type) {\n\t if (type.substr(0, 2) === 'fm') {\n\t this._createNewOscillator(OmniOscType.FM);\n\t this._oscillator.type = type.substr(2);\n\t } else if (type.substr(0, 2) === 'am') {\n\t this._createNewOscillator(OmniOscType.AM);\n\t this._oscillator.type = type.substr(2);\n\t } else if (type.substr(0, 3) === 'fat') {\n\t this._createNewOscillator(OmniOscType.Fat);\n\t this._oscillator.type = type.substr(3);\n\t } else if (type === 'pwm') {\n\t this._createNewOscillator(OmniOscType.PWM);\n\t } else if (type === 'pulse') {\n\t this._createNewOscillator(OmniOscType.Pulse);\n\t } else {\n\t this._createNewOscillator(OmniOscType.Osc);\n\t this._oscillator.type = type;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The partials of the waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * This is not available on \"pwm\" and \"pulse\" oscillator types.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'partials', {\n\t get: function () {\n\t return this._oscillator.partials;\n\t },\n\t set: function (partials) {\n\t this._oscillator.partials = partials;\n\t }\n\t });\n\t /**\n\t\t * Set a member/attribute of the oscillator.\n\t\t * @param {Object|String} params\n\t\t * @param {number=} value\n\t\t * @param {Time=} rampTime\n\t\t * @returns {Tone.OmniOscillator} this\n\t\t */\n\t Tone.OmniOscillator.prototype.set = function (params, value) {\n\t //make sure the type is set first\n\t if (params === 'type') {\n\t this.type = value;\n\t } else if (Tone.isObject(params) && params.hasOwnProperty('type')) {\n\t this.type = params.type;\n\t }\n\t //then set the rest\n\t Tone.prototype.set.apply(this, arguments);\n\t return this;\n\t };\n\t /**\n\t\t * connect the oscillator to the frequency and detune signals\n\t\t * @private\n\t\t */\n\t Tone.OmniOscillator.prototype._createNewOscillator = function (oscType) {\n\t if (oscType !== this._sourceType) {\n\t this._sourceType = oscType;\n\t var OscillatorConstructor = Tone[oscType];\n\t //short delay to avoid clicks on the change\n\t var now = this.now();\n\t if (this._oscillator !== null) {\n\t var oldOsc = this._oscillator;\n\t oldOsc.stop(now);\n\t //dispose the old one\n\t this.context.setTimeout(function () {\n\t oldOsc.dispose();\n\t oldOsc = null;\n\t }, this.blockTime);\n\t }\n\t this._oscillator = new OscillatorConstructor();\n\t this.frequency.connect(this._oscillator.frequency);\n\t this.detune.connect(this._oscillator.detune);\n\t this._oscillator.connect(this.output);\n\t if (this.state === Tone.State.Started) {\n\t this._oscillator.start(now);\n\t }\n\t }\n\t };\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._oscillator.phase;\n\t },\n\t set: function (phase) {\n\t this._oscillator.phase = phase;\n\t }\n\t });\n\t /**\n\t\t * The width of the oscillator (only if the oscillator is set to \"pulse\")\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {NormalRange}\n\t\t * @signal\n\t\t * @name width\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(440, \"pulse\");\n\t\t * //can access the width attribute only if type === \"pulse\"\n\t\t * omniOsc.width.value = 0.2;\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'width', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.Pulse) {\n\t return this._oscillator.width;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The number of detuned oscillators\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Number}\n\t\t * @name count\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'count', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.Fat) {\n\t return this._oscillator.count;\n\t }\n\t },\n\t set: function (count) {\n\t if (this._sourceType === OmniOscType.Fat) {\n\t this._oscillator.count = count;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The detune spread between the oscillators. If \"count\" is\n\t\t * set to 3 oscillators and the \"spread\" is set to 40,\n\t\t * the three oscillators would be detuned like this: [-20, 0, 20]\n\t\t * for a total detune spread of 40 cents. See Tone.FatOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Cents}\n\t\t * @name spread\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'spread', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.Fat) {\n\t return this._oscillator.spread;\n\t }\n\t },\n\t set: function (spread) {\n\t if (this._sourceType === OmniOscType.Fat) {\n\t this._oscillator.spread = spread;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The type of the modulator oscillator. Only if the oscillator\n\t\t * is set to \"am\" or \"fm\" types. see. Tone.AMOscillator or Tone.FMOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {String}\n\t\t * @name modulationType\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationType', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t return this._oscillator.modulationType;\n\t }\n\t },\n\t set: function (mType) {\n\t if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t this._oscillator.modulationType = mType;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t * modulating signal (ma) -- as in ma/mf.\n\t\t * See Tone.FMOscillator for more info.\n\t\t * @type {Positive}\n\t\t * @signal\n\t\t * @name modulationIndex\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationIndex', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.FM) {\n\t return this._oscillator.modulationIndex;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t * A harmonicity of 1 gives both oscillators the same frequency.\n\t\t * Harmonicity = 2 means a change of an octave. See Tone.AMOscillator or Tone.FMOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @signal\n\t\t * @type {Positive}\n\t\t * @name harmonicity\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'harmonicity', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t return this._oscillator.harmonicity;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The modulationFrequency Signal of the oscillator\n\t\t * (only if the oscillator type is set to pwm). See\n\t\t * Tone.PWMOscillator for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Frequency}\n\t\t * @signal\n\t\t * @name modulationFrequency\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(440, \"pwm\");\n\t\t * //can access the modulationFrequency attribute only if type === \"pwm\"\n\t\t * omniOsc.modulationFrequency.value = 0.2;\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationFrequency', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.PWM) {\n\t return this._oscillator.modulationFrequency;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.OmniOscillator} this\n\t\t */\n\t Tone.OmniOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t this.detune.dispose();\n\t this.detune = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this._oscillator.dispose();\n\t this._oscillator = null;\n\t this._sourceType = null;\n\t return this;\n\t };\n\t return Tone.OmniOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Base-class for all instruments\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t */\n\t Tone.Instrument = function (options) {\n\t //get the defaults\n\t options = Tone.defaultArg(options, Tone.Instrument.defaults);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The output and volume triming node\n\t\t\t * @type {Tone.Volume}\n\t\t\t * @private\n\t\t\t */\n\t this._volume = this.output = new Tone.Volume(options.volume);\n\t /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t this.volume = this._volume.volume;\n\t this._readOnly('volume');\n\t /**\n\t\t\t * Keep track of all events scheduled to the transport\n\t\t\t * when the instrument is 'synced'\n\t\t\t * @type {Array<Number>}\n\t\t\t * @private\n\t\t\t */\n\t this._scheduledEvents = [];\n\t };\n\t Tone.extend(Tone.Instrument, Tone.AudioNode);\n\t /**\n\t\t * the default attributes\n\t\t * @type {object}\n\t\t */\n\t Tone.Instrument.defaults = {\n\t /** the volume of the output in decibels */\n\t 'volume': 0\n\t };\n\t /**\n\t\t * @abstract\n\t\t * @param {string|number} note the note to trigger\n\t\t * @param {Time} [time=now] the time to trigger the ntoe\n\t\t * @param {number} [velocity=1] the velocity to trigger the note\n\t\t */\n\t Tone.Instrument.prototype.triggerAttack = Tone.noOp;\n\t /**\n\t\t * @abstract\n\t\t * @param {Time} [time=now] when to trigger the release\n\t\t */\n\t Tone.Instrument.prototype.triggerRelease = Tone.noOp;\n\t /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * instrument.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * instrument.triggerAttackRelease('C4', '8n', 0)\n\t\t * instrument.triggerAttackRelease('E4', '8n', '8n')\n\t\t * instrument.triggerAttackRelease('G4', '8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.Instrument.prototype.sync = function () {\n\t this._syncMethod('triggerAttack', 1);\n\t this._syncMethod('triggerRelease', 0);\n\t return this;\n\t };\n\t /**\n\t\t * Wrap the given method so that it can be synchronized\n\t\t * @param {String} method Which method to wrap and sync\n\t\t * @param {Number} timePosition What position the time argument appears in\n\t\t * @private\n\t\t */\n\t Tone.Instrument.prototype._syncMethod = function (method, timePosition) {\n\t var originalMethod = this['_original_' + method] = this[method];\n\t this[method] = function () {\n\t var args = Array.prototype.slice.call(arguments);\n\t var time = args[timePosition];\n\t var id = Tone.Transport.schedule(function (t) {\n\t args[timePosition] = t;\n\t originalMethod.apply(this, args);\n\t }.bind(this), time);\n\t this._scheduledEvents.push(id);\n\t }.bind(this);\n\t };\n\t /**\n\t\t * Unsync the instrument from the Transport\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.Instrument.prototype.unsync = function () {\n\t this._scheduledEvents.forEach(function (id) {\n\t Tone.Transport.clear(id);\n\t });\n\t this._scheduledEvents = [];\n\t if (this._original_triggerAttack) {\n\t this.triggerAttack = this._original_triggerAttack;\n\t this.triggerRelease = this._original_triggerRelease;\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the attack and then the release after the duration.\n\t\t * @param {Frequency} note The note to trigger.\n\t\t * @param {Time} duration How long the note should be held for before\n\t\t * triggering the release. This value must be greater than 0.\n\t\t * @param {Time} [time=now] When the note should be triggered.\n\t\t * @param {NormalRange} [velocity=1] The velocity the note should be triggered at.\n\t\t * @returns {Tone.Instrument} this\n\t\t * @example\n\t\t * //trigger \"C4\" for the duration of an 8th note\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t Tone.Instrument.prototype.triggerAttackRelease = function (note, duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t duration = this.toSeconds(duration);\n\t this.triggerAttack(note, time, velocity);\n\t this.triggerRelease(time + duration);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.Instrument.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._volume.dispose();\n\t this._volume = null;\n\t this._writable(['volume']);\n\t this.volume = null;\n\t this.unsync();\n\t this._scheduledEvents = null;\n\t return this;\n\t };\n\t return Tone.Instrument;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class This is an abstract base class for other monophonic instruments to \n\t\t * extend. IMPORTANT: It does not make any sound on its own and\n\t\t * shouldn't be directly instantiated.\n\t\t *\n\t\t * @constructor\n\t\t * @abstract\n\t\t * @extends {Tone.Instrument}\n\t\t */\n\t Tone.Monophonic = function (options) {\n\t //get the defaults\n\t options = Tone.defaultArg(options, Tone.Monophonic.defaults);\n\t Tone.Instrument.call(this, options);\n\t /**\n\t\t\t * The glide time between notes. \n\t\t\t * @type {Time}\n\t\t\t */\n\t this.portamento = options.portamento;\n\t };\n\t Tone.extend(Tone.Monophonic, Tone.Instrument);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Monophonic.defaults = { 'portamento': 0 };\n\t /**\n\t\t * Trigger the attack of the note optionally with a given velocity. \n\t\t * \n\t\t * \n\t\t * @param {Frequency} note The note to trigger.\n\t\t * @param {Time} [time=now] When the note should start.\n\t\t * @param {number} [velocity=1] velocity The velocity scaler \n\t\t * determines how \"loud\" the note \n\t\t * will be triggered.\n\t\t * @returns {Tone.Monophonic} this\n\t\t * @example\n\t\t * synth.triggerAttack(\"C4\");\n\t\t * @example\n\t\t * //trigger the note a half second from now at half velocity\n\t\t * synth.triggerAttack(\"C4\", \"+0.5\", 0.5);\n\t\t */\n\t Tone.Monophonic.prototype.triggerAttack = function (note, time, velocity) {\n\t time = this.toSeconds(time);\n\t this._triggerEnvelopeAttack(time, velocity);\n\t this.setNote(note, time);\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the release portion of the envelope\n\t\t * @param {Time} [time=now] If no time is given, the release happens immediatly\n\t\t * @returns {Tone.Monophonic} this\n\t\t * @example\n\t\t * synth.triggerRelease();\n\t\t */\n\t Tone.Monophonic.prototype.triggerRelease = function (time) {\n\t time = this.toSeconds(time);\n\t this._triggerEnvelopeRelease(time);\n\t return this;\n\t };\n\t /**\n\t\t * override this method with the actual method\n\t\t * @abstract\n\t\t * @private\n\t\t */\n\t Tone.Monophonic.prototype._triggerEnvelopeAttack = function () {\n\t };\n\t /**\n\t\t * override this method with the actual method\n\t\t * @abstract\n\t\t * @private\n\t\t */\n\t Tone.Monophonic.prototype._triggerEnvelopeRelease = function () {\n\t };\n\t /**\n\t\t * Set the note at the given time. If no time is given, the note\n\t\t * will set immediately. \n\t\t * @param {Frequency} note The note to change to.\n\t\t * @param {Time} [time=now] The time when the note should be set. \n\t\t * @returns {Tone.Monophonic} this\n\t\t * @example\n\t\t * //change to F#6 in one quarter note from now.\n\t\t * synth.setNote(\"F#6\", \"+4n\");\n\t\t * @example\n\t\t * //change to Bb4 right now\n\t\t * synth.setNote(\"Bb4\");\n\t\t */\n\t Tone.Monophonic.prototype.setNote = function (note, time) {\n\t time = this.toSeconds(time);\n\t if (this.portamento > 0) {\n\t var currentNote = this.frequency.value;\n\t this.frequency.setValueAtTime(currentNote, time);\n\t var portTime = this.toSeconds(this.portamento);\n\t this.frequency.exponentialRampToValueAtTime(note, time + portTime);\n\t } else {\n\t this.frequency.setValueAtTime(note, time);\n\t }\n\t return this;\n\t };\n\t return Tone.Monophonic;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Synth is composed simply of a Tone.OmniOscillator\n\t\t * routed through a Tone.AmplitudeEnvelope.\n\t\t * <img src=\"https://docs.google.com/drawings/d/1-1_0YW2Z1J2EPI36P8fNCMcZG7N1w1GZluPs4og4evo/pub?w=1163&h=231\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Monophonic}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var synth = new Tone.Synth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t Tone.Synth = function (options) {\n\t //get the defaults\n\t options = Tone.defaultArg(options, Tone.Synth.defaults);\n\t Tone.Monophonic.call(this, options);\n\t /**\n\t\t\t * The oscillator.\n\t\t\t * @type {Tone.OmniOscillator}\n\t\t\t */\n\t this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this.oscillator.frequency;\n\t /**\n\t\t\t * The detune control.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this.oscillator.detune;\n\t /**\n\t\t\t * The amplitude envelope.\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t //connect the oscillators to the output\n\t this.oscillator.chain(this.envelope, this.output);\n\t this._readOnly([\n\t 'oscillator',\n\t 'frequency',\n\t 'detune',\n\t 'envelope'\n\t ]);\n\t };\n\t Tone.extend(Tone.Synth, Tone.Monophonic);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Synth.defaults = {\n\t 'oscillator': { 'type': 'triangle' },\n\t 'envelope': {\n\t 'attack': 0.005,\n\t 'decay': 0.1,\n\t 'sustain': 0.3,\n\t 'release': 1\n\t }\n\t };\n\t /**\n\t\t * start the attack portion of the envelope\n\t\t * @param {Time} [time=now] the time the attack should start\n\t\t * @param {number} [velocity=1] the velocity of the note (0-1)\n\t\t * @returns {Tone.Synth} this\n\t\t * @private\n\t\t */\n\t Tone.Synth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t //the envelopes\n\t this.envelope.triggerAttack(time, velocity);\n\t this.oscillator.start(time);\n\t //if there is no release portion, stop the oscillator\n\t if (this.envelope.sustain === 0) {\n\t this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * start the release portion of the envelope\n\t\t * @param {Time} [time=now] the time the release should start\n\t\t * @returns {Tone.Synth} this\n\t\t * @private\n\t\t */\n\t Tone.Synth.prototype._triggerEnvelopeRelease = function (time) {\n\t time = this.toSeconds(time);\n\t this.envelope.triggerRelease(time);\n\t this.oscillator.stop(time + this.envelope.release);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Synth} this\n\t\t */\n\t Tone.Synth.prototype.dispose = function () {\n\t Tone.Monophonic.prototype.dispose.call(this);\n\t this._writable([\n\t 'oscillator',\n\t 'frequency',\n\t 'detune',\n\t 'envelope'\n\t ]);\n\t this.oscillator.dispose();\n\t this.oscillator = null;\n\t this.envelope.dispose();\n\t this.envelope = null;\n\t this.frequency = null;\n\t this.detune = null;\n\t return this;\n\t };\n\t return Tone.Synth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class AMSynth uses the output of one Tone.Synth to modulate the\n\t\t * amplitude of another Tone.Synth. The harmonicity (the ratio between\n\t\t * the two signals) affects the timbre of the output signal greatly.\n\t\t * Read more about Amplitude Modulation Synthesis on\n\t\t * [SoundOnSound](https://web.archive.org/web/20160404103653/http://www.soundonsound.com:80/sos/mar00/articles/synthsecrets.htm).\n\t\t * <img src=\"https://docs.google.com/drawings/d/1TQu8Ed4iFr1YTLKpB3U1_hur-UwBrh5gdBXc8BxfGKw/pub?w=1009&h=457\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Monophonic}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var synth = new Tone.AMSynth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"4n\");\n\t\t */\n\t Tone.AMSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.AMSynth.defaults);\n\t Tone.Monophonic.call(this, options);\n\t /**\n\t\t\t * The carrier voice.\n\t\t\t * @type {Tone.Synth}\n\t\t\t * @private\n\t\t\t */\n\t this._carrier = new Tone.Synth();\n\t this._carrier.volume.value = -10;\n\t /**\n\t\t\t * The carrier's oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.oscillator = this._carrier.oscillator;\n\t /**\n\t\t\t * The carrier's envelope\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.envelope = this._carrier.envelope.set(options.envelope);\n\t /**\n\t\t\t * The modulator voice.\n\t\t\t * @type {Tone.Synth}\n\t\t\t * @private\n\t\t\t */\n\t this._modulator = new Tone.Synth();\n\t this._modulator.volume.value = -10;\n\t /**\n\t\t\t * The modulator's oscillator which is applied\n\t\t\t * to the amplitude of the oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.modulation = this._modulator.oscillator.set(options.modulation);\n\t /**\n\t\t\t * The modulator's envelope\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\t /**\n\t\t\t * The frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune in cents\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t /**\n\t\t\t * Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t * 1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t this.harmonicity.units = Tone.Type.Positive;\n\t /**\n\t\t\t * convert the -1,1 output to 0,1\n\t\t\t * @type {Tone.AudioToGain}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationScale = new Tone.AudioToGain();\n\t /**\n\t\t\t * the node where the modulation happens\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationNode = new Tone.Gain();\n\t //control the two voices frequency\n\t this.frequency.connect(this._carrier.frequency);\n\t this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t this.detune.fan(this._carrier.detune, this._modulator.detune);\n\t this._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\t this._carrier.chain(this._modulationNode, this.output);\n\t this._readOnly([\n\t 'frequency',\n\t 'harmonicity',\n\t 'oscillator',\n\t 'envelope',\n\t 'modulation',\n\t 'modulationEnvelope',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.AMSynth, Tone.Monophonic);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.AMSynth.defaults = {\n\t 'harmonicity': 3,\n\t 'detune': 0,\n\t 'oscillator': { 'type': 'sine' },\n\t 'envelope': {\n\t 'attack': 0.01,\n\t 'decay': 0.01,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t },\n\t 'modulation': { 'type': 'square' },\n\t 'modulationEnvelope': {\n\t 'attack': 0.5,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t }\n\t };\n\t /**\n\t\t * trigger the attack portion of the note\n\t\t *\n\t\t * @param {Time} [time=now] the time the note will occur\n\t\t * @param {NormalRange} [velocity=1] the velocity of the note\n\t\t * @private\n\t\t * @returns {Tone.AMSynth} this\n\t\t */\n\t Tone.AMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t //the port glide\n\t time = this.toSeconds(time);\n\t //the envelopes\n\t this._carrier._triggerEnvelopeAttack(time, velocity);\n\t this._modulator._triggerEnvelopeAttack(time);\n\t return this;\n\t };\n\t /**\n\t\t * trigger the release portion of the note\n\t\t *\n\t\t * @param {Time} [time=now] the time the note will release\n\t\t * @private\n\t\t * @returns {Tone.AMSynth} this\n\t\t */\n\t Tone.AMSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t this._carrier._triggerEnvelopeRelease(time);\n\t this._modulator._triggerEnvelopeRelease(time);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.AMSynth} this\n\t\t */\n\t Tone.AMSynth.prototype.dispose = function () {\n\t Tone.Monophonic.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'harmonicity',\n\t 'oscillator',\n\t 'envelope',\n\t 'modulation',\n\t 'modulationEnvelope',\n\t 'detune'\n\t ]);\n\t this._carrier.dispose();\n\t this._carrier = null;\n\t this._modulator.dispose();\n\t this._modulator = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t this.harmonicity.dispose();\n\t this.harmonicity = null;\n\t this._modulationScale.dispose();\n\t this._modulationScale = null;\n\t this._modulationNode.dispose();\n\t this._modulationNode = null;\n\t this.oscillator = null;\n\t this.envelope = null;\n\t this.modulationEnvelope = null;\n\t this.modulation = null;\n\t return this;\n\t };\n\t return Tone.AMSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.MonoSynth is composed of one oscillator, one filter, and two envelopes.\n\t\t * The amplitude of the Tone.Oscillator and the cutoff frequency of the\n\t\t * Tone.Filter are controlled by Tone.Envelopes.\n\t\t * <img src=\"https://docs.google.com/drawings/d/1gaY1DF9_Hzkodqf8JI1Cg2VZfwSElpFQfI94IQwad38/pub?w=924&h=240\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Monophonic}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var synth = new Tone.MonoSynth({\n\t\t * \t\"oscillator\" : {\n\t\t * \t\t\"type\" : \"square\"\n\t\t * },\n\t\t * \"envelope\" : {\n\t\t * \t\"attack\" : 0.1\n\t\t * }\n\t\t * }).toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t Tone.MonoSynth = function (options) {\n\t //get the defaults\n\t options = Tone.defaultArg(options, Tone.MonoSynth.defaults);\n\t Tone.Monophonic.call(this, options);\n\t /**\n\t\t\t * The oscillator.\n\t\t\t * @type {Tone.OmniOscillator}\n\t\t\t */\n\t this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this.oscillator.frequency;\n\t /**\n\t\t\t * The detune control.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this.oscillator.detune;\n\t /**\n\t\t\t * The filter.\n\t\t\t * @type {Tone.Filter}\n\t\t\t */\n\t this.filter = new Tone.Filter(options.filter);\n\t /**\n\t\t\t * The filter envelope.\n\t\t\t * @type {Tone.FrequencyEnvelope}\n\t\t\t */\n\t this.filterEnvelope = new Tone.FrequencyEnvelope(options.filterEnvelope);\n\t /**\n\t\t\t * The amplitude envelope.\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t //connect the oscillators to the output\n\t this.oscillator.chain(this.filter, this.envelope, this.output);\n\t //connect the filter envelope\n\t this.filterEnvelope.connect(this.filter.frequency);\n\t this._readOnly([\n\t 'oscillator',\n\t 'frequency',\n\t 'detune',\n\t 'filter',\n\t 'filterEnvelope',\n\t 'envelope'\n\t ]);\n\t };\n\t Tone.extend(Tone.MonoSynth, Tone.Monophonic);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.MonoSynth.defaults = {\n\t 'frequency': 'C4',\n\t 'detune': 0,\n\t 'oscillator': { 'type': 'square' },\n\t 'filter': {\n\t 'Q': 6,\n\t 'type': 'lowpass',\n\t 'rolloff': -24\n\t },\n\t 'envelope': {\n\t 'attack': 0.005,\n\t 'decay': 0.1,\n\t 'sustain': 0.9,\n\t 'release': 1\n\t },\n\t 'filterEnvelope': {\n\t 'attack': 0.06,\n\t 'decay': 0.2,\n\t 'sustain': 0.5,\n\t 'release': 2,\n\t 'baseFrequency': 200,\n\t 'octaves': 7,\n\t 'exponent': 2\n\t }\n\t };\n\t /**\n\t\t * start the attack portion of the envelope\n\t\t * @param {Time} [time=now] the time the attack should start\n\t\t * @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n\t\t * @returns {Tone.MonoSynth} this\n\t\t * @private\n\t\t */\n\t Tone.MonoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t time = this.toSeconds(time);\n\t //the envelopes\n\t this.envelope.triggerAttack(time, velocity);\n\t this.filterEnvelope.triggerAttack(time);\n\t this.oscillator.start(time);\n\t if (this.envelope.sustain === 0) {\n\t this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * start the release portion of the envelope\n\t\t * @param {Time} [time=now] the time the release should start\n\t\t * @returns {Tone.MonoSynth} this\n\t\t * @private\n\t\t */\n\t Tone.MonoSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t this.envelope.triggerRelease(time);\n\t this.filterEnvelope.triggerRelease(time);\n\t this.oscillator.stop(time + this.envelope.release);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.MonoSynth} this\n\t\t */\n\t Tone.MonoSynth.prototype.dispose = function () {\n\t Tone.Monophonic.prototype.dispose.call(this);\n\t this._writable([\n\t 'oscillator',\n\t 'frequency',\n\t 'detune',\n\t 'filter',\n\t 'filterEnvelope',\n\t 'envelope'\n\t ]);\n\t this.oscillator.dispose();\n\t this.oscillator = null;\n\t this.envelope.dispose();\n\t this.envelope = null;\n\t this.filterEnvelope.dispose();\n\t this.filterEnvelope = null;\n\t this.filter.dispose();\n\t this.filter = null;\n\t this.frequency = null;\n\t this.detune = null;\n\t return this;\n\t };\n\t return Tone.MonoSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.DuoSynth is a monophonic synth composed of two\n\t\t * MonoSynths run in parallel with control over the\n\t\t * frequency ratio between the two voices and vibrato effect.\n\t\t * <img src=\"https://docs.google.com/drawings/d/1bL4GXvfRMMlqS7XyBm9CjL9KJPSUKbcdBNpqOlkFLxk/pub?w=1012&h=448\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Monophonic}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var duoSynth = new Tone.DuoSynth().toMaster();\n\t\t * duoSynth.triggerAttackRelease(\"C4\", \"2n\");\n\t\t */\n\t Tone.DuoSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.DuoSynth.defaults);\n\t Tone.Monophonic.call(this, options);\n\t /**\n\t\t\t * the first voice\n\t\t\t * @type {Tone.MonoSynth}\n\t\t\t */\n\t this.voice0 = new Tone.MonoSynth(options.voice0);\n\t this.voice0.volume.value = -10;\n\t /**\n\t\t\t * the second voice\n\t\t\t * @type {Tone.MonoSynth}\n\t\t\t */\n\t this.voice1 = new Tone.MonoSynth(options.voice1);\n\t this.voice1.volume.value = -10;\n\t /**\n\t\t\t * The vibrato LFO.\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._vibrato = new Tone.LFO(options.vibratoRate, -50, 50);\n\t this._vibrato.start();\n\t /**\n\t\t\t * the vibrato frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.vibratoRate = this._vibrato.frequency;\n\t /**\n\t\t\t * the vibrato gain\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._vibratoGain = new Tone.Gain(options.vibratoAmount, Tone.Type.Positive);\n\t /**\n\t\t\t * The amount of vibrato\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.vibratoAmount = this._vibratoGain.gain;\n\t /**\n\t\t\t * the frequency control\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t /**\n\t\t\t * Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t * 1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * duoSynth.harmonicity.value = 0.5;\n\t\t\t */\n\t this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t this.harmonicity.units = Tone.Type.Positive;\n\t //control the two voices frequency\n\t this.frequency.connect(this.voice0.frequency);\n\t this.frequency.chain(this.harmonicity, this.voice1.frequency);\n\t this._vibrato.connect(this._vibratoGain);\n\t this._vibratoGain.fan(this.voice0.detune, this.voice1.detune);\n\t this.voice0.connect(this.output);\n\t this.voice1.connect(this.output);\n\t this._readOnly([\n\t 'voice0',\n\t 'voice1',\n\t 'frequency',\n\t 'vibratoAmount',\n\t 'vibratoRate'\n\t ]);\n\t };\n\t Tone.extend(Tone.DuoSynth, Tone.Monophonic);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.DuoSynth.defaults = {\n\t 'vibratoAmount': 0.5,\n\t 'vibratoRate': 5,\n\t 'harmonicity': 1.5,\n\t 'voice0': {\n\t 'volume': -10,\n\t 'portamento': 0,\n\t 'oscillator': { 'type': 'sine' },\n\t 'filterEnvelope': {\n\t 'attack': 0.01,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t },\n\t 'envelope': {\n\t 'attack': 0.01,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t }\n\t },\n\t 'voice1': {\n\t 'volume': -10,\n\t 'portamento': 0,\n\t 'oscillator': { 'type': 'sine' },\n\t 'filterEnvelope': {\n\t 'attack': 0.01,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t },\n\t 'envelope': {\n\t 'attack': 0.01,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t }\n\t }\n\t };\n\t /**\n\t\t * start the attack portion of the envelopes\n\t\t *\n\t\t * @param {Time} [time=now] the time the attack should start\n\t\t * @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n\t\t * @returns {Tone.DuoSynth} this\n\t\t * @private\n\t\t */\n\t Tone.DuoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t time = this.toSeconds(time);\n\t this.voice0._triggerEnvelopeAttack(time, velocity);\n\t this.voice1._triggerEnvelopeAttack(time, velocity);\n\t return this;\n\t };\n\t /**\n\t\t * start the release portion of the envelopes\n\t\t *\n\t\t * @param {Time} [time=now] the time the release should start\n\t\t * @returns {Tone.DuoSynth} this\n\t\t * @private\n\t\t */\n\t Tone.DuoSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t this.voice0._triggerEnvelopeRelease(time);\n\t this.voice1._triggerEnvelopeRelease(time);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.DuoSynth} this\n\t\t */\n\t Tone.DuoSynth.prototype.dispose = function () {\n\t Tone.Monophonic.prototype.dispose.call(this);\n\t this._writable([\n\t 'voice0',\n\t 'voice1',\n\t 'frequency',\n\t 'vibratoAmount',\n\t 'vibratoRate'\n\t ]);\n\t this.voice0.dispose();\n\t this.voice0 = null;\n\t this.voice1.dispose();\n\t this.voice1 = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this._vibratoGain.dispose();\n\t this._vibratoGain = null;\n\t this._vibrato = null;\n\t this.harmonicity.dispose();\n\t this.harmonicity = null;\n\t this.vibratoAmount.dispose();\n\t this.vibratoAmount = null;\n\t this.vibratoRate = null;\n\t return this;\n\t };\n\t return Tone.DuoSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class FMSynth is composed of two Tone.Synths where one Tone.Synth modulates\n\t\t * the frequency of a second Tone.Synth. A lot of spectral content\n\t\t * can be explored using the modulationIndex parameter. Read more about\n\t\t * frequency modulation synthesis on Sound On Sound: [Part 1](https://web.archive.org/web/20160403123704/http://www.soundonsound.com/sos/apr00/articles/synthsecrets.htm), [Part 2](https://web.archive.org/web/20160403115835/http://www.soundonsound.com/sos/may00/articles/synth.htm).\n\t\t * <img src=\"https://docs.google.com/drawings/d/1h0PUDZXPgi4Ikx6bVT6oncrYPLluFKy7lj53puxj-DM/pub?w=902&h=462\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Monophonic}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var fmSynth = new Tone.FMSynth().toMaster();\n\t\t * fmSynth.triggerAttackRelease(\"C5\", \"4n\");\n\t\t */\n\t Tone.FMSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.FMSynth.defaults);\n\t Tone.Monophonic.call(this, options);\n\t /**\n\t\t\t * The carrier voice.\n\t\t\t * @type {Tone.Synth}\n\t\t\t * @private\n\t\t\t */\n\t this._carrier = new Tone.Synth(options.carrier);\n\t this._carrier.volume.value = -10;\n\t /**\n\t\t\t * The carrier's oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.oscillator = this._carrier.oscillator;\n\t /**\n\t\t\t * The carrier's envelope\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.envelope = this._carrier.envelope.set(options.envelope);\n\t /**\n\t\t\t * The modulator voice.\n\t\t\t * @type {Tone.Synth}\n\t\t\t * @private\n\t\t\t */\n\t this._modulator = new Tone.Synth(options.modulator);\n\t this._modulator.volume.value = -10;\n\t /**\n\t\t\t * The modulator's oscillator which is applied\n\t\t\t * to the amplitude of the oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.modulation = this._modulator.oscillator.set(options.modulation);\n\t /**\n\t\t\t * The modulator's envelope\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune in cents\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t /**\n\t\t\t * Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t * 1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t this.harmonicity.units = Tone.Type.Positive;\n\t /**\n\t\t\t * The modulation index which essentially the depth or amount of the modulation. It is the\n\t\t\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t\t * modulating signal (ma) -- as in ma/mf.\n\t\t\t *\t@type {Positive}\n\t\t\t *\t@signal\n\t\t\t */\n\t this.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\t this.modulationIndex.units = Tone.Type.Positive;\n\t /**\n\t\t\t * the node where the modulation happens\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationNode = new Tone.Gain(0);\n\t //control the two voices frequency\n\t this.frequency.connect(this._carrier.frequency);\n\t this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t this.frequency.chain(this.modulationIndex, this._modulationNode);\n\t this.detune.fan(this._carrier.detune, this._modulator.detune);\n\t this._modulator.connect(this._modulationNode.gain);\n\t this._modulationNode.connect(this._carrier.frequency);\n\t this._carrier.connect(this.output);\n\t this._readOnly([\n\t 'frequency',\n\t 'harmonicity',\n\t 'modulationIndex',\n\t 'oscillator',\n\t 'envelope',\n\t 'modulation',\n\t 'modulationEnvelope',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.FMSynth, Tone.Monophonic);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.FMSynth.defaults = {\n\t 'harmonicity': 3,\n\t 'modulationIndex': 10,\n\t 'detune': 0,\n\t 'oscillator': { 'type': 'sine' },\n\t 'envelope': {\n\t 'attack': 0.01,\n\t 'decay': 0.01,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t },\n\t 'modulation': { 'type': 'square' },\n\t 'modulationEnvelope': {\n\t 'attack': 0.5,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t }\n\t };\n\t /**\n\t\t * \ttrigger the attack portion of the note\n\t\t *\n\t\t * @param {Time} [time=now] the time the note will occur\n\t\t * @param {number} [velocity=1] the velocity of the note\n\t\t * @returns {Tone.FMSynth} this\n\t\t * @private\n\t\t */\n\t Tone.FMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t time = this.toSeconds(time);\n\t //the envelopes\n\t this._carrier._triggerEnvelopeAttack(time, velocity);\n\t this._modulator._triggerEnvelopeAttack(time);\n\t return this;\n\t };\n\t /**\n\t\t * trigger the release portion of the note\n\t\t *\n\t\t * @param {Time} [time=now] the time the note will release\n\t\t * @returns {Tone.FMSynth} this\n\t\t * @private\n\t\t */\n\t Tone.FMSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t time = this.toSeconds(time);\n\t this._carrier._triggerEnvelopeRelease(time);\n\t this._modulator._triggerEnvelopeRelease(time);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.FMSynth} this\n\t\t */\n\t Tone.FMSynth.prototype.dispose = function () {\n\t Tone.Monophonic.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'harmonicity',\n\t 'modulationIndex',\n\t 'oscillator',\n\t 'envelope',\n\t 'modulation',\n\t 'modulationEnvelope',\n\t 'detune'\n\t ]);\n\t this._carrier.dispose();\n\t this._carrier = null;\n\t this._modulator.dispose();\n\t this._modulator = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t this.modulationIndex.dispose();\n\t this.modulationIndex = null;\n\t this.harmonicity.dispose();\n\t this.harmonicity = null;\n\t this._modulationNode.dispose();\n\t this._modulationNode = null;\n\t this.oscillator = null;\n\t this.envelope = null;\n\t this.modulationEnvelope = null;\n\t this.modulation = null;\n\t return this;\n\t };\n\t return Tone.FMSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.MembraneSynth makes kick and tom sounds using a single oscillator\n\t\t * with an amplitude envelope and frequency ramp. A Tone.OmniOscillator\n\t\t * is routed through a Tone.AmplitudeEnvelope to the output. The drum\n\t\t * quality of the sound comes from the frequency envelope applied\n\t\t * during Tone.MembraneSynth.triggerAttack(note). The frequency envelope\n\t\t * starts at <code>note * .octaves</code> and ramps to <code>note</code>\n\t\t * over the duration of <code>.pitchDecay</code>.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Instrument}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var synth = new Tone.MembraneSynth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C2\", \"8n\");\n\t\t */\n\t Tone.MembraneSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.MembraneSynth.defaults);\n\t Tone.Instrument.call(this, options);\n\t /**\n\t\t\t * The oscillator.\n\t\t\t * @type {Tone.OmniOscillator}\n\t\t\t */\n\t this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t /**\n\t\t\t * The amplitude envelope.\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t /**\n\t\t\t * The number of octaves the pitch envelope ramps.\n\t\t\t * @type {Positive}\n\t\t\t */\n\t this.octaves = options.octaves;\n\t /**\n\t\t\t * The amount of time the frequency envelope takes.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.pitchDecay = options.pitchDecay;\n\t this.oscillator.chain(this.envelope, this.output);\n\t this._readOnly([\n\t 'oscillator',\n\t 'envelope'\n\t ]);\n\t };\n\t Tone.extend(Tone.MembraneSynth, Tone.Instrument);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.MembraneSynth.defaults = {\n\t 'pitchDecay': 0.05,\n\t 'octaves': 10,\n\t 'oscillator': { 'type': 'sine' },\n\t 'envelope': {\n\t 'attack': 0.001,\n\t 'decay': 0.4,\n\t 'sustain': 0.01,\n\t 'release': 1.4,\n\t 'attackCurve': 'exponential'\n\t }\n\t };\n\t /**\n\t\t * Trigger the note at the given time with the given velocity.\n\t\t *\n\t\t * @param {Frequency} note the note\n\t\t * @param {Time} [time=now] the time, if not given is now\n\t\t * @param {number} [velocity=1] velocity defaults to 1\n\t\t * @returns {Tone.MembraneSynth} this\n\t\t * @example\n\t\t * kick.triggerAttack(60);\n\t\t */\n\t Tone.MembraneSynth.prototype.triggerAttack = function (note, time, velocity) {\n\t time = this.toSeconds(time);\n\t note = this.toFrequency(note);\n\t var maxNote = note * this.octaves;\n\t this.oscillator.frequency.setValueAtTime(maxNote, time);\n\t this.oscillator.frequency.exponentialRampToValueAtTime(note, time + this.toSeconds(this.pitchDecay));\n\t this.envelope.triggerAttack(time, velocity);\n\t this.oscillator.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the release portion of the note.\n\t\t *\n\t\t * @param {Time} [time=now] the time the note will release\n\t\t * @returns {Tone.MembraneSynth} this\n\t\t */\n\t Tone.MembraneSynth.prototype.triggerRelease = function (time) {\n\t time = this.toSeconds(time);\n\t this.envelope.triggerRelease(time);\n\t this.oscillator.stop(time + this.envelope.release);\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.MembraneSynth} this\n\t\t */\n\t Tone.MembraneSynth.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t this._writable([\n\t 'oscillator',\n\t 'envelope'\n\t ]);\n\t this.oscillator.dispose();\n\t this.oscillator = null;\n\t this.envelope.dispose();\n\t this.envelope = null;\n\t return this;\n\t };\n\t return Tone.MembraneSynth;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * Inharmonic ratio of frequencies based on the Roland TR-808\n\t\t * Taken from https://ccrma.stanford.edu/papers/tr-808-cymbal-physically-informed-circuit-bendable-digital-model\n\t\t * @private\n\t\t * @static\n\t\t * @type {Array}\n\t\t */\n\t var inharmRatios = [\n\t 1,\n\t 1.483,\n\t 1.932,\n\t 2.546,\n\t 2.63,\n\t 3.897\n\t ];\n\t /**\n\t\t * @class A highly inharmonic and spectrally complex source with a highpass filter\n\t\t * and amplitude envelope which is good for making metalophone sounds. Based\n\t\t * on CymbalSynth by [@polyrhythmatic](https://github.com/polyrhythmatic).\n\t\t * Inspiration from [Sound on Sound](https://web.archive.org/web/20160610143924/https://www.soundonsound.com/sos/jul02/articles/synthsecrets0702.asp).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Instrument}\n\t\t * @param {Object} [options] The options availble for the synth\n\t\t * see defaults below\n\t\t */\n\t Tone.MetalSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.MetalSynth.defaults);\n\t Tone.Instrument.call(this, options);\n\t /**\n\t\t\t * The frequency of the cymbal\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The array of FMOscillators\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillators = [];\n\t /**\n\t\t\t * The frequency multipliers\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._freqMultipliers = [];\n\t /**\n\t\t\t * The amplitude for the body\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._amplitue = new Tone.Gain(0).connect(this.output);\n\t /**\n\t\t\t * highpass the output\n\t\t\t * @type {Tone.Filter}\n\t\t\t * @private\n\t\t\t */\n\t this._highpass = new Tone.Filter({\n\t 'type': 'highpass',\n\t 'Q': -3.0102999566398125\n\t }).connect(this._amplitue);\n\t /**\n\t\t\t * The number of octaves the highpass\n\t\t\t * filter frequency ramps\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._octaves = options.octaves;\n\t /**\n\t\t\t * Scale the body envelope\n\t\t\t * for the bandpass\n\t\t\t * @type {Tone.Scale}\n\t\t\t * @private\n\t\t\t */\n\t this._filterFreqScaler = new Tone.Scale(options.resonance, 7000);\n\t /**\n\t\t\t * The envelope which is connected both to the\n\t\t\t * amplitude and highpass filter's cutoff frequency\n\t\t\t * @type {Tone.Envelope}\n\t\t\t */\n\t this.envelope = new Tone.Envelope({\n\t 'attack': options.envelope.attack,\n\t 'attackCurve': 'linear',\n\t 'decay': options.envelope.decay,\n\t 'sustain': 0,\n\t 'release': options.envelope.release\n\t }).chain(this._filterFreqScaler, this._highpass.frequency);\n\t this.envelope.connect(this._amplitue.gain);\n\t for (var i = 0; i < inharmRatios.length; i++) {\n\t var osc = new Tone.FMOscillator({\n\t 'type': 'square',\n\t 'modulationType': 'square',\n\t 'harmonicity': options.harmonicity,\n\t 'modulationIndex': options.modulationIndex\n\t });\n\t osc.connect(this._highpass);\n\t this._oscillators[i] = osc;\n\t var mult = new Tone.Multiply(inharmRatios[i]);\n\t this._freqMultipliers[i] = mult;\n\t this.frequency.chain(mult, osc.frequency);\n\t }\n\t //set the octaves\n\t this.octaves = options.octaves;\n\t };\n\t Tone.extend(Tone.MetalSynth, Tone.Instrument);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.MetalSynth.defaults = {\n\t 'frequency': 200,\n\t 'envelope': {\n\t 'attack': 0.001,\n\t 'decay': 1.4,\n\t 'release': 0.2\n\t },\n\t 'harmonicity': 5.1,\n\t 'modulationIndex': 32,\n\t 'resonance': 4000,\n\t 'octaves': 1.5\n\t };\n\t /**\n\t\t * Trigger the attack.\n\t\t * @param {Time} time When the attack should be triggered.\n\t\t * @param {NormalRange} [velocity=1] The velocity that the envelope should be triggered at.\n\t\t * @return {Tone.MetalSynth} this\n\t\t */\n\t Tone.MetalSynth.prototype.triggerAttack = function (time, vel) {\n\t time = this.toSeconds(time);\n\t vel = Tone.defaultArg(vel, 1);\n\t this.envelope.triggerAttack(time, vel);\n\t this._oscillators.forEach(function (osc) {\n\t osc.start(time);\n\t });\n\t //if the sustain is 0, stop the oscillator as well\n\t if (this.envelope.sustain === 0) {\n\t this._oscillators.forEach(function (osc) {\n\t osc.stop(time + this.envelope.attack + this.envelope.decay);\n\t }.bind(this));\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the release of the envelope.\n\t\t * @param {Time} time When the release should be triggered.\n\t\t * @return {Tone.MetalSynth} this\n\t\t */\n\t Tone.MetalSynth.prototype.triggerRelease = function (time) {\n\t time = this.toSeconds(time);\n\t this.envelope.triggerRelease(time);\n\t this._oscillators.forEach(function (osc) {\n\t osc.stop(time + this.envelope.release);\n\t }.bind(this));\n\t return this;\n\t };\n\t /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.MetalSynth.prototype.sync = function () {\n\t this._syncMethod('triggerAttack', 0);\n\t this._syncMethod('triggerRelease', 0);\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the attack and release of the envelope after the given\n\t\t * duration.\n\t\t * @param {Time} duration The duration before triggering the release\n\t\t * @param {Time} time When the attack should be triggered.\n\t\t * @param {NormalRange} [velocity=1] The velocity that the envelope should be triggered at.\n\t\t * @return {Tone.MetalSynth} this\n\t\t */\n\t Tone.MetalSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t duration = this.toSeconds(duration);\n\t this.triggerAttack(time, velocity);\n\t this.triggerRelease(time + duration);\n\t return this;\n\t };\n\t /**\n\t\t * The modulationIndex of the oscillators which make up the source.\n\t\t * see Tone.FMOscillator.modulationIndex\n\t\t * @memberOf Tone.MetalSynth#\n\t\t * @type {Positive}\n\t\t * @name modulationIndex\n\t\t */\n\t Object.defineProperty(Tone.MetalSynth.prototype, 'modulationIndex', {\n\t get: function () {\n\t return this._oscillators[0].modulationIndex.value;\n\t },\n\t set: function (val) {\n\t for (var i = 0; i < this._oscillators.length; i++) {\n\t this._oscillators[i].modulationIndex.value = val;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The harmonicity of the oscillators which make up the source.\n\t\t * see Tone.FMOscillator.harmonicity\n\t\t * @memberOf Tone.MetalSynth#\n\t\t * @type {Positive}\n\t\t * @name harmonicity\n\t\t */\n\t Object.defineProperty(Tone.MetalSynth.prototype, 'harmonicity', {\n\t get: function () {\n\t return this._oscillators[0].harmonicity.value;\n\t },\n\t set: function (val) {\n\t for (var i = 0; i < this._oscillators.length; i++) {\n\t this._oscillators[i].harmonicity.value = val;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The frequency of the highpass filter attached to the envelope\n\t\t * @memberOf Tone.MetalSynth#\n\t\t * @type {Frequency}\n\t\t * @name resonance\n\t\t */\n\t Object.defineProperty(Tone.MetalSynth.prototype, 'resonance', {\n\t get: function () {\n\t return this._filterFreqScaler.min;\n\t },\n\t set: function (val) {\n\t this._filterFreqScaler.min = val;\n\t this.octaves = this._octaves;\n\t }\n\t });\n\t /**\n\t\t * The number of octaves above the \"resonance\" frequency\n\t\t * that the filter ramps during the attack/decay envelope\n\t\t * @memberOf Tone.MetalSynth#\n\t\t * @type {Number}\n\t\t * @name octaves\n\t\t */\n\t Object.defineProperty(Tone.MetalSynth.prototype, 'octaves', {\n\t get: function () {\n\t return this._octaves;\n\t },\n\t set: function (octs) {\n\t this._octaves = octs;\n\t this._filterFreqScaler.max = this._filterFreqScaler.min * Math.pow(2, octs);\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @returns {Tone.MetalSynth} this\n\t\t */\n\t Tone.MetalSynth.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t for (var i = 0; i < this._oscillators.length; i++) {\n\t this._oscillators[i].dispose();\n\t this._freqMultipliers[i].dispose();\n\t }\n\t this._oscillators = null;\n\t this._freqMultipliers = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this._filterFreqScaler.dispose();\n\t this._filterFreqScaler = null;\n\t this._amplitue.dispose();\n\t this._amplitue = null;\n\t this.envelope.dispose();\n\t this.envelope = null;\n\t this._highpass.dispose();\n\t this._highpass = null;\n\t };\n\t return Tone.MetalSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.NoiseSynth is composed of a noise generator (Tone.Noise), one filter (Tone.Filter),\n\t\t * and two envelopes (Tone.Envelop). One envelope controls the amplitude\n\t\t * of the noise and the other is controls the cutoff frequency of the filter.\n\t\t * <img src=\"https://docs.google.com/drawings/d/1rqzuX9rBlhT50MRvD2TKml9bnZhcZmzXF1rf_o7vdnE/pub?w=918&h=242\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Instrument}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var noiseSynth = new Tone.NoiseSynth().toMaster();\n\t\t * noiseSynth.triggerAttackRelease(\"8n\");\n\t\t */\n\t Tone.NoiseSynth = function (options) {\n\t //get the defaults\n\t options = Tone.defaultArg(options, Tone.NoiseSynth.defaults);\n\t Tone.Instrument.call(this, options);\n\t /**\n\t\t\t * The noise source.\n\t\t\t * @type {Tone.Noise}\n\t\t\t * @example\n\t\t\t * noiseSynth.set(\"noise.type\", \"brown\");\n\t\t\t */\n\t this.noise = new Tone.Noise();\n\t /**\n\t\t\t * The amplitude envelope.\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t //connect the noise to the output\n\t this.noise.chain(this.envelope, this.output);\n\t this._readOnly([\n\t 'noise',\n\t 'envelope'\n\t ]);\n\t };\n\t Tone.extend(Tone.NoiseSynth, Tone.Instrument);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.NoiseSynth.defaults = {\n\t 'noise': { 'type': 'white' },\n\t 'envelope': {\n\t 'attack': 0.005,\n\t 'decay': 0.1,\n\t 'sustain': 0\n\t }\n\t };\n\t /**\n\t\t * Start the attack portion of the envelopes. Unlike other\n\t\t * instruments, Tone.NoiseSynth doesn't have a note.\n\t\t * @param {Time} [time=now] the time the attack should start\n\t\t * @param {number} [velocity=1] the velocity of the note (0-1)\n\t\t * @returns {Tone.NoiseSynth} this\n\t\t * @example\n\t\t * noiseSynth.triggerAttack();\n\t\t */\n\t Tone.NoiseSynth.prototype.triggerAttack = function (time, velocity) {\n\t //the envelopes\n\t this.envelope.triggerAttack(time, velocity);\n\t //start the noise\n\t this.noise.start(time);\n\t if (this.envelope.sustain === 0) {\n\t this.noise.stop(time = this.envelope.attack + this.envelope.decay);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Start the release portion of the envelopes.\n\t\t * @param {Time} [time=now] the time the release should start\n\t\t * @returns {Tone.NoiseSynth} this\n\t\t */\n\t Tone.NoiseSynth.prototype.triggerRelease = function (time) {\n\t this.envelope.triggerRelease(time);\n\t this.noise.stop(time + this.envelope.release);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.NoiseSynth.prototype.sync = function () {\n\t this._syncMethod('triggerAttack', 0);\n\t this._syncMethod('triggerRelease', 0);\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the attack and then the release.\n\t\t * @param {Time} duration the duration of the note\n\t\t * @param {Time} [time=now] the time of the attack\n\t\t * @param {number} [velocity=1] the velocity\n\t\t * @returns {Tone.NoiseSynth} this\n\t\t */\n\t Tone.NoiseSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t duration = this.toSeconds(duration);\n\t this.triggerAttack(time, velocity);\n\t this.triggerRelease(time + duration);\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.NoiseSynth} this\n\t\t */\n\t Tone.NoiseSynth.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t this._writable([\n\t 'noise',\n\t 'envelope'\n\t ]);\n\t this.noise.dispose();\n\t this.noise = null;\n\t this.envelope.dispose();\n\t this.envelope = null;\n\t return this;\n\t };\n\t return Tone.NoiseSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Karplus-String string synthesis. Often out of tune.\n\t\t * Will change when the AudioWorkerNode is available across\n\t\t * browsers.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Instrument}\n\t\t * @param {Object} [options] see the defaults\n\t\t * @example\n\t\t * var plucky = new Tone.PluckSynth().toMaster();\n\t\t * plucky.triggerAttack(\"C4\");\n\t\t */\n\t Tone.PluckSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.PluckSynth.defaults);\n\t Tone.Instrument.call(this, options);\n\t /**\n\t\t\t * @type {Tone.Noise}\n\t\t\t * @private\n\t\t\t */\n\t this._noise = new Tone.Noise('pink');\n\t /**\n\t\t\t * The amount of noise at the attack.\n\t\t\t * Nominal range of [0.1, 20]\n\t\t\t * @type {number}\n\t\t\t */\n\t this.attackNoise = options.attackNoise;\n\t /**\n\t\t\t * the LFCF\n\t\t\t * @type {Tone.LowpassCombFilter}\n\t\t\t * @private\n\t\t\t */\n\t this._lfcf = new Tone.LowpassCombFilter({\n\t 'resonance': options.resonance,\n\t 'dampening': options.dampening\n\t });\n\t /**\n\t\t\t * The resonance control.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.resonance = this._lfcf.resonance;\n\t /**\n\t\t\t * The dampening control. i.e. the lowpass filter frequency of the comb filter\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.dampening = this._lfcf.dampening;\n\t //connections\n\t this._noise.connect(this._lfcf);\n\t this._lfcf.connect(this.output);\n\t this._readOnly([\n\t 'resonance',\n\t 'dampening'\n\t ]);\n\t };\n\t Tone.extend(Tone.PluckSynth, Tone.Instrument);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.PluckSynth.defaults = {\n\t 'attackNoise': 1,\n\t 'dampening': 4000,\n\t 'resonance': 0.7\n\t };\n\t /**\n\t\t * Trigger the note.\n\t\t * @param {Frequency} note The note to trigger.\n\t\t * @param {Time} [time=now] When the note should be triggered.\n\t\t * @returns {Tone.PluckSynth} this\n\t\t */\n\t Tone.PluckSynth.prototype.triggerAttack = function (note, time) {\n\t note = this.toFrequency(note);\n\t time = this.toSeconds(time);\n\t var delayAmount = 1 / note;\n\t this._lfcf.delayTime.setValueAtTime(delayAmount, time);\n\t this._noise.start(time);\n\t this._noise.stop(time + delayAmount * this.attackNoise);\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.PluckSynth} this\n\t\t */\n\t Tone.PluckSynth.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t this._noise.dispose();\n\t this._lfcf.dispose();\n\t this._noise = null;\n\t this._lfcf = null;\n\t this._writable([\n\t 'resonance',\n\t 'dampening'\n\t ]);\n\t this.dampening = null;\n\t this.resonance = null;\n\t return this;\n\t };\n\t return Tone.PluckSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PolySynth handles voice creation and allocation for any\n\t\t * instruments passed in as the second paramter. PolySynth is\n\t\t * not a synthesizer by itself, it merely manages voices of\n\t\t * one of the other types of synths, allowing any of the\n\t\t * monophonic synthesizers to be polyphonic.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Instrument}\n\t\t * @param {number|Object} [polyphony=4] The number of voices to create\n\t\t * @param {function} [voice=Tone.Synth] The constructor of the voices\n\t\t * uses Tone.Synth by default.\n\t\t * @example\n\t\t * //a polysynth composed of 6 Voices of Synth\n\t\t * var synth = new Tone.PolySynth(6, Tone.Synth).toMaster();\n\t\t * //set the attributes using the set interface\n\t\t * synth.set(\"detune\", -1200);\n\t\t * //play a chord\n\t\t * synth.triggerAttackRelease([\"C4\", \"E4\", \"A4\"], \"4n\");\n\t\t */\n\t Tone.PolySynth = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'polyphony',\n\t 'voice'\n\t ], Tone.PolySynth);\n\t Tone.Instrument.call(this, options);\n\t options = Tone.defaultArg(options, Tone.Instrument.defaults);\n\t //max polyphony\n\t options.polyphony = Math.min(Tone.PolySynth.MAX_POLYPHONY, options.polyphony);\n\t /**\n\t\t\t * the array of voices\n\t\t\t * @type {Array}\n\t\t\t */\n\t this.voices = new Array(options.polyphony);\n\t /**\n\t\t\t * The queue of voices with data about last trigger\n\t\t\t * and the triggered note\n\t\t\t * @private\n\t\t\t * @type {Array}\n\t\t\t */\n\t this._triggers = new Array(options.polyphony);\n\t /**\n\t\t\t * The detune in cents\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t this._readOnly('detune');\n\t //create the voices\n\t for (var i = 0; i < options.polyphony; i++) {\n\t var v = new options.voice(arguments[2], arguments[3]);\n\t if (!(v instanceof Tone.Monophonic)) {\n\t throw new Error('Synth constructor must be instance of Tone.Monophonic');\n\t }\n\t this.voices[i] = v;\n\t v.connect(this.output);\n\t if (v.hasOwnProperty('detune')) {\n\t this.detune.connect(v.detune);\n\t }\n\t this._triggers[i] = {\n\t release: -1,\n\t note: null,\n\t voice: v\n\t };\n\t }\n\t };\n\t Tone.extend(Tone.PolySynth, Tone.Instrument);\n\t /**\n\t\t * the defaults\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.PolySynth.defaults = {\n\t 'polyphony': 4,\n\t 'volume': 0,\n\t 'detune': 0,\n\t 'voice': Tone.Synth\n\t };\n\t /**\n\t\t * Trigger the attack portion of the note\n\t\t * @param {Frequency|Array} notes The notes to play. Accepts a single\n\t\t * Frequency or an array of frequencies.\n\t\t * @param {Time} [time=now] The start time of the note.\n\t\t * @param {number} [velocity=1] The velocity of the note.\n\t\t * @returns {Tone.PolySynth} this\n\t\t * @example\n\t\t * //trigger a chord immediately with a velocity of 0.2\n\t\t * poly.triggerAttack([\"Ab3\", \"C4\", \"F5\"], undefined, 0.2);\n\t\t */\n\t Tone.PolySynth.prototype.triggerAttack = function (notes, time, velocity) {\n\t if (!Array.isArray(notes)) {\n\t notes = [notes];\n\t }\n\t time = this.toSeconds(time);\n\t for (var i = 0; i < notes.length; i++) {\n\t var val = notes[i];\n\t //trigger the oldest voice\n\t var oldest = this._triggers[0];\n\t for (var j = 1; j < this._triggers.length; j++) {\n\t if (this._triggers[j].release < oldest.release) {\n\t oldest = this._triggers[j];\n\t }\n\t }\n\t oldest.release = Infinity;\n\t oldest.note = JSON.stringify(val);\n\t oldest.voice.triggerAttack(val, time, velocity);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the attack and release after the specified duration\n\t\t *\n\t\t * @param {Frequency|Array} notes The notes to play. Accepts a single\n\t\t * Frequency or an array of frequencies.\n\t\t * @param {Time} duration the duration of the note\n\t\t * @param {Time} [time=now] if no time is given, defaults to now\n\t\t * @param {number} [velocity=1] the velocity of the attack (0-1)\n\t\t * @returns {Tone.PolySynth} this\n\t\t * @example\n\t\t * //trigger a chord for a duration of a half note\n\t\t * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], \"2n\");\n\t\t * @example\n\t\t * //can pass in an array of durations as well\n\t\t * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], [\"2n\", \"4n\", \"4n\"]);\n\t\t */\n\t Tone.PolySynth.prototype.triggerAttackRelease = function (notes, duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t this.triggerAttack(notes, time, velocity);\n\t if (Tone.isArray(duration) && Tone.isArray(notes)) {\n\t for (var i = 0; i < notes.length; i++) {\n\t var d = duration[Math.min(i, duration.length - 1)];\n\t this.triggerRelease(notes[i], time + this.toSeconds(d));\n\t }\n\t } else {\n\t this.triggerRelease(notes, time + this.toSeconds(duration));\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the release of the note. Unlike monophonic instruments,\n\t\t * a note (or array of notes) needs to be passed in as the first argument.\n\t\t * @param {Frequency|Array} notes The notes to play. Accepts a single\n\t\t * Frequency or an array of frequencies.\n\t\t * @param {Time} [time=now] When the release will be triggered.\n\t\t * @returns {Tone.PolySynth} this\n\t\t * @example\n\t\t * poly.triggerRelease([\"Ab3\", \"C4\", \"F5\"], \"+2n\");\n\t\t */\n\t Tone.PolySynth.prototype.triggerRelease = function (notes, time) {\n\t if (!Array.isArray(notes)) {\n\t notes = [notes];\n\t }\n\t time = this.toSeconds(time);\n\t for (var i = 0; i < notes.length; i++) {\n\t //get the voice\n\t var stringified = JSON.stringify(notes[i]);\n\t for (var v = 0; v < this._triggers.length; v++) {\n\t var desc = this._triggers[v];\n\t if (desc.note === stringified && desc.release > time) {\n\t desc.voice.triggerRelease(time);\n\t desc.release = time;\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.PolySynth.prototype.sync = function () {\n\t this._syncMethod('triggerAttack', 1);\n\t this._syncMethod('triggerRelease', 1);\n\t return this;\n\t };\n\t /**\n\t\t * Set a member/attribute of the voices.\n\t\t * @param {Object|string} params\n\t\t * @param {number=} value\n\t\t * @param {Time=} rampTime\n\t\t * @returns {Tone.PolySynth} this\n\t\t * @example\n\t\t * poly.set({\n\t\t * \t\"filter\" : {\n\t\t * \t\t\"type\" : \"highpass\"\n\t\t * \t},\n\t\t * \t\"envelope\" : {\n\t\t * \t\t\"attack\" : 0.25\n\t\t * \t}\n\t\t * });\n\t\t */\n\t Tone.PolySynth.prototype.set = function (params, value, rampTime) {\n\t for (var i = 0; i < this.voices.length; i++) {\n\t this.voices[i].set(params, value, rampTime);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Get the synth's attributes. Given no arguments get\n\t\t * will return all available object properties and their corresponding\n\t\t * values. Pass in a single attribute to retrieve or an array\n\t\t * of attributes. The attribute strings can also include a \".\"\n\t\t * to access deeper properties.\n\t\t * @param {Array=} params the parameters to get, otherwise will return\n\t\t * \t\t\t\t\t all available.\n\t\t */\n\t Tone.PolySynth.prototype.get = function (params) {\n\t return this.voices[0].get(params);\n\t };\n\t /**\n\t\t * Trigger the release portion of all the currently active voices.\n\t\t * @param {Time} [time=now] When the notes should be released.\n\t\t * @return {Tone.PolySynth} this\n\t\t */\n\t Tone.PolySynth.prototype.releaseAll = function (time) {\n\t time = this.toSeconds(time);\n\t for (var i = 0; i < this._triggers.length; i++) {\n\t var desc = this._triggers[i];\n\t if (desc.release > time) {\n\t desc.release = time;\n\t desc.voice.triggerRelease(time);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.PolySynth} this\n\t\t */\n\t Tone.PolySynth.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t for (var i = 0; i < this.voices.length; i++) {\n\t this.voices[i].dispose();\n\t this.voices[i] = null;\n\t }\n\t this._writable('detune');\n\t this.detune.dispose();\n\t this.detune = null;\n\t this.voices = null;\n\t this._triggers = null;\n\t return this;\n\t };\n\t /**\n\t\t * The maximum number of notes that can be allocated\n\t\t * to a polysynth.\n\t\t * @type {Number}\n\t\t * @static\n\t\t */\n\t Tone.PolySynth.MAX_POLYPHONY = 20;\n\t return Tone.PolySynth;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Automatically interpolates between a set of pitched samples. Pass in an object which maps the note's pitch or midi value to the url, then you can trigger the attack and release of that note like other instruments. By automatically repitching the samples, it is possible to play pitches which were not explicitly included which can save loading time.\n\t\t * For sample or buffer playback where repitching is not necessary, use [Tone.Player](https://tonejs.github.io/docs/Player).\n\t\t * @param {Object} samples An object of samples mapping either Midi\n\t\t * Note Numbers or Scientific Pitch Notation\n\t\t * to the url of that sample.\n\t\t * @param {Function=} onload The callback to invoke when all of the samples are loaded.\n\t\t * @param {String=} baseUrl The root URL of all of the samples, which is prepended to all the URLs.\n\t\t * @example\n\t\t * var sampler = new Tone.Sampler({\n\t\t * \t\"C3\" : \"path/to/C3.mp3\",\n\t\t * \t\"D#3\" : \"path/to/Dsharp3.mp3\",\n\t\t * \t\"F#3\" : \"path/to/Fsharp3.mp3\",\n\t\t * \t\"A3\" : \"path/to/A3.mp3\",\n\t\t * }, function(){\n\t\t * \t//sampler will repitch the closest sample\n\t\t * \tsampler.triggerAttack(\"D3\")\n\t\t * })\n\t\t * @extends {Tone.Instrument}\n\t\t */\n\t Tone.Sampler = function (urls) {\n\t // shift arguments over one. Those are the remainder of the options\n\t var args = Array.prototype.slice.call(arguments);\n\t args.shift();\n\t var options = Tone.defaults(args, [\n\t 'onload',\n\t 'baseUrl'\n\t ], Tone.Sampler);\n\t Tone.Instrument.call(this, options);\n\t var urlMap = {};\n\t for (var note in urls) {\n\t if (Tone.isNote(note)) {\n\t //convert the note name to MIDI\n\t var mid = Tone.Frequency(note).toMidi();\n\t urlMap[mid] = urls[note];\n\t } else if (!isNaN(parseFloat(note))) {\n\t //otherwise if it's numbers assume it's midi\n\t urlMap[note] = urls[note];\n\t } else {\n\t throw new Error('Tone.Sampler: url keys must be the note\\'s pitch');\n\t }\n\t }\n\t /**\n\t\t\t * The stored and loaded buffers\n\t\t\t * @type {Tone.Buffers}\n\t\t\t * @private\n\t\t\t */\n\t this._buffers = new Tone.Buffers(urlMap, options.onload, options.baseUrl);\n\t /**\n\t\t\t * The object of all currently playing BufferSources\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t this._activeSources = {};\n\t /**\n\t\t\t * The envelope applied to the beginning of the sample.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.attack = options.attack;\n\t /**\n\t\t\t * The envelope applied to the end of the envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.release = options.release;\n\t };\n\t Tone.extend(Tone.Sampler, Tone.Instrument);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Sampler.defaults = {\n\t attack: 0,\n\t release: 0.1,\n\t onload: Tone.noOp,\n\t baseUrl: ''\n\t };\n\t /**\n\t\t * Returns the difference in steps between the given midi note at the closets sample.\n\t\t * @param {Midi} midi\n\t\t * @return {Interval}\n\t\t * @private\n\t\t */\n\t Tone.Sampler.prototype._findClosest = function (midi) {\n\t var MAX_INTERVAL = 24;\n\t var interval = 0;\n\t while (interval < MAX_INTERVAL) {\n\t // check above and below\n\t if (this._buffers.has(midi + interval)) {\n\t return -interval;\n\t } else if (this._buffers.has(midi - interval)) {\n\t return interval;\n\t }\n\t interval++;\n\t }\n\t return null;\n\t };\n\t /**\n\t\t * @param {Frequency} note The note to play\n\t\t * @param {Time=} time When to play the note\n\t\t * @param {NormalRange=} velocity The velocity to play the sample back.\n\t\t * @return {Tone.Sampler} this\n\t\t */\n\t Tone.Sampler.prototype.triggerAttack = function (note, time, velocity) {\n\t var midi = Tone.Frequency(note).toMidi();\n\t // find the closest note pitch\n\t var difference = this._findClosest(midi);\n\t if (difference !== null) {\n\t var closestNote = midi - difference;\n\t var buffer = this._buffers.get(closestNote);\n\t // play that note\n\t var source = new Tone.BufferSource({\n\t 'buffer': buffer,\n\t 'playbackRate': Tone.intervalToFrequencyRatio(difference),\n\t 'fadeIn': this.attack,\n\t 'fadeOut': this.release,\n\t 'curve': 'exponential'\n\t }).connect(this.output);\n\t source.start(time, 0, buffer.duration, velocity);\n\t // add it to the active sources\n\t if (!Tone.isArray(this._activeSources[midi])) {\n\t this._activeSources[midi] = [];\n\t }\n\t this._activeSources[midi].push({\n\t note: midi,\n\t source: source\n\t });\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * @param {Frequency} note The note to release.\n\t\t * @param {Time=} time \tWhen to release the note.\n\t\t * @return {Tone.Sampler}\tthis\n\t\t */\n\t Tone.Sampler.prototype.triggerRelease = function (note, time) {\n\t var midi = Tone.Frequency(note).toMidi();\n\t // find the note\n\t if (this._activeSources[midi] && this._activeSources[midi].length) {\n\t var source = this._activeSources[midi].shift().source;\n\t time = this.toSeconds(time);\n\t source.stop(time + this.release, this.release);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Release all currently active notes.\n\t\t * @param {Time=} time \tWhen to release the notes.\n\t\t * @return {Tone.Sampler}\tthis\n\t\t */\n\t Tone.Sampler.prototype.releaseAll = function (time) {\n\t time = this.toSeconds(time);\n\t for (var note in this._activeSources) {\n\t var sources = this._activeSources[note];\n\t while (sources.length) {\n\t var source = sources.shift().source;\n\t source.stop(time + this.release, this.release);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.Sampler.prototype.sync = function () {\n\t this._syncMethod('triggerAttack', 1);\n\t this._syncMethod('triggerRelease', 1);\n\t return this;\n\t };\n\t /**\n\t\t * Invoke the attack phase, then after the duration, invoke the release.\n\t\t * @param {Frequency} note The note to play\n\t\t * @param {Time} duration The time the note should be held\n\t\t * @param {Time=} time When to start the attack\n\t\t * @param {NormalRange} [velocity=1] The velocity of the attack\n\t\t * @return {Tone.Sampler} this\n\t\t */\n\t Tone.Sampler.prototype.triggerAttackRelease = function (note, duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t duration = this.toSeconds(duration);\n\t this.triggerAttack(note, time, velocity);\n\t this.triggerRelease(note, time + duration);\n\t return this;\n\t };\n\t /**\n\t\t * Add a note to the sampler.\n\t\t * @param {Note|Midi} note The buffer's pitch.\n\t\t * @param {String|Tone.Buffer|Audiobuffer} url Either the url of the bufer,\n\t\t * or a buffer which will be added\n\t\t * with the given name.\n\t\t * @param {Function=} callback The callback to invoke\n\t\t * when the url is loaded.\n\t\t */\n\t Tone.Sampler.prototype.add = function (note, url, callback) {\n\t if (Tone.isNote(note)) {\n\t //convert the note name to MIDI\n\t var mid = Tone.Frequency(note).toMidi();\n\t this._buffers.add(mid, url, callback);\n\t } else if (!isNaN(parseFloat(note))) {\n\t //otherwise if it's numbers assume it's midi\n\t this._buffers.add(note, url, callback);\n\t } else {\n\t throw new Error('Tone.Sampler: note must be the note\\'s pitch. Instead got ' + note);\n\t }\n\t };\n\t /**\n\t\t * If the buffers are loaded or not\n\t\t * @memberOf Tone.Sampler#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Sampler.prototype, 'loaded', {\n\t get: function () {\n\t return this._buffers.loaded;\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Sampler} this\n\t\t */\n\t Tone.Sampler.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t this._buffers.dispose();\n\t this._buffers = null;\n\t for (var midi in this._activeSources) {\n\t this._activeSources[midi].forEach(function (event) {\n\t event.source.dispose();\n\t });\n\t }\n\t this._activeSources = null;\n\t return this;\n\t };\n\t return Tone.Sampler;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported) {\n\t if (!OscillatorNode.prototype.setPeriodicWave) {\n\t OscillatorNode.prototype.setPeriodicWave = OscillatorNode.prototype.setWaveTable;\n\t }\n\t if (!AudioContext.prototype.createPeriodicWave) {\n\t AudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable;\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Maps a NormalRange [0, 1] to an AudioRange [-1, 1]. \n\t\t * See also Tone.AudioToGain. \n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @example\n\t\t * var g2a = new Tone.GainToAudio();\n\t\t */\n\t Tone.GainToAudio = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {\n\t return Math.abs(x) * 2 - 1;\n\t });\n\t };\n\t Tone.extend(Tone.GainToAudio, Tone.SignalBase);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.GainToAudio} this\n\t\t */\n\t Tone.GainToAudio.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._norm.dispose();\n\t this._norm = null;\n\t return this;\n\t };\n\t return Tone.GainToAudio;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Normalize takes an input min and max and maps it linearly to NormalRange [0,1]\n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @param {number} inputMin the min input value\n\t\t * @param {number} inputMax the max input value\n\t\t * @example\n\t\t * var norm = new Tone.Normalize(2, 4);\n\t\t * var sig = new Tone.Signal(3).connect(norm);\n\t\t * //output of norm is 0.5. \n\t\t */\n\t Tone.Normalize = function (inputMin, inputMax) {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * the min input value\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._inputMin = Tone.defaultArg(inputMin, 0);\n\t /**\n\t\t\t * the max input value\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._inputMax = Tone.defaultArg(inputMax, 1);\n\t /**\n\t\t\t * subtract the min from the input\n\t\t\t * @type {Tone.Add}\n\t\t\t * @private\n\t\t\t */\n\t this._sub = this.input = new Tone.Add(0);\n\t /**\n\t\t\t * divide by the difference between the input and output\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._div = this.output = new Tone.Multiply(1);\n\t this._sub.connect(this._div);\n\t this._setRange();\n\t };\n\t Tone.extend(Tone.Normalize, Tone.SignalBase);\n\t /**\n\t\t * The minimum value the input signal will reach.\n\t\t * @memberOf Tone.Normalize#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.Normalize.prototype, 'min', {\n\t get: function () {\n\t return this._inputMin;\n\t },\n\t set: function (min) {\n\t this._inputMin = min;\n\t this._setRange();\n\t }\n\t });\n\t /**\n\t\t * The maximum value the input signal will reach.\n\t\t * @memberOf Tone.Normalize#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t Object.defineProperty(Tone.Normalize.prototype, 'max', {\n\t get: function () {\n\t return this._inputMax;\n\t },\n\t set: function (max) {\n\t this._inputMax = max;\n\t this._setRange();\n\t }\n\t });\n\t /**\n\t\t * set the values\n\t\t * @private\n\t\t */\n\t Tone.Normalize.prototype._setRange = function () {\n\t this._sub.value = -this._inputMin;\n\t this._div.value = 1 / (this._inputMax - this._inputMin);\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Normalize} this\n\t\t */\n\t Tone.Normalize.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._sub.dispose();\n\t this._sub = null;\n\t this._div.dispose();\n\t this._div = null;\n\t return this;\n\t };\n\t return Tone.Normalize;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TransportTimelineSignal extends Tone.Signal, but adds the ability to synchronize the signal to the signal to the Tone.Transport\n\t\t * @extends {Tone.Signal}\n\t\t */\n\t Tone.TransportTimelineSignal = function () {\n\t Tone.Signal.apply(this, arguments);\n\t /**\n\t\t\t * The real signal output\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t this.output = this._outputSig = new Tone.Signal(this._initialValue);\n\t /**\n\t\t\t * Keep track of the last value. (small optimization)\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._lastVal = this.value;\n\t /**\n\t\t\t * The event id of the tick update loop\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._synced = Tone.Transport.scheduleRepeat(this._onTick.bind(this), '1i');\n\t /**\n\t\t\t * A bound version of the anchor value methods\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._bindAnchorValue = this._anchorValue.bind(this);\n\t Tone.Transport.on('start stop pause', this._bindAnchorValue);\n\t this._events.memory = Infinity;\n\t };\n\t Tone.extend(Tone.TransportTimelineSignal, Tone.Signal);\n\t /**\n\t\t * If scheduling past events should create a warning notification\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t Tone.TransportTimelineSignal.prototype._ignorePast = true;\n\t /**\n\t\t * Callback which is invoked every tick.\n\t\t * @private\n\t\t * @param {Number} time\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype._onTick = function (time) {\n\t var val = this.getValueAtTime(Tone.Transport.seconds);\n\t if (this._lastVal !== val) {\n\t this._lastVal = val;\n\t //approximate ramp curves with linear ramps\n\t this._outputSig.linearRampToValueAtTime(val, time);\n\t }\n\t };\n\t /**\n\t\t * Anchor the value at the start and stop of the Transport\n\t\t * @param {Number} time The time of the event\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t * @private\n\t\t */\n\t Tone.TransportTimelineSignal.prototype._anchorValue = function (time) {\n\t var val = this.getValueAtTime(Tone.Transport.seconds);\n\t this._lastVal = val;\n\t this._outputSig.cancelScheduledValues(time);\n\t this._outputSig.setValueAtTime(val, time);\n\t return this;\n\t };\n\t /**\n\t\t * Get the scheduled value at the given time. This will\n\t\t * return the unconverted (raw) value.\n\t\t * @param {TransportTime} time The time in seconds.\n\t\t * @return {Number} The scheduled value at the given time.\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.getValueAtTime = function (time) {\n\t time = Tone.TransportTime(time);\n\t return Tone.Signal.prototype.getValueAtTime.call(this, time);\n\t };\n\t /**\n\t\t * Set the output of the signal at the given time\n\t\t * @param {Number} value The value to change to at the given time\n\t\t * @param {TransportTime} time The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.setValueAtTime = function (value, time) {\n\t time = Tone.TransportTime(time);\n\t Tone.Signal.prototype.setValueAtTime.call(this, value, time);\n\t return this;\n\t };\n\t /**\n\t\t * Linear ramp to the given value from the previous scheduled point to the given value\n\t\t * @param {Number} value The value to change to at the given time\n\t\t * @param {TransportTime} time The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.linearRampToValueAtTime = function (value, time) {\n\t time = Tone.TransportTime(time);\n\t Tone.Signal.prototype.linearRampToValueAtTime.call(this, value, time);\n\t return this;\n\t };\n\t /**\n\t\t * Exponential ramp to the given value from the previous scheduled point to the given value\n\t\t * @param {Number} value The value to change to at the given time\n\t\t * @param {TransportTime} time The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.exponentialRampToValueAtTime = function (value, time) {\n\t time = Tone.TransportTime(time);\n\t Tone.Signal.prototype.exponentialRampToValueAtTime.call(this, value, time);\n\t return this;\n\t };\n\t /**\n\t\t * Start exponentially approaching the target value at the given time with\n\t\t * a rate having the given time constant.\n\t\t * @param {number} value\n\t\t * @param {TransportTime} startTime\n\t\t * @param {number} timeConstant\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.setTargetAtTime = function (value, startTime, timeConstant) {\n\t startTime = Tone.TransportTime(startTime);\n\t Tone.Signal.prototype.setTargetAtTime.call(this, value, startTime, timeConstant);\n\t return this;\n\t };\n\t /**\n\t\t * Cancels all scheduled parameter changes with times greater than or\n\t\t * equal to startTime.\n\t\t * @param {TransportTime} startTime\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.cancelScheduledValues = function (startTime) {\n\t startTime = Tone.TransportTime(startTime);\n\t Tone.Signal.prototype.cancelScheduledValues.call(this, startTime);\n\t return this;\n\t };\n\t /**\n\t\t * Set an array of arbitrary values starting at the given time for the given duration.\n\t\t * @param {Float32Array} values\n\t\t * @param {Time} startTime\n\t\t * @param {Time} duration\n\t\t * @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n\t\t * @returns {Tone.Signal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {\n\t startTime = Tone.TransportTime(startTime);\n\t duration = Tone.TransportTime(duration);\n\t Tone.Signal.prototype.setValueCurveAtTime.call(this, values, startTime, duration, scaling);\n\t return this;\n\t };\n\t /**\n\t\t * This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n\t\t * it holds the automated value at time until the next automated event.\n\t\t * @param {Time} time\n\t\t * @returns {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.cancelAndHoldAtTime = function (time) {\n\t return Tone.Signal.prototype.cancelAndHoldAtTime.call(this, Tone.TransportTime(time));\n\t };\n\t /**\n\t\t * Dispose and disconnect\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.dispose = function () {\n\t Tone.Transport.clear(this._synced);\n\t Tone.Transport.off('start stop pause', this._syncedCallback);\n\t this._events.cancel(0);\n\t Tone.Signal.prototype.dispose.call(this);\n\t this._outputSig.dispose();\n\t this._outputSig = null;\n\t };\n\t return Tone.TransportTimelineSignal;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.GrainPlayer implements [granular synthesis](https://en.wikipedia.org/wiki/Granular_synthesis).\n\t\t * Granular Synthesis enables you to adjust pitch and playback rate independently. The grainSize is the\n\t\t * amount of time each small chunk of audio is played for and the overlap is the\n\t\t * amount of crossfading transition time between successive grains.\n\t\t * @extends {Tone.Source}\n\t\t * @param {String|Tone.Buffer} url\tThe url to load, or the Tone.Buffer to play.\n\t\t * @param {Function=} callback The callback to invoke after the url is loaded.\n\t\t */\n\t Tone.GrainPlayer = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'url',\n\t 'onload'\n\t ], Tone.GrainPlayer);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The audio buffer belonging to the player.\n\t\t\t * @type {Tone.Buffer}\n\t\t\t */\n\t this.buffer = new Tone.Buffer(options.url, options.onload);\n\t /**\n\t\t\t * Create a repeating tick to schedule\n\t\t\t * the grains.\n\t\t\t * @type {Tone.Clock}\n\t\t\t * @private\n\t\t\t */\n\t this._clock = new Tone.Clock(this._tick.bind(this), options.grainSize);\n\t /**\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._loopStart = 0;\n\t /**\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._loopEnd = 0;\n\t /**\n\t\t\t * All of the currently playing BufferSources\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._activeSources = [];\n\t /**\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._playbackRate = options.playbackRate;\n\t /**\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._grainSize = options.grainSize;\n\t /**\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._overlap = options.overlap;\n\t /**\n\t\t\t * Adjust the pitch independently of the playbackRate.\n\t\t\t * @type {Cents}\n\t\t\t */\n\t this.detune = options.detune;\n\t //setup\n\t this.overlap = options.overlap;\n\t this.loop = options.loop;\n\t this.playbackRate = options.playbackRate;\n\t this.grainSize = options.grainSize;\n\t this.loopStart = options.loopStart;\n\t this.loopEnd = options.loopEnd;\n\t this.reverse = options.reverse;\n\t this._clock.on('stop', this._onstop.bind(this));\n\t };\n\t Tone.extend(Tone.GrainPlayer, Tone.Source);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.GrainPlayer.defaults = {\n\t 'onload': Tone.noOp,\n\t 'overlap': 0.1,\n\t 'grainSize': 0.2,\n\t 'playbackRate': 1,\n\t 'detune': 0,\n\t 'loop': false,\n\t 'loopStart': 0,\n\t 'loopEnd': 0,\n\t 'reverse': false\n\t };\n\t /**\n\t\t * Play the buffer at the given startTime. Optionally add an offset\n\t\t * and/or duration which will play the buffer from a position\n\t\t * within the buffer for the given duration.\n\t\t *\n\t\t * @param {Time} [startTime=now] When the player should start.\n\t\t * @param {Time} [offset=0] The offset from the beginning of the sample\n\t\t * to start at.\n\t\t * @param {Time=} duration How long the sample should play. If no duration\n\t\t * is given, it will default to the full length\n\t\t * of the sample (minus any offset)\n\t\t * @returns {Tone.GrainPlayer} this\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @method start\n\t\t * @name start\n\t\t */\n\t /**\n\t\t * Internal start method\n\t\t * @param {Time} time\n\t\t * @param {Time} offset\n\t\t * @private\n\t\t */\n\t Tone.GrainPlayer.prototype._start = function (time, offset, duration) {\n\t offset = Tone.defaultArg(offset, 0);\n\t offset = this.toSeconds(offset);\n\t time = this.toSeconds(time);\n\t this._offset = offset;\n\t this._clock.start(time);\n\t if (duration) {\n\t this.stop(time + this.toSeconds(duration));\n\t }\n\t };\n\t /**\n\t\t * Internal start method\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.GrainPlayer.prototype._stop = function (time) {\n\t this._clock.stop(time);\n\t };\n\t /**\n\t\t * Invoked when the clock is stopped\n\t\t * @param {Number} time\n\t\t * @private\n\t\t */\n\t Tone.GrainPlayer.prototype._onstop = function (time) {\n\t //stop the players\n\t this._activeSources.forEach(function (source) {\n\t source.stop(time, 0);\n\t });\n\t };\n\t /**\n\t\t * Invoked on each clock tick. scheduled a new\n\t\t * grain at this time.\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.GrainPlayer.prototype._tick = function (time) {\n\t var fadeIn = this._offset < this._overlap ? 0 : this._overlap;\n\t var source = new Tone.BufferSource({\n\t 'buffer': this.buffer,\n\t 'fadeIn': fadeIn,\n\t 'fadeOut': this._overlap,\n\t 'loop': this.loop,\n\t 'loopStart': this._loopStart,\n\t 'loopEnd': this._loopEnd,\n\t 'playbackRate': Tone.intervalToFrequencyRatio(this.detune / 100)\n\t }).connect(this.output);\n\t source.start(time, this._offset);\n\t this._offset += this.grainSize;\n\t source.stop(time + this.grainSize);\n\t //add it to the active sources\n\t this._activeSources.push(source);\n\t //remove it when it's done\n\t source.onended = function () {\n\t var index = this._activeSources.indexOf(source);\n\t if (index !== -1) {\n\t this._activeSources.splice(index, 1);\n\t }\n\t }.bind(this);\n\t };\n\t /**\n\t\t * Jump to a specific time and play it.\n\t\t * @param {Time} offset The offset to jump to.\n\t\t * @param {Time=} time When to make the jump.\n\t\t * @return {Tone.GrainPlayer} this\n\t\t */\n\t Tone.GrainPlayer.prototype.seek = function (offset, time) {\n\t this._offset = this.toSeconds(offset);\n\t this._tick(this.toSeconds(time));\n\t return this;\n\t };\n\t /**\n\t\t * The playback rate of the sample\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Positive}\n\t\t * @name playbackRate\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._playbackRate;\n\t },\n\t set: function (rate) {\n\t this._playbackRate = rate;\n\t this.grainSize = this._grainSize;\n\t }\n\t });\n\t /**\n\t\t * The loop start time.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'loopStart', {\n\t get: function () {\n\t return this._loopStart;\n\t },\n\t set: function (time) {\n\t this._loopStart = this.toSeconds(time);\n\t }\n\t });\n\t /**\n\t\t * The loop end time.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'loopEnd', {\n\t get: function () {\n\t return this._loopEnd;\n\t },\n\t set: function (time) {\n\t this._loopEnd = this.toSeconds(time);\n\t }\n\t });\n\t /**\n\t\t * The direction the buffer should play in\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {boolean}\n\t\t * @name reverse\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'reverse', {\n\t get: function () {\n\t return this.buffer.reverse;\n\t },\n\t set: function (rev) {\n\t this.buffer.reverse = rev;\n\t }\n\t });\n\t /**\n\t\t * The size of each chunk of audio that the\n\t\t * buffer is chopped into and played back at.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name grainSize\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'grainSize', {\n\t get: function () {\n\t return this._grainSize;\n\t },\n\t set: function (size) {\n\t this._grainSize = this.toSeconds(size);\n\t this._clock.frequency.value = this._playbackRate / this._grainSize;\n\t }\n\t });\n\t /**\n\t\t * This is the duration of the cross-fade between\n\t\t * sucessive grains.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name overlap\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'overlap', {\n\t get: function () {\n\t return this._overlap;\n\t },\n\t set: function (time) {\n\t this._overlap = this.toSeconds(time);\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.GrainPlayer} this\n\t\t */\n\t Tone.GrainPlayer.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this.buffer.dispose();\n\t this.buffer = null;\n\t this._clock.dispose();\n\t this._clock = null;\n\t this._activeSources.forEach(function (source) {\n\t source.dispose();\n\t });\n\t this._activeSources = null;\n\t return this;\n\t };\n\t return Tone.GrainPlayer;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Player is an audio file player with start, loop, and stop functions.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Source}\n\t\t * @param {string|AudioBuffer} url Either the AudioBuffer or the url from\n\t\t * which to load the AudioBuffer\n\t\t * @param {function=} onload The function to invoke when the buffer is loaded.\n\t\t * Recommended to use Tone.Buffer.on('load') instead.\n\t\t * @example\n\t\t * var player = new Tone.Player(\"./path/to/sample.mp3\").toMaster();\n\t\t * //play as soon as the buffer is loaded\n\t\t * player.autostart = true;\n\t\t */\n\t Tone.Player = function (url) {\n\t var options;\n\t if (url instanceof Tone.Buffer && url.loaded) {\n\t url = url.get();\n\t options = Tone.Player.defaults;\n\t } else {\n\t options = Tone.defaults(arguments, [\n\t 'url',\n\t 'onload'\n\t ], Tone.Player);\n\t }\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * If the file should play as soon\n\t\t\t * as the buffer is loaded.\n\t\t\t * @type {boolean}\n\t\t\t * @example\n\t\t\t * //will play as soon as it's loaded\n\t\t\t * var player = new Tone.Player({\n\t\t\t * \t\"url\" : \"./path/to/sample.mp3\",\n\t\t\t * \t\"autostart\" : true,\n\t\t\t * }).toMaster();\n\t\t\t */\n\t this.autostart = options.autostart;\n\t /**\n\t\t\t * the buffer\n\t\t\t * @private\n\t\t\t * @type {Tone.Buffer}\n\t\t\t */\n\t this._buffer = new Tone.Buffer({\n\t 'url': options.url,\n\t 'onload': this._onload.bind(this, options.onload),\n\t 'reverse': options.reverse\n\t });\n\t if (url instanceof AudioBuffer) {\n\t this._buffer.set(url);\n\t }\n\t /**\n\t\t\t * if the buffer should loop once it's over\n\t\t\t * @type {boolean}\n\t\t\t * @private\n\t\t\t */\n\t this._loop = options.loop;\n\t /**\n\t\t\t * if 'loop' is true, the loop will start at this position\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t this._loopStart = options.loopStart;\n\t /**\n\t\t\t * if 'loop' is true, the loop will end at this position\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t this._loopEnd = options.loopEnd;\n\t /**\n\t\t\t * the playback rate\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._playbackRate = options.playbackRate;\n\t /**\n\t\t\t * Enabling retrigger will allow a player to be restarted\n\t\t\t * before the the previous 'start' is done playing. Otherwise,\n\t\t\t * successive calls to Tone.Player.start will only start\n\t\t\t * the sample if it had played all the way through.\n\t\t\t * @type {boolean}\n\t\t\t */\n\t this.retrigger = options.retrigger;\n\t /**\n\t\t\t * The fadeIn time of the amplitude envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.fadeIn = options.fadeIn;\n\t /**\n\t\t\t * The fadeOut time of the amplitude envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.fadeOut = options.fadeOut;\n\t };\n\t Tone.extend(Tone.Player, Tone.Source);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Player.defaults = {\n\t 'onload': Tone.noOp,\n\t 'playbackRate': 1,\n\t 'loop': false,\n\t 'autostart': false,\n\t 'loopStart': 0,\n\t 'loopEnd': 0,\n\t 'retrigger': false,\n\t 'reverse': false,\n\t 'fadeIn': 0,\n\t 'fadeOut': 0\n\t };\n\t /**\n\t\t * Load the audio file as an audio buffer.\n\t\t * Decodes the audio asynchronously and invokes\n\t\t * the callback once the audio buffer loads.\n\t\t * Note: this does not need to be called if a url\n\t\t * was passed in to the constructor. Only use this\n\t\t * if you want to manually load a new url.\n\t\t * @param {string} url The url of the buffer to load.\n\t\t * Filetype support depends on the\n\t\t * browser.\n\t\t * @param {function=} callback The function to invoke once\n\t\t * the sample is loaded.\n\t\t * @returns {Promise}\n\t\t */\n\t Tone.Player.prototype.load = function (url, callback) {\n\t return this._buffer.load(url, this._onload.bind(this, callback));\n\t };\n\t /**\n\t\t * Internal callback when the buffer is loaded.\n\t\t * @private\n\t\t */\n\t Tone.Player.prototype._onload = function (callback) {\n\t callback = Tone.defaultArg(callback, Tone.noOp);\n\t callback(this);\n\t if (this.autostart) {\n\t this.start();\n\t }\n\t };\n\t /**\n\t\t * Play the buffer at the given startTime. Optionally add an offset\n\t\t * and/or duration which will play the buffer from a position\n\t\t * within the buffer for the given duration.\n\t\t *\n\t\t * @param {Time} [startTime=now] When the player should start.\n\t\t * @param {Time} [offset=0] The offset from the beginning of the sample\n\t\t * to start at.\n\t\t * @param {Time=} duration How long the sample should play. If no duration\n\t\t * is given, it will default to the full length\n\t\t * of the sample (minus any offset)\n\t\t * @returns {Tone.Player} this\n\t\t * @memberOf Tone.Player#\n\t\t * @method start\n\t\t * @name start\n\t\t */\n\t /**\n\t\t * Internal start method\n\t\t * @private\n\t\t */\n\t Tone.Player.prototype._start = function (startTime, offset, duration) {\n\t //if it's a loop the default offset is the loopstart point\n\t if (this._loop) {\n\t offset = Tone.defaultArg(offset, this._loopStart);\n\t } else {\n\t //otherwise the default offset is 0\n\t offset = Tone.defaultArg(offset, 0);\n\t }\n\t //compute the values in seconds\n\t offset = this.toSeconds(offset);\n\t duration = Tone.defaultArg(duration, Math.max(this._buffer.duration - offset, 0));\n\t duration = this.toSeconds(duration);\n\t startTime = this.toSeconds(startTime);\n\t //make the source\n\t var source = new Tone.BufferSource({\n\t 'buffer': this._buffer,\n\t 'loop': this._loop,\n\t 'loopStart': this._loopStart,\n\t 'loopEnd': this._loopEnd,\n\t 'playbackRate': this._playbackRate,\n\t 'fadeIn': this.fadeIn,\n\t 'fadeOut': this.fadeOut\n\t }).connect(this.output);\n\t //set the looping properties\n\t if (!this._loop && !this._synced) {\n\t //if it's not looping, set the state change at the end of the sample\n\t this._state.setStateAtTime(Tone.State.Stopped, startTime + duration);\n\t }\n\t var event = this._state.get(startTime);\n\t event.source = source;\n\t //start it\n\t if (this._loop) {\n\t source.start(startTime, offset);\n\t } else {\n\t source.start(startTime, offset, duration);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop playback.\n\t\t * @private\n\t\t * @param {Time} [time=now]\n\t\t * @returns {Tone.Player} this\n\t\t */\n\t Tone.Player.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._state.forEachFrom(0, function (event) {\n\t if (event.source) {\n\t event.source.stop(time);\n\t }\n\t });\n\t return this;\n\t };\n\t /**\n\t\t * Stop and then restart the player from the beginning (or offset)\n\t\t * @param {Time} [startTime=now] When the player should start.\n\t\t * @param {Time} [offset=0] The offset from the beginning of the sample\n\t\t * to start at.\n\t\t * @param {Time=} duration How long the sample should play. If no duration\n\t\t * is given, it will default to the full length\n\t\t * of the sample (minus any offset)\n\t\t * @returns {Tone.Player} this\n\t\t */\n\t Tone.Player.prototype.restart = function (time, offset, duration) {\n\t if (!this.retrigger) {\n\t this.stop(time);\n\t }\n\t this._start(time, offset, duration);\n\t return this;\n\t };\n\t /**\n\t\t * Seek to a specific time in the player's buffer. If the\n\t\t * source is no longer playing at that time, it will stop.\n\t\t * If you seek to a time that\n\t\t * @param {Time} offset The time to seek to.\n\t\t * @param {Time=} time The time for the seek event to occur.\n\t\t * @return {Tone.Player} this\n\t\t * @example\n\t\t * source.start(0.2);\n\t\t * source.stop(0.4);\n\t\t */\n\t Tone.Player.prototype.seek = function (offset, time) {\n\t time = this.toSeconds(time);\n\t if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t offset = this.toSeconds(offset);\n\t // if it's currently playing, stop it\n\t this._stop(time);\n\t //restart it at the given time\n\t this._start(time, offset);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Set the loop start and end. Will only loop if loop is\n\t\t * set to true.\n\t\t * @param {Time} loopStart The loop end time\n\t\t * @param {Time} loopEnd The loop end time\n\t\t * @returns {Tone.Player} this\n\t\t * @example\n\t\t * //loop 0.1 seconds of the file.\n\t\t * player.setLoopPoints(0.2, 0.3);\n\t\t * player.loop = true;\n\t\t */\n\t Tone.Player.prototype.setLoopPoints = function (loopStart, loopEnd) {\n\t this.loopStart = loopStart;\n\t this.loopEnd = loopEnd;\n\t return this;\n\t };\n\t /**\n\t\t * If loop is true, the loop will start at this position.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'loopStart', {\n\t get: function () {\n\t return this._loopStart;\n\t },\n\t set: function (loopStart) {\n\t this._loopStart = loopStart;\n\t //get the current source\n\t var event = this._state.get(this.now());\n\t if (event && event.source) {\n\t event.source.loopStart = this.toSeconds(loopStart);\n\t }\n\t }\n\t });\n\t /**\n\t\t * If loop is true, the loop will end at this position.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'loopEnd', {\n\t get: function () {\n\t return this._loopEnd;\n\t },\n\t set: function (loopEnd) {\n\t this._loopEnd = loopEnd;\n\t //get the current source\n\t var event = this._state.get(this.now());\n\t if (event && event.source) {\n\t event.source.loopEnd = this.toSeconds(loopEnd);\n\t }\n\t }\n\t });\n\t /**\n\t\t * The audio buffer belonging to the player.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Tone.Buffer}\n\t\t * @name buffer\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'buffer', {\n\t get: function () {\n\t return this._buffer;\n\t },\n\t set: function (buffer) {\n\t this._buffer.set(buffer);\n\t }\n\t });\n\t /**\n\t\t * If the buffer should loop once it's over.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {boolean}\n\t\t * @name loop\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'loop', {\n\t get: function () {\n\t return this._loop;\n\t },\n\t set: function (loop) {\n\t this._loop = loop;\n\t //get the current source\n\t var event = this._state.get(this.now());\n\t if (event && event.source) {\n\t event.source.loop = loop;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The playback speed. 1 is normal speed. This is not a signal because\n\t\t * Safari and iOS currently don't support playbackRate as a signal.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {number}\n\t\t * @name playbackRate\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._playbackRate;\n\t },\n\t set: function (rate) {\n\t this._playbackRate = rate;\n\t //set all future sources\n\t this._state.forEachFrom(this.now(), function (event) {\n\t if (event.source) {\n\t event.source.playbackRate.value = rate;\n\t }\n\t });\n\t }\n\t });\n\t /**\n\t\t * The direction the buffer should play in\n\t\t * @memberOf Tone.Player#\n\t\t * @type {boolean}\n\t\t * @name reverse\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'reverse', {\n\t get: function () {\n\t return this._buffer.reverse;\n\t },\n\t set: function (rev) {\n\t this._buffer.reverse = rev;\n\t }\n\t });\n\t /**\n\t\t * If all the buffer is loaded\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'loaded', {\n\t get: function () {\n\t return this._buffer.loaded;\n\t }\n\t });\n\t /**\n\t\t * Dispose and disconnect.\n\t\t * @return {Tone.Player} this\n\t\t */\n\t Tone.Player.prototype.dispose = function () {\n\t //disconnect all of the players\n\t this._state.forEach(function (event) {\n\t if (event.source) {\n\t event.source.disconnect();\n\t event.source = null;\n\t }\n\t });\n\t Tone.Source.prototype.dispose.call(this);\n\t this._buffer.dispose();\n\t this._buffer = null;\n\t return this;\n\t };\n\t return Tone.Player;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Players combines multiple [Tone.Player](Player) objects.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Object} urls An object mapping a name to a url.\n\t\t * @param {function=} onload The function to invoke when all buffers are loaded.\n\t\t */\n\t Tone.Players = function (urls) {\n\t var args = Array.prototype.slice.call(arguments);\n\t args.shift();\n\t var options = Tone.defaults(args, ['onload'], Tone.Players);\n\t Tone.call(this);\n\t /**\n\t\t\t * The output volume node\n\t\t\t * @type {Tone.Volume}\n\t\t\t * @private\n\t\t\t */\n\t this._volume = this.output = new Tone.Volume(options.volume);\n\t /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t this.volume = this._volume.volume;\n\t this._readOnly('volume');\n\t //make the output explicitly stereo\n\t this._volume.output.output.channelCount = 2;\n\t this._volume.output.output.channelCountMode = 'explicit';\n\t //mute initially\n\t this.mute = options.mute;\n\t /**\n\t\t\t * The container of all of the players\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t this._players = {};\n\t /**\n\t\t\t * The loading count\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._loadingCount = 0;\n\t /**\n\t\t\t * private holder of the fadeIn time\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t this._fadeIn = options.fadeIn;\n\t /**\n\t\t\t * private holder of the fadeOut time\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t this._fadeOut = options.fadeOut;\n\t //add all of the players\n\t for (var name in urls) {\n\t this._loadingCount++;\n\t this.add(name, urls[name], this._bufferLoaded.bind(this, options.onload));\n\t }\n\t };\n\t Tone.extend(Tone.Players, Tone.AudioNode);\n\t /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t */\n\t Tone.Players.defaults = {\n\t 'volume': 0,\n\t 'mute': false,\n\t 'onload': Tone.noOp,\n\t 'fadeIn': 0,\n\t 'fadeOut': 0\n\t };\n\t /**\n\t\t * A buffer was loaded. decrement the counter.\n\t\t * @param {Function} callback\n\t\t * @private\n\t\t */\n\t Tone.Players.prototype._bufferLoaded = function (callback) {\n\t this._loadingCount--;\n\t if (this._loadingCount === 0 && callback) {\n\t callback(this);\n\t }\n\t };\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * source.mute = true;\n\t\t */\n\t Object.defineProperty(Tone.Players.prototype, 'mute', {\n\t get: function () {\n\t return this._volume.mute;\n\t },\n\t set: function (mute) {\n\t this._volume.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * The fadeIn time of the amplitude envelope.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {Time}\n\t\t * @name fadeIn\n\t\t */\n\t Object.defineProperty(Tone.Players.prototype, 'fadeIn', {\n\t get: function () {\n\t return this._fadeIn;\n\t },\n\t set: function (fadeIn) {\n\t this._fadeIn = fadeIn;\n\t this._forEach(function (player) {\n\t player.fadeIn = fadeIn;\n\t });\n\t }\n\t });\n\t /**\n\t\t * The fadeOut time of the amplitude envelope.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {Time}\n\t\t * @name fadeOut\n\t\t */\n\t Object.defineProperty(Tone.Players.prototype, 'fadeOut', {\n\t get: function () {\n\t return this._fadeOut;\n\t },\n\t set: function (fadeOut) {\n\t this._fadeOut = fadeOut;\n\t this._forEach(function (player) {\n\t player.fadeOut = fadeOut;\n\t });\n\t }\n\t });\n\t /**\n\t\t * The state of the players object. Returns \"started\" if any of the players are playing.\n\t\t * @memberOf Tone.Players#\n\t\t * @type {String}\n\t\t * @name state\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Players.prototype, 'state', {\n\t get: function () {\n\t var playing = false;\n\t this._forEach(function (player) {\n\t playing = playing || player.state === Tone.State.Started;\n\t });\n\t return playing ? Tone.State.Started : Tone.State.Stopped;\n\t }\n\t });\n\t /**\n\t\t * True if the buffers object has a buffer by that name.\n\t\t * @param {String|Number} name The key or index of the\n\t\t * buffer.\n\t\t * @return {Boolean}\n\t\t */\n\t Tone.Players.prototype.has = function (name) {\n\t return this._players.hasOwnProperty(name);\n\t };\n\t /**\n\t\t * Get a player by name.\n\t\t * @param {String} name The players name as defined in\n\t\t * the constructor object or `add` method.\n\t\t * @return {Tone.Player}\n\t\t */\n\t Tone.Players.prototype.get = function (name) {\n\t if (this.has(name)) {\n\t return this._players[name];\n\t } else {\n\t throw new Error('Tone.Players: no player named ' + name);\n\t }\n\t };\n\t /**\n\t\t * Iterate over all of the players\n\t\t * @param {Function} callback\n\t\t * @return {Tone.Players} this\n\t\t * @private\n\t\t */\n\t Tone.Players.prototype._forEach = function (callback) {\n\t for (var playerName in this._players) {\n\t callback(this._players[playerName], playerName);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * If all the buffers are loaded or not\n\t\t * @memberOf Tone.Players#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Players.prototype, 'loaded', {\n\t get: function () {\n\t var isLoaded = true;\n\t this._forEach(function (player) {\n\t isLoaded = isLoaded && player.loaded;\n\t });\n\t return isLoaded;\n\t }\n\t });\n\t /**\n\t\t * Add a player by name and url to the Players\n\t\t * @param {String} name A unique name to give the player\n\t\t * @param {String|Tone.Buffer|Audiobuffer} url Either the url of the bufer,\n\t\t * or a buffer which will be added\n\t\t * with the given name.\n\t\t * @param {Function=} callback The callback to invoke\n\t\t * when the url is loaded.\n\t\t */\n\t Tone.Players.prototype.add = function (name, url, callback) {\n\t this._players[name] = new Tone.Player(url, callback).connect(this.output);\n\t this._players[name].fadeIn = this._fadeIn;\n\t this._players[name].fadeOut = this._fadeOut;\n\t return this;\n\t };\n\t /**\n\t\t * Stop all of the players at the given time\n\t\t * @param {Time} time The time to stop all of the players.\n\t\t * @return {Tone.Players} this\n\t\t */\n\t Tone.Players.prototype.stopAll = function (time) {\n\t this._forEach(function (player) {\n\t player.stop(time);\n\t });\n\t };\n\t /**\n\t\t * Dispose and disconnect.\n\t\t * @return {Tone.Players} this\n\t\t */\n\t Tone.Players.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._volume.dispose();\n\t this._volume = null;\n\t this._writable('volume');\n\t this.volume = null;\n\t this.output = null;\n\t this._forEach(function (player) {\n\t player.dispose();\n\t });\n\t this._players = null;\n\t return this;\n\t };\n\t return Tone.Players;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Uses [Tone.TickSignal](TickSignal) to track elapsed ticks with\n\t\t * \t\tcomplex automation curves.\n\t\t *\n\t\t * \t@constructor\n\t * @param {Frequency} frequency The initial frequency that the signal ticks at\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.TickSource = function () {\n\t var options = Tone.defaults(arguments, ['frequency'], Tone.TickSource);\n\t /**\n\t\t\t * The frequency the callback function should be invoked.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.TickSignal(options.frequency, Tone.Type.Frequency);\n\t this._readOnly('frequency');\n\t /**\n\t\t\t * The state timeline\n\t\t\t * @type {Tone.TimelineState}\n\t\t\t * @private\n\t\t\t */\n\t this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t /**\n\t\t\t * The offset values of the ticks\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t this._tickOffset = new Tone.Timeline();\n\t //add the first event\n\t this._tickOffset.add({\n\t 'time': 0,\n\t 'ticks': -1\n\t });\n\t };\n\t Tone.extend(Tone.TickSource);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.TickSource.defaults = { 'frequency': 1 };\n\t /**\n\t\t * Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.TickSource#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.TickSource.prototype, 'state', {\n\t get: function () {\n\t return this._state.getValueAtTime(this.now());\n\t }\n\t });\n\t /**\n\t\t * Start the clock at the given time. Optionally pass in an offset\n\t\t * of where to start the tick counter from.\n\t\t * @param {Time=} time The time the clock should start\n\t\t * @param {Ticks=} offset Where the tick counter starts counting from.\n\t\t * @return {Tone.TickSource} this\n\t\t */\n\t Tone.TickSource.prototype.start = function (time, offset) {\n\t time = this.toSeconds(time);\n\t if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t var ticksAtTime = this.getTicksAtTime(time);\n\t if (ticksAtTime === -1) {\n\t ticksAtTime = 0;\n\t }\n\t offset = Tone.defaultArg(offset, ticksAtTime);\n\t this._state.setStateAtTime(Tone.State.Started, time);\n\t this._state.get(time).offset = offset;\n\t this.setTicksAtTime(offset, time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop the clock. Stopping the clock resets the tick counter to 0.\n\t\t * @param {Time} [time=now] The time when the clock should stop.\n\t\t * @returns {Tone.TickSource} this\n\t\t * @example\n\t\t * clock.stop();\n\t\t */\n\t Tone.TickSource.prototype.stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._state.cancel(time);\n\t this._state.setStateAtTime(Tone.State.Stopped, time);\n\t this.setTicksAtTime(-1, time);\n\t return this;\n\t };\n\t /**\n\t\t * Pause the clock. Pausing does not reset the tick counter.\n\t\t * @param {Time} [time=now] The time when the clock should stop.\n\t\t * @returns {Tone.TickSource} this\n\t\t */\n\t Tone.TickSource.prototype.pause = function (time) {\n\t time = this.toSeconds(time);\n\t if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t var pausedTicks = this.getTicksAtTime(time);\n\t this.setTicksAtTime(pausedTicks, time);\n\t this._state.setStateAtTime(Tone.State.Paused, time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * The number of times the callback was invoked. Starts counting at 0\n\t\t * and increments after the callback was invoked. Returns -1 when stopped.\n\t\t * @memberOf Tone.TickSource#\n\t\t * @name ticks\n\t\t * @type {Ticks}\n\t\t */\n\t Object.defineProperty(Tone.TickSource.prototype, 'ticks', {\n\t get: function () {\n\t return this.getTicksAtTime(this.now());\n\t },\n\t set: function (t) {\n\t this.setTicksAtTime(t, this.now());\n\t }\n\t });\n\t /**\n\t\t * The time since ticks=0 that the TickSource has been running. Accounts\n\t\t * for tempo curves\n\t\t * @memberOf Tone.TickSource#\n\t\t * @name seconds\n\t\t * @type {Seconds}\n\t\t */\n\t Object.defineProperty(Tone.TickSource.prototype, 'seconds', {\n\t get: function () {\n\t var time = this.now();\n\t var ticks = this.getTicksAtTime(time);\n\t var totalTicks = this.frequency.getTicksAtTime(time);\n\t if (totalTicks - ticks > 0) {\n\t var tickTime = this.frequency.getTimeOfTick(totalTicks - ticks);\n\t return this.frequency.ticksToTime(ticks, tickTime).toSeconds();\n\t } else {\n\t return this.frequency.ticksToTime(ticks, time).toSeconds();\n\t }\n\t },\n\t set: function (s) {\n\t var now = this.now();\n\t var ticks = this.frequency.timeToTicks(s, now - s);\n\t this.setTicksAtTime(ticks, now);\n\t }\n\t });\n\t /**\n\t\t * Get the elapsed ticks at the given time\n\t\t * @param {Time} time When to get the ticks\n\t\t * @return {Ticks} The elapsed ticks at the given time.\n\t\t */\n\t Tone.TickSource.prototype.getTicksAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t var tickEvent = this._tickOffset.get(time);\n\t var offset = tickEvent.ticks;\n\t var elapsedTicks = this.frequency.getTicksAtTime(time) - tickEvent.position;\n\t if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t return offset;\n\t } else {\n\t return elapsedTicks + offset;\n\t }\n\t };\n\t /**\n\t\t * Set the clock's ticks at the given time.\n\t\t * @param {Ticks} ticks The tick value to set\n\t\t * @param {Time} time When to set the tick value\n\t\t * @return {Tone.TickSource} this\n\t\t */\n\t Tone.TickSource.prototype.setTicksAtTime = function (ticks, time) {\n\t time = this.toSeconds(time);\n\t this._tickOffset.cancel(time);\n\t this._tickOffset.add({\n\t 'time': time,\n\t 'ticks': ticks,\n\t 'position': this.frequency.getTicksAtTime(time)\n\t });\n\t return this;\n\t };\n\t /**\n\t\t * Returns the scheduled state at the given time.\n\t\t * @param {Time} time The time to query.\n\t\t * @return {String} The name of the state input in setStateAtTime.\n\t\t * @example\n\t\t * source.start(\"+0.1\");\n\t\t * source.getStateAtTime(\"+0.1\"); //returns \"started\"\n\t\t */\n\t Tone.TickSource.prototype.getStateAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t return this._state.getValueAtTime(time);\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @returns {Tone.TickSource} this\n\t\t */\n\t Tone.TickSource.prototype.dispose = function () {\n\t Tone.Param.prototype.dispose.call(this);\n\t this._state.dispose();\n\t this._state = null;\n\t this._tickOffset.dispose();\n\t this._tickOffset = null;\n\t this._writable('frequency');\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t return this;\n\t };\n\t return Tone.TickSource;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.UserMedia uses MediaDevices.getUserMedia to open up\n\t\t * and external microphone or audio input. Check\n\t\t * [MediaDevices API Support](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia)\n\t\t * to see which browsers are supported. Access to an external input\n\t\t * is limited to secure (HTTPS) connections.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Decibels=} volume The level of the input\n\t\t * @example\n\t\t * //list the inputs and open the third one\n\t\t * var motu = new Tone.UserMedia();\n\t\t *\n\t\t * //opening the input asks the user to activate their mic\n\t\t * motu.open().then(function(){\n\t\t * \t//opening is activates the microphone\n\t\t * \t//starting lets audio through\n\t\t * \tmotu.start(10);\n\t\t * });\n\t\t */\n\t Tone.UserMedia = function () {\n\t var options = Tone.defaults(arguments, ['volume'], Tone.UserMedia);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The MediaStreamNode\n\t\t\t * @type {MediaStreamAudioSourceNode}\n\t\t\t * @private\n\t\t\t */\n\t this._mediaStream = null;\n\t /**\n\t\t\t * The media stream created by getUserMedia.\n\t\t\t * @type {LocalMediaStream}\n\t\t\t * @private\n\t\t\t */\n\t this._stream = null;\n\t /**\n\t\t\t * The open device\n\t\t\t * @type {MediaDeviceInfo}\n\t\t\t * @private\n\t\t\t */\n\t this._device = null;\n\t /**\n\t\t\t * The output volume node\n\t\t\t * @type {Tone.Volume}\n\t\t\t * @private\n\t\t\t */\n\t this._volume = this.output = new Tone.Volume(options.volume);\n\t /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * input.volume.value = -6;\n\t\t\t */\n\t this.volume = this._volume.volume;\n\t this._readOnly('volume');\n\t this.mute = options.mute;\n\t };\n\t Tone.extend(Tone.UserMedia, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t * @type {Object}\n\t\t */\n\t Tone.UserMedia.defaults = {\n\t 'volume': 0,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Open the media stream. If a string is passed in, it is assumed\n\t\t * to be the label or id of the stream, if a number is passed in,\n\t\t * it is the input number of the stream.\n\t\t * @param {String|Number} [labelOrId=\"default\"] The label or id of the audio input media device.\n\t\t * With no argument, the default stream is opened.\n\t\t * @return {Promise} The promise is resolved when the stream is open.\n\t\t */\n\t Tone.UserMedia.prototype.open = function (labelOrId) {\n\t return Tone.UserMedia.enumerateDevices().then(function (devices) {\n\t var device;\n\t if (Tone.isNumber(labelOrId)) {\n\t device = devices[labelOrId];\n\t } else {\n\t device = devices.find(function (device) {\n\t return device.label === labelOrId || device.deviceId === labelOrId;\n\t });\n\t //didn't find a matching device\n\t if (!device && devices.length > 0) {\n\t device = devices[0];\n\t } else if (!device && !Tone.isUndef(labelOrId)) {\n\t throw new Error('Tone.UserMedia: no matching device: ' + labelOrId);\n\t }\n\t }\n\t this._device = device;\n\t //do getUserMedia\n\t var constraints = {\n\t audio: {\n\t 'echoCancellation': false,\n\t 'sampleRate': this.context.sampleRate\n\t }\n\t };\n\t if (device) {\n\t constraints.audio.deviceId = device.deviceId;\n\t }\n\t return navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n\t //start a new source only if the previous one is closed\n\t if (!this._stream) {\n\t this._stream = stream;\n\t //Wrap a MediaStreamSourceNode around the live input stream.\n\t this._mediaStream = this.context.createMediaStreamSource(stream);\n\t //Connect the MediaStreamSourceNode to a gate gain node\n\t this._mediaStream.connect(this.output);\n\t }\n\t return this;\n\t }.bind(this));\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Close the media stream\n\t\t * @return {Tone.UserMedia} this\n\t\t */\n\t Tone.UserMedia.prototype.close = function () {\n\t if (this._stream) {\n\t this._stream.getAudioTracks().forEach(function (track) {\n\t track.stop();\n\t });\n\t this._stream = null;\n\t //remove the old media stream\n\t this._mediaStream.disconnect();\n\t this._mediaStream = null;\n\t }\n\t this._device = null;\n\t return this;\n\t };\n\t /**\n\t\t * Returns a promise which resolves with the list of audio input devices available.\n\t\t * @return {Promise} The promise that is resolved with the devices\n\t\t * @static\n\t\t * @example\n\t\t * Tone.UserMedia.enumerateDevices().then(function(devices){\n\t\t * \tconsole.log(devices)\n\t\t * })\n\t\t */\n\t Tone.UserMedia.enumerateDevices = function () {\n\t return navigator.mediaDevices.enumerateDevices().then(function (devices) {\n\t return devices.filter(function (device) {\n\t return device.kind === 'audioinput';\n\t });\n\t });\n\t };\n\t /**\n\t\t * Returns the playback state of the source, \"started\" when the microphone is open\n\t\t * and \"stopped\" when the mic is closed.\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.UserMedia.prototype, 'state', {\n\t get: function () {\n\t return this._stream && this._stream.active ? Tone.State.Started : Tone.State.Stopped;\n\t }\n\t });\n\t /**\n\t\t * \tReturns an identifier for the represented device that is\n\t\t * \tpersisted across sessions. It is un-guessable by other applications and\n\t\t * \tunique to the origin of the calling application. It is reset when the\n\t\t * \tuser clears cookies (for Private Browsing, a different identifier is\n\t\t * \tused that is not persisted across sessions). Returns undefined when the\n\t\t * \tdevice is not open.\n\t\t * @type {String}\n\t\t * @readOnly\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @name deviceId\n\t\t */\n\t Object.defineProperty(Tone.UserMedia.prototype, 'deviceId', {\n\t get: function () {\n\t if (this._device) {\n\t return this._device.deviceId;\n\t }\n\t }\n\t });\n\t /**\n\t\t * \tReturns a group identifier. Two devices have the\n\t\t * \tsame group identifier if they belong to the same physical device.\n\t\t * \tReturns undefined when the device is not open.\n\t\t * @type {String}\n\t\t * @readOnly\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @name groupId\n\t\t */\n\t Object.defineProperty(Tone.UserMedia.prototype, 'groupId', {\n\t get: function () {\n\t if (this._device) {\n\t return this._device.groupId;\n\t }\n\t }\n\t });\n\t /**\n\t\t * \tReturns a label describing this device (for example \"Built-in Microphone\").\n\t\t * \tReturns undefined when the device is not open or label is not available\n\t\t * \tbecause of permissions.\n\t\t * @type {String}\n\t\t * @readOnly\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @name groupId\n\t\t */\n\t Object.defineProperty(Tone.UserMedia.prototype, 'label', {\n\t get: function () {\n\t if (this._device) {\n\t return this._device.label;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * userMedia.mute = true;\n\t\t */\n\t Object.defineProperty(Tone.UserMedia.prototype, 'mute', {\n\t get: function () {\n\t return this._volume.mute;\n\t },\n\t set: function (mute) {\n\t this._volume.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.UserMedia} this\n\t\t */\n\t Tone.UserMedia.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.close();\n\t this._writable('volume');\n\t this._volume.dispose();\n\t this._volume = null;\n\t this.volume = null;\n\t return this;\n\t };\n\t /**\n\t\t * If getUserMedia is supported by the browser.\n\t\t * @type {Boolean}\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @name supported\n\t\t * @static\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.UserMedia, 'supported', {\n\t get: function () {\n\t return !Tone.isUndef(navigator.mediaDevices) && Tone.isFunction(navigator.mediaDevices.getUserMedia);\n\t }\n\t });\n\t return Tone.UserMedia;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Midi is a primitive type for encoding Time values.\n\t\t * Tone.Midi can be constructed with or without the `new` keyword. Tone.Midi can be passed\n\t\t * into the parameter of any method which takes time as an argument.\n\t\t * @constructor\n\t\t * @extends {Tone.Frequency}\n\t\t * @param {String|Number} val The time value.\n\t\t * @param {String=} units The units of the value.\n\t\t * @example\n\t\t * var t = Tone.Midi(\"4n\");//a quarter note\n\t\t */\n\t Tone.Midi = function (val, units) {\n\t if (this instanceof Tone.Midi) {\n\t Tone.Frequency.call(this, val, units);\n\t } else {\n\t return new Tone.Midi(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.Midi, Tone.Frequency);\n\t /**\n\t\t * The default units if none are given.\n\t\t * @type {String}\n\t\t * @private\n\t\t */\n\t Tone.Midi.prototype._defaultUnits = 'midi';\n\t /**\n\t\t * Returns the value of a frequency in the current units\n\t\t * @param {Frequency} freq\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Midi.prototype._frequencyToUnits = function (freq) {\n\t return Tone.Frequency.ftom(Tone.Frequency.prototype._frequencyToUnits.call(this, freq));\n\t };\n\t /**\n\t\t * Returns the value of a tick in the current time units\n\t\t * @param {Ticks} ticks\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Midi.prototype._ticksToUnits = function (ticks) {\n\t return Tone.Frequency.ftom(Tone.Frequency.prototype._ticksToUnits.call(this, ticks));\n\t };\n\t /**\n\t\t * Return the value of the beats in the current units\n\t\t * @param {Number} beats\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Midi.prototype._beatsToUnits = function (beats) {\n\t return Tone.Frequency.ftom(Tone.Frequency.prototype._beatsToUnits.call(this, beats));\n\t };\n\t /**\n\t\t * Returns the value of a second in the current units\n\t\t * @param {Seconds} seconds\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Midi.prototype._secondsToUnits = function (seconds) {\n\t return Tone.Frequency.ftom(Tone.Frequency.prototype._secondsToUnits.call(this, seconds));\n\t };\n\t /**\n\t\t * Return the value of the frequency as a MIDI note\n\t\t * @return {MIDI}\n\t\t * @example\n\t\t * Tone.Midi(60).toMidi(); //60\n\t\t */\n\t Tone.Midi.prototype.toMidi = function () {\n\t return this.valueOf();\n\t };\n\t /**\n\t\t * Return the value of the frequency as a MIDI note\n\t\t * @return {MIDI}\n\t\t * @example\n\t\t * Tone.Midi(60).toMidi(); //60\n\t\t */\n\t Tone.Midi.prototype.toFrequency = function () {\n\t return Tone.Frequency.mtof(this.toMidi());\n\t };\n\t /**\n\t\t * Transposes the frequency by the given number of semitones.\n\t\t * @param {Interval} interval\n\t\t * @return {Tone.Frequency} A new transposed frequency\n\t\t * @example\n\t\t * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n\t\t */\n\t Tone.Midi.prototype.transpose = function (interval) {\n\t return new this.constructor(this.toMidi() + interval);\n\t };\n\t return Tone.Midi;\n\t});\n\t\n\treturn Tone;\n}));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/tone/build/Tone.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nmodule.exports = {\n /**\n * True if this is running in Nodejs, will be undefined in a browser.\n * In a browser, browserify won't include this file and the whole module\n * will be resolved an empty object.\n */\n isNode : typeof Buffer !== \"undefined\",\n /**\n * Create a new nodejs Buffer from an existing content.\n * @param {Object} data the data to pass to the constructor.\n * @param {String} encoding the encoding to use.\n * @return {Buffer} a new Buffer.\n */\n newBufferFrom: function(data, encoding) {\n // XXX We can't use `Buffer.from` which comes from `Uint8Array.from`\n // in nodejs v4 (< v.4.5). It's not the expected implementation (and\n // has a different signature).\n // see https://github.com/nodejs/node/issues/8053\n // A condition on nodejs' version won't solve the issue as we don't\n // control the Buffer polyfills that may or may not be used.\n return new Buffer(data, encoding);\n },\n /**\n * Create a new nodejs Buffer with the specified size.\n * @param {Integer} size the size of the buffer.\n * @return {Buffer} a new Buffer.\n */\n allocBuffer: function (size) {\n if (Buffer.alloc) {\n return Buffer.alloc(size);\n } else {\n return new Buffer(size);\n }\n },\n /**\n * Find out if an object is a Buffer.\n * @param {Object} b the object to test.\n * @return {Boolean} true if the object is a Buffer, false otherwise.\n */\n isBuffer : function(b){\n return Buffer.isBuffer(b);\n },\n\n isStream : function (obj) {\n return obj &&\n typeof obj.on === \"function\" &&\n typeof obj.pause === \"function\" &&\n typeof obj.resume === \"function\";\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/nodejsUtils.js\n// module id = 12\n// module chunks = 0","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_global.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nif (!process.version ||\n process.version.indexOf('v0.') === 0 ||\n process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = { nextTick: nextTick };\n} else {\n module.exports = process\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process-nextick-args/index.js\n// module id = 14\n// module chunks = 0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 15\n// module chunks = 0","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/safe-buffer/index.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.requestAudioContext = exports.browser = exports.gaussian = exports.shuffle = exports.randsign = exports.randrange = exports.randint = exports.quantize = exports.xor = exports.dist = exports.angle = exports.lerp = exports.mod = exports.choice = exports.clamp = undefined;\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _startAudioContext = require('./startAudioContext');\n\nvar _startAudioContext2 = _interopRequireDefault(_startAudioContext);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar isIphone = navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i);\nvar isIpad = navigator.userAgent.match(/iPad/i);\nvar isAndroid = navigator.userAgent.match(/Android/i);\nvar isMobile = isIphone || isIpad || isAndroid;\nvar isDesktop = !isMobile;\n\ndocument.body.classList.add(isMobile ? 'mobile' : 'desktop');\n\nvar browser = { isIphone: isIphone, isIpad: isIpad, isAndroid: isAndroid, isMobile: isMobile, isDesktop: isDesktop };\n\nfunction clamp(n, a, b) {\n return n < a ? a : n < b ? n : b;\n}\nfunction choice(a) {\n return a[Math.floor(Math.random() * a.length)];\n}\nfunction mod(n, m) {\n return n - m * Math.floor(n / m);\n}\nfunction randint(n) {\n return Math.random() * n | 0;\n}\nfunction randrange(a, b) {\n return a + Math.random() * (b - a);\n}\nfunction randsign() {\n return Math.random() >= 0.5 ? -1 : 1;\n}\nfunction lerp(n, a, b) {\n return (b - a) * n + a;\n}\nfunction angle(x0, y0, x1, y1) {\n return Math.atan2(y1 - y0, x1 - x0);\n}\nfunction dist(x0, y0, x1, y1) {\n return Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));\n}\nfunction xor(a, b) {\n a = !!a;b = !!b;return (a || b) && !(a && b);\n}\nfunction quantize(a, b) {\n return Math.floor(a / b) * b;\n}\nfunction shuffle(a) {\n for (var i = a.length; i > 0; i--) {\n var r = randint(i);\n var swap = a[i - 1];\n a[i - 1] = a[r];\n a[r] = swap;\n }\n return a;\n}\n// returns a gaussian random function with the given mean and stdev.\nfunction gaussian(mean, stdev) {\n var y2 = void 0;\n var use_last = false;\n return function () {\n var y1 = void 0;\n if (use_last) {\n y1 = y2;\n use_last = false;\n } else {\n var x1 = void 0,\n x2 = void 0,\n w = void 0;\n do {\n x1 = 2.0 * Math.random() - 1.0;\n x2 = 2.0 * Math.random() - 1.0;\n w = x1 * x1 + x2 * x2;\n } while (w >= 1.0);\n w = Math.sqrt(-2.0 * Math.log(w) / w);\n y1 = x1 * w;\n y2 = x2 * w;\n use_last = true;\n }\n\n var retval = mean + stdev * y1;\n if (retval > 0) return retval;\n return -retval;\n };\n}\n\nfunction requestAudioContext(fn) {\n if (isMobile) {\n var container = document.createElement('div');\n var button = document.createElement('div');\n button.innerHTML = 'Tap to start - please unmute your phone';\n Object.assign(container.style, {\n display: 'block',\n position: 'absolute',\n width: '100%',\n height: '100%',\n zIndex: '10000',\n top: '0px',\n left: '0px',\n backgroundColor: 'rgba(0, 0, 0, 0.8)'\n });\n Object.assign(button.style, {\n display: 'block',\n position: 'absolute',\n left: '50%',\n top: '50%',\n padding: '20px',\n backgroundColor: '#7F33ED',\n color: 'white',\n fontFamily: 'monospace',\n borderRadius: '3px',\n transform: 'translate3D(-50%,-50%,0)',\n textAlign: 'center',\n lineHeight: '1.5',\n width: '150px'\n });\n container.appendChild(button);\n document.body.appendChild(container);\n _startAudioContext2.default.setContext(_tone2.default.context);\n _startAudioContext2.default.on(button);\n _startAudioContext2.default.onStarted(function (_) {\n container.remove();\n fn();\n });\n } else {\n fn();\n }\n}\n\nexports.clamp = clamp;\nexports.choice = choice;\nexports.mod = mod;\nexports.lerp = lerp;\nexports.angle = angle;\nexports.dist = dist;\nexports.xor = xor;\nexports.quantize = quantize;\nexports.randint = randint;\nexports.randrange = randrange;\nexports.randsign = randsign;\nexports.shuffle = shuffle;\nexports.gaussian = gaussian;\nexports.browser = browser;\nexports.requestAudioContext = requestAudioContext;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/util.js\n// module id = 17\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/events/events.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar external = require(\"./external\");\nvar DataWorker = require('./stream/DataWorker');\nvar DataLengthProbe = require('./stream/DataLengthProbe');\nvar Crc32Probe = require('./stream/Crc32Probe');\nvar DataLengthProbe = require('./stream/DataLengthProbe');\n\n/**\n * Represent a compressed object, with everything needed to decompress it.\n * @constructor\n * @param {number} compressedSize the size of the data compressed.\n * @param {number} uncompressedSize the size of the data after decompression.\n * @param {number} crc32 the crc32 of the decompressed file.\n * @param {object} compression the type of compression, see lib/compressions.js.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data.\n */\nfunction CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) {\n this.compressedSize = compressedSize;\n this.uncompressedSize = uncompressedSize;\n this.crc32 = crc32;\n this.compression = compression;\n this.compressedContent = data;\n}\n\nCompressedObject.prototype = {\n /**\n * Create a worker to get the uncompressed content.\n * @return {GenericWorker} the worker.\n */\n getContentWorker : function () {\n var worker = new DataWorker(external.Promise.resolve(this.compressedContent))\n .pipe(this.compression.uncompressWorker())\n .pipe(new DataLengthProbe(\"data_length\"));\n\n var that = this;\n worker.on(\"end\", function () {\n if(this.streamInfo['data_length'] !== that.uncompressedSize) {\n throw new Error(\"Bug : uncompressed data size mismatch\");\n }\n });\n return worker;\n },\n /**\n * Create a worker to get the compressed content.\n * @return {GenericWorker} the worker.\n */\n getCompressedWorker : function () {\n return new DataWorker(external.Promise.resolve(this.compressedContent))\n .withStreamInfo(\"compressedSize\", this.compressedSize)\n .withStreamInfo(\"uncompressedSize\", this.uncompressedSize)\n .withStreamInfo(\"crc32\", this.crc32)\n .withStreamInfo(\"compression\", this.compression)\n ;\n }\n};\n\n/**\n * Chain the given worker with other workers to compress the content with the\n * given compresion.\n * @param {GenericWorker} uncompressedWorker the worker to pipe.\n * @param {Object} compression the compression object.\n * @param {Object} compressionOptions the options to use when compressing.\n * @return {GenericWorker} the new worker compressing the content.\n */\nCompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) {\n return uncompressedWorker\n .pipe(new Crc32Probe())\n .pipe(new DataLengthProbe(\"uncompressedSize\"))\n .pipe(compression.compressWorker(compressionOptions))\n .pipe(new DataLengthProbe(\"compressedSize\"))\n .withStreamInfo(\"compression\", compression);\n};\n\nmodule.exports = CompressedObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/compressedObject.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * The following functions come from pako, from pako/lib/zlib/crc32.js\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for(var n =0; n < 256; n++){\n c = n;\n for(var k =0; k < 8; k++){\n c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable, end = pos + len;\n\n crc = crc ^ (-1);\n\n for (var i = pos; i < end; i++ ) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n// That's all for the pako functions.\n\n/**\n * Compute the crc32 of a string.\n * This is almost the same as the function crc32, but for strings. Using the\n * same function for the two use cases leads to horrible performances.\n * @param {Number} crc the starting value of the crc.\n * @param {String} str the string to use.\n * @param {Number} len the length of the string.\n * @param {Number} pos the starting position for the crc32 computation.\n * @return {Number} the computed crc32.\n */\nfunction crc32str(crc, str, len, pos) {\n var t = crcTable, end = pos + len;\n\n crc = crc ^ (-1);\n\n for (var i = pos; i < end; i++ ) {\n crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\nmodule.exports = function crc32wrapper(input, crc) {\n if (typeof input === \"undefined\" || !input.length) {\n return 0;\n }\n\n var isArray = utils.getTypeOf(input) !== \"string\";\n\n if(isArray) {\n return crc32(crc|0, input, input.length, 0);\n } else {\n return crc32str(crc|0, input, input.length, 0);\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/crc32.js\n// module id = 20\n// module chunks = 0","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_descriptors.js\n// module id = 21\n// module chunks = 0","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_is-object.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/messages.js\n// module id = 23\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\n/*<replacement>*/\n\nvar processNextTick = require('process-nextick-args').nextTick;\n/*</replacement>*/\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function (object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function (object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n processNextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n processNextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n processNextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /*<replacement>*/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /*</replacement>*/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n stream.emit('error', err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n processNextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) processNextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = corkReq;\n } else {\n state.corkedRequestsFree = corkReq;\n }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function () {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_writable.js\n// module id = 24\n// module chunks = 0","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/readable-browser.js\n// module id = 25\n// module chunks = 0","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n\nmouse.register({\n down: (x, y) => {\n },\n move: (x, y, dx, dy) => {\n },\n up: (x, y) => {\n },\n})\n\n*/\n\nvar fns = {\n down: [],\n move: [],\n drag: [],\n up: []\n};\n\ndocument.body.scrollTo(0, 0);\ndocument.body.parentNode.scrollTo(0, 0);\ndocument.body.addEventListener(\"scroll\", function (e) {\n e.preventDefault();\n});\ndocument.body.parentNode.addEventListener(\"scroll\", function (e) {\n e.preventDefault();\n});\n\nexports.default = {\n register: function register(callbacks) {\n callbacks.down && fns.down.push(callbacks.down);\n callbacks.move && fns.move.push(callbacks.move);\n callbacks.drag && fns.drag.push(callbacks.drag);\n callbacks.up && fns.up.push(callbacks.up);\n }\n};\n\n\nvar x = void 0,\n y = void 0,\n dragging = false;\n\nfunction down(e) {\n x = e.pageX;\n y = e.pageY;\n x /= window.innerWidth;\n y /= window.innerHeight;\n dragging = true;\n fns.down.map(function (f) {\n return f(x, y);\n });\n}\nfunction move(e) {\n var dx = e.pageX - x;\n var dy = e.pageY - y;\n x = e.pageX;\n y = e.pageY;\n x /= window.innerWidth;\n y /= window.innerHeight;\n fns.move.map(function (f) {\n return f(x, y, dx, dy);\n });\n dragging && fns.drag.map(function (f) {\n return f(x, y, dx, dy);\n });\n}\nfunction up(e) {\n dragging = false;\n fns.up.map(function (f) {\n return f(x, y);\n });\n}\n\nfunction touch(f) {\n return function (e) {\n e.preventDefault();\n f(e.touches[0]);\n };\n}\ndocument.body.addEventListener(\"mousedown\", down);\ndocument.body.addEventListener(\"mousemove\", move);\nwindow.addEventListener(\"mouseup\", up);\ndocument.body.addEventListener(\"touchstart\", touch(down));\ndocument.body.addEventListener(\"touchmove\", touch(move));\ndocument.body.addEventListener(\"touchup\", touch(up));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/mouse.js\n// module id = 26\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/isarray/index.js\n// module id = 27\n// module chunks = 0","'use strict';\nvar utils = require('./utils');\nvar support = require('./support');\n// private property\nvar _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n\n// public method for encoding\nexports.encode = function(input) {\n var output = [];\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n var i = 0, len = input.length, remainingBytes = len;\n\n var isArray = utils.getTypeOf(input) !== \"string\";\n while (i < input.length) {\n remainingBytes = len - i;\n\n if (!isArray) {\n chr1 = input.charCodeAt(i++);\n chr2 = i < len ? input.charCodeAt(i++) : 0;\n chr3 = i < len ? input.charCodeAt(i++) : 0;\n } else {\n chr1 = input[i++];\n chr2 = i < len ? input[i++] : 0;\n chr3 = i < len ? input[i++] : 0;\n }\n\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;\n enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;\n\n output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));\n\n }\n\n return output.join(\"\");\n};\n\n// public method for decoding\nexports.decode = function(input) {\n var chr1, chr2, chr3;\n var enc1, enc2, enc3, enc4;\n var i = 0, resultIndex = 0;\n\n var dataUrlPrefix = \"data:\";\n\n if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {\n // This is a common error: people give a data url\n // (data:image/png;base64,iVBOR...) with a {base64: true} and\n // wonders why things don't work.\n // We can detect that the string input looks like a data url but we\n // *can't* be sure it is one: removing everything up to the comma would\n // be too dangerous.\n throw new Error(\"Invalid base64 input, it looks like a data url.\");\n }\n\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n var totalLength = input.length * 3 / 4;\n if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {\n totalLength--;\n }\n if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {\n totalLength--;\n }\n if (totalLength % 1 !== 0) {\n // totalLength is not an integer, the length does not match a valid\n // base64 content. That can happen if:\n // - the input is not a base64 content\n // - the input is *almost* a base64 content, with a extra chars at the\n // beginning or at the end\n // - the input uses a base64 variant (base64url for example)\n throw new Error(\"Invalid base64 input, bad content length.\");\n }\n var output;\n if (support.uint8array) {\n output = new Uint8Array(totalLength|0);\n } else {\n output = new Array(totalLength|0);\n }\n\n while (i < input.length) {\n\n enc1 = _keyStr.indexOf(input.charAt(i++));\n enc2 = _keyStr.indexOf(input.charAt(i++));\n enc3 = _keyStr.indexOf(input.charAt(i++));\n enc4 = _keyStr.indexOf(input.charAt(i++));\n\n chr1 = (enc1 << 2) | (enc2 >> 4);\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n chr3 = ((enc3 & 3) << 6) | enc4;\n\n output[resultIndex++] = chr1;\n\n if (enc3 !== 64) {\n output[resultIndex++] = chr2;\n }\n if (enc4 !== 64) {\n output[resultIndex++] = chr3;\n }\n\n }\n\n return output;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/base64.js\n// module id = 28\n// module chunks = 0","'use strict';\n\nvar GenericWorker = require(\"./stream/GenericWorker\");\n\nexports.STORE = {\n magic: \"\\x00\\x00\",\n compressWorker : function (compressionOptions) {\n return new GenericWorker(\"STORE compression\");\n },\n uncompressWorker : function () {\n return new GenericWorker(\"STORE decompression\");\n }\n};\nexports.DEFLATE = require('./flate');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/compressions.js\n// module id = 29\n// module chunks = 0","'use strict';\nexports.base64 = false;\nexports.binary = false;\nexports.dir = false;\nexports.createFolders = true;\nexports.date = null;\nexports.compression = null;\nexports.compressionOptions = null;\nexports.comment = null;\nexports.unixPermissions = null;\nexports.dosPermissions = null;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/defaults.js\n// module id = 30\n// module chunks = 0","/*\n * This file is used by module bundlers (browserify/webpack/etc) when\n * including a stream implementation. We use \"readable-stream\" to get a\n * consistent behavior between nodejs versions but bundlers often have a shim\n * for \"stream\". Using this shim greatly improve the compatibility and greatly\n * reduce the final size of the bundle (only one stream implementation, not\n * two).\n */\nmodule.exports = require(\"stream\");\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/readable-stream-browser.js\n// module id = 31\n// module chunks = 0","'use strict';\nvar DataReader = require('./DataReader');\nvar utils = require('../utils');\n\nfunction ArrayReader(data) {\n DataReader.call(this, data);\n\tfor(var i = 0; i < this.data.length; i++) {\n\t\tdata[i] = data[i] & 0xFF;\n\t}\n}\nutils.inherits(ArrayReader, DataReader);\n/**\n * @see DataReader.byteAt\n */\nArrayReader.prototype.byteAt = function(i) {\n return this.data[this.zero + i];\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nArrayReader.prototype.lastIndexOfSignature = function(sig) {\n var sig0 = sig.charCodeAt(0),\n sig1 = sig.charCodeAt(1),\n sig2 = sig.charCodeAt(2),\n sig3 = sig.charCodeAt(3);\n for (var i = this.length - 4; i >= 0; --i) {\n if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {\n return i - this.zero;\n }\n }\n\n return -1;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nArrayReader.prototype.readAndCheckSignature = function (sig) {\n var sig0 = sig.charCodeAt(0),\n sig1 = sig.charCodeAt(1),\n sig2 = sig.charCodeAt(2),\n sig3 = sig.charCodeAt(3),\n data = this.readData(4);\n return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3];\n};\n/**\n * @see DataReader.readData\n */\nArrayReader.prototype.readData = function(size) {\n this.checkOffset(size);\n if(size === 0) {\n return [];\n }\n var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = ArrayReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/ArrayReader.js\n// module id = 32\n// module chunks = 0","'use strict';\nvar utils = require('../utils');\n\nfunction DataReader(data) {\n this.data = data; // type : see implementation\n this.length = data.length;\n this.index = 0;\n this.zero = 0;\n}\nDataReader.prototype = {\n /**\n * Check that the offset will not go too far.\n * @param {string} offset the additional offset to check.\n * @throws {Error} an Error if the offset is out of bounds.\n */\n checkOffset: function(offset) {\n this.checkIndex(this.index + offset);\n },\n /**\n * Check that the specified index will not be too far.\n * @param {string} newIndex the index to check.\n * @throws {Error} an Error if the index is out of bounds.\n */\n checkIndex: function(newIndex) {\n if (this.length < this.zero + newIndex || newIndex < 0) {\n throw new Error(\"End of data reached (data length = \" + this.length + \", asked index = \" + (newIndex) + \"). Corrupted zip ?\");\n }\n },\n /**\n * Change the index.\n * @param {number} newIndex The new index.\n * @throws {Error} if the new index is out of the data.\n */\n setIndex: function(newIndex) {\n this.checkIndex(newIndex);\n this.index = newIndex;\n },\n /**\n * Skip the next n bytes.\n * @param {number} n the number of bytes to skip.\n * @throws {Error} if the new index is out of the data.\n */\n skip: function(n) {\n this.setIndex(this.index + n);\n },\n /**\n * Get the byte at the specified index.\n * @param {number} i the index to use.\n * @return {number} a byte.\n */\n byteAt: function(i) {\n // see implementations\n },\n /**\n * Get the next number with a given byte size.\n * @param {number} size the number of bytes to read.\n * @return {number} the corresponding number.\n */\n readInt: function(size) {\n var result = 0,\n i;\n this.checkOffset(size);\n for (i = this.index + size - 1; i >= this.index; i--) {\n result = (result << 8) + this.byteAt(i);\n }\n this.index += size;\n return result;\n },\n /**\n * Get the next string with a given byte size.\n * @param {number} size the number of bytes to read.\n * @return {string} the corresponding string.\n */\n readString: function(size) {\n return utils.transformTo(\"string\", this.readData(size));\n },\n /**\n * Get raw data without conversion, <size> bytes.\n * @param {number} size the number of bytes to read.\n * @return {Object} the raw data, implementation specific.\n */\n readData: function(size) {\n // see implementations\n },\n /**\n * Find the last occurence of a zip signature (4 bytes).\n * @param {string} sig the signature to find.\n * @return {number} the index of the last occurence, -1 if not found.\n */\n lastIndexOfSignature: function(sig) {\n // see implementations\n },\n /**\n * Read the signature (4 bytes) at the current position and compare it with sig.\n * @param {string} sig the expected signature\n * @return {boolean} true if the signature matches, false otherwise.\n */\n readAndCheckSignature: function(sig) {\n // see implementations\n },\n /**\n * Get the next date.\n * @return {Date} the date.\n */\n readDate: function() {\n var dostime = this.readInt(4);\n return new Date(Date.UTC(\n ((dostime >> 25) & 0x7f) + 1980, // year\n ((dostime >> 21) & 0x0f) - 1, // month\n (dostime >> 16) & 0x1f, // day\n (dostime >> 11) & 0x1f, // hour\n (dostime >> 5) & 0x3f, // minute\n (dostime & 0x1f) << 1)); // second\n }\n};\nmodule.exports = DataReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/DataReader.js\n// module id = 33\n// module chunks = 0","'use strict';\nvar ArrayReader = require('./ArrayReader');\nvar utils = require('../utils');\n\nfunction Uint8ArrayReader(data) {\n ArrayReader.call(this, data);\n}\nutils.inherits(Uint8ArrayReader, ArrayReader);\n/**\n * @see DataReader.readData\n */\nUint8ArrayReader.prototype.readData = function(size) {\n this.checkOffset(size);\n if(size === 0) {\n // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].\n return new Uint8Array(0);\n }\n var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = Uint8ArrayReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/Uint8ArrayReader.js\n// module id = 34\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\nvar support = require('../support');\nvar ArrayReader = require('./ArrayReader');\nvar StringReader = require('./StringReader');\nvar NodeBufferReader = require('./NodeBufferReader');\nvar Uint8ArrayReader = require('./Uint8ArrayReader');\n\n/**\n * Create a reader adapted to the data.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read.\n * @return {DataReader} the data reader.\n */\nmodule.exports = function (data) {\n var type = utils.getTypeOf(data);\n utils.checkSupport(type);\n if (type === \"string\" && !support.uint8array) {\n return new StringReader(data);\n }\n if (type === \"nodebuffer\") {\n return new NodeBufferReader(data);\n }\n if (support.uint8array) {\n return new Uint8ArrayReader(utils.transformTo(\"uint8array\", data));\n }\n return new ArrayReader(utils.transformTo(\"array\", data));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/readerFor.js\n// module id = 35\n// module chunks = 0","'use strict';\nexports.LOCAL_FILE_HEADER = \"PK\\x03\\x04\";\nexports.CENTRAL_FILE_HEADER = \"PK\\x01\\x02\";\nexports.CENTRAL_DIRECTORY_END = \"PK\\x05\\x06\";\nexports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = \"PK\\x06\\x07\";\nexports.ZIP64_CENTRAL_DIRECTORY_END = \"PK\\x06\\x06\";\nexports.DATA_DESCRIPTOR = \"PK\\x07\\x08\";\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/signature.js\n// module id = 36\n// module chunks = 0","'use strict';\n\nvar GenericWorker = require('./GenericWorker');\nvar crc32 = require('../crc32');\nvar utils = require('../utils');\n\n/**\n * A worker which calculate the crc32 of the data flowing through.\n * @constructor\n */\nfunction Crc32Probe() {\n GenericWorker.call(this, \"Crc32Probe\");\n this.withStreamInfo(\"crc32\", 0);\n}\nutils.inherits(Crc32Probe, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nCrc32Probe.prototype.processChunk = function (chunk) {\n this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);\n this.push(chunk);\n};\nmodule.exports = Crc32Probe;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/Crc32Probe.js\n// module id = 37\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('./GenericWorker');\n\n/**\n * A worker which calculate the total length of the data flowing through.\n * @constructor\n * @param {String} propName the name used to expose the length\n */\nfunction DataLengthProbe(propName) {\n GenericWorker.call(this, \"DataLengthProbe for \" + propName);\n this.propName = propName;\n this.withStreamInfo(propName, 0);\n}\nutils.inherits(DataLengthProbe, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nDataLengthProbe.prototype.processChunk = function (chunk) {\n if(chunk) {\n var length = this.streamInfo[this.propName] || 0;\n this.streamInfo[this.propName] = length + chunk.data.length;\n }\n GenericWorker.prototype.processChunk.call(this, chunk);\n};\nmodule.exports = DataLengthProbe;\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/DataLengthProbe.js\n// module id = 38\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('./GenericWorker');\n\n// the size of the generated chunks\n// TODO expose this as a public variable\nvar DEFAULT_BLOCK_SIZE = 16 * 1024;\n\n/**\n * A worker that reads a content and emits chunks.\n * @constructor\n * @param {Promise} dataP the promise of the data to split\n */\nfunction DataWorker(dataP) {\n GenericWorker.call(this, \"DataWorker\");\n var self = this;\n this.dataIsReady = false;\n this.index = 0;\n this.max = 0;\n this.data = null;\n this.type = \"\";\n\n this._tickScheduled = false;\n\n dataP.then(function (data) {\n self.dataIsReady = true;\n self.data = data;\n self.max = data && data.length || 0;\n self.type = utils.getTypeOf(data);\n if(!self.isPaused) {\n self._tickAndRepeat();\n }\n }, function (e) {\n self.error(e);\n });\n}\n\nutils.inherits(DataWorker, GenericWorker);\n\n/**\n * @see GenericWorker.cleanUp\n */\nDataWorker.prototype.cleanUp = function () {\n GenericWorker.prototype.cleanUp.call(this);\n this.data = null;\n};\n\n/**\n * @see GenericWorker.resume\n */\nDataWorker.prototype.resume = function () {\n if(!GenericWorker.prototype.resume.call(this)) {\n return false;\n }\n\n if (!this._tickScheduled && this.dataIsReady) {\n this._tickScheduled = true;\n utils.delay(this._tickAndRepeat, [], this);\n }\n return true;\n};\n\n/**\n * Trigger a tick a schedule an other call to this function.\n */\nDataWorker.prototype._tickAndRepeat = function() {\n this._tickScheduled = false;\n if(this.isPaused || this.isFinished) {\n return;\n }\n this._tick();\n if(!this.isFinished) {\n utils.delay(this._tickAndRepeat, [], this);\n this._tickScheduled = true;\n }\n};\n\n/**\n * Read and push a chunk.\n */\nDataWorker.prototype._tick = function() {\n\n if(this.isPaused || this.isFinished) {\n return false;\n }\n\n var size = DEFAULT_BLOCK_SIZE;\n var data = null, nextIndex = Math.min(this.max, this.index + size);\n if (this.index >= this.max) {\n // EOF\n return this.end();\n } else {\n switch(this.type) {\n case \"string\":\n data = this.data.substring(this.index, nextIndex);\n break;\n case \"uint8array\":\n data = this.data.subarray(this.index, nextIndex);\n break;\n case \"array\":\n case \"nodebuffer\":\n data = this.data.slice(this.index, nextIndex);\n break;\n }\n this.index = nextIndex;\n return this.push({\n data : data,\n meta : {\n percent : this.max ? this.index / this.max * 100 : 0\n }\n });\n }\n};\n\nmodule.exports = DataWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/DataWorker.js\n// module id = 39\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\nvar ConvertWorker = require('./ConvertWorker');\nvar GenericWorker = require('./GenericWorker');\nvar base64 = require('../base64');\nvar support = require(\"../support\");\nvar external = require(\"../external\");\n\nvar NodejsStreamOutputAdapter = null;\nif (support.nodestream) {\n try {\n NodejsStreamOutputAdapter = require('../nodejs/NodejsStreamOutputAdapter');\n } catch(e) {}\n}\n\n/**\n * Apply the final transformation of the data. If the user wants a Blob for\n * example, it's easier to work with an U8intArray and finally do the\n * ArrayBuffer/Blob conversion.\n * @param {String} type the name of the final type\n * @param {String|Uint8Array|Buffer} content the content to transform\n * @param {String} mimeType the mime type of the content, if applicable.\n * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format.\n */\nfunction transformZipOutput(type, content, mimeType) {\n switch(type) {\n case \"blob\" :\n return utils.newBlob(utils.transformTo(\"arraybuffer\", content), mimeType);\n case \"base64\" :\n return base64.encode(content);\n default :\n return utils.transformTo(type, content);\n }\n}\n\n/**\n * Concatenate an array of data of the given type.\n * @param {String} type the type of the data in the given array.\n * @param {Array} dataArray the array containing the data chunks to concatenate\n * @return {String|Uint8Array|Buffer} the concatenated data\n * @throws Error if the asked type is unsupported\n */\nfunction concat (type, dataArray) {\n var i, index = 0, res = null, totalLength = 0;\n for(i = 0; i < dataArray.length; i++) {\n totalLength += dataArray[i].length;\n }\n switch(type) {\n case \"string\":\n return dataArray.join(\"\");\n case \"array\":\n return Array.prototype.concat.apply([], dataArray);\n case \"uint8array\":\n res = new Uint8Array(totalLength);\n for(i = 0; i < dataArray.length; i++) {\n res.set(dataArray[i], index);\n index += dataArray[i].length;\n }\n return res;\n case \"nodebuffer\":\n return Buffer.concat(dataArray);\n default:\n throw new Error(\"concat : unsupported type '\" + type + \"'\");\n }\n}\n\n/**\n * Listen a StreamHelper, accumulate its content and concatenate it into a\n * complete block.\n * @param {StreamHelper} helper the helper to use.\n * @param {Function} updateCallback a callback called on each update. Called\n * with one arg :\n * - the metadata linked to the update received.\n * @return Promise the promise for the accumulation.\n */\nfunction accumulate(helper, updateCallback) {\n return new external.Promise(function (resolve, reject){\n var dataArray = [];\n var chunkType = helper._internalType,\n resultType = helper._outputType,\n mimeType = helper._mimeType;\n helper\n .on('data', function (data, meta) {\n dataArray.push(data);\n if(updateCallback) {\n updateCallback(meta);\n }\n })\n .on('error', function(err) {\n dataArray = [];\n reject(err);\n })\n .on('end', function (){\n try {\n var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);\n resolve(result);\n } catch (e) {\n reject(e);\n }\n dataArray = [];\n })\n .resume();\n });\n}\n\n/**\n * An helper to easily use workers outside of JSZip.\n * @constructor\n * @param {Worker} worker the worker to wrap\n * @param {String} outputType the type of data expected by the use\n * @param {String} mimeType the mime type of the content, if applicable.\n */\nfunction StreamHelper(worker, outputType, mimeType) {\n var internalType = outputType;\n switch(outputType) {\n case \"blob\":\n case \"arraybuffer\":\n internalType = \"uint8array\";\n break;\n case \"base64\":\n internalType = \"string\";\n break;\n }\n\n try {\n // the type used internally\n this._internalType = internalType;\n // the type used to output results\n this._outputType = outputType;\n // the mime type\n this._mimeType = mimeType;\n utils.checkSupport(internalType);\n this._worker = worker.pipe(new ConvertWorker(internalType));\n // the last workers can be rewired without issues but we need to\n // prevent any updates on previous workers.\n worker.lock();\n } catch(e) {\n this._worker = new GenericWorker(\"error\");\n this._worker.error(e);\n }\n}\n\nStreamHelper.prototype = {\n /**\n * Listen a StreamHelper, accumulate its content and concatenate it into a\n * complete block.\n * @param {Function} updateCb the update callback.\n * @return Promise the promise for the accumulation.\n */\n accumulate : function (updateCb) {\n return accumulate(this, updateCb);\n },\n /**\n * Add a listener on an event triggered on a stream.\n * @param {String} evt the name of the event\n * @param {Function} fn the listener\n * @return {StreamHelper} the current helper.\n */\n on : function (evt, fn) {\n var self = this;\n\n if(evt === \"data\") {\n this._worker.on(evt, function (chunk) {\n fn.call(self, chunk.data, chunk.meta);\n });\n } else {\n this._worker.on(evt, function () {\n utils.delay(fn, arguments, self);\n });\n }\n return this;\n },\n /**\n * Resume the flow of chunks.\n * @return {StreamHelper} the current helper.\n */\n resume : function () {\n utils.delay(this._worker.resume, [], this._worker);\n return this;\n },\n /**\n * Pause the flow of chunks.\n * @return {StreamHelper} the current helper.\n */\n pause : function () {\n this._worker.pause();\n return this;\n },\n /**\n * Return a nodejs stream for this helper.\n * @param {Function} updateCb the update callback.\n * @return {NodejsStreamOutputAdapter} the nodejs stream.\n */\n toNodejsStream : function (updateCb) {\n utils.checkSupport(\"nodestream\");\n if (this._outputType !== \"nodebuffer\") {\n // an object stream containing blob/arraybuffer/uint8array/string\n // is strange and I don't know if it would be useful.\n // I you find this comment and have a good usecase, please open a\n // bug report !\n throw new Error(this._outputType + \" is not supported by this method\");\n }\n\n return new NodejsStreamOutputAdapter(this, {\n objectMode : this._outputType !== \"nodebuffer\"\n }, updateCb);\n }\n};\n\n\nmodule.exports = StreamHelper;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/StreamHelper.js\n// module id = 40\n// module chunks = 0","var core = module.exports = {version: '2.3.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_core.js\n// module id = 41\n// module chunks = 0","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_ctx.js\n// module id = 42\n// module chunks = 0","var isObject = require('./_is-object')\n , document = require('./_global').document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_dom-create.js\n// module id = 43\n// module chunks = 0","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_fails.js\n// module id = 44\n// module chunks = 0","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // use fallback for big arrays to avoid stack overflow\n if (len < 65537) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/utils/strings.js\n// module id = 45\n// module chunks = 0","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/adler32.js\n// module id = 46\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/constants.js\n// module id = 47\n// module chunks = 0","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/crc32.js\n// module id = 48\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/zstream.js\n// module id = 49\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/*<replacement>*/\n\nvar processNextTick = require('process-nextick-args').nextTick;\n/*</replacement>*/\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar isArray = require('isarray');\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/*</replacement>*/\n\nvar BufferList = require('./internal/streams/BufferList');\nvar destroyImpl = require('./internal/streams/destroy');\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n processNextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = { hasUnpiped: false };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, unpipeInfo);\n }return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this, unpipeInfo);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n processNextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n processNextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n processNextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_readable.js\n// module id = 50\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) {\n return this.emit('error', new Error('write callback called multiple times'));\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n\n cb(er);\n\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function') {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n var _this2 = this;\n\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n _this2.emit('close');\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_transform.js\n// module id = 51\n// module chunks = 0","'use strict';\n\n/*<replacement>*/\n\nvar processNextTick = require('process-nextick-args').nextTick;\n/*</replacement>*/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n processNextTick(emitErrorNT, this, err);\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n processNextTick(emitErrorNT, _this, err);\n if (_this._writableState) {\n _this._writableState.errorEmitted = true;\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/internal/streams/destroy.js\n// module id = 52\n// module chunks = 0","module.exports = require('events').EventEmitter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/internal/streams/stream-browser.js\n// module id = 53\n// module chunks = 0","'use strict';\n\nvar Buffer = require('safe-buffer').Buffer;\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return -1;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// UTF-8 replacement characters ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd'.repeat(p);\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd'.repeat(p + 1);\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd'.repeat(p + 2);\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character for each buffered byte of a (partial)\n// character needs to be added to the output.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd'.repeat(this.lastTotal - this.lastNeed);\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/string_decoder/lib/string_decoder.js\n// module id = 54\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _util = require('./lib/util');\n\nrequire('./lib/vendor/hidpi-canvas');\n\nvar _mouse = require('./lib/mouse');\n\nvar _mouse2 = _interopRequireDefault(_mouse);\n\nvar _color = require('./lib/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar w = void 0,\n h = void 0;\nvar rx = void 0,\n ry = void 0;\n\nvar pixels_per_second = 512; // 1024\n\nvar canvas = document.createElement('canvas');\n// document.body.appendChild(canvas)\n// document.body.addEventListener('resize', resize)\nresize();\nrecenter();\nrequestAnimationFrame(animate);\n\n// must request context after resizing\nvar ctx = canvas.getContext('2d');\n\nvar scratch = document.createElement('canvas');\nvar scratchCtx = scratch.getContext('2d-lodpi');\n\nfunction resize(ww, hh) {\n w = canvas.width = ww || window.innerWidth;\n h = canvas.height = hh || window.innerHeight;\n canvas.style.width = w + 'px';\n canvas.style.height = h + 'px';\n}\nfunction recenter() {\n rx = (0, _util.randint)(w), ry = (0, _util.randint)(h);\n}\nvar frame = null;\nfunction onFrame(fn) {\n frame = fn;\n}\nfunction animate(t) {\n requestAnimationFrame(animate);\n if (frame) {\n frame(t);\n frame = null;\n }\n // ctx.save()\n // ctx.globalAlpha = 0.0001\n // ctx.translate(w/2, h/2)\n // ctx.rotate(0.1)\n // ctx.translate(-rx, -ry)\n // ctx.drawImage(canvas, 0, 0)\n // ctx.restore()\n}\nfunction clear(n, x, y, ww, hh) {\n ctx.fillStyle = 'rgba(255,255,255,' + (n || 0.9) + ')';\n ctx.fillRect(x || 0, y || 0, ww || w, hh || h);\n recenter();\n}\nfunction triangle(px, py, r) {\n setTimeout(function () {\n return tri(px, py, r);\n }, Math.random() * 10);\n // setTimeout( () => tri(px,py,r), Math.random()*200)\n // setTimeout( () => tri(px,py,r), Math.random()*300)\n}\nfunction tri(px, py, r) {\n ctx.save();\n ctx.globalCompositeOperation = 'multiply';\n ctx.fillStyle = _color2.default.color((px + py) / (w + h), 0, 1, 0.2);\n function p() {\n var theta = (0, _util.randrange)(0, Math.PI * 2);\n var x = px + Math.cos(theta) * r;\n var y = py + Math.sin(theta) * r;\n return { x: x, y: y };\n }\n ctx.beginPath();\n var p0 = p(),\n p1 = p(),\n p2 = p();\n ctx.moveTo(p0.x, p0.y);\n ctx.lineTo(p1.x, p1.y);\n ctx.lineTo(p2.x, p2.y);\n ctx.lineTo(p0.x, p0.y);\n ctx.fill();\n ctx.restore();\n}\nfunction line(y) {\n ctx.beginPath();\n ctx.moveTo(0, y);\n ctx.lineTo(w, y);\n ctx.strokeStyle = \"#888\";\n ctx.strokeWidth = 1;\n ctx.stroke();\n}\nfunction dot(x, y, r) {\n ctx.fillStyle = \"#f00\";\n ctx.beginPath();\n ctx.moveTo(x, y);\n ctx.arc(x, y, r, 0, 2 * Math.PI);\n ctx.fill();\n}\nfunction waveform(pcm, sr, pos, zoom) {\n sr = sr || 44100;\n pos = pos || 0;\n\n var width = w;\n var height = Math.floor(h / 4);\n var half_height = Math.floor(height / 2);\n var x0 = 0;\n var y0 = 20;\n var ymid = y0 + half_height;\n var max_width_in_seconds = width / pixels_per_second;\n var max_width_in_samples = max_width_in_seconds * sr;\n var pcm_length = pcm.length;\n var len = Math.min(pcm_length, max_width_in_samples);\n var pcm_step = sr / pixels_per_second;\n var i;\n ctx.save();\n\n clear(1, x0, y0, width, height);\n\n line(ymid);\n ctx.beginPath();\n for (i = 0; i < width; i += 0.5) {\n var si = Math.floor(pcm_step * i + pos);\n if (si > pcm_length) break;\n var val = pcm[si]; // -1, 1\n // ctx.moveTo(x0 + i, ymid)\n ctx.lineTo(x0 + i, ymid + val * half_height);\n }\n ctx.strokeStyle = \"rgba(250,20,0,0.9)\";\n ctx.strokeWidth = 1;\n ctx.stroke();\n ctx.restore();\n}\n\nfunction spectrum(spec, x0, y0, ww, hh) {\n var data = spec.data;\n var fft_size = spec.fft_size;\n var half_fft_size = spec.fft_size / 2;\n var spec_len = data.length;\n\n scratch.width = data.length;\n scratch.height = half_fft_size;\n\n var imageData = ctx.createImageData(scratch.width, scratch.height);\n var pixels = imageData.data;\n\n var i = void 0,\n j = void 0,\n u = void 0,\n v = void 0,\n _r = void 0,\n _i = void 0,\n col = void 0,\n hsl = void 0;\n\n for (i = 0; i < spec_len; i++) {\n col = data[i];\n\n for (j = 0; j < half_fft_size; j++) {\n u = ((half_fft_size - j) * spec_len + i) * 4;\n v = j * 2;\n _r = col[v];\n _i = (0, _util.mod)(col[v + 1], Math.PI * 2) / (Math.PI * 2);\n hsl = _color2.default.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10));\n // red - real part\n // pixels[u] = _r * 127 + 127\n // // green - imag part\n // pixels[u+1] = _i * 127 + 127\n // // blue - magnitude\n // pixels[u+2] = Math.sqrt(Math.pow(_r, 2) + Math.pow(_i, 2)) * 128 + 127\n // pixels[u+3] = 255\n pixels[u] = hsl[0];\n pixels[u + 1] = hsl[1];\n pixels[u + 2] = hsl[2];\n pixels[u + 3] = 255;\n }\n }\n\n scratchCtx.putImageData(imageData, 0, 0);\n\n var pcm_length = spec.fft_overlap * spec_len;\n\n x0 = x0 * devicePixelRatio || 0;\n y0 = y0 * devicePixelRatio || Math.floor(h / 4);\n ww = ww * devicePixelRatio || w;\n hh = hh * devicePixelRatio || h / 4;\n\n var width = Math.round(pcm_length / spec.sr * pixels_per_second);\n var height = Math.floor(hh);\n\n ctx.save();\n clear(1, x0, y0, w, height);\n ctx.drawImage(scratch, x0, y0, width, height);\n ctx.restore();\n}\nfunction raw_spectrum(spec, x0, y0, ww, hh, def_min_r, def_min_i) {\n var data = spec.data;\n var fft_size = spec.fft_size;\n var half_fft_size = spec.fft_size / 2;\n var spec_len = data.length;\n\n var _scratch = document.createElement('canvas');\n var _scratchCtx = _scratch.getContext('2d-lodpi');\n _scratch.width = data.length;\n _scratch.height = half_fft_size;\n // console.log(\"spectrum w/h:\", _scratch.width, _scratch.height)\n\n var imageData = _scratchCtx.createImageData(_scratch.width, _scratch.height);\n var pixels = imageData.data;\n\n var i = void 0,\n j = void 0,\n u = void 0,\n v = void 0,\n _r = void 0,\n _i = void 0,\n col = void 0,\n hsl = void 0;\n // let min_r = Infinity, max_r = -Infinity\n // let min_i = Infinity, max_i = -Infinity\n\n // determined empirically..\n // let min_r = -60.4894057005308\n // let max_r = 107.23800966675353\n // let min_i = -59.4894057005308\n // let max_i = 108.23800966675353\n var min_r = -def_min_r;\n var max_r = def_min_r;\n var min_i = -def_min_i;\n var max_i = def_min_i;\n var delta_r = max_r - min_r;\n var delta_i = max_i - min_i;\n var mean_r = 0;\n var mean_i = 0;\n var sum_mean_r = 0,\n sum_mean_i = 0;\n var real = void 0,\n imag = void 0;\n\n for (i = 0; i < spec_len; i++) {\n col = data[i];\n mean_r = 0;\n mean_i = 0;\n\n for (j = 0; j < half_fft_size; j++) {\n u = (j * spec_len + i) * 4;\n v = j * 2;\n real = col[v];\n imag = col[v + 1];\n mean_r += real;\n mean_i += imag;\n _r = (0, _util.clamp)((real - min_r) / delta_r * 255, 0, 255);\n _i = (0, _util.clamp)((imag - min_i) / delta_i * 255, 0, 255);\n\n // hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10))\n pixels[u + 0] = _r;\n pixels[u + 1] = _i;\n pixels[u + 2] = 127; // hsl[2]\n pixels[u + 3] = 255;\n\n // min_r = Math.min(min_r, col[v])\n // max_r = Math.max(max_r, col[v])\n // min_i = Math.min(min_i, col[v]+1)\n // max_i = Math.max(max_i, col[v]+1)\n }\n mean_r /= half_fft_size;\n mean_i /= half_fft_size;\n sum_mean_r += mean_r;\n sum_mean_i += mean_i;\n }\n\n sum_mean_r /= spec_len;\n sum_mean_i /= spec_len;\n // console.log(sum_mean_r, sum_mean_i)\n // console.log(\"r:\", min_r, max_r)\n // console.log(\"i:\", min_i, max_i)\n _scratchCtx.putImageData(imageData, 0, 0);\n\n return { canvas: _scratch, imageData: imageData };\n}\n\nexports.default = {\n canvas: canvas, ctx: ctx, onFrame: onFrame, resize: resize,\n triangle: triangle, clear: clear, line: line, dot: dot,\n waveform: waveform, spectrum: spectrum, raw_spectrum: raw_spectrum\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/draw.js\n// module id = 55\n// module chunks = 0","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar keys = {};\nvar key_numbers = {};\nvar letters = \"yxcvbnmasdfghjklqwertuiopz\";\nvar numbers = \"1234567890\";\n\nvar callback = function callback() {};\n\nletters.toUpperCase().split(\"\").map(function (k, i) {\n keys[k.charCodeAt(0)] = i;\n});\n\nkeys['Z'.charCodeAt(0)] = 0;\n\nnumbers.split(\"\").map(function (k, i) {\n keys[k.charCodeAt(0)] = i + letters.length;\n key_numbers[k.charCodeAt(0)] = true;\n});\n\nwindow.addEventListener(\"keydown\", keydown, true);\nfunction keydown(e) {\n if (e.altKey || e.ctrlKey || e.metaKey) {\n e.stopPropagation();\n return;\n }\n if (document.activeElement instanceof HTMLInputElement && e.keyCode in key_numbers) {\n e.stopPropagation();\n return;\n }\n if (!(e.keyCode in keys)) return;\n var index = keys[e.keyCode];\n if (e.shiftKey) index += letters.length;\n index -= 7;\n callback(index);\n}\n\nfunction listen(fn) {\n callback = fn;\n}\n\nexports.default = { listen: listen };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/keys.js\n// module id = 56\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// const compressor = new Tone.Compressor(-30, 3).toMaster()\n\nvar compressor = new _tone2.default.Compressor(-30, 3).toMaster();\nvar gain = new _tone2.default.Gain(1).connect(compressor);\n\nexports.default = gain;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/output.js\n// module id = 57\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _util = require('./util');\n\nvar _signalWindows = require('signal-windows');\n\nvar _fft = require('fft.js');\n\nvar _fft2 = _interopRequireDefault(_fft);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fft_size = 512;\nvar fft_overlap = fft_size / 4;\n\nvar fft = new _fft2.default(fft_size);\n\nfunction toSpectrum(pcm, sr) {\n sr = sr || 44100;\n var ham = _signalWindows.windows.construct('ham', fft_size);\n var pcm_in = new Array(fft_size);\n var pcm_length = pcm.length;\n var pcm_q_length = Math.ceil(pcm_length / fft_size) * fft_size;\n var i = void 0,\n j = void 0,\n fft_out = void 0,\n data = [];\n for (i = -fft_size; i < pcm_q_length; i += fft_overlap) {\n for (j = 0; j < fft_size; j++) {\n pcm_in[j] = pcm[i + j] * ham[j] || 0;\n }\n fft_out = fft.createComplexArray();\n fft.realTransform(fft_out, pcm_in);\n fft.completeSpectrum(fft_out);\n data.push(fft_out);\n }\n return {\n data: data,\n sr: sr,\n fft_size: fft_size,\n fft_overlap: fft_overlap\n };\n}\n\nfunction fromSpectrum(spec) {\n var data = spec.data;\n var sr = spec.sr;\n var fft_size = spec.fft_size;\n var fft_overlap = spec.fft_overlap;\n var spec_len = data.length;\n\n var ham = _signalWindows.windows.construct('ham', fft_size);\n var out = fft.createComplexArray();\n var pcm_length = fft_overlap * spec_len;\n\n var audioBuffer = _tone2.default.context.createBuffer(1, pcm_length, sr);\n var pcm = audioBuffer.getChannelData(0);\n\n var i = void 0,\n j = void 0,\n u = void 0,\n col = void 0;\n\n for (i = 0; i < spec_len; i++) {\n col = data[i];\n // for (j = fft_size; j < fft_size << 1; j++) {\n // col[j] = 0\n // }\n // if (i == 0) console.log(col)\n fft.inverseTransform(out, col);\n u = i * fft_overlap;\n for (j = 0; j < fft_size; j++) {\n pcm[u + j] += out[j * 2] * ham[j] || 0;\n }\n }\n\n fadeInOut(pcm, fft_size);\n // console.log(pcm)\n return audioBuffer;\n}\n\nfunction fromImageData(imageData, sr, _r, _i) {\n var pixels = imageData.data;\n var w = imageData.width;\n var h = imageData.height;\n var data = new Array(w);\n var x = void 0,\n y = void 0,\n u = void 0,\n v = void 0,\n v2 = void 0;\n for (y = 0; y < h; y++) {\n var col = data[y] = new Float32Array(h * 4);\n for (x = 0; x < w; x++) {\n u = (x * w + y) * 4;\n v = x * 2;\n col[v] = (pixels[u] / 255 - 0.5) * _r;\n col[v + 1] = (pixels[u + 1] / 255 - 0.5) * _i;\n v2 = (h - y + h) * 2;\n col[v2] = col[v];\n col[v2 + 1] = 0; // col[v+1]\n }\n col[h * 2] = col[h * 2 + 1] = col[h * 2 - 1] = col[h * 2 - 2] = 0;\n }\n var spec = {\n data: data,\n sr: sr,\n fft_size: fft_size, fft_overlap: fft_overlap\n };\n return spec;\n}\n\nfunction binToHz(spec, i) {\n return i / spec.fft_size * spec.sr;\n}\n\nfunction fadeInOut(pcm, fade_size) {\n var pcm_length = pcm.length;\n var fade = 0,\n i = void 0;\n for (i = 0; i < fade_size; i++) {\n fade = i / fade_size;\n fade *= fade;\n pcm[i] *= fade;\n pcm[pcm_length - i] *= fade;\n }\n}\nfunction rotatePhase(spec, theta) {\n var data = spec.data,\n fft_size = spec.fft_size;\n\n var i = void 0,\n j = void 0,\n col = void 0,\n len = data.length;\n for (i = 0; i < len; i++) {\n col = data[i];\n for (j = 0; j < fft_size; j++) {\n col[j * 2 + 1] += theta;\n }\n }\n return spec;\n}\n\nfunction linearBins(spec, n) {\n n = n || 1;\n\n var bins = [],\n i = void 0,\n q_i = void 0;\n for (q_i = 0; q_i < n; q_i++) {\n bins[q_i] = [];\n }\n var step = Math.floor(spec.fft_size / n);\n var len_quantize_n = (0, _util.quantize)(spec.fft_size, n);\n for (i = 0; i < len_quantize_n; i++) {\n q_i = Math.floor(i / step);\n bins[q_i] = bins[q_i] || [];\n bins[q_i].push(i);\n }\n // leftover bins get put at end\n for (; i < spec.fft_size; i++) {\n bins[q_i].push(i);\n }\n return bins;\n}\nfunction logarithmicBins(spec) {\n var bins = [],\n i = void 0,\n j = void 0,\n q_i = void 0;\n var binCount = Math.log2(spec.fft_size) - 1;\n for (i = 0, q_i = 0, j = 0; i < binCount; i++) {\n j += 1 << i;\n bins[i] = [];\n for (; q_i < j; q_i++) {\n bins[i].push(q_i);\n }\n }\n return bins;\n}\nfunction concatBins(bins) {\n return bins.reduce(function (acc, cv) {\n return acc.concat(cv);\n }, []);\n}\nfunction reverseBins(bins) {\n return bins.map(function (bin) {\n return bin.reverse();\n });\n}\nfunction minBins(bins) {\n return bins.map(function (bin) {\n var b = bin[0];\n return bin.map(function () {\n return b;\n });\n });\n}\nfunction maxBins(bins) {\n return bins.map(function (bin) {\n var b = bin[bin.length - 1];\n return bin.map(function () {\n return b;\n });\n });\n}\nfunction rotateSpectrum(spec, n) {\n var fft_size = spec.fft_size;\n\n if (n && n < 1) {\n n -= 0.5;\n n *= fft_size;\n }\n n = Math.floor(n);\n var order = new Array(fft_size),\n i = void 0;\n for (i = 0; i < fft_size; i++) {\n order[i] = (0, _util.mod)(i + n, fft_size / 2);\n }\n return reorderBins(spec, order);\n}\nfunction cloneSpectrum(spec) {\n var data = spec.data,\n fft_size = spec.fft_size,\n sr = spec.sr,\n fft_overlap = spec.fft_overlap;\n\n var spec_len = data.length;\n\n var new_data = new Array(spec_len);\n var i = void 0;\n for (i = 0; i < spec_len; i++) {\n new_data[i] = data[i].concat();\n new_data[i][2] = 0;\n }\n\n return {\n data: new_data,\n fft_size: fft_size,\n sr: sr, fft_overlap: fft_overlap\n };\n}\nfunction reverseSpectrum(spec) {\n var new_spec = cloneSpectrum(spec);\n new_spec.data = new_spec.data.reverse();\n return new_spec;\n}\nfunction shuffleSpectrum(spec) {\n var fft_size = spec.fft_size;\n\n var order = new Array(fft_size),\n i = void 0;\n for (i = 0; i < fft_size; i++) {\n order[i] = i;\n }\n (0, _util.shuffle)(order);\n return reorderBins(spec, order);\n}\nfunction invertSpectrum(spec) {\n var fft_size = spec.fft_size;\n\n var order = new Array(fft_size),\n i = void 0;\n for (i = 0; i < fft_size; i++) {\n order[i] = fft_size - i - 1;\n }\n return reorderBins(spec, order);\n}\nfunction reorderBins(spec, order) {\n var new_spec = cloneSpectrum(spec);\n var data = spec.data,\n sr = spec.sr,\n fft_size = spec.fft_size,\n fft_overlap = spec.fft_overlap;\n\n var spec_len = data.length;\n var new_data = new_spec.data;\n\n\n var i = void 0,\n j = void 0,\n col = void 0,\n new_col = void 0;\n for (j = order.length; j < fft_size; j++) {\n order[j] = j;\n }\n\n for (i = 0; i < spec_len; i++) {\n col = data[i];\n new_col = new_data[i] = data[i].concat();\n col[0] = 0;\n col[2] = 0;\n col[4] = 0;\n for (j = 0; j < fft_size / 2; j++) {\n new_col[j * 2] = col[order[j] * 2];\n new_col[j * 2 + 1] = col[order[j] * 2 + 1];\n }\n for (; j < fft_size; j++) {\n new_col[j * 2] = 0;\n new_col[j * 2 + 1] = 0;\n }\n }\n\n return {\n data: new_data,\n sr: sr, fft_size: fft_size, fft_overlap: fft_overlap\n };\n}\n\nexports.default = {\n toSpectrum: toSpectrum, fromSpectrum: fromSpectrum, fromImageData: fromImageData, binToHz: binToHz,\n fadeInOut: fadeInOut,\n cloneSpectrum: cloneSpectrum,\n reverseSpectrum: reverseSpectrum, shuffleSpectrum: shuffleSpectrum, invertSpectrum: invertSpectrum, rotateSpectrum: rotateSpectrum,\n reorderBins: reorderBins,\n linearBins: linearBins, logarithmicBins: logarithmicBins,\n concatBins: concatBins,\n reverseBins: reverseBins, minBins: minBins, maxBins: maxBins,\n rotatePhase: rotatePhase\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/spectrum.js\n// module id = 58\n// module chunks = 0","'use strict';\n\n/**\n * Representation a of zip file in js\n * @constructor\n */\nfunction JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}\nJSZip.prototype = require('./object');\nJSZip.prototype.loadAsync = require('./load');\nJSZip.support = require('./support');\nJSZip.defaults = require('./defaults');\n\n// TODO find a better way to handle this version,\n// a require('package.json').version doesn't work with webpack, see #327\nJSZip.version = \"3.1.5\";\n\nJSZip.loadAsync = function (content, options) {\n return new JSZip().loadAsync(content, options);\n};\n\nJSZip.external = require(\"./external\");\nmodule.exports = JSZip;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/index.js\n// module id = 59\n// module chunks = 0","'use strict';\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _jszip = require('jszip');\n\nvar _jszip2 = _interopRequireDefault(_jszip);\n\nvar _sprintfJs = require('sprintf-js');\n\nvar _fileSaver = require('file-saver');\n\nvar _fileSaver2 = _interopRequireDefault(_fileSaver);\n\nvar _draw = require('./draw');\n\nvar _draw2 = _interopRequireDefault(_draw);\n\nvar _keys = require('./lib/keys');\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _mouse = require('./lib/mouse');\n\nvar _mouse2 = _interopRequireDefault(_mouse);\n\nvar _output = require('./lib/output');\n\nvar _output2 = _interopRequireDefault(_output);\n\nvar _spectrum = require('./lib/spectrum');\n\nvar _spectrum2 = _interopRequireDefault(_spectrum);\n\nvar _util = require('./lib/util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selfDrag = false;\nvar buffer = void 0;\nvar players = [];\nvar gallery = void 0;\nvar sr = 44100;\nvar last_i = 0;\nvar _r = 8,\n _i = 8;\nfunction init() {\n (0, _util.requestAudioContext)(ready);\n document.body.addEventListener('dragover', dragover);\n document.body.addEventListener('dragstart', dragstart);\n document.body.addEventListener('drop', drop);\n document.querySelector(\"#upload\").addEventListener('change', handleFileSelect);\n // draw.onFrame(() => {})\n _draw2.default.resize(256, 256);\n\n gallery = document.querySelector('#gallery');\n _mouse2.default.register({\n move: function move(x, y) {}\n });\n _keys2.default.listen(function (z) {\n // console.log(z)\n play((0, _util.mod)(z, players.length));\n });\n}\nfunction ready() {}\nfunction dragover(e) {\n e.preventDefault();\n}\nfunction dragstart(e) {\n selfDrag = true;\n}\nfunction drop(e) {\n e.stopPropagation();\n e.preventDefault();\n\n if (e.dataTransfer && !selfDrag) {\n if (e.dataTransfer.files.length) {\n handleFileSelect(e);\n }\n } else {\n handleFileSelect(e);\n }\n selfDrag = false;\n}\nfunction handleFileSelect(e) {\n var files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n var file = files[0];\n // console.log(files, file)\n if (!file) return;\n load(file);\n}\nfunction load(file) {\n players = [];\n buffer = new _tone2.default.Buffer(URL.createObjectURL(file), loadBuffer, function (err) {\n return console.error('err', err);\n });\n}\nfunction loadBuffer() {\n console.log('loaded buffer', buffer);\n var pcm = buffer._buffer.getChannelData(0);\n sr = buffer._buffer.sampleRate;\n if (!pcm) return;\n\n var FRAME_LENGTH = 126 * 255;\n var FRAME_OFFSET = FRAME_LENGTH / 4;\n\n var zip = new _jszip2.default();\n\n var zip_folder = zip.folder(\"images\");\n\n for (var offset = 0, count = 0, _len = pcm.length; offset < _len; offset += FRAME_OFFSET, count += 1) {\n // console.log('generating', count, offset)\n var player = render(pcm.slice(offset, offset + FRAME_LENGTH), count, zip_folder);\n register(player, count);\n if (count > 20) break;\n // break\n }\n\n console.log('done exporting');\n zip.generateAsync({ type: \"blob\" }).then(function (content) {\n console.log('saving zip');\n _fileSaver2.default.saveAs(content, \"img2pix.zip\");\n });\n play(0);\n}\nfunction render(pcm, count, zip) {\n var fft = _spectrum2.default.toSpectrum(pcm, sr);\n // console.log('render', fft)\n // const pcm_rev = pcm.slice().reverse()\n // const spec_rev = spectrum.toSpectrum(pcm_rev, spec.sr)\n // const { buf, pcm } = spectrum.fromSpectrum(fft)\n _draw2.default.clear();\n\n var _draw$raw_spectrum = _draw2.default.raw_spectrum(fft, 0, 256, 0, 256, _r, _i),\n canvas = _draw$raw_spectrum.canvas,\n imageData = _draw$raw_spectrum.imageData;\n\n var dataURL = canvas.toDataURL(\"image/png\");\n if (zip) {\n var fn = (0, _sprintfJs.sprintf)('frame_%05d.png', count);\n zip.file(fn, dataURL.split(',')[1], { base64: true });\n }\n return { fft: fft, canvas: canvas, imageData: imageData, dataURL: dataURL };\n}\nfunction play(i) {\n // console.log('play', i)\n last_i = i;\n var player = players[(0, _util.clamp)(i, 0, players.length)];\n // const { canvas, imageData } = draw.raw_spectrum(fft, 0, 256, 0, 256, 1, 1)\n // console.log(_r, _i)\n\n var _draw$raw_spectrum2 = _draw2.default.raw_spectrum(player.fft, 0, 256, 0, 256, _r, _i),\n canvas = _draw$raw_spectrum2.canvas,\n imageData = _draw$raw_spectrum2.imageData;\n\n var new_fft = _spectrum2.default.fromImageData(player.imageData, 44100, _r, _i);\n gallery.innerHTML = '';\n\n // console.log(player.fft.data, new_fft.data)\n var buf = _spectrum2.default.fromSpectrum(new_fft);\n var _p = new _tone2.default.Player(buf);\n _p.connect(_output2.default);\n _p.start(_tone2.default.now());\n redraw(new_fft);\n}\nfunction redraw(new_fft) {\n var _draw$raw_spectrum3 = _draw2.default.raw_spectrum(new_fft, 0, 256, 0, 256, _r, _i),\n canvas = _draw$raw_spectrum3.canvas,\n imageData = _draw$raw_spectrum3.imageData;\n}\nfunction register(player, i) {\n // console.log('register', player)\n players.push(player);\n player.canvas.addEventListener('click', function () {\n play(i);\n });\n gallery.appendChild(player.canvas);\n}\ninit();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/index.js\n// module id = 60\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar palettes = [[[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [1.0, 1.0, 1.0], [0.00, 0.33, 0.67]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [1.0, 1.0, 1.0], [0.00, 0.10, 0.20]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [1.0, 1.0, 1.0], [0.30, 0.20, 0.20]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [1.0, 1.0, 0.5], [0.80, 0.90, 0.30]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [1.0, 0.7, 0.4], [0.00, 0.15, 0.20]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [2.0, 1.0, 0.0], [0.50, 0.20, 0.25]], [[0.8, 0.5, 0.4], [0.2, 0.4, 0.2], [2.0, 1.0, 1.0], [0.00, 0.25, 0.25]]];\n\nvar palette = palettes[0];\n\nfunction channel(t, a, b, c, d, add, mul) {\n return a + b * Math.cos(2 * Math.PI * (c * t + d)) * mul + add;\n}\n\nfunction color(t, add, mul, alpha) {\n add = add || 0;\n mul = mul || 1;\n var a = void 0,\n b = void 0,\n c = void 0,\n d = void 0;\n var rgb = [];\n for (var i = 0; i < 3; i++) {\n a = palette[0][i];\n b = palette[1][i];\n c = palette[2][i];\n d = palette[3][i];\n rgb[i] = Math.round(channel(t, a, b, c, d, add, mul) * 255);\n }\n return 'rgba(' + rgb + ',' + alpha + ')';\n}\n\nfunction hsl2rgb(H, S, L) {\n var R, G, B;\n var var_1, var_2;\n if (S == 0) {\n //HSL from 0 to 1\n R = L * 255; //RGB results from 0 to 255\n G = L * 255;\n B = L * 255;\n } else {\n if (L < 0.5) var_2 = L * (1 + S);else var_2 = L + S - S * L;\n\n var_1 = 2 * L - var_2;\n\n R = 255 * hue2rgb(var_1, var_2, H + 1 / 3);\n G = 255 * hue2rgb(var_1, var_2, H);\n B = 255 * hue2rgb(var_1, var_2, H - 1 / 3);\n }\n return [R, G, B];\n}\nfunction hue2rgb(v1, v2, vH) {\n if (vH < 0) vH += 1;\n if (vH > 1) vH -= 1;\n if (6 * vH < 1) return v1 + (v2 - v1) * 6 * vH;\n if (2 * vH < 1) return v2;\n if (3 * vH < 2) return v1 + (v2 - v1) * (2 / 3 - vH) * 6;\n return v1;\n}\n\nexports.default = { color: color, hsl2rgb: hsl2rgb };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/color.js\n// module id = 61\n// module chunks = 0","\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * StartAudioContext.js\n * @author Yotam Mann\n * @license http://opensource.org/licenses/MIT MIT License\n * @copyright 2016 Yotam Mann\n */\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && module.exports) {\n module.exports = factory();\n } else {\n root.StartAudioContext = factory();\n }\n})(undefined, function () {\n\n /**\n * The StartAudioContext object\n */\n var StartAudioContext = {\n /**\n * The audio context passed in by the user\n * @type {AudioContext}\n */\n context: null,\n /**\n * The TapListeners bound to the elements\n * @type {Array}\n * @private\n */\n _tapListeners: [],\n /**\n * Callbacks to invoke when the audio context is started\n * @type {Array}\n * @private\n */\n _onStarted: []\n };\n\n /**\n * Set the context\n * @param {AudioContext} ctx\n * @returns {StartAudioContext}\n */\n StartAudioContext.setContext = function (ctx) {\n StartAudioContext.context = ctx;\n return StartAudioContext;\n };\n\n /**\n * Add a tap listener to the audio context\n * @param {Array|Element|String|jQuery} element\n * @returns {StartAudioContext}\n */\n StartAudioContext.on = function (element) {\n if (Array.isArray(element) || NodeList && element instanceof NodeList) {\n for (var i = 0; i < element.length; i++) {\n StartAudioContext.on(element[i]);\n }\n } else if (typeof element === \"string\") {\n StartAudioContext.on(document.querySelectorAll(element));\n } else if (element.jquery && typeof element.toArray === \"function\") {\n StartAudioContext.on(element.toArray());\n } else if (Element && element instanceof Element) {\n //if it's an element, create a TapListener\n var tap = new TapListener(element, onTap);\n StartAudioContext._tapListeners.push(tap);\n }\n return StartAudioContext;\n };\n\n /**\n * Bind a callback to when the audio context is started. \n * @param {Function} cb\n * @return {StartAudioContext}\n */\n StartAudioContext.onStarted = function (cb) {\n //if it's already started, invoke the callback\n if (StartAudioContext.isStarted()) {\n cb();\n } else {\n StartAudioContext._onStarted.push(cb);\n }\n return StartAudioContext;\n };\n\n /**\n * returns true if the context is started\n * @return {Boolean}\n */\n StartAudioContext.isStarted = function () {\n return StartAudioContext.context !== null && StartAudioContext.context.state === \"running\";\n };\n\n /**\n * @class Listens for non-dragging tap ends on the given element\n * @param {Element} element\n * @internal\n */\n var TapListener = function TapListener(element) {\n\n this._dragged = false;\n\n this._element = element;\n\n this._bindedMove = this._moved.bind(this);\n this._bindedEnd = this._ended.bind(this);\n\n element.addEventListener(\"touchmove\", this._bindedMove);\n element.addEventListener(\"touchend\", this._bindedEnd);\n element.addEventListener(\"mouseup\", this._bindedEnd);\n };\n\n /**\n * drag move event\n */\n TapListener.prototype._moved = function (e) {\n this._dragged = true;\n };\n\n /**\n * tap ended listener\n */\n TapListener.prototype._ended = function (e) {\n if (!this._dragged) {\n onTap();\n }\n this._dragged = false;\n };\n\n /**\n * remove all the bound events\n */\n TapListener.prototype.dispose = function () {\n this._element.removeEventListener(\"touchmove\", this._bindedMove);\n this._element.removeEventListener(\"touchend\", this._bindedEnd);\n this._element.removeEventListener(\"mouseup\", this._bindedEnd);\n this._bindedMove = null;\n this._bindedEnd = null;\n this._element = null;\n };\n\n /**\n * Invoked the first time of the elements is tapped.\n * Creates a silent oscillator when a non-dragging touchend \n * event has been triggered.\n */\n function onTap() {\n //start the audio context with a silent oscillator\n if (StartAudioContext.context && !StartAudioContext.isStarted()) {\n var osc = StartAudioContext.context.createOscillator();\n var silent = StartAudioContext.context.createGain();\n silent.gain.value = 0;\n osc.connect(silent);\n silent.connect(StartAudioContext.context.destination);\n var now = StartAudioContext.context.currentTime;\n osc.start(now);\n osc.stop(now + 0.5);\n }\n\n //dispose all the tap listeners\n if (StartAudioContext._tapListeners) {\n for (var i = 0; i < StartAudioContext._tapListeners.length; i++) {\n StartAudioContext._tapListeners[i].dispose();\n }\n StartAudioContext._tapListeners = null;\n }\n //the onstarted callbacks\n if (StartAudioContext._onStarted) {\n for (var j = 0; j < StartAudioContext._onStarted.length; j++) {\n StartAudioContext._onStarted[j]();\n }\n StartAudioContext._onStarted = null;\n }\n }\n\n return StartAudioContext;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/startAudioContext.js\n// module id = 62\n// module chunks = 0","'use strict';\n\n/**\n * HiDPI Canvas Polyfill (1.0.10)\n *\n * Author: Jonathan D. Johnson (http://jondavidjohn.com)\n * Homepage: https://github.com/jondavidjohn/hidpi-canvas-polyfill\n * Issue Tracker: https://github.com/jondavidjohn/hidpi-canvas-polyfill/issues\n * License: Apache-2.0\n*/\n(function (prototype) {\n\n\tvar pixelRatio = function () {\n\t\tvar canvas = window.document.createElement('canvas'),\n\t\t context = canvas.getContext('2d'),\n\t\t backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n\n\t\treturn (window.devicePixelRatio || 1) / backingStore;\n\t}(),\n\t forEach = function forEach(obj, func) {\n\t\tfor (var p in obj) {\n\t\t\tif (obj.hasOwnProperty(p)) {\n\t\t\t\tfunc(obj[p], p);\n\t\t\t}\n\t\t}\n\t},\n\t ratioArgs = {\n\t\t'fillRect': 'all',\n\t\t'clearRect': 'all',\n\t\t'strokeRect': 'all',\n\t\t'moveTo': 'all',\n\t\t'lineTo': 'all',\n\t\t'arc': [0, 1, 2],\n\t\t'arcTo': 'all',\n\t\t'bezierCurveTo': 'all',\n\t\t'isPointinPath': 'all',\n\t\t'isPointinStroke': 'all',\n\t\t'quadraticCurveTo': 'all',\n\t\t'rect': 'all',\n\t\t'translate': 'all',\n\t\t'createRadialGradient': 'all',\n\t\t'createLinearGradient': 'all'\n\t};\n\n\tif (pixelRatio === 1) return;\n\n\tforEach(ratioArgs, function (value, key) {\n\t\tprototype[key] = function (_super) {\n\t\t\treturn function () {\n\t\t\t\tvar i,\n\t\t\t\t len,\n\t\t\t\t args = Array.prototype.slice.call(arguments);\n\n\t\t\t\tif (value === 'all') {\n\t\t\t\t\targs = args.map(function (a) {\n\t\t\t\t\t\treturn a * pixelRatio;\n\t\t\t\t\t});\n\t\t\t\t} else if (Array.isArray(value)) {\n\t\t\t\t\tfor (i = 0, len = value.length; i < len; i++) {\n\t\t\t\t\t\targs[value[i]] *= pixelRatio;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn _super.apply(this, args);\n\t\t\t};\n\t\t}(prototype[key]);\n\t});\n\n\t// Stroke lineWidth adjustment\n\tprototype.stroke = function (_super) {\n\t\treturn function () {\n\t\t\tthis.lineWidth *= pixelRatio;\n\t\t\t_super.apply(this, arguments);\n\t\t\tthis.lineWidth /= pixelRatio;\n\t\t};\n\t}(prototype.stroke);\n\n\t// Text\n\t//\n\tprototype.fillText = function (_super) {\n\t\treturn function () {\n\t\t\tvar args = Array.prototype.slice.call(arguments);\n\n\t\t\targs[1] *= pixelRatio; // x\n\t\t\targs[2] *= pixelRatio; // y\n\n\t\t\tthis.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n\t\t\t\treturn m * pixelRatio + u;\n\t\t\t});\n\n\t\t\t_super.apply(this, args);\n\n\t\t\tthis.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n\t\t\t\treturn m / pixelRatio + u;\n\t\t\t});\n\t\t};\n\t}(prototype.fillText);\n\n\tprototype.strokeText = function (_super) {\n\t\treturn function () {\n\t\t\tvar args = Array.prototype.slice.call(arguments);\n\n\t\t\targs[1] *= pixelRatio; // x\n\t\t\targs[2] *= pixelRatio; // y\n\n\t\t\tthis.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n\t\t\t\treturn m * pixelRatio + u;\n\t\t\t});\n\n\t\t\t_super.apply(this, args);\n\n\t\t\tthis.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n\t\t\t\treturn m / pixelRatio + u;\n\t\t\t});\n\t\t};\n\t}(prototype.strokeText);\n})(window.CanvasRenderingContext2D.prototype);\n;(function (prototype) {\n\tprototype.getContext = function (_super) {\n\t\treturn function (type) {\n\t\t\tvar backingStore, ratio, context;\n\n\t\t\tif (type == '2d-lodpi') {\n\t\t\t\tcontext = _super.call(this, '2d');\n\t\t\t} else if (type === '2d') {\n\t\t\t\tcontext = _super.call(this, '2d');\n\n\t\t\t\tbackingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n\n\t\t\t\tratio = (window.devicePixelRatio || 1) / backingStore;\n\n\t\t\t\tif (ratio > 1) {\n\t\t\t\t\tthis.style.height = this.height + 'px';\n\t\t\t\t\tthis.style.width = this.width + 'px';\n\t\t\t\t\tthis.width *= ratio;\n\t\t\t\t\tthis.height *= ratio;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcontext = _super.call(this, type);\n\t\t\t}\n\n\t\t\treturn context;\n\t\t};\n\t}(prototype.getContext);\n})(window.HTMLCanvasElement.prototype);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/vendor/hidpi-canvas.js\n// module id = 63\n// module chunks = 0","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return (b64.length * 3 / 4) - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\n arr = new Arr((len * 3 / 4) - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0; i < l; i += 4) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = ((uint8[i] << 16) & 0xFF0000) + ((uint8[i + 1] << 8) & 0xFF00) + (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/base64-js/index.js\n// module id = 64\n// module chunks = 0","'use strict';\n\nfunction FFT(size) {\n this.size = size | 0;\n if (this.size <= 1 || (this.size & (this.size - 1)) !== 0)\n throw new Error('FFT size must be a power of two and bigger than 1');\n\n this._csize = size << 1;\n\n // NOTE: Use of `var` is intentional for old V8 versions\n var table = new Array(this.size * 2);\n for (var i = 0; i < table.length; i += 2) {\n const angle = Math.PI * i / this.size;\n table[i] = Math.cos(angle);\n table[i + 1] = -Math.sin(angle);\n }\n this.table = table;\n\n // Find size's power of two\n var power = 0;\n for (var t = 1; this.size > t; t <<= 1)\n power++;\n\n // Calculate initial step's width:\n // * If we are full radix-4 - it is 2x smaller to give inital len=8\n // * Otherwise it is the same as `power` to give len=4\n this._width = power % 2 === 0 ? power - 1 : power;\n\n // Pre-compute bit-reversal patterns\n this._bitrev = new Array(1 << this._width);\n for (var j = 0; j < this._bitrev.length; j++) {\n this._bitrev[j] = 0;\n for (var shift = 0; shift < this._width; shift += 2) {\n var revShift = this._width - shift - 2;\n this._bitrev[j] |= ((j >>> shift) & 3) << revShift;\n }\n }\n\n this._out = null;\n this._data = null;\n this._inv = 0;\n}\nmodule.exports = FFT;\n\nFFT.prototype.fromComplexArray = function fromComplexArray(complex, storage) {\n var res = storage || new Array(complex.length >>> 1);\n for (var i = 0; i < complex.length; i += 2)\n res[i >>> 1] = complex[i];\n return res;\n};\n\nFFT.prototype.createComplexArray = function createComplexArray() {\n const res = new Array(this._csize);\n for (var i = 0; i < res.length; i++)\n res[i] = 0;\n return res;\n};\n\nFFT.prototype.toComplexArray = function toComplexArray(input, storage) {\n var res = storage || this.createComplexArray();\n for (var i = 0; i < res.length; i += 2) {\n res[i] = input[i >>> 1];\n res[i + 1] = 0;\n }\n return res;\n};\n\nFFT.prototype.completeSpectrum = function completeSpectrum(spectrum) {\n var size = this._csize;\n var half = size >>> 1;\n for (var i = 2; i < half; i += 2) {\n spectrum[size - i] = spectrum[i];\n spectrum[size - i + 1] = -spectrum[i + 1];\n }\n};\n\nFFT.prototype.transform = function transform(out, data) {\n if (out === data)\n throw new Error('Input and output buffers must be different');\n\n this._out = out;\n this._data = data;\n this._inv = 0;\n this._transform4();\n this._out = null;\n this._data = null;\n};\n\nFFT.prototype.realTransform = function realTransform(out, data) {\n if (out === data)\n throw new Error('Input and output buffers must be different');\n\n this._out = out;\n this._data = data;\n this._inv = 0;\n this._realTransform4();\n this._out = null;\n this._data = null;\n};\n\nFFT.prototype.inverseTransform = function inverseTransform(out, data) {\n if (out === data)\n throw new Error('Input and output buffers must be different');\n\n this._out = out;\n this._data = data;\n this._inv = 1;\n this._transform4();\n for (var i = 0; i < out.length; i++)\n out[i] /= this.size;\n this._out = null;\n this._data = null;\n};\n\n// radix-4 implementation\n//\n// NOTE: Uses of `var` are intentional for older V8 version that do not\n// support both `let compound assignments` and `const phi`\nFFT.prototype._transform4 = function _transform4() {\n var out = this._out;\n var size = this._csize;\n\n // Initial step (permute and transform)\n var width = this._width;\n var step = 1 << width;\n var len = (size / step) << 1;\n\n var outOff;\n var t;\n var bitrev = this._bitrev;\n if (len === 4) {\n for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n const off = bitrev[t];\n this._singleTransform2(outOff, off, step);\n }\n } else {\n // len === 8\n for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n const off = bitrev[t];\n this._singleTransform4(outOff, off, step);\n }\n }\n\n // Loop through steps in decreasing order\n var inv = this._inv ? -1 : 1;\n var table = this.table;\n for (step >>= 2; step >= 2; step >>= 2) {\n len = (size / step) << 1;\n var quarterLen = len >>> 2;\n\n // Loop through offsets in the data\n for (outOff = 0; outOff < size; outOff += len) {\n // Full case\n var limit = outOff + quarterLen;\n for (var i = outOff, k = 0; i < limit; i += 2, k += step) {\n const A = i;\n const B = A + quarterLen;\n const C = B + quarterLen;\n const D = C + quarterLen;\n\n // Original values\n const Ar = out[A];\n const Ai = out[A + 1];\n const Br = out[B];\n const Bi = out[B + 1];\n const Cr = out[C];\n const Ci = out[C + 1];\n const Dr = out[D];\n const Di = out[D + 1];\n\n // Middle values\n const MAr = Ar;\n const MAi = Ai;\n\n const tableBr = table[k];\n const tableBi = inv * table[k + 1];\n const MBr = Br * tableBr - Bi * tableBi;\n const MBi = Br * tableBi + Bi * tableBr;\n\n const tableCr = table[2 * k];\n const tableCi = inv * table[2 * k + 1];\n const MCr = Cr * tableCr - Ci * tableCi;\n const MCi = Cr * tableCi + Ci * tableCr;\n\n const tableDr = table[3 * k];\n const tableDi = inv * table[3 * k + 1];\n const MDr = Dr * tableDr - Di * tableDi;\n const MDi = Dr * tableDi + Di * tableDr;\n\n // Pre-Final values\n const T0r = MAr + MCr;\n const T0i = MAi + MCi;\n const T1r = MAr - MCr;\n const T1i = MAi - MCi;\n const T2r = MBr + MDr;\n const T2i = MBi + MDi;\n const T3r = inv * (MBr - MDr);\n const T3i = inv * (MBi - MDi);\n\n // Final values\n const FAr = T0r + T2r;\n const FAi = T0i + T2i;\n\n const FCr = T0r - T2r;\n const FCi = T0i - T2i;\n\n const FBr = T1r + T3i;\n const FBi = T1i - T3r;\n\n const FDr = T1r - T3i;\n const FDi = T1i + T3r;\n\n out[A] = FAr;\n out[A + 1] = FAi;\n out[B] = FBr;\n out[B + 1] = FBi;\n out[C] = FCr;\n out[C + 1] = FCi;\n out[D] = FDr;\n out[D + 1] = FDi;\n }\n }\n }\n};\n\n// radix-2 implementation\n//\n// NOTE: Only called for len=4\nFFT.prototype._singleTransform2 = function _singleTransform2(outOff, off,\n step) {\n const out = this._out;\n const data = this._data;\n\n const evenR = data[off];\n const evenI = data[off + 1];\n const oddR = data[off + step];\n const oddI = data[off + step + 1];\n\n const leftR = evenR + oddR;\n const leftI = evenI + oddI;\n const rightR = evenR - oddR;\n const rightI = evenI - oddI;\n\n out[outOff] = leftR;\n out[outOff + 1] = leftI;\n out[outOff + 2] = rightR;\n out[outOff + 3] = rightI;\n};\n\n// radix-4\n//\n// NOTE: Only called for len=8\nFFT.prototype._singleTransform4 = function _singleTransform4(outOff, off,\n step) {\n const out = this._out;\n const data = this._data;\n const inv = this._inv ? -1 : 1;\n const step2 = step * 2;\n const step3 = step * 3;\n\n // Original values\n const Ar = data[off];\n const Ai = data[off + 1];\n const Br = data[off + step];\n const Bi = data[off + step + 1];\n const Cr = data[off + step2];\n const Ci = data[off + step2 + 1];\n const Dr = data[off + step3];\n const Di = data[off + step3 + 1];\n\n // Pre-Final values\n const T0r = Ar + Cr;\n const T0i = Ai + Ci;\n const T1r = Ar - Cr;\n const T1i = Ai - Ci;\n const T2r = Br + Dr;\n const T2i = Bi + Di;\n const T3r = inv * (Br - Dr);\n const T3i = inv * (Bi - Di);\n\n // Final values\n const FAr = T0r + T2r;\n const FAi = T0i + T2i;\n\n const FBr = T1r + T3i;\n const FBi = T1i - T3r;\n\n const FCr = T0r - T2r;\n const FCi = T0i - T2i;\n\n const FDr = T1r - T3i;\n const FDi = T1i + T3r;\n\n out[outOff] = FAr;\n out[outOff + 1] = FAi;\n out[outOff + 2] = FBr;\n out[outOff + 3] = FBi;\n out[outOff + 4] = FCr;\n out[outOff + 5] = FCi;\n out[outOff + 6] = FDr;\n out[outOff + 7] = FDi;\n};\n\n// Real input radix-4 implementation\nFFT.prototype._realTransform4 = function _realTransform4() {\n var out = this._out;\n var size = this._csize;\n\n // Initial step (permute and transform)\n var width = this._width;\n var step = 1 << width;\n var len = (size / step) << 1;\n\n var outOff;\n var t;\n var bitrev = this._bitrev;\n if (len === 4) {\n for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n const off = bitrev[t];\n this._singleRealTransform2(outOff, off >>> 1, step >>> 1);\n }\n } else {\n // len === 8\n for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n const off = bitrev[t];\n this._singleRealTransform4(outOff, off >>> 1, step >>> 1);\n }\n }\n\n // Loop through steps in decreasing order\n var inv = this._inv ? -1 : 1;\n var table = this.table;\n for (step >>= 2; step >= 2; step >>= 2) {\n len = (size / step) << 1;\n var halfLen = len >>> 1;\n var quarterLen = halfLen >>> 1;\n var hquarterLen = quarterLen >>> 1;\n\n // Loop through offsets in the data\n for (outOff = 0; outOff < size; outOff += len) {\n for (var i = 0, k = 0; i <= hquarterLen; i += 2, k += step) {\n var A = outOff + i;\n var B = A + quarterLen;\n var C = B + quarterLen;\n var D = C + quarterLen;\n\n // Original values\n var Ar = out[A];\n var Ai = out[A + 1];\n var Br = out[B];\n var Bi = out[B + 1];\n var Cr = out[C];\n var Ci = out[C + 1];\n var Dr = out[D];\n var Di = out[D + 1];\n\n // Middle values\n var MAr = Ar;\n var MAi = Ai;\n\n var tableBr = table[k];\n var tableBi = inv * table[k + 1];\n var MBr = Br * tableBr - Bi * tableBi;\n var MBi = Br * tableBi + Bi * tableBr;\n\n var tableCr = table[2 * k];\n var tableCi = inv * table[2 * k + 1];\n var MCr = Cr * tableCr - Ci * tableCi;\n var MCi = Cr * tableCi + Ci * tableCr;\n\n var tableDr = table[3 * k];\n var tableDi = inv * table[3 * k + 1];\n var MDr = Dr * tableDr - Di * tableDi;\n var MDi = Dr * tableDi + Di * tableDr;\n\n // Pre-Final values\n var T0r = MAr + MCr;\n var T0i = MAi + MCi;\n var T1r = MAr - MCr;\n var T1i = MAi - MCi;\n var T2r = MBr + MDr;\n var T2i = MBi + MDi;\n var T3r = inv * (MBr - MDr);\n var T3i = inv * (MBi - MDi);\n\n // Final values\n var FAr = T0r + T2r;\n var FAi = T0i + T2i;\n\n var FBr = T1r + T3i;\n var FBi = T1i - T3r;\n\n out[A] = FAr;\n out[A + 1] = FAi;\n out[B] = FBr;\n out[B + 1] = FBi;\n\n // Output final middle point\n if (i === 0) {\n var FCr = T0r - T2r;\n var FCi = T0i - T2i;\n out[C] = FCr;\n out[C + 1] = FCi;\n continue;\n }\n\n // Do not overwrite ourselves\n if (i === hquarterLen)\n continue;\n\n // In the flipped case:\n // MAi = -MAi\n // MBr=-MBi, MBi=-MBr\n // MCr=-MCr\n // MDr=MDi, MDi=MDr\n var ST0r = T1r;\n var ST0i = -T1i;\n var ST1r = T0r;\n var ST1i = -T0i;\n var ST2r = -inv * T3i;\n var ST2i = -inv * T3r;\n var ST3r = -inv * T2i;\n var ST3i = -inv * T2r;\n\n var SFAr = ST0r + ST2r;\n var SFAi = ST0i + ST2i;\n\n var SFBr = ST1r + ST3i;\n var SFBi = ST1i - ST3r;\n\n var SA = outOff + quarterLen - i;\n var SB = outOff + halfLen - i;\n\n out[SA] = SFAr;\n out[SA + 1] = SFAi;\n out[SB] = SFBr;\n out[SB + 1] = SFBi;\n }\n }\n }\n};\n\n// radix-2 implementation\n//\n// NOTE: Only called for len=4\nFFT.prototype._singleRealTransform2 = function _singleRealTransform2(outOff,\n off,\n step) {\n const out = this._out;\n const data = this._data;\n\n const evenR = data[off];\n const oddR = data[off + step];\n\n const leftR = evenR + oddR;\n const rightR = evenR - oddR;\n\n out[outOff] = leftR;\n out[outOff + 1] = 0;\n out[outOff + 2] = rightR;\n out[outOff + 3] = 0;\n};\n\n// radix-4\n//\n// NOTE: Only called for len=8\nFFT.prototype._singleRealTransform4 = function _singleRealTransform4(outOff,\n off,\n step) {\n const out = this._out;\n const data = this._data;\n const inv = this._inv ? -1 : 1;\n const step2 = step * 2;\n const step3 = step * 3;\n\n // Original values\n const Ar = data[off];\n const Br = data[off + step];\n const Cr = data[off + step2];\n const Dr = data[off + step3];\n\n // Pre-Final values\n const T0r = Ar + Cr;\n const T1r = Ar - Cr;\n const T2r = Br + Dr;\n const T3r = inv * (Br - Dr);\n\n // Final values\n const FAr = T0r + T2r;\n\n const FBr = T1r;\n const FBi = -T3r;\n\n const FCr = T0r - T2r;\n\n const FDr = T1r;\n const FDi = T3r;\n\n out[outOff] = FAr;\n out[outOff + 1] = 0;\n out[outOff + 2] = FBr;\n out[outOff + 3] = FBi;\n out[outOff + 4] = FCr;\n out[outOff + 5] = 0;\n out[outOff + 6] = FDr;\n out[outOff + 7] = FDi;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fft.js/lib/fft.js\n// module id = 65\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ieee754/index.js\n// module id = 66\n// module chunks = 0","'use strict';\nvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\nvar scheduleDrain;\n\n{\n if (Mutation) {\n var called = 0;\n var observer = new Mutation(nextTick);\n var element = global.document.createTextNode('');\n observer.observe(element, {\n characterData: true\n });\n scheduleDrain = function () {\n element.data = (called = ++called % 2);\n };\n } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n var channel = new global.MessageChannel();\n channel.port1.onmessage = nextTick;\n scheduleDrain = function () {\n channel.port2.postMessage(0);\n };\n } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n scheduleDrain = function () {\n\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/immediate/lib/browser.js\n// module id = 67\n// module chunks = 0","'use strict';\nvar USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');\n\nvar pako = require(\"pako\");\nvar utils = require(\"./utils\");\nvar GenericWorker = require(\"./stream/GenericWorker\");\n\nvar ARRAY_TYPE = USE_TYPEDARRAY ? \"uint8array\" : \"array\";\n\nexports.magic = \"\\x08\\x00\";\n\n/**\n * Create a worker that uses pako to inflate/deflate.\n * @constructor\n * @param {String} action the name of the pako function to call : either \"Deflate\" or \"Inflate\".\n * @param {Object} options the options to use when (de)compressing.\n */\nfunction FlateWorker(action, options) {\n GenericWorker.call(this, \"FlateWorker/\" + action);\n\n this._pako = null;\n this._pakoAction = action;\n this._pakoOptions = options;\n // the `meta` object from the last chunk received\n // this allow this worker to pass around metadata\n this.meta = {};\n}\n\nutils.inherits(FlateWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nFlateWorker.prototype.processChunk = function (chunk) {\n this.meta = chunk.meta;\n if (this._pako === null) {\n this._createPako();\n }\n this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false);\n};\n\n/**\n * @see GenericWorker.flush\n */\nFlateWorker.prototype.flush = function () {\n GenericWorker.prototype.flush.call(this);\n if (this._pako === null) {\n this._createPako();\n }\n this._pako.push([], true);\n};\n/**\n * @see GenericWorker.cleanUp\n */\nFlateWorker.prototype.cleanUp = function () {\n GenericWorker.prototype.cleanUp.call(this);\n this._pako = null;\n};\n\n/**\n * Create the _pako object.\n * TODO: lazy-loading this object isn't the best solution but it's the\n * quickest. The best solution is to lazy-load the worker list. See also the\n * issue #446.\n */\nFlateWorker.prototype._createPako = function () {\n this._pako = new pako[this._pakoAction]({\n raw: true,\n level: this._pakoOptions.level || -1 // default compression\n });\n var self = this;\n this._pako.onData = function(data) {\n self.push({\n data : data,\n meta : self.meta\n });\n };\n};\n\nexports.compressWorker = function (compressionOptions) {\n return new FlateWorker(\"Deflate\", compressionOptions);\n};\nexports.uncompressWorker = function () {\n return new FlateWorker(\"Inflate\", {});\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/flate.js\n// module id = 68\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('../stream/GenericWorker');\nvar utf8 = require('../utf8');\nvar crc32 = require('../crc32');\nvar signature = require('../signature');\n\n/**\n * Transform an integer into a string in hexadecimal.\n * @private\n * @param {number} dec the number to convert.\n * @param {number} bytes the number of bytes to generate.\n * @returns {string} the result.\n */\nvar decToHex = function(dec, bytes) {\n var hex = \"\", i;\n for (i = 0; i < bytes; i++) {\n hex += String.fromCharCode(dec & 0xff);\n dec = dec >>> 8;\n }\n return hex;\n};\n\n/**\n * Generate the UNIX part of the external file attributes.\n * @param {Object} unixPermissions the unix permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :\n *\n * TTTTsstrwxrwxrwx0000000000ADVSHR\n * ^^^^____________________________ file type, see zipinfo.c (UNX_*)\n * ^^^_________________________ setuid, setgid, sticky\n * ^^^^^^^^^________________ permissions\n * ^^^^^^^^^^______ not used ?\n * ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only\n */\nvar generateUnixExternalFileAttr = function (unixPermissions, isDir) {\n\n var result = unixPermissions;\n if (!unixPermissions) {\n // I can't use octal values in strict mode, hence the hexa.\n // 040775 => 0x41fd\n // 0100664 => 0x81b4\n result = isDir ? 0x41fd : 0x81b4;\n }\n return (result & 0xFFFF) << 16;\n};\n\n/**\n * Generate the DOS part of the external file attributes.\n * @param {Object} dosPermissions the dos permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * Bit 0 Read-Only\n * Bit 1 Hidden\n * Bit 2 System\n * Bit 3 Volume Label\n * Bit 4 Directory\n * Bit 5 Archive\n */\nvar generateDosExternalFileAttr = function (dosPermissions, isDir) {\n\n // the dir flag is already set for compatibility\n return (dosPermissions || 0) & 0x3F;\n};\n\n/**\n * Generate the various parts used in the construction of the final zip file.\n * @param {Object} streamInfo the hash with informations about the compressed file.\n * @param {Boolean} streamedContent is the content streamed ?\n * @param {Boolean} streamingEnded is the stream finished ?\n * @param {number} offset the current offset from the start of the zip file.\n * @param {String} platform let's pretend we are this platform (change platform dependents fields)\n * @param {Function} encodeFileName the function to encode the file name / comment.\n * @return {Object} the zip parts.\n */\nvar generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) {\n var file = streamInfo['file'],\n compression = streamInfo['compression'],\n useCustomEncoding = encodeFileName !== utf8.utf8encode,\n encodedFileName = utils.transformTo(\"string\", encodeFileName(file.name)),\n utfEncodedFileName = utils.transformTo(\"string\", utf8.utf8encode(file.name)),\n comment = file.comment,\n encodedComment = utils.transformTo(\"string\", encodeFileName(comment)),\n utfEncodedComment = utils.transformTo(\"string\", utf8.utf8encode(comment)),\n useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,\n useUTF8ForComment = utfEncodedComment.length !== comment.length,\n dosTime,\n dosDate,\n extraFields = \"\",\n unicodePathExtraField = \"\",\n unicodeCommentExtraField = \"\",\n dir = file.dir,\n date = file.date;\n\n\n var dataInfo = {\n crc32 : 0,\n compressedSize : 0,\n uncompressedSize : 0\n };\n\n // if the content is streamed, the sizes/crc32 are only available AFTER\n // the end of the stream.\n if (!streamedContent || streamingEnded) {\n dataInfo.crc32 = streamInfo['crc32'];\n dataInfo.compressedSize = streamInfo['compressedSize'];\n dataInfo.uncompressedSize = streamInfo['uncompressedSize'];\n }\n\n var bitflag = 0;\n if (streamedContent) {\n // Bit 3: the sizes/crc32 are set to zero in the local header.\n // The correct values are put in the data descriptor immediately\n // following the compressed data.\n bitflag |= 0x0008;\n }\n if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) {\n // Bit 11: Language encoding flag (EFS).\n bitflag |= 0x0800;\n }\n\n\n var extFileAttr = 0;\n var versionMadeBy = 0;\n if (dir) {\n // dos or unix, we set the dos dir flag\n extFileAttr |= 0x00010;\n }\n if(platform === \"UNIX\") {\n versionMadeBy = 0x031E; // UNIX, version 3.0\n extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);\n } else { // DOS or other, fallback to DOS\n versionMadeBy = 0x0014; // DOS, version 2.0\n extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);\n }\n\n // date\n // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html\n // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html\n // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html\n\n dosTime = date.getUTCHours();\n dosTime = dosTime << 6;\n dosTime = dosTime | date.getUTCMinutes();\n dosTime = dosTime << 5;\n dosTime = dosTime | date.getUTCSeconds() / 2;\n\n dosDate = date.getUTCFullYear() - 1980;\n dosDate = dosDate << 4;\n dosDate = dosDate | (date.getUTCMonth() + 1);\n dosDate = dosDate << 5;\n dosDate = dosDate | date.getUTCDate();\n\n if (useUTF8ForFileName) {\n // set the unicode path extra field. unzip needs at least one extra\n // field to correctly handle unicode path, so using the path is as good\n // as any other information. This could improve the situation with\n // other archive managers too.\n // This field is usually used without the utf8 flag, with a non\n // unicode path in the header (winrar, winzip). This helps (a bit)\n // with the messy Windows' default compressed folders feature but\n // breaks on p7zip which doesn't seek the unicode path extra field.\n // So for now, UTF-8 everywhere !\n unicodePathExtraField =\n // Version\n decToHex(1, 1) +\n // NameCRC32\n decToHex(crc32(encodedFileName), 4) +\n // UnicodeName\n utfEncodedFileName;\n\n extraFields +=\n // Info-ZIP Unicode Path Extra Field\n \"\\x75\\x70\" +\n // size\n decToHex(unicodePathExtraField.length, 2) +\n // content\n unicodePathExtraField;\n }\n\n if(useUTF8ForComment) {\n\n unicodeCommentExtraField =\n // Version\n decToHex(1, 1) +\n // CommentCRC32\n decToHex(crc32(encodedComment), 4) +\n // UnicodeName\n utfEncodedComment;\n\n extraFields +=\n // Info-ZIP Unicode Path Extra Field\n \"\\x75\\x63\" +\n // size\n decToHex(unicodeCommentExtraField.length, 2) +\n // content\n unicodeCommentExtraField;\n }\n\n var header = \"\";\n\n // version needed to extract\n header += \"\\x0A\\x00\";\n // general purpose bit flag\n header += decToHex(bitflag, 2);\n // compression method\n header += compression.magic;\n // last mod file time\n header += decToHex(dosTime, 2);\n // last mod file date\n header += decToHex(dosDate, 2);\n // crc-32\n header += decToHex(dataInfo.crc32, 4);\n // compressed size\n header += decToHex(dataInfo.compressedSize, 4);\n // uncompressed size\n header += decToHex(dataInfo.uncompressedSize, 4);\n // file name length\n header += decToHex(encodedFileName.length, 2);\n // extra field length\n header += decToHex(extraFields.length, 2);\n\n\n var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields;\n\n var dirRecord = signature.CENTRAL_FILE_HEADER +\n // version made by (00: DOS)\n decToHex(versionMadeBy, 2) +\n // file header (common to file and central directory)\n header +\n // file comment length\n decToHex(encodedComment.length, 2) +\n // disk number start\n \"\\x00\\x00\" +\n // internal file attributes TODO\n \"\\x00\\x00\" +\n // external file attributes\n decToHex(extFileAttr, 4) +\n // relative offset of local header\n decToHex(offset, 4) +\n // file name\n encodedFileName +\n // extra field\n extraFields +\n // file comment\n encodedComment;\n\n return {\n fileRecord: fileRecord,\n dirRecord: dirRecord\n };\n};\n\n/**\n * Generate the EOCD record.\n * @param {Number} entriesCount the number of entries in the zip file.\n * @param {Number} centralDirLength the length (in bytes) of the central dir.\n * @param {Number} localDirLength the length (in bytes) of the local dir.\n * @param {String} comment the zip file comment as a binary string.\n * @param {Function} encodeFileName the function to encode the comment.\n * @return {String} the EOCD record.\n */\nvar generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) {\n var dirEnd = \"\";\n var encodedComment = utils.transformTo(\"string\", encodeFileName(comment));\n\n // end of central dir signature\n dirEnd = signature.CENTRAL_DIRECTORY_END +\n // number of this disk\n \"\\x00\\x00\" +\n // number of the disk with the start of the central directory\n \"\\x00\\x00\" +\n // total number of entries in the central directory on this disk\n decToHex(entriesCount, 2) +\n // total number of entries in the central directory\n decToHex(entriesCount, 2) +\n // size of the central directory 4 bytes\n decToHex(centralDirLength, 4) +\n // offset of start of central directory with respect to the starting disk number\n decToHex(localDirLength, 4) +\n // .ZIP file comment length\n decToHex(encodedComment.length, 2) +\n // .ZIP file comment\n encodedComment;\n\n return dirEnd;\n};\n\n/**\n * Generate data descriptors for a file entry.\n * @param {Object} streamInfo the hash generated by a worker, containing informations\n * on the file entry.\n * @return {String} the data descriptors.\n */\nvar generateDataDescriptors = function (streamInfo) {\n var descriptor = \"\";\n descriptor = signature.DATA_DESCRIPTOR +\n // crc-32 4 bytes\n decToHex(streamInfo['crc32'], 4) +\n // compressed size 4 bytes\n decToHex(streamInfo['compressedSize'], 4) +\n // uncompressed size 4 bytes\n decToHex(streamInfo['uncompressedSize'], 4);\n\n return descriptor;\n};\n\n\n/**\n * A worker to concatenate other workers to create a zip file.\n * @param {Boolean} streamFiles `true` to stream the content of the files,\n * `false` to accumulate it.\n * @param {String} comment the comment to use.\n * @param {String} platform the platform to use, \"UNIX\" or \"DOS\".\n * @param {Function} encodeFileName the function to encode file names and comments.\n */\nfunction ZipFileWorker(streamFiles, comment, platform, encodeFileName) {\n GenericWorker.call(this, \"ZipFileWorker\");\n // The number of bytes written so far. This doesn't count accumulated chunks.\n this.bytesWritten = 0;\n // The comment of the zip file\n this.zipComment = comment;\n // The platform \"generating\" the zip file.\n this.zipPlatform = platform;\n // the function to encode file names and comments.\n this.encodeFileName = encodeFileName;\n // Should we stream the content of the files ?\n this.streamFiles = streamFiles;\n // If `streamFiles` is false, we will need to accumulate the content of the\n // files to calculate sizes / crc32 (and write them *before* the content).\n // This boolean indicates if we are accumulating chunks (it will change a lot\n // during the lifetime of this worker).\n this.accumulate = false;\n // The buffer receiving chunks when accumulating content.\n this.contentBuffer = [];\n // The list of generated directory records.\n this.dirRecords = [];\n // The offset (in bytes) from the beginning of the zip file for the current source.\n this.currentSourceOffset = 0;\n // The total number of entries in this zip file.\n this.entriesCount = 0;\n // the name of the file currently being added, null when handling the end of the zip file.\n // Used for the emited metadata.\n this.currentFile = null;\n\n\n\n this._sources = [];\n}\nutils.inherits(ZipFileWorker, GenericWorker);\n\n/**\n * @see GenericWorker.push\n */\nZipFileWorker.prototype.push = function (chunk) {\n\n var currentFilePercent = chunk.meta.percent || 0;\n var entriesCount = this.entriesCount;\n var remainingFiles = this._sources.length;\n\n if(this.accumulate) {\n this.contentBuffer.push(chunk);\n } else {\n this.bytesWritten += chunk.data.length;\n\n GenericWorker.prototype.push.call(this, {\n data : chunk.data,\n meta : {\n currentFile : this.currentFile,\n percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100\n }\n });\n }\n};\n\n/**\n * The worker started a new source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the new source.\n */\nZipFileWorker.prototype.openedSource = function (streamInfo) {\n this.currentSourceOffset = this.bytesWritten;\n this.currentFile = streamInfo['file'].name;\n\n var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n\n // don't stream folders (because they don't have any content)\n if(streamedContent) {\n var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n this.push({\n data : record.fileRecord,\n meta : {percent:0}\n });\n } else {\n // we need to wait for the whole file before pushing anything\n this.accumulate = true;\n }\n};\n\n/**\n * The worker finished a source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the finished source.\n */\nZipFileWorker.prototype.closedSource = function (streamInfo) {\n this.accumulate = false;\n var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n\n this.dirRecords.push(record.dirRecord);\n if(streamedContent) {\n // after the streamed file, we put data descriptors\n this.push({\n data : generateDataDescriptors(streamInfo),\n meta : {percent:100}\n });\n } else {\n // the content wasn't streamed, we need to push everything now\n // first the file record, then the content\n this.push({\n data : record.fileRecord,\n meta : {percent:0}\n });\n while(this.contentBuffer.length) {\n this.push(this.contentBuffer.shift());\n }\n }\n this.currentFile = null;\n};\n\n/**\n * @see GenericWorker.flush\n */\nZipFileWorker.prototype.flush = function () {\n\n var localDirLength = this.bytesWritten;\n for(var i = 0; i < this.dirRecords.length; i++) {\n this.push({\n data : this.dirRecords[i],\n meta : {percent:100}\n });\n }\n var centralDirLength = this.bytesWritten - localDirLength;\n\n var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName);\n\n this.push({\n data : dirEnd,\n meta : {percent:100}\n });\n};\n\n/**\n * Prepare the next source to be read.\n */\nZipFileWorker.prototype.prepareNextSource = function () {\n this.previous = this._sources.shift();\n this.openedSource(this.previous.streamInfo);\n if (this.isPaused) {\n this.previous.pause();\n } else {\n this.previous.resume();\n }\n};\n\n/**\n * @see GenericWorker.registerPrevious\n */\nZipFileWorker.prototype.registerPrevious = function (previous) {\n this._sources.push(previous);\n var self = this;\n\n previous.on('data', function (chunk) {\n self.processChunk(chunk);\n });\n previous.on('end', function () {\n self.closedSource(self.previous.streamInfo);\n if(self._sources.length) {\n self.prepareNextSource();\n } else {\n self.end();\n }\n });\n previous.on('error', function (e) {\n self.error(e);\n });\n return this;\n};\n\n/**\n * @see GenericWorker.resume\n */\nZipFileWorker.prototype.resume = function () {\n if(!GenericWorker.prototype.resume.call(this)) {\n return false;\n }\n\n if (!this.previous && this._sources.length) {\n this.prepareNextSource();\n return true;\n }\n if (!this.previous && !this._sources.length && !this.generatedError) {\n this.end();\n return true;\n }\n};\n\n/**\n * @see GenericWorker.error\n */\nZipFileWorker.prototype.error = function (e) {\n var sources = this._sources;\n if(!GenericWorker.prototype.error.call(this, e)) {\n return false;\n }\n for(var i = 0; i < sources.length; i++) {\n try {\n sources[i].error(e);\n } catch(e) {\n // the `error` exploded, nothing to do\n }\n }\n return true;\n};\n\n/**\n * @see GenericWorker.lock\n */\nZipFileWorker.prototype.lock = function () {\n GenericWorker.prototype.lock.call(this);\n var sources = this._sources;\n for(var i = 0; i < sources.length; i++) {\n sources[i].lock();\n }\n};\n\nmodule.exports = ZipFileWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/generate/ZipFileWorker.js\n// module id = 69\n// module chunks = 0","'use strict';\n\nvar compressions = require('../compressions');\nvar ZipFileWorker = require('./ZipFileWorker');\n\n/**\n * Find the compression to use.\n * @param {String} fileCompression the compression defined at the file level, if any.\n * @param {String} zipCompression the compression defined at the load() level.\n * @return {Object} the compression object to use.\n */\nvar getCompression = function (fileCompression, zipCompression) {\n\n var compressionName = fileCompression || zipCompression;\n var compression = compressions[compressionName];\n if (!compression) {\n throw new Error(compressionName + \" is not a valid compression method !\");\n }\n return compression;\n};\n\n/**\n * Create a worker to generate a zip file.\n * @param {JSZip} zip the JSZip instance at the right root level.\n * @param {Object} options to generate the zip file.\n * @param {String} comment the comment to use.\n */\nexports.generateWorker = function (zip, options, comment) {\n\n var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName);\n var entriesCount = 0;\n try {\n\n zip.forEach(function (relativePath, file) {\n entriesCount++;\n var compression = getCompression(file.options.compression, options.compression);\n var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};\n var dir = file.dir, date = file.date;\n\n file._compressWorker(compression, compressionOptions)\n .withStreamInfo(\"file\", {\n name : relativePath,\n dir : dir,\n date : date,\n comment : file.comment || \"\",\n unixPermissions : file.unixPermissions,\n dosPermissions : file.dosPermissions\n })\n .pipe(zipFileWorker);\n });\n zipFileWorker.entriesCount = entriesCount;\n } catch (e) {\n zipFileWorker.error(e);\n }\n\n return zipFileWorker;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/generate/index.js\n// module id = 70\n// module chunks = 0","'use strict';\nvar utils = require('./utils');\nvar external = require(\"./external\");\nvar utf8 = require('./utf8');\nvar utils = require('./utils');\nvar ZipEntries = require('./zipEntries');\nvar Crc32Probe = require('./stream/Crc32Probe');\nvar nodejsUtils = require(\"./nodejsUtils\");\n\n/**\n * Check the CRC32 of an entry.\n * @param {ZipEntry} zipEntry the zip entry to check.\n * @return {Promise} the result.\n */\nfunction checkEntryCRC32(zipEntry) {\n return new external.Promise(function (resolve, reject) {\n var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe());\n worker.on(\"error\", function (e) {\n reject(e);\n })\n .on(\"end\", function () {\n if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {\n reject(new Error(\"Corrupted zip : CRC32 mismatch\"));\n } else {\n resolve();\n }\n })\n .resume();\n });\n}\n\nmodule.exports = function(data, options) {\n var zip = this;\n options = utils.extend(options || {}, {\n base64: false,\n checkCRC32: false,\n optimizedBinaryString: false,\n createFolders: false,\n decodeFileName: utf8.utf8decode\n });\n\n if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {\n return external.Promise.reject(new Error(\"JSZip can't accept a stream when loading a zip file.\"));\n }\n\n return utils.prepareContent(\"the loaded zip file\", data, true, options.optimizedBinaryString, options.base64)\n .then(function(data) {\n var zipEntries = new ZipEntries(options);\n zipEntries.load(data);\n return zipEntries;\n }).then(function checkCRC32(zipEntries) {\n var promises = [external.Promise.resolve(zipEntries)];\n var files = zipEntries.files;\n if (options.checkCRC32) {\n for (var i = 0; i < files.length; i++) {\n promises.push(checkEntryCRC32(files[i]));\n }\n }\n return external.Promise.all(promises);\n }).then(function addFiles(results) {\n var zipEntries = results.shift();\n var files = zipEntries.files;\n for (var i = 0; i < files.length; i++) {\n var input = files[i];\n zip.file(input.fileNameStr, input.decompressed, {\n binary: true,\n optimizedBinaryString: true,\n date: input.date,\n dir: input.dir,\n comment : input.fileCommentStr.length ? input.fileCommentStr : null,\n unixPermissions : input.unixPermissions,\n dosPermissions : input.dosPermissions,\n createFolders: options.createFolders\n });\n }\n if (zipEntries.zipComment.length) {\n zip.comment = zipEntries.zipComment;\n }\n\n return zip;\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/load.js\n// module id = 71\n// module chunks = 0","\"use strict\";\n\nvar utils = require('../utils');\nvar GenericWorker = require('../stream/GenericWorker');\n\n/**\n * A worker that use a nodejs stream as source.\n * @constructor\n * @param {String} filename the name of the file entry for this stream.\n * @param {Readable} stream the nodejs stream.\n */\nfunction NodejsStreamInputAdapter(filename, stream) {\n GenericWorker.call(this, \"Nodejs stream input adapter for \" + filename);\n this._upstreamEnded = false;\n this._bindStream(stream);\n}\n\nutils.inherits(NodejsStreamInputAdapter, GenericWorker);\n\n/**\n * Prepare the stream and bind the callbacks on it.\n * Do this ASAP on node 0.10 ! A lazy binding doesn't always work.\n * @param {Stream} stream the nodejs stream to use.\n */\nNodejsStreamInputAdapter.prototype._bindStream = function (stream) {\n var self = this;\n this._stream = stream;\n stream.pause();\n stream\n .on(\"data\", function (chunk) {\n self.push({\n data: chunk,\n meta : {\n percent : 0\n }\n });\n })\n .on(\"error\", function (e) {\n if(self.isPaused) {\n this.generatedError = e;\n } else {\n self.error(e);\n }\n })\n .on(\"end\", function () {\n if(self.isPaused) {\n self._upstreamEnded = true;\n } else {\n self.end();\n }\n });\n};\nNodejsStreamInputAdapter.prototype.pause = function () {\n if(!GenericWorker.prototype.pause.call(this)) {\n return false;\n }\n this._stream.pause();\n return true;\n};\nNodejsStreamInputAdapter.prototype.resume = function () {\n if(!GenericWorker.prototype.resume.call(this)) {\n return false;\n }\n\n if(this._upstreamEnded) {\n this.end();\n } else {\n this._stream.resume();\n }\n\n return true;\n};\n\nmodule.exports = NodejsStreamInputAdapter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/nodejs/NodejsStreamInputAdapter.js\n// module id = 72\n// module chunks = 0","'use strict';\n\nvar Readable = require('readable-stream').Readable;\n\nvar utils = require('../utils');\nutils.inherits(NodejsStreamOutputAdapter, Readable);\n\n/**\n* A nodejs stream using a worker as source.\n* @see the SourceWrapper in http://nodejs.org/api/stream.html\n* @constructor\n* @param {StreamHelper} helper the helper wrapping the worker\n* @param {Object} options the nodejs stream options\n* @param {Function} updateCb the update callback.\n*/\nfunction NodejsStreamOutputAdapter(helper, options, updateCb) {\n Readable.call(this, options);\n this._helper = helper;\n\n var self = this;\n helper.on(\"data\", function (data, meta) {\n if (!self.push(data)) {\n self._helper.pause();\n }\n if(updateCb) {\n updateCb(meta);\n }\n })\n .on(\"error\", function(e) {\n self.emit('error', e);\n })\n .on(\"end\", function () {\n self.push(null);\n });\n}\n\n\nNodejsStreamOutputAdapter.prototype._read = function() {\n this._helper.resume();\n};\n\nmodule.exports = NodejsStreamOutputAdapter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/nodejs/NodejsStreamOutputAdapter.js\n// module id = 73\n// module chunks = 0","'use strict';\nvar utf8 = require('./utf8');\nvar utils = require('./utils');\nvar GenericWorker = require('./stream/GenericWorker');\nvar StreamHelper = require('./stream/StreamHelper');\nvar defaults = require('./defaults');\nvar CompressedObject = require('./compressedObject');\nvar ZipObject = require('./zipObject');\nvar generate = require(\"./generate\");\nvar nodejsUtils = require(\"./nodejsUtils\");\nvar NodejsStreamInputAdapter = require(\"./nodejs/NodejsStreamInputAdapter\");\n\n\n/**\n * Add a file in the current folder.\n * @private\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file\n * @param {Object} originalOptions the options of the file\n * @return {Object} the new file.\n */\nvar fileAdd = function(name, data, originalOptions) {\n // be sure sub folders exist\n var dataType = utils.getTypeOf(data),\n parent;\n\n\n /*\n * Correct options.\n */\n\n var o = utils.extend(originalOptions || {}, defaults);\n o.date = o.date || new Date();\n if (o.compression !== null) {\n o.compression = o.compression.toUpperCase();\n }\n\n if (typeof o.unixPermissions === \"string\") {\n o.unixPermissions = parseInt(o.unixPermissions, 8);\n }\n\n // UNX_IFDIR 0040000 see zipinfo.c\n if (o.unixPermissions && (o.unixPermissions & 0x4000)) {\n o.dir = true;\n }\n // Bit 4 Directory\n if (o.dosPermissions && (o.dosPermissions & 0x0010)) {\n o.dir = true;\n }\n\n if (o.dir) {\n name = forceTrailingSlash(name);\n }\n if (o.createFolders && (parent = parentFolder(name))) {\n folderAdd.call(this, parent, true);\n }\n\n var isUnicodeString = dataType === \"string\" && o.binary === false && o.base64 === false;\n if (!originalOptions || typeof originalOptions.binary === \"undefined\") {\n o.binary = !isUnicodeString;\n }\n\n\n var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0;\n\n if (isCompressedEmpty || o.dir || !data || data.length === 0) {\n o.base64 = false;\n o.binary = true;\n data = \"\";\n o.compression = \"STORE\";\n dataType = \"string\";\n }\n\n /*\n * Convert content to fit.\n */\n\n var zipObjectContent = null;\n if (data instanceof CompressedObject || data instanceof GenericWorker) {\n zipObjectContent = data;\n } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {\n zipObjectContent = new NodejsStreamInputAdapter(name, data);\n } else {\n zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);\n }\n\n var object = new ZipObject(name, zipObjectContent, o);\n this.files[name] = object;\n /*\n TODO: we can't throw an exception because we have async promises\n (we can have a promise of a Date() for example) but returning a\n promise is useless because file(name, data) returns the JSZip\n object for chaining. Should we break that to allow the user\n to catch the error ?\n\n return external.Promise.resolve(zipObjectContent)\n .then(function () {\n return object;\n });\n */\n};\n\n/**\n * Find the parent folder of the path.\n * @private\n * @param {string} path the path to use\n * @return {string} the parent folder, or \"\"\n */\nvar parentFolder = function (path) {\n if (path.slice(-1) === '/') {\n path = path.substring(0, path.length - 1);\n }\n var lastSlash = path.lastIndexOf('/');\n return (lastSlash > 0) ? path.substring(0, lastSlash) : \"\";\n};\n\n/**\n * Returns the path with a slash at the end.\n * @private\n * @param {String} path the path to check.\n * @return {String} the path with a trailing slash.\n */\nvar forceTrailingSlash = function(path) {\n // Check the name ends with a /\n if (path.slice(-1) !== \"/\") {\n path += \"/\"; // IE doesn't like substr(-1)\n }\n return path;\n};\n\n/**\n * Add a (sub) folder in the current folder.\n * @private\n * @param {string} name the folder's name\n * @param {boolean=} [createFolders] If true, automatically create sub\n * folders. Defaults to false.\n * @return {Object} the new folder.\n */\nvar folderAdd = function(name, createFolders) {\n createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders;\n\n name = forceTrailingSlash(name);\n\n // Does this folder already exist?\n if (!this.files[name]) {\n fileAdd.call(this, name, null, {\n dir: true,\n createFolders: createFolders\n });\n }\n return this.files[name];\n};\n\n/**\n* Cross-window, cross-Node-context regular expression detection\n* @param {Object} object Anything\n* @return {Boolean} true if the object is a regular expression,\n* false otherwise\n*/\nfunction isRegExp(object) {\n return Object.prototype.toString.call(object) === \"[object RegExp]\";\n}\n\n// return the actual prototype of JSZip\nvar out = {\n /**\n * @see loadAsync\n */\n load: function() {\n throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n },\n\n\n /**\n * Call a callback function for each entry at this folder level.\n * @param {Function} cb the callback function:\n * function (relativePath, file) {...}\n * It takes 2 arguments : the relative path and the file.\n */\n forEach: function(cb) {\n var filename, relativePath, file;\n for (filename in this.files) {\n if (!this.files.hasOwnProperty(filename)) {\n continue;\n }\n file = this.files[filename];\n relativePath = filename.slice(this.root.length, filename.length);\n if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root\n cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...\n }\n }\n },\n\n /**\n * Filter nested files/folders with the specified function.\n * @param {Function} search the predicate to use :\n * function (relativePath, file) {...}\n * It takes 2 arguments : the relative path and the file.\n * @return {Array} An array of matching elements.\n */\n filter: function(search) {\n var result = [];\n this.forEach(function (relativePath, entry) {\n if (search(relativePath, entry)) { // the file matches the function\n result.push(entry);\n }\n\n });\n return result;\n },\n\n /**\n * Add a file to the zip file, or search a file.\n * @param {string|RegExp} name The name of the file to add (if data is defined),\n * the name of the file to find (if no data) or a regex to match files.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded\n * @param {Object} o File options\n * @return {JSZip|Object|Array} this JSZip object (when adding a file),\n * a file (when searching by string) or an array of files (when searching by regex).\n */\n file: function(name, data, o) {\n if (arguments.length === 1) {\n if (isRegExp(name)) {\n var regexp = name;\n return this.filter(function(relativePath, file) {\n return !file.dir && regexp.test(relativePath);\n });\n }\n else { // text\n var obj = this.files[this.root + name];\n if (obj && !obj.dir) {\n return obj;\n } else {\n return null;\n }\n }\n }\n else { // more than one argument : we have data !\n name = this.root + name;\n fileAdd.call(this, name, data, o);\n }\n return this;\n },\n\n /**\n * Add a directory to the zip file, or search.\n * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders.\n * @return {JSZip} an object with the new directory as the root, or an array containing matching folders.\n */\n folder: function(arg) {\n if (!arg) {\n return this;\n }\n\n if (isRegExp(arg)) {\n return this.filter(function(relativePath, file) {\n return file.dir && arg.test(relativePath);\n });\n }\n\n // else, name is a new folder\n var name = this.root + arg;\n var newFolder = folderAdd.call(this, name);\n\n // Allow chaining by returning a new object with this folder as the root\n var ret = this.clone();\n ret.root = newFolder.name;\n return ret;\n },\n\n /**\n * Delete a file, or a directory and all sub-files, from the zip\n * @param {string} name the name of the file to delete\n * @return {JSZip} this JSZip object\n */\n remove: function(name) {\n name = this.root + name;\n var file = this.files[name];\n if (!file) {\n // Look for any folders\n if (name.slice(-1) !== \"/\") {\n name += \"/\";\n }\n file = this.files[name];\n }\n\n if (file && !file.dir) {\n // file\n delete this.files[name];\n } else {\n // maybe a folder, delete recursively\n var kids = this.filter(function(relativePath, file) {\n return file.name.slice(0, name.length) === name;\n });\n for (var i = 0; i < kids.length; i++) {\n delete this.files[kids[i].name];\n }\n }\n\n return this;\n },\n\n /**\n * Generate the complete zip file\n * @param {Object} options the options to generate the zip file :\n * - compression, \"STORE\" by default.\n * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file\n */\n generate: function(options) {\n throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n },\n\n /**\n * Generate the complete zip file as an internal stream.\n * @param {Object} options the options to generate the zip file :\n * - compression, \"STORE\" by default.\n * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n * @return {StreamHelper} the streamed zip file.\n */\n generateInternalStream: function(options) {\n var worker, opts = {};\n try {\n opts = utils.extend(options || {}, {\n streamFiles: false,\n compression: \"STORE\",\n compressionOptions : null,\n type: \"\",\n platform: \"DOS\",\n comment: null,\n mimeType: 'application/zip',\n encodeFileName: utf8.utf8encode\n });\n\n opts.type = opts.type.toLowerCase();\n opts.compression = opts.compression.toUpperCase();\n\n // \"binarystring\" is prefered but the internals use \"string\".\n if(opts.type === \"binarystring\") {\n opts.type = \"string\";\n }\n\n if (!opts.type) {\n throw new Error(\"No output type specified.\");\n }\n\n utils.checkSupport(opts.type);\n\n // accept nodejs `process.platform`\n if(\n opts.platform === 'darwin' ||\n opts.platform === 'freebsd' ||\n opts.platform === 'linux' ||\n opts.platform === 'sunos'\n ) {\n opts.platform = \"UNIX\";\n }\n if (opts.platform === 'win32') {\n opts.platform = \"DOS\";\n }\n\n var comment = opts.comment || this.comment || \"\";\n worker = generate.generateWorker(this, opts, comment);\n } catch (e) {\n worker = new GenericWorker(\"error\");\n worker.error(e);\n }\n return new StreamHelper(worker, opts.type || \"string\", opts.mimeType);\n },\n /**\n * Generate the complete zip file asynchronously.\n * @see generateInternalStream\n */\n generateAsync: function(options, onUpdate) {\n return this.generateInternalStream(options).accumulate(onUpdate);\n },\n /**\n * Generate the complete zip file asynchronously.\n * @see generateInternalStream\n */\n generateNodeStream: function(options, onUpdate) {\n options = options || {};\n if (!options.type) {\n options.type = \"nodebuffer\";\n }\n return this.generateInternalStream(options).toNodejsStream(onUpdate);\n }\n};\nmodule.exports = out;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/object.js\n// module id = 74\n// module chunks = 0","'use strict';\nvar Uint8ArrayReader = require('./Uint8ArrayReader');\nvar utils = require('../utils');\n\nfunction NodeBufferReader(data) {\n Uint8ArrayReader.call(this, data);\n}\nutils.inherits(NodeBufferReader, Uint8ArrayReader);\n\n/**\n * @see DataReader.readData\n */\nNodeBufferReader.prototype.readData = function(size) {\n this.checkOffset(size);\n var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = NodeBufferReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/NodeBufferReader.js\n// module id = 75\n// module chunks = 0","'use strict';\nvar DataReader = require('./DataReader');\nvar utils = require('../utils');\n\nfunction StringReader(data) {\n DataReader.call(this, data);\n}\nutils.inherits(StringReader, DataReader);\n/**\n * @see DataReader.byteAt\n */\nStringReader.prototype.byteAt = function(i) {\n return this.data.charCodeAt(this.zero + i);\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nStringReader.prototype.lastIndexOfSignature = function(sig) {\n return this.data.lastIndexOf(sig) - this.zero;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nStringReader.prototype.readAndCheckSignature = function (sig) {\n var data = this.readData(4);\n return sig === data;\n};\n/**\n * @see DataReader.readData\n */\nStringReader.prototype.readData = function(size) {\n this.checkOffset(size);\n // this will work because the constructor applied the \"& 0xff\" mask.\n var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = StringReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/StringReader.js\n// module id = 76\n// module chunks = 0","'use strict';\n\nvar GenericWorker = require('./GenericWorker');\nvar utils = require('../utils');\n\n/**\n * A worker which convert chunks to a specified type.\n * @constructor\n * @param {String} destType the destination type.\n */\nfunction ConvertWorker(destType) {\n GenericWorker.call(this, \"ConvertWorker to \" + destType);\n this.destType = destType;\n}\nutils.inherits(ConvertWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nConvertWorker.prototype.processChunk = function (chunk) {\n this.push({\n data : utils.transformTo(this.destType, chunk.data),\n meta : chunk.meta\n });\n};\nmodule.exports = ConvertWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/ConvertWorker.js\n// module id = 77\n// module chunks = 0","'use strict';\nvar readerFor = require('./reader/readerFor');\nvar utils = require('./utils');\nvar sig = require('./signature');\nvar ZipEntry = require('./zipEntry');\nvar utf8 = require('./utf8');\nvar support = require('./support');\n// class ZipEntries {{{\n/**\n * All the entries in the zip file.\n * @constructor\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntries(loadOptions) {\n this.files = [];\n this.loadOptions = loadOptions;\n}\nZipEntries.prototype = {\n /**\n * Check that the reader is on the specified signature.\n * @param {string} expectedSignature the expected signature.\n * @throws {Error} if it is an other signature.\n */\n checkSignature: function(expectedSignature) {\n if (!this.reader.readAndCheckSignature(expectedSignature)) {\n this.reader.index -= 4;\n var signature = this.reader.readString(4);\n throw new Error(\"Corrupted zip or bug: unexpected signature \" + \"(\" + utils.pretty(signature) + \", expected \" + utils.pretty(expectedSignature) + \")\");\n }\n },\n /**\n * Check if the given signature is at the given index.\n * @param {number} askedIndex the index to check.\n * @param {string} expectedSignature the signature to expect.\n * @return {boolean} true if the signature is here, false otherwise.\n */\n isSignature: function(askedIndex, expectedSignature) {\n var currentIndex = this.reader.index;\n this.reader.setIndex(askedIndex);\n var signature = this.reader.readString(4);\n var result = signature === expectedSignature;\n this.reader.setIndex(currentIndex);\n return result;\n },\n /**\n * Read the end of the central directory.\n */\n readBlockEndOfCentral: function() {\n this.diskNumber = this.reader.readInt(2);\n this.diskWithCentralDirStart = this.reader.readInt(2);\n this.centralDirRecordsOnThisDisk = this.reader.readInt(2);\n this.centralDirRecords = this.reader.readInt(2);\n this.centralDirSize = this.reader.readInt(4);\n this.centralDirOffset = this.reader.readInt(4);\n\n this.zipCommentLength = this.reader.readInt(2);\n // warning : the encoding depends of the system locale\n // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.\n // On a windows machine, this field is encoded with the localized windows code page.\n var zipComment = this.reader.readData(this.zipCommentLength);\n var decodeParamType = support.uint8array ? \"uint8array\" : \"array\";\n // To get consistent behavior with the generation part, we will assume that\n // this is utf8 encoded unless specified otherwise.\n var decodeContent = utils.transformTo(decodeParamType, zipComment);\n this.zipComment = this.loadOptions.decodeFileName(decodeContent);\n },\n /**\n * Read the end of the Zip 64 central directory.\n * Not merged with the method readEndOfCentral :\n * The end of central can coexist with its Zip64 brother,\n * I don't want to read the wrong number of bytes !\n */\n readBlockZip64EndOfCentral: function() {\n this.zip64EndOfCentralSize = this.reader.readInt(8);\n this.reader.skip(4);\n // this.versionMadeBy = this.reader.readString(2);\n // this.versionNeeded = this.reader.readInt(2);\n this.diskNumber = this.reader.readInt(4);\n this.diskWithCentralDirStart = this.reader.readInt(4);\n this.centralDirRecordsOnThisDisk = this.reader.readInt(8);\n this.centralDirRecords = this.reader.readInt(8);\n this.centralDirSize = this.reader.readInt(8);\n this.centralDirOffset = this.reader.readInt(8);\n\n this.zip64ExtensibleData = {};\n var extraDataSize = this.zip64EndOfCentralSize - 44,\n index = 0,\n extraFieldId,\n extraFieldLength,\n extraFieldValue;\n while (index < extraDataSize) {\n extraFieldId = this.reader.readInt(2);\n extraFieldLength = this.reader.readInt(4);\n extraFieldValue = this.reader.readData(extraFieldLength);\n this.zip64ExtensibleData[extraFieldId] = {\n id: extraFieldId,\n length: extraFieldLength,\n value: extraFieldValue\n };\n }\n },\n /**\n * Read the end of the Zip 64 central directory locator.\n */\n readBlockZip64EndOfCentralLocator: function() {\n this.diskWithZip64CentralDirStart = this.reader.readInt(4);\n this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);\n this.disksCount = this.reader.readInt(4);\n if (this.disksCount > 1) {\n throw new Error(\"Multi-volumes zip are not supported\");\n }\n },\n /**\n * Read the local files, based on the offset read in the central part.\n */\n readLocalFiles: function() {\n var i, file;\n for (i = 0; i < this.files.length; i++) {\n file = this.files[i];\n this.reader.setIndex(file.localHeaderOffset);\n this.checkSignature(sig.LOCAL_FILE_HEADER);\n file.readLocalPart(this.reader);\n file.handleUTF8();\n file.processAttributes();\n }\n },\n /**\n * Read the central directory.\n */\n readCentralDir: function() {\n var file;\n\n this.reader.setIndex(this.centralDirOffset);\n while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) {\n file = new ZipEntry({\n zip64: this.zip64\n }, this.loadOptions);\n file.readCentralPart(this.reader);\n this.files.push(file);\n }\n\n if (this.centralDirRecords !== this.files.length) {\n if (this.centralDirRecords !== 0 && this.files.length === 0) {\n // We expected some records but couldn't find ANY.\n // This is really suspicious, as if something went wrong.\n throw new Error(\"Corrupted zip or bug: expected \" + this.centralDirRecords + \" records in central dir, got \" + this.files.length);\n } else {\n // We found some records but not all.\n // Something is wrong but we got something for the user: no error here.\n // console.warn(\"expected\", this.centralDirRecords, \"records in central dir, got\", this.files.length);\n }\n }\n },\n /**\n * Read the end of central directory.\n */\n readEndOfCentral: function() {\n var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);\n if (offset < 0) {\n // Check if the content is a truncated zip or complete garbage.\n // A \"LOCAL_FILE_HEADER\" is not required at the beginning (auto\n // extractible zip for example) but it can give a good hint.\n // If an ajax request was used without responseType, we will also\n // get unreadable data.\n var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER);\n\n if (isGarbage) {\n throw new Error(\"Can't find end of central directory : is this a zip file ? \" +\n \"If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html\");\n } else {\n throw new Error(\"Corrupted zip: can't find end of central directory\");\n }\n\n }\n this.reader.setIndex(offset);\n var endOfCentralDirOffset = offset;\n this.checkSignature(sig.CENTRAL_DIRECTORY_END);\n this.readBlockEndOfCentral();\n\n\n /* extract from the zip spec :\n 4) If one of the fields in the end of central directory\n record is too small to hold required data, the field\n should be set to -1 (0xFFFF or 0xFFFFFFFF) and the\n ZIP64 format record should be created.\n 5) The end of central directory record and the\n Zip64 end of central directory locator record must\n reside on the same disk when splitting or spanning\n an archive.\n */\n if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {\n this.zip64 = true;\n\n /*\n Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from\n the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents\n all numbers as 64-bit double precision IEEE 754 floating point numbers.\n So, we have 53bits for integers and bitwise operations treat everything as 32bits.\n see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators\n and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5\n */\n\n // should look for a zip64 EOCD locator\n offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n if (offset < 0) {\n throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory locator\");\n }\n this.reader.setIndex(offset);\n this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n this.readBlockZip64EndOfCentralLocator();\n\n // now the zip64 EOCD record\n if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) {\n // console.warn(\"ZIP64 end of central directory not where expected.\");\n this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n if (this.relativeOffsetEndOfZip64CentralDir < 0) {\n throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory\");\n }\n }\n this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);\n this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n this.readBlockZip64EndOfCentral();\n }\n\n var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize;\n if (this.zip64) {\n expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator\n expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize;\n }\n\n var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset;\n\n if (extraBytes > 0) {\n // console.warn(extraBytes, \"extra bytes at beginning or within zipfile\");\n if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) {\n // The offsets seem wrong, but we have something at the specified offset.\n // So… we keep it.\n } else {\n // the offset is wrong, update the \"zero\" of the reader\n // this happens if data has been prepended (crx files for example)\n this.reader.zero = extraBytes;\n }\n } else if (extraBytes < 0) {\n throw new Error(\"Corrupted zip: missing \" + Math.abs(extraBytes) + \" bytes.\");\n }\n },\n prepareReader: function(data) {\n this.reader = readerFor(data);\n },\n /**\n * Read a zip file and create ZipEntries.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.\n */\n load: function(data) {\n this.prepareReader(data);\n this.readEndOfCentral();\n this.readCentralDir();\n this.readLocalFiles();\n }\n};\n// }}} end of ZipEntries\nmodule.exports = ZipEntries;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/zipEntries.js\n// module id = 78\n// module chunks = 0","'use strict';\nvar readerFor = require('./reader/readerFor');\nvar utils = require('./utils');\nvar CompressedObject = require('./compressedObject');\nvar crc32fn = require('./crc32');\nvar utf8 = require('./utf8');\nvar compressions = require('./compressions');\nvar support = require('./support');\n\nvar MADE_BY_DOS = 0x00;\nvar MADE_BY_UNIX = 0x03;\n\n/**\n * Find a compression registered in JSZip.\n * @param {string} compressionMethod the method magic to find.\n * @return {Object|null} the JSZip compression object, null if none found.\n */\nvar findCompression = function(compressionMethod) {\n for (var method in compressions) {\n if (!compressions.hasOwnProperty(method)) {\n continue;\n }\n if (compressions[method].magic === compressionMethod) {\n return compressions[method];\n }\n }\n return null;\n};\n\n// class ZipEntry {{{\n/**\n * An entry in the zip file.\n * @constructor\n * @param {Object} options Options of the current file.\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntry(options, loadOptions) {\n this.options = options;\n this.loadOptions = loadOptions;\n}\nZipEntry.prototype = {\n /**\n * say if the file is encrypted.\n * @return {boolean} true if the file is encrypted, false otherwise.\n */\n isEncrypted: function() {\n // bit 1 is set\n return (this.bitFlag & 0x0001) === 0x0001;\n },\n /**\n * say if the file has utf-8 filename/comment.\n * @return {boolean} true if the filename/comment is in utf-8, false otherwise.\n */\n useUTF8: function() {\n // bit 11 is set\n return (this.bitFlag & 0x0800) === 0x0800;\n },\n /**\n * Read the local part of a zip file and add the info in this object.\n * @param {DataReader} reader the reader to use.\n */\n readLocalPart: function(reader) {\n var compression, localExtraFieldsLength;\n\n // we already know everything from the central dir !\n // If the central dir data are false, we are doomed.\n // On the bright side, the local part is scary : zip64, data descriptors, both, etc.\n // The less data we get here, the more reliable this should be.\n // Let's skip the whole header and dash to the data !\n reader.skip(22);\n // in some zip created on windows, the filename stored in the central dir contains \\ instead of /.\n // Strangely, the filename here is OK.\n // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes\n // or APPNOTE#4.4.17.1, \"All slashes MUST be forward slashes '/'\") but there are a lot of bad zip generators...\n // Search \"unzip mismatching \"local\" filename continuing with \"central\" filename version\" on\n // the internet.\n //\n // I think I see the logic here : the central directory is used to display\n // content and the local directory is used to extract the files. Mixing / and \\\n // may be used to display \\ to windows users and use / when extracting the files.\n // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394\n this.fileNameLength = reader.readInt(2);\n localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir\n // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding.\n this.fileName = reader.readData(this.fileNameLength);\n reader.skip(localExtraFieldsLength);\n\n if (this.compressedSize === -1 || this.uncompressedSize === -1) {\n throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory \" + \"(compressedSize === -1 || uncompressedSize === -1)\");\n }\n\n compression = findCompression(this.compressionMethod);\n if (compression === null) { // no compression found\n throw new Error(\"Corrupted zip : compression \" + utils.pretty(this.compressionMethod) + \" unknown (inner file : \" + utils.transformTo(\"string\", this.fileName) + \")\");\n }\n this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize));\n },\n\n /**\n * Read the central part of a zip file and add the info in this object.\n * @param {DataReader} reader the reader to use.\n */\n readCentralPart: function(reader) {\n this.versionMadeBy = reader.readInt(2);\n reader.skip(2);\n // this.versionNeeded = reader.readInt(2);\n this.bitFlag = reader.readInt(2);\n this.compressionMethod = reader.readString(2);\n this.date = reader.readDate();\n this.crc32 = reader.readInt(4);\n this.compressedSize = reader.readInt(4);\n this.uncompressedSize = reader.readInt(4);\n var fileNameLength = reader.readInt(2);\n this.extraFieldsLength = reader.readInt(2);\n this.fileCommentLength = reader.readInt(2);\n this.diskNumberStart = reader.readInt(2);\n this.internalFileAttributes = reader.readInt(2);\n this.externalFileAttributes = reader.readInt(4);\n this.localHeaderOffset = reader.readInt(4);\n\n if (this.isEncrypted()) {\n throw new Error(\"Encrypted zip are not supported\");\n }\n\n // will be read in the local part, see the comments there\n reader.skip(fileNameLength);\n this.readExtraFields(reader);\n this.parseZIP64ExtraField(reader);\n this.fileComment = reader.readData(this.fileCommentLength);\n },\n\n /**\n * Parse the external file attributes and get the unix/dos permissions.\n */\n processAttributes: function () {\n this.unixPermissions = null;\n this.dosPermissions = null;\n var madeBy = this.versionMadeBy >> 8;\n\n // Check if we have the DOS directory flag set.\n // We look for it in the DOS and UNIX permissions\n // but some unknown platform could set it as a compatibility flag.\n this.dir = this.externalFileAttributes & 0x0010 ? true : false;\n\n if(madeBy === MADE_BY_DOS) {\n // first 6 bits (0 to 5)\n this.dosPermissions = this.externalFileAttributes & 0x3F;\n }\n\n if(madeBy === MADE_BY_UNIX) {\n this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;\n // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);\n }\n\n // fail safe : if the name ends with a / it probably means a folder\n if (!this.dir && this.fileNameStr.slice(-1) === '/') {\n this.dir = true;\n }\n },\n\n /**\n * Parse the ZIP64 extra field and merge the info in the current ZipEntry.\n * @param {DataReader} reader the reader to use.\n */\n parseZIP64ExtraField: function(reader) {\n\n if (!this.extraFields[0x0001]) {\n return;\n }\n\n // should be something, preparing the extra reader\n var extraReader = readerFor(this.extraFields[0x0001].value);\n\n // I really hope that these 64bits integer can fit in 32 bits integer, because js\n // won't let us have more.\n if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {\n this.uncompressedSize = extraReader.readInt(8);\n }\n if (this.compressedSize === utils.MAX_VALUE_32BITS) {\n this.compressedSize = extraReader.readInt(8);\n }\n if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {\n this.localHeaderOffset = extraReader.readInt(8);\n }\n if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {\n this.diskNumberStart = extraReader.readInt(4);\n }\n },\n /**\n * Read the central part of a zip file and add the info in this object.\n * @param {DataReader} reader the reader to use.\n */\n readExtraFields: function(reader) {\n var end = reader.index + this.extraFieldsLength,\n extraFieldId,\n extraFieldLength,\n extraFieldValue;\n\n if (!this.extraFields) {\n this.extraFields = {};\n }\n\n while (reader.index < end) {\n extraFieldId = reader.readInt(2);\n extraFieldLength = reader.readInt(2);\n extraFieldValue = reader.readData(extraFieldLength);\n\n this.extraFields[extraFieldId] = {\n id: extraFieldId,\n length: extraFieldLength,\n value: extraFieldValue\n };\n }\n },\n /**\n * Apply an UTF8 transformation if needed.\n */\n handleUTF8: function() {\n var decodeParamType = support.uint8array ? \"uint8array\" : \"array\";\n if (this.useUTF8()) {\n this.fileNameStr = utf8.utf8decode(this.fileName);\n this.fileCommentStr = utf8.utf8decode(this.fileComment);\n } else {\n var upath = this.findExtraFieldUnicodePath();\n if (upath !== null) {\n this.fileNameStr = upath;\n } else {\n // ASCII text or unsupported code page\n var fileNameByteArray = utils.transformTo(decodeParamType, this.fileName);\n this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray);\n }\n\n var ucomment = this.findExtraFieldUnicodeComment();\n if (ucomment !== null) {\n this.fileCommentStr = ucomment;\n } else {\n // ASCII text or unsupported code page\n var commentByteArray = utils.transformTo(decodeParamType, this.fileComment);\n this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray);\n }\n }\n },\n\n /**\n * Find the unicode path declared in the extra field, if any.\n * @return {String} the unicode path, null otherwise.\n */\n findExtraFieldUnicodePath: function() {\n var upathField = this.extraFields[0x7075];\n if (upathField) {\n var extraReader = readerFor(upathField.value);\n\n // wrong version\n if (extraReader.readInt(1) !== 1) {\n return null;\n }\n\n // the crc of the filename changed, this field is out of date.\n if (crc32fn(this.fileName) !== extraReader.readInt(4)) {\n return null;\n }\n\n return utf8.utf8decode(extraReader.readData(upathField.length - 5));\n }\n return null;\n },\n\n /**\n * Find the unicode comment declared in the extra field, if any.\n * @return {String} the unicode comment, null otherwise.\n */\n findExtraFieldUnicodeComment: function() {\n var ucommentField = this.extraFields[0x6375];\n if (ucommentField) {\n var extraReader = readerFor(ucommentField.value);\n\n // wrong version\n if (extraReader.readInt(1) !== 1) {\n return null;\n }\n\n // the crc of the comment changed, this field is out of date.\n if (crc32fn(this.fileComment) !== extraReader.readInt(4)) {\n return null;\n }\n\n return utf8.utf8decode(extraReader.readData(ucommentField.length - 5));\n }\n return null;\n }\n};\nmodule.exports = ZipEntry;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/zipEntry.js\n// module id = 79\n// module chunks = 0","'use strict';\n\nvar StreamHelper = require('./stream/StreamHelper');\nvar DataWorker = require('./stream/DataWorker');\nvar utf8 = require('./utf8');\nvar CompressedObject = require('./compressedObject');\nvar GenericWorker = require('./stream/GenericWorker');\n\n/**\n * A simple object representing a file in the zip file.\n * @constructor\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data\n * @param {Object} options the options of the file\n */\nvar ZipObject = function(name, data, options) {\n this.name = name;\n this.dir = options.dir;\n this.date = options.date;\n this.comment = options.comment;\n this.unixPermissions = options.unixPermissions;\n this.dosPermissions = options.dosPermissions;\n\n this._data = data;\n this._dataBinary = options.binary;\n // keep only the compression\n this.options = {\n compression : options.compression,\n compressionOptions : options.compressionOptions\n };\n};\n\nZipObject.prototype = {\n /**\n * Create an internal stream for the content of this object.\n * @param {String} type the type of each chunk.\n * @return StreamHelper the stream.\n */\n internalStream: function (type) {\n var result = null, outputType = \"string\";\n try {\n if (!type) {\n throw new Error(\"No output type specified.\");\n }\n outputType = type.toLowerCase();\n var askUnicodeString = outputType === \"string\" || outputType === \"text\";\n if (outputType === \"binarystring\" || outputType === \"text\") {\n outputType = \"string\";\n }\n result = this._decompressWorker();\n\n var isUnicodeString = !this._dataBinary;\n\n if (isUnicodeString && !askUnicodeString) {\n result = result.pipe(new utf8.Utf8EncodeWorker());\n }\n if (!isUnicodeString && askUnicodeString) {\n result = result.pipe(new utf8.Utf8DecodeWorker());\n }\n } catch (e) {\n result = new GenericWorker(\"error\");\n result.error(e);\n }\n\n return new StreamHelper(result, outputType, \"\");\n },\n\n /**\n * Prepare the content in the asked type.\n * @param {String} type the type of the result.\n * @param {Function} onUpdate a function to call on each internal update.\n * @return Promise the promise of the result.\n */\n async: function (type, onUpdate) {\n return this.internalStream(type).accumulate(onUpdate);\n },\n\n /**\n * Prepare the content as a nodejs stream.\n * @param {String} type the type of each chunk.\n * @param {Function} onUpdate a function to call on each internal update.\n * @return Stream the stream.\n */\n nodeStream: function (type, onUpdate) {\n return this.internalStream(type || \"nodebuffer\").toNodejsStream(onUpdate);\n },\n\n /**\n * Return a worker for the compressed content.\n * @private\n * @param {Object} compression the compression object to use.\n * @param {Object} compressionOptions the options to use when compressing.\n * @return Worker the worker.\n */\n _compressWorker: function (compression, compressionOptions) {\n if (\n this._data instanceof CompressedObject &&\n this._data.compression.magic === compression.magic\n ) {\n return this._data.getCompressedWorker();\n } else {\n var result = this._decompressWorker();\n if(!this._dataBinary) {\n result = result.pipe(new utf8.Utf8EncodeWorker());\n }\n return CompressedObject.createWorkerFrom(result, compression, compressionOptions);\n }\n },\n /**\n * Return a worker for the decompressed content.\n * @private\n * @return Worker the worker.\n */\n _decompressWorker : function () {\n if (this._data instanceof CompressedObject) {\n return this._data.getContentWorker();\n } else if (this._data instanceof GenericWorker) {\n return this._data;\n } else {\n return new DataWorker(this._data);\n }\n }\n};\n\nvar removedMethods = [\"asText\", \"asBinary\", \"asNodeBuffer\", \"asUint8Array\", \"asArrayBuffer\"];\nvar removedFn = function () {\n throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n};\n\nfor(var i = 0; i < removedMethods.length; i++) {\n ZipObject.prototype[removedMethods[i]] = removedFn;\n}\nmodule.exports = ZipObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/zipObject.js\n// module id = 80\n// module chunks = 0","require('../modules/web.immediate');\nmodule.exports = require('../modules/_core').setImmediate;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/fn/set-immediate.js\n// module id = 81\n// module chunks = 0","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_a-function.js\n// module id = 82\n// module chunks = 0","var isObject = require('./_is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_an-object.js\n// module id = 83\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_cof.js\n// module id = 84\n// module chunks = 0","var global = require('./_global')\n , core = require('./_core')\n , ctx = require('./_ctx')\n , hide = require('./_hide')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE]\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(a, b, c){\n if(this instanceof C){\n switch(arguments.length){\n case 0: return new C;\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if(IS_PROTO){\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_export.js\n// module id = 85\n// module chunks = 0","var dP = require('./_object-dp')\n , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_hide.js\n// module id = 86\n// module chunks = 0","module.exports = require('./_global').document && document.documentElement;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_html.js\n// module id = 87\n// module chunks = 0","module.exports = !require('./_descriptors') && !require('./_fails')(function(){\r\n return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\r\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_ie8-dom-define.js\n// module id = 88\n// module chunks = 0","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_invoke.js\n// module id = 89\n// module chunks = 0","var anObject = require('./_an-object')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , toPrimitive = require('./_to-primitive')\n , dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if(IE8_DOM_DEFINE)try {\n return dP(O, P, Attributes);\n } catch(e){ /* empty */ }\n if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n if('value' in Attributes)O[P] = Attributes.value;\n return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_object-dp.js\n// module id = 90\n// module chunks = 0","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_property-desc.js\n// module id = 91\n// module chunks = 0","var ctx = require('./_ctx')\n , invoke = require('./_invoke')\n , html = require('./_html')\n , cel = require('./_dom-create')\n , global = require('./_global')\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(require('./_cof')(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_task.js\n// module id = 92\n// module chunks = 0","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n if(!isObject(it))return it;\n var fn, val;\n if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_to-primitive.js\n// module id = 93\n// module chunks = 0","var $export = require('./_export')\n , $task = require('./_task');\n$export($export.G + $export.B, {\n setImmediate: $task.set,\n clearImmediate: $task.clear\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/web.immediate.js\n// module id = 94\n// module chunks = 0","'use strict';\nvar immediate = require('immediate');\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lie/lib/browser.js\n// module id = 95\n// module chunks = 0","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/index.js\n// module id = 96\n// module chunks = 0","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/deflate.js\n// module id = 97\n// module chunks = 0","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n var dict;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n // Convert data if needed\n if (typeof dictionary === 'string') {\n dict = strings.string2buf(dictionary);\n } else if (toString.call(dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(dictionary);\n } else {\n dict = dictionary;\n }\n\n status = zlib_inflate.inflateSetDictionary(this.strm, dict);\n\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/inflate.js\n// module id = 98\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/deflate.js\n// module id = 99\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/gzheader.js\n// module id = 100\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/inffast.js\n// module id = 101\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/inflate.js\n// module id = 102\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/inftrees.js\n// module id = 103\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n var len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n var n; /* iterates over tree elements */\n var bits; /* bit counter */\n var length; /* length value */\n var code; /* code value */\n var dist; /* distance index */\n var bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/trees.js\n// module id = 104\n// module chunks = 0","module.exports = require('./lib/_stream_duplex.js');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/duplex-browser.js\n// module id = 105\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_passthrough.js\n// module id = 106\n// module chunks = 0","'use strict';\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = require('safe-buffer').Buffer;\nvar util = require('util');\n\nfunction copyBuffer(src, target, offset) {\n src.copy(target, offset);\n}\n\nmodule.exports = function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n BufferList.prototype.push = function push(v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n };\n\n BufferList.prototype.unshift = function unshift(v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n };\n\n BufferList.prototype.shift = function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n };\n\n BufferList.prototype.clear = function clear() {\n this.head = this.tail = null;\n this.length = 0;\n };\n\n BufferList.prototype.join = function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n };\n\n BufferList.prototype.concat = function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n };\n\n return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n module.exports.prototype[util.inspect.custom] = function () {\n var obj = util.inspect({ length: this.length });\n return this.constructor.name + ' ' + obj;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/internal/streams/BufferList.js\n// module id = 107\n// module chunks = 0","module.exports = require('./readable').PassThrough\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/passthrough.js\n// module id = 108\n// module chunks = 0","module.exports = require('./readable').Transform\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/transform.js\n// module id = 109\n// module chunks = 0","module.exports = require('./lib/_stream_writable.js');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/writable-browser.js\n// module id = 110\n// module chunks = 0","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/setimmediate/setImmediate.js\n// module id = 111\n// module chunks = 0","module.exports = {\n framer: require('./src/framer.js'),\n windows: require('./src/windows.js')\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/signal-windows/index.js\n// module id = 112\n// module chunks = 0","/*===========================================================================*\\\n * Framer for breaking a U-Law ByteBuffer or Array into windows of a particular\n * size at an arbitrary step.\n *\n * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015\n\\*===========================================================================*/\nvar Framer = function (options) {\n options = options || {};\n\n this.frameIx = 0;\n this.frameSize = options.frameSize || 64;\n this.frameStep = options.frameStep|| this.frameSize;\n this.map = options.map || undefined;\n this.scale = options.scale || undefined;\n this.offset = options.offset ? options.offset : 0;\n this.sampleType = options.sampleType || 'UInt8';\n this.wordSize = options.wordSize || 1;\n};\n\nFramer.prototype = {\n /**\n * Frames a buffer of single-byte char values or an array of Numbers into windows of the specified size.\n */\n frame: function(bufferOrArray, callback) {\n var self = this,\n ix = this.offset,\n frame = [],\n isArray = Object.prototype.toString.call( bufferOrArray) === '[object Array]';\n\n self.frameIx = 0;\n\n while (ix < bufferOrArray.length) {\n var value = isArray ? bufferOrArray[ix] : bufferOrArray['read' + self.sampleType](ix); \n\n frame.push(this.map ? this.map[value] : value);\n\n if (frame.length == this.frameSize || ix+self.wordSize == bufferOrArray.length) finishFrame(frame);\n\n ix += self.wordSize;\n }\n\n // Did we not process any frames at all for some reason?\n if (this.frameIx == 0) callback(undefined);\n\n function finishFrame(frame) {\n if (this.scale) frame = frame.map(function (s, ix) {return s * self.scale[ix];});\n\n callback(frame, self.frameIx);\n\n if (ix != bufferOrArray.length - self.wordSize)\n {\n ix -= (self.frameSize - self.frameStep) * self.wordSize;\n\n self.frameIx++;\n frame.length = 0;\n }\n }\n }\n};\n\nmodule.exports = Framer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/signal-windows/src/framer.js\n// module id = 113\n// module chunks = 0","/*===========================================================================*\\\n * Method for producing the coefficients for windowing functions of an\n * arbitrary length.\n *\n * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015\n\\*===========================================================================*/\nmodule.exports = {\n construct: function (type, sampleCount, alpha) {\n var coef = [];\n switch (type)\n {\n case 'ham': \n for (var i = 0; i < sampleCount; i++) {\n coef[i] = 0.54 - 0.46 * Math.cos((2 * Math.PI * i)/(sampleCount - 1));\n }\n break;\n case 'tukey':\n var sm1 = sampleCount - 1,\n asm1 = alpha * sm1;\n for (var i = 0; i < sampleCount; i++) {\n // Left tail\n if (i < asm1 / 2)\n coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - 1))); \n // Right tail\n else if (i > (sm1 * (1 - alpha / 2)))\n coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - (2 / alpha) + 1)));\n // Middle (rectangular)\n else coef[i] = 1;\n }\n break;\n case 'rectangular':\n for (var i = 0; i < sampleCount; i++)\n coef[i] = 1.0;\n break;\n }\n return coef;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/signal-windows/src/windows.js\n// module id = 114\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/stream-browserify/index.js\n// module id = 115\n// module chunks = 0","var apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmeidate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/timers-browserify/main.js\n// module id = 116\n// module chunks = 0","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/util-deprecate/browser.js\n// module id = 117\n// module chunks = 0","/* global window, exports, define */\n\n!function() {\n 'use strict'\n\n var re = {\n not_string: /[^s]/,\n not_bool: /[^t]/,\n not_type: /[^T]/,\n not_primitive: /[^v]/,\n number: /[diefg]/,\n numeric_arg: /[bcdiefguxX]/,\n json: /[j]/,\n not_json: /[^j]/,\n text: /^[^\\x25]+/,\n modulo: /^\\x25{2}/,\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n key: /^([a-z_][a-z_\\d]*)/i,\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n index_access: /^\\[(\\d+)\\]/,\n sign: /^[\\+\\-]/\n }\n\n function sprintf(key) {\n // `arguments` is not an array, but should be fine for this call\n return sprintf_format(sprintf_parse(key), arguments)\n }\n\n function vsprintf(fmt, argv) {\n return sprintf.apply(null, [fmt].concat(argv || []))\n }\n\n function sprintf_format(parse_tree, argv) {\n var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, match, pad, pad_character, pad_length, is_positive, sign\n for (i = 0; i < tree_length; i++) {\n if (typeof parse_tree[i] === 'string') {\n output += parse_tree[i]\n }\n else if (Array.isArray(parse_tree[i])) {\n match = parse_tree[i] // convenience purposes only\n if (match[2]) { // keyword argument\n arg = argv[cursor]\n for (k = 0; k < match[2].length; k++) {\n if (!arg.hasOwnProperty(match[2][k])) {\n throw new Error(sprintf('[sprintf] property \"%s\" does not exist', match[2][k]))\n }\n arg = arg[match[2][k]]\n }\n }\n else if (match[1]) { // positional argument (explicit)\n arg = argv[match[1]]\n }\n else { // positional argument (implicit)\n arg = argv[cursor++]\n }\n\n if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && arg instanceof Function) {\n arg = arg()\n }\n\n if (re.numeric_arg.test(match[8]) && (typeof arg !== 'number' && isNaN(arg))) {\n throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))\n }\n\n if (re.number.test(match[8])) {\n is_positive = arg >= 0\n }\n\n switch (match[8]) {\n case 'b':\n arg = parseInt(arg, 10).toString(2)\n break\n case 'c':\n arg = String.fromCharCode(parseInt(arg, 10))\n break\n case 'd':\n case 'i':\n arg = parseInt(arg, 10)\n break\n case 'j':\n arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0)\n break\n case 'e':\n arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential()\n break\n case 'f':\n arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)\n break\n case 'g':\n arg = match[7] ? String(Number(arg.toPrecision(match[7]))) : parseFloat(arg)\n break\n case 'o':\n arg = (parseInt(arg, 10) >>> 0).toString(8)\n break\n case 's':\n arg = String(arg)\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 't':\n arg = String(!!arg)\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 'T':\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 'u':\n arg = parseInt(arg, 10) >>> 0\n break\n case 'v':\n arg = arg.valueOf()\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 'x':\n arg = (parseInt(arg, 10) >>> 0).toString(16)\n break\n case 'X':\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\n break\n }\n if (re.json.test(match[8])) {\n output += arg\n }\n else {\n if (re.number.test(match[8]) && (!is_positive || match[3])) {\n sign = is_positive ? '+' : '-'\n arg = arg.toString().replace(re.sign, '')\n }\n else {\n sign = ''\n }\n pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' '\n pad_length = match[6] - (sign + arg).length\n pad = match[6] ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\n output += match[5] ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\n }\n }\n }\n return output\n }\n\n var sprintf_cache = Object.create(null)\n\n function sprintf_parse(fmt) {\n if (sprintf_cache[fmt]) {\n return sprintf_cache[fmt]\n }\n\n var _fmt = fmt, match, parse_tree = [], arg_names = 0\n while (_fmt) {\n if ((match = re.text.exec(_fmt)) !== null) {\n parse_tree.push(match[0])\n }\n else if ((match = re.modulo.exec(_fmt)) !== null) {\n parse_tree.push('%')\n }\n else if ((match = re.placeholder.exec(_fmt)) !== null) {\n if (match[2]) {\n arg_names |= 1\n var field_list = [], replacement_field = match[2], field_match = []\n if ((field_match = re.key.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n }\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n match[2] = field_list\n }\n else {\n arg_names |= 2\n }\n if (arg_names === 3) {\n throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\n }\n parse_tree.push(match)\n }\n else {\n throw new SyntaxError('[sprintf] unexpected placeholder')\n }\n _fmt = _fmt.substring(match[0].length)\n }\n return sprintf_cache[fmt] = parse_tree\n }\n\n /**\n * export to either browser or node.js\n */\n /* eslint-disable quote-props */\n if (typeof exports !== 'undefined') {\n exports['sprintf'] = sprintf\n exports['vsprintf'] = vsprintf\n }\n if (typeof window !== 'undefined') {\n window['sprintf'] = sprintf\n window['vsprintf'] = vsprintf\n\n if (typeof define === 'function' && define['amd']) {\n define(function() {\n return {\n 'sprintf': sprintf,\n 'vsprintf': vsprintf\n }\n })\n }\n }\n /* eslint-enable quote-props */\n}()\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprintf-js/src/sprintf.js\n// module id = 120\n// module chunks = 0","/* FileSaver.js\n * A saveAs() FileSaver implementation.\n * 1.3.2\n * 2016-06-16 18:25:19\n *\n * By Eli Grey, http://eligrey.com\n * License: MIT\n * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n */\n\n/*global self */\n/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */\n\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */\n\nvar saveAs = saveAs || (function(view) {\n\t\"use strict\";\n\t// IE <10 is explicitly unsupported\n\tif (typeof view === \"undefined\" || typeof navigator !== \"undefined\" && /MSIE [1-9]\\./.test(navigator.userAgent)) {\n\t\treturn;\n\t}\n\tvar\n\t\t doc = view.document\n\t\t // only get URL when necessary in case Blob.js hasn't overridden it yet\n\t\t, get_URL = function() {\n\t\t\treturn view.URL || view.webkitURL || view;\n\t\t}\n\t\t, save_link = doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"a\")\n\t\t, can_use_save_link = \"download\" in save_link\n\t\t, click = function(node) {\n\t\t\tvar event = new MouseEvent(\"click\");\n\t\t\tnode.dispatchEvent(event);\n\t\t}\n\t\t, is_safari = /constructor/i.test(view.HTMLElement) || view.safari\n\t\t, is_chrome_ios =/CriOS\\/[\\d]+/.test(navigator.userAgent)\n\t\t, throw_outside = function(ex) {\n\t\t\t(view.setImmediate || view.setTimeout)(function() {\n\t\t\t\tthrow ex;\n\t\t\t}, 0);\n\t\t}\n\t\t, force_saveable_type = \"application/octet-stream\"\n\t\t// the Blob API is fundamentally broken as there is no \"downloadfinished\" event to subscribe to\n\t\t, arbitrary_revoke_timeout = 1000 * 40 // in ms\n\t\t, revoke = function(file) {\n\t\t\tvar revoker = function() {\n\t\t\t\tif (typeof file === \"string\") { // file is an object URL\n\t\t\t\t\tget_URL().revokeObjectURL(file);\n\t\t\t\t} else { // file is a File\n\t\t\t\t\tfile.remove();\n\t\t\t\t}\n\t\t\t};\n\t\t\tsetTimeout(revoker, arbitrary_revoke_timeout);\n\t\t}\n\t\t, dispatch = function(filesaver, event_types, event) {\n\t\t\tevent_types = [].concat(event_types);\n\t\t\tvar i = event_types.length;\n\t\t\twhile (i--) {\n\t\t\t\tvar listener = filesaver[\"on\" + event_types[i]];\n\t\t\t\tif (typeof listener === \"function\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener.call(filesaver, event || filesaver);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tthrow_outside(ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t, auto_bom = function(blob) {\n\t\t\t// prepend BOM for UTF-8 XML and text/* types (including HTML)\n\t\t\t// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n\t\t\tif (/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n\t\t\t\treturn new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});\n\t\t\t}\n\t\t\treturn blob;\n\t\t}\n\t\t, FileSaver = function(blob, name, no_auto_bom) {\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\t// First try a.download, then web filesystem, then object URLs\n\t\t\tvar\n\t\t\t\t filesaver = this\n\t\t\t\t, type = blob.type\n\t\t\t\t, force = type === force_saveable_type\n\t\t\t\t, object_url\n\t\t\t\t, dispatch_all = function() {\n\t\t\t\t\tdispatch(filesaver, \"writestart progress write writeend\".split(\" \"));\n\t\t\t\t}\n\t\t\t\t// on any filesys errors revert to saving with object URLs\n\t\t\t\t, fs_error = function() {\n\t\t\t\t\tif ((is_chrome_ios || (force && is_safari)) && view.FileReader) {\n\t\t\t\t\t\t// Safari doesn't allow downloading of blob urls\n\t\t\t\t\t\tvar reader = new FileReader();\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');\n\t\t\t\t\t\t\tvar popup = view.open(url, '_blank');\n\t\t\t\t\t\t\tif(!popup) view.location.href = url;\n\t\t\t\t\t\t\turl=undefined; // release reference before dispatching\n\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\tdispatch_all();\n\t\t\t\t\t\t};\n\t\t\t\t\t\treader.readAsDataURL(blob);\n\t\t\t\t\t\tfilesaver.readyState = filesaver.INIT;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// don't create more object URLs than needed\n\t\t\t\t\tif (!object_url) {\n\t\t\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t\t}\n\t\t\t\t\tif (force) {\n\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar opened = view.open(object_url, \"_blank\");\n\t\t\t\t\t\tif (!opened) {\n\t\t\t\t\t\t\t// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html\n\t\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t}\n\t\t\t;\n\t\t\tfilesaver.readyState = filesaver.INIT;\n\n\t\t\tif (can_use_save_link) {\n\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tsave_link.href = object_url;\n\t\t\t\t\tsave_link.download = name;\n\t\t\t\t\tclick(save_link);\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfs_error();\n\t\t}\n\t\t, FS_proto = FileSaver.prototype\n\t\t, saveAs = function(blob, name, no_auto_bom) {\n\t\t\treturn new FileSaver(blob, name || blob.name || \"download\", no_auto_bom);\n\t\t}\n\t;\n\t// IE 10+ (native saveAs)\n\tif (typeof navigator !== \"undefined\" && navigator.msSaveOrOpenBlob) {\n\t\treturn function(blob, name, no_auto_bom) {\n\t\t\tname = name || blob.name || \"download\";\n\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\treturn navigator.msSaveOrOpenBlob(blob, name);\n\t\t};\n\t}\n\n\tFS_proto.abort = function(){};\n\tFS_proto.readyState = FS_proto.INIT = 0;\n\tFS_proto.WRITING = 1;\n\tFS_proto.DONE = 2;\n\n\tFS_proto.error =\n\tFS_proto.onwritestart =\n\tFS_proto.onprogress =\n\tFS_proto.onwrite =\n\tFS_proto.onabort =\n\tFS_proto.onerror =\n\tFS_proto.onwriteend =\n\t\tnull;\n\n\treturn saveAs;\n}(\n\t typeof self !== \"undefined\" && self\n\t|| typeof window !== \"undefined\" && window\n\t|| this.content\n));\n// `self` is undefined in Firefox for Android content script context\n// while `this` is nsIContentFrameMessageManager\n// with an attribute `content` that corresponds to the window\n\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports.saveAs = saveAs;\n} else if ((typeof define !== \"undefined\" && define !== null) && (define.amd !== null)) {\n define(\"FileSaver.js\", function() {\n return saveAs;\n });\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/file-saver/FileSaver.js\n// module id = 121\n// module chunks = 0","module.exports = function() {\r\n\tthrow new Error(\"define cannot be used indirect\");\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-define.js\n// module id = 122\n// module chunks = 0","/* globals __webpack_amd_options__ */\r\nmodule.exports = __webpack_amd_options__;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-options.js\n// module id = 123\n// module chunks = 0"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5vDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnivBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpqBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC1FA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnNA;AACA;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACt/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACzEA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC/QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpIA;AACA;;;;;;ACDA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;;;;;;ACAA;AACA;AACA;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACj1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnhDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnsCA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC9EA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzLA;AACA;AACA;AACA;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;ACzNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;;;;;;;AC3LA;AACA;AACA;;;;;;;ACFA;AACA;;;;;A","sourceRoot":""} \ No newline at end of file
+{"version":3,"file":"./bundle.js","sources":["webpack:///webpack/bootstrap 2054b6ab3a364c73ff1e","webpack:///./~/jszip/lib/utils.js","webpack:///./~/jszip/lib/stream/GenericWorker.js","webpack:///./~/jszip/lib/support.js","webpack:///./~/pako/lib/utils/common.js","webpack:///./~/readable-stream/lib/_stream_duplex.js","webpack:///(webpack)/buildin/global.js","webpack:///./~/inherits/inherits_browser.js","webpack:///./~/jszip/lib/utf8.js","webpack:///./~/buffer/index.js","webpack:///./~/core-util-is/lib/util.js","webpack:///./~/jszip/lib/external.js","webpack:///./~/tone/build/Tone.js","webpack:///./~/jszip/lib/nodejsUtils.js","webpack:///./~/jszip/~/core-js/library/modules/_global.js","webpack:///./~/process-nextick-args/index.js","webpack:///./~/process/browser.js","webpack:///./~/safe-buffer/index.js","webpack:///./client/lib/util.js","webpack:///./~/events/events.js","webpack:///./~/jszip/lib/compressedObject.js","webpack:///./~/jszip/lib/crc32.js","webpack:///./~/jszip/~/core-js/library/modules/_descriptors.js","webpack:///./~/jszip/~/core-js/library/modules/_is-object.js","webpack:///./~/pako/lib/zlib/messages.js","webpack:///./~/readable-stream/lib/_stream_writable.js","webpack:///./~/readable-stream/readable-browser.js","webpack:///./client/lib/mouse.js","webpack:///./~/isarray/index.js","webpack:///./~/jszip/lib/base64.js","webpack:///./~/jszip/lib/compressions.js","webpack:///./~/jszip/lib/defaults.js","webpack:///./~/jszip/lib/readable-stream-browser.js","webpack:///./~/jszip/lib/reader/ArrayReader.js","webpack:///./~/jszip/lib/reader/DataReader.js","webpack:///./~/jszip/lib/reader/Uint8ArrayReader.js","webpack:///./~/jszip/lib/reader/readerFor.js","webpack:///./~/jszip/lib/signature.js","webpack:///./~/jszip/lib/stream/Crc32Probe.js","webpack:///./~/jszip/lib/stream/DataLengthProbe.js","webpack:///./~/jszip/lib/stream/DataWorker.js","webpack:///./~/jszip/lib/stream/StreamHelper.js","webpack:///./~/jszip/~/core-js/library/modules/_core.js","webpack:///./~/jszip/~/core-js/library/modules/_ctx.js","webpack:///./~/jszip/~/core-js/library/modules/_dom-create.js","webpack:///./~/jszip/~/core-js/library/modules/_fails.js","webpack:///./~/pako/lib/utils/strings.js","webpack:///./~/pako/lib/zlib/adler32.js","webpack:///./~/pako/lib/zlib/constants.js","webpack:///./~/pako/lib/zlib/crc32.js","webpack:///./~/pako/lib/zlib/zstream.js","webpack:///./~/readable-stream/lib/_stream_readable.js","webpack:///./~/readable-stream/lib/_stream_transform.js","webpack:///./~/readable-stream/lib/internal/streams/destroy.js","webpack:///./~/readable-stream/lib/internal/streams/stream-browser.js","webpack:///./~/string_decoder/lib/string_decoder.js","webpack:///./client/draw.js","webpack:///./client/lib/keys.js","webpack:///./client/lib/output.js","webpack:///./client/lib/spectrum.js","webpack:///./~/jszip/lib/index.js","webpack:///./client/index.js","webpack:///./client/lib/color.js","webpack:///./client/lib/startAudioContext.js","webpack:///./client/lib/vendor/hidpi-canvas.js","webpack:///./~/base64-js/index.js","webpack:///./~/fft.js/lib/fft.js","webpack:///./~/ieee754/index.js","webpack:///./~/immediate/lib/browser.js","webpack:///./~/jszip/lib/flate.js","webpack:///./~/jszip/lib/generate/ZipFileWorker.js","webpack:///./~/jszip/lib/generate/index.js","webpack:///./~/jszip/lib/load.js","webpack:///./~/jszip/lib/nodejs/NodejsStreamInputAdapter.js","webpack:///./~/jszip/lib/nodejs/NodejsStreamOutputAdapter.js","webpack:///./~/jszip/lib/object.js","webpack:///./~/jszip/lib/reader/NodeBufferReader.js","webpack:///./~/jszip/lib/reader/StringReader.js","webpack:///./~/jszip/lib/stream/ConvertWorker.js","webpack:///./~/jszip/lib/zipEntries.js","webpack:///./~/jszip/lib/zipEntry.js","webpack:///./~/jszip/lib/zipObject.js","webpack:///./~/jszip/~/core-js/library/fn/set-immediate.js","webpack:///./~/jszip/~/core-js/library/modules/_a-function.js","webpack:///./~/jszip/~/core-js/library/modules/_an-object.js","webpack:///./~/jszip/~/core-js/library/modules/_cof.js","webpack:///./~/jszip/~/core-js/library/modules/_export.js","webpack:///./~/jszip/~/core-js/library/modules/_hide.js","webpack:///./~/jszip/~/core-js/library/modules/_html.js","webpack:///./~/jszip/~/core-js/library/modules/_ie8-dom-define.js","webpack:///./~/jszip/~/core-js/library/modules/_invoke.js","webpack:///./~/jszip/~/core-js/library/modules/_object-dp.js","webpack:///./~/jszip/~/core-js/library/modules/_property-desc.js","webpack:///./~/jszip/~/core-js/library/modules/_task.js","webpack:///./~/jszip/~/core-js/library/modules/_to-primitive.js","webpack:///./~/jszip/~/core-js/library/modules/web.immediate.js","webpack:///./~/lie/lib/browser.js","webpack:///./~/pako/index.js","webpack:///./~/pako/lib/deflate.js","webpack:///./~/pako/lib/inflate.js","webpack:///./~/pako/lib/zlib/deflate.js","webpack:///./~/pako/lib/zlib/gzheader.js","webpack:///./~/pako/lib/zlib/inffast.js","webpack:///./~/pako/lib/zlib/inflate.js","webpack:///./~/pako/lib/zlib/inftrees.js","webpack:///./~/pako/lib/zlib/trees.js","webpack:///./~/readable-stream/duplex-browser.js","webpack:///./~/readable-stream/lib/_stream_passthrough.js","webpack:///./~/readable-stream/lib/internal/streams/BufferList.js","webpack:///./~/readable-stream/passthrough.js","webpack:///./~/readable-stream/transform.js","webpack:///./~/readable-stream/writable-browser.js","webpack:///./~/setimmediate/setImmediate.js","webpack:///./~/signal-windows/index.js","webpack:///./~/signal-windows/src/framer.js","webpack:///./~/signal-windows/src/windows.js","webpack:///./~/stream-browserify/index.js","webpack:///./~/timers-browserify/main.js","webpack:///./~/util-deprecate/browser.js","webpack:///./~/sprintf-js/src/sprintf.js","webpack:///./~/file-saver/FileSaver.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 60);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 2054b6ab3a364c73ff1e","'use strict';\n\nvar support = require('./support');\nvar base64 = require('./base64');\nvar nodejsUtils = require('./nodejsUtils');\nvar setImmediate = require('core-js/library/fn/set-immediate');\nvar external = require(\"./external\");\n\n\n/**\n * Convert a string that pass as a \"binary string\": it should represent a byte\n * array but may have > 255 char codes. Be sure to take only the first byte\n * and returns the byte array.\n * @param {String} str the string to transform.\n * @return {Array|Uint8Array} the string in a binary format.\n */\nfunction string2binary(str) {\n var result = null;\n if (support.uint8array) {\n result = new Uint8Array(str.length);\n } else {\n result = new Array(str.length);\n }\n return stringToArrayLike(str, result);\n}\n\n/**\n * Create a new blob with the given content and the given type.\n * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use\n * an Uint8Array because the stock browser of android 4 won't accept it (it\n * will be silently converted to a string, \"[object Uint8Array]\").\n *\n * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge:\n * when a large amount of Array is used to create the Blob, the amount of\n * memory consumed is nearly 100 times the original data amount.\n *\n * @param {String} type the mime type of the blob.\n * @return {Blob} the created blob.\n */\nexports.newBlob = function(part, type) {\n exports.checkSupport(\"blob\");\n\n try {\n // Blob constructor\n return new Blob([part], {\n type: type\n });\n }\n catch (e) {\n\n try {\n // deprecated, browser only, old way\n var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n var builder = new Builder();\n builder.append(part);\n return builder.getBlob(type);\n }\n catch (e) {\n\n // well, fuck ?!\n throw new Error(\"Bug : can't construct the Blob.\");\n }\n }\n\n\n};\n/**\n * The identity function.\n * @param {Object} input the input.\n * @return {Object} the same input.\n */\nfunction identity(input) {\n return input;\n}\n\n/**\n * Fill in an array with a string.\n * @param {String} str the string to use.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.\n */\nfunction stringToArrayLike(str, array) {\n for (var i = 0; i < str.length; ++i) {\n array[i] = str.charCodeAt(i) & 0xFF;\n }\n return array;\n}\n\n/**\n * An helper for the function arrayLikeToString.\n * This contains static informations and functions that\n * can be optimized by the browser JIT compiler.\n */\nvar arrayToStringHelper = {\n /**\n * Transform an array of int into a string, chunk by chunk.\n * See the performances notes on arrayLikeToString.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @param {String} type the type of the array.\n * @param {Integer} chunk the chunk size.\n * @return {String} the resulting string.\n * @throws Error if the chunk is too big for the stack.\n */\n stringifyByChunk: function(array, type, chunk) {\n var result = [], k = 0, len = array.length;\n // shortcut\n if (len <= chunk) {\n return String.fromCharCode.apply(null, array);\n }\n while (k < len) {\n if (type === \"array\" || type === \"nodebuffer\") {\n result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));\n }\n else {\n result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));\n }\n k += chunk;\n }\n return result.join(\"\");\n },\n /**\n * Call String.fromCharCode on every item in the array.\n * This is the naive implementation, which generate A LOT of intermediate string.\n * This should be used when everything else fail.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @return {String} the result.\n */\n stringifyByChar: function(array){\n var resultStr = \"\";\n for(var i = 0; i < array.length; i++) {\n resultStr += String.fromCharCode(array[i]);\n }\n return resultStr;\n },\n applyCanBeUsed : {\n /**\n * true if the browser accepts to use String.fromCharCode on Uint8Array\n */\n uint8array : (function () {\n try {\n return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;\n } catch (e) {\n return false;\n }\n })(),\n /**\n * true if the browser accepts to use String.fromCharCode on nodejs Buffer.\n */\n nodebuffer : (function () {\n try {\n return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1;\n } catch (e) {\n return false;\n }\n })()\n }\n};\n\n/**\n * Transform an array-like object to a string.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @return {String} the result.\n */\nfunction arrayLikeToString(array) {\n // Performances notes :\n // --------------------\n // String.fromCharCode.apply(null, array) is the fastest, see\n // see http://jsperf.com/converting-a-uint8array-to-a-string/2\n // but the stack is limited (and we can get huge arrays !).\n //\n // result += String.fromCharCode(array[i]); generate too many strings !\n //\n // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2\n // TODO : we now have workers that split the work. Do we still need that ?\n var chunk = 65536,\n type = exports.getTypeOf(array),\n canUseApply = true;\n if (type === \"uint8array\") {\n canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;\n } else if (type === \"nodebuffer\") {\n canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;\n }\n\n if (canUseApply) {\n while (chunk > 1) {\n try {\n return arrayToStringHelper.stringifyByChunk(array, type, chunk);\n } catch (e) {\n chunk = Math.floor(chunk / 2);\n }\n }\n }\n\n // no apply or chunk error : slow and painful algorithm\n // default browser on android 4.*\n return arrayToStringHelper.stringifyByChar(array);\n}\n\nexports.applyFromCharCode = arrayLikeToString;\n\n\n/**\n * Copy the data from an array-like to an other array-like.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.\n */\nfunction arrayLikeToArrayLike(arrayFrom, arrayTo) {\n for (var i = 0; i < arrayFrom.length; i++) {\n arrayTo[i] = arrayFrom[i];\n }\n return arrayTo;\n}\n\n// a matrix containing functions to transform everything into everything.\nvar transform = {};\n\n// string to ?\ntransform[\"string\"] = {\n \"string\": identity,\n \"array\": function(input) {\n return stringToArrayLike(input, new Array(input.length));\n },\n \"arraybuffer\": function(input) {\n return transform[\"string\"][\"uint8array\"](input).buffer;\n },\n \"uint8array\": function(input) {\n return stringToArrayLike(input, new Uint8Array(input.length));\n },\n \"nodebuffer\": function(input) {\n return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length));\n }\n};\n\n// array to ?\ntransform[\"array\"] = {\n \"string\": arrayLikeToString,\n \"array\": identity,\n \"arraybuffer\": function(input) {\n return (new Uint8Array(input)).buffer;\n },\n \"uint8array\": function(input) {\n return new Uint8Array(input);\n },\n \"nodebuffer\": function(input) {\n return nodejsUtils.newBufferFrom(input);\n }\n};\n\n// arraybuffer to ?\ntransform[\"arraybuffer\"] = {\n \"string\": function(input) {\n return arrayLikeToString(new Uint8Array(input));\n },\n \"array\": function(input) {\n return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));\n },\n \"arraybuffer\": identity,\n \"uint8array\": function(input) {\n return new Uint8Array(input);\n },\n \"nodebuffer\": function(input) {\n return nodejsUtils.newBufferFrom(new Uint8Array(input));\n }\n};\n\n// uint8array to ?\ntransform[\"uint8array\"] = {\n \"string\": arrayLikeToString,\n \"array\": function(input) {\n return arrayLikeToArrayLike(input, new Array(input.length));\n },\n \"arraybuffer\": function(input) {\n return input.buffer;\n },\n \"uint8array\": identity,\n \"nodebuffer\": function(input) {\n return nodejsUtils.newBufferFrom(input);\n }\n};\n\n// nodebuffer to ?\ntransform[\"nodebuffer\"] = {\n \"string\": arrayLikeToString,\n \"array\": function(input) {\n return arrayLikeToArrayLike(input, new Array(input.length));\n },\n \"arraybuffer\": function(input) {\n return transform[\"nodebuffer\"][\"uint8array\"](input).buffer;\n },\n \"uint8array\": function(input) {\n return arrayLikeToArrayLike(input, new Uint8Array(input.length));\n },\n \"nodebuffer\": identity\n};\n\n/**\n * Transform an input into any type.\n * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.\n * If no output type is specified, the unmodified input will be returned.\n * @param {String} outputType the output type.\n * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.\n * @throws {Error} an Error if the browser doesn't support the requested output type.\n */\nexports.transformTo = function(outputType, input) {\n if (!input) {\n // undefined, null, etc\n // an empty string won't harm.\n input = \"\";\n }\n if (!outputType) {\n return input;\n }\n exports.checkSupport(outputType);\n var inputType = exports.getTypeOf(input);\n var result = transform[inputType][outputType](input);\n return result;\n};\n\n/**\n * Return the type of the input.\n * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.\n * @param {Object} input the input to identify.\n * @return {String} the (lowercase) type of the input.\n */\nexports.getTypeOf = function(input) {\n if (typeof input === \"string\") {\n return \"string\";\n }\n if (Object.prototype.toString.call(input) === \"[object Array]\") {\n return \"array\";\n }\n if (support.nodebuffer && nodejsUtils.isBuffer(input)) {\n return \"nodebuffer\";\n }\n if (support.uint8array && input instanceof Uint8Array) {\n return \"uint8array\";\n }\n if (support.arraybuffer && input instanceof ArrayBuffer) {\n return \"arraybuffer\";\n }\n};\n\n/**\n * Throw an exception if the type is not supported.\n * @param {String} type the type to check.\n * @throws {Error} an Error if the browser doesn't support the requested type.\n */\nexports.checkSupport = function(type) {\n var supported = support[type.toLowerCase()];\n if (!supported) {\n throw new Error(type + \" is not supported by this platform\");\n }\n};\n\nexports.MAX_VALUE_16BITS = 65535;\nexports.MAX_VALUE_32BITS = -1; // well, \"\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\" is parsed as -1\n\n/**\n * Prettify a string read as binary.\n * @param {string} str the string to prettify.\n * @return {string} a pretty string.\n */\nexports.pretty = function(str) {\n var res = '',\n code, i;\n for (i = 0; i < (str || \"\").length; i++) {\n code = str.charCodeAt(i);\n res += '\\\\x' + (code < 16 ? \"0\" : \"\") + code.toString(16).toUpperCase();\n }\n return res;\n};\n\n/**\n * Defer the call of a function.\n * @param {Function} callback the function to call asynchronously.\n * @param {Array} args the arguments to give to the callback.\n */\nexports.delay = function(callback, args, self) {\n setImmediate(function () {\n callback.apply(self || null, args || []);\n });\n};\n\n/**\n * Extends a prototype with an other, without calling a constructor with\n * side effects. Inspired by nodejs' `utils.inherits`\n * @param {Function} ctor the constructor to augment\n * @param {Function} superCtor the parent constructor to use\n */\nexports.inherits = function (ctor, superCtor) {\n var Obj = function() {};\n Obj.prototype = superCtor.prototype;\n ctor.prototype = new Obj();\n};\n\n/**\n * Merge the objects passed as parameters into a new one.\n * @private\n * @param {...Object} var_args All objects to merge.\n * @return {Object} a new object with the data of the others.\n */\nexports.extend = function() {\n var result = {}, i, attr;\n for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers\n for (attr in arguments[i]) {\n if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === \"undefined\") {\n result[attr] = arguments[i][attr];\n }\n }\n }\n return result;\n};\n\n/**\n * Transform arbitrary content into a Promise.\n * @param {String} name a name for the content being processed.\n * @param {Object} inputData the content to process.\n * @param {Boolean} isBinary true if the content is not an unicode string\n * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character.\n * @param {Boolean} isBase64 true if the string content is encoded with base64.\n * @return {Promise} a promise in a format usable by JSZip.\n */\nexports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {\n\n // if inputData is already a promise, this flatten it.\n var promise = external.Promise.resolve(inputData).then(function(data) {\n \n \n var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1);\n\n if (isBlob && typeof FileReader !== \"undefined\") {\n return new external.Promise(function (resolve, reject) {\n var reader = new FileReader();\n\n reader.onload = function(e) {\n resolve(e.target.result);\n };\n reader.onerror = function(e) {\n reject(e.target.error);\n };\n reader.readAsArrayBuffer(data);\n });\n } else {\n return data;\n }\n });\n\n return promise.then(function(data) {\n var dataType = exports.getTypeOf(data);\n\n if (!dataType) {\n return external.Promise.reject(\n new Error(\"Can't read the data of '\" + name + \"'. Is it \" +\n \"in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?\")\n );\n }\n // special case : it's way easier to work with Uint8Array than with ArrayBuffer\n if (dataType === \"arraybuffer\") {\n data = exports.transformTo(\"uint8array\", data);\n } else if (dataType === \"string\") {\n if (isBase64) {\n data = base64.decode(data);\n }\n else if (isBinary) {\n // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask\n if (isOptimizedBinaryString !== true) {\n // this is a string, not in a base64 format.\n // Be sure that this is a correct \"binary string\"\n data = string2binary(data);\n }\n }\n }\n return data;\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/utils.js\n// module id = 0\n// module chunks = 0","'use strict';\n\n/**\n * A worker that does nothing but passing chunks to the next one. This is like\n * a nodejs stream but with some differences. On the good side :\n * - it works on IE 6-9 without any issue / polyfill\n * - it weights less than the full dependencies bundled with browserify\n * - it forwards errors (no need to declare an error handler EVERYWHERE)\n *\n * A chunk is an object with 2 attributes : `meta` and `data`. The former is an\n * object containing anything (`percent` for example), see each worker for more\n * details. The latter is the real data (String, Uint8Array, etc).\n *\n * @constructor\n * @param {String} name the name of the stream (mainly used for debugging purposes)\n */\nfunction GenericWorker(name) {\n // the name of the worker\n this.name = name || \"default\";\n // an object containing metadata about the workers chain\n this.streamInfo = {};\n // an error which happened when the worker was paused\n this.generatedError = null;\n // an object containing metadata to be merged by this worker into the general metadata\n this.extraStreamInfo = {};\n // true if the stream is paused (and should not do anything), false otherwise\n this.isPaused = true;\n // true if the stream is finished (and should not do anything), false otherwise\n this.isFinished = false;\n // true if the stream is locked to prevent further structure updates (pipe), false otherwise\n this.isLocked = false;\n // the event listeners\n this._listeners = {\n 'data':[],\n 'end':[],\n 'error':[]\n };\n // the previous worker, if any\n this.previous = null;\n}\n\nGenericWorker.prototype = {\n /**\n * Push a chunk to the next workers.\n * @param {Object} chunk the chunk to push\n */\n push : function (chunk) {\n this.emit(\"data\", chunk);\n },\n /**\n * End the stream.\n * @return {Boolean} true if this call ended the worker, false otherwise.\n */\n end : function () {\n if (this.isFinished) {\n return false;\n }\n\n this.flush();\n try {\n this.emit(\"end\");\n this.cleanUp();\n this.isFinished = true;\n } catch (e) {\n this.emit(\"error\", e);\n }\n return true;\n },\n /**\n * End the stream with an error.\n * @param {Error} e the error which caused the premature end.\n * @return {Boolean} true if this call ended the worker with an error, false otherwise.\n */\n error : function (e) {\n if (this.isFinished) {\n return false;\n }\n\n if(this.isPaused) {\n this.generatedError = e;\n } else {\n this.isFinished = true;\n\n this.emit(\"error\", e);\n\n // in the workers chain exploded in the middle of the chain,\n // the error event will go downward but we also need to notify\n // workers upward that there has been an error.\n if(this.previous) {\n this.previous.error(e);\n }\n\n this.cleanUp();\n }\n return true;\n },\n /**\n * Add a callback on an event.\n * @param {String} name the name of the event (data, end, error)\n * @param {Function} listener the function to call when the event is triggered\n * @return {GenericWorker} the current object for chainability\n */\n on : function (name, listener) {\n this._listeners[name].push(listener);\n return this;\n },\n /**\n * Clean any references when a worker is ending.\n */\n cleanUp : function () {\n this.streamInfo = this.generatedError = this.extraStreamInfo = null;\n this._listeners = [];\n },\n /**\n * Trigger an event. This will call registered callback with the provided arg.\n * @param {String} name the name of the event (data, end, error)\n * @param {Object} arg the argument to call the callback with.\n */\n emit : function (name, arg) {\n if (this._listeners[name]) {\n for(var i = 0; i < this._listeners[name].length; i++) {\n this._listeners[name][i].call(this, arg);\n }\n }\n },\n /**\n * Chain a worker with an other.\n * @param {Worker} next the worker receiving events from the current one.\n * @return {worker} the next worker for chainability\n */\n pipe : function (next) {\n return next.registerPrevious(this);\n },\n /**\n * Same as `pipe` in the other direction.\n * Using an API with `pipe(next)` is very easy.\n * Implementing the API with the point of view of the next one registering\n * a source is easier, see the ZipFileWorker.\n * @param {Worker} previous the previous worker, sending events to this one\n * @return {Worker} the current worker for chainability\n */\n registerPrevious : function (previous) {\n if (this.isLocked) {\n throw new Error(\"The stream '\" + this + \"' has already been used.\");\n }\n\n // sharing the streamInfo...\n this.streamInfo = previous.streamInfo;\n // ... and adding our own bits\n this.mergeStreamInfo();\n this.previous = previous;\n var self = this;\n previous.on('data', function (chunk) {\n self.processChunk(chunk);\n });\n previous.on('end', function () {\n self.end();\n });\n previous.on('error', function (e) {\n self.error(e);\n });\n return this;\n },\n /**\n * Pause the stream so it doesn't send events anymore.\n * @return {Boolean} true if this call paused the worker, false otherwise.\n */\n pause : function () {\n if(this.isPaused || this.isFinished) {\n return false;\n }\n this.isPaused = true;\n\n if(this.previous) {\n this.previous.pause();\n }\n return true;\n },\n /**\n * Resume a paused stream.\n * @return {Boolean} true if this call resumed the worker, false otherwise.\n */\n resume : function () {\n if(!this.isPaused || this.isFinished) {\n return false;\n }\n this.isPaused = false;\n\n // if true, the worker tried to resume but failed\n var withError = false;\n if(this.generatedError) {\n this.error(this.generatedError);\n withError = true;\n }\n if(this.previous) {\n this.previous.resume();\n }\n\n return !withError;\n },\n /**\n * Flush any remaining bytes as the stream is ending.\n */\n flush : function () {},\n /**\n * Process a chunk. This is usually the method overridden.\n * @param {Object} chunk the chunk to process.\n */\n processChunk : function(chunk) {\n this.push(chunk);\n },\n /**\n * Add a key/value to be added in the workers chain streamInfo once activated.\n * @param {String} key the key to use\n * @param {Object} value the associated value\n * @return {Worker} the current worker for chainability\n */\n withStreamInfo : function (key, value) {\n this.extraStreamInfo[key] = value;\n this.mergeStreamInfo();\n return this;\n },\n /**\n * Merge this worker's streamInfo into the chain's streamInfo.\n */\n mergeStreamInfo : function () {\n for(var key in this.extraStreamInfo) {\n if (!this.extraStreamInfo.hasOwnProperty(key)) {\n continue;\n }\n this.streamInfo[key] = this.extraStreamInfo[key];\n }\n },\n\n /**\n * Lock the stream to prevent further updates on the workers chain.\n * After calling this method, all calls to pipe will fail.\n */\n lock: function () {\n if (this.isLocked) {\n throw new Error(\"The stream '\" + this + \"' has already been used.\");\n }\n this.isLocked = true;\n if (this.previous) {\n this.previous.lock();\n }\n },\n\n /**\n *\n * Pretty print the workers chain.\n */\n toString : function () {\n var me = \"Worker \" + this.name;\n if (this.previous) {\n return this.previous + \" -> \" + me;\n } else {\n return me;\n }\n }\n};\n\nmodule.exports = GenericWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/GenericWorker.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nexports.base64 = true;\nexports.array = true;\nexports.string = true;\nexports.arraybuffer = typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\";\nexports.nodebuffer = typeof Buffer !== \"undefined\";\n// contains true if JSZip can read/generate Uint8Array, false otherwise.\nexports.uint8array = typeof Uint8Array !== \"undefined\";\n\nif (typeof ArrayBuffer === \"undefined\") {\n exports.blob = false;\n}\nelse {\n var buffer = new ArrayBuffer(0);\n try {\n exports.blob = new Blob([buffer], {\n type: \"application/zip\"\n }).size === 0;\n }\n catch (e) {\n try {\n var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n var builder = new Builder();\n builder.append(buffer);\n exports.blob = builder.getBlob('application/zip').size === 0;\n }\n catch (e) {\n exports.blob = false;\n }\n }\n}\n\ntry {\n exports.nodestream = !!require('readable-stream').Readable;\n} catch(e) {\n exports.nodestream = false;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/support.js\n// module id = 2\n// module chunks = 0","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/utils/common.js\n// module id = 3\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/*<replacement>*/\n\nvar processNextTick = require('process-nextick-args').nextTick;\n/*</replacement>*/\n\n/*<replacement>*/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/*</replacement>*/\n\nmodule.exports = Duplex;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\nvar keys = objectKeys(Writable.prototype);\nfor (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n processNextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n this.push(null);\n this.end();\n\n processNextTick(cb, err);\n};\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_duplex.js\n// module id = 4\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 5\n// module chunks = 0","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inherits/inherits_browser.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar support = require('./support');\nvar nodejsUtils = require('./nodejsUtils');\nvar GenericWorker = require('./stream/GenericWorker');\n\n/**\n * The following functions come from pako, from pako/lib/utils/strings\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new Array(256);\nfor (var i=0; i<256; i++) {\n _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);\n}\n_utf8len[254]=_utf8len[254]=1; // Invalid sequence start\n\n// convert string to array (typed, when possible)\nvar string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n c2 = str.charCodeAt(m_pos+1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n if (support.uint8array) {\n buf = new Uint8Array(buf_len);\n } else {\n buf = new Array(buf_len);\n }\n\n // convert\n for (i=0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n c2 = str.charCodeAt(m_pos+1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nvar utf8border = function(buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max-1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Fuckup - very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means vuffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n// convert array to string\nvar buf2string = function (buf) {\n var str, i, out, c, c_len;\n var len = buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len*2);\n\n for (out=0, i=0; i<len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n // shrinkBuf(utf16buf, out)\n if (utf16buf.length !== out) {\n if(utf16buf.subarray) {\n utf16buf = utf16buf.subarray(0, out);\n } else {\n utf16buf.length = out;\n }\n }\n\n // return String.fromCharCode.apply(null, utf16buf);\n return utils.applyFromCharCode(utf16buf);\n};\n\n\n// That's all for the pako functions.\n\n\n/**\n * Transform a javascript string into an array (typed if possible) of bytes,\n * UTF-8 encoded.\n * @param {String} str the string to encode\n * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.\n */\nexports.utf8encode = function utf8encode(str) {\n if (support.nodebuffer) {\n return nodejsUtils.newBufferFrom(str, \"utf-8\");\n }\n\n return string2buf(str);\n};\n\n\n/**\n * Transform a bytes array (or a representation) representing an UTF-8 encoded\n * string into a javascript string.\n * @param {Array|Uint8Array|Buffer} buf the data de decode\n * @return {String} the decoded string.\n */\nexports.utf8decode = function utf8decode(buf) {\n if (support.nodebuffer) {\n return utils.transformTo(\"nodebuffer\", buf).toString(\"utf-8\");\n }\n\n buf = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", buf);\n\n return buf2string(buf);\n};\n\n/**\n * A worker to decode utf8 encoded binary chunks into string chunks.\n * @constructor\n */\nfunction Utf8DecodeWorker() {\n GenericWorker.call(this, \"utf-8 decode\");\n // the last bytes if a chunk didn't end with a complete codepoint.\n this.leftOver = null;\n}\nutils.inherits(Utf8DecodeWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8DecodeWorker.prototype.processChunk = function (chunk) {\n\n var data = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", chunk.data);\n\n // 1st step, re-use what's left of the previous chunk\n if (this.leftOver && this.leftOver.length) {\n if(support.uint8array) {\n var previousData = data;\n data = new Uint8Array(previousData.length + this.leftOver.length);\n data.set(this.leftOver, 0);\n data.set(previousData, this.leftOver.length);\n } else {\n data = this.leftOver.concat(data);\n }\n this.leftOver = null;\n }\n\n var nextBoundary = utf8border(data);\n var usableData = data;\n if (nextBoundary !== data.length) {\n if (support.uint8array) {\n usableData = data.subarray(0, nextBoundary);\n this.leftOver = data.subarray(nextBoundary, data.length);\n } else {\n usableData = data.slice(0, nextBoundary);\n this.leftOver = data.slice(nextBoundary, data.length);\n }\n }\n\n this.push({\n data : exports.utf8decode(usableData),\n meta : chunk.meta\n });\n};\n\n/**\n * @see GenericWorker.flush\n */\nUtf8DecodeWorker.prototype.flush = function () {\n if(this.leftOver && this.leftOver.length) {\n this.push({\n data : exports.utf8decode(this.leftOver),\n meta : {}\n });\n this.leftOver = null;\n }\n};\nexports.Utf8DecodeWorker = Utf8DecodeWorker;\n\n/**\n * A worker to endcode string chunks into utf8 encoded binary chunks.\n * @constructor\n */\nfunction Utf8EncodeWorker() {\n GenericWorker.call(this, \"utf-8 encode\");\n}\nutils.inherits(Utf8EncodeWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8EncodeWorker.prototype.processChunk = function (chunk) {\n this.push({\n data : exports.utf8encode(chunk.data),\n meta : chunk.meta\n });\n};\nexports.Utf8EncodeWorker = Utf8EncodeWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/utf8.js\n// module id = 7\n// module chunks = 0","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/buffer/index.js\n// module id = 8\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-util-is/lib/util.js\n// module id = 9\n// module chunks = 0","/* global Promise */\n'use strict';\n\n// load the global object first:\n// - it should be better integrated in the system (unhandledRejection in node)\n// - the environment may have a custom Promise implementation (see zone.js)\nvar ES6Promise = null;\nif (typeof Promise !== \"undefined\") {\n ES6Promise = Promise;\n} else {\n ES6Promise = require(\"lie\");\n}\n\n/**\n * Let the user use/change some implementations.\n */\nmodule.exports = {\n Promise: ES6Promise\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/external.js\n// module id = 10\n// module chunks = 0","(function(root, factory){\n\n\t//UMD\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine(function() {\n\t\t\treturn factory();\n\t\t});\n\t} else if (typeof module === \"object\") {\n\t\tmodule.exports = factory();\n \t} else {\n\t\troot.Tone = factory();\n\t}\n\n}(this, function(){\n\n\t\"use strict\";\n\t\n\tvar Tone;\n\t//constructs the main Tone object\n\tfunction Main(func){\n\t\tTone = func();\n\t}\n\t//invokes each of the modules with the main Tone object as the argument\n\tfunction Module(func){\n\t\tfunc(Tone);\n\t}\t/**\n\t * Tone.js\n\t * @author Yotam Mann\n\t * @license http://opensource.org/licenses/MIT MIT License\n\t * @copyright 2014-2017 Yotam Mann\n\t */\n\tMain(function () {\n\t \n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tTONE\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * @class Tone is the base class of all other classes.\n\t\t * @constructor\n\t\t */\n\t var Tone = function () {\n\t if (!(this instanceof Tone)) {\n\t throw new Error('constructor needs to be called with the \\'new\\' keyword');\n\t }\n\t };\n\t /**\n\t\t * @memberOf Tone#\n\t\t * @returns {string} returns the name of the class as a string\n\t\t */\n\t Tone.prototype.toString = function () {\n\t for (var className in Tone) {\n\t var isLetter = className[0].match(/^[A-Z]$/);\n\t var sameConstructor = Tone[className] === this.constructor;\n\t if (Tone.isFunction(Tone[className]) && isLetter && sameConstructor) {\n\t return className;\n\t }\n\t }\n\t return 'Tone';\n\t };\n\t /**\n\t\t * @memberOf Tone#\n\t\t * disconnect and dispose\n\t\t * @returns {Tone} this\n\t\t */\n\t Tone.prototype.dispose = function () {\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tGET/SET\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Set the parameters at once. Either pass in an\n\t\t * object mapping parameters to values, or to set a\n\t\t * single parameter, by passing in a string and value.\n\t\t * The last argument is an optional ramp time which\n\t\t * will ramp any signal values to their destination value\n\t\t * over the duration of the rampTime.\n\t\t * @param {Object|string} params\n\t\t * @param {number=} value\n\t\t * @param {Time=} rampTime\n\t\t * @returns {Tone} this\n\t\t * @memberOf Tone#\n\t\t * @example\n\t\t * //set values using an object\n\t\t * filter.set({\n\t\t * \t\"frequency\" : 300,\n\t\t * \t\"type\" : highpass\n\t\t * });\n\t\t * @example\n\t\t * filter.set(\"type\", \"highpass\");\n\t\t * @example\n\t\t * //ramp to the value 220 over 3 seconds.\n\t\t * oscillator.set({\n\t\t * \t\"frequency\" : 220\n\t\t * }, 3);\n\t\t */\n\t Tone.prototype.set = function (params, value, rampTime) {\n\t if (Tone.isObject(params)) {\n\t rampTime = value;\n\t } else if (Tone.isString(params)) {\n\t var tmpObj = {};\n\t tmpObj[params] = value;\n\t params = tmpObj;\n\t }\n\t paramLoop:\n\t for (var attr in params) {\n\t value = params[attr];\n\t var parent = this;\n\t if (attr.indexOf('.') !== -1) {\n\t var attrSplit = attr.split('.');\n\t for (var i = 0; i < attrSplit.length - 1; i++) {\n\t parent = parent[attrSplit[i]];\n\t if (parent instanceof Tone) {\n\t attrSplit.splice(0, i + 1);\n\t var innerParam = attrSplit.join('.');\n\t parent.set(innerParam, value);\n\t continue paramLoop;\n\t }\n\t }\n\t attr = attrSplit[attrSplit.length - 1];\n\t }\n\t var param = parent[attr];\n\t if (Tone.isUndef(param)) {\n\t continue;\n\t }\n\t if (Tone.Signal && param instanceof Tone.Signal || Tone.Param && param instanceof Tone.Param) {\n\t if (param.value !== value) {\n\t if (Tone.isUndef(rampTime)) {\n\t param.value = value;\n\t } else {\n\t param.rampTo(value, rampTime);\n\t }\n\t }\n\t } else if (param instanceof AudioParam) {\n\t if (param.value !== value) {\n\t param.value = value;\n\t }\n\t } else if (Tone.TimeBase && param instanceof Tone.TimeBase) {\n\t parent[attr] = value;\n\t } else if (param instanceof Tone) {\n\t param.set(value);\n\t } else if (param !== value) {\n\t parent[attr] = value;\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Get the object's attributes. Given no arguments get\n\t\t * will return all available object properties and their corresponding\n\t\t * values. Pass in a single attribute to retrieve or an array\n\t\t * of attributes. The attribute strings can also include a \".\"\n\t\t * to access deeper properties.\n\t\t * @memberOf Tone#\n\t\t * @example\n\t\t * osc.get();\n\t\t * //returns {\"type\" : \"sine\", \"frequency\" : 440, ...etc}\n\t\t * @example\n\t\t * osc.get(\"type\");\n\t\t * //returns { \"type\" : \"sine\"}\n\t\t * @example\n\t\t * //use dot notation to access deep properties\n\t\t * synth.get([\"envelope.attack\", \"envelope.release\"]);\n\t\t * //returns {\"envelope\" : {\"attack\" : 0.2, \"release\" : 0.4}}\n\t\t * @param {Array=|string|undefined} params the parameters to get, otherwise will return\n\t\t * \t\t\t\t\t all available.\n\t\t * @returns {Object}\n\t\t */\n\t Tone.prototype.get = function (params) {\n\t if (Tone.isUndef(params)) {\n\t params = this._collectDefaults(this.constructor);\n\t } else if (Tone.isString(params)) {\n\t params = [params];\n\t }\n\t var ret = {};\n\t for (var i = 0; i < params.length; i++) {\n\t var attr = params[i];\n\t var parent = this;\n\t var subRet = ret;\n\t if (attr.indexOf('.') !== -1) {\n\t var attrSplit = attr.split('.');\n\t for (var j = 0; j < attrSplit.length - 1; j++) {\n\t var subAttr = attrSplit[j];\n\t subRet[subAttr] = subRet[subAttr] || {};\n\t subRet = subRet[subAttr];\n\t parent = parent[subAttr];\n\t }\n\t attr = attrSplit[attrSplit.length - 1];\n\t }\n\t var param = parent[attr];\n\t if (Tone.isObject(params[attr])) {\n\t subRet[attr] = param.get();\n\t } else if (Tone.Signal && param instanceof Tone.Signal) {\n\t subRet[attr] = param.value;\n\t } else if (Tone.Param && param instanceof Tone.Param) {\n\t subRet[attr] = param.value;\n\t } else if (param instanceof AudioParam) {\n\t subRet[attr] = param.value;\n\t } else if (param instanceof Tone) {\n\t subRet[attr] = param.get();\n\t } else if (!Tone.isFunction(param) && !Tone.isUndef(param)) {\n\t subRet[attr] = param;\n\t }\n\t }\n\t return ret;\n\t };\n\t /**\n\t\t * collect all of the default attributes in one\n\t\t * @private\n\t\t * @param {function} constr the constructor to find the defaults from\n\t\t * @return {Array} all of the attributes which belong to the class\n\t\t */\n\t Tone.prototype._collectDefaults = function (constr) {\n\t var ret = [];\n\t if (!Tone.isUndef(constr.defaults)) {\n\t ret = Object.keys(constr.defaults);\n\t }\n\t if (!Tone.isUndef(constr._super)) {\n\t var superDefs = this._collectDefaults(constr._super);\n\t //filter out repeats\n\t for (var i = 0; i < superDefs.length; i++) {\n\t if (ret.indexOf(superDefs[i]) === -1) {\n\t ret.push(superDefs[i]);\n\t }\n\t }\n\t }\n\t return ret;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tDEFAULTS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * @memberOf Tone\n\t\t * @param {Array} values The arguments array\n\t\t * @param {Array} keys The names of the arguments\n\t\t * @param {Function|Object} constr The class constructor\n\t\t * @return {Object} An object composed of the defaults between the class' defaults\n\t\t * and the passed in arguments.\n\t\t */\n\t Tone.defaults = function (values, keys, constr) {\n\t var options = {};\n\t if (values.length === 1 && Tone.isObject(values[0])) {\n\t options = values[0];\n\t } else {\n\t for (var i = 0; i < keys.length; i++) {\n\t options[keys[i]] = values[i];\n\t }\n\t }\n\t if (!Tone.isUndef(constr.defaults)) {\n\t return Tone.defaultArg(options, constr.defaults);\n\t } else if (Tone.isObject(constr)) {\n\t return Tone.defaultArg(options, constr);\n\t } else {\n\t return options;\n\t }\n\t };\n\t /**\n\t\t * If the `given` parameter is undefined, use the `fallback`.\n\t\t * If both `given` and `fallback` are object literals, it will\n\t\t * return a deep copy which includes all of the parameters from both\n\t\t * objects. If a parameter is undefined in given, it will return\n\t\t * the fallback property.\n\t\t * <br><br>\n\t\t * WARNING: if object is self referential, it will go into an an\n\t\t * infinite recursive loop.\n\t\t * @memberOf Tone\n\t\t * @param {*} given\n\t\t * @param {*} fallback\n\t\t * @return {*}\n\t\t */\n\t Tone.defaultArg = function (given, fallback) {\n\t if (Tone.isObject(given) && Tone.isObject(fallback)) {\n\t var ret = {};\n\t //make a deep copy of the given object\n\t for (var givenProp in given) {\n\t ret[givenProp] = Tone.defaultArg(fallback[givenProp], given[givenProp]);\n\t }\n\t for (var fallbackProp in fallback) {\n\t ret[fallbackProp] = Tone.defaultArg(given[fallbackProp], fallback[fallbackProp]);\n\t }\n\t return ret;\n\t } else {\n\t return Tone.isUndef(given) ? fallback : given;\n\t }\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tCONNECTIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * connect together all of the arguments in series\n\t\t * @param {...AudioParam|Tone|AudioNode} nodes\n\t\t * @returns {Tone}\n\t\t * @memberOf Tone\n\t\t * @static\n\t\t */\n\t Tone.connectSeries = function () {\n\t var currentUnit = arguments[0];\n\t for (var i = 1; i < arguments.length; i++) {\n\t var toUnit = arguments[i];\n\t currentUnit.connect(toUnit);\n\t currentUnit = toUnit;\n\t }\n\t return Tone;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t // TYPE CHECKING\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * test if the arg is undefined\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is undefined\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isUndef = function (val) {\n\t return typeof val === 'undefined';\n\t };\n\t /**\n\t\t * test if the arg is a function\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is a function\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isFunction = function (val) {\n\t return typeof val === 'function';\n\t };\n\t /**\n\t\t * Test if the argument is a number.\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is a number\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isNumber = function (arg) {\n\t return typeof arg === 'number';\n\t };\n\t /**\n\t\t * Test if the given argument is an object literal (i.e. `{}`);\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is an object literal.\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isObject = function (arg) {\n\t return Object.prototype.toString.call(arg) === '[object Object]' && arg.constructor === Object;\n\t };\n\t /**\n\t\t * Test if the argument is a boolean.\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is a boolean\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isBoolean = function (arg) {\n\t return typeof arg === 'boolean';\n\t };\n\t /**\n\t\t * Test if the argument is an Array\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is an array\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isArray = function (arg) {\n\t return Array.isArray(arg);\n\t };\n\t /**\n\t\t * Test if the argument is a string.\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is a string\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isString = function (arg) {\n\t return typeof arg === 'string';\n\t };\n\t /**\n\t\t * Test if the argument is in the form of a note in scientific pitch notation.\n\t\t * e.g. \"C4\"\n\t\t * @param {*} arg the argument to test\n\t\t * @returns {boolean} true if the arg is a string\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.isNote = function (arg) {\n\t return Tone.isString(arg) && /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(arg);\n\t };\n\t /**\n\t\t * An empty function.\n\t\t * @static\n\t\t */\n\t Tone.noOp = function () {\n\t };\n\t /**\n\t\t * Make the property not writable. Internal use only.\n\t\t * @private\n\t\t * @param {string} property the property to make not writable\n\t\t */\n\t Tone.prototype._readOnly = function (property) {\n\t if (Array.isArray(property)) {\n\t for (var i = 0; i < property.length; i++) {\n\t this._readOnly(property[i]);\n\t }\n\t } else {\n\t Object.defineProperty(this, property, {\n\t writable: false,\n\t enumerable: true\n\t });\n\t }\n\t };\n\t /**\n\t\t * Make an attribute writeable. Interal use only.\n\t\t * @private\n\t\t * @param {string} property the property to make writable\n\t\t */\n\t Tone.prototype._writable = function (property) {\n\t if (Array.isArray(property)) {\n\t for (var i = 0; i < property.length; i++) {\n\t this._writable(property[i]);\n\t }\n\t } else {\n\t Object.defineProperty(this, property, { writable: true });\n\t }\n\t };\n\t /**\n\t\t * Possible play states.\n\t\t * @enum {string}\n\t\t */\n\t Tone.State = {\n\t Started: 'started',\n\t Stopped: 'stopped',\n\t Paused: 'paused'\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t // CONVERSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Equal power gain scale. Good for cross-fading.\n\t\t * @param {NormalRange} percent (0-1)\n\t\t * @return {Number} output gain (0-1)\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.equalPowerScale = function (percent) {\n\t var piFactor = 0.5 * Math.PI;\n\t return Math.sin(percent * piFactor);\n\t };\n\t /**\n\t\t * Convert decibels into gain.\n\t\t * @param {Decibels} db\n\t\t * @return {Number}\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.dbToGain = function (db) {\n\t return Math.pow(10, db / 20);\n\t };\n\t /**\n\t\t * Convert gain to decibels.\n\t\t * @param {Number} gain (0-1)\n\t\t * @return {Decibels}\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.gainToDb = function (gain) {\n\t return 20 * (Math.log(gain) / Math.LN10);\n\t };\n\t /**\n\t\t * Convert an interval (in semitones) to a frequency ratio.\n\t\t * @param {Interval} interval the number of semitones above the base note\n\t\t * @return {number} the frequency ratio\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t * @example\n\t\t * tone.intervalToFrequencyRatio(0); // 1\n\t\t * tone.intervalToFrequencyRatio(12); // 2\n\t\t * tone.intervalToFrequencyRatio(-12); // 0.5\n\t\t */\n\t Tone.intervalToFrequencyRatio = function (interval) {\n\t return Math.pow(2, interval / 12);\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tTIMING\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Return the current time of the AudioContext clock.\n\t\t * @return {Number} the currentTime from the AudioContext\n\t\t * @memberOf Tone#\n\t\t */\n\t Tone.prototype.now = function () {\n\t return Tone.context.now();\n\t };\n\t /**\n\t\t * Return the current time of the AudioContext clock.\n\t\t * @return {Number} the currentTime from the AudioContext\n\t\t * @static\n\t\t * @memberOf Tone\n\t\t */\n\t Tone.now = function () {\n\t return Tone.context.now();\n\t };\n\t /**\n\t\t * Adds warning in the console if the scheduled time has passed.\n\t\t * @type {Time}\n\t\t */\n\t Tone.isPast = function (time) {\n\t if (time < Tone.context.currentTime) {\n\t // eslint-disable-next-line no-console\n\t console.warn('Time \\'' + time + '\\' is in the past. Scheduled time must be \\u2265 AudioContext.currentTime');\n\t }\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tINHERITANCE\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * have a child inherit all of Tone's (or a parent's) prototype\n\t\t * to inherit the parent's properties, make sure to call\n\t\t * Parent.call(this) in the child's constructor\n\t\t *\n\t\t * based on closure library's inherit function\n\t\t *\n\t\t * @memberOf Tone\n\t\t * @static\n\t\t * @param {function} \tchild\n\t\t * @param {function=} parent (optional) parent to inherit from\n\t\t * if no parent is supplied, the child\n\t\t * will inherit from Tone\n\t\t */\n\t Tone.extend = function (child, parent) {\n\t if (Tone.isUndef(parent)) {\n\t parent = Tone;\n\t }\n\t function TempConstructor() {\n\t }\n\t TempConstructor.prototype = parent.prototype;\n\t child.prototype = new TempConstructor();\n\t /** @override */\n\t child.prototype.constructor = child;\n\t child._super = parent;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tCONTEXT\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * A static pointer to the audio context accessible as Tone.context.\n\t\t * @type {Tone.Context}\n\t\t * @name context\n\t\t * @memberOf Tone\n\t\t */\n\t Object.defineProperty(Tone, 'context', {\n\t get: function () {\n\t return window.TONE_AUDIO_CONTEXT;\n\t },\n\t set: function (context) {\n\t if (Tone.Context && context instanceof Tone.Context) {\n\t window.TONE_AUDIO_CONTEXT = context;\n\t } else {\n\t window.TONE_AUDIO_CONTEXT = new Tone.Context(context);\n\t }\n\t //initialize the new audio context\n\t Tone.Context.emit('init', window.TONE_AUDIO_CONTEXT);\n\t }\n\t });\n\t /**\n\t\t * The AudioContext\n\t\t * @type {Tone.Context}\n\t\t * @name context\n\t\t * @memberOf Tone#\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.prototype, 'context', {\n\t get: function () {\n\t return Tone.context;\n\t }\n\t });\n\t /**\n\t\t * Tone automatically creates a context on init, but if you are working\n\t\t * with other libraries which also create an AudioContext, it can be\n\t\t * useful to set your own. If you are going to set your own context,\n\t\t * be sure to do it at the start of your code, before creating any objects.\n\t\t * @static\n\t\t * @param {AudioContext} ctx The new audio context to set\n\t\t */\n\t Tone.setContext = function (ctx) {\n\t Tone.context = ctx;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tATTRIBUTES\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * The number of seconds of 1 processing block (128 samples)\n\t\t * @type {Number}\n\t\t * @name blockTime\n\t\t * @memberOf Tone\n\t\t * @static\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.prototype, 'blockTime', {\n\t get: function () {\n\t return 128 / this.context.sampleRate;\n\t }\n\t });\n\t /**\n\t\t * The duration in seconds of one sample.\n\t\t * @type {Number}\n\t\t * @name sampleTime\n\t\t * @memberOf Tone\n\t\t * @static\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.prototype, 'sampleTime', {\n\t get: function () {\n\t return 1 / this.context.sampleRate;\n\t }\n\t });\n\t /**\n\t\t * Whether or not all the technologies that Tone.js relies on are supported by the current browser.\n\t\t * @type {Boolean}\n\t\t * @name supported\n\t\t * @memberOf Tone\n\t\t * @readOnly\n\t\t * @static\n\t\t */\n\t Object.defineProperty(Tone, 'supported', {\n\t get: function () {\n\t var hasAudioContext = window.hasOwnProperty('AudioContext') || window.hasOwnProperty('webkitAudioContext');\n\t var hasPromises = window.hasOwnProperty('Promise');\n\t var hasWorkers = window.hasOwnProperty('Worker');\n\t return hasAudioContext && hasPromises && hasWorkers;\n\t }\n\t });\n\t /**\n\t\t * Boolean value if the audio context has been initialized.\n\t\t * @type {Boolean}\n\t\t * @memberOf Tone\n\t\t * @static\n\t\t * @name initialized\n\t\t */\n\t Object.defineProperty(Tone, 'initialized', {\n\t get: function () {\n\t return !Tone.isUndef(window.TONE_AUDIO_CONTEXT);\n\t }\n\t });\n\t /**\n\t\t * Get the context when it becomes available\n\t\t * @param {Function} resolve Callback when the context is initialized\n\t\t * @return {Tone}\n\t\t */\n\t Tone.getContext = function (resolve) {\n\t if (Tone.initialized) {\n\t resolve(Tone.context);\n\t } else {\n\t var resCallback = function () {\n\t resolve(Tone.context);\n\t Tone.Context.off('init', resCallback);\n\t };\n\t Tone.Context.on('init', resCallback);\n\t }\n\t return Tone;\n\t };\n\t /**\n\t\t * The version number\n\t\t * @type {String}\n\t\t * @static\n\t\t */\n\t Tone.version = 'r12-dev';\n\t return Tone;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Emitter gives classes which extend it\n\t\t * the ability to listen for and emit events.\n\t\t * Inspiration and reference from Jerome Etienne's [MicroEvent](https://github.com/jeromeetienne/microevent.js).\n\t\t * MIT (c) 2011 Jerome Etienne.\n\t\t *\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.Emitter = function () {\n\t Tone.call(this);\n\t /**\n\t\t\t * Contains all of the events.\n\t\t\t * @private\n\t\t\t * @type {Object}\n\t\t\t */\n\t this._events = {};\n\t };\n\t Tone.extend(Tone.Emitter);\n\t /**\n\t\t * Bind a callback to a specific event.\n\t\t * @param {String} event The name of the event to listen for.\n\t\t * @param {Function} callback The callback to invoke when the\n\t\t * event is emitted\n\t\t * @return {Tone.Emitter} this\n\t\t */\n\t Tone.Emitter.prototype.on = function (event, callback) {\n\t //split the event\n\t var events = event.split(/\\W+/);\n\t for (var i = 0; i < events.length; i++) {\n\t var eventName = events[i];\n\t if (!this._events.hasOwnProperty(eventName)) {\n\t this._events[eventName] = [];\n\t }\n\t this._events[eventName].push(callback);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Bind a callback which is only invoked once\n\t\t * @param {String} event The name of the event to listen for.\n\t\t * @param {Function} callback The callback to invoke when the\n\t\t * event is emitted\n\t\t * @return {Tone.Emitter} this\n\t\t */\n\t Tone.Emitter.prototype.once = function (event, callback) {\n\t var boundCallback = function () {\n\t //invoke the callback\n\t callback.apply(this, arguments);\n\t this.off(event, boundCallback);\n\t }.bind(this);\n\t this.on(event, boundCallback);\n\t return this;\n\t };\n\t /**\n\t\t * Remove the event listener.\n\t\t * @param {String} event The event to stop listening to.\n\t\t * @param {Function=} callback The callback which was bound to\n\t\t * the event with Tone.Emitter.on.\n\t\t * If no callback is given, all callbacks\n\t\t * events are removed.\n\t\t * @return {Tone.Emitter} this\n\t\t */\n\t Tone.Emitter.prototype.off = function (event, callback) {\n\t var events = event.split(/\\W+/);\n\t for (var ev = 0; ev < events.length; ev++) {\n\t event = events[ev];\n\t if (this._events.hasOwnProperty(event)) {\n\t if (Tone.isUndef(callback)) {\n\t this._events[event] = [];\n\t } else {\n\t var eventList = this._events[event];\n\t for (var i = 0; i < eventList.length; i++) {\n\t if (eventList[i] === callback) {\n\t eventList.splice(i, 1);\n\t }\n\t }\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Invoke all of the callbacks bound to the event\n\t\t * with any arguments passed in.\n\t\t * @param {String} event The name of the event.\n\t\t * @param {*} args... The arguments to pass to the functions listening.\n\t\t * @return {Tone.Emitter} this\n\t\t */\n\t Tone.Emitter.prototype.emit = function (event) {\n\t if (this._events) {\n\t var args = Array.apply(null, arguments).slice(1);\n\t if (this._events.hasOwnProperty(event)) {\n\t var eventList = this._events[event].slice(0);\n\t for (var i = 0, len = eventList.length; i < len; i++) {\n\t eventList[i].apply(this, args);\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Add Emitter functions (on/off/emit) to the object\n\t\t * @param {Object|Function} object The object or class to extend.\n\t\t * @returns {Tone.Emitter}\n\t\t */\n\t Tone.Emitter.mixin = function (object) {\n\t var functions = [\n\t 'on',\n\t 'once',\n\t 'off',\n\t 'emit'\n\t ];\n\t object._events = {};\n\t for (var i = 0; i < functions.length; i++) {\n\t var func = functions[i];\n\t var emitterFunc = Tone.Emitter.prototype[func];\n\t object[func] = emitterFunc;\n\t }\n\t return Tone.Emitter;\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Emitter} this\n\t\t */\n\t Tone.Emitter.prototype.dispose = function () {\n\t Tone.prototype.dispose.call(this);\n\t this._events = null;\n\t return this;\n\t };\n\t return Tone.Emitter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A Timeline class for scheduling and maintaining state\n\t\t * along a timeline. All events must have a \"time\" property.\n\t\t * Internally, events are stored in time order for fast\n\t\t * retrieval.\n\t\t * @extends {Tone}\n\t\t * @param {Positive} [memory=Infinity] The number of previous events that are retained.\n\t\t */\n\t Tone.Timeline = function () {\n\t var options = Tone.defaults(arguments, ['memory'], Tone.Timeline);\n\t Tone.call(this);\n\t /**\n\t\t\t * The array of scheduled timeline events\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._timeline = [];\n\t /**\n\t\t\t * The memory of the timeline, i.e.\n\t\t\t * how many events in the past it will retain\n\t\t\t * @type {Positive}\n\t\t\t */\n\t this.memory = options.memory;\n\t };\n\t Tone.extend(Tone.Timeline);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t */\n\t Tone.Timeline.defaults = { 'memory': Infinity };\n\t /**\n\t\t * The number of items in the timeline.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Timeline#\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Timeline.prototype, 'length', {\n\t get: function () {\n\t return this._timeline.length;\n\t }\n\t });\n\t /**\n\t\t * Insert an event object onto the timeline. Events must have a \"time\" attribute.\n\t\t * @param {Object} event The event object to insert into the\n\t\t * timeline.\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.add = function (event) {\n\t //the event needs to have a time attribute\n\t if (Tone.isUndef(event.time)) {\n\t throw new Error('Tone.Timeline: events must have a time attribute');\n\t }\n\t event.time = event.time.valueOf();\n\t var index = this._search(event.time);\n\t this._timeline.splice(index + 1, 0, event);\n\t //if the length is more than the memory, remove the previous ones\n\t if (this.length > this.memory) {\n\t var diff = this.length - this.memory;\n\t this._timeline.splice(0, diff);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Remove an event from the timeline.\n\t\t * @param {Object} event The event object to remove from the list.\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.remove = function (event) {\n\t var index = this._timeline.indexOf(event);\n\t if (index !== -1) {\n\t this._timeline.splice(index, 1);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Get the nearest event whose time is less than or equal to the given time.\n\t\t * @param {Number} time The time to query.\n\t\t * @param {String} comparator Which value in the object to compare\n\t\t * @returns {Object} The event object set after that time.\n\t\t */\n\t Tone.Timeline.prototype.get = function (time, comparator) {\n\t comparator = Tone.defaultArg(comparator, 'time');\n\t var index = this._search(time, comparator);\n\t if (index !== -1) {\n\t return this._timeline[index];\n\t } else {\n\t return null;\n\t }\n\t };\n\t /**\n\t\t * Return the first event in the timeline without removing it\n\t\t * @returns {Object} The first event object\n\t\t */\n\t Tone.Timeline.prototype.peek = function () {\n\t return this._timeline[0];\n\t };\n\t /**\n\t\t * Return the first event in the timeline and remove it\n\t\t * @returns {Object} The first event object\n\t\t */\n\t Tone.Timeline.prototype.shift = function () {\n\t return this._timeline.shift();\n\t };\n\t /**\n\t\t * Get the event which is scheduled after the given time.\n\t\t * @param {Number} time The time to query.\n\t\t * @param {String} comparator Which value in the object to compare\n\t\t * @returns {Object} The event object after the given time\n\t\t */\n\t Tone.Timeline.prototype.getAfter = function (time, comparator) {\n\t comparator = Tone.defaultArg(comparator, 'time');\n\t var index = this._search(time, comparator);\n\t if (index + 1 < this._timeline.length) {\n\t return this._timeline[index + 1];\n\t } else {\n\t return null;\n\t }\n\t };\n\t /**\n\t\t * Get the event before the event at the given time.\n\t\t * @param {Number} time The time to query.\n\t\t * @param {String} comparator Which value in the object to compare\n\t\t * @returns {Object} The event object before the given time\n\t\t */\n\t Tone.Timeline.prototype.getBefore = function (time, comparator) {\n\t comparator = Tone.defaultArg(comparator, 'time');\n\t var len = this._timeline.length;\n\t //if it's after the last item, return the last item\n\t if (len > 0 && this._timeline[len - 1][comparator] < time) {\n\t return this._timeline[len - 1];\n\t }\n\t var index = this._search(time, comparator);\n\t if (index - 1 >= 0) {\n\t return this._timeline[index - 1];\n\t } else {\n\t return null;\n\t }\n\t };\n\t /**\n\t\t * Cancel events after the given time\n\t\t * @param {Number} time The time to query.\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.cancel = function (after) {\n\t if (this._timeline.length > 1) {\n\t var index = this._search(after);\n\t if (index >= 0) {\n\t if (this._timeline[index].time === after) {\n\t //get the first item with that time\n\t for (var i = index; i >= 0; i--) {\n\t if (this._timeline[i].time === after) {\n\t index = i;\n\t } else {\n\t break;\n\t }\n\t }\n\t this._timeline = this._timeline.slice(0, index);\n\t } else {\n\t this._timeline = this._timeline.slice(0, index + 1);\n\t }\n\t } else {\n\t this._timeline = [];\n\t }\n\t } else if (this._timeline.length === 1) {\n\t //the first item's time\n\t if (this._timeline[0].time >= after) {\n\t this._timeline = [];\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Cancel events before or equal to the given time.\n\t\t * @param {Number} time The time to cancel before.\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.cancelBefore = function (time) {\n\t var index = this._search(time);\n\t if (index >= 0) {\n\t this._timeline = this._timeline.slice(index + 1);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Returns the previous event if there is one. null otherwise\n\t\t * @param {Object} event The event to find the previous one of\n\t\t * @return {Object} The event right before the given event\n\t\t */\n\t Tone.Timeline.prototype.previousEvent = function (event) {\n\t var index = this._timeline.indexOf(event);\n\t if (index > 0) {\n\t return this._timeline[index - 1];\n\t } else {\n\t return null;\n\t }\n\t };\n\t /**\n\t\t * Does a binary search on the timeline array and returns the\n\t\t * nearest event index whose time is after or equal to the given time.\n\t\t * If a time is searched before the first index in the timeline, -1 is returned.\n\t\t * If the time is after the end, the index of the last item is returned.\n\t\t * @param {Number} time\n\t\t * @param {String} comparator Which value in the object to compare\n\t\t * @return {Number} the index in the timeline array\n\t\t * @private\n\t\t */\n\t Tone.Timeline.prototype._search = function (time, comparator) {\n\t if (this._timeline.length === 0) {\n\t return -1;\n\t }\n\t comparator = Tone.defaultArg(comparator, 'time');\n\t var beginning = 0;\n\t var len = this._timeline.length;\n\t var end = len;\n\t if (len > 0 && this._timeline[len - 1][comparator] <= time) {\n\t return len - 1;\n\t }\n\t while (beginning < end) {\n\t // calculate the midpoint for roughly equal partition\n\t var midPoint = Math.floor(beginning + (end - beginning) / 2);\n\t var event = this._timeline[midPoint];\n\t var nextEvent = this._timeline[midPoint + 1];\n\t if (event[comparator] === time) {\n\t //choose the last one that has the same time\n\t for (var i = midPoint; i < this._timeline.length; i++) {\n\t var testEvent = this._timeline[i];\n\t if (testEvent[comparator] === time) {\n\t midPoint = i;\n\t }\n\t }\n\t return midPoint;\n\t } else if (event[comparator] < time && nextEvent[comparator] > time) {\n\t return midPoint;\n\t } else if (event[comparator] > time) {\n\t //search lower\n\t end = midPoint;\n\t } else {\n\t //search upper\n\t beginning = midPoint + 1;\n\t }\n\t }\n\t return -1;\n\t };\n\t /**\n\t\t * Internal iterator. Applies extra safety checks for\n\t\t * removing items from the array.\n\t\t * @param {Function} callback\n\t\t * @param {Number=} lowerBound\n\t\t * @param {Number=} upperBound\n\t\t * @private\n\t\t */\n\t Tone.Timeline.prototype._iterate = function (callback, lowerBound, upperBound) {\n\t lowerBound = Tone.defaultArg(lowerBound, 0);\n\t upperBound = Tone.defaultArg(upperBound, this._timeline.length - 1);\n\t this._timeline.slice(lowerBound, upperBound + 1).forEach(function (event) {\n\t callback.call(this, event);\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Iterate over everything in the array\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEach = function (callback) {\n\t this._iterate(callback);\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array at or before the given time.\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEachBefore = function (time, callback) {\n\t //iterate over the items in reverse so that removing an item doesn't break things\n\t var upperBound = this._search(time);\n\t if (upperBound !== -1) {\n\t this._iterate(callback, 0, upperBound);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array after the given time.\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEachAfter = function (time, callback) {\n\t //iterate over the items in reverse so that removing an item doesn't break things\n\t var lowerBound = this._search(time);\n\t this._iterate(callback, lowerBound + 1);\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array after the given time.\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEachBetween = function (startTime, endTime, callback) {\n\t var lowerBound = this._search(startTime);\n\t var upperBound = this._search(endTime);\n\t if (lowerBound !== -1 && upperBound !== -1) {\n\t if (this._timeline[lowerBound].time !== startTime) {\n\t lowerBound += 1;\n\t }\n\t this._iterate(callback, lowerBound, upperBound);\n\t } else if (lowerBound === -1) {\n\t this._iterate(callback, 0, upperBound);\n\t }\n\t /*this.forEachFrom(startTime, function(event){\n\t\t\t\tif (event.time <= endTime){\n\t\t\t\t\tcallback(event);\n\t\t\t\t}\n\t\t\t});*/\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array at or after the given time. Similar to\n\t\t * forEachAfter, but includes the item(s) at the given time.\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEachFrom = function (time, callback) {\n\t //iterate over the items in reverse so that removing an item doesn't break things\n\t var lowerBound = this._search(time);\n\t //work backwards until the event time is less than time\n\t while (lowerBound >= 0 && this._timeline[lowerBound].time >= time) {\n\t lowerBound--;\n\t }\n\t this._iterate(callback, lowerBound + 1);\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array at the given time\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.forEachAtTime = function (time, callback) {\n\t //iterate over the items in reverse so that removing an item doesn't break things\n\t var upperBound = this._search(time);\n\t if (upperBound !== -1) {\n\t this._iterate(function (event) {\n\t if (event.time === time) {\n\t callback.call(this, event);\n\t }\n\t }, 0, upperBound);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Timeline} this\n\t\t */\n\t Tone.Timeline.prototype.dispose = function () {\n\t Tone.prototype.dispose.call(this);\n\t this._timeline = null;\n\t return this;\n\t };\n\t return Tone.Timeline;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported) {\n\t if (!window.hasOwnProperty('OfflineAudioContext') && window.hasOwnProperty('webkitOfflineAudioContext')) {\n\t window.OfflineAudioContext = window.webkitOfflineAudioContext;\n\t }\n\t //returns promise?\n\t var context = new OfflineAudioContext(1, 1, 44100);\n\t var ret = context.startRendering();\n\t if (!(ret instanceof Promise)) {\n\t OfflineAudioContext.prototype._native_startRendering = OfflineAudioContext.prototype.startRendering;\n\t OfflineAudioContext.prototype.startRendering = function () {\n\t return new Promise(function (done) {\n\t this.oncomplete = function (e) {\n\t done(e.renderedBuffer);\n\t };\n\t this._native_startRendering();\n\t }.bind(this));\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported) {\n\t if (!window.hasOwnProperty('AudioContext') && window.hasOwnProperty('webkitAudioContext')) {\n\t window.AudioContext = window.webkitAudioContext;\n\t }\n\t //not functionally equivalent, but only an API placeholder\n\t if (!AudioContext.prototype.close) {\n\t AudioContext.prototype.close = function () {\n\t if (Tone.isFunction(this.suspend)) {\n\t this.suspend();\n\t }\n\t return Promise.resolve();\n\t };\n\t }\n\t //not functionally equivalent\n\t if (!AudioContext.prototype.resume) {\n\t AudioContext.prototype.resume = function () {\n\t return Promise.resolve();\n\t };\n\t }\n\t //createGain\n\t if (!AudioContext.prototype.createGain && AudioContext.prototype.createGainNode) {\n\t AudioContext.prototype.createGain = AudioContext.prototype.createGainNode;\n\t }\n\t //createDelay\n\t if (!AudioContext.prototype.createDelay && AudioContext.prototype.createDelayNode) {\n\t AudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode;\n\t }\n\t //test decodeAudioData returns a promise\n\t // https://github.com/mohayonao/web-audio-api-shim/blob/master/src/AudioContext.js\n\t // MIT License (c) 2015 @mohayonao\n\t var decodeAudioDataPromise = false;\n\t var offlineContext = new OfflineAudioContext(1, 1, 44100);\n\t var audioData = new Uint32Array([\n\t 1179011410,\n\t 48,\n\t 1163280727,\n\t 544501094,\n\t 16,\n\t 131073,\n\t 44100,\n\t 176400,\n\t 1048580,\n\t 1635017060,\n\t 8,\n\t 0,\n\t 0,\n\t 0,\n\t 0\n\t ]).buffer;\n\t try {\n\t var ret = offlineContext.decodeAudioData(audioData);\n\t if (ret instanceof Promise) {\n\t decodeAudioDataPromise = true;\n\t }\n\t } catch (e) {\n\t decodeAudioDataPromise = false;\n\t }\n\t if (!decodeAudioDataPromise) {\n\t AudioContext.prototype._native_decodeAudioData = AudioContext.prototype.decodeAudioData;\n\t AudioContext.prototype.decodeAudioData = function (audioData) {\n\t return new Promise(function (success, error) {\n\t this._native_decodeAudioData(audioData, success, error);\n\t }.bind(this));\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Wrapper around the native AudioContext.\n\t\t * @extends {Tone.Emitter}\n\t\t * @param {AudioContext=} context optionally pass in a context\n\t\t */\n\t Tone.Context = function () {\n\t Tone.Emitter.call(this);\n\t var options = Tone.defaults(arguments, ['context'], Tone.Context);\n\t if (!options.context) {\n\t options.context = new window.AudioContext();\n\t if (!options.context) {\n\t throw new Error('could not create AudioContext. Possibly too many AudioContexts running already.');\n\t }\n\t }\n\t this._context = options.context;\n\t // extend all of the methods\n\t for (var prop in this._context) {\n\t this._defineProperty(this._context, prop);\n\t }\n\t /**\n\t\t\t * The default latency hint\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._latencyHint = options.latencyHint;\n\t /**\n\t\t\t * An object containing all of the constants AudioBufferSourceNodes\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t this._constants = {};\n\t ///////////////////////////////////////////////////////////////////////\n\t // WORKER\n\t ///////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t * The amount of time events are scheduled\n\t\t\t * into the future\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this.lookAhead = options.lookAhead;\n\t /**\n\t\t\t * A reference to the actual computed update interval\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._computedUpdateInterval = 0;\n\t /**\n\t\t\t * A reliable callback method\n\t\t\t * @private\n\t\t\t * @type {Ticker}\n\t\t\t */\n\t this._ticker = new Ticker(this.emit.bind(this, 'tick'), options.clockSource, options.updateInterval);\n\t ///////////////////////////////////////////////////////////////////////\n\t // TIMEOUTS\n\t ///////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t * All of the setTimeout events.\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t this._timeouts = new Tone.Timeline();\n\t /**\n\t\t\t * The timeout id counter\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._timeoutIds = 0;\n\t this.on('tick', this._timeoutLoop.bind(this));\n\t };\n\t Tone.extend(Tone.Context, Tone.Emitter);\n\t Tone.Emitter.mixin(Tone.Context);\n\t /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Context.defaults = {\n\t 'clockSource': 'worker',\n\t 'latencyHint': 'interactive',\n\t 'lookAhead': 0.1,\n\t 'updateInterval': 0.03\n\t };\n\t /**\n\t\t * Define a property on this Tone.Context.\n\t\t * This is used to extend the native AudioContext\n\t\t * @param {AudioContext} context\n\t\t * @param {String} prop\n\t\t * @private\n\t\t */\n\t Tone.Context.prototype._defineProperty = function (context, prop) {\n\t if (Tone.isUndef(this[prop])) {\n\t Object.defineProperty(this, prop, {\n\t get: function () {\n\t if (typeof context[prop] === 'function') {\n\t return context[prop].bind(context);\n\t } else {\n\t return context[prop];\n\t }\n\t },\n\t set: function (val) {\n\t context[prop] = val;\n\t }\n\t });\n\t }\n\t };\n\t /**\n\t\t * The current audio context time\n\t\t * @return {Number}\n\t\t */\n\t Tone.Context.prototype.now = function () {\n\t return this._context.currentTime + this.lookAhead;\n\t };\n\t /**\n\t\t * Promise which is invoked when the context is running.\n\t\t * Tries to resume the context if it's not started.\n\t\t * @return {Promise}\n\t\t */\n\t Tone.Context.prototype.ready = function () {\n\t return new Promise(function (done) {\n\t if (this._context.state === 'running') {\n\t done();\n\t } else {\n\t this._context.resume().then(function () {\n\t done();\n\t });\n\t }\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Promise which is invoked when the context is running.\n\t\t * Tries to resume the context if it's not started.\n\t\t * @return {Promise}\n\t\t */\n\t Tone.Context.prototype.close = function () {\n\t return this._context.close().then(function () {\n\t Tone.Context.emit('close', this);\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Generate a looped buffer at some constant value.\n\t\t * @param {Number} val\n\t\t * @return {BufferSourceNode}\n\t\t */\n\t Tone.Context.prototype.getConstant = function (val) {\n\t if (this._constants[val]) {\n\t return this._constants[val];\n\t } else {\n\t var buffer = this._context.createBuffer(1, 128, this._context.sampleRate);\n\t var arr = buffer.getChannelData(0);\n\t for (var i = 0; i < arr.length; i++) {\n\t arr[i] = val;\n\t }\n\t var constant = this._context.createBufferSource();\n\t constant.channelCount = 1;\n\t constant.channelCountMode = 'explicit';\n\t constant.buffer = buffer;\n\t constant.loop = true;\n\t constant.start(0);\n\t this._constants[val] = constant;\n\t return constant;\n\t }\n\t };\n\t /**\n\t\t * The private loop which keeps track of the context scheduled timeouts\n\t\t * Is invoked from the clock source\n\t\t * @private\n\t\t */\n\t Tone.Context.prototype._timeoutLoop = function () {\n\t var now = this.now();\n\t while (this._timeouts && this._timeouts.length && this._timeouts.peek().time <= now) {\n\t this._timeouts.shift().callback();\n\t }\n\t };\n\t /**\n\t\t * A setTimeout which is gaurenteed by the clock source.\n\t\t * Also runs in the offline context.\n\t\t * @param {Function} fn The callback to invoke\n\t\t * @param {Seconds} timeout The timeout in seconds\n\t\t * @returns {Number} ID to use when invoking Tone.Context.clearTimeout\n\t\t */\n\t Tone.Context.prototype.setTimeout = function (fn, timeout) {\n\t this._timeoutIds++;\n\t var now = this.now();\n\t this._timeouts.add({\n\t callback: fn,\n\t time: now + timeout,\n\t id: this._timeoutIds\n\t });\n\t return this._timeoutIds;\n\t };\n\t /**\n\t\t * Clears a previously scheduled timeout with Tone.context.setTimeout\n\t\t * @param {Number} id The ID returned from setTimeout\n\t\t * @return {Tone.Context} this\n\t\t */\n\t Tone.Context.prototype.clearTimeout = function (id) {\n\t this._timeouts.forEach(function (event) {\n\t if (event.id === id) {\n\t this.remove(event);\n\t }\n\t });\n\t return this;\n\t };\n\t /**\n\t\t * How often the Web Worker callback is invoked.\n\t\t * This number corresponds to how responsive the scheduling\n\t\t * can be. Context.updateInterval + Context.lookAhead gives you the\n\t\t * total latency between scheduling an event and hearing it.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Context#\n\t\t * @name updateInterval\n\t\t */\n\t Object.defineProperty(Tone.Context.prototype, 'updateInterval', {\n\t get: function () {\n\t return this._ticker.updateInterval;\n\t },\n\t set: function (interval) {\n\t this._ticker.updateInterval = interval;\n\t }\n\t });\n\t /**\n\t\t * What the source of the clock is, either \"worker\" (Web Worker [default]),\n\t\t * \"timeout\" (setTimeout), or \"offline\" (none).\n\t\t * @type {String}\n\t\t * @memberOf Tone.Context#\n\t\t * @name clockSource\n\t\t */\n\t Object.defineProperty(Tone.Context.prototype, 'clockSource', {\n\t get: function () {\n\t return this._ticker.type;\n\t },\n\t set: function (type) {\n\t this._ticker.type = type;\n\t }\n\t });\n\t /**\n\t\t * The type of playback, which affects tradeoffs between audio\n\t\t * output latency and responsiveness.\n\t\t *\n\t\t * In addition to setting the value in seconds, the latencyHint also\n\t\t * accepts the strings \"interactive\" (prioritizes low latency),\n\t\t * \"playback\" (prioritizes sustained playback), \"balanced\" (balances\n\t\t * latency and performance), and \"fastest\" (lowest latency, might glitch more often).\n\t\t * @type {String|Seconds}\n\t\t * @memberOf Tone.Context#\n\t\t * @name latencyHint\n\t\t * @example\n\t\t * //set the lookAhead to 0.3 seconds\n\t\t * Tone.context.latencyHint = 0.3;\n\t\t */\n\t Object.defineProperty(Tone.Context.prototype, 'latencyHint', {\n\t get: function () {\n\t return this._latencyHint;\n\t },\n\t set: function (hint) {\n\t var lookAhead = hint;\n\t this._latencyHint = hint;\n\t if (Tone.isString(hint)) {\n\t switch (hint) {\n\t case 'interactive':\n\t lookAhead = 0.1;\n\t this._context.latencyHint = hint;\n\t break;\n\t case 'playback':\n\t lookAhead = 0.8;\n\t this._context.latencyHint = hint;\n\t break;\n\t case 'balanced':\n\t lookAhead = 0.25;\n\t this._context.latencyHint = hint;\n\t break;\n\t case 'fastest':\n\t this._context.latencyHint = 'interactive';\n\t lookAhead = 0.01;\n\t break;\n\t }\n\t }\n\t this.lookAhead = lookAhead;\n\t this.updateInterval = lookAhead / 3;\n\t }\n\t });\n\t /**\n\t\t * Unlike other dispose methods, this returns a Promise\n\t\t * which executes when the context is closed and disposed\n\t\t * @returns {Promise} this\n\t\t */\n\t Tone.Context.prototype.dispose = function () {\n\t return this.close().then(function () {\n\t Tone.Emitter.prototype.dispose.call(this);\n\t this._ticker.dispose();\n\t this._ticker = null;\n\t this._timeouts.dispose();\n\t this._timeouts = null;\n\t for (var con in this._constants) {\n\t this._constants[con].disconnect();\n\t }\n\t this._constants = null;\n\t }.bind(this));\n\t };\n\t /**\n\t\t * @class A class which provides a reliable callback using either\n\t\t * a Web Worker, or if that isn't supported, falls back to setTimeout.\n\t\t * @private\n\t\t */\n\t var Ticker = function (callback, type, updateInterval) {\n\t /**\n\t\t\t * Either \"worker\" or \"timeout\"\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._type = type;\n\t /**\n\t\t\t * The update interval of the worker\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._updateInterval = updateInterval;\n\t /**\n\t\t\t * The callback to invoke at regular intervals\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._callback = Tone.defaultArg(callback, Tone.noOp);\n\t //create the clock source for the first time\n\t this._createClock();\n\t };\n\t /**\n\t\t * The possible ticker types\n\t\t * @private\n\t\t * @type {Object}\n\t\t */\n\t Ticker.Type = {\n\t Worker: 'worker',\n\t Timeout: 'timeout',\n\t Offline: 'offline'\n\t };\n\t /**\n\t\t * Generate a web worker\n\t\t * @return {WebWorker}\n\t\t * @private\n\t\t */\n\t Ticker.prototype._createWorker = function () {\n\t //URL Shim\n\t window.URL = window.URL || window.webkitURL;\n\t var blob = new Blob([//the initial timeout time\n\t 'var timeoutTime = ' + (this._updateInterval * 1000).toFixed(1) + ';' + //onmessage callback\n\t 'self.onmessage = function(msg){' + '\\ttimeoutTime = parseInt(msg.data);' + '};' + //the tick function which posts a message\n\t //and schedules a new tick\n\t 'function tick(){' + '\\tsetTimeout(tick, timeoutTime);' + '\\tself.postMessage(\\'tick\\');' + '}' + //call tick initially\n\t 'tick();']);\n\t var blobUrl = URL.createObjectURL(blob);\n\t var worker = new Worker(blobUrl);\n\t worker.onmessage = this._callback.bind(this);\n\t this._worker = worker;\n\t };\n\t /**\n\t\t * Create a timeout loop\n\t\t * @private\n\t\t */\n\t Ticker.prototype._createTimeout = function () {\n\t this._timeout = setTimeout(function () {\n\t this._createTimeout();\n\t this._callback();\n\t }.bind(this), this._updateInterval * 1000);\n\t };\n\t /**\n\t\t * Create the clock source.\n\t\t * @private\n\t\t */\n\t Ticker.prototype._createClock = function () {\n\t if (this._type === Ticker.Type.Worker) {\n\t try {\n\t this._createWorker();\n\t } catch (e) {\n\t // workers not supported, fallback to timeout\n\t this._type = Ticker.Type.Timeout;\n\t this._createClock();\n\t }\n\t } else if (this._type === Ticker.Type.Timeout) {\n\t this._createTimeout();\n\t }\n\t };\n\t /**\n\t\t * @memberOf Ticker#\n\t\t * @type {Number}\n\t\t * @name updateInterval\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Ticker.prototype, 'updateInterval', {\n\t get: function () {\n\t return this._updateInterval;\n\t },\n\t set: function (interval) {\n\t this._updateInterval = Math.max(interval, 128 / 44100);\n\t if (this._type === Ticker.Type.Worker) {\n\t this._worker.postMessage(Math.max(interval * 1000, 1));\n\t }\n\t }\n\t });\n\t /**\n\t\t * The type of the ticker, either a worker or a timeout\n\t\t * @memberOf Ticker#\n\t\t * @type {Number}\n\t\t * @name type\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Ticker.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t this._disposeClock();\n\t this._type = type;\n\t this._createClock();\n\t }\n\t });\n\t /**\n\t\t * Clean up the current clock source\n\t\t * @private\n\t\t */\n\t Ticker.prototype._disposeClock = function () {\n\t if (this._timeout) {\n\t clearTimeout(this._timeout);\n\t this._timeout = null;\n\t }\n\t if (this._worker) {\n\t this._worker.terminate();\n\t this._worker.onmessage = null;\n\t this._worker = null;\n\t }\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @private\n\t\t */\n\t Ticker.prototype.dispose = function () {\n\t this._disposeClock();\n\t this._callback = null;\n\t };\n\t /**\n\t\t * Shim all connect/disconnect and some deprecated methods which are still in\n\t\t * some older implementations.\n\t\t * @private\n\t\t */\n\t Tone.getContext(function () {\n\t var nativeConnect = AudioNode.prototype.connect;\n\t var nativeDisconnect = AudioNode.prototype.disconnect;\n\t //replace the old connect method\n\t function toneConnect(B, outNum, inNum) {\n\t if (B.input) {\n\t inNum = Tone.defaultArg(inNum, 0);\n\t if (Tone.isArray(B.input)) {\n\t return this.connect(B.input[inNum]);\n\t } else {\n\t return this.connect(B.input, outNum, inNum);\n\t }\n\t } else {\n\t try {\n\t if (B instanceof AudioNode) {\n\t nativeConnect.call(this, B, outNum, inNum);\n\t return B;\n\t } else {\n\t nativeConnect.call(this, B, outNum);\n\t return B;\n\t }\n\t } catch (e) {\n\t throw new Error('error connecting to node: ' + B + '\\n' + e);\n\t }\n\t }\n\t }\n\t //replace the old disconnect method\n\t function toneDisconnect(B, outNum, inNum) {\n\t if (B && B.input && Tone.isArray(B.input)) {\n\t inNum = Tone.defaultArg(inNum, 0);\n\t this.disconnect(B.input[inNum], outNum, 0);\n\t } else if (B && B.input) {\n\t this.disconnect(B.input, outNum, inNum);\n\t } else {\n\t try {\n\t nativeDisconnect.apply(this, arguments);\n\t } catch (e) {\n\t throw new Error('error disconnecting node: ' + B + '\\n' + e);\n\t }\n\t }\n\t }\n\t if (AudioNode.prototype.connect !== toneConnect) {\n\t AudioNode.prototype.connect = toneConnect;\n\t AudioNode.prototype.disconnect = toneDisconnect;\n\t }\n\t });\n\t // set the audio context initially, and if one is not already created\n\t if (Tone.supported && !Tone.initialized) {\n\t Tone.context = new Tone.Context();\n\t // log on first initialization\n\t // allow optional silencing of this log\n\t if (!window.TONE_SILENCE_VERSION_LOGGING) {\n\t // eslint-disable-next-line no-console\n\t console.log('%c * Tone.js ' + Tone.version + ' * ', 'background: #000; color: #fff');\n\t }\n\t } else if (!Tone.supported) {\n\t // eslint-disable-next-line no-console\n\t console.warn('This browser does not support Tone.js');\n\t }\n\t return Tone.Context;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.AudioNode is the base class for classes which process audio.\n\t\t * AudioNodes have inputs and outputs.\n\t\t * @param\t{AudioContext=} context\tThe audio context to use with the class\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.AudioNode = function () {\n\t Tone.call(this);\n\t //use the default context if one is not passed in\n\t var options = Tone.defaults(arguments, ['context'], { 'context': Tone.context });\n\t /**\n\t\t\t * The AudioContext of this instance\n\t\t\t * @private\n\t\t\t * @type {AudioContext}\n\t\t\t */\n\t this._context = options.context;\n\t };\n\t Tone.extend(Tone.AudioNode);\n\t /**\n\t\t * Get the audio context belonging to this instance.\n\t\t * @type {Tone.Context}\n\t\t * @memberOf Tone.AudioNode#\n\t\t * @name context\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'context', {\n\t get: function () {\n\t return this._context;\n\t }\n\t });\n\t /**\n\t\t * Create input and outputs for this object.\n\t\t * @param {Number} [input=0] The number of inputs\n\t\t * @param {Number} [outputs=0] The number of outputs\n\t\t * @return {Tone.AudioNode} this\n\t\t * @private\n\t\t */\n\t Tone.AudioNode.prototype.createInsOuts = function (inputs, outputs) {\n\t if (inputs === 1) {\n\t this.input = this.context.createGain();\n\t } else if (inputs > 1) {\n\t this.input = new Array(inputs);\n\t }\n\t if (outputs === 1) {\n\t this.output = this.context.createGain();\n\t } else if (outputs > 1) {\n\t this.output = new Array(outputs);\n\t }\n\t };\n\t /**\n\t\t * channelCount is the number of channels used when up-mixing and down-mixing\n\t\t * connections to any inputs to the node. The default value is 2 except for\n\t\t * specific nodes where its value is specially determined.\n\t\t *\n\t\t * @memberof Tone.AudioNode#\n\t\t * @type {Number}\n\t\t * @name channelCount\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'channelCount', {\n\t get: function () {\n\t return this.output.channelCount;\n\t },\n\t set: function (c) {\n\t return this.output.channelCount = c;\n\t }\n\t });\n\t /**\n\t\t * channelCountMode determines how channels will be counted when up-mixing and\n\t\t * down-mixing connections to any inputs to the node.\n\t\t * The default value is \"max\". This attribute has no effect for nodes with no inputs.\n\t\t * @memberof Tone.AudioNode#\n\t\t * @type {String}\n\t\t * @name channelCountMode\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'channelCountMode', {\n\t get: function () {\n\t return this.output.channelCountMode;\n\t },\n\t set: function (m) {\n\t return this.output.channelCountMode = m;\n\t }\n\t });\n\t /**\n\t\t * channelInterpretation determines how individual channels will be treated\n\t\t * when up-mixing and down-mixing connections to any inputs to the node.\n\t\t * The default value is \"speakers\".\n\t\t * @memberof Tone.AudioNode#\n\t\t * @type {String}\n\t\t * @name channelInterpretation\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'channelInterpretation', {\n\t get: function () {\n\t return this.output.channelInterpretation;\n\t },\n\t set: function (i) {\n\t return this.output.channelInterpretation = i;\n\t }\n\t });\n\t /**\n\t\t * The number of inputs feeding into the AudioNode.\n\t\t * For source nodes, this will be 0.\n\t\t * @type {Number}\n\t\t * @name numberOfInputs\n\t\t * @memberof Tone.AudioNode#\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'numberOfInputs', {\n\t get: function () {\n\t if (this.input) {\n\t if (Tone.isArray(this.input)) {\n\t return this.input.length;\n\t } else {\n\t return 1;\n\t }\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The number of outputs coming out of the AudioNode.\n\t\t * @type {Number}\n\t\t * @name numberOfOutputs\n\t\t * @memberof Tone.AudioNode#\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.AudioNode.prototype, 'numberOfOutputs', {\n\t get: function () {\n\t if (this.output) {\n\t if (Tone.isArray(this.output)) {\n\t return this.output.length;\n\t } else {\n\t return 1;\n\t }\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Called when an audio param connects to this node\n\t\t * @private\n\t\t */\n\t Tone.AudioNode.prototype._onConnect = function () {\n\t };\n\t /**\n\t\t * connect the output of a ToneNode to an AudioParam, AudioNode, or ToneNode\n\t\t * @param {Tone | AudioParam | AudioNode} unit\n\t\t * @param {number} [outputNum=0] optionally which output to connect from\n\t\t * @param {number} [inputNum=0] optionally which input to connect to\n\t\t * @returns {Tone.AudioNode} this\n\t\t */\n\t Tone.AudioNode.prototype.connect = function (unit, outputNum, inputNum) {\n\t if (unit._onConnect) {\n\t unit._onConnect(this);\n\t }\n\t if (Tone.isArray(this.output)) {\n\t outputNum = Tone.defaultArg(outputNum, 0);\n\t this.output[outputNum].connect(unit, 0, inputNum);\n\t } else {\n\t this.output.connect(unit, outputNum, inputNum);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * disconnect the output\n\t\t * @param {Number|AudioNode} output Either the output index to disconnect\n\t\t * if the output is an array, or the\n\t\t * node to disconnect from.\n\t\t * @returns {Tone.AudioNode} this\n\t\t */\n\t Tone.AudioNode.prototype.disconnect = function (destination, outputNum, inputNum) {\n\t if (Tone.isArray(this.output)) {\n\t if (Tone.isNumber(destination)) {\n\t this.output[destination].disconnect();\n\t } else {\n\t outputNum = Tone.defaultArg(outputNum, 0);\n\t this.output[outputNum].disconnect(destination, 0, inputNum);\n\t }\n\t } else {\n\t this.output.disconnect.apply(this.output, arguments);\n\t }\n\t };\n\t /**\n\t\t * Connect the output of this node to the rest of the nodes in series.\n\t\t * @example\n\t\t * //connect a node to an effect, panVol and then to the master output\n\t\t * node.chain(effect, panVol, Tone.Master);\n\t\t * @param {...AudioParam|Tone|AudioNode} nodes\n\t\t * @returns {Tone.AudioNode} this\n\t\t * @private\n\t\t */\n\t Tone.AudioNode.prototype.chain = function () {\n\t var currentUnit = this;\n\t for (var i = 0; i < arguments.length; i++) {\n\t var toUnit = arguments[i];\n\t currentUnit.connect(toUnit);\n\t currentUnit = toUnit;\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * connect the output of this node to the rest of the nodes in parallel.\n\t\t * @param {...AudioParam|Tone|AudioNode} nodes\n\t\t * @returns {Tone.AudioNode} this\n\t\t * @private\n\t\t */\n\t Tone.AudioNode.prototype.fan = function () {\n\t for (var i = 0; i < arguments.length; i++) {\n\t this.connect(arguments[i]);\n\t }\n\t return this;\n\t };\n\t if (window.AudioNode) {\n\t //give native nodes chain and fan methods\n\t AudioNode.prototype.chain = Tone.AudioNode.prototype.chain;\n\t AudioNode.prototype.fan = Tone.AudioNode.prototype.fan;\n\t }\n\t /**\n\t\t * Dispose and disconnect\n\t\t * @return {Tone.AudioNode} this\n\t\t */\n\t Tone.AudioNode.prototype.dispose = function () {\n\t if (!Tone.isUndef(this.input)) {\n\t if (this.input instanceof AudioNode) {\n\t this.input.disconnect();\n\t }\n\t this.input = null;\n\t }\n\t if (!Tone.isUndef(this.output)) {\n\t if (this.output instanceof AudioNode) {\n\t this.output.disconnect();\n\t }\n\t this.output = null;\n\t }\n\t this._context = null;\n\t return this;\n\t };\n\t return Tone.AudioNode;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Base class for all Signals. Used Internally.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.SignalBase = function () {\n\t Tone.AudioNode.call(this);\n\t };\n\t Tone.extend(Tone.SignalBase, Tone.AudioNode);\n\t /**\n\t\t * When signals connect to other signals or AudioParams,\n\t\t * they take over the output value of that signal or AudioParam.\n\t\t * For all other nodes, the behavior is the same as a default <code>connect</code>.\n\t\t *\n\t\t * @override\n\t\t * @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n\t\t * @param {number} [outputNumber=0] The output number to connect from.\n\t\t * @param {number} [inputNumber=0] The input number to connect to.\n\t\t * @returns {Tone.SignalBase} this\n\t\t */\n\t Tone.SignalBase.prototype.connect = function (node, outputNumber, inputNumber) {\n\t //zero it out so that the signal can have full control\n\t if (Tone.Signal && Tone.Signal === node.constructor || Tone.Param && Tone.Param === node.constructor) {\n\t //cancel changes\n\t node._param.cancelScheduledValues(0);\n\t //reset the value\n\t node._param.value = 0;\n\t //mark the value as overridden\n\t node.overridden = true;\n\t } else if (node instanceof AudioParam) {\n\t node.cancelScheduledValues(0);\n\t node.value = 0;\n\t }\n\t Tone.AudioNode.prototype.connect.call(this, node, outputNumber, inputNumber);\n\t return this;\n\t };\n\t return Tone.SignalBase;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported) {\n\t //fixes safari only bug which is still present in 11\n\t var ua = navigator.userAgent.toLowerCase();\n\t var isSafari = ua.includes('safari') && !ua.includes('chrome');\n\t if (isSafari) {\n\t var WaveShaperNode = function (context) {\n\t this._internalNode = this.input = this.output = context._native_createWaveShaper();\n\t this._curve = null;\n\t for (var prop in this._internalNode) {\n\t this._defineProperty(this._internalNode, prop);\n\t }\n\t };\n\t Object.defineProperty(WaveShaperNode.prototype, 'curve', {\n\t get: function () {\n\t return this._curve;\n\t },\n\t set: function (curve) {\n\t this._curve = curve;\n\t var array = new Float32Array(curve.length + 1);\n\t array.set(curve, 1);\n\t array[0] = curve[0];\n\t this._internalNode.curve = array;\n\t }\n\t });\n\t WaveShaperNode.prototype._defineProperty = function (context, prop) {\n\t if (Tone.isUndef(this[prop])) {\n\t Object.defineProperty(this, prop, {\n\t get: function () {\n\t if (typeof context[prop] === 'function') {\n\t return context[prop].bind(context);\n\t } else {\n\t return context[prop];\n\t }\n\t },\n\t set: function (val) {\n\t context[prop] = val;\n\t }\n\t });\n\t }\n\t };\n\t AudioContext.prototype._native_createWaveShaper = AudioContext.prototype.createWaveShaper;\n\t AudioContext.prototype.createWaveShaper = function () {\n\t return new WaveShaperNode(this);\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Wraps the native Web Audio API\n\t\t * [WaveShaperNode](http://webaudio.github.io/web-audio-api/#the-waveshapernode-interface).\n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @param {function|Array|Number} mapping The function used to define the values.\n\t\t * The mapping function should take two arguments:\n\t\t * the first is the value at the current position\n\t\t * and the second is the array position.\n\t\t * If the argument is an array, that array will be\n\t\t * set as the wave shaping function. The input\n\t\t * signal is an AudioRange [-1, 1] value and the output\n\t\t * signal can take on any numerical values.\n\t\t *\n\t\t * @param {Number} [bufferLen=1024] The length of the WaveShaperNode buffer.\n\t\t * @example\n\t\t * var timesTwo = new Tone.WaveShaper(function(val){\n\t\t * \treturn val * 2;\n\t\t * }, 2048);\n\t\t * @example\n\t\t * //a waveshaper can also be constructed with an array of values\n\t\t * var invert = new Tone.WaveShaper([1, -1]);\n\t\t */\n\t Tone.WaveShaper = function (mapping, bufferLen) {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * the waveshaper\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._shaper = this.input = this.output = this.context.createWaveShaper();\n\t /**\n\t\t\t * the waveshapers curve\n\t\t\t * @type {Float32Array}\n\t\t\t * @private\n\t\t\t */\n\t this._curve = null;\n\t if (Array.isArray(mapping)) {\n\t this.curve = mapping;\n\t } else if (isFinite(mapping) || Tone.isUndef(mapping)) {\n\t this._curve = new Float32Array(Tone.defaultArg(mapping, 1024));\n\t } else if (Tone.isFunction(mapping)) {\n\t this._curve = new Float32Array(Tone.defaultArg(bufferLen, 1024));\n\t this.setMap(mapping);\n\t }\n\t };\n\t Tone.extend(Tone.WaveShaper, Tone.SignalBase);\n\t /**\n\t\t * Uses a mapping function to set the value of the curve.\n\t\t * @param {function} mapping The function used to define the values.\n\t\t * The mapping function take two arguments:\n\t\t * the first is the value at the current position\n\t\t * which goes from -1 to 1 over the number of elements\n\t\t * in the curve array. The second argument is the array position.\n\t\t * @returns {Tone.WaveShaper} this\n\t\t * @example\n\t\t * //map the input signal from [-1, 1] to [0, 10]\n\t\t * shaper.setMap(function(val, index){\n\t\t * \treturn (val + 1) * 5;\n\t\t * })\n\t\t */\n\t Tone.WaveShaper.prototype.setMap = function (mapping) {\n\t var array = new Array(this._curve.length);\n\t for (var i = 0, len = this._curve.length; i < len; i++) {\n\t var normalized = i / (len - 1) * 2 - 1;\n\t array[i] = mapping(normalized, i);\n\t }\n\t this.curve = array;\n\t return this;\n\t };\n\t /**\n\t\t * The array to set as the waveshaper curve. For linear curves\n\t\t * array length does not make much difference, but for complex curves\n\t\t * longer arrays will provide smoother interpolation.\n\t\t * @memberOf Tone.WaveShaper#\n\t\t * @type {Array}\n\t\t * @name curve\n\t\t */\n\t Object.defineProperty(Tone.WaveShaper.prototype, 'curve', {\n\t get: function () {\n\t return this._shaper.curve;\n\t },\n\t set: function (mapping) {\n\t this._curve = new Float32Array(mapping);\n\t this._shaper.curve = this._curve;\n\t }\n\t });\n\t /**\n\t\t * Specifies what type of oversampling (if any) should be used when\n\t\t * applying the shaping curve. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.WaveShaper#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t Object.defineProperty(Tone.WaveShaper.prototype, 'oversample', {\n\t get: function () {\n\t return this._shaper.oversample;\n\t },\n\t set: function (oversampling) {\n\t if ([\n\t 'none',\n\t '2x',\n\t '4x'\n\t ].includes(oversampling)) {\n\t this._shaper.oversample = oversampling;\n\t } else {\n\t throw new RangeError('Tone.WaveShaper: oversampling must be either \\'none\\', \\'2x\\', or \\'4x\\'');\n\t }\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.WaveShaper} this\n\t\t */\n\t Tone.WaveShaper.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._shaper.disconnect();\n\t this._shaper = null;\n\t this._curve = null;\n\t return this;\n\t };\n\t return Tone.WaveShaper;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TimeBase is a flexible encoding of time\n\t\t * which can be evaluated to and from a string.\n\t\t * @extends {Tone}\n\t\t * @param {Time} val The time value as a number or string\n\t\t * @param {String=} units Unit values\n\t\t * @example\n\t\t * Tone.TimeBase(4, \"n\")\n\t\t * Tone.TimeBase(2, \"t\")\n\t\t * Tone.TimeBase(\"2t\")\n\t\t * Tone.TimeBase(\"2t\") + Tone.TimeBase(\"4n\");\n\t\t */\n\t Tone.TimeBase = function (val, units) {\n\t //allows it to be constructed with or without 'new'\n\t if (this instanceof Tone.TimeBase) {\n\t /**\n\t\t\t\t * The value\n\t\t\t\t * @type {Number|String|Tone.TimeBase}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._val = val;\n\t /**\n\t\t\t\t * The units\n\t\t\t\t * @type {String?}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._units = units;\n\t //test if the value is a string representation of a number\n\t if (Tone.isUndef(this._units) && Tone.isString(this._val) && // eslint-disable-next-line eqeqeq\n\t parseFloat(this._val) == this._val && this._val.charAt(0) !== '+') {\n\t this._val = parseFloat(this._val);\n\t this._units = this._defaultUnits;\n\t } else if (val && val.constructor === this.constructor) {\n\t //if they're the same type, just copy values over\n\t this._val = val._val;\n\t this._units = val._units;\n\t } else if (val instanceof Tone.TimeBase) {\n\t switch (this._defaultUnits) {\n\t case 's':\n\t this._val = val.toSeconds();\n\t break;\n\t case 'i':\n\t this._val = val.toTicks();\n\t break;\n\t case 'hz':\n\t this._val = val.toFrequency();\n\t break;\n\t case 'midi':\n\t this._val = val.toMidi();\n\t break;\n\t default:\n\t throw new Error('Unrecognized default units ' + this._defaultUnits);\n\t }\n\t }\n\t } else {\n\t return new Tone.TimeBase(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.TimeBase);\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tABSTRACT SYNTAX TREE PARSER\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * All the primary expressions.\n\t\t * @private\n\t\t * @type {Object}\n\t\t */\n\t Tone.TimeBase.prototype._expressions = {\n\t 'n': {\n\t regexp: /^(\\d+)n(\\.?)$/i,\n\t method: function (value, dot) {\n\t value = parseInt(value);\n\t var scalar = dot === '.' ? 1.5 : 1;\n\t if (value === 1) {\n\t return this._beatsToUnits(this._getTimeSignature()) * scalar;\n\t } else {\n\t return this._beatsToUnits(4 / value) * scalar;\n\t }\n\t }\n\t },\n\t 't': {\n\t regexp: /^(\\d+)t$/i,\n\t method: function (value) {\n\t value = parseInt(value);\n\t return this._beatsToUnits(8 / (parseInt(value) * 3));\n\t }\n\t },\n\t 'm': {\n\t regexp: /^(\\d+)m$/i,\n\t method: function (value) {\n\t return this._beatsToUnits(parseInt(value) * this._getTimeSignature());\n\t }\n\t },\n\t 'i': {\n\t regexp: /^(\\d+)i$/i,\n\t method: function (value) {\n\t return this._ticksToUnits(parseInt(value));\n\t }\n\t },\n\t 'hz': {\n\t regexp: /^(\\d+(?:\\.\\d+)?)hz$/i,\n\t method: function (value) {\n\t return this._frequencyToUnits(parseFloat(value));\n\t }\n\t },\n\t 'tr': {\n\t regexp: /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?$/,\n\t method: function (m, q, s) {\n\t var total = 0;\n\t if (m && m !== '0') {\n\t total += this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t }\n\t if (q && q !== '0') {\n\t total += this._beatsToUnits(parseFloat(q));\n\t }\n\t if (s && s !== '0') {\n\t total += this._beatsToUnits(parseFloat(s) / 4);\n\t }\n\t return total;\n\t }\n\t },\n\t 's': {\n\t regexp: /^(\\d+(?:\\.\\d+)?)s$/,\n\t method: function (value) {\n\t return this._secondsToUnits(parseFloat(value));\n\t }\n\t },\n\t 'samples': {\n\t regexp: /^(\\d+)samples$/,\n\t method: function (value) {\n\t return parseInt(value) / this.context.sampleRate;\n\t }\n\t },\n\t 'default': {\n\t regexp: /^(\\d+(?:\\.\\d+)?)$/,\n\t method: function (value) {\n\t return this._expressions[this._defaultUnits].method.call(this, value);\n\t }\n\t }\n\t };\n\t /**\n\t\t * The default units if none are given.\n\t\t * @type {String}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._defaultUnits = 's';\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tTRANSPORT FALLBACKS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Return the bpm, or 120 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._getBpm = function () {\n\t if (Tone.Transport) {\n\t return Tone.Transport.bpm.value;\n\t } else {\n\t return 120;\n\t }\n\t };\n\t /**\n\t\t * Return the timeSignature or 4 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._getTimeSignature = function () {\n\t if (Tone.Transport) {\n\t return Tone.Transport.timeSignature;\n\t } else {\n\t return 4;\n\t }\n\t };\n\t /**\n\t\t * Return the PPQ or 192 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._getPPQ = function () {\n\t if (Tone.Transport) {\n\t return Tone.Transport.PPQ;\n\t } else {\n\t return 192;\n\t }\n\t };\n\t /**\n\t\t * Return the current time in whichever context is relevant\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._now = function () {\n\t return this.now();\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tUNIT CONVERSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Returns the value of a frequency in the current units\n\t\t * @param {Frequency} freq\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._frequencyToUnits = function (freq) {\n\t return 1 / freq;\n\t };\n\t /**\n\t\t * Return the value of the beats in the current units\n\t\t * @param {Number} beats\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._beatsToUnits = function (beats) {\n\t return 60 / this._getBpm() * beats;\n\t };\n\t /**\n\t\t * Returns the value of a second in the current units\n\t\t * @param {Seconds} seconds\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._secondsToUnits = function (seconds) {\n\t return seconds;\n\t };\n\t /**\n\t\t * Returns the value of a tick in the current time units\n\t\t * @param {Ticks} ticks\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._ticksToUnits = function (ticks) {\n\t return ticks * (this._beatsToUnits(1) / this._getPPQ());\n\t };\n\t /**\n\t\t * With no arguments, return 'now'\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.TimeBase.prototype._noArg = function () {\n\t return this._now();\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tEXPRESSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Evaluate the time value. Returns the time\n\t\t * in seconds.\n\t\t * @return {Seconds}\n\t\t */\n\t Tone.TimeBase.prototype.valueOf = function () {\n\t if (Tone.isUndef(this._val)) {\n\t return this._noArg();\n\t } else if (Tone.isString(this._val) && Tone.isUndef(this._units)) {\n\t for (var units in this._expressions) {\n\t if (this._expressions[units].regexp.test(this._val.trim())) {\n\t this._units = units;\n\t break;\n\t }\n\t }\n\t }\n\t if (!Tone.isUndef(this._units)) {\n\t var expr = this._expressions[this._units];\n\t var matching = this._val.toString().trim().match(expr.regexp);\n\t if (matching) {\n\t return expr.method.apply(this, matching.slice(1));\n\t } else {\n\t return expr.method.call(this, parseFloat(this._val));\n\t }\n\t } else {\n\t return this._val;\n\t }\n\t };\n\t /**\n\t\t * Return the value in seconds\n\t\t * @return {Seconds}\n\t\t */\n\t Tone.TimeBase.prototype.toSeconds = function () {\n\t return this.valueOf();\n\t };\n\t /**\n\t\t * Return the value in hertz\n\t\t * @return {Frequency}\n\t\t */\n\t Tone.TimeBase.prototype.toFrequency = function () {\n\t return 1 / this.toSeconds();\n\t };\n\t /**\n\t\t * Return the time in samples\n\t\t * @return {Samples}\n\t\t */\n\t Tone.TimeBase.prototype.toSamples = function () {\n\t return this.toSeconds() * this.context.sampleRate;\n\t };\n\t /**\n\t\t * Return the time in milliseconds.\n\t\t * @return {Milliseconds}\n\t\t */\n\t Tone.TimeBase.prototype.toMilliseconds = function () {\n\t return this.toSeconds() * 1000;\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.TimeBase} this\n\t\t */\n\t Tone.TimeBase.prototype.dispose = function () {\n\t this._val = null;\n\t this._units = null;\n\t };\n\t return Tone.TimeBase;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Frequency is a primitive type for encoding Frequency values.\n\t\t * Eventually all time values are evaluated to hertz\n\t\t * using the `eval` method.\n\t\t * @constructor\n\t\t * @extends {Tone.TimeBase}\n\t\t * @param {String|Number} val The time value.\n\t\t * @param {String=} units The units of the value.\n\t\t * @example\n\t\t * Tone.Frequency(\"C3\") // 261\n\t\t * Tone.Frequency(38, \"midi\") //\n\t\t * Tone.Frequency(\"C3\").transpose(4);\n\t\t */\n\t Tone.Frequency = function (val, units) {\n\t if (this instanceof Tone.Frequency) {\n\t Tone.TimeBase.call(this, val, units);\n\t } else {\n\t return new Tone.Frequency(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.Frequency, Tone.TimeBase);\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tAUGMENT BASE EXPRESSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t Tone.Frequency.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t 'midi': {\n\t regexp: /^(\\d+(?:\\.\\d+)?midi)/,\n\t method: function (value) {\n\t if (this._defaultUnits === 'midi') {\n\t return value;\n\t } else {\n\t return Tone.Frequency.mtof(value);\n\t }\n\t }\n\t },\n\t 'note': {\n\t regexp: /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,\n\t method: function (pitch, octave) {\n\t var index = noteToScaleIndex[pitch.toLowerCase()];\n\t var noteNumber = index + (parseInt(octave) + 1) * 12;\n\t if (this._defaultUnits === 'midi') {\n\t return noteNumber;\n\t } else {\n\t return Tone.Frequency.mtof(noteNumber);\n\t }\n\t }\n\t },\n\t 'tr': {\n\t regexp: /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?/,\n\t method: function (m, q, s) {\n\t var total = 1;\n\t if (m && m !== '0') {\n\t total *= this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t }\n\t if (q && q !== '0') {\n\t total *= this._beatsToUnits(parseFloat(q));\n\t }\n\t if (s && s !== '0') {\n\t total *= this._beatsToUnits(parseFloat(s) / 4);\n\t }\n\t return total;\n\t }\n\t }\n\t });\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tEXPRESSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Transposes the frequency by the given number of semitones.\n\t\t * @param {Interval} interval\n\t\t * @return {Tone.Frequency} A new transposed frequency\n\t\t * @example\n\t\t * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n\t\t */\n\t Tone.Frequency.prototype.transpose = function (interval) {\n\t return new this.constructor(this.valueOf() * Tone.intervalToFrequencyRatio(interval));\n\t };\n\t /**\n\t\t * Takes an array of semitone intervals and returns\n\t\t * an array of frequencies transposed by those intervals.\n\t\t * @param {Array} intervals\n\t\t * @return {Array<Tone.Frequency>} Returns an array of Frequencies\n\t\t * @example\n\t\t * Tone.Frequency(\"A4\").harmonize([0, 3, 7]); //[\"A4\", \"C5\", \"E5\"]\n\t\t */\n\t Tone.Frequency.prototype.harmonize = function (intervals) {\n\t return intervals.map(function (interval) {\n\t return this.transpose(interval);\n\t }.bind(this));\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tUNIT CONVERSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Return the value of the frequency as a MIDI note\n\t\t * @return {MIDI}\n\t\t * @example\n\t\t * Tone.Frequency(\"C4\").toMidi(); //60\n\t\t */\n\t Tone.Frequency.prototype.toMidi = function () {\n\t return Tone.Frequency.ftom(this.valueOf());\n\t };\n\t /**\n\t\t * Return the value of the frequency in Scientific Pitch Notation\n\t\t * @return {Note}\n\t\t * @example\n\t\t * Tone.Frequency(69, \"midi\").toNote(); //\"A4\"\n\t\t */\n\t Tone.Frequency.prototype.toNote = function () {\n\t var freq = this.toFrequency();\n\t var log = Math.log2(freq / Tone.Frequency.A4);\n\t var noteNumber = Math.round(12 * log) + 57;\n\t var octave = Math.floor(noteNumber / 12);\n\t if (octave < 0) {\n\t noteNumber += -12 * octave;\n\t }\n\t var noteName = scaleIndexToNote[noteNumber % 12];\n\t return noteName + octave.toString();\n\t };\n\t /**\n\t\t * Return the duration of one cycle in seconds.\n\t\t * @return {Seconds}\n\t\t */\n\t Tone.Frequency.prototype.toSeconds = function () {\n\t return 1 / Tone.TimeBase.prototype.toSeconds.call(this);\n\t };\n\t /**\n\t\t * Return the value in Hertz\n\t\t * @return {Frequency}\n\t\t */\n\t Tone.Frequency.prototype.toFrequency = function () {\n\t return Tone.TimeBase.prototype.toFrequency.call(this);\n\t };\n\t /**\n\t\t * Return the duration of one cycle in ticks\n\t\t * @return {Ticks}\n\t\t */\n\t Tone.Frequency.prototype.toTicks = function () {\n\t var quarterTime = this._beatsToUnits(1);\n\t var quarters = this.valueOf() / quarterTime;\n\t return Math.floor(quarters * Tone.Transport.PPQ);\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tUNIT CONVERSIONS HELPERS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * With no arguments, return 0\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._noArg = function () {\n\t return 0;\n\t };\n\t /**\n\t\t * Returns the value of a frequency in the current units\n\t\t * @param {Frequency} freq\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._frequencyToUnits = function (freq) {\n\t return freq;\n\t };\n\t /**\n\t\t * Returns the value of a tick in the current time units\n\t\t * @param {Ticks} ticks\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._ticksToUnits = function (ticks) {\n\t return 1 / (ticks * 60 / (Tone.Transport.bpm.value * Tone.Transport.PPQ));\n\t };\n\t /**\n\t\t * Return the value of the beats in the current units\n\t\t * @param {Number} beats\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._beatsToUnits = function (beats) {\n\t return 1 / Tone.TimeBase.prototype._beatsToUnits.call(this, beats);\n\t };\n\t /**\n\t\t * Returns the value of a second in the current units\n\t\t * @param {Seconds} seconds\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._secondsToUnits = function (seconds) {\n\t return 1 / seconds;\n\t };\n\t /**\n\t\t * The default units if none are given.\n\t\t * @private\n\t\t */\n\t Tone.Frequency.prototype._defaultUnits = 'hz';\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tFREQUENCY CONVERSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Note to scale index\n\t\t * @type {Object}\n\t\t */\n\t var noteToScaleIndex = {\n\t 'cbb': -2,\n\t 'cb': -1,\n\t 'c': 0,\n\t 'c#': 1,\n\t 'cx': 2,\n\t 'dbb': 0,\n\t 'db': 1,\n\t 'd': 2,\n\t 'd#': 3,\n\t 'dx': 4,\n\t 'ebb': 2,\n\t 'eb': 3,\n\t 'e': 4,\n\t 'e#': 5,\n\t 'ex': 6,\n\t 'fbb': 3,\n\t 'fb': 4,\n\t 'f': 5,\n\t 'f#': 6,\n\t 'fx': 7,\n\t 'gbb': 5,\n\t 'gb': 6,\n\t 'g': 7,\n\t 'g#': 8,\n\t 'gx': 9,\n\t 'abb': 7,\n\t 'ab': 8,\n\t 'a': 9,\n\t 'a#': 10,\n\t 'ax': 11,\n\t 'bbb': 9,\n\t 'bb': 10,\n\t 'b': 11,\n\t 'b#': 12,\n\t 'bx': 13\n\t };\n\t /**\n\t\t * scale index to note (sharps)\n\t\t * @type {Array}\n\t\t */\n\t var scaleIndexToNote = [\n\t 'C',\n\t 'C#',\n\t 'D',\n\t 'D#',\n\t 'E',\n\t 'F',\n\t 'F#',\n\t 'G',\n\t 'G#',\n\t 'A',\n\t 'A#',\n\t 'B'\n\t ];\n\t /**\n\t\t * The [concert pitch](https://en.wikipedia.org/wiki/Concert_pitch)\n\t\t * A4's values in Hertz.\n\t\t * @type {Frequency}\n\t\t * @static\n\t\t */\n\t Tone.Frequency.A4 = 440;\n\t /**\n\t\t * Convert a MIDI note to frequency value.\n\t\t * @param {MIDI} midi The midi number to convert.\n\t\t * @return {Frequency} the corresponding frequency value\n\t\t * @static\n\t\t * @example\n\t\t * Tone.Frequency.mtof(69); // returns 440\n\t\t */\n\t Tone.Frequency.mtof = function (midi) {\n\t return Tone.Frequency.A4 * Math.pow(2, (midi - 69) / 12);\n\t };\n\t /**\n\t\t * Convert a frequency value to a MIDI note.\n\t\t * @param {Frequency} frequency The value to frequency value to convert.\n\t\t * @returns {MIDI}\n\t\t * @static\n\t\t * @example\n\t\t * Tone.Frequency.ftom(440); // returns 69\n\t\t */\n\t Tone.Frequency.ftom = function (frequency) {\n\t return 69 + Math.round(12 * Math.log2(frequency / Tone.Frequency.A4));\n\t };\n\t return Tone.Frequency;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Time is a primitive type for encoding Time values.\n\t\t * Tone.Time can be constructed with or without the `new` keyword. Tone.Time can be passed\n\t\t * into the parameter of any method which takes time as an argument.\n\t\t * @constructor\n\t\t * @extends {Tone.TimeBase}\n\t\t * @param {String|Number} val The time value.\n\t\t * @param {String=} units The units of the value.\n\t\t * @example\n\t\t * var t = Tone.Time(\"4n\");//a quarter note\n\t\t */\n\t Tone.Time = function (val, units) {\n\t if (this instanceof Tone.Time) {\n\t Tone.TimeBase.call(this, val, units);\n\t } else {\n\t return new Tone.Time(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.Time, Tone.TimeBase);\n\t /**\n\t\t * Extend the base expressions\n\t\t */\n\t Tone.Time.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t 'quantize': {\n\t regexp: /^@(.+)/,\n\t method: function (capture) {\n\t if (Tone.Transport) {\n\t var quantTo = new this.constructor(capture);\n\t return Tone.Transport.nextSubdivision(quantTo);\n\t } else {\n\t return 0;\n\t }\n\t }\n\t },\n\t 'now': {\n\t regexp: /^\\+(.+)/,\n\t method: function (capture) {\n\t return this._now() + new this.constructor(capture);\n\t }\n\t }\n\t });\n\t /**\n\t\t * Quantize the time by the given subdivision. Optionally add a\n\t\t * percentage which will move the time value towards the ideal\n\t\t * quantized value by that percentage.\n\t\t * @param {Number|Time} val The subdivision to quantize to\n\t\t * @param {NormalRange} [percent=1] Move the time value\n\t\t * towards the quantized value by\n\t\t * a percentage.\n\t\t * @return {Number} this\n\t\t * @example\n\t\t * Tone.Time(21).quantize(2) //returns 22\n\t\t * Tone.Time(0.6).quantize(\"4n\", 0.5) //returns 0.55\n\t\t */\n\t Tone.Time.prototype.quantize = function (subdiv, percent) {\n\t percent = Tone.defaultArg(percent, 1);\n\t var subdivision = new this.constructor(subdiv);\n\t var value = this.valueOf();\n\t var multiple = Math.round(value / subdivision);\n\t var ideal = multiple * subdivision;\n\t var diff = ideal - value;\n\t return value + diff * percent;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t // CONVERSIONS\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Convert a Time to Notation. The notation values are will be the\n\t\t * closest representation between 1m to 128th note.\n\t\t * @return {Notation}\n\t\t * @example\n\t\t * //if the Transport is at 120bpm:\n\t\t * Tone.Time(2).toNotation();//returns \"1m\"\n\t\t */\n\t Tone.Time.prototype.toNotation = function () {\n\t var time = this.toSeconds();\n\t var testNotations = ['1m'];\n\t for (var power = 1; power < 8; power++) {\n\t var subdiv = Math.pow(2, power);\n\t testNotations.push(subdiv + 'n.');\n\t testNotations.push(subdiv + 'n');\n\t testNotations.push(subdiv + 't');\n\t }\n\t testNotations.push('0');\n\t //find the closets notation representation\n\t var closest = testNotations[0];\n\t var closestSeconds = Tone.Time(testNotations[0]).toSeconds();\n\t testNotations.forEach(function (notation) {\n\t var notationSeconds = Tone.Time(notation).toSeconds();\n\t if (Math.abs(notationSeconds - time) < Math.abs(closestSeconds - time)) {\n\t closest = notation;\n\t closestSeconds = notationSeconds;\n\t }\n\t });\n\t return closest;\n\t };\n\t /**\n\t\t * Return the time encoded as Bars:Beats:Sixteenths.\n\t\t * @return {BarsBeatsSixteenths}\n\t\t */\n\t Tone.Time.prototype.toBarsBeatsSixteenths = function () {\n\t var quarterTime = this._beatsToUnits(1);\n\t var quarters = this.valueOf() / quarterTime;\n\t var measures = Math.floor(quarters / this._getTimeSignature());\n\t var sixteenths = quarters % 1 * 4;\n\t quarters = Math.floor(quarters) % this._getTimeSignature();\n\t sixteenths = sixteenths.toString();\n\t if (sixteenths.length > 3) {\n\t // the additional parseFloat removes insignificant trailing zeroes\n\t sixteenths = parseFloat(parseFloat(sixteenths).toFixed(3));\n\t }\n\t var progress = [\n\t measures,\n\t quarters,\n\t sixteenths\n\t ];\n\t return progress.join(':');\n\t };\n\t /**\n\t\t * Return the time in ticks.\n\t\t * @return {Ticks}\n\t\t */\n\t Tone.Time.prototype.toTicks = function () {\n\t var quarterTime = this._beatsToUnits(1);\n\t var quarters = this.valueOf() / quarterTime;\n\t return Math.round(quarters * this._getPPQ());\n\t };\n\t /**\n\t\t * Return the time in seconds.\n\t\t * @return {Seconds}\n\t\t */\n\t Tone.Time.prototype.toSeconds = function () {\n\t return this.valueOf();\n\t };\n\t /**\n\t\t * Return the value as a midi note.\n\t\t * @return {Midi}\n\t\t */\n\t Tone.Time.prototype.toMidi = function () {\n\t return Tone.Frequency.ftom(this.toFrequency());\n\t };\n\t return Tone.Time;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TransportTime is a the time along the Transport's\n\t\t * timeline. It is similar to Tone.Time, but instead of evaluating\n\t\t * against the AudioContext's clock, it is evaluated against\n\t\t * the Transport's position. See [TransportTime wiki](https://github.com/Tonejs/Tone.js/wiki/TransportTime).\n\t\t * @constructor\n\t\t * @param {Time} val The time value as a number or string\n\t\t * @param {String=} units Unit values\n\t\t * @extends {Tone.Time}\n\t\t */\n\t Tone.TransportTime = function (val, units) {\n\t if (this instanceof Tone.TransportTime) {\n\t Tone.Time.call(this, val, units);\n\t } else {\n\t return new Tone.TransportTime(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.TransportTime, Tone.Time);\n\t /**\n\t\t * Return the current time in whichever context is relevant\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.TransportTime.prototype._now = function () {\n\t return Tone.Transport.seconds;\n\t };\n\t return Tone.TransportTime;\n\t});\n\tModule(function (Tone) {\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tTYPES\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Units which a value can take on.\n\t\t * @enum {String}\n\t\t */\n\t Tone.Type = {\n\t /**\n\t\t\t * Default units\n\t\t\t * @typedef {Default}\n\t\t\t */\n\t Default: 'number',\n\t /**\n\t\t\t * Time can be described in a number of ways. Read more [Time](https://github.com/Tonejs/Tone.js/wiki/Time).\n\t\t\t *\n\t\t\t * * Numbers, which will be taken literally as the time (in seconds).\n\t\t\t * * Notation, (\"4n\", \"8t\") describes time in BPM and time signature relative values.\n\t\t\t * * TransportTime, (\"4:3:2\") will also provide tempo and time signature relative times\n\t\t\t * in the form BARS:QUARTERS:SIXTEENTHS.\n\t\t\t * * Frequency, (\"8hz\") is converted to the length of the cycle in seconds.\n\t\t\t * * Now-Relative, (\"+1\") prefix any of the above with \"+\" and it will be interpreted as\n\t\t\t * \"the current time plus whatever expression follows\".\n\t\t\t * * Expressions, (\"3:0 + 2 - (1m / 7)\") any of the above can also be combined\n\t\t\t * into a mathematical expression which will be evaluated to compute the desired time.\n\t\t\t * * No Argument, for methods which accept time, no argument will be interpreted as\n\t\t\t * \"now\" (i.e. the currentTime).\n\t\t\t *\n\t\t\t * @typedef {Time}\n\t\t\t */\n\t Time: 'time',\n\t /**\n\t\t\t * Frequency can be described similar to time, except ultimately the\n\t\t\t * values are converted to frequency instead of seconds. A number\n\t\t\t * is taken literally as the value in hertz. Additionally any of the\n\t\t\t * Time encodings can be used. Note names in the form\n\t\t\t * of NOTE OCTAVE (i.e. C4) are also accepted and converted to their\n\t\t\t * frequency value.\n\t\t\t * @typedef {Frequency}\n\t\t\t */\n\t Frequency: 'frequency',\n\t /**\n\t\t\t * TransportTime describes a position along the Transport's timeline. It is\n\t\t\t * similar to Time in that it uses all the same encodings, but TransportTime specifically\n\t\t\t * pertains to the Transport's timeline, which is startable, stoppable, loopable, and seekable.\n\t\t\t * [Read more](https://github.com/Tonejs/Tone.js/wiki/TransportTime)\n\t\t\t * @typedef {TransportTime}\n\t\t\t */\n\t TransportTime: 'transportTime',\n\t /**\n\t\t\t * Ticks are the basic subunit of the Transport. They are\n\t\t\t * the smallest unit of time that the Transport supports.\n\t\t\t * @typedef {Ticks}\n\t\t\t */\n\t Ticks: 'ticks',\n\t /**\n\t\t\t * Normal values are within the range [0, 1].\n\t\t\t * @typedef {NormalRange}\n\t\t\t */\n\t NormalRange: 'normalRange',\n\t /**\n\t\t\t * AudioRange values are between [-1, 1].\n\t\t\t * @typedef {AudioRange}\n\t\t\t */\n\t AudioRange: 'audioRange',\n\t /**\n\t\t\t * Decibels are a logarithmic unit of measurement which is useful for volume\n\t\t\t * because of the logarithmic way that we perceive loudness. 0 decibels\n\t\t\t * means no change in volume. -10db is approximately half as loud and 10db\n\t\t\t * is twice is loud.\n\t\t\t * @typedef {Decibels}\n\t\t\t */\n\t Decibels: 'db',\n\t /**\n\t\t\t * Half-step note increments, i.e. 12 is an octave above the root. and 1 is a half-step up.\n\t\t\t * @typedef {Interval}\n\t\t\t */\n\t Interval: 'interval',\n\t /**\n\t\t\t * Beats per minute.\n\t\t\t * @typedef {BPM}\n\t\t\t */\n\t BPM: 'bpm',\n\t /**\n\t\t\t * The value must be greater than or equal to 0.\n\t\t\t * @typedef {Positive}\n\t\t\t */\n\t Positive: 'positive',\n\t /**\n\t\t\t * Gain is the ratio between input and output of a signal.\n\t\t\t * A gain of 0 is the same as silencing the signal. A gain of\n\t\t\t * 1, causes no change to the incoming signal.\n\t\t\t * @typedef {Gain}\n\t\t\t */\n\t Gain: 'gain',\n\t /**\n\t\t\t * A cent is a hundredth of a semitone.\n\t\t\t * @typedef {Cents}\n\t\t\t */\n\t Cents: 'cents',\n\t /**\n\t\t\t * Angle between 0 and 360.\n\t\t\t * @typedef {Degrees}\n\t\t\t */\n\t Degrees: 'degrees',\n\t /**\n\t\t\t * A number representing a midi note.\n\t\t\t * @typedef {MIDI}\n\t\t\t */\n\t MIDI: 'midi',\n\t /**\n\t\t\t * A colon-separated representation of time in the form of\n\t\t\t * Bars:Beats:Sixteenths.\n\t\t\t * @typedef {BarsBeatsSixteenths}\n\t\t\t */\n\t BarsBeatsSixteenths: 'barsBeatsSixteenths',\n\t /**\n\t\t\t * Sampling is the reduction of a continuous signal to a discrete signal.\n\t\t\t * Audio is typically sampled 44100 times per second.\n\t\t\t * @typedef {Samples}\n\t\t\t */\n\t Samples: 'samples',\n\t /**\n\t\t\t * Hertz are a frequency representation defined as one cycle per second.\n\t\t\t * @typedef {Hertz}\n\t\t\t */\n\t Hertz: 'hertz',\n\t /**\n\t\t\t * A frequency represented by a letter name,\n\t\t\t * accidental and octave. This system is known as\n\t\t\t * [Scientific Pitch Notation](https://en.wikipedia.org/wiki/Scientific_pitch_notation).\n\t\t\t * @typedef {Note}\n\t\t\t */\n\t Note: 'note',\n\t /**\n\t\t\t * One millisecond is a thousandth of a second.\n\t\t\t * @typedef {Milliseconds}\n\t\t\t */\n\t Milliseconds: 'milliseconds',\n\t /**\n\t\t\t * Seconds are the time unit of the AudioContext. In the end,\n\t\t\t * all values need to be evaluated to seconds.\n\t\t\t * @typedef {Seconds}\n\t\t\t */\n\t Seconds: 'seconds',\n\t /**\n\t\t\t * A string representing a duration relative to a measure.\n\t\t\t * * \"4n\" = quarter note\n\t\t\t * * \"2m\" = two measures\n\t\t\t * * \"8t\" = eighth-note triplet\n\t\t\t * @typedef {Notation}\n\t\t\t */\n\t Notation: 'notation'\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t // AUGMENT TONE's PROTOTYPE\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Convert Time into seconds.\n\t\t *\n\t\t * Unlike the method which it overrides, this takes into account\n\t\t * transporttime and musical notation.\n\t\t *\n\t\t * Time : 1.40\n\t\t * Notation: 4n or 1m or 2t\n\t\t * Now Relative: +3n\n\t\t * Math: 3n+16n or even complicated expressions ((3n*2)/6 + 1)\n\t\t *\n\t\t * @param {Time} time\n\t\t * @return {Seconds}\n\t\t */\n\t Tone.prototype.toSeconds = function (time) {\n\t if (Tone.isNumber(time)) {\n\t return time;\n\t } else if (Tone.isUndef(time)) {\n\t return this.now();\n\t } else if (Tone.isString(time)) {\n\t return new Tone.Time(time).toSeconds();\n\t } else if (time instanceof Tone.TimeBase) {\n\t return time.toSeconds();\n\t }\n\t };\n\t /**\n\t\t * Convert a frequency representation into a number.\n\t\t * @param {Frequency} freq\n\t\t * @return {Hertz} the frequency in hertz\n\t\t */\n\t Tone.prototype.toFrequency = function (freq) {\n\t if (Tone.isNumber(freq)) {\n\t return freq;\n\t } else if (Tone.isString(freq) || Tone.isUndef(freq)) {\n\t return new Tone.Frequency(freq).valueOf();\n\t } else if (freq instanceof Tone.TimeBase) {\n\t return freq.toFrequency();\n\t }\n\t };\n\t /**\n\t\t * Convert a time representation into ticks.\n\t\t * @param {Time} time\n\t\t * @return {Ticks} the time in ticks\n\t\t */\n\t Tone.prototype.toTicks = function (time) {\n\t if (Tone.isNumber(time) || Tone.isString(time)) {\n\t return new Tone.TransportTime(time).toTicks();\n\t } else if (Tone.isUndef(time)) {\n\t return Tone.Transport.ticks;\n\t } else if (time instanceof Tone.TimeBase) {\n\t return time.toTicks();\n\t }\n\t };\n\t return Tone;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Param wraps the native Web Audio's AudioParam to provide\n\t\t * additional unit conversion functionality. It also\n\t\t * serves as a base-class for classes which have a single,\n\t\t * automatable parameter.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {AudioParam} param The parameter to wrap.\n\t\t * @param {Tone.Type} units The units of the audio param.\n\t\t * @param {Boolean} convert If the param should be converted.\n\t\t */\n\t Tone.Param = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'param',\n\t 'units',\n\t 'convert'\n\t ], Tone.Param);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The native parameter to control\n\t\t\t * @type {AudioParam}\n\t\t\t * @private\n\t\t\t */\n\t this._param = this.input = options.param;\n\t /**\n\t\t\t * The units of the parameter\n\t\t\t * @type {Tone.Type}\n\t\t\t */\n\t this.units = options.units;\n\t /**\n\t\t\t * If the value should be converted or not\n\t\t\t * @type {Boolean}\n\t\t\t */\n\t this.convert = options.convert;\n\t /**\n\t\t\t * True if the signal value is being overridden by\n\t\t\t * a connected signal.\n\t\t\t * @readOnly\n\t\t\t * @type {boolean}\n\t\t\t * @private\n\t\t\t */\n\t this.overridden = false;\n\t /**\n\t\t\t * The timeline which tracks all of the automations.\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t this._events = new Tone.Timeline(1000);\n\t if (!Tone.isUndef(options.value) && this._param) {\n\t this.value = options.value;\n\t }\n\t };\n\t Tone.extend(Tone.Param, Tone.AudioNode);\n\t /**\n\t\t * Defaults\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Param.defaults = {\n\t 'units': Tone.Type.Default,\n\t 'convert': true,\n\t 'param': undefined\n\t };\n\t /**\n\t\t * The current value of the parameter.\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.Param.prototype, 'value', {\n\t get: function () {\n\t var now = this.now();\n\t return this._toUnits(this.getValueAtTime(now));\n\t },\n\t set: function (value) {\n\t this._initialValue = this._fromUnits(value);\n\t this.setValueAtTime(value, this.now());\n\t }\n\t });\n\t /**\n\t\t * The minimum output value of the parameter\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.Param.prototype, 'minValue', {\n\t get: function () {\n\t if (this.units === Tone.Type.Time || this.units === Tone.Type.Frequency || this.units === Tone.Type.NormalRange || this.units === Tone.Type.Positive || this.units === Tone.Type.BPM) {\n\t return 0;\n\t } else if (this.units === Tone.Type.AudioRange) {\n\t return -1;\n\t } else if (this.units === Tone.Type.Decibels) {\n\t return -Infinity;\n\t } else {\n\t return this._param.minValue;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The maximum output value of the parameter\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.Param.prototype, 'maxValue', {\n\t get: function () {\n\t if (this.units === Tone.Type.NormalRange || this.units === Tone.Type.AudioRange) {\n\t return 1;\n\t } else {\n\t return this._param.maxValue;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Convert the given value from the type specified by Tone.Param.units\n\t\t * into the destination value (such as Gain or Frequency).\n\t\t * @private\n\t\t * @param {*} val the value to convert\n\t\t * @return {number} the number which the value should be set to\n\t\t */\n\t Tone.Param.prototype._fromUnits = function (val) {\n\t if ((this.convert || Tone.isUndef(this.convert)) && !this.overridden) {\n\t switch (this.units) {\n\t case Tone.Type.Time:\n\t return this.toSeconds(val);\n\t case Tone.Type.Frequency:\n\t return this.toFrequency(val);\n\t case Tone.Type.Decibels:\n\t return Tone.dbToGain(val);\n\t case Tone.Type.NormalRange:\n\t return Math.min(Math.max(val, 0), 1);\n\t case Tone.Type.AudioRange:\n\t return Math.min(Math.max(val, -1), 1);\n\t case Tone.Type.Positive:\n\t return Math.max(val, 0);\n\t default:\n\t return val;\n\t }\n\t } else {\n\t return val;\n\t }\n\t };\n\t /**\n\t\t * Convert the parameters value into the units specified by Tone.Param.units.\n\t\t * @private\n\t\t * @param {number} val the value to convert\n\t\t * @return {number}\n\t\t */\n\t Tone.Param.prototype._toUnits = function (val) {\n\t if (this.convert || Tone.isUndef(this.convert)) {\n\t switch (this.units) {\n\t case Tone.Type.Decibels:\n\t return Tone.gainToDb(val);\n\t default:\n\t return val;\n\t }\n\t } else {\n\t return val;\n\t }\n\t };\n\t /**\n\t\t * the minimum output value\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.Param.prototype._minOutput = 0.00001;\n\t /**\n\t\t * If scheduling past events should create a warning notification\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t Tone.Param.prototype._ignorePast = false;\n\t /**\n\t\t * The event types\n\t\t * @enum {String}\n\t\t * @private\n\t\t */\n\t Tone.Param.AutomationType = {\n\t Linear: 'linearRampToValueAtTime',\n\t Exponential: 'exponentialRampToValueAtTime',\n\t Target: 'setTargetAtTime',\n\t SetValue: 'setValueAtTime'\n\t };\n\t /**\n\t\t * Schedules a parameter value change at the given time.\n\t\t * @param {*}\tvalue The value to set the signal.\n\t\t * @param {Time} time The time when the change should occur.\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //set the frequency to \"G4\" in exactly 1 second from now.\n\t\t * freq.setValueAtTime(\"G4\", \"+1\");\n\t\t */\n\t Tone.Param.prototype.setValueAtTime = function (value, time) {\n\t time = this.toSeconds(time);\n\t value = this._fromUnits(value);\n\t if (!this._ignorePast) {\n\t Tone.isPast(time);\n\t }\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.SetValue,\n\t 'value': value,\n\t 'time': time\n\t });\n\t this._param.setValueAtTime(value, time);\n\t return this;\n\t };\n\t /**\n\t\t * Get the signals value at the given time. Subsequent scheduling\n\t\t * may invalidate the returned value.\n\t\t * @param {Time} time When to get the value\n\t\t * @returns {Number} The value at the given time\n\t\t */\n\t Tone.Param.prototype.getValueAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t var after = this._events.getAfter(time);\n\t var before = this._events.get(time);\n\t var initialValue = Tone.defaultArg(this._initialValue, this._param.defaultValue);\n\t var value = initialValue;\n\t //if it was set by\n\t if (before === null) {\n\t value = initialValue;\n\t } else if (before.type === Tone.Param.AutomationType.Target) {\n\t var previous = this._events.getBefore(before.time);\n\t var previousVal;\n\t if (previous === null) {\n\t previousVal = initialValue;\n\t } else {\n\t previousVal = previous.value;\n\t }\n\t value = this._exponentialApproach(before.time, previousVal, before.value, before.constant, time);\n\t } else if (after === null) {\n\t value = before.value;\n\t } else if (after.type === Tone.Param.AutomationType.Linear) {\n\t value = this._linearInterpolate(before.time, before.value, after.time, after.value, time);\n\t } else if (after.type === Tone.Param.AutomationType.Exponential) {\n\t value = this._exponentialInterpolate(before.time, before.value, after.time, after.value, time);\n\t } else {\n\t value = before.value;\n\t }\n\t return value;\n\t };\n\t /**\n\t\t * Creates a schedule point with the current value at the current time.\n\t\t * This is useful for creating an automation anchor point in order to\n\t\t * schedule changes from the current value.\n\t\t *\n\t\t * @param {number=} now (Optionally) pass the now value in.\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.setRampPoint = function (time) {\n\t time = this.toSeconds(time);\n\t var currentVal = this.getValueAtTime(time);\n\t this.cancelAndHoldAtTime(time);\n\t if (currentVal === 0) {\n\t currentVal = this._minOutput;\n\t }\n\t this.setValueAtTime(this._toUnits(currentVal), time);\n\t return this;\n\t };\n\t /**\n\t\t * Schedules a linear continuous change in parameter value from the\n\t\t * previous scheduled parameter value to the given value.\n\t\t *\n\t\t * @param {number} value\n\t\t * @param {Time} endTime\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.linearRampToValueAtTime = function (value, endTime) {\n\t value = this._fromUnits(value);\n\t endTime = this.toSeconds(endTime);\n\t if (!this._ignorePast) {\n\t Tone.isPast(endTime);\n\t }\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.Linear,\n\t 'value': value,\n\t 'time': endTime\n\t });\n\t this._param.linearRampToValueAtTime(value, endTime);\n\t return this;\n\t };\n\t /**\n\t\t * Schedules an exponential continuous change in parameter value from\n\t\t * the previous scheduled parameter value to the given value.\n\t\t *\n\t\t * @param {number} value\n\t\t * @param {Time} endTime\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.exponentialRampToValueAtTime = function (value, endTime) {\n\t value = this._fromUnits(value);\n\t value = Math.max(this._minOutput, value);\n\t endTime = this.toSeconds(endTime);\n\t if (!this._ignorePast) {\n\t Tone.isPast(endTime);\n\t }\n\t //store the event\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.Exponential,\n\t 'time': endTime,\n\t 'value': value\n\t });\n\t this._param.exponentialRampToValueAtTime(value, endTime);\n\t return this;\n\t };\n\t /**\n\t\t * Schedules an exponential continuous change in parameter value from\n\t\t * the current time and current value to the given value over the\n\t\t * duration of the rampTime.\n\t\t *\n\t\t * @param {number} value The value to ramp to.\n\t\t * @param {Time} rampTime the time that it takes the\n\t\t * value to ramp from it's current value\n\t\t * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t Tone.Param.prototype.exponentialRampTo = function (value, rampTime, startTime) {\n\t startTime = this.toSeconds(startTime);\n\t this.setRampPoint(startTime);\n\t this.exponentialRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\t return this;\n\t };\n\t /**\n\t\t * Schedules an linear continuous change in parameter value from\n\t\t * the current time and current value to the given value over the\n\t\t * duration of the rampTime.\n\t\t *\n\t\t * @param {number} value The value to ramp to.\n\t\t * @param {Time} rampTime the time that it takes the\n\t\t * value to ramp from it's current value\n\t\t * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //linearly ramp to the value 4 over 3 seconds.\n\t\t * signal.linearRampTo(4, 3);\n\t\t */\n\t Tone.Param.prototype.linearRampTo = function (value, rampTime, startTime) {\n\t startTime = this.toSeconds(startTime);\n\t this.setRampPoint(startTime);\n\t this.linearRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\t return this;\n\t };\n\t /**\n\t\t * Start exponentially approaching the target value at the given time. Since it\n\t\t * is an exponential approach it will continue approaching after the ramp duration. The\n\t\t * rampTime is the time that it takes to reach over 99% of the way towards the value.\n\t\t * @param {number} value The value to ramp to.\n\t\t * @param {Time} rampTime the time that it takes the\n\t\t * value to ramp from it's current value\n\t\t * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t Tone.Param.prototype.targetRampTo = function (value, rampTime, startTime) {\n\t startTime = this.toSeconds(startTime);\n\t this.setRampPoint(startTime);\n\t this.exponentialApproachValueAtTime(value, startTime, rampTime);\n\t return this;\n\t };\n\t /**\n\t\t * Start exponentially approaching the target value at the given time. Since it\n\t\t * is an exponential approach it will continue approaching after the ramp duration. The\n\t\t * rampTime is the time that it takes to reach over 99% of the way towards the value. This methods\n\t\t * is similar to setTargetAtTime except the third argument is a time instead of a 'timeConstant'\n\t\t * @param {number} value The value to ramp to.\n\t\t * @param {Time}\ttime \tWhen the ramp should start.\n\t\t * @param {Time} rampTime the time that it takes the\n\t\t * value to ramp from it's current value\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t Tone.Param.prototype.exponentialApproachValueAtTime = function (value, time, rampTime) {\n\t var timeConstant = Math.log(this.toSeconds(rampTime) + 1) / Math.log(200);\n\t time = this.toSeconds(time);\n\t if (!this._ignorePast) {\n\t Tone.isPast(time);\n\t }\n\t return this.setTargetAtTime(value, time, timeConstant);\n\t };\n\t /**\n\t\t * Start exponentially approaching the target value at the given time with\n\t\t * a rate having the given time constant.\n\t\t * @param {number} value\n\t\t * @param {Time} startTime\n\t\t * @param {number} timeConstant\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.setTargetAtTime = function (value, startTime, timeConstant) {\n\t value = this._fromUnits(value);\n\t // The value will never be able to approach without timeConstant > 0.\n\t if (timeConstant <= 0) {\n\t throw new Error('timeConstant must be greater than 0');\n\t }\n\t startTime = this.toSeconds(startTime);\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.Target,\n\t 'value': value,\n\t 'time': startTime,\n\t 'constant': timeConstant\n\t });\n\t this._param.setTargetAtTime(value, startTime, timeConstant);\n\t return this;\n\t };\n\t /**\n\t\t * Sets an array of arbitrary parameter values starting at the given time\n\t\t * for the given duration.\n\t\t *\n\t\t * @param {Array} values\n\t\t * @param {Time} startTime\n\t\t * @param {Time} duration\n\t\t * @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {\n\t scaling = Tone.defaultArg(scaling, 1);\n\t duration = this.toSeconds(duration);\n\t startTime = this.toSeconds(startTime);\n\t this.setValueAtTime(values[0] * scaling, startTime);\n\t var segTime = duration / (values.length - 1);\n\t for (var i = 1; i < values.length; i++) {\n\t this.linearRampToValueAtTime(values[i] * scaling, startTime + i * segTime);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Cancels all scheduled parameter changes with times greater than or\n\t\t * equal to startTime.\n\t\t *\n\t\t * @param {Time} time\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.cancelScheduledValues = function (time) {\n\t time = this.toSeconds(time);\n\t this._events.cancel(time);\n\t this._param.cancelScheduledValues(time);\n\t return this;\n\t };\n\t /**\n\t\t * This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n\t\t * it holds the automated value at time until the next automated event.\n\t\t * @param {Time} time\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.cancelAndHoldAtTime = function (time) {\n\t var valueAtTime = this.getValueAtTime(time);\n\t //if there is an event at the given time\n\t //and that even is not a \"set\"\n\t var before = this._events.get(time);\n\t var after = this._events.getAfter(time);\n\t if (before && before.time === time) {\n\t //remove everything after\n\t if (after) {\n\t this._events.cancel(after.time);\n\t } else {\n\t this._events.cancel(time + 0.000001);\n\t }\n\t } else if (after) {\n\t //cancel the next event(s)\n\t this._events.cancel(after.time);\n\t if (!this._param.cancelAndHoldAtTime) {\n\t this._param.cancelScheduledValues(time);\n\t }\n\t if (after.type === Tone.Param.AutomationType.Linear) {\n\t if (!this._param.cancelAndHoldAtTime) {\n\t this.linearRampToValueAtTime(valueAtTime, time);\n\t } else {\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.Linear,\n\t 'value': valueAtTime,\n\t 'time': time\n\t });\n\t }\n\t } else if (after.type === Tone.Param.AutomationType.Exponential) {\n\t if (!this._param.cancelAndHoldAtTime) {\n\t this.exponentialRampToValueAtTime(valueAtTime, time);\n\t } else {\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.Exponential,\n\t 'value': valueAtTime,\n\t 'time': time\n\t });\n\t }\n\t }\n\t }\n\t //set the value at the given time\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.SetValue,\n\t 'value': valueAtTime,\n\t 'time': time\n\t });\n\t if (this._param.cancelAndHoldAtTime) {\n\t this._param.cancelAndHoldAtTime(time);\n\t } else {\n\t this._param.setValueAtTime(valueAtTime, time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Ramps to the given value over the duration of the rampTime.\n\t\t * Automatically selects the best ramp type (exponential or linear)\n\t\t * depending on the `units` of the signal\n\t\t *\n\t\t * @param {number} value\n\t\t * @param {Time} rampTime \tThe time that it takes the\n\t\t * value to ramp from it's current value\n\t\t * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t * @returns {Tone.Param} this\n\t\t * @example\n\t\t * //ramp to the value either linearly or exponentially\n\t\t * //depending on the \"units\" value of the signal\n\t\t * signal.rampTo(0, 10);\n\t\t * @example\n\t\t * //schedule it to ramp starting at a specific time\n\t\t * signal.rampTo(0, 10, 5)\n\t\t */\n\t Tone.Param.prototype.rampTo = function (value, rampTime, startTime) {\n\t rampTime = Tone.defaultArg(rampTime, 0.1);\n\t if (this.units === Tone.Type.Frequency || this.units === Tone.Type.BPM || this.units === Tone.Type.Decibels) {\n\t this.exponentialRampTo(value, rampTime, startTime);\n\t } else {\n\t this.linearRampTo(value, rampTime, startTime);\n\t }\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tAUTOMATION CURVE CALCULATIONS\n\t //\tMIT License, copyright (c) 2014 Jordan Santell\n\t ///////////////////////////////////////////////////////////////////////////\n\t // Calculates the the value along the curve produced by setTargetAtTime\n\t Tone.Param.prototype._exponentialApproach = function (t0, v0, v1, timeConstant, t) {\n\t return v1 + (v0 - v1) * Math.exp(-(t - t0) / timeConstant);\n\t };\n\t // Calculates the the value along the curve produced by linearRampToValueAtTime\n\t Tone.Param.prototype._linearInterpolate = function (t0, v0, t1, v1, t) {\n\t return v0 + (v1 - v0) * ((t - t0) / (t1 - t0));\n\t };\n\t // Calculates the the value along the curve produced by exponentialRampToValueAtTime\n\t Tone.Param.prototype._exponentialInterpolate = function (t0, v0, t1, v1, t) {\n\t return v0 * Math.pow(v1 / v0, (t - t0) / (t1 - t0));\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.Param.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._param = null;\n\t this._events = null;\n\t return this;\n\t };\n\t return Tone.Param;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Wrapper around the OfflineAudioContext\n\t\t * @extends {Tone.Context}\n\t\t * @param {Number} channels The number of channels to render\n\t\t * @param {Number} duration The duration to render in samples\n\t\t * @param {Number} sampleRate the sample rate to render at\n\t\t */\n\t Tone.OfflineContext = function (channels, duration, sampleRate) {\n\t /**\n\t\t\t * The offline context\n\t\t\t * @private\n\t\t\t * @type {OfflineAudioContext}\n\t\t\t */\n\t var offlineContext = new OfflineAudioContext(channels, duration * sampleRate, sampleRate);\n\t //wrap the methods/members\n\t Tone.Context.call(this, {\n\t 'context': offlineContext,\n\t 'clockSource': 'offline',\n\t 'lookAhead': 0,\n\t 'updateInterval': 128 / sampleRate\n\t });\n\t /**\n\t\t\t * A private reference to the duration\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._duration = duration;\n\t /**\n\t\t\t * An artificial clock source\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._currentTime = 0;\n\t };\n\t Tone.extend(Tone.OfflineContext, Tone.Context);\n\t /**\n\t\t * Override the now method to point to the internal clock time\n\t\t * @return {Number}\n\t\t */\n\t Tone.OfflineContext.prototype.now = function () {\n\t return this._currentTime;\n\t };\n\t /**\n\t\t * Render the output of the OfflineContext\n\t\t * @return {Promise}\n\t\t */\n\t Tone.OfflineContext.prototype.render = function () {\n\t while (this._duration - this._currentTime >= 0) {\n\t //invoke all the callbacks on that time\n\t this.emit('tick');\n\t //increment the clock\n\t this._currentTime += this.blockTime;\n\t }\n\t return this._context.startRendering();\n\t };\n\t /**\n\t\t * Close the context\n\t\t * @return {Promise}\n\t\t */\n\t Tone.OfflineContext.prototype.close = function () {\n\t this._context = null;\n\t return Promise.resolve();\n\t };\n\t return Tone.OfflineContext;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported) {\n\t var ua = navigator.userAgent.toLowerCase();\n\t var isMobileSafari = ua.includes('safari') && !ua.includes('chrome') && ua.includes('mobile');\n\t if (isMobileSafari) {\n\t //mobile safari has a bizarre bug with the offline context\n\t //when a BufferSourceNode is started, it starts the offline context\n\t //\n\t //deferring all BufferSource starts till the last possible moment\n\t //reduces the likelihood of this happening\n\t Tone.OfflineContext.prototype.createBufferSource = function () {\n\t var bufferSource = this._context.createBufferSource();\n\t var _native_start = bufferSource.start;\n\t bufferSource.start = function (time) {\n\t this.setTimeout(function () {\n\t _native_start.call(bufferSource, time);\n\t }.bind(this), 0);\n\t }.bind(this);\n\t return bufferSource;\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A thin wrapper around the Native Web Audio GainNode.\n\t\t * The GainNode is a basic building block of the Web Audio\n\t\t * API and is useful for routing audio and adjusting gains.\n\t\t * @extends {Tone}\n\t\t * @param {Number=} gain The initial gain of the GainNode\n\t\t * @param {Tone.Type=} units The units of the gain parameter.\n\t\t */\n\t Tone.Gain = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'gain',\n\t 'units'\n\t ], Tone.Gain);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The GainNode\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.input = this.output = this._gainNode = this.context.createGain();\n\t /**\n\t\t\t * The gain parameter of the gain node.\n\t\t\t * @type {Gain}\n\t\t\t * @signal\n\t\t\t */\n\t this.gain = new Tone.Param({\n\t 'param': this._gainNode.gain,\n\t 'units': options.units,\n\t 'value': options.gain,\n\t 'convert': options.convert\n\t });\n\t this._readOnly('gain');\n\t };\n\t Tone.extend(Tone.Gain, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Gain.defaults = {\n\t 'gain': 1,\n\t 'convert': true\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Gain} this\n\t\t */\n\t Tone.Gain.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._gainNode.disconnect();\n\t this._gainNode = null;\n\t this._writable('gain');\n\t this.gain.dispose();\n\t this.gain = null;\n\t };\n\t return Tone.Gain;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported && !AudioContext.prototype.createConstantSource) {\n\t var ConstantSourceNode = function (context) {\n\t this.context = context;\n\t var buffer = context.createBuffer(1, 128, context.sampleRate);\n\t var arr = buffer.getChannelData(0);\n\t for (var i = 0; i < arr.length; i++) {\n\t arr[i] = 1;\n\t }\n\t this._bufferSource = context.createBufferSource();\n\t this._bufferSource.channelCount = 1;\n\t this._bufferSource.channelCountMode = 'explicit';\n\t this._bufferSource.buffer = buffer;\n\t this._bufferSource.loop = true;\n\t var gainNode = this._output = context.createGain();\n\t this.offset = gainNode.gain;\n\t this._bufferSource.connect(gainNode);\n\t };\n\t ConstantSourceNode.prototype.start = function (time) {\n\t this._bufferSource.start(time);\n\t return this;\n\t };\n\t ConstantSourceNode.prototype.stop = function (time) {\n\t this._bufferSource.stop(time);\n\t return this;\n\t };\n\t ConstantSourceNode.prototype.connect = function () {\n\t this._output.connect.apply(this._output, arguments);\n\t return this;\n\t };\n\t ConstantSourceNode.prototype.disconnect = function () {\n\t this._output.disconnect.apply(this._output, arguments);\n\t return this;\n\t };\n\t AudioContext.prototype.createConstantSource = function () {\n\t return new ConstantSourceNode(this);\n\t };\n\t Tone.Context.prototype.createConstantSource = function () {\n\t return new ConstantSourceNode(this);\n\t };\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A signal is an audio-rate value. Tone.Signal is a core component of the library.\n\t\t * Unlike a number, Signals can be scheduled with sample-level accuracy. Tone.Signal\n\t\t * has all of the methods available to native Web Audio\n\t\t * [AudioParam](http://webaudio.github.io/web-audio-api/#the-audioparam-interface)\n\t\t * as well as additional conveniences. Read more about working with signals\n\t\t * [here](https://github.com/Tonejs/Tone.js/wiki/Signals).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Param}\n\t\t * @param {Number|AudioParam} [value] Initial value of the signal. If an AudioParam\n\t\t * is passed in, that parameter will be wrapped\n\t\t * and controlled by the Signal.\n\t\t * @param {string} [units=Number] unit The units the signal is in.\n\t\t * @example\n\t\t * var signal = new Tone.Signal(10);\n\t\t */\n\t Tone.Signal = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'value',\n\t 'units'\n\t ], Tone.Signal);\n\t Tone.Param.call(this, options);\n\t /**\n\t\t\t* When a signal is connected to another signal or audio param,\n\t\t\t* this signal becomes a proxy for it\n\t\t\t* @type {Array}\n\t\t\t* @private\n\t\t\t*/\n\t this._proxies = [];\n\t /**\n\t\t\t* Indicates if the constant source was started or not\n\t\t\t* @private\n\t\t\t* @type {Boolean}\n\t\t\t*/\n\t this._sourceStarted = false;\n\t /**\n\t\t\t * The constant source node which generates the signal\n\t\t\t * @type {ConstantSourceNode}\n\t\t\t * @private\n\t\t\t */\n\t this._constantSource = this.context.createConstantSource();\n\t this._param = this._constantSource.offset;\n\t this.value = options.value;\n\t /**\n\t\t\t * The node where the constant signal value is scaled.\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.output = this._constantSource;\n\t /**\n\t\t\t * The node where the value is set.\n\t\t\t * @type {Tone.Param}\n\t\t\t * @private\n\t\t\t */\n\t this.input = this._param = this.output.offset;\n\t };\n\t Tone.extend(Tone.Signal, Tone.Param);\n\t /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t * @static\n\t\t * @const\n\t\t */\n\t Tone.Signal.defaults = {\n\t 'value': 0,\n\t 'units': Tone.Type.Default,\n\t 'convert': true\n\t };\n\t /**\n\t\t * When signals connect to other signals or AudioParams,\n\t\t * they take over the output value of that signal or AudioParam.\n\t\t * For all other nodes, the behavior is the same as a default <code>connect</code>.\n\t\t *\n\t\t * @override\n\t\t * @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n\t\t * @param {number} [outputNumber=0] The output number to connect from.\n\t\t * @param {number} [inputNumber=0] The input number to connect to.\n\t\t * @returns {Tone.Signal} this\n\t\t * @method\n\t\t */\n\t Tone.Signal.prototype.connect = function (node) {\n\t //this is an optimization where this node will forward automations\n\t //to connected nodes without any signal if possible.\n\t if (this._isParam(node) && !this._sourceStarted) {\n\t this._proxies.push(node);\n\t node.overridden = true;\n\t this._applyAutomations(node);\n\t } else {\n\t Tone.SignalBase.prototype.connect.apply(this, arguments);\n\t if (!this._sourceStarted) {\n\t this._sourceStarted = true;\n\t this._constantSource.start(0);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Takes a node as an argument and returns if it is a Param or AudioParam\n\t\t * @param {*} node The node to test\n\t\t * @return {Boolean}\n\t\t * @private\n\t\t */\n\t Tone.Signal.prototype._isParam = function (node) {\n\t return Tone.Param && Tone.Param === node.constructor || node instanceof AudioParam;\n\t };\n\t /**\n\t\t * Discard the optimization and connect all of the proxies\n\t\t * @private\n\t\t */\n\t Tone.Signal.prototype._connectProxies = function () {\n\t if (!this._sourceStarted) {\n\t this._sourceStarted = true;\n\t this._constantSource.start(0);\n\t }\n\t this._proxies.forEach(function (proxy) {\n\t Tone.SignalBase.prototype.connect.call(this, proxy);\n\t if (proxy._proxies) {\n\t proxy._connectProxies();\n\t }\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Invoked when a node is connected to this\n\t\t * @param {AudioNode} from\n\t\t * @private\n\t\t */\n\t Tone.Signal.prototype._onConnect = function (from) {\n\t if (!this._isParam(from)) {\n\t //connect all the proxies\n\t this._connectProxies();\n\t }\n\t };\n\t /**\n\t\t * Apply all the current automations to the given parameter\n\t\t * @param {AudioParam} param\n\t\t * @private\n\t\t */\n\t Tone.Signal.prototype._applyAutomations = function (param) {\n\t var now = this.context.currentTime;\n\t param.cancelScheduledValues(now);\n\t var currentVal = this.getValueAtTime(now);\n\t param.setValueAtTime(currentVal, now);\n\t this._events.forEachFrom(now, function (event) {\n\t param[event.type](event.value, event.time, event.constant);\n\t });\n\t };\n\t /**\n\t\t * Disconnect from the given node or all nodes if no param is given.\n\t\t * @param {AudioNode|AudioParam} node\n\t\t * @return {Tone.Signal} this\n\t\t */\n\t Tone.Signal.prototype.disconnect = function (node) {\n\t if (this._proxies.includes(node)) {\n\t var index = this._proxies.indexOf(node);\n\t this._proxies.splice(index, 1);\n\t } else if (!node) {\n\t //no argument, disconnect everything\n\t this._proxies = [];\n\t }\n\t return Tone.SignalBase.prototype.disconnect.apply(this, arguments);\n\t };\n\t /**\n\t\t * Return the current signal value at the given time.\n\t\t * @param {Time} time When to get the signal value\n\t\t * @return {Number}\n\t\t */\n\t Tone.Signal.prototype.getValueAtTime = function (time) {\n\t if (this._param.getValueAtTime) {\n\t return this._param.getValueAtTime(time);\n\t } else {\n\t return Tone.Param.prototype.getValueAtTime.call(this, time);\n\t }\n\t };\n\t //wrap all of the automation methods\n\t [\n\t 'setValueAtTime',\n\t 'linearRampToValueAtTime',\n\t 'exponentialRampToValueAtTime',\n\t 'setTargetAtTime'\n\t ].forEach(function (method) {\n\t var previousMethod = Tone.Signal.prototype[method];\n\t Tone.Signal.prototype[method] = function () {\n\t var args = arguments;\n\t previousMethod.apply(this, arguments);\n\t args[0] = this._fromUnits(args[0]);\n\t args[1] = this.toSeconds(args[1]);\n\t //apply it to the proxies\n\t this._proxies.forEach(function (signal) {\n\t signal[method].apply(signal, args);\n\t });\n\t };\n\t });\n\t [\n\t 'cancelScheduledValues',\n\t 'cancelAndHoldAtTime'\n\t ].forEach(function (method) {\n\t var previousMethod = Tone.Signal.prototype[method];\n\t Tone.Signal.prototype[method] = function () {\n\t var args = arguments;\n\t previousMethod.apply(this, arguments);\n\t args[0] = this.toSeconds(args[0]);\n\t //apply it to the proxies\n\t this._proxies.forEach(function (signal) {\n\t signal[method].apply(signal, args);\n\t });\n\t };\n\t });\n\t /**\n\t\t * dispose and disconnect\n\t\t * @returns {Tone.Signal} this\n\t\t */\n\t Tone.Signal.prototype.dispose = function () {\n\t Tone.Param.prototype.dispose.call(this);\n\t this._constantSource.disconnect();\n\t this._constantSource = null;\n\t this._proxies = null;\n\t return this;\n\t };\n\t return Tone.Signal;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Pow applies an exponent to the incoming signal. The incoming signal\n\t\t * must be AudioRange.\n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @param {Positive} exp The exponent to apply to the incoming signal, must be at least 2. \n\t\t * @example\n\t\t * var pow = new Tone.Pow(2);\n\t\t * var sig = new Tone.Signal(0.5).connect(pow);\n\t\t * //output of pow is 0.25. \n\t\t */\n\t Tone.Pow = function (exp) {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * the exponent\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._exp = Tone.defaultArg(exp, 1);\n\t /**\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._expScaler = this.input = this.output = new Tone.WaveShaper(this._expFunc(this._exp), 8192);\n\t };\n\t Tone.extend(Tone.Pow, Tone.SignalBase);\n\t /**\n\t\t * The value of the exponent.\n\t\t * @memberOf Tone.Pow#\n\t\t * @type {number}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.Pow.prototype, 'value', {\n\t get: function () {\n\t return this._exp;\n\t },\n\t set: function (exp) {\n\t this._exp = exp;\n\t this._expScaler.setMap(this._expFunc(this._exp));\n\t }\n\t });\n\t /**\n\t\t * the function which maps the waveshaper\n\t\t * @param {number} exp\n\t\t * @return {function}\n\t\t * @private\n\t\t */\n\t Tone.Pow.prototype._expFunc = function (exp) {\n\t return function (val) {\n\t return Math.pow(Math.abs(val), exp);\n\t };\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Pow} this\n\t\t */\n\t Tone.Pow.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._expScaler.dispose();\n\t this._expScaler = null;\n\t return this;\n\t };\n\t return Tone.Pow;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Envelope is an [ADSR](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope)\n\t\t * envelope generator. Tone.Envelope outputs a signal which\n\t\t * can be connected to an AudioParam or Tone.Signal.\n\t\t * <img src=\"https://upload.wikimedia.org/wikipedia/commons/e/ea/ADSR_parameter.svg\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Time} [attack] The amount of time it takes for the envelope to go from\n\t\t * 0 to it's maximum value.\n\t\t * @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n\t\t * \tto fall to the sustain value.\n\t\t * @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n\t\t * \tthe release is triggered.\n\t\t * @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n\t\t * @example\n\t\t * //an amplitude envelope\n\t\t * var gainNode = Tone.context.createGain();\n\t\t * var env = new Tone.Envelope({\n\t\t * \t\"attack\" : 0.1,\n\t\t * \t\"decay\" : 0.2,\n\t\t * \t\"sustain\" : 1,\n\t\t * \t\"release\" : 0.8,\n\t\t * });\n\t\t * env.connect(gainNode.gain);\n\t\t */\n\t Tone.Envelope = function () {\n\t //get all of the defaults\n\t var options = Tone.defaults(arguments, [\n\t 'attack',\n\t 'decay',\n\t 'sustain',\n\t 'release'\n\t ], Tone.Envelope);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * When triggerAttack is called, the attack time is the amount of\n\t\t\t * time it takes for the envelope to reach it's maximum value.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.attack = options.attack;\n\t /**\n\t\t\t * After the attack portion of the envelope, the value will fall\n\t\t\t * over the duration of the decay time to it's sustain value.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.decay = options.decay;\n\t /**\n\t\t\t * \tThe sustain value is the value\n\t\t\t * \twhich the envelope rests at after triggerAttack is\n\t\t\t * \tcalled, but before triggerRelease is invoked.\n\t\t\t * @type {NormalRange}\n\t\t\t */\n\t this.sustain = options.sustain;\n\t /**\n\t\t\t * After triggerRelease is called, the envelope's\n\t\t\t * value will fall to it's miminum value over the\n\t\t\t * duration of the release time.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.release = options.release;\n\t /**\n\t\t\t * the next time the envelope is at standby\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._attackCurve = 'linear';\n\t /**\n\t\t\t * the next time the envelope is at standby\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._releaseCurve = 'exponential';\n\t /**\n\t\t\t * the signal\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t this._sig = this.output = new Tone.Signal(0);\n\t //set the attackCurve initially\n\t this.attackCurve = options.attackCurve;\n\t this.releaseCurve = options.releaseCurve;\n\t };\n\t Tone.extend(Tone.Envelope, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t */\n\t Tone.Envelope.defaults = {\n\t 'attack': 0.01,\n\t 'decay': 0.1,\n\t 'sustain': 0.5,\n\t 'release': 1,\n\t 'attackCurve': 'linear',\n\t 'releaseCurve': 'exponential'\n\t };\n\t /**\n\t\t * Read the current value of the envelope. Useful for\n\t\t * syncronizing visual output to the envelope.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Envelope.prototype, 'value', {\n\t get: function () {\n\t return this.getValueAtTime(this.now());\n\t }\n\t });\n\t /**\n\t\t * The shape of the attack.\n\t\t * Can be any of these strings:\n\t\t * <ul>\n\t\t * <li>linear</li>\n\t\t * <li>exponential</li>\n\t\t * <li>sine</li>\n\t\t * <li>cosine</li>\n\t\t * <li>bounce</li>\n\t\t * <li>ripple</li>\n\t\t * <li>step</li>\n\t\t * </ul>\n\t\t * Can also be an array which describes the curve. Values\n\t\t * in the array are evenly subdivided and linearly\n\t\t * interpolated over the duration of the attack.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {String|Array}\n\t\t * @name attackCurve\n\t\t * @example\n\t\t * env.attackCurve = \"linear\";\n\t\t * @example\n\t\t * //can also be an array\n\t\t * env.attackCurve = [0, 0.2, 0.3, 0.4, 1]\n\t\t */\n\t Object.defineProperty(Tone.Envelope.prototype, 'attackCurve', {\n\t get: function () {\n\t if (Tone.isString(this._attackCurve)) {\n\t return this._attackCurve;\n\t } else if (Tone.isArray(this._attackCurve)) {\n\t //look up the name in the curves array\n\t for (var type in Tone.Envelope.Type) {\n\t if (Tone.Envelope.Type[type].In === this._attackCurve) {\n\t return type;\n\t }\n\t }\n\t //otherwise just return the array\n\t return this._attackCurve;\n\t }\n\t },\n\t set: function (curve) {\n\t //check if it's a valid type\n\t if (Tone.Envelope.Type.hasOwnProperty(curve)) {\n\t var curveDef = Tone.Envelope.Type[curve];\n\t if (Tone.isObject(curveDef)) {\n\t this._attackCurve = curveDef.In;\n\t } else {\n\t this._attackCurve = curveDef;\n\t }\n\t } else if (Tone.isArray(curve)) {\n\t this._attackCurve = curve;\n\t } else {\n\t throw new Error('Tone.Envelope: invalid curve: ' + curve);\n\t }\n\t }\n\t });\n\t /**\n\t\t * The shape of the release. See the attack curve types.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {String|Array}\n\t\t * @name releaseCurve\n\t\t * @example\n\t\t * env.releaseCurve = \"linear\";\n\t\t */\n\t Object.defineProperty(Tone.Envelope.prototype, 'releaseCurve', {\n\t get: function () {\n\t if (Tone.isString(this._releaseCurve)) {\n\t return this._releaseCurve;\n\t } else if (Tone.isArray(this._releaseCurve)) {\n\t //look up the name in the curves array\n\t for (var type in Tone.Envelope.Type) {\n\t if (Tone.Envelope.Type[type].Out === this._releaseCurve) {\n\t return type;\n\t }\n\t }\n\t //otherwise just return the array\n\t return this._releaseCurve;\n\t }\n\t },\n\t set: function (curve) {\n\t //check if it's a valid type\n\t if (Tone.Envelope.Type.hasOwnProperty(curve)) {\n\t var curveDef = Tone.Envelope.Type[curve];\n\t if (Tone.isObject(curveDef)) {\n\t this._releaseCurve = curveDef.Out;\n\t } else {\n\t this._releaseCurve = curveDef;\n\t }\n\t } else if (Tone.isArray(curve)) {\n\t this._releaseCurve = curve;\n\t } else {\n\t throw new Error('Tone.Envelope: invalid curve: ' + curve);\n\t }\n\t }\n\t });\n\t /**\n\t\t * Trigger the attack/decay portion of the ADSR envelope.\n\t\t * @param {Time} [time=now] When the attack should start.\n\t\t * @param {NormalRange} [velocity=1] The velocity of the envelope scales the vales.\n\t\t * number between 0-1\n\t\t * @returns {Tone.Envelope} this\n\t\t * @example\n\t\t * //trigger the attack 0.5 seconds from now with a velocity of 0.2\n\t\t * env.triggerAttack(\"+0.5\", 0.2);\n\t\t */\n\t Tone.Envelope.prototype.triggerAttack = function (time, velocity) {\n\t time = this.toSeconds(time);\n\t var originalAttack = this.toSeconds(this.attack);\n\t var attack = originalAttack;\n\t var decay = this.toSeconds(this.decay);\n\t velocity = Tone.defaultArg(velocity, 1);\n\t //check if it's not a complete attack\n\t var currentValue = this.getValueAtTime(time);\n\t if (currentValue > 0) {\n\t //subtract the current value from the attack time\n\t var attackRate = 1 / attack;\n\t var remainingDistance = 1 - currentValue;\n\t //the attack is now the remaining time\n\t attack = remainingDistance / attackRate;\n\t }\n\t //attack\n\t if (this._attackCurve === 'linear') {\n\t this._sig.linearRampTo(velocity, attack, time);\n\t } else if (this._attackCurve === 'exponential') {\n\t this._sig.targetRampTo(velocity, attack, time);\n\t } else if (attack > 0) {\n\t this._sig.cancelAndHoldAtTime(time);\n\t var curve = this._attackCurve;\n\t //take only a portion of the curve\n\t if (attack < originalAttack) {\n\t var percentComplete = 1 - attack / originalAttack;\n\t var sliceIndex = Math.floor(percentComplete * this._attackCurve.length);\n\t curve = this._attackCurve.slice(sliceIndex);\n\t //the first index is the current value\n\t curve[0] = currentValue;\n\t }\n\t this._sig.setValueCurveAtTime(curve, time, attack, velocity);\n\t }\n\t //decay\n\t if (decay) {\n\t this._sig.targetRampTo(velocity * this.sustain, decay, attack + time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Triggers the release of the envelope.\n\t\t * @param {Time} [time=now] When the release portion of the envelope should start.\n\t\t * @returns {Tone.Envelope} this\n\t\t * @example\n\t\t * //trigger release immediately\n\t\t * env.triggerRelease();\n\t\t */\n\t Tone.Envelope.prototype.triggerRelease = function (time) {\n\t time = this.toSeconds(time);\n\t var currentValue = this.getValueAtTime(time);\n\t if (currentValue > 0) {\n\t var release = this.toSeconds(this.release);\n\t if (this._releaseCurve === 'linear') {\n\t this._sig.linearRampTo(0, release, time);\n\t } else if (this._releaseCurve === 'exponential') {\n\t this._sig.targetRampTo(0, release, time);\n\t } else {\n\t var curve = this._releaseCurve;\n\t if (Tone.isArray(curve)) {\n\t this._sig.cancelAndHoldAtTime(time);\n\t this._sig.setValueCurveAtTime(curve, time, release, currentValue);\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Get the scheduled value at the given time. This will\n\t\t * return the unconverted (raw) value.\n\t\t * @param {Number} time The time in seconds.\n\t\t * @return {Number} The scheduled value at the given time.\n\t\t */\n\t Tone.Envelope.prototype.getValueAtTime = function (time) {\n\t return this._sig.getValueAtTime(time);\n\t };\n\t /**\n\t\t * triggerAttackRelease is shorthand for triggerAttack, then waiting\n\t\t * some duration, then triggerRelease.\n\t\t * @param {Time} duration The duration of the sustain.\n\t\t * @param {Time} [time=now] When the attack should be triggered.\n\t\t * @param {number} [velocity=1] The velocity of the envelope.\n\t\t * @returns {Tone.Envelope} this\n\t\t * @example\n\t\t * //trigger the attack and then the release after 0.6 seconds.\n\t\t * env.triggerAttackRelease(0.6);\n\t\t */\n\t Tone.Envelope.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t this.triggerAttack(time, velocity);\n\t this.triggerRelease(time + this.toSeconds(duration));\n\t return this;\n\t };\n\t /**\n\t\t * Cancels all scheduled envelope changes after the given time.\n\t\t * @param {Time} after\n\t\t * @returns {Tone.Envelope} this\n\t\t */\n\t Tone.Envelope.prototype.cancel = function (after) {\n\t this._sig.cancelScheduledValues(after);\n\t return this;\n\t };\n\t /**\n\t\t * Borrows the connect method from Tone.Signal.\n\t\t * @function\n\t\t * @private\n\t\t */\n\t Tone.Envelope.prototype.connect = Tone.SignalBase.prototype.connect;\n\t /**\n\t \t * Generate some complex envelope curves.\n\t \t */\n\t (function _createCurves() {\n\t var curveLen = 128;\n\t var i, k;\n\t //cosine curve\n\t var cosineCurve = [];\n\t for (i = 0; i < curveLen; i++) {\n\t cosineCurve[i] = Math.sin(i / (curveLen - 1) * (Math.PI / 2));\n\t }\n\t //ripple curve\n\t var rippleCurve = [];\n\t var rippleCurveFreq = 6.4;\n\t for (i = 0; i < curveLen - 1; i++) {\n\t k = i / (curveLen - 1);\n\t var sineWave = Math.sin(k * (Math.PI * 2) * rippleCurveFreq - Math.PI / 2) + 1;\n\t rippleCurve[i] = sineWave / 10 + k * 0.83;\n\t }\n\t rippleCurve[curveLen - 1] = 1;\n\t //stairs curve\n\t var stairsCurve = [];\n\t var steps = 5;\n\t for (i = 0; i < curveLen; i++) {\n\t stairsCurve[i] = Math.ceil(i / (curveLen - 1) * steps) / steps;\n\t }\n\t //in-out easing curve\n\t var sineCurve = [];\n\t for (i = 0; i < curveLen; i++) {\n\t k = i / (curveLen - 1);\n\t sineCurve[i] = 0.5 * (1 - Math.cos(Math.PI * k));\n\t }\n\t //a bounce curve\n\t var bounceCurve = [];\n\t for (i = 0; i < curveLen; i++) {\n\t k = i / (curveLen - 1);\n\t var freq = Math.pow(k, 3) * 4 + 0.2;\n\t var val = Math.cos(freq * Math.PI * 2 * k);\n\t bounceCurve[i] = Math.abs(val * (1 - k));\n\t }\n\t /**\n\t\t\t * Invert a value curve to make it work for the release\n\t\t\t * @private\n\t\t\t */\n\t function invertCurve(curve) {\n\t var out = new Array(curve.length);\n\t for (var j = 0; j < curve.length; j++) {\n\t out[j] = 1 - curve[j];\n\t }\n\t return out;\n\t }\n\t /**\n\t\t\t * reverse the curve\n\t\t\t * @private\n\t\t\t */\n\t function reverseCurve(curve) {\n\t return curve.slice(0).reverse();\n\t }\n\t /**\n\t\t\t * attack and release curve arrays\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t Tone.Envelope.Type = {\n\t 'linear': 'linear',\n\t 'exponential': 'exponential',\n\t 'bounce': {\n\t In: invertCurve(bounceCurve),\n\t Out: bounceCurve\n\t },\n\t 'cosine': {\n\t In: cosineCurve,\n\t Out: reverseCurve(cosineCurve)\n\t },\n\t 'step': {\n\t In: stairsCurve,\n\t Out: invertCurve(stairsCurve)\n\t },\n\t 'ripple': {\n\t In: rippleCurve,\n\t Out: invertCurve(rippleCurve)\n\t },\n\t 'sine': {\n\t In: sineCurve,\n\t Out: invertCurve(sineCurve)\n\t }\n\t };\n\t }());\n\t /**\n\t\t * Disconnect and dispose.\n\t\t * @returns {Tone.Envelope} this\n\t\t */\n\t Tone.Envelope.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._sig.dispose();\n\t this._sig = null;\n\t this._attackCurve = null;\n\t this._releaseCurve = null;\n\t return this;\n\t };\n\t return Tone.Envelope;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.AmplitudeEnvelope is a Tone.Envelope connected to a gain node.\n\t\t * Unlike Tone.Envelope, which outputs the envelope's value, Tone.AmplitudeEnvelope accepts\n\t\t * an audio signal as the input and will apply the envelope to the amplitude\n\t\t * of the signal. Read more about ADSR Envelopes on [Wikipedia](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Envelope}\n\t\t * @param {Time|Object} [attack] The amount of time it takes for the envelope to go from\n\t\t * 0 to it's maximum value.\n\t\t * @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n\t\t * \tto fall to the sustain value.\n\t\t * @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n\t\t * \tthe release is triggered.\n\t\t * @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n\t\t * @example\n\t\t * var ampEnv = new Tone.AmplitudeEnvelope({\n\t\t * \t\"attack\": 0.1,\n\t\t * \t\"decay\": 0.2,\n\t\t * \t\"sustain\": 1.0,\n\t\t * \t\"release\": 0.8\n\t\t * }).toMaster();\n\t\t * //create an oscillator and connect it\n\t\t * var osc = new Tone.Oscillator().connect(ampEnv).start();\n\t\t * //trigger the envelopes attack and release \"8t\" apart\n\t\t * ampEnv.triggerAttackRelease(\"8t\");\n\t\t */\n\t Tone.AmplitudeEnvelope = function () {\n\t Tone.Envelope.apply(this, arguments);\n\t /**\n\t\t\t * the input node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.input = this.output = new Tone.Gain();\n\t this._sig.connect(this.output.gain);\n\t };\n\t Tone.extend(Tone.AmplitudeEnvelope, Tone.Envelope);\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.AmplitudeEnvelope} this\n\t\t */\n\t Tone.AmplitudeEnvelope.prototype.dispose = function () {\n\t Tone.Envelope.prototype.dispose.call(this);\n\t return this;\n\t };\n\t return Tone.AmplitudeEnvelope;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * AnalyserNode.getFloatTimeDomainData polyfill\n\t\t * @private\n\t\t */\n\t if (Tone.supported) {\n\t if (!AnalyserNode.prototype.getFloatTimeDomainData) {\n\t //referenced https://github.com/mohayonao/get-float-time-domain-data\n\t AnalyserNode.prototype.getFloatTimeDomainData = function (array) {\n\t var uint8 = new Uint8Array(array.length);\n\t this.getByteTimeDomainData(uint8);\n\t for (var i = 0; i < uint8.length; i++) {\n\t array[i] = (uint8[i] - 128) / 128;\n\t }\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Wrapper around the native Web Audio's\n\t\t * [AnalyserNode](http://webaudio.github.io/web-audio-api/#idl-def-AnalyserNode).\n\t\t * Extracts FFT or Waveform data from the incoming signal.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {String=} type The return type of the analysis, either \"fft\", or \"waveform\".\n\t\t * @param {Number=} size The size of the FFT. Value must be a power of\n\t\t * two in the range 32 to 32768.\n\t\t */\n\t Tone.Analyser = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'type',\n\t 'size'\n\t ], Tone.Analyser);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The analyser node.\n\t\t\t * @private\n\t\t\t * @type {AnalyserNode}\n\t\t\t */\n\t this._analyser = this.input = this.output = this.context.createAnalyser();\n\t /**\n\t\t\t * The analysis type\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._type = options.type;\n\t /**\n\t\t\t * The buffer that the FFT data is written to\n\t\t\t * @type {TypedArray}\n\t\t\t * @private\n\t\t\t */\n\t this._buffer = null;\n\t //set the values initially\n\t this.size = options.size;\n\t this.type = options.type;\n\t };\n\t Tone.extend(Tone.Analyser, Tone.AudioNode);\n\t /**\n\t\t * The default values.\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Analyser.defaults = {\n\t 'size': 1024,\n\t 'type': 'fft',\n\t 'smoothing': 0.8\n\t };\n\t /**\n\t\t * Possible return types of analyser.getValue()\n\t\t * @enum {String}\n\t\t */\n\t Tone.Analyser.Type = {\n\t Waveform: 'waveform',\n\t FFT: 'fft'\n\t };\n\t /**\n\t\t * Run the analysis given the current settings and return the\n\t\t * result as a TypedArray.\n\t\t * @returns {TypedArray}\n\t\t */\n\t Tone.Analyser.prototype.getValue = function () {\n\t if (this._type === Tone.Analyser.Type.FFT) {\n\t this._analyser.getFloatFrequencyData(this._buffer);\n\t } else if (this._type === Tone.Analyser.Type.Waveform) {\n\t this._analyser.getFloatTimeDomainData(this._buffer);\n\t }\n\t return this._buffer;\n\t };\n\t /**\n\t\t * The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t * @memberOf Tone.Analyser#\n\t\t * @type {Number}\n\t\t * @name size\n\t\t */\n\t Object.defineProperty(Tone.Analyser.prototype, 'size', {\n\t get: function () {\n\t return this._analyser.frequencyBinCount;\n\t },\n\t set: function (size) {\n\t this._analyser.fftSize = size * 2;\n\t this._buffer = new Float32Array(size);\n\t }\n\t });\n\t /**\n\t\t * The analysis function returned by analyser.getValue(), either \"fft\" or \"waveform\".\n\t\t * @memberOf Tone.Analyser#\n\t\t * @type {String}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.Analyser.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t if (type !== Tone.Analyser.Type.Waveform && type !== Tone.Analyser.Type.FFT) {\n\t throw new TypeError('Tone.Analyser: invalid type: ' + type);\n\t }\n\t this._type = type;\n\t }\n\t });\n\t /**\n\t\t * 0 represents no time averaging with the last analysis frame.\n\t\t * @memberOf Tone.Analyser#\n\t\t * @type {NormalRange}\n\t\t * @name smoothing\n\t\t */\n\t Object.defineProperty(Tone.Analyser.prototype, 'smoothing', {\n\t get: function () {\n\t return this._analyser.smoothingTimeConstant;\n\t },\n\t set: function (val) {\n\t this._analyser.smoothingTimeConstant = val;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Analyser} this\n\t\t */\n\t Tone.Analyser.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._analyser.disconnect();\n\t this._analyser = null;\n\t this._buffer = null;\n\t };\n\t return Tone.Analyser;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Compressor is a thin wrapper around the Web Audio\n\t\t * [DynamicsCompressorNode](http://webaudio.github.io/web-audio-api/#the-dynamicscompressornode-interface).\n\t\t * Compression reduces the volume of loud sounds or amplifies quiet sounds\n\t\t * by narrowing or \"compressing\" an audio signal's dynamic range.\n\t\t * Read more on [Wikipedia](https://en.wikipedia.org/wiki/Dynamic_range_compression).\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Decibels|Object} [threshold] The value above which the compression starts to be applied.\n\t\t * @param {Positive} [ratio] The gain reduction ratio.\n\t\t * @example\n\t\t * var comp = new Tone.Compressor(-30, 3);\n\t\t */\n\t Tone.Compressor = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'threshold',\n\t 'ratio'\n\t ], Tone.Compressor);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the compressor node\n\t\t\t * @type {DynamicsCompressorNode}\n\t\t\t * @private\n\t\t\t */\n\t this._compressor = this.input = this.output = this.context.createDynamicsCompressor();\n\t /**\n\t\t\t * the threshold vaue\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.threshold = new Tone.Param({\n\t 'param': this._compressor.threshold,\n\t 'units': Tone.Type.Decibels,\n\t 'convert': false\n\t });\n\t /**\n\t\t\t * The attack parameter\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.attack = new Tone.Param(this._compressor.attack, Tone.Type.Time);\n\t /**\n\t\t\t * The release parameter\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.release = new Tone.Param(this._compressor.release, Tone.Type.Time);\n\t /**\n\t\t\t * The knee parameter\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.knee = new Tone.Param({\n\t 'param': this._compressor.knee,\n\t 'units': Tone.Type.Decibels,\n\t 'convert': false\n\t });\n\t /**\n\t\t\t * The ratio value\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t this.ratio = new Tone.Param({\n\t 'param': this._compressor.ratio,\n\t 'convert': false\n\t });\n\t //set the defaults\n\t this._readOnly([\n\t 'knee',\n\t 'release',\n\t 'attack',\n\t 'ratio',\n\t 'threshold'\n\t ]);\n\t this.set(options);\n\t };\n\t Tone.extend(Tone.Compressor, Tone.AudioNode);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Compressor.defaults = {\n\t 'ratio': 12,\n\t 'threshold': -24,\n\t 'release': 0.25,\n\t 'attack': 0.003,\n\t 'knee': 30\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Compressor} this\n\t\t */\n\t Tone.Compressor.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'knee',\n\t 'release',\n\t 'attack',\n\t 'ratio',\n\t 'threshold'\n\t ]);\n\t this._compressor.disconnect();\n\t this._compressor = null;\n\t this.attack.dispose();\n\t this.attack = null;\n\t this.release.dispose();\n\t this.release = null;\n\t this.threshold.dispose();\n\t this.threshold = null;\n\t this.ratio.dispose();\n\t this.ratio = null;\n\t this.knee.dispose();\n\t this.knee = null;\n\t return this;\n\t };\n\t return Tone.Compressor;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Add a signal and a number or two signals. When no value is\n\t\t * passed into the constructor, Tone.Add will sum <code>input[0]</code>\n\t\t * and <code>input[1]</code>. If a value is passed into the constructor, \n\t\t * the it will be added to the input.\n\t\t * \n\t\t * @constructor\n\t\t * @extends {Tone.Signal}\n\t\t * @param {number=} value If no value is provided, Tone.Add will sum the first\n\t\t * and second inputs. \n\t\t * @example\n\t\t * var signal = new Tone.Signal(2);\n\t\t * var add = new Tone.Add(2);\n\t\t * signal.connect(add);\n\t\t * //the output of add equals 4\n\t\t * @example\n\t\t * //if constructed with no arguments\n\t\t * //it will add the first and second inputs\n\t\t * var add = new Tone.Add();\n\t\t * var sig0 = new Tone.Signal(3).connect(add, 0, 0);\n\t\t * var sig1 = new Tone.Signal(4).connect(add, 0, 1);\n\t\t * //the output of add equals 7. \n\t\t */\n\t Tone.Add = function (value) {\n\t Tone.Signal.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * the summing node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this._sum = this.input[0] = this.input[1] = this.output = new Tone.Gain();\n\t /**\n\t\t\t * @private\n\t\t\t * @type {Tone.Signal}\n\t\t\t */\n\t this._param = this.input[1] = new Tone.Signal(value);\n\t this._param.connect(this._sum);\n\t };\n\t Tone.extend(Tone.Add, Tone.Signal);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Add} this\n\t\t */\n\t Tone.Add.prototype.dispose = function () {\n\t Tone.Signal.prototype.dispose.call(this);\n\t this._sum.dispose();\n\t this._sum = null;\n\t return this;\n\t };\n\t return Tone.Add;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Multiply two incoming signals. Or, if a number is given in the constructor,\n\t\t * multiplies the incoming signal by that value.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Signal}\n\t\t * @param {number=} value Constant value to multiple. If no value is provided,\n\t\t * it will return the product of the first and second inputs\n\t\t * @example\n\t\t * var mult = new Tone.Multiply();\n\t\t * var sigA = new Tone.Signal(3);\n\t\t * var sigB = new Tone.Signal(4);\n\t\t * sigA.connect(mult, 0, 0);\n\t\t * sigB.connect(mult, 0, 1);\n\t\t * //output of mult is 12.\n\t\t * @example\n\t\t * var mult = new Tone.Multiply(10);\n\t\t * var sig = new Tone.Signal(2).connect(mult);\n\t\t * //the output of mult is 20.\n\t\t */\n\t Tone.Multiply = function (value) {\n\t Tone.Signal.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * the input node is the same as the output node\n\t\t\t * it is also the GainNode which handles the scaling of incoming signal\n\t\t\t *\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this._mult = this.input[0] = this.output = new Tone.Gain();\n\t /**\n\t\t\t * the scaling parameter\n\t\t\t * @type {AudioParam}\n\t\t\t * @private\n\t\t\t */\n\t this._param = this.input[1] = this.output.gain;\n\t this.value = Tone.defaultArg(value, 0);\n\t };\n\t Tone.extend(Tone.Multiply, Tone.Signal);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Multiply} this\n\t\t */\n\t Tone.Multiply.prototype.dispose = function () {\n\t Tone.Signal.prototype.dispose.call(this);\n\t this._mult.dispose();\n\t this._mult = null;\n\t this._param = null;\n\t return this;\n\t };\n\t return Tone.Multiply;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Negate the incoming signal. i.e. an input signal of 10 will output -10\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @example\n\t\t * var neg = new Tone.Negate();\n\t\t * var sig = new Tone.Signal(-2).connect(neg);\n\t\t * //output of neg is positive 2. \n\t\t */\n\t Tone.Negate = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * negation is done by multiplying by -1\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._multiply = this.input = this.output = new Tone.Multiply(-1);\n\t };\n\t Tone.extend(Tone.Negate, Tone.SignalBase);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Negate} this\n\t\t */\n\t Tone.Negate.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._multiply.dispose();\n\t this._multiply = null;\n\t return this;\n\t };\n\t return Tone.Negate;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Subtract the signal connected to <code>input[1]</code> from the signal connected \n\t\t * to <code>input[0]</code>. If an argument is provided in the constructor, the \n\t\t * signals <code>.value</code> will be subtracted from the incoming signal.\n\t\t *\n\t\t * @extends {Tone.Signal}\n\t\t * @constructor\n\t\t * @param {number=} value The value to subtract from the incoming signal. If the value\n\t\t * is omitted, it will subtract the second signal from the first.\n\t\t * @example\n\t\t * var sub = new Tone.Subtract(1);\n\t\t * var sig = new Tone.Signal(4).connect(sub);\n\t\t * //the output of sub is 3. \n\t\t * @example\n\t\t * var sub = new Tone.Subtract();\n\t\t * var sigA = new Tone.Signal(10);\n\t\t * var sigB = new Tone.Signal(2.5);\n\t\t * sigA.connect(sub, 0, 0);\n\t\t * sigB.connect(sub, 0, 1);\n\t\t * //output of sub is 7.5\n\t\t */\n\t Tone.Subtract = function (value) {\n\t Tone.Signal.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * the summing node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this._sum = this.input[0] = this.output = new Tone.Gain();\n\t /**\n\t\t\t * negate the input of the second input before connecting it\n\t\t\t * to the summing node.\n\t\t\t * @type {Tone.Negate}\n\t\t\t * @private\n\t\t\t */\n\t this._neg = new Tone.Negate();\n\t /**\n\t\t\t * the node where the value is set\n\t\t\t * @private\n\t\t\t * @type {Tone.Signal}\n\t\t\t */\n\t this._param = this.input[1] = new Tone.Signal(value);\n\t this._param.chain(this._neg, this._sum);\n\t };\n\t Tone.extend(Tone.Subtract, Tone.Signal);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.SignalBase} this\n\t\t */\n\t Tone.Subtract.prototype.dispose = function () {\n\t Tone.Signal.prototype.dispose.call(this);\n\t this._neg.dispose();\n\t this._neg = null;\n\t this._sum.disconnect();\n\t this._sum = null;\n\t return this;\n\t };\n\t return Tone.Subtract;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Convert an incoming signal between 0, 1 to an equal power gain scale.\n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @example\n\t\t * var eqPowGain = new Tone.EqualPowerGain();\n\t\t */\n\t Tone.EqualPowerGain = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * @type {Tone.WaveShaper}\n\t\t\t * @private\n\t\t\t */\n\t this._eqPower = this.input = this.output = new Tone.WaveShaper(function (val) {\n\t if (Math.abs(val) < 0.001) {\n\t //should output 0 when input is 0\n\t return 0;\n\t } else {\n\t return Tone.equalPowerScale(val);\n\t }\n\t }.bind(this), 4096);\n\t };\n\t Tone.extend(Tone.EqualPowerGain, Tone.SignalBase);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.EqualPowerGain} this\n\t\t */\n\t Tone.EqualPowerGain.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._eqPower.dispose();\n\t this._eqPower = null;\n\t return this;\n\t };\n\t return Tone.EqualPowerGain;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Crossfade provides equal power fading between two inputs.\n\t\t * More on crossfading technique [here](https://en.wikipedia.org/wiki/Fade_(audio_engineering)#Crossfading).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {NormalRange} [initialFade=0.5]\n\t\t * @example\n\t\t * var crossFade = new Tone.CrossFade(0.5);\n\t\t * //connect effect A to crossfade from\n\t\t * //effect output 0 to crossfade input 0\n\t\t * effectA.connect(crossFade, 0, 0);\n\t\t * //connect effect B to crossfade from\n\t\t * //effect output 0 to crossfade input 1\n\t\t * effectB.connect(crossFade, 0, 1);\n\t\t * crossFade.fade.value = 0;\n\t\t * // ^ only effectA is output\n\t\t * crossFade.fade.value = 1;\n\t\t * // ^ only effectB is output\n\t\t * crossFade.fade.value = 0.5;\n\t\t * // ^ the two signals are mixed equally.\n\t\t */\n\t Tone.CrossFade = function (initialFade) {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(2, 1);\n\t /**\n\t\t\t * Alias for <code>input[0]</code>.\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.a = this.input[0] = new Tone.Gain();\n\t /**\n\t\t\t * Alias for <code>input[1]</code>.\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.b = this.input[1] = new Tone.Gain();\n\t /**\n\t\t\t * \tThe mix between the two inputs. A fade value of 0\n\t\t\t * \twill output 100% <code>input[0]</code> and\n\t\t\t * \ta value of 1 will output 100% <code>input[1]</code>.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.fade = new Tone.Signal(Tone.defaultArg(initialFade, 0.5), Tone.Type.NormalRange);\n\t /**\n\t\t\t * equal power gain cross fade\n\t\t\t * @private\n\t\t\t * @type {Tone.EqualPowerGain}\n\t\t\t */\n\t this._equalPowerA = new Tone.EqualPowerGain();\n\t /**\n\t\t\t * equal power gain cross fade\n\t\t\t * @private\n\t\t\t * @type {Tone.EqualPowerGain}\n\t\t\t */\n\t this._equalPowerB = new Tone.EqualPowerGain();\n\t /**\n\t\t\t * invert the incoming signal\n\t\t\t * @private\n\t\t\t * @type {Tone}\n\t\t\t */\n\t this._one = this.context.getConstant(1);\n\t /**\n\t\t\t * invert the incoming signal\n\t\t\t * @private\n\t\t\t * @type {Tone.Subtract}\n\t\t\t */\n\t this._invert = new Tone.Subtract();\n\t //connections\n\t this.a.connect(this.output);\n\t this.b.connect(this.output);\n\t this.fade.chain(this._equalPowerB, this.b.gain);\n\t this._one.connect(this._invert, 0, 0);\n\t this.fade.connect(this._invert, 0, 1);\n\t this._invert.chain(this._equalPowerA, this.a.gain);\n\t this._readOnly('fade');\n\t };\n\t Tone.extend(Tone.CrossFade, Tone.AudioNode);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.CrossFade} this\n\t\t */\n\t Tone.CrossFade.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable('fade');\n\t this._equalPowerA.dispose();\n\t this._equalPowerA = null;\n\t this._equalPowerB.dispose();\n\t this._equalPowerB = null;\n\t this.fade.dispose();\n\t this.fade = null;\n\t this._invert.dispose();\n\t this._invert = null;\n\t this._one = null;\n\t this.a.dispose();\n\t this.a = null;\n\t this.b.dispose();\n\t this.b = null;\n\t return this;\n\t };\n\t return Tone.CrossFade;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Filter is a filter which allows for all of the same native methods\n\t\t * as the [BiquadFilterNode](http://webaudio.github.io/web-audio-api/#the-biquadfilternode-interface).\n\t\t * Tone.Filter has the added ability to set the filter rolloff at -12\n\t\t * (default), -24 and -48.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Frequency|Object} [frequency] The cutoff frequency of the filter.\n\t\t * @param {string=} type The type of filter.\n\t\t * @param {number=} rolloff The drop in decibels per octave after the cutoff frequency.\n\t\t * 3 choices: -12, -24, and -48\n\t\t * @example\n\t\t * var filter = new Tone.Filter(200, \"highpass\");\n\t\t */\n\t Tone.Filter = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type',\n\t 'rolloff'\n\t ], Tone.Filter);\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * the filter(s)\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._filters = [];\n\t /**\n\t\t\t * The cutoff frequency of the filter.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune parameter\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(0, Tone.Type.Cents);\n\t /**\n\t\t\t * The gain of the filter, only used in certain filter types\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t this.gain = new Tone.Signal({\n\t 'value': options.gain,\n\t 'convert': false\n\t });\n\t /**\n\t\t\t * The Q or Quality of the filter\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.Q = new Tone.Signal(options.Q);\n\t /**\n\t\t\t * the type of the filter\n\t\t\t * @type {string}\n\t\t\t * @private\n\t\t\t */\n\t this._type = options.type;\n\t /**\n\t\t\t * the rolloff value of the filter\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._rolloff = options.rolloff;\n\t //set the rolloff;\n\t this.rolloff = options.rolloff;\n\t this._readOnly([\n\t 'detune',\n\t 'frequency',\n\t 'gain',\n\t 'Q'\n\t ]);\n\t };\n\t Tone.extend(Tone.Filter, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t *\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Filter.defaults = {\n\t 'type': 'lowpass',\n\t 'frequency': 350,\n\t 'rolloff': -12,\n\t 'Q': 1,\n\t 'gain': 0\n\t };\n\t /**\n\t\t * The type of the filter. Types: \"lowpass\", \"highpass\",\n\t\t * \"bandpass\", \"lowshelf\", \"highshelf\", \"notch\", \"allpass\", or \"peaking\".\n\t\t * @memberOf Tone.Filter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.Filter.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t var types = [\n\t 'lowpass',\n\t 'highpass',\n\t 'bandpass',\n\t 'lowshelf',\n\t 'highshelf',\n\t 'notch',\n\t 'allpass',\n\t 'peaking'\n\t ];\n\t if (types.indexOf(type) === -1) {\n\t throw new TypeError('Tone.Filter: invalid type ' + type);\n\t }\n\t this._type = type;\n\t for (var i = 0; i < this._filters.length; i++) {\n\t this._filters[i].type = type;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The rolloff of the filter which is the drop in db\n\t\t * per octave. Implemented internally by cascading filters.\n\t\t * Only accepts the values -12, -24, -48 and -96.\n\t\t * @memberOf Tone.Filter#\n\t\t * @type {number}\n\t\t * @name rolloff\n\t\t */\n\t Object.defineProperty(Tone.Filter.prototype, 'rolloff', {\n\t get: function () {\n\t return this._rolloff;\n\t },\n\t set: function (rolloff) {\n\t rolloff = parseInt(rolloff, 10);\n\t var possibilities = [\n\t -12,\n\t -24,\n\t -48,\n\t -96\n\t ];\n\t var cascadingCount = possibilities.indexOf(rolloff);\n\t //check the rolloff is valid\n\t if (cascadingCount === -1) {\n\t throw new RangeError('Tone.Filter: rolloff can only be -12, -24, -48 or -96');\n\t }\n\t cascadingCount += 1;\n\t this._rolloff = rolloff;\n\t //first disconnect the filters and throw them away\n\t this.input.disconnect();\n\t for (var i = 0; i < this._filters.length; i++) {\n\t this._filters[i].disconnect();\n\t this._filters[i] = null;\n\t }\n\t this._filters = new Array(cascadingCount);\n\t for (var count = 0; count < cascadingCount; count++) {\n\t var filter = this.context.createBiquadFilter();\n\t filter.type = this._type;\n\t this.frequency.connect(filter.frequency);\n\t this.detune.connect(filter.detune);\n\t this.Q.connect(filter.Q);\n\t this.gain.connect(filter.gain);\n\t this._filters[count] = filter;\n\t }\n\t //connect them up\n\t var connectionChain = [this.input].concat(this._filters).concat([this.output]);\n\t Tone.connectSeries.apply(Tone, connectionChain);\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Filter} this\n\t\t */\n\t Tone.Filter.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t for (var i = 0; i < this._filters.length; i++) {\n\t this._filters[i].disconnect();\n\t this._filters[i] = null;\n\t }\n\t this._filters = null;\n\t this._writable([\n\t 'detune',\n\t 'frequency',\n\t 'gain',\n\t 'Q'\n\t ]);\n\t this.frequency.dispose();\n\t this.Q.dispose();\n\t this.frequency = null;\n\t this.Q = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t this.gain.dispose();\n\t this.gain = null;\n\t return this;\n\t };\n\t return Tone.Filter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Split the incoming signal into three bands (low, mid, high)\n\t\t * with two crossover frequency controls.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Frequency|Object} [lowFrequency] the low/mid crossover frequency\n\t\t * @param {Frequency} [highFrequency] the mid/high crossover frequency\n\t\t */\n\t Tone.MultibandSplit = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'lowFrequency',\n\t 'highFrequency'\n\t ], Tone.MultibandSplit);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the input\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this.input = new Tone.Gain();\n\t /**\n\t\t\t * the outputs\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this.output = new Array(3);\n\t /**\n\t\t\t * The low band. Alias for <code>output[0]</code>\n\t\t\t * @type {Tone.Filter}\n\t\t\t */\n\t this.low = this.output[0] = new Tone.Filter(0, 'lowpass');\n\t /**\n\t\t\t * the lower filter of the mid band\n\t\t\t * @type {Tone.Filter}\n\t\t\t * @private\n\t\t\t */\n\t this._lowMidFilter = new Tone.Filter(0, 'highpass');\n\t /**\n\t\t\t * The mid band output. Alias for <code>output[1]</code>\n\t\t\t * @type {Tone.Filter}\n\t\t\t */\n\t this.mid = this.output[1] = new Tone.Filter(0, 'lowpass');\n\t /**\n\t\t\t * The high band output. Alias for <code>output[2]</code>\n\t\t\t * @type {Tone.Filter}\n\t\t\t */\n\t this.high = this.output[2] = new Tone.Filter(0, 'highpass');\n\t /**\n\t\t\t * The low/mid crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.lowFrequency = new Tone.Signal(options.lowFrequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The mid/high crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.highFrequency = new Tone.Signal(options.highFrequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The quality of all the filters\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t this.Q = new Tone.Signal(options.Q);\n\t this.input.fan(this.low, this.high);\n\t this.input.chain(this._lowMidFilter, this.mid);\n\t //the frequency control signal\n\t this.lowFrequency.connect(this.low.frequency);\n\t this.lowFrequency.connect(this._lowMidFilter.frequency);\n\t this.highFrequency.connect(this.mid.frequency);\n\t this.highFrequency.connect(this.high.frequency);\n\t //the Q value\n\t this.Q.connect(this.low.Q);\n\t this.Q.connect(this._lowMidFilter.Q);\n\t this.Q.connect(this.mid.Q);\n\t this.Q.connect(this.high.Q);\n\t this._readOnly([\n\t 'high',\n\t 'mid',\n\t 'low',\n\t 'highFrequency',\n\t 'lowFrequency'\n\t ]);\n\t };\n\t Tone.extend(Tone.MultibandSplit, Tone.AudioNode);\n\t /**\n\t\t * @private\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.MultibandSplit.defaults = {\n\t 'lowFrequency': 400,\n\t 'highFrequency': 2500,\n\t 'Q': 1\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.MultibandSplit} this\n\t\t */\n\t Tone.MultibandSplit.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'high',\n\t 'mid',\n\t 'low',\n\t 'highFrequency',\n\t 'lowFrequency'\n\t ]);\n\t this.low.dispose();\n\t this.low = null;\n\t this._lowMidFilter.dispose();\n\t this._lowMidFilter = null;\n\t this.mid.dispose();\n\t this.mid = null;\n\t this.high.dispose();\n\t this.high = null;\n\t this.lowFrequency.dispose();\n\t this.lowFrequency = null;\n\t this.highFrequency.dispose();\n\t this.highFrequency = null;\n\t this.Q.dispose();\n\t this.Q = null;\n\t return this;\n\t };\n\t return Tone.MultibandSplit;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.EQ3 is a three band EQ with control over low, mid, and high gain as\n\t\t * well as the low and high crossover frequencies.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t *\n\t\t * @param {Decibels|Object} [lowLevel] The gain applied to the lows.\n\t\t * @param {Decibels} [midLevel] The gain applied to the mid.\n\t\t * @param {Decibels} [highLevel] The gain applied to the high.\n\t\t * @example\n\t\t * var eq = new Tone.EQ3(-10, 3, -20);\n\t\t */\n\t Tone.EQ3 = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'low',\n\t 'mid',\n\t 'high'\n\t ], Tone.EQ3);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the output node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.output = new Tone.Gain();\n\t /**\n\t\t\t * the multiband split\n\t\t\t * @type {Tone.MultibandSplit}\n\t\t\t * @private\n\t\t\t */\n\t this._multibandSplit = this.input = new Tone.MultibandSplit({\n\t 'lowFrequency': options.lowFrequency,\n\t 'highFrequency': options.highFrequency\n\t });\n\t /**\n\t\t\t * The gain for the lower signals\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._lowGain = new Tone.Gain(options.low, Tone.Type.Decibels);\n\t /**\n\t\t\t * The gain for the mid signals\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._midGain = new Tone.Gain(options.mid, Tone.Type.Decibels);\n\t /**\n\t\t\t * The gain in decibels of the high part\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._highGain = new Tone.Gain(options.high, Tone.Type.Decibels);\n\t /**\n\t\t\t * The gain in decibels of the low part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.low = this._lowGain.gain;\n\t /**\n\t\t\t * The gain in decibels of the mid part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.mid = this._midGain.gain;\n\t /**\n\t\t\t * The gain in decibels of the high part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.high = this._highGain.gain;\n\t /**\n\t\t\t * The Q value for all of the filters.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.Q = this._multibandSplit.Q;\n\t /**\n\t\t\t * The low/mid crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.lowFrequency = this._multibandSplit.lowFrequency;\n\t /**\n\t\t\t * The mid/high crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.highFrequency = this._multibandSplit.highFrequency;\n\t //the frequency bands\n\t this._multibandSplit.low.chain(this._lowGain, this.output);\n\t this._multibandSplit.mid.chain(this._midGain, this.output);\n\t this._multibandSplit.high.chain(this._highGain, this.output);\n\t this._readOnly([\n\t 'low',\n\t 'mid',\n\t 'high',\n\t 'lowFrequency',\n\t 'highFrequency'\n\t ]);\n\t };\n\t Tone.extend(Tone.EQ3, Tone.AudioNode);\n\t /**\n\t\t * the default values\n\t\t */\n\t Tone.EQ3.defaults = {\n\t 'low': 0,\n\t 'mid': 0,\n\t 'high': 0,\n\t 'lowFrequency': 400,\n\t 'highFrequency': 2500\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.EQ3} this\n\t\t */\n\t Tone.EQ3.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'low',\n\t 'mid',\n\t 'high',\n\t 'lowFrequency',\n\t 'highFrequency'\n\t ]);\n\t this._multibandSplit.dispose();\n\t this._multibandSplit = null;\n\t this.lowFrequency = null;\n\t this.highFrequency = null;\n\t this._lowGain.dispose();\n\t this._lowGain = null;\n\t this._midGain.dispose();\n\t this._midGain = null;\n\t this._highGain.dispose();\n\t this._highGain = null;\n\t this.low = null;\n\t this.mid = null;\n\t this.high = null;\n\t this.Q = null;\n\t return this;\n\t };\n\t return Tone.EQ3;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Performs a linear scaling on an input signal.\n\t\t * Scales a NormalRange input to between\n\t\t * outputMin and outputMax.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @param {number} [outputMin=0] The output value when the input is 0. \n\t\t * @param {number} [outputMax=1]\tThe output value when the input is 1. \n\t\t * @example\n\t\t * var scale = new Tone.Scale(50, 100);\n\t\t * var signal = new Tone.Signal(0.5).connect(scale);\n\t\t * //the output of scale equals 75\n\t\t */\n\t Tone.Scale = function (outputMin, outputMax) {\n\t Tone.SignalBase.call(this);\n\t /** \n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._outputMin = Tone.defaultArg(outputMin, 0);\n\t /** \n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._outputMax = Tone.defaultArg(outputMax, 1);\n\t /** \n\t\t\t * @private\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._scale = this.input = new Tone.Multiply(1);\n\t /** \n\t\t\t * @private\n\t\t\t * @type {Tone.Add}\n\t\t\t * @private\n\t\t\t */\n\t this._add = this.output = new Tone.Add(0);\n\t this._scale.connect(this._add);\n\t this._setRange();\n\t };\n\t Tone.extend(Tone.Scale, Tone.SignalBase);\n\t /**\n\t\t * The minimum output value. This number is output when \n\t\t * the value input value is 0. \n\t\t * @memberOf Tone.Scale#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.Scale.prototype, 'min', {\n\t get: function () {\n\t return this._outputMin;\n\t },\n\t set: function (min) {\n\t this._outputMin = min;\n\t this._setRange();\n\t }\n\t });\n\t /**\n\t\t * The maximum output value. This number is output when \n\t\t * the value input value is 1. \n\t\t * @memberOf Tone.Scale#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t Object.defineProperty(Tone.Scale.prototype, 'max', {\n\t get: function () {\n\t return this._outputMax;\n\t },\n\t set: function (max) {\n\t this._outputMax = max;\n\t this._setRange();\n\t }\n\t });\n\t /**\n\t\t * set the values\n\t\t * @private\n\t\t */\n\t Tone.Scale.prototype._setRange = function () {\n\t this._add.value = this._outputMin;\n\t this._scale.value = this._outputMax - this._outputMin;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Scale} this\n\t\t */\n\t Tone.Scale.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._add.dispose();\n\t this._add = null;\n\t this._scale.dispose();\n\t this._scale = null;\n\t return this;\n\t };\n\t return Tone.Scale;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Performs an exponential scaling on an input signal.\n\t\t * Scales a NormalRange value [0,1] exponentially\n\t\t * to the output range of outputMin to outputMax.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @param {number} [outputMin=0] The output value when the input is 0.\n\t\t * @param {number} [outputMax=1]\tThe output value when the input is 1.\n\t\t * @param {number} [exponent=2] The exponent which scales the incoming signal.\n\t\t * @example\n\t\t * var scaleExp = new Tone.ScaleExp(0, 100, 2);\n\t\t * var signal = new Tone.Signal(0.5).connect(scaleExp);\n\t\t */\n\t Tone.ScaleExp = function (outputMin, outputMax, exponent) {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * scale the input to the output range\n\t\t\t * @type {Tone.Scale}\n\t\t\t * @private\n\t\t\t */\n\t this._scale = this.output = new Tone.Scale(outputMin, outputMax);\n\t /**\n\t\t\t * @private\n\t\t\t * @type {Tone.Pow}\n\t\t\t * @private\n\t\t\t */\n\t this._exp = this.input = new Tone.Pow(Tone.defaultArg(exponent, 2));\n\t this._exp.connect(this._scale);\n\t };\n\t Tone.extend(Tone.ScaleExp, Tone.SignalBase);\n\t /**\n\t\t * Instead of interpolating linearly between the <code>min</code> and\n\t\t * <code>max</code> values, setting the exponent will interpolate between\n\t\t * the two values with an exponential curve.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t Object.defineProperty(Tone.ScaleExp.prototype, 'exponent', {\n\t get: function () {\n\t return this._exp.value;\n\t },\n\t set: function (exp) {\n\t this._exp.value = exp;\n\t }\n\t });\n\t /**\n\t\t * The minimum output value. This number is output when\n\t\t * the value input value is 0.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.ScaleExp.prototype, 'min', {\n\t get: function () {\n\t return this._scale.min;\n\t },\n\t set: function (min) {\n\t this._scale.min = min;\n\t }\n\t });\n\t /**\n\t\t * The maximum output value. This number is output when\n\t\t * the value input value is 1.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t Object.defineProperty(Tone.ScaleExp.prototype, 'max', {\n\t get: function () {\n\t return this._scale.max;\n\t },\n\t set: function (max) {\n\t this._scale.max = max;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.ScaleExp} this\n\t\t */\n\t Tone.ScaleExp.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._scale.dispose();\n\t this._scale = null;\n\t this._exp.dispose();\n\t this._exp = null;\n\t return this;\n\t };\n\t return Tone.ScaleExp;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Wrapper around Web Audio's native [DelayNode](http://webaudio.github.io/web-audio-api/#the-delaynode-interface).\n\t\t * @extends {Tone}\n\t\t * @param {Time=} delayTime The delay applied to the incoming signal.\n\t\t * @param {Time=} maxDelay The maximum delay time.\n\t\t */\n\t Tone.Delay = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'delayTime',\n\t 'maxDelay'\n\t ], Tone.Delay);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The maximum delay time initialized with the node\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._maxDelay = Math.max(this.toSeconds(options.maxDelay), this.toSeconds(options.delayTime));\n\t /**\n\t\t\t * The native delay node\n\t\t\t * @type {DelayNode}\n\t\t\t * @private\n\t\t\t */\n\t this._delayNode = this.input = this.output = this.context.createDelay(this._maxDelay);\n\t /**\n\t\t\t * The amount of time the incoming signal is\n\t\t\t * delayed.\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = new Tone.Param({\n\t 'param': this._delayNode.delayTime,\n\t 'units': Tone.Type.Time,\n\t 'value': options.delayTime\n\t });\n\t this._readOnly('delayTime');\n\t };\n\t Tone.extend(Tone.Delay, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Delay.defaults = {\n\t 'maxDelay': 1,\n\t 'delayTime': 0\n\t };\n\t /**\n\t\t * The maximum delay time. This cannot be changed. The value is passed into the constructor.\n\t\t * @memberof Tone.Delay#\n\t\t * @type {Time}\n\t\t * @name maxDelay\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Delay.prototype, 'maxDelay', {\n\t get: function () {\n\t return this._maxDelay;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Delay} this\n\t\t */\n\t Tone.Delay.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._delayNode.disconnect();\n\t this._delayNode = null;\n\t this._writable('delayTime');\n\t this.delayTime = null;\n\t return this;\n\t };\n\t return Tone.Delay;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Comb filters are basic building blocks for physical modeling. Read more\n\t\t * about comb filters on [CCRMA's website](https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html).\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Time|Object} [delayTime] The delay time of the filter.\n\t\t * @param {NormalRange=} resonance The amount of feedback the filter has.\n\t\t */\n\t Tone.FeedbackCombFilter = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'delayTime',\n\t 'resonance'\n\t ], Tone.FeedbackCombFilter);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the delay node\n\t\t\t * @type {DelayNode}\n\t\t\t * @private\n\t\t\t */\n\t this._delay = this.input = this.output = new Tone.Delay(options.delayTime);\n\t /**\n\t\t\t * The amount of delay of the comb filter.\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = this._delay.delayTime;\n\t /**\n\t\t\t * the feedback node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\t /**\n\t\t\t * The amount of feedback of the delayed signal.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.resonance = this._feedback.gain;\n\t this._delay.chain(this._feedback, this._delay);\n\t this._readOnly([\n\t 'resonance',\n\t 'delayTime'\n\t ]);\n\t };\n\t Tone.extend(Tone.FeedbackCombFilter, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.FeedbackCombFilter.defaults = {\n\t 'delayTime': 0.1,\n\t 'resonance': 0.5\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.FeedbackCombFilter} this\n\t\t */\n\t Tone.FeedbackCombFilter.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'resonance',\n\t 'delayTime'\n\t ]);\n\t this._delay.dispose();\n\t this._delay = null;\n\t this.delayTime = null;\n\t this._feedback.dispose();\n\t this._feedback = null;\n\t this.resonance = null;\n\t return this;\n\t };\n\t return Tone.FeedbackCombFilter;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Get the current waveform data of the connected audio source.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Number=} size The size of the FFT. Value must be a power of\n\t\t * two in the range 32 to 32768.\n\t\t */\n\t Tone.FFT = function () {\n\t var options = Tone.defaults(arguments, ['size'], Tone.FFT);\n\t options.type = Tone.Analyser.Type.FFT;\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The analyser node.\n\t\t\t * @private\n\t\t\t * @type {Tone.Analyser}\n\t\t\t */\n\t this._analyser = this.input = this.output = new Tone.Analyser(options);\n\t };\n\t Tone.extend(Tone.FFT, Tone.AudioNode);\n\t /**\n\t\t * The default values.\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.FFT.defaults = { 'size': 1024 };\n\t /**\n\t\t * Gets the waveform of the audio source. Returns the waveform data\n\t\t * of length [size](#size) as a Float32Array with values between -1 and 1.\n\t\t * @returns {TypedArray}\n\t\t */\n\t Tone.FFT.prototype.getValue = function () {\n\t return this._analyser.getValue();\n\t };\n\t /**\n\t\t * The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t * @memberOf Tone.FFT#\n\t\t * @type {Number}\n\t\t * @name size\n\t\t */\n\t Object.defineProperty(Tone.FFT.prototype, 'size', {\n\t get: function () {\n\t return this._analyser.size;\n\t },\n\t set: function (size) {\n\t this._analyser.size = size;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.FFT} this\n\t\t */\n\t Tone.FFT.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._analyser.dispose();\n\t this._analyser = null;\n\t };\n\t return Tone.FFT;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Return the absolute value of an incoming signal.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @example\n\t\t * var signal = new Tone.Signal(-1);\n\t\t * var abs = new Tone.Abs();\n\t\t * signal.connect(abs);\n\t\t * //the output of abs is 1.\n\t\t */\n\t Tone.Abs = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * @type {Tone.LessThan}\n\t\t\t * @private\n\t\t\t */\n\t this._abs = this.input = this.output = new Tone.WaveShaper(function (val) {\n\t if (Math.abs(val) < 0.001) {\n\t return 0;\n\t } else {\n\t return Math.abs(val);\n\t }\n\t }, 1024);\n\t };\n\t Tone.extend(Tone.Abs, Tone.SignalBase);\n\t /**\n\t\t * dispose method\n\t\t * @returns {Tone.Abs} this\n\t\t */\n\t Tone.Abs.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._abs.dispose();\n\t this._abs = null;\n\t return this;\n\t };\n\t return Tone.Abs;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Follower is a crude envelope follower which will follow\n\t\t * the amplitude of an incoming signal.\n\t\t * Take care with small (< 0.02) attack or decay values\n\t\t * as follower has some ripple which is exaggerated\n\t\t * at these values. Read more about envelope followers (also known\n\t\t * as envelope detectors) on [Wikipedia](https://en.wikipedia.org/wiki/Envelope_detector).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Time|Object} [attack] The rate at which the follower rises.\n\t\t * @param {Time=} release The rate at which the folower falls.\n\t\t * @example\n\t\t * var follower = new Tone.Follower(0.2, 0.4);\n\t\t */\n\t Tone.Follower = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'attack',\n\t 'release'\n\t ], Tone.Follower);\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * @type {Tone.Abs}\n\t\t\t * @private\n\t\t\t */\n\t this._abs = new Tone.Abs();\n\t /**\n\t\t\t * the lowpass filter which smooths the input\n\t\t\t * @type {BiquadFilterNode}\n\t\t\t * @private\n\t\t\t */\n\t this._filter = this.context.createBiquadFilter();\n\t this._filter.type = 'lowpass';\n\t this._filter.frequency.value = 0;\n\t this._filter.Q.value = -100;\n\t /**\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._frequencyValues = new Tone.WaveShaper();\n\t /**\n\t\t\t * @type {Tone.Subtract}\n\t\t\t * @private\n\t\t\t */\n\t this._sub = new Tone.Subtract();\n\t /**\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._delay = new Tone.Delay(this.blockTime);\n\t /**\n\t\t\t * this keeps it far from 0, even for very small differences\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._mult = new Tone.Multiply(10000);\n\t /**\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._attack = options.attack;\n\t /**\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._release = options.release;\n\t //the smoothed signal to get the values\n\t this.input.chain(this._abs, this._filter, this.output);\n\t //the difference path\n\t this._abs.connect(this._sub, 0, 1);\n\t this._filter.chain(this._delay, this._sub);\n\t //threshold the difference and use the thresh to set the frequency\n\t this._sub.chain(this._mult, this._frequencyValues, this._filter.frequency);\n\t //set the attack and release values in the table\n\t this._setAttackRelease(this._attack, this._release);\n\t };\n\t Tone.extend(Tone.Follower, Tone.AudioNode);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Follower.defaults = {\n\t 'attack': 0.05,\n\t 'release': 0.5\n\t };\n\t /**\n\t\t * sets the attack and release times in the wave shaper\n\t\t * @param {Time} attack\n\t\t * @param {Time} release\n\t\t * @private\n\t\t */\n\t Tone.Follower.prototype._setAttackRelease = function (attack, release) {\n\t var minTime = this.blockTime;\n\t attack = Tone.Time(attack).toFrequency();\n\t release = Tone.Time(release).toFrequency();\n\t attack = Math.max(attack, minTime);\n\t release = Math.max(release, minTime);\n\t this._frequencyValues.setMap(function (val) {\n\t if (val <= 0) {\n\t return attack;\n\t } else {\n\t return release;\n\t }\n\t });\n\t };\n\t /**\n\t\t * The attack time.\n\t\t * @memberOf Tone.Follower#\n\t\t * @type {Time}\n\t\t * @name attack\n\t\t */\n\t Object.defineProperty(Tone.Follower.prototype, 'attack', {\n\t get: function () {\n\t return this._attack;\n\t },\n\t set: function (attack) {\n\t this._attack = attack;\n\t this._setAttackRelease(this._attack, this._release);\n\t }\n\t });\n\t /**\n\t\t * The release time.\n\t\t * @memberOf Tone.Follower#\n\t\t * @type {Time}\n\t\t * @name release\n\t\t */\n\t Object.defineProperty(Tone.Follower.prototype, 'release', {\n\t get: function () {\n\t return this._release;\n\t },\n\t set: function (release) {\n\t this._release = release;\n\t this._setAttackRelease(this._attack, this._release);\n\t }\n\t });\n\t /**\n\t\t * Borrows the connect method from Signal so that the output can be used\n\t\t * as a Tone.Signal control signal.\n\t\t * @function\n\t\t */\n\t Tone.Follower.prototype.connect = Tone.SignalBase.prototype.connect;\n\t /**\n\t\t * dispose\n\t\t * @returns {Tone.Follower} this\n\t\t */\n\t Tone.Follower.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._filter.disconnect();\n\t this._filter = null;\n\t this._frequencyValues.disconnect();\n\t this._frequencyValues = null;\n\t this._delay.dispose();\n\t this._delay = null;\n\t this._sub.disconnect();\n\t this._sub = null;\n\t this._abs.dispose();\n\t this._abs = null;\n\t this._mult.dispose();\n\t this._mult = null;\n\t this._curve = null;\n\t return this;\n\t };\n\t return Tone.Follower;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.ScaledEnvelop is an envelope which can be scaled\n\t\t * to any range. It's useful for applying an envelope\n\t\t * to a frequency or any other non-NormalRange signal\n\t\t * parameter.\n\t\t *\n\t\t * @extends {Tone.Envelope}\n\t\t * @constructor\n\t\t * @param {Time|Object} [attack]\tthe attack time in seconds\n\t\t * @param {Time} [decay]\tthe decay time in seconds\n\t\t * @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n\t\t * @param {Time} [release]\tthe release time in seconds\n\t\t * @example\n\t\t * var scaledEnv = new Tone.ScaledEnvelope({\n\t\t * \t\"attack\" : 0.2,\n\t\t * \t\"min\" : 200,\n\t\t * \t\"max\" : 2000\n\t\t * });\n\t\t * scaledEnv.connect(oscillator.frequency);\n\t\t */\n\t Tone.ScaledEnvelope = function () {\n\t //get all of the defaults\n\t var options = Tone.defaults(arguments, [\n\t 'attack',\n\t 'decay',\n\t 'sustain',\n\t 'release'\n\t ], Tone.Envelope);\n\t Tone.Envelope.call(this, options);\n\t options = Tone.defaultArg(options, Tone.ScaledEnvelope.defaults);\n\t /**\n\t\t\t * scale the incoming signal by an exponent\n\t\t\t * @type {Tone.Pow}\n\t\t\t * @private\n\t\t\t */\n\t this._exp = this.output = new Tone.Pow(options.exponent);\n\t /**\n\t\t\t * scale the signal to the desired range\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._scale = this.output = new Tone.Scale(options.min, options.max);\n\t this._sig.chain(this._exp, this._scale);\n\t };\n\t Tone.extend(Tone.ScaledEnvelope, Tone.Envelope);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t */\n\t Tone.ScaledEnvelope.defaults = {\n\t 'min': 0,\n\t 'max': 1,\n\t 'exponent': 1\n\t };\n\t /**\n\t\t * The envelope's min output value. This is the value which it\n\t\t * starts at.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.ScaledEnvelope.prototype, 'min', {\n\t get: function () {\n\t return this._scale.min;\n\t },\n\t set: function (min) {\n\t this._scale.min = min;\n\t }\n\t });\n\t /**\n\t\t * The envelope's max output value. In other words, the value\n\t\t * at the peak of the attack portion of the envelope.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t Object.defineProperty(Tone.ScaledEnvelope.prototype, 'max', {\n\t get: function () {\n\t return this._scale.max;\n\t },\n\t set: function (max) {\n\t this._scale.max = max;\n\t }\n\t });\n\t /**\n\t\t * The envelope's exponent value.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t Object.defineProperty(Tone.ScaledEnvelope.prototype, 'exponent', {\n\t get: function () {\n\t return this._exp.value;\n\t },\n\t set: function (exp) {\n\t this._exp.value = exp;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.ScaledEnvelope} this\n\t\t */\n\t Tone.ScaledEnvelope.prototype.dispose = function () {\n\t Tone.Envelope.prototype.dispose.call(this);\n\t this._scale.dispose();\n\t this._scale = null;\n\t this._exp.dispose();\n\t this._exp = null;\n\t return this;\n\t };\n\t return Tone.ScaledEnvelope;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.FrequencyEnvelope is a Tone.ScaledEnvelope, but instead of `min` and `max`\n\t\t * it's got a `baseFrequency` and `octaves` parameter.\n\t\t *\n\t\t * @extends {Tone.Envelope}\n\t\t * @constructor\n\t\t * @param {Time|Object} [attack]\tthe attack time in seconds\n\t\t * @param {Time} [decay]\tthe decay time in seconds\n\t\t * @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n\t\t * @param {Time} [release]\tthe release time in seconds\n\t\t * @example\n\t\t * var env = new Tone.FrequencyEnvelope({\n\t\t * \t\"attack\" : 0.2,\n\t\t * \t\"baseFrequency\" : \"C2\",\n\t\t * \t\"octaves\" : 4\n\t\t * });\n\t\t * scaledEnv.connect(oscillator.frequency);\n\t\t */\n\t Tone.FrequencyEnvelope = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'attack',\n\t 'decay',\n\t 'sustain',\n\t 'release'\n\t ], Tone.Envelope);\n\t Tone.ScaledEnvelope.call(this, options);\n\t //merge it with the frequency envelope defaults\n\t options = Tone.defaultArg(options, Tone.FrequencyEnvelope.defaults);\n\t /**\n\t\t\t * Stores the octave value\n\t\t\t * @type {Positive}\n\t\t\t * @private\n\t\t\t */\n\t this._octaves = options.octaves;\n\t //setup\n\t this.baseFrequency = options.baseFrequency;\n\t this.octaves = options.octaves;\n\t };\n\t Tone.extend(Tone.FrequencyEnvelope, Tone.Envelope);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t */\n\t Tone.FrequencyEnvelope.defaults = {\n\t 'baseFrequency': 200,\n\t 'octaves': 4,\n\t 'exponent': 2\n\t };\n\t /**\n\t\t * The envelope's mininum output value. This is the value which it\n\t\t * starts at.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {Frequency}\n\t\t * @name baseFrequency\n\t\t */\n\t Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'baseFrequency', {\n\t get: function () {\n\t return this._scale.min;\n\t },\n\t set: function (min) {\n\t this._scale.min = this.toFrequency(min);\n\t //also update the octaves\n\t this.octaves = this._octaves;\n\t }\n\t });\n\t /**\n\t\t * The number of octaves above the baseFrequency that the\n\t\t * envelope will scale to.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'octaves', {\n\t get: function () {\n\t return this._octaves;\n\t },\n\t set: function (octaves) {\n\t this._octaves = octaves;\n\t this._scale.max = this.baseFrequency * Math.pow(2, octaves);\n\t }\n\t });\n\t /**\n\t\t * The envelope's exponent value.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'exponent', {\n\t get: function () {\n\t return this._exp.value;\n\t },\n\t set: function (exp) {\n\t this._exp.value = exp;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.FrequencyEnvelope} this\n\t\t */\n\t Tone.FrequencyEnvelope.prototype.dispose = function () {\n\t Tone.ScaledEnvelope.prototype.dispose.call(this);\n\t return this;\n\t };\n\t return Tone.FrequencyEnvelope;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class GreaterThanZero outputs 1 when the input is strictly greater than zero\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @example\n\t\t * var gt0 = new Tone.GreaterThanZero();\n\t\t * var sig = new Tone.Signal(0.01).connect(gt0);\n\t\t * //the output of gt0 is 1.\n\t\t * sig.value = 0;\n\t\t * //the output of gt0 is 0.\n\t\t */\n\t Tone.GreaterThanZero = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * @type {Tone.WaveShaper}\n\t\t\t * @private\n\t\t\t */\n\t this._thresh = this.output = new Tone.WaveShaper(function (val) {\n\t if (val <= 0) {\n\t return 0;\n\t } else {\n\t return 1;\n\t }\n\t }, 127);\n\t /**\n\t\t\t * scale the first thresholded signal by a large value.\n\t\t\t * this will help with values which are very close to 0\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._scale = this.input = new Tone.Multiply(10000);\n\t //connections\n\t this._scale.connect(this._thresh);\n\t };\n\t Tone.extend(Tone.GreaterThanZero, Tone.SignalBase);\n\t /**\n\t\t * dispose method\n\t\t * @returns {Tone.GreaterThanZero} this\n\t\t */\n\t Tone.GreaterThanZero.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._scale.dispose();\n\t this._scale = null;\n\t this._thresh.dispose();\n\t this._thresh = null;\n\t return this;\n\t };\n\t return Tone.GreaterThanZero;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Output 1 if the signal is greater than the value, otherwise outputs 0.\n\t\t * can compare two signals or a signal and a number.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Signal}\n\t\t * @param {number} [value=0] the value to compare to the incoming signal\n\t\t * @example\n\t\t * var gt = new Tone.GreaterThan(2);\n\t\t * var sig = new Tone.Signal(4).connect(gt);\n\t\t * //output of gt is equal 1.\n\t\t */\n\t Tone.GreaterThan = function (value) {\n\t Tone.Signal.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * subtract the amount from the incoming signal\n\t\t\t * @type {Tone.Subtract}\n\t\t\t * @private\n\t\t\t */\n\t this._param = this.input[0] = new Tone.Subtract(value);\n\t this.input[1] = this._param.input[1];\n\t /**\n\t\t\t * compare that amount to zero\n\t\t\t * @type {Tone.GreaterThanZero}\n\t\t\t * @private\n\t\t\t */\n\t this._gtz = this.output = new Tone.GreaterThanZero();\n\t //connect\n\t this._param.connect(this._gtz);\n\t };\n\t Tone.extend(Tone.GreaterThan, Tone.Signal);\n\t /**\n\t\t * dispose method\n\t\t * @returns {Tone.GreaterThan} this\n\t\t */\n\t Tone.GreaterThan.prototype.dispose = function () {\n\t Tone.Signal.prototype.dispose.call(this);\n\t this._gtz.dispose();\n\t this._gtz = null;\n\t return this;\n\t };\n\t return Tone.GreaterThan;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Gate only passes a signal through when the incoming\n\t\t * signal exceeds a specified threshold. To do this, Gate uses\n\t\t * a Tone.Follower to follow the amplitude of the incoming signal.\n\t\t * A common implementation of this class is a [Noise Gate](https://en.wikipedia.org/wiki/Noise_gate).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Decibels|Object} [threshold] The threshold above which the gate will open.\n\t\t * @param {Time=} attack The follower's attack time\n\t\t * @param {Time=} release The follower's release time\n\t\t * @example\n\t\t * var gate = new Tone.Gate(-30, 0.2, 0.3).toMaster();\n\t\t * var mic = new Tone.UserMedia().connect(gate);\n\t\t * //the gate will only pass through the incoming\n\t\t * //signal when it's louder than -30db\n\t\t */\n\t Tone.Gate = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'threshold',\n\t 'attack',\n\t 'release'\n\t ], Tone.Gate);\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * @type {Tone.Follower}\n\t\t\t * @private\n\t\t\t */\n\t this._follower = new Tone.Follower(options.attack, options.release);\n\t /**\n\t\t\t * @type {Tone.GreaterThan}\n\t\t\t * @private\n\t\t\t */\n\t this._gt = new Tone.GreaterThan(Tone.dbToGain(options.threshold));\n\t //the connections\n\t this.input.connect(this.output);\n\t //the control signal\n\t this.input.chain(this._gt, this._follower, this.output.gain);\n\t };\n\t Tone.extend(Tone.Gate, Tone.AudioNode);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Gate.defaults = {\n\t 'attack': 0.1,\n\t 'release': 0.1,\n\t 'threshold': -40\n\t };\n\t /**\n\t\t * The threshold of the gate in decibels\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Decibels}\n\t\t * @name threshold\n\t\t */\n\t Object.defineProperty(Tone.Gate.prototype, 'threshold', {\n\t get: function () {\n\t return Tone.gainToDb(this._gt.value);\n\t },\n\t set: function (thresh) {\n\t this._gt.value = Tone.dbToGain(thresh);\n\t }\n\t });\n\t /**\n\t\t * The attack speed of the gate\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Time}\n\t\t * @name attack\n\t\t */\n\t Object.defineProperty(Tone.Gate.prototype, 'attack', {\n\t get: function () {\n\t return this._follower.attack;\n\t },\n\t set: function (attackTime) {\n\t this._follower.attack = attackTime;\n\t }\n\t });\n\t /**\n\t\t * The release speed of the gate\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Time}\n\t\t * @name release\n\t\t */\n\t Object.defineProperty(Tone.Gate.prototype, 'release', {\n\t get: function () {\n\t return this._follower.release;\n\t },\n\t set: function (releaseTime) {\n\t this._follower.release = releaseTime;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Gate} this\n\t\t */\n\t Tone.Gate.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._follower.dispose();\n\t this._gt.dispose();\n\t this._follower = null;\n\t this._gt = null;\n\t return this;\n\t };\n\t return Tone.Gate;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TickSignal extends Tone.Signal, but adds the capability\n\t\t * to calculate the number of elapsed ticks. exponential and target curves\n\t\t * are approximated with multiple linear ramps.\n\t\t *\n\t\t * Thank you Bruno Dias, H. Sofia Pinto, and David M. Matos, for your [WAC paper](https://smartech.gatech.edu/bitstream/handle/1853/54588/WAC2016-49.pdf)\n\t\t * describing integrating timing functions for tempo calculations.\n\t\t *\n\t\t * @param {Number} value The initial value of the signal\n\t\t * @extends {Tone.Signal}\n\t\t */\n\t Tone.TickSignal = function (value) {\n\t value = Tone.defaultArg(value, 1);\n\t Tone.Signal.call(this, {\n\t 'units': Tone.Type.Ticks,\n\t 'value': value\n\t });\n\t //extend the memory\n\t this._events.memory = Infinity;\n\t //clear the clock from the beginning\n\t this.cancelScheduledValues(0);\n\t //set an initial event\n\t this._events.add({\n\t 'type': Tone.Param.AutomationType.SetValue,\n\t 'time': 0,\n\t 'value': value\n\t });\n\t };\n\t Tone.extend(Tone.TickSignal, Tone.Signal);\n\t /**\n\t\t * If scheduling past events should create a warning notification\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t Tone.TickSignal.prototype._ignorePast = true;\n\t /**\n\t\t * Wraps Tone.Signal methods so that they also\n\t\t * record the ticks.\n\t\t * @param {Function} method\n\t\t * @return {Function}\n\t\t * @private\n\t\t */\n\t function _wrapScheduleMethods(method) {\n\t return function (value, time) {\n\t time = this.toSeconds(time);\n\t method.apply(this, arguments);\n\t var event = this._events.get(time);\n\t var previousEvent = this._events.previousEvent(event);\n\t var ticksUntilTime = this._getTicksUntilEvent(previousEvent, time - this.sampleTime);\n\t event.ticks = Math.max(ticksUntilTime, 0);\n\t return this;\n\t };\n\t }\n\t Tone.TickSignal.prototype.setValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.setValueAtTime);\n\t Tone.TickSignal.prototype.linearRampToValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.linearRampToValueAtTime);\n\t /**\n\t\t * Start exponentially approaching the target value at the given time with\n\t\t * a rate having the given time constant.\n\t\t * @param {number} value\n\t\t * @param {Time} startTime\n\t\t * @param {number} timeConstant\n\t\t * @returns {Tone.TickSignal} this\n\t\t */\n\t Tone.TickSignal.prototype.setTargetAtTime = function (value, time, constant) {\n\t //aproximate it with multiple linear ramps\n\t time = this.toSeconds(time);\n\t this.setRampPoint(time);\n\t value = this._fromUnits(value);\n\t //start from previously scheduled value\n\t var prevEvent = this._events.get(time);\n\t var segments = Math.round(Math.max(1 / constant, 1));\n\t for (var i = 0; i <= segments; i++) {\n\t var segTime = constant * i + time;\n\t var rampVal = this._exponentialApproach(prevEvent.time, prevEvent.value, value, constant, segTime);\n\t this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Schedules an exponential continuous change in parameter value from\n\t\t * the previous scheduled parameter value to the given value.\n\t\t * @param {number} value\n\t\t * @param {Time} endTime\n\t\t * @returns {Tone.TickSignal} this\n\t\t */\n\t Tone.TickSignal.prototype.exponentialRampToValueAtTime = function (value, time) {\n\t //aproximate it with multiple linear ramps\n\t time = this.toSeconds(time);\n\t value = this._fromUnits(value);\n\t //start from previously scheduled value\n\t var prevEvent = this._events.get(time);\n\t if (prevEvent === null) {\n\t prevEvent = {\n\t 'value': this._initialValue,\n\t 'time': 0\n\t };\n\t }\n\t //approx 10 segments per second\n\t var segments = Math.round(Math.max((time - prevEvent.time) * 10, 1));\n\t var segmentDur = (time - prevEvent.time) / segments;\n\t for (var i = 0; i <= segments; i++) {\n\t var segTime = segmentDur * i + prevEvent.time;\n\t var rampVal = this._exponentialInterpolate(prevEvent.time, prevEvent.value, time, value, segTime);\n\t this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Returns the tick value at the time. Takes into account\n\t\t * any automation curves scheduled on the signal.\n\t\t * @private\n\t\t * @param {Time} time The time to get the tick count at\n\t\t * @return {Ticks} The number of ticks which have elapsed at the time\n\t\t * given any automations.\n\t\t */\n\t Tone.TickSignal.prototype._getTicksUntilEvent = function (event, time) {\n\t if (event === null) {\n\t event = {\n\t 'ticks': 0,\n\t 'time': 0\n\t };\n\t } else if (Tone.isUndef(event.ticks)) {\n\t var previousEvent = this._events.previousEvent(event);\n\t event.ticks = this._getTicksUntilEvent(previousEvent, event.time - this.sampleTime);\n\t }\n\t var val0 = this.getValueAtTime(event.time);\n\t var val1 = this.getValueAtTime(time);\n\t return 0.5 * (time - event.time) * (val0 + val1) + event.ticks;\n\t };\n\t /**\n\t\t * Returns the tick value at the time. Takes into account\n\t\t * any automation curves scheduled on the signal.\n\t\t * @param {Time} time The time to get the tick count at\n\t\t * @return {Ticks} The number of ticks which have elapsed at the time\n\t\t * given any automations.\n\t\t */\n\t Tone.TickSignal.prototype.getTicksAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t var event = this._events.get(time);\n\t return this._getTicksUntilEvent(event, time);\n\t };\n\t /**\n\t\t * Return the elapsed time of the number of ticks from the given time\n\t\t * @param {Ticks} ticks The number of ticks to calculate\n\t\t * @param {Time} time The time to get the next tick from\n\t\t * @return {Seconds} The duration of the number of ticks from the given time in seconds\n\t\t */\n\t Tone.TickSignal.prototype.getDurationOfTicks = function (ticks, time) {\n\t time = this.toSeconds(time);\n\t var currentTick = this.getTicksAtTime(time);\n\t return this.getTimeOfTick(currentTick + ticks) - time;\n\t };\n\t /**\n\t\t * Given a tick, returns the time that tick occurs at.\n\t\t * @param {Ticks} tick\n\t\t * @return {Time} The time that the tick occurs.\n\t\t */\n\t Tone.TickSignal.prototype.getTimeOfTick = function (tick) {\n\t var before = this._events.get(tick, 'ticks');\n\t var after = this._events.getAfter(tick, 'ticks');\n\t if (before && before.ticks === tick) {\n\t return before.time;\n\t } else if (before && after && after.type === Tone.Param.AutomationType.Linear && before.value !== after.value) {\n\t var val0 = this.getValueAtTime(before.time);\n\t var val1 = this.getValueAtTime(after.time);\n\t var delta = (val1 - val0) / (after.time - before.time);\n\t var k = Math.sqrt(Math.pow(val0, 2) - 2 * delta * (before.ticks - tick));\n\t var sol1 = (-val0 + k) / delta;\n\t var sol2 = (-val0 - k) / delta;\n\t return (sol1 > 0 ? sol1 : sol2) + before.time;\n\t } else if (before) {\n\t if (before.value === 0) {\n\t return Infinity;\n\t } else {\n\t return before.time + (tick - before.ticks) / before.value;\n\t }\n\t } else {\n\t return tick / this._initialValue;\n\t }\n\t };\n\t /**\n\t\t * Convert some number of ticks their the duration in seconds accounting\n\t\t * for any automation curves starting at the given time.\n\t\t * @param {Ticks} ticks The number of ticks to convert to seconds.\n\t\t * @param {Time} [when=now] When along the automation timeline to convert the ticks.\n\t\t * @return {Tone.Time} The duration in seconds of the ticks.\n\t\t */\n\t Tone.TickSignal.prototype.ticksToTime = function (ticks, when) {\n\t when = this.toSeconds(when);\n\t return new Tone.Time(this.getDurationOfTicks(ticks, when));\n\t };\n\t /**\n\t\t * The inverse of [ticksToTime](#tickstotime). Convert a duration in\n\t\t * seconds to the corresponding number of ticks accounting for any\n\t\t * automation curves starting at the given time.\n\t\t * @param {Time} duration The time interval to convert to ticks.\n\t\t * @param {Time} [when=now] When along the automation timeline to convert the ticks.\n\t\t * @return {Tone.Ticks} The duration in ticks.\n\t\t */\n\t Tone.TickSignal.prototype.timeToTicks = function (duration, when) {\n\t when = this.toSeconds(when);\n\t duration = this.toSeconds(duration);\n\t var startTicks = this.getTicksAtTime(when);\n\t var endTicks = this.getTicksAtTime(when + duration);\n\t return new Tone.Ticks(endTicks - startTicks);\n\t };\n\t return Tone.TickSignal;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A Timeline State. Provides the methods: <code>setStateAtTime(\"state\", time)</code>\n\t\t * and <code>getValueAtTime(time)</code>.\n\t\t *\n\t\t * @extends {Tone.Timeline}\n\t\t * @param {String} initial The initial state of the TimelineState. \n\t\t * Defaults to <code>undefined</code>\n\t\t */\n\t Tone.TimelineState = function (initial) {\n\t Tone.Timeline.call(this);\n\t /**\n\t\t\t * The initial state\n\t\t\t * @private\n\t\t\t * @type {String}\n\t\t\t */\n\t this._initial = initial;\n\t };\n\t Tone.extend(Tone.TimelineState, Tone.Timeline);\n\t /**\n\t\t * Returns the scheduled state scheduled before or at\n\t\t * the given time.\n\t\t * @param {Number} time The time to query.\n\t\t * @return {String} The name of the state input in setStateAtTime.\n\t\t */\n\t Tone.TimelineState.prototype.getValueAtTime = function (time) {\n\t var event = this.get(time);\n\t if (event !== null) {\n\t return event.state;\n\t } else {\n\t return this._initial;\n\t }\n\t };\n\t /**\n\t\t * Add a state to the timeline.\n\t\t * @param {String} state The name of the state to set.\n\t\t * @param {Number} time The time to query.\n\t\t * @returns {Tone.TimelineState} this\n\t\t */\n\t Tone.TimelineState.prototype.setStateAtTime = function (state, time) {\n\t this.add({\n\t 'state': state,\n\t 'time': time\n\t });\n\t return this;\n\t };\n\t return Tone.TimelineState;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A sample accurate clock which provides a callback at the given rate.\n\t\t * While the callback is not sample-accurate (it is still susceptible to\n\t\t * loose JS timing), the time passed in as the argument to the callback\n\t\t * is precise. For most applications, it is better to use Tone.Transport\n\t\t * instead of the Clock by itself since you can synchronize multiple callbacks.\n\t\t *\n\t\t * \t@constructor\n\t\t * @extends {Tone.Emitter}\n\t\t * \t@param {function} callback The callback to be invoked with the time of the audio event\n\t\t * \t@param {Frequency} frequency The rate of the callback\n\t\t * \t@example\n\t\t * //the callback will be invoked approximately once a second\n\t\t * //and will print the time exactly once a second apart.\n\t\t * var clock = new Tone.Clock(function(time){\n\t\t * \tconsole.log(time);\n\t\t * }, 1);\n\t\t */\n\t Tone.Clock = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'frequency'\n\t ], Tone.Clock);\n\t Tone.Emitter.call(this);\n\t /**\n\t\t\t * The callback function to invoke at the scheduled tick.\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.callback = options.callback;\n\t /**\n\t\t\t * The next time the callback is scheduled.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._nextTick = 0;\n\t /**\n\t\t\t * The last state of the clock.\n\t\t\t * @type {State}\n\t\t\t * @private\n\t\t\t */\n\t this._lastState = Tone.State.Stopped;\n\t /**\n\t\t\t * The rate the callback function should be invoked.\n\t\t\t * @type {BPM}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.TickSignal(options.frequency, Tone.Type.Frequency);\n\t this._readOnly('frequency');\n\t /**\n\t\t\t * The number of times the callback was invoked. Starts counting at 0\n\t\t\t * and increments after the callback was invoked.\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this._ticks = 0;\n\t /**\n\t\t\t * The state timeline\n\t\t\t * @type {Tone.TimelineState}\n\t\t\t * @private\n\t\t\t */\n\t this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t /**\n\t\t\t * The offset values of the ticks\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t this._tickOffset = new Tone.Timeline();\n\t //add the first event\n\t this._tickOffset.add({\n\t 'time': 0,\n\t 'ticks': 0\n\t });\n\t /**\n\t\t\t * The loop function bound to its context.\n\t\t\t * This is necessary to remove the event in the end.\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._boundLoop = this._loop.bind(this);\n\t //bind a callback to the worker thread\n\t this.context.on('tick', this._boundLoop);\n\t };\n\t Tone.extend(Tone.Clock, Tone.Emitter);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Clock.defaults = {\n\t 'callback': Tone.noOp,\n\t 'frequency': 1\n\t };\n\t /**\n\t\t * Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.Clock#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.Clock.prototype, 'state', {\n\t get: function () {\n\t return this._state.getValueAtTime(this.now());\n\t }\n\t });\n\t /**\n\t\t * Start the clock at the given time. Optionally pass in an offset\n\t\t * of where to start the tick counter from.\n\t\t * @param {Time=} time The time the clock should start\n\t\t * @param {Ticks=} offset Where the tick counter starts counting from.\n\t\t * @return {Tone.Clock} this\n\t\t */\n\t Tone.Clock.prototype.start = function (time, offset) {\n\t time = this.toSeconds(time);\n\t if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t var ticksAtTime = Math.floor(this.getTicksAtTime(time));\n\t offset = Tone.defaultArg(offset, ticksAtTime);\n\t this._state.setStateAtTime(Tone.State.Started, time);\n\t this._state.get(time).offset = offset;\n\t this.setTicksAtTime(offset, time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop the clock. Stopping the clock resets the tick counter to 0.\n\t\t * @param {Time} [time=now] The time when the clock should stop.\n\t\t * @returns {Tone.Clock} this\n\t\t * @example\n\t\t * clock.stop();\n\t\t */\n\t Tone.Clock.prototype.stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._state.cancel(time);\n\t this._state.setStateAtTime(Tone.State.Stopped, time);\n\t this.setTicksAtTime(0, time);\n\t return this;\n\t };\n\t /**\n\t\t * Pause the clock. Pausing does not reset the tick counter.\n\t\t * @param {Time} [time=now] The time when the clock should stop.\n\t\t * @returns {Tone.Clock} this\n\t\t */\n\t Tone.Clock.prototype.pause = function (time) {\n\t time = this.toSeconds(time);\n\t if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t var pausedTicks = this.getTicksAtTime(time);\n\t this.setTicksAtTime(pausedTicks, time);\n\t this._state.setStateAtTime(Tone.State.Paused, time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * The number of times the callback was invoked. Starts counting at 0\n\t\t * and increments after the callback was invoked.\n\t\t * @type {Ticks}\n\t\t */\n\t Object.defineProperty(Tone.Clock.prototype, 'ticks', {\n\t get: function () {\n\t return this._ticks;\n\t },\n\t set: function (t) {\n\t this._ticks = t;\n\t this.setTicksAtTime(t, this.now());\n\t }\n\t });\n\t /**\n\t\t * The time since ticks=0 that the Clock has been running. Accounts\n\t\t * for tempo curves\n\t\t * @type {Seconds}\n\t\t */\n\t Object.defineProperty(Tone.Clock.prototype, 'seconds', {\n\t get: function () {\n\t var time = this.now();\n\t var ticks = this.getTicksAtTime(time);\n\t var totalTicks = this.frequency.getTicksAtTime(time);\n\t if (totalTicks - ticks > 0) {\n\t var tickTime = this.frequency.getTimeOfTick(totalTicks - ticks);\n\t return this.frequency.ticksToTime(ticks, tickTime).toSeconds();\n\t } else {\n\t return this.frequency.ticksToTime(ticks, time).toSeconds();\n\t }\n\t },\n\t set: function (s) {\n\t var now = this.now();\n\t var ticks = this.frequency.timeToTicks(s, now - s);\n\t this.setTicksAtTime(ticks, now);\n\t }\n\t });\n\t /**\n\t\t * Get the elapsed ticks at the given time\n\t\t * @param {Time} time When to get the ticks\n\t\t * @return {Ticks} The elapsed ticks at the given time.\n\t\t */\n\t Tone.Clock.prototype.getTicksAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t var tickEvent = this._tickOffset.get(time);\n\t var offset = tickEvent.ticks;\n\t var elapsedTicks = this.frequency.getTicksAtTime(time) - tickEvent.position;\n\t if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t return offset;\n\t } else {\n\t return elapsedTicks + offset;\n\t }\n\t };\n\t /**\n\t\t * Set the clock's ticks at the given time.\n\t\t * @param {Ticks} ticks The tick value to set\n\t\t * @param {Time} time When to set the tick value\n\t\t * @return {Tone.Clock} this\n\t\t */\n\t Tone.Clock.prototype.setTicksAtTime = function (ticks, time) {\n\t time = this.toSeconds(time);\n\t this._ticks = ticks;\n\t this._tickOffset.cancel(time);\n\t this._tickOffset.add({\n\t 'time': time,\n\t 'ticks': ticks,\n\t 'position': this.frequency.getTicksAtTime(time)\n\t });\n\t return this;\n\t };\n\t /**\n\t\t * The scheduling loop.\n\t\t * @private\n\t\t */\n\t Tone.Clock.prototype._loop = function () {\n\t //the end of the update interval\n\t var endTime = this.now() + this.context.updateInterval;\n\t //the current event at the time of the loop\n\t var event = this._state.get(endTime);\n\t if (event) {\n\t //state change events\n\t if (event.state !== this._lastState) {\n\t this._lastState = event.state;\n\t switch (event.state) {\n\t case Tone.State.Started:\n\t this._ticks = event.offset;\n\t this._nextTick = event.time;\n\t this.emit('start', event.time, this._ticks);\n\t break;\n\t case Tone.State.Stopped:\n\t this._ticks = 0;\n\t this.emit('stop', event.time);\n\t break;\n\t case Tone.State.Paused:\n\t this.emit('pause', event.time);\n\t break;\n\t }\n\t }\n\t //all the tick events\n\t while (endTime > this._nextTick && this._state) {\n\t var tickTime = this._nextTick;\n\t if (this.frequency) {\n\t this._nextTick += this.frequency.getDurationOfTicks(1, this._nextTick);\n\t if (event.state === Tone.State.Started) {\n\t try {\n\t this.callback(tickTime);\n\t this._ticks++;\n\t } catch (e) {\n\t this._ticks++;\n\t throw e;\n\t }\n\t }\n\t }\n\t }\n\t }\n\t };\n\t /**\n\t\t * Returns the scheduled state at the given time.\n\t\t * @param {Time} time The time to query.\n\t\t * @return {String} The name of the state input in setStateAtTime.\n\t\t * @example\n\t\t * clock.start(\"+0.1\");\n\t\t * clock.getStateAtTime(\"+0.1\"); //returns \"started\"\n\t\t */\n\t Tone.Clock.prototype.getStateAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t return this._state.getValueAtTime(time);\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @returns {Tone.Clock} this\n\t\t */\n\t Tone.Clock.prototype.dispose = function () {\n\t Tone.Emitter.prototype.dispose.call(this);\n\t this.context.off('tick', this._boundLoop);\n\t this._writable('frequency');\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this._tickOffset.dispose();\n\t this._tickOffset = null;\n\t this._boundLoop = null;\n\t this._nextTick = Infinity;\n\t this.callback = null;\n\t this._state.dispose();\n\t this._state = null;\n\t };\n\t return Tone.Clock;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Similar to Tone.Timeline, but all events represent\n\t\t * intervals with both \"time\" and \"duration\" times. The\n\t\t * events are placed in a tree structure optimized\n\t\t * for querying an intersection point with the timeline\n\t\t * events. Internally uses an [Interval Tree](https://en.wikipedia.org/wiki/Interval_tree)\n\t\t * to represent the data.\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.IntervalTimeline = function () {\n\t Tone.call(this);\n\t /**\n\t\t\t * The root node of the inteval tree\n\t\t\t * @type {IntervalNode}\n\t\t\t * @private\n\t\t\t */\n\t this._root = null;\n\t /**\n\t\t\t * Keep track of the length of the timeline.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._length = 0;\n\t };\n\t Tone.extend(Tone.IntervalTimeline);\n\t /**\n\t\t * The event to add to the timeline. All events must\n\t\t * have a time and duration value\n\t\t * @param {Object} event The event to add to the timeline\n\t\t * @return {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.add = function (event) {\n\t if (Tone.isUndef(event.time) || Tone.isUndef(event.duration)) {\n\t throw new Error('Tone.IntervalTimeline: events must have time and duration parameters');\n\t }\n\t event.time = event.time.valueOf();\n\t var node = new IntervalNode(event.time, event.time + event.duration, event);\n\t if (this._root === null) {\n\t this._root = node;\n\t } else {\n\t this._root.insert(node);\n\t }\n\t this._length++;\n\t // Restructure tree to be balanced\n\t while (node !== null) {\n\t node.updateHeight();\n\t node.updateMax();\n\t this._rebalance(node);\n\t node = node.parent;\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Remove an event from the timeline.\n\t\t * @param {Object} event The event to remove from the timeline\n\t\t * @return {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.remove = function (event) {\n\t if (this._root !== null) {\n\t var results = [];\n\t this._root.search(event.time, results);\n\t for (var i = 0; i < results.length; i++) {\n\t var node = results[i];\n\t if (node.event === event) {\n\t this._removeNode(node);\n\t this._length--;\n\t break;\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * The number of items in the timeline.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.IntervalTimeline#\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.IntervalTimeline.prototype, 'length', {\n\t get: function () {\n\t return this._length;\n\t }\n\t });\n\t /**\n\t\t * Remove events whose time time is after the given time\n\t\t * @param {Number} time The time to query.\n\t\t * @returns {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.cancel = function (after) {\n\t this.forEachAfter(after, function (event) {\n\t this.remove(event);\n\t }.bind(this));\n\t return this;\n\t };\n\t /**\n\t\t * Set the root node as the given node\n\t\t * @param {IntervalNode} node\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._setRoot = function (node) {\n\t this._root = node;\n\t if (this._root !== null) {\n\t this._root.parent = null;\n\t }\n\t };\n\t /**\n\t\t * Replace the references to the node in the node's parent\n\t\t * with the replacement node.\n\t\t * @param {IntervalNode} node\n\t\t * @param {IntervalNode} replacement\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._replaceNodeInParent = function (node, replacement) {\n\t if (node.parent !== null) {\n\t if (node.isLeftChild()) {\n\t node.parent.left = replacement;\n\t } else {\n\t node.parent.right = replacement;\n\t }\n\t this._rebalance(node.parent);\n\t } else {\n\t this._setRoot(replacement);\n\t }\n\t };\n\t /**\n\t\t * Remove the node from the tree and replace it with\n\t\t * a successor which follows the schema.\n\t\t * @param {IntervalNode} node\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._removeNode = function (node) {\n\t if (node.left === null && node.right === null) {\n\t this._replaceNodeInParent(node, null);\n\t } else if (node.right === null) {\n\t this._replaceNodeInParent(node, node.left);\n\t } else if (node.left === null) {\n\t this._replaceNodeInParent(node, node.right);\n\t } else {\n\t var balance = node.getBalance();\n\t var replacement, temp;\n\t if (balance > 0) {\n\t if (node.left.right === null) {\n\t replacement = node.left;\n\t replacement.right = node.right;\n\t temp = replacement;\n\t } else {\n\t replacement = node.left.right;\n\t while (replacement.right !== null) {\n\t replacement = replacement.right;\n\t }\n\t replacement.parent.right = replacement.left;\n\t temp = replacement.parent;\n\t replacement.left = node.left;\n\t replacement.right = node.right;\n\t }\n\t } else if (node.right.left === null) {\n\t replacement = node.right;\n\t replacement.left = node.left;\n\t temp = replacement;\n\t } else {\n\t replacement = node.right.left;\n\t while (replacement.left !== null) {\n\t replacement = replacement.left;\n\t }\n\t replacement.parent = replacement.parent;\n\t replacement.parent.left = replacement.right;\n\t temp = replacement.parent;\n\t replacement.left = node.left;\n\t replacement.right = node.right;\n\t }\n\t if (node.parent !== null) {\n\t if (node.isLeftChild()) {\n\t node.parent.left = replacement;\n\t } else {\n\t node.parent.right = replacement;\n\t }\n\t } else {\n\t this._setRoot(replacement);\n\t }\n\t // this._replaceNodeInParent(node, replacement);\n\t this._rebalance(temp);\n\t }\n\t node.dispose();\n\t };\n\t /**\n\t\t * Rotate the tree to the left\n\t\t * @param {IntervalNode} node\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._rotateLeft = function (node) {\n\t var parent = node.parent;\n\t var isLeftChild = node.isLeftChild();\n\t // Make node.right the new root of this sub tree (instead of node)\n\t var pivotNode = node.right;\n\t node.right = pivotNode.left;\n\t pivotNode.left = node;\n\t if (parent !== null) {\n\t if (isLeftChild) {\n\t parent.left = pivotNode;\n\t } else {\n\t parent.right = pivotNode;\n\t }\n\t } else {\n\t this._setRoot(pivotNode);\n\t }\n\t };\n\t /**\n\t\t * Rotate the tree to the right\n\t\t * @param {IntervalNode} node\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._rotateRight = function (node) {\n\t var parent = node.parent;\n\t var isLeftChild = node.isLeftChild();\n\t // Make node.left the new root of this sub tree (instead of node)\n\t var pivotNode = node.left;\n\t node.left = pivotNode.right;\n\t pivotNode.right = node;\n\t if (parent !== null) {\n\t if (isLeftChild) {\n\t parent.left = pivotNode;\n\t } else {\n\t parent.right = pivotNode;\n\t }\n\t } else {\n\t this._setRoot(pivotNode);\n\t }\n\t };\n\t /**\n\t\t * Balance the BST\n\t\t * @param {IntervalNode} node\n\t\t * @private\n\t\t */\n\t Tone.IntervalTimeline.prototype._rebalance = function (node) {\n\t var balance = node.getBalance();\n\t if (balance > 1) {\n\t if (node.left.getBalance() < 0) {\n\t this._rotateLeft(node.left);\n\t } else {\n\t this._rotateRight(node);\n\t }\n\t } else if (balance < -1) {\n\t if (node.right.getBalance() > 0) {\n\t this._rotateRight(node.right);\n\t } else {\n\t this._rotateLeft(node);\n\t }\n\t }\n\t };\n\t /**\n\t\t * Get an event whose time and duration span the give time. Will\n\t\t * return the match whose \"time\" value is closest to the given time.\n\t\t * @param {Object} event The event to add to the timeline\n\t\t * @return {Object} The event which spans the desired time\n\t\t */\n\t Tone.IntervalTimeline.prototype.get = function (time) {\n\t if (this._root !== null) {\n\t var results = [];\n\t this._root.search(time, results);\n\t if (results.length > 0) {\n\t var max = results[0];\n\t for (var i = 1; i < results.length; i++) {\n\t if (results[i].low > max.low) {\n\t max = results[i];\n\t }\n\t }\n\t return max.event;\n\t }\n\t }\n\t return null;\n\t };\n\t /**\n\t\t * Iterate over everything in the timeline.\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.forEach = function (callback) {\n\t if (this._root !== null) {\n\t var allNodes = [];\n\t this._root.traverse(function (node) {\n\t allNodes.push(node);\n\t });\n\t for (var i = 0; i < allNodes.length; i++) {\n\t var ev = allNodes[i].event;\n\t if (ev) {\n\t callback(ev);\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array in which the given time\n\t\t * overlaps with the time and duration time of the event.\n\t\t * @param {Number} time The time to check if items are overlapping\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.forEachAtTime = function (time, callback) {\n\t if (this._root !== null) {\n\t var results = [];\n\t this._root.search(time, results);\n\t for (var i = results.length - 1; i >= 0; i--) {\n\t var ev = results[i].event;\n\t if (ev) {\n\t callback(ev);\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over everything in the array in which the time is greater\n\t\t * than the given time.\n\t\t * @param {Number} time The time to check if items are before\n\t\t * @param {Function} callback The callback to invoke with every item\n\t\t * @returns {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.forEachAfter = function (time, callback) {\n\t if (this._root !== null) {\n\t var results = [];\n\t this._root.searchAfter(time, results);\n\t for (var i = results.length - 1; i >= 0; i--) {\n\t var ev = results[i].event;\n\t callback(ev);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.IntervalTimeline} this\n\t\t */\n\t Tone.IntervalTimeline.prototype.dispose = function () {\n\t var allNodes = [];\n\t if (this._root !== null) {\n\t this._root.traverse(function (node) {\n\t allNodes.push(node);\n\t });\n\t }\n\t for (var i = 0; i < allNodes.length; i++) {\n\t allNodes[i].dispose();\n\t }\n\t allNodes = null;\n\t this._root = null;\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tINTERVAL NODE HELPER\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Represents a node in the binary search tree, with the addition\n\t\t * of a \"high\" value which keeps track of the highest value of\n\t\t * its children.\n\t\t * References:\n\t\t * https://brooknovak.wordpress.com/2013/12/07/augmented-interval-tree-in-c/\n\t\t * http://www.mif.vu.lt/~valdas/ALGORITMAI/LITERATURA/Cormen/Cormen.pdf\n\t\t * @param {Number} low\n\t\t * @param {Number} high\n\t\t * @private\n\t\t */\n\t var IntervalNode = function (low, high, event) {\n\t //the event container\n\t this.event = event;\n\t //the low value\n\t this.low = low;\n\t //the high value\n\t this.high = high;\n\t //the high value for this and all child nodes\n\t this.max = this.high;\n\t //the nodes to the left\n\t this._left = null;\n\t //the nodes to the right\n\t this._right = null;\n\t //the parent node\n\t this.parent = null;\n\t //the number of child nodes\n\t this.height = 0;\n\t };\n\t /**\n\t\t * Insert a node into the correct spot in the tree\n\t\t * @param {IntervalNode} node\n\t\t */\n\t IntervalNode.prototype.insert = function (node) {\n\t if (node.low <= this.low) {\n\t if (this.left === null) {\n\t this.left = node;\n\t } else {\n\t this.left.insert(node);\n\t }\n\t } else if (this.right === null) {\n\t this.right = node;\n\t } else {\n\t this.right.insert(node);\n\t }\n\t };\n\t /**\n\t\t * Search the tree for nodes which overlap\n\t\t * with the given point\n\t\t * @param {Number} point The point to query\n\t\t * @param {Array} results The array to put the results\n\t\t */\n\t IntervalNode.prototype.search = function (point, results) {\n\t // If p is to the right of the rightmost point of any interval\n\t // in this node and all children, there won't be any matches.\n\t if (point > this.max) {\n\t return;\n\t }\n\t // Search left children\n\t if (this.left !== null) {\n\t this.left.search(point, results);\n\t }\n\t // Check this node\n\t if (this.low <= point && this.high > point) {\n\t results.push(this);\n\t }\n\t // If p is to the left of the time of this interval,\n\t // then it can't be in any child to the right.\n\t if (this.low > point) {\n\t return;\n\t }\n\t // Search right children\n\t if (this.right !== null) {\n\t this.right.search(point, results);\n\t }\n\t };\n\t /**\n\t\t * Search the tree for nodes which are less\n\t\t * than the given point\n\t\t * @param {Number} point The point to query\n\t\t * @param {Array} results The array to put the results\n\t\t */\n\t IntervalNode.prototype.searchAfter = function (point, results) {\n\t // Check this node\n\t if (this.low >= point) {\n\t results.push(this);\n\t if (this.left !== null) {\n\t this.left.searchAfter(point, results);\n\t }\n\t }\n\t // search the right side\n\t if (this.right !== null) {\n\t this.right.searchAfter(point, results);\n\t }\n\t };\n\t /**\n\t\t * Invoke the callback on this element and both it's branches\n\t\t * @param {Function} callback\n\t\t */\n\t IntervalNode.prototype.traverse = function (callback) {\n\t callback(this);\n\t if (this.left !== null) {\n\t this.left.traverse(callback);\n\t }\n\t if (this.right !== null) {\n\t this.right.traverse(callback);\n\t }\n\t };\n\t /**\n\t\t * Update the height of the node\n\t\t */\n\t IntervalNode.prototype.updateHeight = function () {\n\t if (this.left !== null && this.right !== null) {\n\t this.height = Math.max(this.left.height, this.right.height) + 1;\n\t } else if (this.right !== null) {\n\t this.height = this.right.height + 1;\n\t } else if (this.left !== null) {\n\t this.height = this.left.height + 1;\n\t } else {\n\t this.height = 0;\n\t }\n\t };\n\t /**\n\t\t * Update the height of the node\n\t\t */\n\t IntervalNode.prototype.updateMax = function () {\n\t this.max = this.high;\n\t if (this.left !== null) {\n\t this.max = Math.max(this.max, this.left.max);\n\t }\n\t if (this.right !== null) {\n\t this.max = Math.max(this.max, this.right.max);\n\t }\n\t };\n\t /**\n\t\t * The balance is how the leafs are distributed on the node\n\t\t * @return {Number} Negative numbers are balanced to the right\n\t\t */\n\t IntervalNode.prototype.getBalance = function () {\n\t var balance = 0;\n\t if (this.left !== null && this.right !== null) {\n\t balance = this.left.height - this.right.height;\n\t } else if (this.left !== null) {\n\t balance = this.left.height + 1;\n\t } else if (this.right !== null) {\n\t balance = -(this.right.height + 1);\n\t }\n\t return balance;\n\t };\n\t /**\n\t\t * @returns {Boolean} true if this node is the left child\n\t\t * of its parent\n\t\t */\n\t IntervalNode.prototype.isLeftChild = function () {\n\t return this.parent !== null && this.parent.left === this;\n\t };\n\t /**\n\t\t * get/set the left node\n\t\t * @type {IntervalNode}\n\t\t */\n\t Object.defineProperty(IntervalNode.prototype, 'left', {\n\t get: function () {\n\t return this._left;\n\t },\n\t set: function (node) {\n\t this._left = node;\n\t if (node !== null) {\n\t node.parent = this;\n\t }\n\t this.updateHeight();\n\t this.updateMax();\n\t }\n\t });\n\t /**\n\t\t * get/set the right node\n\t\t * @type {IntervalNode}\n\t\t */\n\t Object.defineProperty(IntervalNode.prototype, 'right', {\n\t get: function () {\n\t return this._right;\n\t },\n\t set: function (node) {\n\t this._right = node;\n\t if (node !== null) {\n\t node.parent = this;\n\t }\n\t this.updateHeight();\n\t this.updateMax();\n\t }\n\t });\n\t /**\n\t\t * null out references.\n\t\t */\n\t IntervalNode.prototype.dispose = function () {\n\t this.parent = null;\n\t this._left = null;\n\t this._right = null;\n\t this.event = null;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tEND INTERVAL NODE HELPER\n\t ///////////////////////////////////////////////////////////////////////////\n\t return Tone.IntervalTimeline;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Ticks is a primitive type for encoding Time values.\n\t\t * Tone.Ticks can be constructed with or without the `new` keyword. Tone.Ticks can be passed\n\t\t * into the parameter of any method which takes time as an argument.\n\t\t * @constructor\n\t\t * @extends {Tone.TransportTime}\n\t\t * @param {String|Number} val The time value.\n\t\t * @param {String=} units The units of the value.\n\t\t * @example\n\t\t * var t = Tone.Ticks(\"4n\");//a quarter note\n\t\t */\n\t Tone.Ticks = function (val, units) {\n\t if (this instanceof Tone.Ticks) {\n\t Tone.TransportTime.call(this, val, units);\n\t } else {\n\t return new Tone.Ticks(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.Ticks, Tone.TransportTime);\n\t /**\n\t\t * The default units if none are given.\n\t\t * @type {String}\n\t\t * @private\n\t\t */\n\t Tone.Ticks.prototype._defaultUnits = 'i';\n\t /**\n\t\t * Get the current time in the given units\n\t\t * @return {Ticks}\n\t\t * @private\n\t\t */\n\t Tone.Ticks.prototype._now = function () {\n\t return Tone.Transport.ticks;\n\t };\n\t /**\n\t\t * Return the value of the beats in the current units\n\t\t * @param {Number} beats\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Ticks.prototype._beatsToUnits = function (beats) {\n\t return this._getPPQ() * beats;\n\t };\n\t /**\n\t\t * Returns the value of a second in the current units\n\t\t * @param {Seconds} seconds\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Ticks.prototype._secondsToUnits = function (seconds) {\n\t return seconds / (60 / this._getBpm()) * this._getPPQ();\n\t };\n\t /**\n\t\t * Returns the value of a tick in the current time units\n\t\t * @param {Ticks} ticks\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Ticks.prototype._ticksToUnits = function (ticks) {\n\t return ticks;\n\t };\n\t /**\n\t\t * Return the time in ticks\n\t\t * @return {Ticks}\n\t\t */\n\t Tone.Ticks.prototype.toTicks = function () {\n\t return this.valueOf();\n\t };\n\t /**\n\t\t * Return the time in ticks\n\t\t * @return {Ticks}\n\t\t */\n\t Tone.Ticks.prototype.toSeconds = function () {\n\t return this.valueOf() / this._getPPQ() * (60 / this._getBpm());\n\t };\n\t return Tone.Ticks;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TransportEvent is an internal class used by (Tone.Transport)[Transport]\n\t\t * to schedule events. Do no invoke this class directly, it is\n\t\t * handled from within Tone.Transport.\n\t\t * @extends {Tone}\n\t\t * @param {Object} options\n\t\t */\n\t Tone.TransportEvent = function (Transport, options) {\n\t options = Tone.defaultArg(options, Tone.TransportEvent.defaults);\n\t Tone.call(this);\n\t /**\n\t\t\t * Reference to the Transport that created it\n\t\t\t * @type {Tone.Transport}\n\t\t\t */\n\t this.Transport = Transport;\n\t /**\n\t\t\t * The unique id of the event\n\t\t\t * @type {Number}\n\t\t\t */\n\t this.id = Tone.TransportEvent._eventId++;\n\t /**\n\t\t\t * The time the event starts\n\t\t\t * @type {Ticks}\n\t\t\t */\n\t this.time = Tone.Ticks(options.time);\n\t /**\n\t\t\t * The callback to invoke\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.callback = options.callback;\n\t /**\n\t\t\t * If the event should be removed after being created.\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t this._once = options.once;\n\t };\n\t Tone.extend(Tone.TransportEvent);\n\t /**\n\t\t * The defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.TransportEvent.defaults = {\n\t 'once': false,\n\t 'callback': Tone.noOp\n\t };\n\t /**\n\t\t * Current ID counter\n\t\t * @private\n\t\t * @static\n\t\t * @type {Number}\n\t\t */\n\t Tone.TransportEvent._eventId = 0;\n\t /**\n\t\t * Invoke the event callback.\n\t\t * @param {Time} time The AudioContext time in seconds of the event\n\t\t */\n\t Tone.TransportEvent.prototype.invoke = function (time) {\n\t if (this.callback) {\n\t this.callback(time);\n\t if (this._once && this.Transport) {\n\t this.Transport.clear(this.id);\n\t }\n\t }\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.TransportEvent} this\n\t\t */\n\t Tone.TransportEvent.prototype.dispose = function () {\n\t Tone.prototype.dispose.call(this);\n\t this.Transport = null;\n\t this.callback = null;\n\t this.time = null;\n\t return this;\n\t };\n\t return Tone.TransportEvent;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TransportRepeatEvent is an internal class used by Tone.Transport\n\t\t * to schedule repeat events. This class should not be instantiated directly.\n\t\t * @extends {Tone.TransportEvent}\n\t\t * @param {Object} options\n\t\t */\n\t Tone.TransportRepeatEvent = function (Transport, options) {\n\t Tone.TransportEvent.call(this, Transport, options);\n\t options = Tone.defaultArg(options, Tone.TransportRepeatEvent.defaults);\n\t /**\n\t\t\t * When the event should stop repeating\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this.duration = Tone.Ticks(options.duration);\n\t /**\n\t\t\t * The interval of the repeated event\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this._interval = Tone.Ticks(options.interval);\n\t /**\n\t\t\t * The ID of the current timeline event\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._currentId = -1;\n\t /**\n\t\t\t * The ID of the next timeline event\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._nextId = -1;\n\t /**\n\t\t\t * The time of the next event\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this._nextTick = this.time;\n\t /**\n\t\t\t * a reference to the bound start method\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._boundRestart = this._restart.bind(this);\n\t this.Transport.on('start loopStart', this._boundRestart);\n\t this._restart();\n\t };\n\t Tone.extend(Tone.TransportRepeatEvent, Tone.TransportEvent);\n\t /**\n\t\t * The defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.TransportRepeatEvent.defaults = {\n\t 'duration': Infinity,\n\t 'interval': 1\n\t };\n\t /**\n\t\t * Invoke the callback. Returns the tick time which\n\t\t * the next event should be scheduled at.\n\t\t * @param {Number} time The AudioContext time in seconds of the event\n\t\t */\n\t Tone.TransportRepeatEvent.prototype.invoke = function (time) {\n\t //create more events if necessary\n\t this._createEvents();\n\t //call the super class\n\t Tone.TransportEvent.prototype.invoke.call(this, time);\n\t };\n\t /**\n\t\t * Push more events onto the timeline to keep up with the position of the timeline\n\t\t * @private\n\t\t */\n\t Tone.TransportRepeatEvent.prototype._createEvents = function () {\n\t // schedule the next event\n\t var ticks = this.Transport.ticks;\n\t if (ticks >= this.time && ticks >= this._nextTick && this._nextTick + this._interval < this.time + this.duration) {\n\t this._nextTick += this._interval;\n\t this._currentId = this._nextId;\n\t this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t }\n\t };\n\t /**\n\t\t * Push more events onto the timeline to keep up with the position of the timeline\n\t\t * @private\n\t\t */\n\t Tone.TransportRepeatEvent.prototype._restart = function () {\n\t this.Transport.clear(this._currentId);\n\t this.Transport.clear(this._nextId);\n\t var ticks = this.Transport.ticks;\n\t this._nextTick = this.time;\n\t if (ticks > this.time) {\n\t this._nextTick = this.time + Math.ceil((ticks - this.time) / this._interval) * this._interval;\n\t }\n\t this._currentId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t this._nextTick += this._interval;\n\t this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.TransportRepeatEvent} this\n\t\t */\n\t Tone.TransportRepeatEvent.prototype.dispose = function () {\n\t this.Transport.clear(this._currentId);\n\t this.Transport.clear(this._nextId);\n\t this.Transport.off('start loopStart', this._boundRestart);\n\t this._boundCreateEvents = null;\n\t Tone.TransportEvent.prototype.dispose.call(this);\n\t this.duration = null;\n\t this._interval = null;\n\t return this;\n\t };\n\t return Tone.TransportRepeatEvent;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Transport for timing musical events.\n\t\t * Supports tempo curves and time changes. Unlike browser-based timing (setInterval, requestAnimationFrame)\n\t\t * Tone.Transport timing events pass in the exact time of the scheduled event\n\t\t * in the argument of the callback function. Pass that time value to the object\n\t\t * you're scheduling. <br><br>\n\t\t * A single transport is created for you when the library is initialized.\n\t\t * <br><br>\n\t\t * The transport emits the events: \"start\", \"stop\", \"pause\", and \"loop\" which are\n\t\t * called with the time of that event as the argument.\n\t\t *\n\t\t * @extends {Tone.Emitter}\n\t\t * @singleton\n\t\t * @example\n\t\t * //repeated event every 8th note\n\t\t * Tone.Transport.scheduleRepeat(function(time){\n\t\t * \t//do something with the time\n\t\t * }, \"8n\");\n\t\t * @example\n\t\t * //schedule an event on the 16th measure\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \t//do something with the time\n\t\t * }, \"16:0:0\");\n\t\t */\n\t Tone.Transport = function () {\n\t Tone.Emitter.call(this);\n\t Tone.getContext(function () {\n\t ///////////////////////////////////////////////////////////////////////\n\t //\tLOOPING\n\t //////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t\t * \tIf the transport loops or not.\n\t\t\t\t * @type {boolean}\n\t\t\t\t */\n\t this.loop = false;\n\t /**\n\t\t\t\t * \tThe loop start position in ticks\n\t\t\t\t * @type {Ticks}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._loopStart = 0;\n\t /**\n\t\t\t\t * \tThe loop end position in ticks\n\t\t\t\t * @type {Ticks}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._loopEnd = 0;\n\t ///////////////////////////////////////////////////////////////////////\n\t //\tCLOCK/TEMPO\n\t //////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t\t * Pulses per quarter is the number of ticks per quarter note.\n\t\t\t\t * @private\n\t\t\t\t * @type {Number}\n\t\t\t\t */\n\t this._ppq = TransportConstructor.defaults.PPQ;\n\t /**\n\t\t\t\t * watches the main oscillator for timing ticks\n\t\t\t\t * initially starts at 120bpm\n\t\t\t\t * @private\n\t\t\t\t * @type {Tone.Clock}\n\t\t\t\t */\n\t this._clock = new Tone.Clock({\n\t 'callback': this._processTick.bind(this),\n\t 'frequency': 0\n\t });\n\t this._bindClockEvents();\n\t /**\n\t\t\t\t * The Beats Per Minute of the Transport.\n\t\t\t\t * @type {BPM}\n\t\t\t\t * @signal\n\t\t\t\t * @example\n\t\t\t\t * Tone.Transport.bpm.value = 80;\n\t\t\t\t * //ramp the bpm to 120 over 10 seconds\n\t\t\t\t * Tone.Transport.bpm.rampTo(120, 10);\n\t\t\t\t */\n\t this.bpm = this._clock.frequency;\n\t this.bpm._toUnits = this._toUnits.bind(this);\n\t this.bpm._fromUnits = this._fromUnits.bind(this);\n\t this.bpm.units = Tone.Type.BPM;\n\t this.bpm.value = TransportConstructor.defaults.bpm;\n\t this._readOnly('bpm');\n\t /**\n\t\t\t\t * The time signature, or more accurately the numerator\n\t\t\t\t * of the time signature over a denominator of 4.\n\t\t\t\t * @type {Number}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._timeSignature = TransportConstructor.defaults.timeSignature;\n\t ///////////////////////////////////////////////////////////////////////\n\t //\tTIMELINE EVENTS\n\t //////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t\t * All the events in an object to keep track by ID\n\t\t\t\t * @type {Object}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._scheduledEvents = {};\n\t /**\n\t\t\t\t * \tThe scheduled events.\n\t\t\t\t * @type {Tone.Timeline}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._timeline = new Tone.Timeline();\n\t /**\n\t\t\t\t * Repeated events\n\t\t\t\t * @type {Array}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._repeatedEvents = new Tone.IntervalTimeline();\n\t /**\n\t\t\t\t * All of the synced Signals\n\t\t\t\t * @private\n\t\t\t\t * @type {Array}\n\t\t\t\t */\n\t this._syncedSignals = [];\n\t ///////////////////////////////////////////////////////////////////////\n\t //\tSWING\n\t //////////////////////////////////////////////////////////////////////\n\t /**\n\t\t\t\t * The subdivision of the swing\n\t\t\t\t * @type {Ticks}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._swingTicks = TransportConstructor.defaults.PPQ / 2;\n\t //8n\n\t /**\n\t\t\t\t * The swing amount\n\t\t\t\t * @type {NormalRange}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._swingAmount = 0;\n\t }.bind(this));\n\t };\n\t Tone.extend(Tone.Transport, Tone.Emitter);\n\t /**\n\t\t * the defaults\n\t\t * @type {Object}\n\t\t * @const\n\t\t * @static\n\t\t */\n\t Tone.Transport.defaults = {\n\t 'bpm': 120,\n\t 'swing': 0,\n\t 'swingSubdivision': '8n',\n\t 'timeSignature': 4,\n\t 'loopStart': 0,\n\t 'loopEnd': '4m',\n\t 'PPQ': 192\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tTICKS\n\t ///////////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * called on every tick\n\t\t * @param {number} tickTime clock relative tick time\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype._processTick = function (tickTime) {\n\t var ticks = this._clock.ticks;\n\t //handle swing\n\t if (this._swingAmount > 0 && ticks % this._ppq !== 0 && //not on a downbeat\n\t ticks % (this._swingTicks * 2) !== 0) {\n\t //add some swing\n\t var progress = ticks % (this._swingTicks * 2) / (this._swingTicks * 2);\n\t var amount = Math.sin(progress * Math.PI) * this._swingAmount;\n\t tickTime += Tone.Ticks(this._swingTicks * 2 / 3).toSeconds() * amount;\n\t }\n\t //do the loop test\n\t if (this.loop) {\n\t if (ticks >= this._loopEnd) {\n\t this.emit('loopEnd', tickTime);\n\t this._clock.setTicksAtTime(this._loopStart, tickTime);\n\t ticks = this._loopStart;\n\t this.emit('loopStart', tickTime, this.seconds);\n\t this.emit('loop', tickTime);\n\t }\n\t }\n\t //invoke the timeline events scheduled on this tick\n\t this._timeline.forEachAtTime(ticks, function (event) {\n\t event.invoke(tickTime);\n\t });\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tSCHEDULABLE EVENTS\n\t ///////////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Schedule an event along the timeline.\n\t\t * @param {Function} callback The callback to be invoked at the time.\n\t\t * @param {TransportTime} time The time to invoke the callback at.\n\t\t * @return {Number} The id of the event which can be used for canceling the event.\n\t\t * @example\n\t\t * //trigger the callback when the Transport reaches the desired time\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \tenvelope.triggerAttack(time);\n\t\t * }, \"128i\");\n\t\t */\n\t Tone.Transport.prototype.schedule = function (callback, time) {\n\t var event = new Tone.TransportEvent(this, {\n\t 'time': Tone.TransportTime(time),\n\t 'callback': callback\n\t });\n\t return this._addEvent(event, this._timeline);\n\t };\n\t /**\n\t\t * Schedule a repeated event along the timeline. The event will fire\n\t\t * at the `interval` starting at the `startTime` and for the specified\n\t\t * `duration`.\n\t\t * @param {Function} callback The callback to invoke.\n\t\t * @param {Time} interval The duration between successive\n\t\t * callbacks. Must be a positive number.\n\t\t * @param {TransportTime=} startTime When along the timeline the events should\n\t\t * start being invoked.\n\t\t * @param {Time} [duration=Infinity] How long the event should repeat.\n\t\t * @return {Number} The ID of the scheduled event. Use this to cancel\n\t\t * the event.\n\t\t * @example\n\t\t * //a callback invoked every eighth note after the first measure\n\t\t * Tone.Transport.scheduleRepeat(callback, \"8n\", \"1m\");\n\t\t */\n\t Tone.Transport.prototype.scheduleRepeat = function (callback, interval, startTime, duration) {\n\t var event = new Tone.TransportRepeatEvent(this, {\n\t 'callback': callback,\n\t 'interval': Tone.Time(interval),\n\t 'time': Tone.TransportTime(startTime),\n\t 'duration': Tone.Time(Tone.defaultArg(duration, Infinity))\n\t });\n\t //kick it off if the Transport is started\n\t return this._addEvent(event, this._repeatedEvents);\n\t };\n\t /**\n\t\t * Schedule an event that will be removed after it is invoked.\n\t\t * Note that if the given time is less than the current transport time,\n\t\t * the event will be invoked immediately.\n\t\t * @param {Function} callback The callback to invoke once.\n\t\t * @param {TransportTime} time The time the callback should be invoked.\n\t\t * @returns {Number} The ID of the scheduled event.\n\t\t */\n\t Tone.Transport.prototype.scheduleOnce = function (callback, time) {\n\t var event = new Tone.TransportEvent(this, {\n\t 'time': Tone.TransportTime(time),\n\t 'callback': callback,\n\t 'once': true\n\t });\n\t return this._addEvent(event, this._timeline);\n\t };\n\t /**\n\t\t * Clear the passed in event id from the timeline\n\t\t * @param {Number} eventId The id of the event.\n\t\t * @returns {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.clear = function (eventId) {\n\t if (this._scheduledEvents.hasOwnProperty(eventId)) {\n\t var item = this._scheduledEvents[eventId.toString()];\n\t item.timeline.remove(item.event);\n\t item.event.dispose();\n\t delete this._scheduledEvents[eventId.toString()];\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Add an event to the correct timeline. Keep track of the\n\t\t * timeline it was added to.\n\t\t * @param {Tone.TransportEvent}\tevent\n\t\t * @param {Tone.Timeline} timeline\n\t\t * @returns {Number} the event id which was just added\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype._addEvent = function (event, timeline) {\n\t this._scheduledEvents[event.id.toString()] = {\n\t 'event': event,\n\t 'timeline': timeline\n\t };\n\t timeline.add(event);\n\t return event.id;\n\t };\n\t /**\n\t\t * Remove scheduled events from the timeline after\n\t\t * the given time. Repeated events will be removed\n\t\t * if their startTime is after the given time\n\t\t * @param {TransportTime} [after=0] Clear all events after\n\t\t * this time.\n\t\t * @returns {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.cancel = function (after) {\n\t after = Tone.defaultArg(after, 0);\n\t after = this.toTicks(after);\n\t this._timeline.cancel(after);\n\t this._repeatedEvents.cancel(after);\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tSTART/STOP/PAUSE\n\t ///////////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Bind start/stop/pause events from the clock and emit them.\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype._bindClockEvents = function () {\n\t this._clock.on('start', function (time, offset) {\n\t offset = Tone.Ticks(this._clock.ticks).toSeconds();\n\t this.emit('start', time, offset);\n\t }.bind(this));\n\t this._clock.on('stop', function (time) {\n\t this.emit('stop', time);\n\t }.bind(this));\n\t this._clock.on('pause', function (time) {\n\t this.emit('pause', time);\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Returns the playback state of the source, either \"started\", \"stopped\", or \"paused\"\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.Transport#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'state', {\n\t get: function () {\n\t return this._clock.getStateAtTime(this.now());\n\t }\n\t });\n\t /**\n\t\t * Start the transport and all sources synced to the transport.\n\t\t * @param {Time} [time=now] The time when the transport should start.\n\t\t * @param {TransportTime=} offset The timeline offset to start the transport.\n\t\t * @returns {Tone.Transport} this\n\t\t * @example\n\t\t * //start the transport in one second starting at beginning of the 5th measure.\n\t\t * Tone.Transport.start(\"+1\", \"4:0:0\");\n\t\t */\n\t Tone.Transport.prototype.start = function (time, offset) {\n\t //start the clock\n\t if (!Tone.isUndef(offset)) {\n\t offset = this.toTicks(offset);\n\t }\n\t this._clock.start(time, offset);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the transport and all sources synced to the transport.\n\t\t * @param {Time} [time=now] The time when the transport should stop.\n\t\t * @returns {Tone.Transport} this\n\t\t * @example\n\t\t * Tone.Transport.stop();\n\t\t */\n\t Tone.Transport.prototype.stop = function (time) {\n\t this._clock.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Pause the transport and all sources synced to the transport.\n\t\t * @param {Time} [time=now]\n\t\t * @returns {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.pause = function (time) {\n\t this._clock.pause(time);\n\t return this;\n\t };\n\t /**\n\t\t * Toggle the current state of the transport. If it is\n\t\t * started, it will stop it, otherwise it will start the Transport.\n\t\t * @param {Time=} time The time of the event\n\t\t * @return {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.toggle = function (time) {\n\t time = this.toSeconds(time);\n\t if (this._clock.getStateAtTime(time) !== Tone.State.Started) {\n\t this.start(time);\n\t } else {\n\t this.stop(time);\n\t }\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tSETTERS/GETTERS\n\t ///////////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * The time signature as just the numerator over 4.\n\t\t * For example 4/4 would be just 4 and 6/8 would be 3.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Number|Array}\n\t\t * @name timeSignature\n\t\t * @example\n\t\t * //common time\n\t\t * Tone.Transport.timeSignature = 4;\n\t\t * // 7/8\n\t\t * Tone.Transport.timeSignature = [7, 8];\n\t\t * //this will be reduced to a single number\n\t\t * Tone.Transport.timeSignature; //returns 3.5\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'timeSignature', {\n\t get: function () {\n\t return this._timeSignature;\n\t },\n\t set: function (timeSig) {\n\t if (Tone.isArray(timeSig)) {\n\t timeSig = timeSig[0] / timeSig[1] * 4;\n\t }\n\t this._timeSignature = timeSig;\n\t }\n\t });\n\t /**\n\t\t * When the Tone.Transport.loop = true, this is the starting position of the loop.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'loopStart', {\n\t get: function () {\n\t return Tone.Ticks(this._loopStart).toSeconds();\n\t },\n\t set: function (startPosition) {\n\t this._loopStart = this.toTicks(startPosition);\n\t }\n\t });\n\t /**\n\t\t * When the Tone.Transport.loop = true, this is the ending position of the loop.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'loopEnd', {\n\t get: function () {\n\t return Tone.Ticks(this._loopEnd).toSeconds();\n\t },\n\t set: function (endPosition) {\n\t this._loopEnd = this.toTicks(endPosition);\n\t }\n\t });\n\t /**\n\t\t * Set the loop start and stop at the same time.\n\t\t * @param {TransportTime} startPosition\n\t\t * @param {TransportTime} endPosition\n\t\t * @returns {Tone.Transport} this\n\t\t * @example\n\t\t * //loop over the first measure\n\t\t * Tone.Transport.setLoopPoints(0, \"1m\");\n\t\t * Tone.Transport.loop = true;\n\t\t */\n\t Tone.Transport.prototype.setLoopPoints = function (startPosition, endPosition) {\n\t this.loopStart = startPosition;\n\t this.loopEnd = endPosition;\n\t return this;\n\t };\n\t /**\n\t\t * The swing value. Between 0-1 where 1 equal to\n\t\t * the note + half the subdivision.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {NormalRange}\n\t\t * @name swing\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'swing', {\n\t get: function () {\n\t return this._swingAmount;\n\t },\n\t set: function (amount) {\n\t //scale the values to a normal range\n\t this._swingAmount = amount;\n\t }\n\t });\n\t /**\n\t\t * Set the subdivision which the swing will be applied to.\n\t\t * The default value is an 8th note. Value must be less\n\t\t * than a quarter note.\n\t\t *\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name swingSubdivision\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'swingSubdivision', {\n\t get: function () {\n\t return Tone.Ticks(this._swingTicks).toNotation();\n\t },\n\t set: function (subdivision) {\n\t this._swingTicks = this.toTicks(subdivision);\n\t }\n\t });\n\t /**\n\t\t * The Transport's position in Bars:Beats:Sixteenths.\n\t\t * Setting the value will jump to that position right away.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {BarsBeatsSixteenths}\n\t\t * @name position\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'position', {\n\t get: function () {\n\t var now = this.now();\n\t var ticks = this._clock.getTicksAtTime(now);\n\t return Tone.Ticks(ticks).toBarsBeatsSixteenths();\n\t },\n\t set: function (progress) {\n\t var ticks = this.toTicks(progress);\n\t this.ticks = ticks;\n\t }\n\t });\n\t /**\n\t\t * The Transport's position in seconds\n\t\t * Setting the value will jump to that position right away.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Seconds}\n\t\t * @name seconds\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'seconds', {\n\t get: function () {\n\t return this._clock.seconds;\n\t },\n\t set: function (s) {\n\t var now = this.now();\n\t var ticks = this.bpm.timeToTicks(s, now);\n\t this.ticks = ticks;\n\t }\n\t });\n\t /**\n\t\t * The Transport's loop position as a normalized value. Always\n\t\t * returns 0 if the transport if loop is not true.\n\t\t * @memberOf Tone.Transport#\n\t\t * @name progress\n\t\t * @type {NormalRange}\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'progress', {\n\t get: function () {\n\t if (this.loop) {\n\t var now = this.now();\n\t var ticks = this._clock.getTicksAtTime(now);\n\t return (ticks - this._loopStart) / (this._loopEnd - this._loopStart);\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The transports current tick position.\n\t\t *\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Ticks}\n\t\t * @name ticks\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'ticks', {\n\t get: function () {\n\t return this._clock.ticks;\n\t },\n\t set: function (t) {\n\t if (this._clock.ticks !== t) {\n\t var now = this.now();\n\t //stop everything synced to the transport\n\t if (this.state === Tone.State.Started) {\n\t this.emit('stop', now);\n\t this._clock.setTicksAtTime(t, now);\n\t //restart it with the new time\n\t this.emit('start', now, this.seconds);\n\t } else {\n\t this._clock.setTicksAtTime(t, now);\n\t }\n\t }\n\t }\n\t });\n\t /**\n\t\t * Pulses Per Quarter note. This is the smallest resolution\n\t\t * the Transport timing supports. This should be set once\n\t\t * on initialization and not set again. Changing this value\n\t\t * after other objects have been created can cause problems.\n\t\t *\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Number}\n\t\t * @name PPQ\n\t\t */\n\t Object.defineProperty(Tone.Transport.prototype, 'PPQ', {\n\t get: function () {\n\t return this._ppq;\n\t },\n\t set: function (ppq) {\n\t var bpm = this.bpm.value;\n\t this._ppq = ppq;\n\t this.bpm.value = bpm;\n\t }\n\t });\n\t /**\n\t\t * Convert from BPM to frequency (factoring in PPQ)\n\t\t * @param {BPM} bpm The BPM value to convert to frequency\n\t\t * @return {Frequency} The BPM as a frequency with PPQ factored in.\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype._fromUnits = function (bpm) {\n\t return 1 / (60 / bpm / this.PPQ);\n\t };\n\t /**\n\t\t * Convert from frequency (with PPQ) into BPM\n\t\t * @param {Frequency} freq The clocks frequency to convert to BPM\n\t\t * @return {BPM} The frequency value as BPM.\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype._toUnits = function (freq) {\n\t return freq / this.PPQ * 60;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tSYNCING\n\t ///////////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Returns the time aligned to the next subdivision\n\t\t * of the Transport. If the Transport is not started,\n\t\t * it will return 0.\n\t\t * Note: this will not work precisely during tempo ramps.\n\t\t * @param {Time} subdivision The subdivision to quantize to\n\t\t * @return {Number} The context time of the next subdivision.\n\t\t * @example\n\t\t * Tone.Transport.start(); //the transport must be started\n\t\t * Tone.Transport.nextSubdivision(\"4n\");\n\t\t */\n\t Tone.Transport.prototype.nextSubdivision = function (subdivision) {\n\t subdivision = this.toSeconds(subdivision);\n\t //if the transport's not started, return 0\n\t var now;\n\t if (this.state === Tone.State.Started) {\n\t now = this._clock._nextTick;\n\t } else {\n\t return 0;\n\t }\n\t var transportPos = Tone.Time(this.ticks, 'i');\n\t var remainingTime = subdivision - transportPos % subdivision;\n\t if (remainingTime === 0) {\n\t remainingTime = subdivision;\n\t }\n\t return now + remainingTime;\n\t };\n\t /**\n\t\t * Attaches the signal to the tempo control signal so that\n\t\t * any changes in the tempo will change the signal in the same\n\t\t * ratio.\n\t\t *\n\t\t * @param {Tone.Signal} signal\n\t\t * @param {number=} ratio Optionally pass in the ratio between\n\t\t * the two signals. Otherwise it will be computed\n\t\t * based on their current values.\n\t\t * @returns {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.syncSignal = function (signal, ratio) {\n\t if (!ratio) {\n\t //get the sync ratio\n\t var now = this.now();\n\t if (signal.getValueAtTime(now) !== 0) {\n\t ratio = signal.getValueAtTime(now) / this.bpm.getValueAtTime(now);\n\t } else {\n\t ratio = 0;\n\t }\n\t }\n\t var ratioSignal = new Tone.Gain(ratio);\n\t this.bpm.chain(ratioSignal, signal._param);\n\t this._syncedSignals.push({\n\t 'ratio': ratioSignal,\n\t 'signal': signal,\n\t 'initial': signal.value\n\t });\n\t signal.value = 0;\n\t return this;\n\t };\n\t /**\n\t\t * Unsyncs a previously synced signal from the transport's control.\n\t\t * See Tone.Transport.syncSignal.\n\t\t * @param {Tone.Signal} signal\n\t\t * @returns {Tone.Transport} this\n\t\t */\n\t Tone.Transport.prototype.unsyncSignal = function (signal) {\n\t for (var i = this._syncedSignals.length - 1; i >= 0; i--) {\n\t var syncedSignal = this._syncedSignals[i];\n\t if (syncedSignal.signal === signal) {\n\t syncedSignal.ratio.dispose();\n\t syncedSignal.signal.value = syncedSignal.initial;\n\t this._syncedSignals.splice(i, 1);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Transport} this\n\t\t * @private\n\t\t */\n\t Tone.Transport.prototype.dispose = function () {\n\t Tone.Emitter.prototype.dispose.call(this);\n\t this._clock.dispose();\n\t this._clock = null;\n\t this._writable('bpm');\n\t this.bpm = null;\n\t this._timeline.dispose();\n\t this._timeline = null;\n\t this._repeatedEvents.dispose();\n\t this._repeatedEvents = null;\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////////\n\t //\tINITIALIZATION\n\t ///////////////////////////////////////////////////////////////////////////////\n\t var TransportConstructor = Tone.Transport;\n\t Tone.Transport = new TransportConstructor();\n\t Tone.Context.on('init', function (context) {\n\t if (context.Transport instanceof TransportConstructor) {\n\t Tone.Transport = context.Transport;\n\t } else {\n\t Tone.Transport = new TransportConstructor();\n\t }\n\t //store the Transport on the context so it can be retrieved later\n\t context.Transport = Tone.Transport;\n\t });\n\t Tone.Context.on('close', function (context) {\n\t if (context.Transport instanceof TransportConstructor) {\n\t context.Transport.dispose();\n\t }\n\t });\n\t return Tone.Transport;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Volume is a simple volume node, useful for creating a volume fader.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Decibels} [volume=0] the initial volume\n\t\t * @example\n\t\t * var vol = new Tone.Volume(-12);\n\t\t * instrument.chain(vol, Tone.Master);\n\t\t */\n\t Tone.Volume = function () {\n\t var options = Tone.defaults(arguments, ['volume'], Tone.Volume);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the output node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.output = this.input = new Tone.Gain(options.volume, Tone.Type.Decibels);\n\t /**\n\t\t\t * The unmuted volume\n\t\t\t * @type {Decibels}\n\t\t\t * @private\n\t\t\t */\n\t this._unmutedVolume = options.volume;\n\t /**\n\t\t\t * The volume control in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.volume = this.output.gain;\n\t this._readOnly('volume');\n\t //set the mute initially\n\t this.mute = options.mute;\n\t };\n\t Tone.extend(Tone.Volume, Tone.AudioNode);\n\t /**\n\t\t * Defaults\n\t\t * @type {Object}\n\t\t * @const\n\t\t * @static\n\t\t */\n\t Tone.Volume.defaults = {\n\t 'volume': 0,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Volume#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * volume.mute = true;\n\t\t */\n\t Object.defineProperty(Tone.Volume.prototype, 'mute', {\n\t get: function () {\n\t return this.volume.value === -Infinity;\n\t },\n\t set: function (mute) {\n\t if (!this.mute && mute) {\n\t this._unmutedVolume = this.volume.value;\n\t //maybe it should ramp here?\n\t this.volume.value = -Infinity;\n\t } else if (this.mute && !mute) {\n\t this.volume.value = this._unmutedVolume;\n\t }\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Volume} this\n\t\t */\n\t Tone.Volume.prototype.dispose = function () {\n\t this.input.dispose();\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable('volume');\n\t this.volume.dispose();\n\t this.volume = null;\n\t return this;\n\t };\n\t return Tone.Volume;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A single master output which is connected to the\n\t\t * AudioDestinationNode (aka your speakers).\n\t\t * It provides useful conveniences such as the ability\n\t\t * to set the volume and mute the entire application.\n\t\t * It also gives you the ability to apply master effects to your application.\n\t\t * <br><br>\n\t\t * Like Tone.Transport, A single Tone.Master is created\n\t\t * on initialization and you do not need to explicitly construct one.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone}\n\t\t * @singleton\n\t\t * @example\n\t\t * //the audio will go from the oscillator to the speakers\n\t\t * oscillator.connect(Tone.Master);\n\t\t * //a convenience for connecting to the master output is also provided:\n\t\t * oscillator.toMaster();\n\t\t * //the above two examples are equivalent.\n\t\t */\n\t Tone.Master = function () {\n\t Tone.AudioNode.call(this);\n\t Tone.getContext(function () {\n\t this.createInsOuts(1, 0);\n\t /**\n\t\t\t\t * The private volume node\n\t\t\t\t * @type {Tone.Volume}\n\t\t\t\t * @private\n\t\t\t\t */\n\t this._volume = this.output = new Tone.Volume();\n\t /**\n\t\t\t\t * The volume of the master output.\n\t\t\t\t * @type {Decibels}\n\t\t\t\t * @signal\n\t\t\t\t */\n\t this.volume = this._volume.volume;\n\t this._readOnly('volume');\n\t //connections\n\t this.input.chain(this.output, this.context.destination);\n\t }.bind(this));\n\t };\n\t Tone.extend(Tone.Master, Tone.AudioNode);\n\t /**\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Master.defaults = {\n\t 'volume': 0,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Master#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * Tone.Master.mute = true;\n\t\t */\n\t Object.defineProperty(Tone.Master.prototype, 'mute', {\n\t get: function () {\n\t return this._volume.mute;\n\t },\n\t set: function (mute) {\n\t this._volume.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * Add a master effects chain. NOTE: this will disconnect any nodes which were previously\n\t\t * chained in the master effects chain.\n\t\t * @param {AudioNode|Tone} args... All arguments will be connected in a row\n\t\t * and the Master will be routed through it.\n\t\t * @return {Tone.Master} this\n\t\t * @example\n\t\t * //some overall compression to keep the levels in check\n\t\t * var masterCompressor = new Tone.Compressor({\n\t\t * \t\"threshold\" : -6,\n\t\t * \t\"ratio\" : 3,\n\t\t * \t\"attack\" : 0.5,\n\t\t * \t\"release\" : 0.1\n\t\t * });\n\t\t * //give a little boost to the lows\n\t\t * var lowBump = new Tone.Filter(200, \"lowshelf\");\n\t\t * //route everything through the filter\n\t\t * //and compressor before going to the speakers\n\t\t * Tone.Master.chain(lowBump, masterCompressor);\n\t\t */\n\t Tone.Master.prototype.chain = function () {\n\t this.input.disconnect();\n\t this.input.chain.apply(this.input, arguments);\n\t arguments[arguments.length - 1].connect(this.output);\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Master} this\n\t\t */\n\t Tone.Master.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable('volume');\n\t this._volume.dispose();\n\t this._volume = null;\n\t this.volume = null;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t //\tAUGMENT TONE's PROTOTYPE\n\t ///////////////////////////////////////////////////////////////////////////\n\t /**\n\t\t * Connect 'this' to the master output. Shorthand for this.connect(Tone.Master)\n\t\t * @returns {Tone.AudioNode} this\n\t\t * @example\n\t\t * //connect an oscillator to the master output\n\t\t * var osc = new Tone.Oscillator().toMaster();\n\t\t */\n\t Tone.AudioNode.prototype.toMaster = function () {\n\t this.connect(Tone.Master);\n\t return this;\n\t };\n\t if (window.AudioNode) {\n\t // Also augment AudioNode's prototype to include toMaster as a convenience\n\t AudioNode.prototype.toMaster = function () {\n\t this.connect(Tone.Master);\n\t return this;\n\t };\n\t }\n\t /**\n\t\t * initialize the module and listen for new audio contexts\n\t\t */\n\t var MasterConstructor = Tone.Master;\n\t Tone.Master = new MasterConstructor();\n\t Tone.Context.on('init', function (context) {\n\t // if it already exists, just restore it\n\t if (context.Master instanceof MasterConstructor) {\n\t Tone.Master = context.Master;\n\t } else {\n\t Tone.Master = new MasterConstructor();\n\t }\n\t context.Master = Tone.Master;\n\t });\n\t Tone.Context.on('close', function (context) {\n\t if (context.Master instanceof MasterConstructor) {\n\t context.Master.dispose();\n\t }\n\t });\n\t return Tone.Master;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Base class for sources. Sources have start/stop methods\n\t\t * and the ability to be synced to the\n\t\t * start/stop of Tone.Transport.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @example\n\t\t * //Multiple state change events can be chained together,\n\t\t * //but must be set in the correct order and with ascending times\n\t\t *\n\t\t * // OK\n\t\t * state.start().stop(\"+0.2\");\n\t\t * // AND\n\t\t * state.start().stop(\"+0.2\").start(\"+0.4\").stop(\"+0.7\")\n\t\t *\n\t\t * // BAD\n\t\t * state.stop(\"+0.2\").start();\n\t\t * // OR\n\t\t * state.start(\"+0.3\").stop(\"+0.2\");\n\t\t *\n\t\t */\n\t Tone.Source = function (options) {\n\t options = Tone.defaultArg(options, Tone.Source.defaults);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The output volume node\n\t\t\t * @type {Tone.Volume}\n\t\t\t * @private\n\t\t\t */\n\t this._volume = this.output = new Tone.Volume(options.volume);\n\t /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t this.volume = this._volume.volume;\n\t this._readOnly('volume');\n\t /**\n\t\t\t * \tKeep track of the scheduled state.\n\t\t\t * @type {Tone.TimelineState}\n\t\t\t * @private\n\t\t\t */\n\t this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t this._state.memory = 100;\n\t /**\n\t\t\t * The synced `start` callback function from the transport\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._synced = false;\n\t /**\n\t\t\t * Keep track of all of the scheduled event ids\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._scheduled = [];\n\t //make the output explicitly stereo\n\t this._volume.output.output.channelCount = 2;\n\t this._volume.output.output.channelCountMode = 'explicit';\n\t //mute initially\n\t this.mute = options.mute;\n\t };\n\t Tone.extend(Tone.Source, Tone.AudioNode);\n\t /**\n\t\t * The default parameters\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Source.defaults = {\n\t 'volume': 0,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.Source#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.Source.prototype, 'state', {\n\t get: function () {\n\t if (this._synced) {\n\t if (Tone.Transport.state === Tone.State.Started) {\n\t return this._state.getValueAtTime(Tone.Transport.seconds);\n\t } else {\n\t return Tone.State.Stopped;\n\t }\n\t } else {\n\t return this._state.getValueAtTime(this.now());\n\t }\n\t }\n\t });\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * source.mute = true;\n\t\t */\n\t Object.defineProperty(Tone.Source.prototype, 'mute', {\n\t get: function () {\n\t return this._volume.mute;\n\t },\n\t set: function (mute) {\n\t this._volume.mute = mute;\n\t }\n\t });\n\t //overwrite these functions\n\t Tone.Source.prototype._start = Tone.noOp;\n\t Tone.Source.prototype.restart = Tone.noOp;\n\t Tone.Source.prototype._stop = Tone.noOp;\n\t /**\n\t\t * Start the source at the specified time. If no time is given,\n\t\t * start the source now.\n\t\t * @param {Time} [time=now] When the source should be started.\n\t\t * @returns {Tone.Source} this\n\t\t * @example\n\t\t * source.start(\"+0.5\"); //starts the source 0.5 seconds from now\n\t\t */\n\t Tone.Source.prototype.start = function (time, offset, duration) {\n\t if (Tone.isUndef(time) && this._synced) {\n\t time = Tone.Transport.seconds;\n\t } else {\n\t time = this.toSeconds(time);\n\t }\n\t //if it's started, stop it and restart it\n\t if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t this._state.cancel(time);\n\t this._state.setStateAtTime(Tone.State.Started, time);\n\t this.restart(time, offset, duration);\n\t } else {\n\t this._state.setStateAtTime(Tone.State.Started, time);\n\t if (this._synced) {\n\t // add the offset time to the event\n\t var event = this._state.get(time);\n\t event.offset = Tone.defaultArg(offset, 0);\n\t event.duration = duration;\n\t var sched = Tone.Transport.schedule(function (t) {\n\t this._start(t, offset, duration);\n\t }.bind(this), time);\n\t this._scheduled.push(sched);\n\t //if it's already started\n\t if (Tone.Transport.state === Tone.State.Started) {\n\t this._syncedStart(this.now(), Tone.Transport.seconds);\n\t }\n\t } else {\n\t this._start.apply(this, arguments);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop the source at the specified time. If no time is given,\n\t\t * stop the source now.\n\t\t * @param {Time} [time=now] When the source should be stopped.\n\t\t * @returns {Tone.Source} this\n\t\t * @example\n\t\t * source.stop(); // stops the source immediately\n\t\t */\n\t Tone.Source.prototype.stop = function (time) {\n\t if (Tone.isUndef(time) && this._synced) {\n\t time = Tone.Transport.seconds;\n\t } else {\n\t time = this.toSeconds(time);\n\t }\n\t if (!this._synced) {\n\t this._stop.apply(this, arguments);\n\t } else {\n\t var sched = Tone.Transport.schedule(this._stop.bind(this), time);\n\t this._scheduled.push(sched);\n\t }\n\t this._state.cancel(time);\n\t this._state.setStateAtTime(Tone.State.Stopped, time);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the source to the Transport so that all subsequent\n\t\t * calls to `start` and `stop` are synced to the TransportTime\n\t\t * instead of the AudioContext time.\n\t\t *\n\t\t * @returns {Tone.Source} this\n\t\t * @example\n\t\t * //sync the source so that it plays between 0 and 0.3 on the Transport's timeline\n\t\t * source.sync().start(0).stop(0.3);\n\t\t * //start the transport.\n\t\t * Tone.Transport.start();\n\t\t *\n\t\t * @example\n\t\t * //start the transport with an offset and the sync'ed sources\n\t\t * //will start in the correct position\n\t\t * source.sync().start(0.1);\n\t\t * //the source will be invoked with an offset of 0.4\n\t\t * Tone.Transport.start(\"+0.5\", 0.5);\n\t\t */\n\t Tone.Source.prototype.sync = function () {\n\t this._synced = true;\n\t this._syncedStart = function (time, offset) {\n\t if (offset > 0) {\n\t // get the playback state at that time\n\t var stateEvent = this._state.get(offset);\n\t // listen for start events which may occur in the middle of the sync'ed time\n\t if (stateEvent && stateEvent.state === Tone.State.Started && stateEvent.time !== offset) {\n\t // get the offset\n\t var startOffset = offset - this.toSeconds(stateEvent.time);\n\t var duration;\n\t if (stateEvent.duration) {\n\t duration = this.toSeconds(stateEvent.duration) - startOffset;\n\t }\n\t this._start(time, this.toSeconds(stateEvent.offset) + startOffset, duration);\n\t }\n\t }\n\t }.bind(this);\n\t this._syncedStop = function (time) {\n\t if (this._state.getValueAtTime(Tone.Transport.seconds) === Tone.State.Started) {\n\t this._stop(time);\n\t }\n\t }.bind(this);\n\t Tone.Transport.on('start loopStart', this._syncedStart);\n\t Tone.Transport.on('stop pause loopEnd', this._syncedStop);\n\t return this;\n\t };\n\t /**\n\t\t * Unsync the source to the Transport. See Tone.Source.sync\n\t\t * @returns {Tone.Source} this\n\t\t */\n\t Tone.Source.prototype.unsync = function () {\n\t if (this._synced) {\n\t Tone.Transport.off('stop pause loopEnd', this._syncedStop);\n\t Tone.Transport.off('start loopStart', this._syncedStart);\n\t }\n\t this._synced = false;\n\t // clear all of the scheduled ids\n\t for (var i = 0; i < this._scheduled.length; i++) {\n\t var id = this._scheduled[i];\n\t Tone.Transport.clear(id);\n\t }\n\t this._scheduled = [];\n\t this._state.cancel(0);\n\t return this;\n\t };\n\t /**\n\t\t *\tClean up.\n\t\t * @return {Tone.Source} this\n\t\t */\n\t Tone.Source.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.unsync();\n\t this._scheduled = null;\n\t this._writable('volume');\n\t this._volume.dispose();\n\t this._volume = null;\n\t this.volume = null;\n\t this._state.dispose();\n\t this._state = null;\n\t };\n\t return Tone.Source;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * AudioBuffer.copyTo/FromChannel polyfill\n\t\t * @private\n\t\t */\n\t if (Tone.supported) {\n\t if (!AudioBuffer.prototype.copyToChannel) {\n\t AudioBuffer.prototype.copyToChannel = function (src, chanNum, start) {\n\t var channel = this.getChannelData(chanNum);\n\t start = start || 0;\n\t for (var i = 0; i < channel.length; i++) {\n\t channel[i + start] = src[i];\n\t }\n\t };\n\t AudioBuffer.prototype.copyFromChannel = function (dest, chanNum, start) {\n\t var channel = this.getChannelData(chanNum);\n\t start = start || 0;\n\t for (var i = 0; i < dest.length; i++) {\n\t dest[i] = channel[i + start];\n\t }\n\t };\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Buffer loading and storage. Tone.Buffer is used internally by all\n\t\t * classes that make requests for audio files such as Tone.Player,\n\t\t * Tone.Sampler and Tone.Convolver.\n\t\t *\n\t\t * Aside from load callbacks from individual buffers, Tone.Buffer\n\t\t * \t\tprovides events which keep track of the loading progress\n\t\t * \t\tof _all_ of the buffers. These are Tone.Buffer.on(\"load\" / \"progress\" / \"error\")\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone}\n\t\t * @param {AudioBuffer|String} url The url to load, or the audio buffer to set.\n\t\t * @param {Function=} onload A callback which is invoked after the buffer is loaded.\n\t\t * It's recommended to use `Tone.Buffer.on('load', callback)` instead\n\t\t * since it will give you a callback when _all_ buffers are loaded.\n\t\t * @param {Function=} onerror The callback to invoke if there is an error\n\t\t * @example\n\t\t * var buffer = new Tone.Buffer(\"path/to/sound.mp3\", function(){\n\t\t * \t//the buffer is now available.\n\t\t * \tvar buff = buffer.get();\n\t\t * });\n\t\t * @example\n\t\t * //can load provide fallback extension types if the first type is not supported.\n\t\t * var buffer = new Tone.Buffer(\"path/to/sound.[mp3|ogg|wav]\");\n\t\t */\n\t Tone.Buffer = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'url',\n\t 'onload',\n\t 'onerror'\n\t ], Tone.Buffer);\n\t Tone.call(this);\n\t /**\n\t\t\t * stores the loaded AudioBuffer\n\t\t\t * @type {AudioBuffer}\n\t\t\t * @private\n\t\t\t */\n\t this._buffer = null;\n\t /**\n\t\t\t * indicates if the buffer should be reversed or not\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t this._reversed = options.reverse;\n\t /**\n\t\t\t * The XHR\n\t\t\t * @type {XMLHttpRequest}\n\t\t\t * @private\n\t\t\t */\n\t this._xhr = null;\n\t /**\n\t\t\t * Private callback when the buffer is loaded.\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._onload = Tone.noOp;\n\t if (options.url instanceof AudioBuffer || options.url instanceof Tone.Buffer) {\n\t this.set(options.url);\n\t // invoke the onload callback\n\t if (options.onload) {\n\t if (this.loaded) {\n\t options.onload(this);\n\t } else {\n\t this._onload = options.onload;\n\t }\n\t }\n\t } else if (Tone.isString(options.url)) {\n\t this.load(options.url).then(options.onload).catch(options.onerror);\n\t }\n\t };\n\t Tone.extend(Tone.Buffer);\n\t /**\n\t\t * the default parameters\n\t\t * @type {Object}\n\t\t */\n\t Tone.Buffer.defaults = {\n\t 'url': undefined,\n\t 'reverse': false,\n\t 'onload': Tone.noOp,\n\t 'onerror': Tone.noOp\n\t };\n\t /**\n\t\t * Pass in an AudioBuffer or Tone.Buffer to set the value\n\t\t * of this buffer.\n\t\t * @param {AudioBuffer|Tone.Buffer} buffer the buffer\n\t\t * @returns {Tone.Buffer} this\n\t\t */\n\t Tone.Buffer.prototype.set = function (buffer) {\n\t if (buffer instanceof Tone.Buffer) {\n\t if (buffer.loaded) {\n\t this._buffer = buffer.get();\n\t } else {\n\t buffer._onload = function () {\n\t this.set(buffer);\n\t this._onload(this);\n\t }.bind(this);\n\t }\n\t } else {\n\t this._buffer = buffer;\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * @return {AudioBuffer} The audio buffer stored in the object.\n\t\t */\n\t Tone.Buffer.prototype.get = function () {\n\t return this._buffer;\n\t };\n\t /**\n\t\t * Makes an xhr reqest for the selected url then decodes\n\t\t * the file as an audio buffer. Invokes\n\t\t * the callback once the audio buffer loads.\n\t\t * @param {String} url The url of the buffer to load.\n\t\t * filetype support depends on the\n\t\t * browser.\n\t\t * @returns {Promise} returns a Promise which resolves with the Tone.Buffer\n\t\t */\n\t Tone.Buffer.prototype.load = function (url, onload, onerror) {\n\t var promise = new Promise(function (load, error) {\n\t this._xhr = Tone.Buffer.load(url, //success\n\t function (buff) {\n\t this._xhr = null;\n\t this.set(buff);\n\t load(this);\n\t this._onload(this);\n\t if (onload) {\n\t onload(this);\n\t }\n\t }.bind(this), //error\n\t function (err) {\n\t this._xhr = null;\n\t error(err);\n\t if (onerror) {\n\t onerror(err);\n\t }\n\t }.bind(this));\n\t }.bind(this));\n\t return promise;\n\t };\n\t /**\n\t\t * dispose and disconnect\n\t\t * @returns {Tone.Buffer} this\n\t\t */\n\t Tone.Buffer.prototype.dispose = function () {\n\t Tone.prototype.dispose.call(this);\n\t this._buffer = null;\n\t if (this._xhr) {\n\t Tone.Buffer._removeFromDownloadQueue(this._xhr);\n\t this._xhr.abort();\n\t this._xhr = null;\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * If the buffer is loaded or not\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Buffer.prototype, 'loaded', {\n\t get: function () {\n\t return this.length > 0;\n\t }\n\t });\n\t /**\n\t\t * The duration of the buffer.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name duration\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Buffer.prototype, 'duration', {\n\t get: function () {\n\t if (this._buffer) {\n\t return this._buffer.duration;\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The length of the buffer in samples\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Buffer.prototype, 'length', {\n\t get: function () {\n\t if (this._buffer) {\n\t return this._buffer.length;\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The number of discrete audio channels. Returns 0 if no buffer\n\t\t * is loaded.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name numberOfChannels\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Buffer.prototype, 'numberOfChannels', {\n\t get: function () {\n\t if (this._buffer) {\n\t return this._buffer.numberOfChannels;\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Set the audio buffer from the array. To create a multichannel AudioBuffer,\n\t\t * pass in a multidimensional array.\n\t\t * @param {Float32Array} array The array to fill the audio buffer\n\t\t * @return {Tone.Buffer} this\n\t\t */\n\t Tone.Buffer.prototype.fromArray = function (array) {\n\t var isMultidimensional = array[0].length > 0;\n\t var channels = isMultidimensional ? array.length : 1;\n\t var len = isMultidimensional ? array[0].length : array.length;\n\t var buffer = this.context.createBuffer(channels, len, this.context.sampleRate);\n\t if (!isMultidimensional && channels === 1) {\n\t array = [array];\n\t }\n\t for (var c = 0; c < channels; c++) {\n\t buffer.copyToChannel(array[c], c);\n\t }\n\t this._buffer = buffer;\n\t return this;\n\t };\n\t /**\n\t\t * \tSums muliple channels into 1 channel\n\t\t * @param {Number=} channel Optionally only copy a single channel from the array.\n\t\t * @return {Array}\n\t\t */\n\t Tone.Buffer.prototype.toMono = function (chanNum) {\n\t if (Tone.isNumber(chanNum)) {\n\t this.fromArray(this.toArray(chanNum));\n\t } else {\n\t var outputArray = new Float32Array(this.length);\n\t var numChannels = this.numberOfChannels;\n\t for (var channel = 0; channel < numChannels; channel++) {\n\t var channelArray = this.toArray(channel);\n\t for (var i = 0; i < channelArray.length; i++) {\n\t outputArray[i] += channelArray[i];\n\t }\n\t }\n\t //divide by the number of channels\n\t outputArray = outputArray.map(function (sample) {\n\t return sample / numChannels;\n\t });\n\t this.fromArray(outputArray);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * \tGet the buffer as an array. Single channel buffers will return a 1-dimensional\n\t\t * \tFloat32Array, and multichannel buffers will return multidimensional arrays.\n\t\t * @param {Number=} channel Optionally only copy a single channel from the array.\n\t\t * @return {Array}\n\t\t */\n\t Tone.Buffer.prototype.toArray = function (channel) {\n\t if (Tone.isNumber(channel)) {\n\t return this.getChannelData(channel);\n\t } else if (this.numberOfChannels === 1) {\n\t return this.toArray(0);\n\t } else {\n\t var ret = [];\n\t for (var c = 0; c < this.numberOfChannels; c++) {\n\t ret[c] = this.getChannelData(c);\n\t }\n\t return ret;\n\t }\n\t };\n\t /**\n\t\t * Returns the Float32Array representing the PCM audio data for the specific channel.\n\t\t * @param {Number} channel The channel number to return\n\t\t * @return {Float32Array} The audio as a TypedArray\n\t\t */\n\t Tone.Buffer.prototype.getChannelData = function (channel) {\n\t return this._buffer.getChannelData(channel);\n\t };\n\t /**\n\t\t * Cut a subsection of the array and return a buffer of the\n\t\t * subsection. Does not modify the original buffer\n\t\t * @param {Time} start The time to start the slice\n\t\t * @param {Time=} end The end time to slice. If none is given\n\t\t * will default to the end of the buffer\n\t\t * @return {Tone.Buffer} this\n\t\t */\n\t Tone.Buffer.prototype.slice = function (start, end) {\n\t end = Tone.defaultArg(end, this.duration);\n\t var startSamples = Math.floor(this.context.sampleRate * this.toSeconds(start));\n\t var endSamples = Math.floor(this.context.sampleRate * this.toSeconds(end));\n\t var replacement = [];\n\t for (var i = 0; i < this.numberOfChannels; i++) {\n\t replacement[i] = this.toArray(i).slice(startSamples, endSamples);\n\t }\n\t var retBuffer = new Tone.Buffer().fromArray(replacement);\n\t return retBuffer;\n\t };\n\t /**\n\t\t * Reverse the buffer.\n\t\t * @private\n\t\t * @return {Tone.Buffer} this\n\t\t */\n\t Tone.Buffer.prototype._reverse = function () {\n\t if (this.loaded) {\n\t for (var i = 0; i < this.numberOfChannels; i++) {\n\t Array.prototype.reverse.call(this.getChannelData(i));\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Reverse the buffer.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Boolean}\n\t\t * @name reverse\n\t\t */\n\t Object.defineProperty(Tone.Buffer.prototype, 'reverse', {\n\t get: function () {\n\t return this._reversed;\n\t },\n\t set: function (rev) {\n\t if (this._reversed !== rev) {\n\t this._reversed = rev;\n\t this._reverse();\n\t }\n\t }\n\t });\n\t ///////////////////////////////////////////////////////////////////////////\n\t // STATIC METHODS\n\t ///////////////////////////////////////////////////////////////////////////\n\t //statically inherits Emitter methods\n\t Tone.Emitter.mixin(Tone.Buffer);\n\t /**\n\t\t * the static queue for all of the xhr requests\n\t\t * @type {Array}\n\t\t * @private\n\t\t */\n\t Tone.Buffer._downloadQueue = [];\n\t /**\n\t\t * A path which is prefixed before every url.\n\t\t * @type {String}\n\t\t * @static\n\t\t */\n\t Tone.Buffer.baseUrl = '';\n\t /**\n\t\t * Create a Tone.Buffer from the array. To create a multichannel AudioBuffer,\n\t\t * pass in a multidimensional array.\n\t\t * @param {Float32Array} array The array to fill the audio buffer\n\t\t * @return {Tone.Buffer} A Tone.Buffer created from the array\n\t\t */\n\t Tone.Buffer.fromArray = function (array) {\n\t return new Tone.Buffer().fromArray(array);\n\t };\n\t /**\n\t\t * Creates a Tone.Buffer from a URL, returns a promise\n\t\t * which resolves to a Tone.Buffer\n\t\t * @param {String} url The url to load.\n\t\t * @return {Promise<Tone.Buffer>} A promise which resolves to a Tone.Buffer\n\t\t */\n\t Tone.Buffer.fromUrl = function (url) {\n\t var buffer = new Tone.Buffer();\n\t return buffer.load(url).then(function () {\n\t return buffer;\n\t });\n\t };\n\t /**\n\t\t * Remove an xhr request from the download queue\n\t\t * @private\n\t\t */\n\t Tone.Buffer._removeFromDownloadQueue = function (request) {\n\t var index = Tone.Buffer._downloadQueue.indexOf(request);\n\t if (index !== -1) {\n\t Tone.Buffer._downloadQueue.splice(index, 1);\n\t }\n\t };\n\t /**\n\t\t * Loads a url using XMLHttpRequest.\n\t\t * @param {String} url\n\t\t * @param {Function} onload\n\t\t * @param {Function} onerror\n\t\t * @param {Function} onprogress\n\t\t * @return {XMLHttpRequest}\n\t\t */\n\t Tone.Buffer.load = function (url, onload, onerror) {\n\t //default\n\t onload = Tone.defaultArg(onload, Tone.noOp);\n\t // test if the url contains multiple extensions\n\t var matches = url.match(/\\[(.+\\|?)+\\]$/);\n\t if (matches) {\n\t var extensions = matches[1].split('|');\n\t var extension = extensions[0];\n\t for (var i = 0; i < extensions.length; i++) {\n\t if (Tone.Buffer.supportsType(extensions[i])) {\n\t extension = extensions[i];\n\t break;\n\t }\n\t }\n\t url = url.replace(matches[0], extension);\n\t }\n\t function onError(e) {\n\t Tone.Buffer._removeFromDownloadQueue(request);\n\t Tone.Buffer.emit('error', e);\n\t if (onerror) {\n\t onerror(e);\n\t } else {\n\t throw e;\n\t }\n\t }\n\t function onProgress() {\n\t //calculate the progress\n\t var totalProgress = 0;\n\t for (var i = 0; i < Tone.Buffer._downloadQueue.length; i++) {\n\t totalProgress += Tone.Buffer._downloadQueue[i].progress;\n\t }\n\t Tone.Buffer.emit('progress', totalProgress / Tone.Buffer._downloadQueue.length);\n\t }\n\t var request = new XMLHttpRequest();\n\t request.open('GET', Tone.Buffer.baseUrl + url, true);\n\t request.responseType = 'arraybuffer';\n\t //start out as 0\n\t request.progress = 0;\n\t Tone.Buffer._downloadQueue.push(request);\n\t request.addEventListener('load', function () {\n\t if (request.status === 200) {\n\t Tone.context.decodeAudioData(request.response).then(function (buff) {\n\t request.progress = 1;\n\t onProgress();\n\t onload(buff);\n\t Tone.Buffer._removeFromDownloadQueue(request);\n\t if (Tone.Buffer._downloadQueue.length === 0) {\n\t //emit the event at the end\n\t Tone.Buffer.emit('load');\n\t }\n\t }).catch(function () {\n\t Tone.Buffer._removeFromDownloadQueue(request);\n\t onError('Tone.Buffer: could not decode audio data: ' + url);\n\t });\n\t } else {\n\t onError('Tone.Buffer: could not locate file: ' + url);\n\t }\n\t });\n\t request.addEventListener('error', onError);\n\t request.addEventListener('progress', function (event) {\n\t if (event.lengthComputable) {\n\t //only go to 95%, the last 5% is when the audio is decoded\n\t request.progress = event.loaded / event.total * 0.95;\n\t onProgress();\n\t }\n\t });\n\t request.send();\n\t return request;\n\t };\n\t /**\n\t\t * Stop all of the downloads in progress\n\t\t * @return {Tone.Buffer}\n\t\t * @static\n\t\t */\n\t Tone.Buffer.cancelDownloads = function () {\n\t Tone.Buffer._downloadQueue.slice().forEach(function (request) {\n\t Tone.Buffer._removeFromDownloadQueue(request);\n\t request.abort();\n\t });\n\t return Tone.Buffer;\n\t };\n\t /**\n\t\t * Checks a url's extension to see if the current browser can play that file type.\n\t\t * @param {String} url The url/extension to test\n\t\t * @return {Boolean} If the file extension can be played\n\t\t * @static\n\t\t * @example\n\t\t * Tone.Buffer.supportsType(\"wav\"); //returns true\n\t\t * Tone.Buffer.supportsType(\"path/to/file.wav\"); //returns true\n\t\t */\n\t Tone.Buffer.supportsType = function (url) {\n\t var extension = url.split('.');\n\t extension = extension[extension.length - 1];\n\t var response = document.createElement('audio').canPlayType('audio/' + extension);\n\t return response !== '';\n\t };\n\t /**\n\t\t * Returns a Promise which resolves when all of the buffers have loaded\n\t\t * @return {Promise}\n\t\t */\n\t Tone.loaded = function () {\n\t var onload, onerror;\n\t function removeEvents() {\n\t //remove the events when it's resolved\n\t Tone.Buffer.off('load', onload);\n\t Tone.Buffer.off('error', onerror);\n\t }\n\t return new Promise(function (success, fail) {\n\t onload = function () {\n\t success();\n\t };\n\t onerror = function () {\n\t fail();\n\t };\n\t //add the event listeners\n\t Tone.Buffer.on('load', onload);\n\t Tone.Buffer.on('error', onerror);\n\t }).then(removeEvents).catch(function (e) {\n\t removeEvents();\n\t throw new Error(e);\n\t });\n\t };\n\t return Tone.Buffer;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Wrapper around the native fire-and-forget OscillatorNode. Adds the\n\t\t * ability to reschedule the stop method.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {AudioBuffer|Tone.Buffer} buffer The buffer to play\n\t\t * @param {Function} onload The callback to invoke when the\n\t\t * buffer is done playing.\n\t\t */\n\t Tone.OscillatorNode = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type'\n\t ], Tone.OscillatorNode);\n\t Tone.AudioNode.call(this, options);\n\t /**\n\t\t\t * The callback to invoke after the\n\t\t\t * buffer source is done playing.\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.onended = options.onended;\n\t /**\n\t\t\t * The oscillator start time\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._startTime = -1;\n\t /**\n\t\t\t * The oscillator stop time\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._stopTime = -1;\n\t /**\n\t\t\t * The gain node which envelopes the OscillatorNode\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._gainNode = this.output = new Tone.Gain();\n\t this._gainNode.gain.setValueAtTime(0, this.context.currentTime);\n\t /**\n\t\t\t * The oscillator\n\t\t\t * @type {OscillatorNode}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillator = this.context.createOscillator();\n\t this._oscillator.connect(this._gainNode);\n\t this.type = options.type;\n\t /**\n\t\t\t * The frequency of the oscillator\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Param(this._oscillator.frequency, Tone.Type.Frequency);\n\t this.frequency.value = options.frequency;\n\t /**\n\t\t\t * The detune of the oscillator\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Param(this._oscillator.detune, Tone.Type.Cents);\n\t this.detune.value = options.detune;\n\t /**\n\t\t\t * The value that the buffer ramps to\n\t\t\t * @type {Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._gain = 1;\n\t };\n\t Tone.extend(Tone.OscillatorNode, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.OscillatorNode.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'type': 'sine',\n\t 'onended': Tone.noOp\n\t };\n\t /**\n\t\t * Returns the playback state of the oscillator, either \"started\" or \"stopped\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.OscillatorNode#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.OscillatorNode.prototype, 'state', {\n\t get: function () {\n\t return this.getStateAtTime(this.now());\n\t }\n\t });\n\t Tone.OscillatorNode.prototype.getStateAtTime = function (time) {\n\t if (this._startTime !== -1 && time >= this._startTime && (this._stopTime === -1 || time <= this._stopTime)) {\n\t return Tone.State.Started;\n\t } else {\n\t return Tone.State.Stopped;\n\t }\n\t };\n\t /**\n\t * Start the oscillator node at the given time\n\t * @param {Time=} time When to start the oscillator\n\t * @return {OscillatorNode} this\n\t */\n\t Tone.OscillatorNode.prototype.start = function (time) {\n\t if (this._startTime === -1) {\n\t this._startTime = this.toSeconds(time);\n\t this._oscillator.start(this._startTime);\n\t var now = this.context.currentTime;\n\t this._gainNode.gain.cancelScheduledValues(now);\n\t this._gainNode.gain.setValueAtTime(0, now);\n\t this._gainNode.gain.setValueAtTime(1, this._startTime);\n\t } else {\n\t throw new Error('cannot call OscillatorNode.start more than once');\n\t }\n\t return this;\n\t };\n\t /**\n\t * Sets an arbitrary custom periodic waveform given a PeriodicWave.\n\t * @param {PeriodicWave} periodicWave PeriodicWave should be created with context.createPeriodicWave\n\t * @return {OscillatorNode} this\n\t */\n\t Tone.OscillatorNode.prototype.setPeriodicWave = function (periodicWave) {\n\t this._oscillator.setPeriodicWave(periodicWave);\n\t return this;\n\t };\n\t /**\n\t * Stop the oscillator node at the given time\n\t * @param {Time=} time When to stop the oscillator\n\t * @return {OscillatorNode} this\n\t */\n\t Tone.OscillatorNode.prototype.stop = function (time) {\n\t //cancel the previous stop\n\t this.cancelStop();\n\t //reschedule it\n\t this._stopTime = this.toSeconds(time);\n\t this._gainNode.gain.setValueAtTime(0, this._stopTime);\n\t this.context.clearTimeout(this._timeout);\n\t this._timeout = this.context.setTimeout(function () {\n\t this._oscillator.stop(this.now());\n\t this.onended();\n\t }.bind(this), this._stopTime - this.now());\n\t return this;\n\t };\n\t Tone.OscillatorNode.prototype.cancelStop = function () {\n\t if (this._startTime !== -1) {\n\t //cancel the stop envelope\n\t this._gainNode.gain.cancelScheduledValues(this._startTime + this.sampleTime);\n\t this._gainNode.gain.setValueAtTime(1, Math.max(this.now(), this._startTime));\n\t this.context.clearTimeout(this._timeout);\n\t this._stopTime = -1;\n\t }\n\t };\n\t /**\n\t\t * The oscillator type. Either 'sine', 'sawtooth', 'square', or 'triangle'\n\t\t * @memberOf Tone.OscillatorNode#\n\t\t * @type {Time}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.OscillatorNode.prototype, 'type', {\n\t get: function () {\n\t return this._oscillator.type;\n\t },\n\t set: function (type) {\n\t this._oscillator.type = type;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.OscillatorNode} this\n\t\t */\n\t Tone.OscillatorNode.prototype.dispose = function () {\n\t this.context.clearTimeout(this._timeout);\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.onended = null;\n\t this._oscillator.disconnect();\n\t this._oscillator = null;\n\t this._gainNode.dispose();\n\t this._gainNode = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t return this;\n\t };\n\t return Tone.OscillatorNode;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Oscillator supports a number of features including\n\t\t * phase rotation, multiple oscillator types (see Tone.Oscillator.type),\n\t\t * and Transport syncing (see Tone.Oscillator.syncFrequency).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Source}\n\t\t * @param {Frequency} [frequency] Starting frequency\n\t\t * @param {string} [type] The oscillator type. Read more about type below.\n\t\t * @example\n\t\t * //make and start a 440hz sine tone\n\t\t * var osc = new Tone.Oscillator(440, \"sine\").toMaster().start();\n\t\t */\n\t Tone.Oscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type'\n\t ], Tone.Oscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * the main oscillator\n\t\t\t * @type {OscillatorNode}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillator = null;\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune control signal.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t /**\n\t\t\t * the periodic wave\n\t\t\t * @type {PeriodicWave}\n\t\t\t * @private\n\t\t\t */\n\t this._wave = null;\n\t /**\n\t\t\t * The partials of the oscillator\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._partials = Tone.defaultArg(options.partials, [1]);\n\t /**\n\t\t\t * the phase of the oscillator\n\t\t\t * between 0 - 360\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._phase = options.phase;\n\t /**\n\t\t\t * the type of the oscillator\n\t\t\t * @type {string}\n\t\t\t * @private\n\t\t\t */\n\t this._type = null;\n\t //setup\n\t this.type = options.type;\n\t this.phase = this._phase;\n\t this._readOnly([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.Oscillator, Tone.Source);\n\t /**\n\t\t * the default parameters\n\t\t * @type {Object}\n\t\t */\n\t Tone.Oscillator.defaults = {\n\t 'type': 'sine',\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'partials': []\n\t };\n\t /**\n\t\t * The Oscillator types\n\t\t * @enum {String}\n\t\t */\n\t Tone.Oscillator.Type = {\n\t Sine: 'sine',\n\t Triangle: 'triangle',\n\t Sawtooth: 'sawtooth',\n\t Square: 'square',\n\t Custom: 'custom'\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now]\n\t\t * @private\n\t\t */\n\t Tone.Oscillator.prototype._start = function (time) {\n\t //new oscillator with previous values\n\t this._oscillator = new Tone.OscillatorNode();\n\t if (this._wave) {\n\t this._oscillator.setPeriodicWave(this._wave);\n\t } else {\n\t this._oscillator.type = this._type;\n\t }\n\t //connect the control signal to the oscillator frequency & detune\n\t this._oscillator.connect(this.output);\n\t this.frequency.connect(this._oscillator.frequency);\n\t this.detune.connect(this._oscillator.detune);\n\t //start the oscillator\n\t time = this.toSeconds(time);\n\t Tone.isPast(time);\n\t this._oscillator.start(time);\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @private\n\t\t * @param {Time} [time=now] (optional) timing parameter\n\t\t * @returns {Tone.Oscillator} this\n\t\t */\n\t Tone.Oscillator.prototype._stop = function (time) {\n\t if (this._oscillator) {\n\t time = this.toSeconds(time);\n\t Tone.isPast(time);\n\t this._oscillator.stop(time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Restart the oscillator. Does not stop the oscillator, but instead\n\t\t * just cancels any scheduled 'stop' from being invoked.\n\t\t * @param {Time=} time\n\t\t * @return {Tone.Oscillator} this\n\t\t */\n\t Tone.Oscillator.prototype.restart = function (time) {\n\t this._oscillator.cancelStop();\n\t this._state.cancel(this.toSeconds(time));\n\t return this;\n\t };\n\t /**\n\t\t * Sync the signal to the Transport's bpm. Any changes to the transports bpm,\n\t\t * will also affect the oscillators frequency.\n\t\t * @returns {Tone.Oscillator} this\n\t\t * @example\n\t\t * Tone.Transport.bpm.value = 120;\n\t\t * osc.frequency.value = 440;\n\t\t * //the ration between the bpm and the frequency will be maintained\n\t\t * osc.syncFrequency();\n\t\t * Tone.Transport.bpm.value = 240;\n\t\t * // the frequency of the oscillator is doubled to 880\n\t\t */\n\t Tone.Oscillator.prototype.syncFrequency = function () {\n\t Tone.Transport.syncSignal(this.frequency);\n\t return this;\n\t };\n\t /**\n\t\t * Unsync the oscillator's frequency from the Transport.\n\t\t * See Tone.Oscillator.syncFrequency\n\t\t * @returns {Tone.Oscillator} this\n\t\t */\n\t Tone.Oscillator.prototype.unsyncFrequency = function () {\n\t Tone.Transport.unsyncSignal(this.frequency);\n\t return this;\n\t };\n\t /**\n\t\t * The type of the oscillator: either sine, square, triangle, or sawtooth. Also capable of\n\t\t * setting the first x number of partials of the oscillator. For example: \"sine4\" would\n\t\t * set be the first 4 partials of the sine wave and \"triangle8\" would set the first\n\t\t * 8 partials of the triangle wave.\n\t\t * <br><br>\n\t\t * Uses PeriodicWave internally even for native types so that it can set the phase.\n\t\t * PeriodicWave equations are from the\n\t\t * [Webkit Web Audio implementation](https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp&sq=package:chromium).\n\t\t *\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t * @example\n\t\t * //set it to a square wave\n\t\t * osc.type = \"square\";\n\t\t * @example\n\t\t * //set the first 6 partials of a sawtooth wave\n\t\t * osc.type = \"sawtooth6\";\n\t\t */\n\t Object.defineProperty(Tone.Oscillator.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t var isBasicType = [\n\t Tone.Oscillator.Type.Sine,\n\t Tone.Oscillator.Type.Square,\n\t Tone.Oscillator.Type.Triangle,\n\t Tone.Oscillator.Type.Sawtooth\n\t ].includes(type);\n\t if (this._phase === 0 && isBasicType) {\n\t this._wave = null;\n\t //just go with the basic approach\n\t if (this._oscillator !== null) {\n\t this._oscillator.type === type;\n\t }\n\t } else {\n\t var coefs = this._getRealImaginary(type, this._phase);\n\t var periodicWave = this.context.createPeriodicWave(coefs[0], coefs[1]);\n\t this._wave = periodicWave;\n\t if (this._oscillator !== null) {\n\t this._oscillator.setPeriodicWave(this._wave);\n\t }\n\t }\n\t this._type = type;\n\t }\n\t });\n\t /**\n\t\t * Returns the real and imaginary components based\n\t\t * on the oscillator type.\n\t\t * @returns {Array} [real, imaginary]\n\t\t * @private\n\t\t */\n\t Tone.Oscillator.prototype._getRealImaginary = function (type, phase) {\n\t var fftSize = 4096;\n\t var periodicWaveSize = fftSize / 2;\n\t var real = new Float32Array(periodicWaveSize);\n\t var imag = new Float32Array(periodicWaveSize);\n\t var partialCount = 1;\n\t if (type === Tone.Oscillator.Type.Custom) {\n\t partialCount = this._partials.length + 1;\n\t periodicWaveSize = partialCount;\n\t } else {\n\t var partial = /^(sine|triangle|square|sawtooth)(\\d+)$/.exec(type);\n\t if (partial) {\n\t partialCount = parseInt(partial[2]) + 1;\n\t type = partial[1];\n\t partialCount = Math.max(partialCount, 2);\n\t periodicWaveSize = partialCount;\n\t }\n\t }\n\t for (var n = 1; n < periodicWaveSize; ++n) {\n\t var piFactor = 2 / (n * Math.PI);\n\t var b;\n\t switch (type) {\n\t case Tone.Oscillator.Type.Sine:\n\t b = n <= partialCount ? 1 : 0;\n\t break;\n\t case Tone.Oscillator.Type.Square:\n\t b = n & 1 ? 2 * piFactor : 0;\n\t break;\n\t case Tone.Oscillator.Type.Sawtooth:\n\t b = piFactor * (n & 1 ? 1 : -1);\n\t break;\n\t case Tone.Oscillator.Type.Triangle:\n\t if (n & 1) {\n\t b = 2 * (piFactor * piFactor) * (n - 1 >> 1 & 1 ? -1 : 1);\n\t } else {\n\t b = 0;\n\t }\n\t break;\n\t case Tone.Oscillator.Type.Custom:\n\t b = this._partials[n - 1];\n\t break;\n\t default:\n\t throw new TypeError('Tone.Oscillator: invalid type: ' + type);\n\t }\n\t if (b !== 0) {\n\t real[n] = -b * Math.sin(phase * n);\n\t imag[n] = b * Math.cos(phase * n);\n\t } else {\n\t real[n] = 0;\n\t imag[n] = 0;\n\t }\n\t }\n\t return [\n\t real,\n\t imag\n\t ];\n\t };\n\t /**\n\t\t * Compute the inverse FFT for a given phase.\n\t\t * @param {Float32Array} real\n\t\t * @param {Float32Array} imag\n\t\t * @param {NormalRange} phase\n\t\t * @return {AudioRange}\n\t\t * @private\n\t\t */\n\t Tone.Oscillator.prototype._inverseFFT = function (real, imag, phase) {\n\t var sum = 0;\n\t var len = real.length;\n\t for (var i = 0; i < len; i++) {\n\t sum += real[i] * Math.cos(i * phase) + imag[i] * Math.sin(i * phase);\n\t }\n\t return sum;\n\t };\n\t /**\n\t\t * Returns the initial value of the oscillator.\n\t\t * @return {AudioRange}\n\t\t * @private\n\t\t */\n\t Tone.Oscillator.prototype._getInitialValue = function () {\n\t var coefs = this._getRealImaginary(this._type, 0);\n\t var real = coefs[0];\n\t var imag = coefs[1];\n\t var maxValue = 0;\n\t var twoPi = Math.PI * 2;\n\t //check for peaks in 8 places\n\t for (var i = 0; i < 8; i++) {\n\t maxValue = Math.max(this._inverseFFT(real, imag, i / 8 * twoPi), maxValue);\n\t }\n\t return -this._inverseFFT(real, imag, this._phase) / maxValue;\n\t };\n\t /**\n\t\t * The partials of the waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t Object.defineProperty(Tone.Oscillator.prototype, 'partials', {\n\t get: function () {\n\t if (this._type !== Tone.Oscillator.Type.Custom) {\n\t return [];\n\t } else {\n\t return this._partials;\n\t }\n\t },\n\t set: function (partials) {\n\t this._partials = partials;\n\t this.type = Tone.Oscillator.Type.Custom;\n\t }\n\t });\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t * @example\n\t\t * osc.phase = 180; //flips the phase of the oscillator\n\t\t */\n\t Object.defineProperty(Tone.Oscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._phase * (180 / Math.PI);\n\t },\n\t set: function (phase) {\n\t this._phase = phase * Math.PI / 180;\n\t //reset the type\n\t this.type = this._type;\n\t }\n\t });\n\t /**\n\t\t * Dispose and disconnect.\n\t\t * @return {Tone.Oscillator} this\n\t\t */\n\t Tone.Oscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t if (this._oscillator !== null) {\n\t this._oscillator.dispose();\n\t this._oscillator = null;\n\t }\n\t this._wave = null;\n\t this._writable([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t this._partials = null;\n\t return this;\n\t };\n\t return Tone.Oscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class AudioToGain converts an input in AudioRange [-1,1] to NormalRange [0,1]. \n\t\t * See Tone.GainToAudio.\n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @example\n\t\t * var a2g = new Tone.AudioToGain();\n\t\t */\n\t Tone.AudioToGain = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {\n\t return (x + 1) / 2;\n\t });\n\t };\n\t Tone.extend(Tone.AudioToGain, Tone.SignalBase);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.AudioToGain} this\n\t\t */\n\t Tone.AudioToGain.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._norm.dispose();\n\t this._norm = null;\n\t return this;\n\t };\n\t return Tone.AudioToGain;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Zero outputs 0's at audio-rate. The reason this has to be\n\t\t * it's own class is that many browsers optimize out Tone.Signal\n\t\t * with a value of 0 and will not process nodes further down the graph.\n\t\t * @extends {Tone.SignalBase}\n\t\t */\n\t Tone.Zero = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * The gain node\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._gain = this.input = this.output = new Tone.Gain();\n\t this.context.getConstant(0).connect(this._gain);\n\t };\n\t Tone.extend(Tone.Zero, Tone.SignalBase);\n\t /**\n\t\t * clean up\n\t\t * @return {Tone.Zero} this\n\t\t */\n\t Tone.Zero.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._gain.dispose();\n\t this._gain = null;\n\t return this;\n\t };\n\t return Tone.Zero;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class LFO stands for low frequency oscillator. Tone.LFO produces an output signal\n\t\t * which can be attached to an AudioParam or Tone.Signal\n\t\t * in order to modulate that parameter with an oscillator. The LFO can\n\t\t * also be synced to the transport to start/stop and change when the tempo changes.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Frequency|Object} [frequency] The frequency of the oscillation. Typically, LFOs will be\n\t\t * in the frequency range of 0.1 to 10 hertz.\n\t\t * @param {number=} min The minimum output value of the LFO.\n\t\t * @param {number=} max The maximum value of the LFO.\n\t\t * @example\n\t\t * var lfo = new Tone.LFO(\"4n\", 400, 4000);\n\t\t * lfo.connect(filter.frequency);\n\t\t */\n\t Tone.LFO = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'min',\n\t 'max'\n\t ], Tone.LFO);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The oscillator.\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillator = new Tone.Oscillator({\n\t 'frequency': options.frequency,\n\t 'type': options.type\n\t });\n\t /**\n\t\t\t * the lfo's frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._oscillator.frequency;\n\t /**\n\t\t\t * The amplitude of the LFO, which controls the output range between\n\t\t\t * the min and max output. For example if the min is -10 and the max\n\t\t\t * is 10, setting the amplitude to 0.5 would make the LFO modulate\n\t\t\t * between -5 and 5.\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t this.amplitude = this._oscillator.volume;\n\t this.amplitude.units = Tone.Type.NormalRange;\n\t this.amplitude.value = options.amplitude;\n\t /**\n\t\t\t * The signal which is output when the LFO is stopped\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t this._stoppedSignal = new Tone.Signal(0, Tone.Type.AudioRange);\n\t /**\n\t\t\t * Just outputs zeros.\n\t\t\t * @type {Tone.Zero}\n\t\t\t * @private\n\t\t\t */\n\t this._zeros = new Tone.Zero();\n\t /**\n\t\t\t * The value that the LFO outputs when it's stopped\n\t\t\t * @type {AudioRange}\n\t\t\t * @private\n\t\t\t */\n\t this._stoppedValue = 0;\n\t /**\n\t\t\t * @type {Tone.AudioToGain}\n\t\t\t * @private\n\t\t\t */\n\t this._a2g = new Tone.AudioToGain();\n\t /**\n\t\t\t * @type {Tone.Scale}\n\t\t\t * @private\n\t\t\t */\n\t this._scaler = this.output = new Tone.Scale(options.min, options.max);\n\t /**\n\t\t\t * the units of the LFO (used for converting)\n\t\t\t * @type {Tone.Type}\n\t\t\t * @private\n\t\t\t */\n\t this._units = Tone.Type.Default;\n\t this.units = options.units;\n\t //connect it up\n\t this._oscillator.chain(this._a2g, this._scaler);\n\t this._zeros.connect(this._a2g);\n\t this._stoppedSignal.connect(this._a2g);\n\t this._readOnly([\n\t 'amplitude',\n\t 'frequency'\n\t ]);\n\t this.phase = options.phase;\n\t };\n\t Tone.extend(Tone.LFO, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t *\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.LFO.defaults = {\n\t 'type': 'sine',\n\t 'min': 0,\n\t 'max': 1,\n\t 'phase': 0,\n\t 'frequency': '4n',\n\t 'amplitude': 1,\n\t 'units': Tone.Type.Default\n\t };\n\t /**\n\t\t * Start the LFO.\n\t\t * @param {Time} [time=now] the time the LFO will start\n\t\t * @returns {Tone.LFO} this\n\t\t */\n\t Tone.LFO.prototype.start = function (time) {\n\t time = this.toSeconds(time);\n\t this._stoppedSignal.setValueAtTime(0, time);\n\t this._oscillator.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the LFO.\n\t\t * @param {Time} [time=now] the time the LFO will stop\n\t\t * @returns {Tone.LFO} this\n\t\t */\n\t Tone.LFO.prototype.stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._stoppedSignal.setValueAtTime(this._stoppedValue, time);\n\t this._oscillator.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the start/stop/pause to the transport\n\t\t * and the frequency to the bpm of the transport\n\t\t * @returns {Tone.LFO} this\n\t\t * @example\n\t\t * lfo.frequency.value = \"8n\";\n\t\t * lfo.sync().start(0)\n\t\t * //the rate of the LFO will always be an eighth note,\n\t\t * //even as the tempo changes\n\t\t */\n\t Tone.LFO.prototype.sync = function () {\n\t this._oscillator.sync();\n\t this._oscillator.syncFrequency();\n\t return this;\n\t };\n\t /**\n\t\t * unsync the LFO from transport control\n\t\t * @returns {Tone.LFO} this\n\t\t */\n\t Tone.LFO.prototype.unsync = function () {\n\t this._oscillator.unsync();\n\t this._oscillator.unsyncFrequency();\n\t return this;\n\t };\n\t /**\n\t\t * The miniumum output of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'min', {\n\t get: function () {\n\t return this._toUnits(this._scaler.min);\n\t },\n\t set: function (min) {\n\t min = this._fromUnits(min);\n\t this._scaler.min = min;\n\t }\n\t });\n\t /**\n\t\t * The maximum output of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'max', {\n\t get: function () {\n\t return this._toUnits(this._scaler.max);\n\t },\n\t set: function (max) {\n\t max = this._fromUnits(max);\n\t this._scaler.max = max;\n\t }\n\t });\n\t /**\n\t\t * The type of the oscillator: sine, square, sawtooth, triangle.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'type', {\n\t get: function () {\n\t return this._oscillator.type;\n\t },\n\t set: function (type) {\n\t this._oscillator.type = type;\n\t this._stoppedValue = this._oscillator._getInitialValue();\n\t this._stoppedSignal.value = this._stoppedValue;\n\t }\n\t });\n\t /**\n\t\t * The phase of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'phase', {\n\t get: function () {\n\t return this._oscillator.phase;\n\t },\n\t set: function (phase) {\n\t this._oscillator.phase = phase;\n\t this._stoppedValue = this._oscillator._getInitialValue();\n\t this._stoppedSignal.value = this._stoppedValue;\n\t }\n\t });\n\t /**\n\t\t * The output units of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {Tone.Type}\n\t\t * @name units\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'units', {\n\t get: function () {\n\t return this._units;\n\t },\n\t set: function (val) {\n\t var currentMin = this.min;\n\t var currentMax = this.max;\n\t //convert the min and the max\n\t this._units = val;\n\t this.min = currentMin;\n\t this.max = currentMax;\n\t }\n\t });\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {Boolean}\n\t\t * @name mute\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'mute', {\n\t get: function () {\n\t return this._oscillator.mute;\n\t },\n\t set: function (mute) {\n\t this._oscillator.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.LFO#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.LFO.prototype, 'state', {\n\t get: function () {\n\t return this._oscillator.state;\n\t }\n\t });\n\t /**\n\t\t * Connect the output of the LFO to an AudioParam, AudioNode, or Tone Node.\n\t\t * Tone.LFO will automatically convert to the destination units of the\n\t\t * will get the units from the connected node.\n\t\t * @param {Tone | AudioParam | AudioNode} node\n\t\t * @param {number} [outputNum=0] optionally which output to connect from\n\t\t * @param {number} [inputNum=0] optionally which input to connect to\n\t\t * @returns {Tone.LFO} this\n\t\t * @private\n\t\t */\n\t Tone.LFO.prototype.connect = function (node) {\n\t if (node.constructor === Tone.Signal || node.constructor === Tone.Param) {\n\t this.convert = node.convert;\n\t this.units = node.units;\n\t }\n\t Tone.SignalBase.prototype.connect.apply(this, arguments);\n\t return this;\n\t };\n\t /**\n\t\t * private method borrowed from Param converts\n\t\t * units from their destination value\n\t\t * @function\n\t\t * @private\n\t\t */\n\t Tone.LFO.prototype._fromUnits = Tone.Param.prototype._fromUnits;\n\t /**\n\t\t * private method borrowed from Param converts\n\t\t * units to their destination value\n\t\t * @function\n\t\t * @private\n\t\t */\n\t Tone.LFO.prototype._toUnits = Tone.Param.prototype._toUnits;\n\t /**\n\t\t * disconnect and dispose\n\t\t * @returns {Tone.LFO} this\n\t\t */\n\t Tone.LFO.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'amplitude',\n\t 'frequency'\n\t ]);\n\t this._oscillator.dispose();\n\t this._oscillator = null;\n\t this._stoppedSignal.dispose();\n\t this._stoppedSignal = null;\n\t this._zeros.dispose();\n\t this._zeros = null;\n\t this._scaler.dispose();\n\t this._scaler = null;\n\t this._a2g.dispose();\n\t this._a2g = null;\n\t this.frequency = null;\n\t this.amplitude = null;\n\t return this;\n\t };\n\t return Tone.LFO;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Limiter will limit the loudness of an incoming signal.\n\t\t * It is composed of a Tone.Compressor with a fast attack\n\t\t * and release. Limiters are commonly used to safeguard against\n\t\t * signal clipping. Unlike a compressor, limiters do not provide\n\t\t * smooth gain reduction and almost completely prevent\n\t\t * additional gain above the threshold.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {number} threshold The theshold above which the limiting is applied.\n\t\t * @example\n\t\t * var limiter = new Tone.Limiter(-6);\n\t\t */\n\t Tone.Limiter = function () {\n\t var options = Tone.defaults(arguments, ['threshold'], Tone.Limiter);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * the compressor\n\t\t\t * @private\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this._compressor = this.input = this.output = new Tone.Compressor({\n\t 'attack': 0.001,\n\t 'decay': 0.001,\n\t 'threshold': options.threshold\n\t });\n\t /**\n\t\t\t * The threshold of of the limiter\n\t\t\t * @type {Decibel}\n\t\t\t * @signal\n\t\t\t */\n\t this.threshold = this._compressor.threshold;\n\t this._readOnly('threshold');\n\t };\n\t Tone.extend(Tone.Limiter, Tone.AudioNode);\n\t /**\n\t\t * The default value\n\t\t * @type {Object}\n\t\t * @const\n\t\t * @static\n\t\t */\n\t Tone.Limiter.defaults = { 'threshold': -12 };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Limiter} this\n\t\t */\n\t Tone.Limiter.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._compressor.dispose();\n\t this._compressor = null;\n\t this._writable('threshold');\n\t this.threshold = null;\n\t return this;\n\t };\n\t return Tone.Limiter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Lowpass is a lowpass feedback comb filter. It is similar to\n\t\t * Tone.FeedbackCombFilter, but includes a lowpass filter.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Time|Object} [delayTime] The delay time of the comb filter\n\t\t * @param {NormalRange=} resonance The resonance (feedback) of the comb filter\n\t\t * @param {Frequency=} dampening The cutoff of the lowpass filter dampens the\n\t\t * signal as it is fedback.\n\t\t */\n\t Tone.LowpassCombFilter = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'delayTime',\n\t 'resonance',\n\t 'dampening'\n\t ], Tone.LowpassCombFilter);\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * the delay node\n\t\t\t * @type {DelayNode}\n\t\t\t * @private\n\t\t\t */\n\t this._delay = this.input = new Tone.Delay(options.delayTime);\n\t /**\n\t\t\t * The delayTime of the comb filter.\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = this._delay.delayTime;\n\t /**\n\t\t\t * the lowpass filter\n\t\t\t * @type {BiquadFilterNode}\n\t\t\t * @private\n\t\t\t */\n\t this._lowpass = this.output = this.context.createBiquadFilter();\n\t this._lowpass.Q.value = -3.0102999566398125;\n\t this._lowpass.type = 'lowpass';\n\t /**\n\t\t\t * The dampening control of the feedback\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.dampening = new Tone.Param({\n\t 'param': this._lowpass.frequency,\n\t 'units': Tone.Type.Frequency,\n\t 'value': options.dampening\n\t });\n\t /**\n\t\t\t * the feedback gain\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\t /**\n\t\t\t * The amount of feedback of the delayed signal.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.resonance = this._feedback.gain;\n\t //connections\n\t this._delay.chain(this._lowpass, this._feedback, this._delay);\n\t this._readOnly([\n\t 'dampening',\n\t 'resonance',\n\t 'delayTime'\n\t ]);\n\t };\n\t Tone.extend(Tone.LowpassCombFilter, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.LowpassCombFilter.defaults = {\n\t 'delayTime': 0.1,\n\t 'resonance': 0.5,\n\t 'dampening': 3000\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.LowpassCombFilter} this\n\t\t */\n\t Tone.LowpassCombFilter.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'dampening',\n\t 'resonance',\n\t 'delayTime'\n\t ]);\n\t this.dampening.dispose();\n\t this.dampening = null;\n\t this.resonance.dispose();\n\t this.resonance = null;\n\t this._delay.dispose();\n\t this._delay = null;\n\t this.delayTime = null;\n\t this._lowpass.disconnect();\n\t this._lowpass = null;\n\t this._feedback.disconnect();\n\t this._feedback = null;\n\t return this;\n\t };\n\t return Tone.LowpassCombFilter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Merge brings two signals into the left and right\n\t\t * channels of a single stereo channel.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @example\n\t\t * var merge = new Tone.Merge().toMaster();\n\t\t * //routing a sine tone in the left channel\n\t\t * //and noise in the right channel\n\t\t * var osc = new Tone.Oscillator().connect(merge.left);\n\t\t * var noise = new Tone.Noise().connect(merge.right);\n\t\t * //starting our oscillators\n\t\t * noise.start();\n\t\t * osc.start();\n\t\t */\n\t Tone.Merge = function () {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * The left input channel.\n\t\t\t * Alias for <code>input[0]</code>\n\t\t\t * @type {GainNode}\n\t\t\t */\n\t this.left = this.input[0] = new Tone.Gain();\n\t /**\n\t\t\t * The right input channel.\n\t\t\t * Alias for <code>input[1]</code>.\n\t\t\t * @type {GainNode}\n\t\t\t */\n\t this.right = this.input[1] = new Tone.Gain();\n\t /**\n\t\t\t * the merger node for the two channels\n\t\t\t * @type {ChannelMergerNode}\n\t\t\t * @private\n\t\t\t */\n\t this._merger = this.output = this.context.createChannelMerger(2);\n\t //connections\n\t this.left.connect(this._merger, 0, 0);\n\t this.right.connect(this._merger, 0, 1);\n\t this.left.channelCount = 1;\n\t this.right.channelCount = 1;\n\t this.left.channelCountMode = 'explicit';\n\t this.right.channelCountMode = 'explicit';\n\t };\n\t Tone.extend(Tone.Merge, Tone.AudioNode);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Merge} this\n\t\t */\n\t Tone.Merge.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.left.dispose();\n\t this.left = null;\n\t this.right.dispose();\n\t this.right = null;\n\t this._merger.disconnect();\n\t this._merger = null;\n\t return this;\n\t };\n\t return Tone.Merge;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Meter gets the [RMS](https://en.wikipedia.org/wiki/Root_mean_square)\n\t\t * of an input signal with some averaging applied. It can also get the raw\n\t\t * value of the input signal.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Number} smoothing The amount of smoothing applied between frames.\n\t\t * @example\n\t\t * var meter = new Tone.Meter();\n\t\t * var mic = new Tone.UserMedia().open();\n\t\t * //connect mic to the meter\n\t\t * mic.connect(meter);\n\t\t * //the current level of the mic input in decibels\n\t\t * var level = meter.getValue();\n\t\t */\n\t Tone.Meter = function () {\n\t var options = Tone.defaults(arguments, ['smoothing'], Tone.Meter);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The analyser node which computes the levels.\n\t\t\t * @private\n\t\t\t * @type {Tone.Analyser}\n\t\t\t */\n\t this.input = this.output = this._analyser = new Tone.Analyser('waveform', 1024);\n\t /**\n\t\t\t * The amount of carryover between the current and last frame.\n\t\t\t * Only applied meter for \"level\" type.\n\t\t\t * @type {Number}\n\t\t\t */\n\t this.smoothing = options.smoothing;\n\t };\n\t Tone.extend(Tone.Meter, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @static\n\t\t * @const\n\t\t */\n\t Tone.Meter.defaults = { 'smoothing': 0.8 };\n\t /**\n\t\t * Get the current decibel value of the incoming signal\n\t\t * @returns {Decibels}\n\t\t */\n\t Tone.Meter.prototype.getLevel = function () {\n\t this._analyser.type = 'fft';\n\t var values = this._analyser.getValue();\n\t var offset = 28;\n\t // normalizes most signal levels\n\t // TODO: compute loudness from FFT\n\t return Math.max.apply(this, values) + offset;\n\t };\n\t /**\n\t\t * Get the signal value of the incoming signal\n\t\t * @returns {Number}\n\t\t */\n\t Tone.Meter.prototype.getValue = function () {\n\t this._analyser.type = 'waveform';\n\t var value = this._analyser.getValue();\n\t return value[0];\n\t };\n\t /**\n\t\t * A value from 0 -> 1 where 0 represents no time averaging with the last analysis frame.\n\t\t * @memberOf Tone.Meter#\n\t\t * @type {Number}\n\t\t * @name smoothing\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Meter.prototype, 'smoothing', {\n\t get: function () {\n\t return this._analyser.smoothing;\n\t },\n\t set: function (val) {\n\t this._analyser.smoothing = val;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Meter} this\n\t\t */\n\t Tone.Meter.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._analyser.dispose();\n\t this._analyser = null;\n\t return this;\n\t };\n\t return Tone.Meter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t *\t@class Tone.Split splits an incoming signal into left and right channels.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @example\n\t\t * var split = new Tone.Split();\n\t\t * stereoSignal.connect(split);\n\t\t */\n\t Tone.Split = function () {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(0, 2);\n\t /**\n\t\t\t * @type {ChannelSplitterNode}\n\t\t\t * @private\n\t\t\t */\n\t this._splitter = this.input = this.context.createChannelSplitter(2);\n\t this._splitter.channelCount = 2;\n\t this._splitter.channelCountMode = 'explicit';\n\t /**\n\t\t\t * Left channel output.\n\t\t\t * Alias for <code>output[0]</code>\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.left = this.output[0] = new Tone.Gain();\n\t /**\n\t\t\t * Right channel output.\n\t\t\t * Alias for <code>output[1]</code>\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.right = this.output[1] = new Tone.Gain();\n\t //connections\n\t this._splitter.connect(this.left, 0, 0);\n\t this._splitter.connect(this.right, 1, 0);\n\t };\n\t Tone.extend(Tone.Split, Tone.AudioNode);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Split} this\n\t\t */\n\t Tone.Split.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._splitter.disconnect();\n\t this.left.dispose();\n\t this.left = null;\n\t this.right.dispose();\n\t this.right = null;\n\t this._splitter = null;\n\t return this;\n\t };\n\t return Tone.Split;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Mid/Side processing separates the the 'mid' signal\n\t\t * (which comes out of both the left and the right channel)\n\t\t * and the 'side' (which only comes out of the the side channels). <br><br>\n\t\t * <code>\n\t\t * Mid = (Left+Right)/sqrt(2); // obtain mid-signal from left and right<br>\n\t\t * Side = (Left-Right)/sqrt(2); // obtain side-signal from left and righ<br>\n\t\t * </code>\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t */\n\t Tone.MidSideSplit = function () {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(0, 2);\n\t /**\n\t\t\t * split the incoming signal into left and right channels\n\t\t\t * @type {Tone.Split}\n\t\t\t * @private\n\t\t\t */\n\t this._split = this.input = new Tone.Split();\n\t /**\n\t\t\t * The mid send. Connect to mid processing. Alias for\n\t\t\t * <code>output[0]</code>\n\t\t\t * @type {Tone.Add}\n\t\t\t */\n\t this._midAdd = new Tone.Add();\n\t /**\n\t\t\t * Multiply the _midAdd by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t this.mid = this.output[0] = new Tone.Multiply(Math.SQRT1_2);\n\t /**\n\t\t\t * The side output. Connect to side processing. Also Output 1\n\t\t\t * @type {Tone.Subtract}\n\t\t\t */\n\t this._sideSubtract = new Tone.Subtract();\n\t /**\n\t\t\t * Multiply the _midAdd by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t this.side = this.output[1] = new Tone.Multiply(Math.SQRT1_2);\n\t this._split.connect(this._midAdd, 0, 0);\n\t this._split.connect(this._midAdd, 1, 1);\n\t this._split.connect(this._sideSubtract, 0, 0);\n\t this._split.connect(this._sideSubtract, 1, 1);\n\t this._midAdd.connect(this.mid);\n\t this._sideSubtract.connect(this.side);\n\t };\n\t Tone.extend(Tone.MidSideSplit, Tone.AudioNode);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.MidSideSplit} this\n\t\t */\n\t Tone.MidSideSplit.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.mid.dispose();\n\t this.mid = null;\n\t this.side.dispose();\n\t this.side = null;\n\t this._midAdd.dispose();\n\t this._midAdd = null;\n\t this._sideSubtract.dispose();\n\t this._sideSubtract = null;\n\t this._split.dispose();\n\t this._split = null;\n\t return this;\n\t };\n\t return Tone.MidSideSplit;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Mid/Side processing separates the the 'mid' signal\n\t\t * (which comes out of both the left and the right channel)\n\t\t * and the 'side' (which only comes out of the the side channels).\n\t\t * MidSideMerge merges the mid and side signal after they've been seperated\n\t\t * by Tone.MidSideSplit.<br><br>\n\t\t * <code>\n\t\t * Left = (Mid+Side)/sqrt(2); // obtain left signal from mid and side<br>\n\t\t * Right = (Mid-Side)/sqrt(2); // obtain right signal from mid and side<br>\n\t\t * </code>\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t */\n\t Tone.MidSideMerge = function () {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(2, 0);\n\t /**\n\t\t\t * The mid signal input. Alias for\n\t\t\t * <code>input[0]</code>\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.mid = this.input[0] = new Tone.Gain();\n\t /**\n\t\t\t * recombine the mid/side into Left\n\t\t\t * @type {Tone.Add}\n\t\t\t * @private\n\t\t\t */\n\t this._left = new Tone.Add();\n\t /**\n\t\t\t * Multiply the left by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t this._timesTwoLeft = new Tone.Multiply(Math.SQRT1_2);\n\t /**\n\t\t\t * The side signal input. Alias for\n\t\t\t * <code>input[1]</code>\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.side = this.input[1] = new Tone.Gain();\n\t /**\n\t\t\t * recombine the mid/side into Right\n\t\t\t * @type {Tone.Subtract}\n\t\t\t * @private\n\t\t\t */\n\t this._right = new Tone.Subtract();\n\t /**\n\t\t\t * Multiply the right by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t this._timesTwoRight = new Tone.Multiply(Math.SQRT1_2);\n\t /**\n\t\t\t * Merge the left/right signal back into a stereo signal.\n\t\t\t * @type {Tone.Merge}\n\t\t\t * @private\n\t\t\t */\n\t this._merge = this.output = new Tone.Merge();\n\t this.mid.connect(this._left, 0, 0);\n\t this.side.connect(this._left, 0, 1);\n\t this.mid.connect(this._right, 0, 0);\n\t this.side.connect(this._right, 0, 1);\n\t this._left.connect(this._timesTwoLeft);\n\t this._right.connect(this._timesTwoRight);\n\t this._timesTwoLeft.connect(this._merge, 0, 0);\n\t this._timesTwoRight.connect(this._merge, 0, 1);\n\t };\n\t Tone.extend(Tone.MidSideMerge, Tone.AudioNode);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.MidSideMerge} this\n\t\t */\n\t Tone.MidSideMerge.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.mid.dispose();\n\t this.mid = null;\n\t this.side.dispose();\n\t this.side = null;\n\t this._left.dispose();\n\t this._left = null;\n\t this._timesTwoLeft.dispose();\n\t this._timesTwoLeft = null;\n\t this._right.dispose();\n\t this._right = null;\n\t this._timesTwoRight.dispose();\n\t this._timesTwoRight = null;\n\t this._merge.dispose();\n\t this._merge = null;\n\t return this;\n\t };\n\t return Tone.MidSideMerge;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.MidSideCompressor applies two different compressors to the mid\n\t\t * and side signal components. See Tone.MidSideSplit.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Object} options The options that are passed to the mid and side\n\t\t * compressors.\n\t\t * @constructor\n\t\t */\n\t Tone.MidSideCompressor = function (options) {\n\t Tone.AudioNode.call(this);\n\t options = Tone.defaultArg(options, Tone.MidSideCompressor.defaults);\n\t /**\n\t\t\t * the mid/side split\n\t\t\t * @type {Tone.MidSideSplit}\n\t\t\t * @private\n\t\t\t */\n\t this._midSideSplit = this.input = new Tone.MidSideSplit();\n\t /**\n\t\t\t * the mid/side recombination\n\t\t\t * @type {Tone.MidSideMerge}\n\t\t\t * @private\n\t\t\t */\n\t this._midSideMerge = this.output = new Tone.MidSideMerge();\n\t /**\n\t\t\t * The compressor applied to the mid signal\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this.mid = new Tone.Compressor(options.mid);\n\t /**\n\t\t\t * The compressor applied to the side signal\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this.side = new Tone.Compressor(options.side);\n\t this._midSideSplit.mid.chain(this.mid, this._midSideMerge.mid);\n\t this._midSideSplit.side.chain(this.side, this._midSideMerge.side);\n\t this._readOnly([\n\t 'mid',\n\t 'side'\n\t ]);\n\t };\n\t Tone.extend(Tone.MidSideCompressor, Tone.AudioNode);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.MidSideCompressor.defaults = {\n\t 'mid': {\n\t 'ratio': 3,\n\t 'threshold': -24,\n\t 'release': 0.03,\n\t 'attack': 0.02,\n\t 'knee': 16\n\t },\n\t 'side': {\n\t 'ratio': 6,\n\t 'threshold': -30,\n\t 'release': 0.25,\n\t 'attack': 0.03,\n\t 'knee': 10\n\t }\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.MidSideCompressor} this\n\t\t */\n\t Tone.MidSideCompressor.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'mid',\n\t 'side'\n\t ]);\n\t this.mid.dispose();\n\t this.mid = null;\n\t this.side.dispose();\n\t this.side = null;\n\t this._midSideSplit.dispose();\n\t this._midSideSplit = null;\n\t this._midSideMerge.dispose();\n\t this._midSideMerge = null;\n\t return this;\n\t };\n\t return Tone.MidSideCompressor;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Mono coerces the incoming mono or stereo signal into a mono signal\n\t\t * where both left and right channels have the same value. This can be useful\n\t\t * for [stereo imaging](https://en.wikipedia.org/wiki/Stereo_imaging).\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t */\n\t Tone.Mono = function () {\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 0);\n\t /**\n\t\t\t * merge the signal\n\t\t\t * @type {Tone.Merge}\n\t\t\t * @private\n\t\t\t */\n\t this._merge = this.output = new Tone.Merge();\n\t this.input.connect(this._merge, 0, 0);\n\t this.input.connect(this._merge, 0, 1);\n\t };\n\t Tone.extend(Tone.Mono, Tone.AudioNode);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Mono} this\n\t\t */\n\t Tone.Mono.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._merge.dispose();\n\t this._merge = null;\n\t return this;\n\t };\n\t return Tone.Mono;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A compressor with seperate controls over low/mid/high dynamics\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {Object} options The low/mid/high compressor settings.\n\t\t * @example\n\t\t * var multiband = new Tone.MultibandCompressor({\n\t\t * \t\"lowFrequency\" : 200,\n\t\t * \t\"highFrequency\" : 1300\n\t\t * \t\"low\" : {\n\t\t * \t\t\"threshold\" : -12\n\t\t * \t}\n\t\t * })\n\t\t */\n\t Tone.MultibandCompressor = function (options) {\n\t Tone.AudioNode.call(this);\n\t options = Tone.defaultArg(arguments, Tone.MultibandCompressor.defaults);\n\t /**\n\t\t\t * split the incoming signal into high/mid/low\n\t\t\t * @type {Tone.MultibandSplit}\n\t\t\t * @private\n\t\t\t */\n\t this._splitter = this.input = new Tone.MultibandSplit({\n\t 'lowFrequency': options.lowFrequency,\n\t 'highFrequency': options.highFrequency\n\t });\n\t /**\n\t\t\t * low/mid crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.lowFrequency = this._splitter.lowFrequency;\n\t /**\n\t\t\t * mid/high crossover frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.highFrequency = this._splitter.highFrequency;\n\t /**\n\t\t\t * the output\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this.output = new Tone.Gain();\n\t /**\n\t\t\t * The compressor applied to the low frequencies.\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this.low = new Tone.Compressor(options.low);\n\t /**\n\t\t\t * The compressor applied to the mid frequencies.\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this.mid = new Tone.Compressor(options.mid);\n\t /**\n\t\t\t * The compressor applied to the high frequencies.\n\t\t\t * @type {Tone.Compressor}\n\t\t\t */\n\t this.high = new Tone.Compressor(options.high);\n\t //connect the compressor\n\t this._splitter.low.chain(this.low, this.output);\n\t this._splitter.mid.chain(this.mid, this.output);\n\t this._splitter.high.chain(this.high, this.output);\n\t this._readOnly([\n\t 'high',\n\t 'mid',\n\t 'low',\n\t 'highFrequency',\n\t 'lowFrequency'\n\t ]);\n\t };\n\t Tone.extend(Tone.MultibandCompressor, Tone.AudioNode);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.MultibandCompressor.defaults = {\n\t 'low': Tone.Compressor.defaults,\n\t 'mid': Tone.Compressor.defaults,\n\t 'high': Tone.Compressor.defaults,\n\t 'lowFrequency': 250,\n\t 'highFrequency': 2000\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.MultibandCompressor} this\n\t\t */\n\t Tone.MultibandCompressor.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._splitter.dispose();\n\t this._writable([\n\t 'high',\n\t 'mid',\n\t 'low',\n\t 'highFrequency',\n\t 'lowFrequency'\n\t ]);\n\t this.low.dispose();\n\t this.mid.dispose();\n\t this.high.dispose();\n\t this._splitter = null;\n\t this.low = null;\n\t this.mid = null;\n\t this.high = null;\n\t this.lowFrequency = null;\n\t this.highFrequency = null;\n\t return this;\n\t };\n\t return Tone.MultibandCompressor;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported && !window.StereoPannerNode) {\n\t /**\n\t\t\t * @class Shimmed StereoPannerNode\n\t\t\t * @param {AudioContext} context\n\t\t\t * @private\n\t\t\t */\n\t var StereoPannerNode = function (context) {\n\t /**\n\t\t\t\t * The audio context\n\t\t\t\t * @type {AudioContext}\n\t\t\t\t */\n\t this.context = context;\n\t /**\n\t\t\t\t * The left/right panning. [-1, 1]\n\t\t\t\t * @type {AudioRange}\n\t\t\t\t * @signal\n\t\t\t\t */\n\t this.pan = new Tone.Signal(0, Tone.Type.AudioRange);\n\t /**\n\t\t\t\t * Equal power scaling of the right gain\n\t\t\t\t * @type {Tone.WaveShaper}\n\t\t\t\t */\n\t var rightWaveShaper = new Tone.WaveShaper(function (val) {\n\t return Tone.equalPowerScale((val + 1) / 2);\n\t }, 4096);\n\t /**\n\t\t\t\t * Equal power scaling of the left gain\n\t\t\t\t * @type {Tone.WaveShaper}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var leftWaveShaper = new Tone.WaveShaper(function (val) {\n\t return Tone.equalPowerScale(1 - (val + 1) / 2);\n\t }, 4096);\n\t /**\n\t\t\t\t * The left gain value\n\t\t\t\t * @type {Tone.Gain}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var leftGain = new Tone.Gain();\n\t /**\n\t\t\t\t * The right gain value\n\t\t\t\t * @type {Tone.Gain}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var rightGain = new Tone.Gain();\n\t /**\n\t\t\t\t * Split the incoming signal\n\t\t\t\t * @type {Tone.Split}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var split = this.input = new Tone.Split();\n\t /**\n\t\t\t\t * Keeps the waveshapers from optimizing 0s\n\t\t\t\t * @type {Tone.Zero}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var zero = new Tone.Zero();\n\t zero.fan(rightWaveShaper, leftWaveShaper);\n\t /**\n\t\t\t\t * Merge the outgoing signal\n\t\t\t\t * @type {Tone.Merge}\n\t\t\t\t * @private\n\t\t\t\t */\n\t var merge = this.output = new Tone.Merge();\n\t //connections\n\t split.left.chain(leftGain, merge.left);\n\t split.right.chain(rightGain, merge.right);\n\t this.pan.chain(leftWaveShaper, leftGain.gain);\n\t this.pan.chain(rightWaveShaper, rightGain.gain);\n\t };\n\t StereoPannerNode.prototype.disconnect = function () {\n\t this.output.disconnect.apply(this.output, arguments);\n\t };\n\t StereoPannerNode.prototype.connect = function () {\n\t this.output.connect.apply(this.output, arguments);\n\t };\n\t //add it to the AudioContext\n\t AudioContext.prototype.createStereoPanner = function () {\n\t return new StereoPannerNode(this);\n\t };\n\t Tone.Context.prototype.createStereoPanner = function () {\n\t return new StereoPannerNode(this);\n\t };\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Panner is an equal power Left/Right Panner and does not\n\t\t * support 3D. Panner uses the StereoPannerNode when available.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {NormalRange} [initialPan=0] The initail panner value (center).\n\t\t * @example\n\t\t * //pan the input signal hard right.\n\t\t * var panner = new Tone.Panner(1);\n\t\t */\n\t Tone.Panner = function (initialPan) {\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t* the panner node\n\t\t\t* @type {StereoPannerNode}\n\t\t\t* @private\n\t\t\t*/\n\t this._panner = this.input = this.output = this.context.createStereoPanner();\n\t /**\n\t\t\t* The pan control. -1 = hard left, 1 = hard right.\n\t\t\t* @type {AudioRange}\n\t\t\t* @signal\n\t\t\t*/\n\t this.pan = this._panner.pan;\n\t //initial value\n\t this.pan.value = Tone.defaultArg(initialPan, 0);\n\t this._readOnly('pan');\n\t };\n\t Tone.extend(Tone.Panner, Tone.AudioNode);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Panner} this\n\t\t */\n\t Tone.Panner.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable('pan');\n\t this._panner.disconnect();\n\t this._panner = null;\n\t this.pan = null;\n\t return this;\n\t };\n\t return Tone.Panner;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A spatialized panner node which supports equalpower or HRTF panning.\n\t\t * Tries to normalize the API across various browsers. See Tone.Listener\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Number} positionX The initial x position.\n\t\t * @param {Number} positionY The initial y position.\n\t\t * @param {Number} positionZ The initial z position.\n\t\t */\n\t Tone.Panner3D = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'positionX',\n\t 'positionY',\n\t 'positionZ'\n\t ], Tone.Panner3D);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The panner node\n\t\t\t * @type {PannerNode}\n\t\t\t * @private\n\t\t\t */\n\t this._panner = this.input = this.output = this.context.createPanner();\n\t //set some values\n\t this._panner.panningModel = options.panningModel;\n\t this._panner.maxDistance = options.maxDistance;\n\t this._panner.distanceModel = options.distanceModel;\n\t this._panner.coneOuterGain = options.coneOuterGain;\n\t this._panner.coneOuterAngle = options.coneOuterAngle;\n\t this._panner.coneInnerAngle = options.coneInnerAngle;\n\t this._panner.refDistance = options.refDistance;\n\t this._panner.rolloffFactor = options.rolloffFactor;\n\t /**\n\t\t\t * Holds the current orientation\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._orientation = [\n\t options.orientationX,\n\t options.orientationY,\n\t options.orientationZ\n\t ];\n\t /**\n\t\t\t * Holds the current position\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._position = [\n\t options.positionX,\n\t options.positionY,\n\t options.positionZ\n\t ];\n\t // set the default position/orientation\n\t this.orientationX = options.orientationX;\n\t this.orientationY = options.orientationY;\n\t this.orientationZ = options.orientationZ;\n\t this.positionX = options.positionX;\n\t this.positionY = options.positionY;\n\t this.positionZ = options.positionZ;\n\t };\n\t Tone.extend(Tone.Panner3D, Tone.AudioNode);\n\t /**\n\t\t * Defaults according to the specification\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Panner3D.defaults = {\n\t 'positionX': 0,\n\t 'positionY': 0,\n\t 'positionZ': 0,\n\t 'orientationX': 0,\n\t 'orientationY': 0,\n\t 'orientationZ': 0,\n\t 'panningModel': 'equalpower',\n\t 'maxDistance': 10000,\n\t 'distanceModel': 'inverse',\n\t 'coneOuterGain': 0,\n\t 'coneOuterAngle': 360,\n\t 'coneInnerAngle': 360,\n\t 'refDistance': 1,\n\t 'rolloffFactor': 1\n\t };\n\t /**\n\t\t * The ramp time which is applied to the setTargetAtTime\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.Panner3D.prototype._rampTimeConstant = 0.01;\n\t /**\n\t\t * Sets the position of the source in 3d space.\n\t\t * @param {Number} x\n\t\t * @param {Number} y\n\t\t * @param {Number} z\n\t\t * @return {Tone.Panner3D} this\n\t\t */\n\t Tone.Panner3D.prototype.setPosition = function (x, y, z) {\n\t if (this._panner.positionX) {\n\t var now = this.now();\n\t this._panner.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t this._panner.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t this._panner.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t } else {\n\t this._panner.setPosition(x, y, z);\n\t }\n\t this._position = Array.prototype.slice.call(arguments);\n\t return this;\n\t };\n\t /**\n\t\t * Sets the orientation of the source in 3d space.\n\t\t * @param {Number} x\n\t\t * @param {Number} y\n\t\t * @param {Number} z\n\t\t * @return {Tone.Panner3D} this\n\t\t */\n\t Tone.Panner3D.prototype.setOrientation = function (x, y, z) {\n\t if (this._panner.orientationX) {\n\t var now = this.now();\n\t this._panner.orientationX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t this._panner.orientationY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t this._panner.orientationZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t } else {\n\t this._panner.setOrientation(x, y, z);\n\t }\n\t this._orientation = Array.prototype.slice.call(arguments);\n\t return this;\n\t };\n\t /**\n\t\t * The x position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name positionX\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'positionX', {\n\t set: function (pos) {\n\t this._position[0] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[0];\n\t }\n\t });\n\t /**\n\t\t * The y position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name positionY\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'positionY', {\n\t set: function (pos) {\n\t this._position[1] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[1];\n\t }\n\t });\n\t /**\n\t\t * The z position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name positionZ\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'positionZ', {\n\t set: function (pos) {\n\t this._position[2] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[2];\n\t }\n\t });\n\t /**\n\t\t * The x orientation of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name orientationX\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'orientationX', {\n\t set: function (pos) {\n\t this._orientation[0] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[0];\n\t }\n\t });\n\t /**\n\t\t * The y orientation of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name orientationY\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'orientationY', {\n\t set: function (pos) {\n\t this._orientation[1] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[1];\n\t }\n\t });\n\t /**\n\t\t * The z orientation of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name orientationZ\n\t\t */\n\t Object.defineProperty(Tone.Panner3D.prototype, 'orientationZ', {\n\t set: function (pos) {\n\t this._orientation[2] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[2];\n\t }\n\t });\n\t /**\n\t\t * Proxy a property on the panner to an exposed public propery\n\t\t * @param {String} prop\n\t\t * @private\n\t\t */\n\t Tone.Panner3D._aliasProperty = function (prop) {\n\t Object.defineProperty(Tone.Panner3D.prototype, prop, {\n\t set: function (val) {\n\t this._panner[prop] = val;\n\t },\n\t get: function () {\n\t return this._panner[prop];\n\t }\n\t });\n\t };\n\t /**\n\t\t * The panning model. Either \"equalpower\" or \"HRTF\".\n\t\t * @type {String}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name panningModel\n\t\t */\n\t Tone.Panner3D._aliasProperty('panningModel');\n\t /**\n\t\t * A reference distance for reducing volume as source move further from the listener\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name refDistance\n\t\t */\n\t Tone.Panner3D._aliasProperty('refDistance');\n\t /**\n\t\t * Describes how quickly the volume is reduced as source moves away from listener.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name rolloffFactor\n\t\t */\n\t Tone.Panner3D._aliasProperty('rolloffFactor');\n\t /**\n\t\t * The distance model used by, \"linear\", \"inverse\", or \"exponential\".\n\t\t * @type {String}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name distanceModel\n\t\t */\n\t Tone.Panner3D._aliasProperty('distanceModel');\n\t /**\n\t\t * The angle, in degrees, inside of which there will be no volume reduction\n\t\t * @type {Degrees}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name coneInnerAngle\n\t\t */\n\t Tone.Panner3D._aliasProperty('coneInnerAngle');\n\t /**\n\t\t * The angle, in degrees, outside of which the volume will be reduced\n\t\t * to a constant value of coneOuterGain\n\t\t * @type {Degrees}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name coneOuterAngle\n\t\t */\n\t Tone.Panner3D._aliasProperty('coneOuterAngle');\n\t /**\n\t\t * The gain outside of the coneOuterAngle\n\t\t * @type {Gain}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name coneOuterGain\n\t\t */\n\t Tone.Panner3D._aliasProperty('coneOuterGain');\n\t /**\n\t\t * The maximum distance between source and listener,\n\t\t * after which the volume will not be reduced any further.\n\t\t * @type {Positive}\n\t\t * @memberOf Tone.Panner3D#\n\t\t * @name maxDistance\n\t\t */\n\t Tone.Panner3D._aliasProperty('maxDistance');\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Panner3D} this\n\t\t */\n\t Tone.Panner3D.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._panner.disconnect();\n\t this._panner = null;\n\t this._orientation = null;\n\t this._position = null;\n\t return this;\n\t };\n\t return Tone.Panner3D;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PanVol is a Tone.Panner and Tone.Volume in one.\n\t\t *\n\t\t * @extends {Tone.AudioNode}\n\t\t * @constructor\n\t\t * @param {AudioRange} pan the initial pan\n\t\t * @param {number} volume The output volume.\n\t\t * @example\n\t\t * //pan the incoming signal left and drop the volume\n\t\t * var panVol = new Tone.PanVol(-0.25, -12);\n\t\t */\n\t Tone.PanVol = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'pan',\n\t 'volume'\n\t ], Tone.PanVol);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The panning node\n\t\t\t * @type {Tone.Panner}\n\t\t\t * @private\n\t\t\t */\n\t this._panner = this.input = new Tone.Panner(options.pan);\n\t /**\n\t\t\t * The L/R panning control.\n\t\t\t * @type {AudioRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.pan = this._panner.pan;\n\t /**\n\t\t\t * The volume node\n\t\t\t * @type {Tone.Volume}\n\t\t\t * @private\n\t\t\t */\n\t this._volume = this.output = new Tone.Volume(options.volume);\n\t /**\n\t\t\t * The volume control in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t this.volume = this._volume.volume;\n\t //connections\n\t this._panner.connect(this._volume);\n\t this.mute = options.mute;\n\t this._readOnly([\n\t 'pan',\n\t 'volume'\n\t ]);\n\t };\n\t Tone.extend(Tone.PanVol, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @const\n\t\t * @static\n\t\t */\n\t Tone.PanVol.defaults = {\n\t 'pan': 0,\n\t 'volume': 0,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Mute/unmute the volume\n\t\t * @memberOf Tone.PanVol#\n\t\t * @name mute\n\t\t * @type {Boolean}\n\t\t */\n\t Object.defineProperty(Tone.PanVol.prototype, 'mute', {\n\t get: function () {\n\t return this._volume.mute;\n\t },\n\t set: function (mute) {\n\t this._volume.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.PanVol} this\n\t\t */\n\t Tone.PanVol.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._writable([\n\t 'pan',\n\t 'volume'\n\t ]);\n\t this._panner.dispose();\n\t this._panner = null;\n\t this.pan = null;\n\t this._volume.dispose();\n\t this._volume = null;\n\t this.volume = null;\n\t return this;\n\t };\n\t return Tone.PanVol;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Solo lets you isolate a specific audio stream. When\n\t\t * an instance is set to `solo=true`, it will mute all other instances.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @example\n\t\t * var soloA = new Tone.Solo()\n\t\t * var soloB = new Tone.Solo()\n\t\t * soloA.solo = true\n\t\t * //no audio will pass through soloB\n\t\t */\n\t Tone.Solo = function () {\n\t var options = Tone.defaults(arguments, ['solo'], Tone.Solo);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The input and output node\n\t\t\t * @type {Tone.Gain}\n\t\t\t */\n\t this.input = this.output = new Tone.Gain();\n\t /**\n\t\t\t * A bound _soloed method\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._soloBind = this._soloed.bind(this);\n\t //listen for solo events class-wide.\n\t this.context.on('solo', this._soloBind);\n\t //set initially\n\t this.solo = options.solo;\n\t };\n\t Tone.extend(Tone.Solo, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @static\n\t\t */\n\t Tone.Solo.defaults = { solo: false };\n\t /**\n\t\t * Isolates this instance and mutes all other instances of Tone.Solo.\n\t\t * Only one instance can be soloed at a time. A soloed\n\t\t * instance will report `solo=false` when another instance is soloed.\n\t\t * @memberOf Tone.Solo#\n\t\t * @type {Boolean}\n\t\t * @name solo\n\t\t */\n\t Object.defineProperty(Tone.Solo.prototype, 'solo', {\n\t get: function () {\n\t return this._isSoloed();\n\t },\n\t set: function (solo) {\n\t if (solo) {\n\t this._addSolo();\n\t } else {\n\t this._removeSolo();\n\t }\n\t this.context.emit('solo', this);\n\t }\n\t });\n\t /**\n\t\t * If the current instance is muted, i.e. another instance is soloed\n\t\t * @memberOf Tone.Solo#\n\t\t * @type {Boolean}\n\t\t * @name muted\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Solo.prototype, 'muted', {\n\t get: function () {\n\t return this.input.gain.value === 0;\n\t }\n\t });\n\t /**\n\t\t * Add this to the soloed array\n\t\t * @private\n\t\t */\n\t Tone.Solo.prototype._addSolo = function () {\n\t if (!Tone.isArray(this.context._currentSolo)) {\n\t this.context._currentSolo = [];\n\t }\n\t if (!this._isSoloed()) {\n\t this.context._currentSolo.push(this);\n\t }\n\t };\n\t /**\n\t\t * Remove this from the soloed array\n\t\t * @private\n\t\t */\n\t Tone.Solo.prototype._removeSolo = function () {\n\t if (this._isSoloed()) {\n\t var index = this.context._currentSolo.indexOf(this);\n\t this.context._currentSolo.splice(index, 1);\n\t }\n\t };\n\t /**\n\t\t * @return {Boolean} Is this on the soloed array\n\t\t * @private\n\t\t */\n\t Tone.Solo.prototype._isSoloed = function () {\n\t if (Tone.isArray(this.context._currentSolo)) {\n\t return this.context._currentSolo.length !== 0 && this.context._currentSolo.indexOf(this) !== -1;\n\t } else {\n\t return false;\n\t }\n\t };\n\t /**\n\t\t * @return {Boolean} Returns true if no one is soloed\n\t\t * @private\n\t\t */\n\t Tone.Solo.prototype._noSolos = function () {\n\t return !Tone.isArray(this.context._currentSolo) || this.context._currentSolo.length === 0;\n\t };\n\t /**\n\t\t * Solo the current instance and unsolo all other instances.\n\t\t * @param {Tone.Solo} instance The instance which is being soloed/unsoloed.\n\t\t * @private\n\t\t */\n\t Tone.Solo.prototype._soloed = function () {\n\t if (this._isSoloed()) {\n\t this.input.gain.value = 1;\n\t } else if (this._noSolos()) {\n\t //no one is soloed\n\t this.input.gain.value = 1;\n\t } else {\n\t this.input.gain.value = 0;\n\t }\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Solo} this\n\t\t */\n\t Tone.Solo.prototype.dispose = function () {\n\t this.context.off('solo', this._soloBind);\n\t this._removeSolo();\n\t this._soloBind = null;\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t return this;\n\t };\n\t return Tone.Solo;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Get the current waveform data of the connected audio source.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Number=} size The size of the FFT. Value must be a power of\n\t\t * two in the range 32 to 32768.\n\t\t */\n\t Tone.Waveform = function () {\n\t var options = Tone.defaults(arguments, ['size'], Tone.Waveform);\n\t options.type = Tone.Analyser.Type.Waveform;\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The analyser node.\n\t\t\t * @private\n\t\t\t * @type {Tone.Analyser}\n\t\t\t */\n\t this._analyser = this.input = this.output = new Tone.Analyser(options);\n\t };\n\t Tone.extend(Tone.Waveform, Tone.AudioNode);\n\t /**\n\t\t * The default values.\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Waveform.defaults = { 'size': 1024 };\n\t /**\n\t\t * Gets the waveform of the audio source. Returns the waveform data\n\t\t * of length [size](#size) as a Float32Array with values between -1 and 1.\n\t\t * @returns {TypedArray}\n\t\t */\n\t Tone.Waveform.prototype.getValue = function () {\n\t return this._analyser.getValue();\n\t };\n\t /**\n\t\t * The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t * @memberOf Tone.Waveform#\n\t\t * @type {Number}\n\t\t * @name size\n\t\t */\n\t Object.defineProperty(Tone.Waveform.prototype, 'size', {\n\t get: function () {\n\t return this._analyser.size;\n\t },\n\t set: function (size) {\n\t this._analyser.size = size;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Waveform} this\n\t\t */\n\t Tone.Waveform.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._analyser.dispose();\n\t this._analyser = null;\n\t };\n\t return Tone.Waveform;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.CtrlInterpolate will interpolate between given values based\n\t\t * on the \"index\" property. Passing in an array or object literal\n\t\t * will interpolate each of the parameters. Note (i.e. \"C3\")\n\t\t * and Time (i.e. \"4n + 2\") can be interpolated. All other values are\n\t\t * assumed to be numbers. \n\t\t * @example\n\t\t * var interp = new Tone.CtrlInterpolate([0, 2, 9, 4]);\n\t\t * interp.index = 0.75;\n\t\t * interp.value; //returns 1.5\n\t\t *\n\t\t * @example\n\t\t * var interp = new Tone.CtrlInterpolate([\n\t\t * \t[2, 4, 5],\n\t\t * \t[9, 3, 2],\n\t\t * ]);\n\t\t * @param {Array} values The array of values to interpolate over\n\t\t * @param {Positive} index The initial interpolation index.\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.CtrlInterpolate = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'values',\n\t 'index'\n\t ], Tone.CtrlInterpolate);\n\t Tone.call(this);\n\t /**\n\t\t\t * The values to interpolate between\n\t\t\t * @type {Array}\n\t\t\t */\n\t this.values = options.values;\n\t /**\n\t\t\t * The interpolated index between values. For example: a value of 1.5\n\t\t\t * would interpolate equally between the value at index 1\n\t\t\t * and the value at index 2. \n\t\t\t * @example\n\t\t\t * interp.index = 0; \n\t\t\t * interp.value; //returns the value at 0\n\t\t\t * interp.index = 0.5;\n\t\t\t * interp.value; //returns the value between indices 0 and 1. \n\t\t\t * @type {Positive}\n\t\t\t */\n\t this.index = options.index;\n\t };\n\t Tone.extend(Tone.CtrlInterpolate);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.CtrlInterpolate.defaults = {\n\t 'index': 0,\n\t 'values': []\n\t };\n\t /**\n\t\t * The current interpolated value based on the index\n\t\t * @readOnly\n\t\t * @memberOf Tone.CtrlInterpolate#\n\t\t * @type {*}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.CtrlInterpolate.prototype, 'value', {\n\t get: function () {\n\t var index = this.index;\n\t index = Math.min(index, this.values.length - 1);\n\t var lowerPosition = Math.floor(index);\n\t var lower = this.values[lowerPosition];\n\t var upper = this.values[Math.ceil(index)];\n\t return this._interpolate(index - lowerPosition, lower, upper);\n\t }\n\t });\n\t /**\n\t\t * Internal interpolation routine\n\t\t * @param {NormalRange} index The index between the lower and upper\n\t\t * @param {*} lower \n\t\t * @param {*} upper \n\t\t * @return {*} The interpolated value\n\t\t * @private\n\t\t */\n\t Tone.CtrlInterpolate.prototype._interpolate = function (index, lower, upper) {\n\t if (Tone.isArray(lower)) {\n\t var retArray = [];\n\t for (var i = 0; i < lower.length; i++) {\n\t retArray[i] = this._interpolate(index, lower[i], upper[i]);\n\t }\n\t return retArray;\n\t } else if (Tone.isObject(lower)) {\n\t var retObj = {};\n\t for (var attr in lower) {\n\t retObj[attr] = this._interpolate(index, lower[attr], upper[attr]);\n\t }\n\t return retObj;\n\t } else {\n\t lower = this._toNumber(lower);\n\t upper = this._toNumber(upper);\n\t return (1 - index) * lower + index * upper;\n\t }\n\t };\n\t /**\n\t\t * Convert from the given type into a number\n\t\t * @param {Number|String} value\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.CtrlInterpolate.prototype._toNumber = function (val) {\n\t if (Tone.isNumber(val)) {\n\t return val;\n\t } else {\n\t //otherwise assume that it's Time...\n\t return this.toSeconds(val);\n\t }\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.CtrlInterpolate} this\n\t\t */\n\t Tone.CtrlInterpolate.prototype.dispose = function () {\n\t this.values = null;\n\t };\n\t return Tone.CtrlInterpolate;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.CtrlMarkov represents a Markov Chain where each call\n\t\t * to Tone.CtrlMarkov.next will move to the next state. If the next\n\t\t * state choice is an array, the next state is chosen randomly with\n\t\t * even probability for all of the choices. For a weighted probability\n\t\t * of the next choices, pass in an object with \"state\" and \"probability\" attributes. \n\t\t * The probabilities will be normalized and then chosen. If no next options\n\t\t * are given for the current state, the state will stay there. \n\t\t * @extends {Tone}\n\t\t * @example\n\t\t * var chain = new Tone.CtrlMarkov({\n\t\t * \t\"beginning\" : [\"end\", \"middle\"],\n\t\t * \t\"middle\" : \"end\"\n\t\t * });\n\t\t * chain.value = \"beginning\";\n\t\t * chain.next(); //returns \"end\" or \"middle\" with 50% probability\n\t\t *\n\t\t * @example\n\t\t * var chain = new Tone.CtrlMarkov({\n\t\t * \t\"beginning\" : [{\"value\" : \"end\", \"probability\" : 0.8}, \n\t\t * \t\t\t\t\t{\"value\" : \"middle\", \"probability\" : 0.2}],\n\t\t * \t\"middle\" : \"end\"\n\t\t * });\n\t\t * chain.value = \"beginning\";\n\t\t * chain.next(); //returns \"end\" with 80% probability or \"middle\" with 20%.\n\t\t * @param {Object} values An object with the state names as the keys\n\t\t * and the next state(s) as the values. \n\t\t */\n\t Tone.CtrlMarkov = function (values, initial) {\n\t Tone.call(this);\n\t /**\n\t\t\t * The Markov values with states as the keys\n\t\t\t * and next state(s) as the values. \n\t\t\t * @type {Object}\n\t\t\t */\n\t this.values = Tone.defaultArg(values, {});\n\t /**\n\t\t\t * The current state of the Markov values. The next\n\t\t\t * state will be evaluated and returned when Tone.CtrlMarkov.next\n\t\t\t * is invoked.\n\t\t\t * @type {String}\n\t\t\t */\n\t this.value = Tone.defaultArg(initial, Object.keys(this.values)[0]);\n\t };\n\t Tone.extend(Tone.CtrlMarkov);\n\t /**\n\t\t * Returns the next state of the Markov values. \n\t\t * @return {String}\n\t\t */\n\t Tone.CtrlMarkov.prototype.next = function () {\n\t if (this.values.hasOwnProperty(this.value)) {\n\t var next = this.values[this.value];\n\t if (Tone.isArray(next)) {\n\t var distribution = this._getProbDistribution(next);\n\t var rand = Math.random();\n\t var total = 0;\n\t for (var i = 0; i < distribution.length; i++) {\n\t var dist = distribution[i];\n\t if (rand > total && rand < total + dist) {\n\t var chosen = next[i];\n\t if (Tone.isObject(chosen)) {\n\t this.value = chosen.value;\n\t } else {\n\t this.value = chosen;\n\t }\n\t }\n\t total += dist;\n\t }\n\t } else {\n\t this.value = next;\n\t }\n\t }\n\t return this.value;\n\t };\n\t /**\n\t\t * Choose randomly from an array weighted options in the form \n\t\t * {\"state\" : string, \"probability\" : number} or an array of values\n\t\t * @param {Array} options \n\t\t * @return {Array} The randomly selected choice\n\t\t * @private\n\t\t */\n\t Tone.CtrlMarkov.prototype._getProbDistribution = function (options) {\n\t var distribution = [];\n\t var total = 0;\n\t var needsNormalizing = false;\n\t for (var i = 0; i < options.length; i++) {\n\t var option = options[i];\n\t if (Tone.isObject(option)) {\n\t needsNormalizing = true;\n\t distribution[i] = option.probability;\n\t } else {\n\t distribution[i] = 1 / options.length;\n\t }\n\t total += distribution[i];\n\t }\n\t if (needsNormalizing) {\n\t //normalize the values\n\t for (var j = 0; j < distribution.length; j++) {\n\t distribution[j] = distribution[j] / total;\n\t }\n\t }\n\t return distribution;\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.CtrlMarkov} this\n\t\t */\n\t Tone.CtrlMarkov.prototype.dispose = function () {\n\t this.values = null;\n\t };\n\t return Tone.CtrlMarkov;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Generate patterns from an array of values.\n\t\t * Has a number of arpeggiation and randomized\n\t\t * selection patterns. \n\t\t * <ul>\n\t\t * \t <li>\"up\" - cycles upward</li>\n\t\t * \t\t\t<li>\"down\" - cycles downward</li>\n\t\t * \t\t\t<li>\"upDown\" - up then and down</li>\n\t\t * \t\t\t<li>\"downUp\" - cycles down then and up</li>\n\t\t * \t\t\t<li>\"alternateUp\" - jump up two and down one</li>\n\t\t * \t\t\t<li>\"alternateDown\" - jump down two and up one</li>\n\t\t * \t\t\t<li>\"random\" - randomly select an index</li>\n\t\t * \t\t\t<li>\"randomWalk\" - randomly moves one index away from the current position</li>\n\t\t * \t\t\t<li>\"randomOnce\" - randomly select an index without repeating until all values have been chosen.</li>\n\t\t * \t\t</ul>\n\t\t * @param {Array} values An array of options to choose from.\n\t\t * @param {Tone.CtrlPattern.Type=} type The name of the pattern.\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.CtrlPattern = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'values',\n\t 'type'\n\t ], Tone.CtrlPattern);\n\t Tone.call(this);\n\t /**\n\t\t\t * The array of values to arpeggiate over\n\t\t\t * @type {Array}\n\t\t\t */\n\t this.values = options.values;\n\t /**\n\t\t\t * The current position in the values array\n\t\t\t * @type {Number}\n\t\t\t */\n\t this.index = 0;\n\t /**\n\t\t\t * The type placeholder\n\t\t\t * @type {Tone.CtrlPattern.Type}\n\t\t\t * @private\n\t\t\t */\n\t this._type = null;\n\t /**\n\t\t\t * Shuffled values for the RandomOnce type\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._shuffled = null;\n\t /**\n\t\t\t * The direction of the movement\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._direction = null;\n\t this.type = options.type;\n\t };\n\t Tone.extend(Tone.CtrlPattern);\n\t /**\n\t\t * The Control Patterns\n\t\t * @type {Object}\n\t\t * @static\n\t\t */\n\t Tone.CtrlPattern.Type = {\n\t Up: 'up',\n\t Down: 'down',\n\t UpDown: 'upDown',\n\t DownUp: 'downUp',\n\t AlternateUp: 'alternateUp',\n\t AlternateDown: 'alternateDown',\n\t Random: 'random',\n\t RandomWalk: 'randomWalk',\n\t RandomOnce: 'randomOnce'\n\t };\n\t /**\n\t\t * The default values. \n\t\t * @type {Object}\n\t\t */\n\t Tone.CtrlPattern.defaults = {\n\t 'type': Tone.CtrlPattern.Type.Up,\n\t 'values': []\n\t };\n\t /**\n\t\t * The value at the current index of the pattern.\n\t\t * @readOnly\n\t\t * @memberOf Tone.CtrlPattern#\n\t\t * @type {*}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.CtrlPattern.prototype, 'value', {\n\t get: function () {\n\t //some safeguards\n\t if (this.values.length === 0) {\n\t return;\n\t } else if (this.values.length === 1) {\n\t return this.values[0];\n\t }\n\t this.index = Math.min(this.index, this.values.length - 1);\n\t var val = this.values[this.index];\n\t if (this.type === Tone.CtrlPattern.Type.RandomOnce) {\n\t if (this.values.length !== this._shuffled.length) {\n\t this._shuffleValues();\n\t }\n\t val = this.values[this._shuffled[this.index]];\n\t }\n\t return val;\n\t }\n\t });\n\t /**\n\t\t * The pattern used to select the next\n\t\t * item from the values array\n\t\t * @memberOf Tone.CtrlPattern#\n\t\t * @type {Tone.CtrlPattern.Type}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.CtrlPattern.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t this._type = type;\n\t this._shuffled = null;\n\t //the first index\n\t if (this._type === Tone.CtrlPattern.Type.Up || this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.RandomOnce || this._type === Tone.CtrlPattern.Type.AlternateUp) {\n\t this.index = 0;\n\t } else if (this._type === Tone.CtrlPattern.Type.Down || this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {\n\t this.index = this.values.length - 1;\n\t }\n\t //the direction\n\t if (this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.AlternateUp) {\n\t this._direction = Tone.CtrlPattern.Type.Up;\n\t } else if (this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {\n\t this._direction = Tone.CtrlPattern.Type.Down;\n\t }\n\t //randoms\n\t if (this._type === Tone.CtrlPattern.Type.RandomOnce) {\n\t this._shuffleValues();\n\t } else if (this._type === Tone.CtrlPattern.Random) {\n\t this.index = Math.floor(Math.random() * this.values.length);\n\t }\n\t }\n\t });\n\t /**\n\t\t * Return the next value given the current position\n\t\t * and pattern.\n\t\t * @return {*} The next value\n\t\t */\n\t Tone.CtrlPattern.prototype.next = function () {\n\t var type = this.type;\n\t //choose the next index\n\t if (type === Tone.CtrlPattern.Type.Up) {\n\t this.index++;\n\t if (this.index >= this.values.length) {\n\t this.index = 0;\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.Down) {\n\t this.index--;\n\t if (this.index < 0) {\n\t this.index = this.values.length - 1;\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.UpDown || type === Tone.CtrlPattern.Type.DownUp) {\n\t if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t this.index++;\n\t } else {\n\t this.index--;\n\t }\n\t if (this.index < 0) {\n\t this.index = 1;\n\t this._direction = Tone.CtrlPattern.Type.Up;\n\t } else if (this.index >= this.values.length) {\n\t this.index = this.values.length - 2;\n\t this._direction = Tone.CtrlPattern.Type.Down;\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.Random) {\n\t this.index = Math.floor(Math.random() * this.values.length);\n\t } else if (type === Tone.CtrlPattern.Type.RandomWalk) {\n\t if (Math.random() < 0.5) {\n\t this.index--;\n\t this.index = Math.max(this.index, 0);\n\t } else {\n\t this.index++;\n\t this.index = Math.min(this.index, this.values.length - 1);\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.RandomOnce) {\n\t this.index++;\n\t if (this.index >= this.values.length) {\n\t this.index = 0;\n\t //reshuffle the values for next time\n\t this._shuffleValues();\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.AlternateUp) {\n\t if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t this.index += 2;\n\t this._direction = Tone.CtrlPattern.Type.Down;\n\t } else {\n\t this.index -= 1;\n\t this._direction = Tone.CtrlPattern.Type.Up;\n\t }\n\t if (this.index >= this.values.length) {\n\t this.index = 0;\n\t this._direction = Tone.CtrlPattern.Type.Up;\n\t }\n\t } else if (type === Tone.CtrlPattern.Type.AlternateDown) {\n\t if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t this.index += 1;\n\t this._direction = Tone.CtrlPattern.Type.Down;\n\t } else {\n\t this.index -= 2;\n\t this._direction = Tone.CtrlPattern.Type.Up;\n\t }\n\t if (this.index < 0) {\n\t this.index = this.values.length - 1;\n\t this._direction = Tone.CtrlPattern.Type.Down;\n\t }\n\t }\n\t return this.value;\n\t };\n\t /**\n\t\t * Shuffles the values and places the results into the _shuffled\n\t\t * @private\n\t\t */\n\t Tone.CtrlPattern.prototype._shuffleValues = function () {\n\t var copy = [];\n\t this._shuffled = [];\n\t for (var i = 0; i < this.values.length; i++) {\n\t copy[i] = i;\n\t }\n\t while (copy.length > 0) {\n\t var randVal = copy.splice(Math.floor(copy.length * Math.random()), 1);\n\t this._shuffled.push(randVal[0]);\n\t }\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @returns {Tone.CtrlPattern} this\n\t\t */\n\t Tone.CtrlPattern.prototype.dispose = function () {\n\t this._shuffled = null;\n\t this.values = null;\n\t };\n\t return Tone.CtrlPattern;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Choose a random value.\n\t\t * @extends {Tone}\n\t\t * @example\n\t\t * var randomWalk = new Tone.CtrlRandom({\n\t\t * \t\"min\" : 0,\n\t\t * \t\"max\" : 10,\n\t\t * \t\"integer\" : true\n\t\t * });\n\t\t * randomWalk.eval();\n\t\t *\n\t\t * @param {Number|Time=} min The minimum return value.\n\t\t * @param {Number|Time=} max The maximum return value.\n\t\t */\n\t Tone.CtrlRandom = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'min',\n\t 'max'\n\t ], Tone.CtrlRandom);\n\t Tone.call(this);\n\t /**\n\t\t\t * The minimum return value\n\t\t\t * @type {Number|Time}\n\t\t\t */\n\t this.min = options.min;\n\t /**\n\t\t\t * The maximum return value\n\t\t\t * @type {Number|Time}\n\t\t\t */\n\t this.max = options.max;\n\t /**\n\t\t\t * If the return value should be an integer\n\t\t\t * @type {Boolean}\n\t\t\t */\n\t this.integer = options.integer;\n\t };\n\t Tone.extend(Tone.CtrlRandom);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.CtrlRandom.defaults = {\n\t 'min': 0,\n\t 'max': 1,\n\t 'integer': false\n\t };\n\t /**\n\t\t * Return a random value between min and max. \n\t\t * @readOnly\n\t\t * @memberOf Tone.CtrlRandom#\n\t\t * @type {*}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.CtrlRandom.prototype, 'value', {\n\t get: function () {\n\t var min = this.toSeconds(this.min);\n\t var max = this.toSeconds(this.max);\n\t var rand = Math.random();\n\t var val = rand * min + (1 - rand) * max;\n\t if (this.integer) {\n\t val = Math.floor(val);\n\t }\n\t return val;\n\t }\n\t });\n\t return Tone.CtrlRandom;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class A data structure for holding multiple buffers.\n\t\t * \n\t\t * @param {Object|Array} urls An object literal or array\n\t\t * of urls to load.\n\t\t * @param {Function=} callback The callback to invoke when\n\t\t * the buffers are loaded. \n\t\t * @extends {Tone}\n\t\t * @example\n\t\t * //load a whole bank of piano samples\n\t\t * var pianoSamples = new Tone.Buffers({\n\t\t * \t\"C4\" : \"path/to/C4.mp3\"\n\t\t * \t\"C#4\" : \"path/to/C#4.mp3\"\n\t\t * \t\"D4\" : \"path/to/D4.mp3\"\n\t\t * \t\"D#4\" : \"path/to/D#4.mp3\"\n\t\t * \t...\n\t\t * }, function(){\n\t\t * \t//play one of the samples when they all load\n\t\t * \tplayer.buffer = pianoSamples.get(\"C4\");\n\t\t * \tplayer.start();\n\t\t * });\n\t\t * \t@example\n\t\t * //To pass in additional parameters in the second parameter\n\t\t * var buffers = new Tone.Buffers(urls, {\n\t\t * \t\"onload\" : callback,\n\t\t * \t\"baseUrl\" : \"../path/to/audio/\"\n\t\t * })\n\t\t */\n\t Tone.Buffers = function (urls) {\n\t //remove the urls from the options\n\t var args = Array.prototype.slice.call(arguments);\n\t args.shift();\n\t var options = Tone.defaults(args, [\n\t 'onload',\n\t 'baseUrl'\n\t ], Tone.Buffers);\n\t Tone.call(this);\n\t /**\n\t\t\t * All of the buffers\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t this._buffers = {};\n\t /**\n\t\t\t * A path which is prefixed before every url.\n\t\t\t * @type {String}\n\t\t\t */\n\t this.baseUrl = options.baseUrl;\n\t this._loadingCount = 0;\n\t //add each one\n\t for (var key in urls) {\n\t this._loadingCount++;\n\t this.add(key, urls[key], this._bufferLoaded.bind(this, options.onload));\n\t }\n\t };\n\t Tone.extend(Tone.Buffers);\n\t /**\n\t\t * Defaults\n\t\t * @type {Object}\n\t\t */\n\t Tone.Buffers.defaults = {\n\t 'onload': Tone.noOp,\n\t 'baseUrl': ''\n\t };\n\t /**\n\t\t * True if the buffers object has a buffer by that name.\n\t\t * @param {String|Number} name The key or index of the \n\t\t * buffer.\n\t\t * @return {Boolean}\n\t\t */\n\t Tone.Buffers.prototype.has = function (name) {\n\t return this._buffers.hasOwnProperty(name);\n\t };\n\t /**\n\t\t * Get a buffer by name. If an array was loaded, \n\t\t * then use the array index.\n\t\t * @param {String|Number} name The key or index of the \n\t\t * buffer.\n\t\t * @return {Tone.Buffer}\n\t\t */\n\t Tone.Buffers.prototype.get = function (name) {\n\t if (this.has(name)) {\n\t return this._buffers[name];\n\t } else {\n\t throw new Error('Tone.Buffers: no buffer named ' + name);\n\t }\n\t };\n\t /**\n\t\t * A buffer was loaded. decrement the counter.\n\t\t * @param {Function} callback \n\t\t * @private\n\t\t */\n\t Tone.Buffers.prototype._bufferLoaded = function (callback) {\n\t this._loadingCount--;\n\t if (this._loadingCount === 0 && callback) {\n\t callback(this);\n\t }\n\t };\n\t /**\n\t\t * If the buffers are loaded or not\n\t\t * @memberOf Tone.Buffers#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Buffers.prototype, 'loaded', {\n\t get: function () {\n\t var isLoaded = true;\n\t for (var buffName in this._buffers) {\n\t var buff = this.get(buffName);\n\t isLoaded = isLoaded && buff.loaded;\n\t }\n\t return isLoaded;\n\t }\n\t });\n\t /**\n\t\t * Add a buffer by name and url to the Buffers\n\t\t * @param {String} name A unique name to give\n\t\t * the buffer\n\t\t * @param {String|Tone.Buffer|Audiobuffer} url Either the url of the bufer, \n\t\t * or a buffer which will be added\n\t\t * with the given name.\n\t\t * @param {Function=} callback The callback to invoke \n\t\t * when the url is loaded.\n\t\t */\n\t Tone.Buffers.prototype.add = function (name, url, callback) {\n\t callback = Tone.defaultArg(callback, Tone.noOp);\n\t if (url instanceof Tone.Buffer) {\n\t this._buffers[name] = url;\n\t callback(this);\n\t } else if (url instanceof AudioBuffer) {\n\t this._buffers[name] = new Tone.Buffer(url);\n\t callback(this);\n\t } else if (Tone.isString(url)) {\n\t this._buffers[name] = new Tone.Buffer(this.baseUrl + url, callback);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Buffers} this\n\t\t */\n\t Tone.Buffers.prototype.dispose = function () {\n\t Tone.prototype.dispose.call(this);\n\t for (var name in this._buffers) {\n\t this._buffers[name].dispose();\n\t }\n\t this._buffers = null;\n\t return this;\n\t };\n\t return Tone.Buffers;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * buses are another way of routing audio\n\t\t *\n\t\t * augments Tone.prototype to include send and recieve\n\t\t */\n\t /**\n\t\t * All of the routes\n\t\t *\n\t\t * @type {Object}\n\t\t * @static\n\t\t * @private\n\t\t */\n\t var Buses = {};\n\t /**\n\t\t * Send this signal to the channel name.\n\t\t * @param {String} channelName A named channel to send the signal to.\n\t\t * @param {Decibels} amount The amount of the source to send to the bus.\n\t\t * @return {GainNode} The gain node which connects this node to the desired channel.\n\t\t * Can be used to adjust the levels of the send.\n\t\t * @example\n\t\t * source.send(\"reverb\", -12);\n\t\t */\n\t Tone.prototype.send = function (channelName, amount) {\n\t if (!Buses.hasOwnProperty(channelName)) {\n\t Buses[channelName] = this.context.createGain();\n\t }\n\t amount = Tone.defaultArg(amount, 0);\n\t var sendKnob = new Tone.Gain(amount, Tone.Type.Decibels);\n\t this.connect(sendKnob);\n\t sendKnob.connect(Buses[channelName]);\n\t return sendKnob;\n\t };\n\t /**\n\t\t * Recieve the input from the desired channelName to the input\n\t\t *\n\t\t * @param {String} channelName A named channel to send the signal to.\n\t\t * @param {Number=} channelNumber The channel to connect to\n\t\t * @returns {Tone} this\n\t\t * @example\n\t\t * reverbEffect.receive(\"reverb\");\n\t\t */\n\t Tone.prototype.receive = function (channelName, inputNum) {\n\t if (!Buses.hasOwnProperty(channelName)) {\n\t Buses[channelName] = this.context.createGain();\n\t }\n\t Buses[channelName].connect(this, 0, inputNum);\n\t return this;\n\t };\n\t //remove all the send/receives when a new audio context is passed in\n\t Tone.Context.on('init', function (context) {\n\t if (context.Buses) {\n\t Buses = context.Buses;\n\t } else {\n\t Buses = {};\n\t context.Buses = Buses;\n\t }\n\t });\n\t return Tone;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Draw is useful for synchronizing visuals and audio events.\n\t\t * Callbacks from Tone.Transport or any of the Tone.Event classes\n\t\t * always happen _before_ the scheduled time and are not synchronized\n\t\t * to the animation frame so they are not good for triggering tightly\n\t\t * synchronized visuals and sound. Tone.Draw makes it easy to schedule\n\t\t * callbacks using the AudioContext time and uses requestAnimationFrame.\n\t\t * \n\t\t * @singleton\n\t\t * @extends {Tone}\n\t\t * @example\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \t//use the time argument to schedule a callback with Tone.Draw\n\t\t * \tTone.Draw.schedule(function(){\n\t\t * \t\t//do drawing or DOM manipulation here\n\t\t * \t}, time)\n\t\t * }, \"+0.5\")\n\t\t */\n\t Tone.Draw = function () {\n\t Tone.call(this);\n\t /**\n\t\t\t * All of the events.\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t this._events = new Tone.Timeline();\n\t /**\n\t\t\t * The duration after which events are not invoked.\n\t\t\t * @type {Number}\n\t\t\t * @default 0.25\n\t\t\t */\n\t this.expiration = 0.25;\n\t /**\n\t\t\t * The amount of time before the scheduled time \n\t\t\t * that the callback can be invoked. Default is\n\t\t\t * half the time of an animation frame (0.008 seconds).\n\t\t\t * @type {Number}\n\t\t\t * @default 0.008\n\t\t\t */\n\t this.anticipation = 0.008;\n\t /**\n\t\t\t * The draw loop\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._boundDrawLoop = this._drawLoop.bind(this);\n\t };\n\t Tone.extend(Tone.Draw);\n\t /**\n\t\t * Schedule a function at the given time to be invoked\n\t\t * on the nearest animation frame.\n\t\t * @param {Function} callback Callback is invoked at the given time.\n\t\t * @param {Time} time The time relative to the AudioContext time\n\t\t * to invoke the callback.\n\t\t * @return {Tone.Draw} this\n\t\t */\n\t Tone.Draw.prototype.schedule = function (callback, time) {\n\t this._events.add({\n\t callback: callback,\n\t time: this.toSeconds(time)\n\t });\n\t //start the draw loop on the first event\n\t if (this._events.length === 1) {\n\t requestAnimationFrame(this._boundDrawLoop);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Cancel events scheduled after the given time\n\t\t * @param {Time=} after Time after which scheduled events will \n\t\t * be removed from the scheduling timeline.\n\t\t * @return {Tone.Draw} this\n\t\t */\n\t Tone.Draw.prototype.cancel = function (after) {\n\t this._events.cancel(this.toSeconds(after));\n\t return this;\n\t };\n\t /**\n\t\t * The draw loop\n\t\t * @private\n\t\t */\n\t Tone.Draw.prototype._drawLoop = function () {\n\t var now = Tone.now();\n\t while (this._events.length && this._events.peek().time - this.anticipation <= now) {\n\t var event = this._events.shift();\n\t if (now - event.time <= this.expiration) {\n\t event.callback();\n\t }\n\t }\n\t if (this._events.length > 0) {\n\t requestAnimationFrame(this._boundDrawLoop);\n\t }\n\t };\n\t //make a singleton\n\t Tone.Draw = new Tone.Draw();\n\t return Tone.Draw;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Both Tone.Panner3D and Tone.Listener have a position in 3D space\n\t\t * using a right-handed cartesian coordinate system.\n\t\t * The units used in the coordinate system are not defined;\n\t\t * these coordinates are independent/invariant of any particular\n\t\t * units such as meters or feet. Tone.Panner3D objects have an forward\n\t\t * vector representing the direction the sound is projecting. Additionally,\n\t\t * they have a sound cone representing how directional the sound is.\n\t\t * For example, the sound could be omnidirectional, in which case it would\n\t\t * be heard anywhere regardless of its forward, or it can be more directional\n\t\t * and heard only if it is facing the listener. Tone.Listener objects\n\t\t * (representing a person's ears) have an forward and up vector\n\t\t * representing in which direction the person is facing. Because both the\n\t\t * source stream and the listener can be moving, they both have a velocity\n\t\t * vector representing both the speed and direction of movement. Taken together,\n\t\t * these two velocities can be used to generate a doppler shift effect which changes the pitch.\n\t\t * <br><br>\n\t\t * Note: the position of the Listener will have no effect on nodes not connected to a Tone.Panner3D\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone}\n\t\t * @singleton\n\t\t */\n\t Tone.Listener = function () {\n\t Tone.call(this);\n\t /**\n\t\t\t * Holds the current forward orientation\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._orientation = [\n\t 0,\n\t 0,\n\t 0,\n\t 0,\n\t 0,\n\t 0\n\t ];\n\t /**\n\t\t\t * Holds the current position\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._position = [\n\t 0,\n\t 0,\n\t 0\n\t ];\n\t Tone.getContext(function () {\n\t // set the default position/forward\n\t this.set(ListenerConstructor.defaults);\n\t }.bind(this));\n\t };\n\t Tone.extend(Tone.Listener);\n\t /**\n\t\t * Defaults according to the specification\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Listener.defaults = {\n\t 'positionX': 0,\n\t 'positionY': 0,\n\t 'positionZ': 0,\n\t 'forwardX': 0,\n\t 'forwardY': 0,\n\t 'forwardZ': 1,\n\t 'upX': 0,\n\t 'upY': 1,\n\t 'upZ': 0\n\t };\n\t /**\n\t\t * The ramp time which is applied to the setTargetAtTime\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t Tone.Listener.prototype._rampTimeConstant = 0.01;\n\t /**\n\t\t * Sets the position of the listener in 3d space.\n\t\t * @param {Number} x\n\t\t * @param {Number} y\n\t\t * @param {Number} z\n\t\t * @return {Tone.Listener} this\n\t\t */\n\t Tone.Listener.prototype.setPosition = function (x, y, z) {\n\t if (this.context.listener.positionX) {\n\t var now = this.now();\n\t this.context.listener.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t this.context.listener.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t this.context.listener.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t } else {\n\t this.context.listener.setPosition(x, y, z);\n\t }\n\t this._position = Array.prototype.slice.call(arguments);\n\t return this;\n\t };\n\t /**\n\t\t * Sets the orientation of the listener using two vectors, the forward\n\t\t * vector (which direction the listener is facing) and the up vector\n\t\t * (which the up direction of the listener). An up vector\n\t\t * of 0, 0, 1 is equivalent to the listener standing up in the Z direction.\n\t\t * @param {Number} x\n\t\t * @param {Number} y\n\t\t * @param {Number} z\n\t\t * @param {Number} upX\n\t\t * @param {Number} upY\n\t\t * @param {Number} upZ\n\t\t * @return {Tone.Listener} this\n\t\t */\n\t Tone.Listener.prototype.setOrientation = function (x, y, z, upX, upY, upZ) {\n\t if (this.context.listener.forwardX) {\n\t var now = this.now();\n\t this.context.listener.forwardX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t this.context.listener.forwardY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t this.context.listener.forwardZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t this.context.listener.upX.setTargetAtTime(upX, now, this._rampTimeConstant);\n\t this.context.listener.upY.setTargetAtTime(upY, now, this._rampTimeConstant);\n\t this.context.listener.upZ.setTargetAtTime(upZ, now, this._rampTimeConstant);\n\t } else {\n\t this.context.listener.setOrientation(x, y, z, upX, upY, upZ);\n\t }\n\t this._orientation = Array.prototype.slice.call(arguments);\n\t return this;\n\t };\n\t /**\n\t\t * The x position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name positionX\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'positionX', {\n\t set: function (pos) {\n\t this._position[0] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[0];\n\t }\n\t });\n\t /**\n\t\t * The y position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name positionY\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'positionY', {\n\t set: function (pos) {\n\t this._position[1] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[1];\n\t }\n\t });\n\t /**\n\t\t * The z position of the panner object.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name positionZ\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'positionZ', {\n\t set: function (pos) {\n\t this._position[2] = pos;\n\t this.setPosition.apply(this, this._position);\n\t },\n\t get: function () {\n\t return this._position[2];\n\t }\n\t });\n\t /**\n\t\t * The x coordinate of the listeners front direction. i.e.\n\t\t * which way they are facing.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name forwardX\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'forwardX', {\n\t set: function (pos) {\n\t this._orientation[0] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[0];\n\t }\n\t });\n\t /**\n\t\t * The y coordinate of the listeners front direction. i.e.\n\t\t * which way they are facing.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name forwardY\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'forwardY', {\n\t set: function (pos) {\n\t this._orientation[1] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[1];\n\t }\n\t });\n\t /**\n\t\t * The z coordinate of the listeners front direction. i.e.\n\t\t * which way they are facing.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name forwardZ\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'forwardZ', {\n\t set: function (pos) {\n\t this._orientation[2] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[2];\n\t }\n\t });\n\t /**\n\t\t * The x coordinate of the listener's up direction. i.e.\n\t\t * the direction the listener is standing in.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name upX\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'upX', {\n\t set: function (pos) {\n\t this._orientation[3] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[3];\n\t }\n\t });\n\t /**\n\t\t * The y coordinate of the listener's up direction. i.e.\n\t\t * the direction the listener is standing in.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name upY\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'upY', {\n\t set: function (pos) {\n\t this._orientation[4] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[4];\n\t }\n\t });\n\t /**\n\t\t * The z coordinate of the listener's up direction. i.e.\n\t\t * the direction the listener is standing in.\n\t\t * @type {Number}\n\t\t * @memberOf Tone.Listener#\n\t\t * @name upZ\n\t\t */\n\t Object.defineProperty(Tone.Listener.prototype, 'upZ', {\n\t set: function (pos) {\n\t this._orientation[5] = pos;\n\t this.setOrientation.apply(this, this._orientation);\n\t },\n\t get: function () {\n\t return this._orientation[5];\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Listener} this\n\t\t */\n\t Tone.Listener.prototype.dispose = function () {\n\t this._orientation = null;\n\t this._position = null;\n\t return this;\n\t };\n\t //SINGLETON SETUP\n\t var ListenerConstructor = Tone.Listener;\n\t Tone.Listener = new ListenerConstructor();\n\t Tone.Context.on('init', function (context) {\n\t if (context.Listener instanceof ListenerConstructor) {\n\t //a single listener object\n\t Tone.Listener = context.Listener;\n\t } else {\n\t //make new Listener insides\n\t Tone.Listener = new ListenerConstructor();\n\t }\n\t context.Listener = Tone.Listener;\n\t });\n\t //END SINGLETON SETUP\n\t return Tone.Listener;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * Because of a bug in iOS causing the currentTime to increment\n\t\t * before the rendering is started, sometimes it takes multiple\n\t\t * attemps to render the audio correctly.\n\t\t * @private\n\t\t */\n\t function attemptRender(callback, duration, sampleRate, tries) {\n\t tries = Tone.defaultArg(tries, 0);\n\t var context = new Tone.OfflineContext(2, duration, sampleRate);\n\t Tone.context = context;\n\t var isPast = Tone.isPast;\n\t Tone.isPast = Tone.noOp;\n\t //invoke the callback/scheduling\n\t var response = callback(Tone.Transport);\n\t if (context.currentTime > 0 && tries < 1000) {\n\t return attemptRender(callback, duration, sampleRate, ++tries);\n\t } else {\n\t Tone.isPast = isPast;\n\t return {\n\t 'response': response,\n\t 'context': context\n\t };\n\t }\n\t }\n\t /**\n\t\t * Generate a buffer by rendering all of the Tone.js code within the callback using the OfflineAudioContext.\n\t\t * The OfflineAudioContext is capable of rendering much faster than real time in many cases.\n\t\t * The callback function also passes in an offline instance of Tone.Transport which can be used\n\t\t * to schedule events along the Transport.\n\t\t * @param {Function} callback All Tone.js nodes which are created and scheduled within this callback are recorded into the output Buffer.\n\t\t * @param {Time} duration the amount of time to record for.\n\t\t * @return {Promise} The promise which is invoked with the Tone.Buffer of the recorded output.\n\t\t * @example\n\t\t * //render 2 seconds of the oscillator\n\t\t * Tone.Offline(function(){\n\t\t * \t//only nodes created in this callback will be recorded\n\t\t * \tvar oscillator = new Tone.Oscillator().toMaster().start(0)\n\t\t * \t//schedule their events\n\t\t * }, 2).then(function(buffer){\n\t\t * \t//do something with the output buffer\n\t\t * })\n\t\t * @example\n\t\t * //can also schedule events along the Transport\n\t\t * //using the passed in Offline Transport\n\t\t * Tone.Offline(function(Transport){\n\t\t * \tvar osc = new Tone.Oscillator().toMaster()\n\t\t * \tTransport.schedule(function(time){\n\t\t * \t\tosc.start(time).stop(time + 0.1)\n\t\t * \t}, 1)\n\t\t * \tTransport.start(0.2)\n\t\t * }, 4).then(function(buffer){\n\t\t * \t//do something with the output buffer\n\t\t * })\n\t\t */\n\t Tone.Offline = function (callback, duration) {\n\t //set the OfflineAudioContext\n\t var sampleRate = Tone.context.sampleRate;\n\t var originalContext = Tone.context;\n\t var renderRet = attemptRender(callback, duration, sampleRate);\n\t var response = renderRet.response;\n\t var context = renderRet.context;\n\t var ret;\n\t if (response instanceof Promise) {\n\t //wait for the promise to resolve\n\t ret = response.then(function () {\n\t //then render the audio\n\t return context.render();\n\t });\n\t } else {\n\t //process the audio\n\t ret = context.render();\n\t }\n\t //return the original AudioContext\n\t Tone.context = originalContext;\n\t //return the audio\n\t return ret.then(function (buffer) {\n\t //wrap it in a Tone.Buffer\n\t return new Tone.Buffer(buffer);\n\t });\n\t };\n\t return Tone.Offline;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * \t@class Tone.Effect is the base class for effects. Connect the effect between\n\t\t * \t the effectSend and effectReturn GainNodes, then control the amount of\n\t\t * \t effect which goes to the output using the wet control.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {NormalRange|Object} [wet] The starting wet value.\n\t\t */\n\t Tone.Effect = function () {\n\t var options = Tone.defaults(arguments, ['wet'], Tone.Effect);\n\t Tone.AudioNode.call(this);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * the drywet knob to control the amount of effect\n\t\t\t * @type {Tone.CrossFade}\n\t\t\t * @private\n\t\t\t */\n\t this._dryWet = new Tone.CrossFade(options.wet);\n\t /**\n\t\t\t * The wet control is how much of the effected\n\t\t\t * will pass through to the output. 1 = 100% effected\n\t\t\t * signal, 0 = 100% dry signal.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.wet = this._dryWet.fade;\n\t /**\n\t\t\t * connect the effectSend to the input of hte effect\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this.effectSend = new Tone.Gain();\n\t /**\n\t\t\t * connect the output of the effect to the effectReturn\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this.effectReturn = new Tone.Gain();\n\t //connections\n\t this.input.connect(this._dryWet.a);\n\t this.input.connect(this.effectSend);\n\t this.effectReturn.connect(this._dryWet.b);\n\t this._dryWet.connect(this.output);\n\t this._readOnly(['wet']);\n\t };\n\t Tone.extend(Tone.Effect, Tone.AudioNode);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Effect.defaults = { 'wet': 1 };\n\t /**\n\t\t * chains the effect in between the effectSend and effectReturn\n\t\t * @param {Tone} effect\n\t\t * @private\n\t\t * @returns {Tone.Effect} this\n\t\t */\n\t Tone.Effect.prototype.connectEffect = function (effect) {\n\t this.effectSend.chain(effect, this.effectReturn);\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Effect} this\n\t\t */\n\t Tone.Effect.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._dryWet.dispose();\n\t this._dryWet = null;\n\t this.effectSend.dispose();\n\t this.effectSend = null;\n\t this.effectReturn.dispose();\n\t this.effectReturn = null;\n\t this._writable(['wet']);\n\t this.wet = null;\n\t return this;\n\t };\n\t return Tone.Effect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.AutoFilter is a Tone.Filter with a Tone.LFO connected to the filter cutoff frequency.\n\t\t * Setting the LFO rate and depth allows for control over the filter modulation rate \n\t\t * and depth.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {Time|Object} [frequency] The rate of the LFO.\n\t\t * @param {Frequency=} baseFrequency The lower value of the LFOs oscillation\n\t \t * @param {Frequency=} octaves The number of octaves above the baseFrequency\n\t\t * @example\n\t\t * //create an autofilter and start it's LFO\n\t\t * var autoFilter = new Tone.AutoFilter(\"4n\").toMaster().start();\n\t\t * //route an oscillator through the filter and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(autoFilter).start();\n\t\t */\n\t Tone.AutoFilter = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'baseFrequency',\n\t 'octaves'\n\t ], Tone.AutoFilter);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * the lfo which drives the filter cutoff\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfo = new Tone.LFO({\n\t 'frequency': options.frequency,\n\t 'amplitude': options.depth\n\t });\n\t /**\n\t\t\t * The range of the filter modulating between the min and max frequency. \n\t\t\t * 0 = no modulation. 1 = full modulation.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.depth = this._lfo.amplitude;\n\t /**\n\t\t\t * How fast the filter modulates between min and max. \n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._lfo.frequency;\n\t /**\n\t\t\t * The filter node\n\t\t\t * @type {Tone.Filter}\n\t\t\t */\n\t this.filter = new Tone.Filter(options.filter);\n\t /**\n\t\t\t * The octaves placeholder\n\t\t\t * @type {Positive}\n\t\t\t * @private\n\t\t\t */\n\t this._octaves = 0;\n\t //connections\n\t this.connectEffect(this.filter);\n\t this._lfo.connect(this.filter.frequency);\n\t this.type = options.type;\n\t this._readOnly([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this.octaves = options.octaves;\n\t this.baseFrequency = options.baseFrequency;\n\t };\n\t //extend Effect\n\t Tone.extend(Tone.AutoFilter, Tone.Effect);\n\t /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.AutoFilter.defaults = {\n\t 'frequency': 1,\n\t 'type': 'sine',\n\t 'depth': 1,\n\t 'baseFrequency': 200,\n\t 'octaves': 2.6,\n\t 'filter': {\n\t 'type': 'lowpass',\n\t 'rolloff': -12,\n\t 'Q': 1\n\t }\n\t };\n\t /**\n\t\t * Start the effect.\n\t\t * @param {Time} [time=now] When the LFO will start. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.AutoFilter.prototype.start = function (time) {\n\t this._lfo.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the effect.\n\t\t * @param {Time} [time=now] When the LFO will stop. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.AutoFilter.prototype.stop = function (time) {\n\t this._lfo.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the filter to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t * Transport has started. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.AutoFilter.prototype.sync = function (delay) {\n\t this._lfo.sync(delay);\n\t return this;\n\t };\n\t /**\n\t\t * Unsync the filter from the transport.\n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.AutoFilter.prototype.unsync = function () {\n\t this._lfo.unsync();\n\t return this;\n\t };\n\t /**\n\t\t * Type of oscillator attached to the AutoFilter. \n\t\t * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.AutoFilter.prototype, 'type', {\n\t get: function () {\n\t return this._lfo.type;\n\t },\n\t set: function (type) {\n\t this._lfo.type = type;\n\t }\n\t });\n\t /**\n\t\t * The minimum value of the filter's cutoff frequency.\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {Frequency}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.AutoFilter.prototype, 'baseFrequency', {\n\t get: function () {\n\t return this._lfo.min;\n\t },\n\t set: function (freq) {\n\t this._lfo.min = this.toFrequency(freq);\n\t //and set the max\n\t this.octaves = this._octaves;\n\t }\n\t });\n\t /**\n\t\t * The maximum value of the filter's cutoff frequency. \n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t Object.defineProperty(Tone.AutoFilter.prototype, 'octaves', {\n\t get: function () {\n\t return this._octaves;\n\t },\n\t set: function (oct) {\n\t this._octaves = oct;\n\t this._lfo.max = this.baseFrequency * Math.pow(2, oct);\n\t }\n\t });\n\t /**\n\t\t * Clean up. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.AutoFilter.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._lfo.dispose();\n\t this._lfo = null;\n\t this.filter.dispose();\n\t this.filter = null;\n\t this._writable([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this.frequency = null;\n\t this.depth = null;\n\t return this;\n\t };\n\t return Tone.AutoFilter;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.AutoPanner is a Tone.Panner with an LFO connected to the pan amount. \n\t\t * More on using autopanners [here](https://www.ableton.com/en/blog/autopan-chopper-effect-and-more-liveschool/).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {Frequency|Object} [frequency] Rate of left-right oscillation. \n\t\t * @example\n\t\t * //create an autopanner and start it's LFO\n\t\t * var autoPanner = new Tone.AutoPanner(\"4n\").toMaster().start();\n\t\t * //route an oscillator through the panner and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(autoPanner).start();\n\t\t */\n\t Tone.AutoPanner = function () {\n\t var options = Tone.defaults(arguments, ['frequency'], Tone.AutoPanner);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * the lfo which drives the panning\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfo = new Tone.LFO({\n\t 'frequency': options.frequency,\n\t 'amplitude': options.depth,\n\t 'min': -1,\n\t 'max': 1\n\t });\n\t /**\n\t\t\t * The amount of panning between left and right. \n\t\t\t * 0 = always center. 1 = full range between left and right. \n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.depth = this._lfo.amplitude;\n\t /**\n\t\t\t * the panner node which does the panning\n\t\t\t * @type {Tone.Panner}\n\t\t\t * @private\n\t\t\t */\n\t this._panner = new Tone.Panner();\n\t /**\n\t\t\t * How fast the panner modulates between left and right. \n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._lfo.frequency;\n\t //connections\n\t this.connectEffect(this._panner);\n\t this._lfo.connect(this._panner.pan);\n\t this.type = options.type;\n\t this._readOnly([\n\t 'depth',\n\t 'frequency'\n\t ]);\n\t };\n\t //extend Effect\n\t Tone.extend(Tone.AutoPanner, Tone.Effect);\n\t /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.AutoPanner.defaults = {\n\t 'frequency': 1,\n\t 'type': 'sine',\n\t 'depth': 1\n\t };\n\t /**\n\t\t * Start the effect.\n\t\t * @param {Time} [time=now] When the LFO will start. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t Tone.AutoPanner.prototype.start = function (time) {\n\t this._lfo.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the effect.\n\t\t * @param {Time} [time=now] When the LFO will stop. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t Tone.AutoPanner.prototype.stop = function (time) {\n\t this._lfo.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the panner to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t * Transport has started. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t Tone.AutoPanner.prototype.sync = function (delay) {\n\t this._lfo.sync(delay);\n\t return this;\n\t };\n\t /**\n\t\t * Unsync the panner from the transport\n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t Tone.AutoPanner.prototype.unsync = function () {\n\t this._lfo.unsync();\n\t return this;\n\t };\n\t /**\n\t\t * Type of oscillator attached to the AutoFilter. \n\t\t * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.AutoPanner.prototype, 'type', {\n\t get: function () {\n\t return this._lfo.type;\n\t },\n\t set: function (type) {\n\t this._lfo.type = type;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t Tone.AutoPanner.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._lfo.dispose();\n\t this._lfo = null;\n\t this._panner.dispose();\n\t this._panner = null;\n\t this._writable([\n\t 'depth',\n\t 'frequency'\n\t ]);\n\t this.frequency = null;\n\t this.depth = null;\n\t return this;\n\t };\n\t return Tone.AutoPanner;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.AutoWah connects a Tone.Follower to a bandpass filter (Tone.Filter).\n\t\t * The frequency of the filter is adjusted proportionally to the\n\t\t * incoming signal's amplitude. Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {Frequency|Object} [baseFrequency] The frequency the filter is set\n\t\t * to at the low point of the wah\n\t\t * @param {Positive} [octaves] The number of octaves above the baseFrequency\n\t\t * the filter will sweep to when fully open\n\t\t * @param {Decibels} [sensitivity] The decibel threshold sensitivity for\n\t\t * the incoming signal. Normal range of -40 to 0.\n\t\t * @example\n\t\t * var autoWah = new Tone.AutoWah(50, 6, -30).toMaster();\n\t\t * //initialize the synth and connect to autowah\n\t\t * var synth = new Synth.connect(autoWah);\n\t\t * //Q value influences the effect of the wah - default is 2\n\t\t * autoWah.Q.value = 6;\n\t\t * //more audible on higher notes\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\")\n\t\t */\n\t Tone.AutoWah = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'baseFrequency',\n\t 'octaves',\n\t 'sensitivity'\n\t ], Tone.AutoWah);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * The envelope follower. Set the attack/release\n\t\t\t * timing to adjust how the envelope is followed.\n\t\t\t * @type {Tone.Follower}\n\t\t\t * @private\n\t\t\t */\n\t this.follower = new Tone.Follower(options.follower);\n\t /**\n\t\t\t * scales the follower value to the frequency domain\n\t\t\t * @type {Tone}\n\t\t\t * @private\n\t\t\t */\n\t this._sweepRange = new Tone.ScaleExp(0, 1, 0.5);\n\t /**\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._baseFrequency = options.baseFrequency;\n\t /**\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._octaves = options.octaves;\n\t /**\n\t\t\t * the input gain to adjust the sensitivity\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._inputBoost = new Tone.Gain();\n\t /**\n\t\t\t * @type {BiquadFilterNode}\n\t\t\t * @private\n\t\t\t */\n\t this._bandpass = new Tone.Filter({\n\t 'rolloff': -48,\n\t 'frequency': 0,\n\t 'Q': options.Q\n\t });\n\t /**\n\t\t\t * @type {Tone.Filter}\n\t\t\t * @private\n\t\t\t */\n\t this._peaking = new Tone.Filter(0, 'peaking');\n\t this._peaking.gain.value = options.gain;\n\t /**\n\t\t\t * The gain of the filter.\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t this.gain = this._peaking.gain;\n\t /**\n\t\t\t * The quality of the filter.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.Q = this._bandpass.Q;\n\t //the control signal path\n\t this.effectSend.chain(this._inputBoost, this.follower, this._sweepRange);\n\t this._sweepRange.connect(this._bandpass.frequency);\n\t this._sweepRange.connect(this._peaking.frequency);\n\t //the filtered path\n\t this.effectSend.chain(this._bandpass, this._peaking, this.effectReturn);\n\t //set the initial value\n\t this._setSweepRange();\n\t this.sensitivity = options.sensitivity;\n\t this._readOnly([\n\t 'gain',\n\t 'Q'\n\t ]);\n\t };\n\t Tone.extend(Tone.AutoWah, Tone.Effect);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.AutoWah.defaults = {\n\t 'baseFrequency': 100,\n\t 'octaves': 6,\n\t 'sensitivity': 0,\n\t 'Q': 2,\n\t 'gain': 2,\n\t 'follower': {\n\t 'attack': 0.3,\n\t 'release': 0.5\n\t }\n\t };\n\t /**\n\t\t * The number of octaves that the filter will sweep above the\n\t\t * baseFrequency.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Number}\n\t\t * @name octaves\n\t\t */\n\t Object.defineProperty(Tone.AutoWah.prototype, 'octaves', {\n\t get: function () {\n\t return this._octaves;\n\t },\n\t set: function (octaves) {\n\t this._octaves = octaves;\n\t this._setSweepRange();\n\t }\n\t });\n\t /**\n\t\t * The base frequency from which the sweep will start from.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Frequency}\n\t\t * @name baseFrequency\n\t\t */\n\t Object.defineProperty(Tone.AutoWah.prototype, 'baseFrequency', {\n\t get: function () {\n\t return this._baseFrequency;\n\t },\n\t set: function (baseFreq) {\n\t this._baseFrequency = baseFreq;\n\t this._setSweepRange();\n\t }\n\t });\n\t /**\n\t\t * The sensitivity to control how responsive to the input signal the filter is.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Decibels}\n\t\t * @name sensitivity\n\t\t */\n\t Object.defineProperty(Tone.AutoWah.prototype, 'sensitivity', {\n\t get: function () {\n\t return Tone.gainToDb(1 / this._inputBoost.gain.value);\n\t },\n\t set: function (sensitivy) {\n\t this._inputBoost.gain.value = 1 / Tone.dbToGain(sensitivy);\n\t }\n\t });\n\t /**\n\t\t * sets the sweep range of the scaler\n\t\t * @private\n\t\t */\n\t Tone.AutoWah.prototype._setSweepRange = function () {\n\t this._sweepRange.min = this._baseFrequency;\n\t this._sweepRange.max = Math.min(this._baseFrequency * Math.pow(2, this._octaves), this.context.sampleRate / 2);\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.AutoWah} this\n\t\t */\n\t Tone.AutoWah.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this.follower.dispose();\n\t this.follower = null;\n\t this._sweepRange.dispose();\n\t this._sweepRange = null;\n\t this._bandpass.dispose();\n\t this._bandpass = null;\n\t this._peaking.dispose();\n\t this._peaking = null;\n\t this._inputBoost.dispose();\n\t this._inputBoost = null;\n\t this._writable([\n\t 'gain',\n\t 'Q'\n\t ]);\n\t this.gain = null;\n\t this.Q = null;\n\t return this;\n\t };\n\t return Tone.AutoWah;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Signal-rate modulo operator. Only works in AudioRange [-1, 1] and for modulus\n\t\t * values in the NormalRange.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.SignalBase}\n\t\t * @param {NormalRange} modulus The modulus to apply.\n\t\t * @example\n\t\t * var mod = new Tone.Modulo(0.2)\n\t\t * var sig = new Tone.Signal(0.5).connect(mod);\n\t\t * //mod outputs 0.1\n\t\t */\n\t Tone.Modulo = function (modulus) {\n\t Tone.SignalBase.call(this);\n\t this.createInsOuts(1, 0);\n\t /**\n\t\t\t * A waveshaper gets the integer multiple of\n\t\t\t * the input signal and the modulus.\n\t\t\t * @private\n\t\t\t * @type {Tone.WaveShaper}\n\t\t\t */\n\t this._shaper = new Tone.WaveShaper(Math.pow(2, 16));\n\t /**\n\t\t\t * the integer multiple is multiplied by the modulus\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._multiply = new Tone.Multiply();\n\t /**\n\t\t\t * and subtracted from the input signal\n\t\t\t * @type {Tone.Subtract}\n\t\t\t * @private\n\t\t\t */\n\t this._subtract = this.output = new Tone.Subtract();\n\t /**\n\t\t\t * the modulus signal\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t this._modSignal = new Tone.Signal(modulus);\n\t //connections\n\t this.input.fan(this._shaper, this._subtract);\n\t this._modSignal.connect(this._multiply, 0, 0);\n\t this._shaper.connect(this._multiply, 0, 1);\n\t this._multiply.connect(this._subtract, 0, 1);\n\t this._setWaveShaper(modulus);\n\t };\n\t Tone.extend(Tone.Modulo, Tone.SignalBase);\n\t /**\n\t\t * @param {number} mod the modulus to apply\n\t\t * @private\n\t\t */\n\t Tone.Modulo.prototype._setWaveShaper = function (mod) {\n\t this._shaper.setMap(function (val) {\n\t var multiple = Math.floor((val + 0.0001) / mod);\n\t return multiple;\n\t });\n\t };\n\t /**\n\t\t * The modulus value.\n\t\t * @memberOf Tone.Modulo#\n\t\t * @type {NormalRange}\n\t\t * @name value\n\t\t */\n\t Object.defineProperty(Tone.Modulo.prototype, 'value', {\n\t get: function () {\n\t return this._modSignal.value;\n\t },\n\t set: function (mod) {\n\t this._modSignal.value = mod;\n\t this._setWaveShaper(mod);\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Modulo} this\n\t\t */\n\t Tone.Modulo.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._shaper.dispose();\n\t this._shaper = null;\n\t this._multiply.dispose();\n\t this._multiply = null;\n\t this._subtract.dispose();\n\t this._subtract = null;\n\t this._modSignal.dispose();\n\t this._modSignal = null;\n\t return this;\n\t };\n\t return Tone.Modulo;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Bitcrusher downsamples the incoming signal to a different bitdepth.\n\t\t * Lowering the bitdepth of the signal creates distortion. Read more about Bitcrushing\n\t\t * on [Wikipedia](https://en.wikipedia.org/wiki/Bitcrusher).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {Number} bits The number of bits to downsample the signal. Nominal range\n\t\t * of 1 to 8.\n\t\t * @example\n\t\t * //initialize crusher and route a synth through it\n\t\t * var crusher = new Tone.BitCrusher(4).toMaster();\n\t\t * var synth = new Tone.MonoSynth().connect(crusher);\n\t\t */\n\t Tone.BitCrusher = function () {\n\t var options = Tone.defaults(arguments, ['bits'], Tone.BitCrusher);\n\t Tone.Effect.call(this, options);\n\t var invStepSize = 1 / Math.pow(2, options.bits - 1);\n\t /**\n\t\t\t * Subtract the input signal and the modulus of the input signal\n\t\t\t * @type {Tone.Subtract}\n\t\t\t * @private\n\t\t\t */\n\t this._subtract = new Tone.Subtract();\n\t /**\n\t\t\t * The mod function\n\t\t\t * @type {Tone.Modulo}\n\t\t\t * @private\n\t\t\t */\n\t this._modulo = new Tone.Modulo(invStepSize);\n\t /**\n\t\t\t * keeps track of the bits\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._bits = options.bits;\n\t //connect it up\n\t this.effectSend.fan(this._subtract, this._modulo);\n\t this._modulo.connect(this._subtract, 0, 1);\n\t this._subtract.connect(this.effectReturn);\n\t };\n\t Tone.extend(Tone.BitCrusher, Tone.Effect);\n\t /**\n\t\t * the default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.BitCrusher.defaults = { 'bits': 4 };\n\t /**\n\t\t * The bit depth of the effect. Nominal range of 1-8.\n\t\t * @memberOf Tone.BitCrusher#\n\t\t * @type {number}\n\t\t * @name bits\n\t\t */\n\t Object.defineProperty(Tone.BitCrusher.prototype, 'bits', {\n\t get: function () {\n\t return this._bits;\n\t },\n\t set: function (bits) {\n\t this._bits = bits;\n\t var invStepSize = 1 / Math.pow(2, bits - 1);\n\t this._modulo.value = invStepSize;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.BitCrusher} this\n\t\t */\n\t Tone.BitCrusher.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._subtract.dispose();\n\t this._subtract = null;\n\t this._modulo.dispose();\n\t this._modulo = null;\n\t return this;\n\t };\n\t return Tone.BitCrusher;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.ChebyShev is a Chebyshev waveshaper, an effect which is good \n\t\t * for making different types of distortion sounds.\n\t\t * Note that odd orders sound very different from even ones, \n\t\t * and order = 1 is no change. \n\t\t * Read more at [music.columbia.edu](http://music.columbia.edu/cmc/musicandcomputers/chapter4/04_06.php).\n\t\t *\n\t\t * @extends {Tone.Effect}\n\t\t * @constructor\n\t\t * @param {Positive|Object} [order] The order of the chebyshev polynomial. Normal range between 1-100. \n\t\t * @example\n\t\t * //create a new cheby\n\t\t * var cheby = new Tone.Chebyshev(50);\n\t\t * //create a monosynth connected to our cheby\n\t\t * synth = new Tone.MonoSynth().connect(cheby);\n\t\t */\n\t Tone.Chebyshev = function () {\n\t var options = Tone.defaults(arguments, ['order'], Tone.Chebyshev);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._shaper = new Tone.WaveShaper(4096);\n\t /**\n\t\t\t * holds onto the order of the filter\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._order = options.order;\n\t this.connectEffect(this._shaper);\n\t this.order = options.order;\n\t this.oversample = options.oversample;\n\t };\n\t Tone.extend(Tone.Chebyshev, Tone.Effect);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Chebyshev.defaults = {\n\t 'order': 1,\n\t 'oversample': 'none'\n\t };\n\t /**\n\t\t * get the coefficient for that degree\n\t\t * @param {number} x the x value\n\t\t * @param {number} degree \n\t\t * @param {Object} memo memoize the computed value. \n\t\t * this speeds up computation greatly. \n\t\t * @return {number} the coefficient \n\t\t * @private\n\t\t */\n\t Tone.Chebyshev.prototype._getCoefficient = function (x, degree, memo) {\n\t if (memo.hasOwnProperty(degree)) {\n\t return memo[degree];\n\t } else if (degree === 0) {\n\t memo[degree] = 0;\n\t } else if (degree === 1) {\n\t memo[degree] = x;\n\t } else {\n\t memo[degree] = 2 * x * this._getCoefficient(x, degree - 1, memo) - this._getCoefficient(x, degree - 2, memo);\n\t }\n\t return memo[degree];\n\t };\n\t /**\n\t\t * The order of the Chebyshev polynomial which creates\n\t\t * the equation which is applied to the incoming \n\t\t * signal through a Tone.WaveShaper. The equations\n\t\t * are in the form:<br>\n\t\t * order 2: 2x^2 + 1<br>\n\t\t * order 3: 4x^3 + 3x <br>\n\t\t * @memberOf Tone.Chebyshev#\n\t\t * @type {Positive}\n\t\t * @name order\n\t\t */\n\t Object.defineProperty(Tone.Chebyshev.prototype, 'order', {\n\t get: function () {\n\t return this._order;\n\t },\n\t set: function (order) {\n\t this._order = order;\n\t var curve = new Array(4096);\n\t var len = curve.length;\n\t for (var i = 0; i < len; ++i) {\n\t var x = i * 2 / len - 1;\n\t if (x === 0) {\n\t //should output 0 when input is 0\n\t curve[i] = 0;\n\t } else {\n\t curve[i] = this._getCoefficient(x, order, {});\n\t }\n\t }\n\t this._shaper.curve = curve;\n\t }\n\t });\n\t /**\n\t\t * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.Chebyshev#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t Object.defineProperty(Tone.Chebyshev.prototype, 'oversample', {\n\t get: function () {\n\t return this._shaper.oversample;\n\t },\n\t set: function (oversampling) {\n\t this._shaper.oversample = oversampling;\n\t }\n\t });\n\t /**\n\t\t * Clean up. \n\t\t * @returns {Tone.Chebyshev} this\n\t\t */\n\t Tone.Chebyshev.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._shaper.dispose();\n\t this._shaper = null;\n\t return this;\n\t };\n\t return Tone.Chebyshev;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Base class for Stereo effects. Provides effectSendL/R and effectReturnL/R.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.Effect}\n\t\t */\n\t Tone.StereoEffect = function () {\n\t //get the defaults\n\t Tone.AudioNode.call(this);\n\t var options = Tone.defaults(arguments, ['wet'], Tone.Effect);\n\t this.createInsOuts(1, 1);\n\t /**\n\t\t\t * the drywet knob to control the amount of effect\n\t\t\t * @type {Tone.CrossFade}\n\t\t\t * @private\n\t\t\t */\n\t this._dryWet = new Tone.CrossFade(options.wet);\n\t /**\n\t\t\t * The wet control, i.e. how much of the effected\n\t\t\t * will pass through to the output.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.wet = this._dryWet.fade;\n\t /**\n\t\t\t * then split it\n\t\t\t * @type {Tone.Split}\n\t\t\t * @private\n\t\t\t */\n\t this._split = new Tone.Split();\n\t /**\n\t\t\t * the effects send LEFT\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.effectSendL = this._split.left;\n\t /**\n\t\t\t * the effects send RIGHT\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.effectSendR = this._split.right;\n\t /**\n\t\t\t * the stereo effect merger\n\t\t\t * @type {Tone.Merge}\n\t\t\t * @private\n\t\t\t */\n\t this._merge = new Tone.Merge();\n\t /**\n\t\t\t * the effect return LEFT\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.effectReturnL = this._merge.left;\n\t /**\n\t\t\t * the effect return RIGHT\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.effectReturnR = this._merge.right;\n\t //connections\n\t this.input.connect(this._split);\n\t //dry wet connections\n\t this.input.connect(this._dryWet, 0, 0);\n\t this._merge.connect(this._dryWet, 0, 1);\n\t this._dryWet.connect(this.output);\n\t this._readOnly(['wet']);\n\t };\n\t Tone.extend(Tone.StereoEffect, Tone.Effect);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.StereoEffect} this\n\t\t */\n\t Tone.StereoEffect.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._dryWet.dispose();\n\t this._dryWet = null;\n\t this._split.dispose();\n\t this._split = null;\n\t this._merge.dispose();\n\t this._merge = null;\n\t this.effectSendL = null;\n\t this.effectSendR = null;\n\t this.effectReturnL = null;\n\t this.effectReturnR = null;\n\t this._writable(['wet']);\n\t this.wet = null;\n\t return this;\n\t };\n\t return Tone.StereoEffect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Chorus is a stereo chorus effect composed of\n\t\t * a left and right delay with a Tone.LFO applied to the delayTime of each channel.\n\t\t * Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna/blob/master/tuna.js).\n\t\t * Read more on the chorus effect on [SoundOnSound](http://www.soundonsound.com/sos/jun04/articles/synthsecrets.htm).\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t *\t@param {Frequency|Object} [frequency] The frequency of the LFO.\n\t\t *\t@param {Milliseconds} [delayTime] The delay of the chorus effect in ms.\n\t\t *\t@param {NormalRange} [depth] The depth of the chorus.\n\t\t *\t@example\n\t\t * var chorus = new Tone.Chorus(4, 2.5, 0.5);\n\t\t * var synth = new Tone.PolySynth(4, Tone.MonoSynth).connect(chorus);\n\t\t * synth.triggerAttackRelease([\"C3\",\"E3\",\"G3\"], \"8n\");\n\t\t */\n\t Tone.Chorus = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'delayTime',\n\t 'depth'\n\t ], Tone.Chorus);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * the depth of the chorus\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._depth = options.depth;\n\t /**\n\t\t\t * the delayTime\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._delayTime = options.delayTime / 1000;\n\t /**\n\t\t\t * the lfo which controls the delayTime\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoL = new Tone.LFO({\n\t 'frequency': options.frequency,\n\t 'min': 0,\n\t 'max': 1\n\t });\n\t /**\n\t\t\t * another LFO for the right side with a 180 degree phase diff\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoR = new Tone.LFO({\n\t 'frequency': options.frequency,\n\t 'min': 0,\n\t 'max': 1,\n\t 'phase': 180\n\t });\n\t /**\n\t\t\t * delay for left\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._delayNodeL = new Tone.Delay();\n\t /**\n\t\t\t * delay for right\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._delayNodeR = new Tone.Delay();\n\t /**\n\t\t\t * The frequency of the LFO which modulates the delayTime.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._lfoL.frequency;\n\t //connections\n\t this.effectSendL.chain(this._delayNodeL, this.effectReturnL);\n\t this.effectSendR.chain(this._delayNodeR, this.effectReturnR);\n\t //and pass through to make the detune apparent\n\t this.effectSendL.connect(this.effectReturnL);\n\t this.effectSendR.connect(this.effectReturnR);\n\t //lfo setup\n\t this._lfoL.connect(this._delayNodeL.delayTime);\n\t this._lfoR.connect(this._delayNodeR.delayTime);\n\t //start the lfo\n\t this._lfoL.start();\n\t this._lfoR.start();\n\t //have one LFO frequency control the other\n\t this._lfoL.frequency.connect(this._lfoR.frequency);\n\t //set the initial values\n\t this.depth = this._depth;\n\t this.frequency.value = options.frequency;\n\t this.type = options.type;\n\t this._readOnly(['frequency']);\n\t this.spread = options.spread;\n\t };\n\t Tone.extend(Tone.Chorus, Tone.StereoEffect);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Chorus.defaults = {\n\t 'frequency': 1.5,\n\t 'delayTime': 3.5,\n\t 'depth': 0.7,\n\t 'type': 'sine',\n\t 'spread': 180\n\t };\n\t /**\n\t\t * The depth of the effect. A depth of 1 makes the delayTime\n\t\t * modulate between 0 and 2*delayTime (centered around the delayTime).\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {NormalRange}\n\t\t * @name depth\n\t\t */\n\t Object.defineProperty(Tone.Chorus.prototype, 'depth', {\n\t get: function () {\n\t return this._depth;\n\t },\n\t set: function (depth) {\n\t this._depth = depth;\n\t var deviation = this._delayTime * depth;\n\t this._lfoL.min = Math.max(this._delayTime - deviation, 0);\n\t this._lfoL.max = this._delayTime + deviation;\n\t this._lfoR.min = Math.max(this._delayTime - deviation, 0);\n\t this._lfoR.max = this._delayTime + deviation;\n\t }\n\t });\n\t /**\n\t\t * The delayTime in milliseconds of the chorus. A larger delayTime\n\t\t * will give a more pronounced effect. Nominal range a delayTime\n\t\t * is between 2 and 20ms.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {Milliseconds}\n\t\t * @name delayTime\n\t\t */\n\t Object.defineProperty(Tone.Chorus.prototype, 'delayTime', {\n\t get: function () {\n\t return this._delayTime * 1000;\n\t },\n\t set: function (delayTime) {\n\t this._delayTime = delayTime / 1000;\n\t this.depth = this._depth;\n\t }\n\t });\n\t /**\n\t\t * The oscillator type of the LFO.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.Chorus.prototype, 'type', {\n\t get: function () {\n\t return this._lfoL.type;\n\t },\n\t set: function (type) {\n\t this._lfoL.type = type;\n\t this._lfoR.type = type;\n\t }\n\t });\n\t /**\n\t\t * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n\t\t * When set to 180, LFO's will be panned hard left and right respectively.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {Degrees}\n\t\t * @name spread\n\t\t */\n\t Object.defineProperty(Tone.Chorus.prototype, 'spread', {\n\t get: function () {\n\t return this._lfoR.phase - this._lfoL.phase;\n\t },\n\t set: function (spread) {\n\t this._lfoL.phase = 90 - spread / 2;\n\t this._lfoR.phase = spread / 2 + 90;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Chorus} this\n\t\t */\n\t Tone.Chorus.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t this._lfoL.dispose();\n\t this._lfoL = null;\n\t this._lfoR.dispose();\n\t this._lfoR = null;\n\t this._delayNodeL.dispose();\n\t this._delayNodeL = null;\n\t this._delayNodeR.dispose();\n\t this._delayNodeR = null;\n\t this._writable('frequency');\n\t this.frequency = null;\n\t return this;\n\t };\n\t return Tone.Chorus;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Convolver is a wrapper around the Native Web Audio\n\t\t * [ConvolverNode](http://webaudio.github.io/web-audio-api/#the-convolvernode-interface).\n\t\t * Convolution is useful for reverb and filter emulation. Read more about convolution reverb on\n\t\t * [Wikipedia](https://en.wikipedia.org/wiki/Convolution_reverb).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {string|Tone.Buffer|Object} [url] The URL of the impulse response or the Tone.Buffer\n\t\t * contianing the impulse response.\n\t\t * @param {Function=} onload The callback to invoke when the url is loaded.\n\t\t * @example\n\t\t * //initializing the convolver with an impulse response\n\t\t * var convolver = new Tone.Convolver(\"./path/to/ir.wav\").toMaster();\n\t\t */\n\t Tone.Convolver = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'url',\n\t 'onload'\n\t ], Tone.Convolver);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * convolver node\n\t\t\t * @type {ConvolverNode}\n\t\t\t * @private\n\t\t\t */\n\t this._convolver = this.context.createConvolver();\n\t /**\n\t\t\t * the convolution buffer\n\t\t\t * @type {Tone.Buffer}\n\t\t\t * @private\n\t\t\t */\n\t this._buffer = new Tone.Buffer(options.url, function (buffer) {\n\t this._convolver.buffer = buffer.get();\n\t options.onload();\n\t }.bind(this));\n\t this.connectEffect(this._convolver);\n\t };\n\t Tone.extend(Tone.Convolver, Tone.Effect);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Convolver.defaults = { 'onload': Tone.noOp };\n\t /**\n\t\t * The convolver's buffer\n\t\t * @memberOf Tone.Convolver#\n\t\t * @type {AudioBuffer}\n\t\t * @name buffer\n\t\t */\n\t Object.defineProperty(Tone.Convolver.prototype, 'buffer', {\n\t get: function () {\n\t return this._buffer.get();\n\t },\n\t set: function (buffer) {\n\t this._buffer.set(buffer);\n\t this._convolver.buffer = this._buffer.get();\n\t }\n\t });\n\t /**\n\t\t * Load an impulse response url as an audio buffer.\n\t\t * Decodes the audio asynchronously and invokes\n\t\t * the callback once the audio buffer loads.\n\t\t * @param {string} url The url of the buffer to load.\n\t\t * filetype support depends on the\n\t\t * browser.\n\t\t * @param {function=} callback\n\t\t * @returns {Promise}\n\t\t */\n\t Tone.Convolver.prototype.load = function (url, callback) {\n\t return this._buffer.load(url, function (buff) {\n\t this.buffer = buff;\n\t if (callback) {\n\t callback();\n\t }\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Convolver} this\n\t\t */\n\t Tone.Convolver.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._convolver.disconnect();\n\t this._convolver = null;\n\t this._buffer.dispose();\n\t this._buffer = null;\n\t return this;\n\t };\n\t return Tone.Convolver;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Distortion is a simple distortion effect using Tone.WaveShaper.\n\t\t * Algorithm from [a stackoverflow answer](http://stackoverflow.com/a/22313408).\n\t\t *\n\t\t * @extends {Tone.Effect}\n\t\t * @constructor\n\t\t * @param {Number|Object} [distortion] The amount of distortion (nominal range of 0-1)\n\t\t * @example\n\t\t * var dist = new Tone.Distortion(0.8).toMaster();\n\t\t * var fm = new Tone.SimpleFM().connect(dist);\n\t\t * //this sounds good on bass notes\n\t\t * fm.triggerAttackRelease(\"A1\", \"8n\");\n\t\t */\n\t Tone.Distortion = function () {\n\t var options = Tone.defaults(arguments, ['distortion'], Tone.Distortion);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * @type {Tone.WaveShaper}\n\t\t\t * @private\n\t\t\t */\n\t this._shaper = new Tone.WaveShaper(4096);\n\t /**\n\t\t\t * holds the distortion amount\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._distortion = options.distortion;\n\t this.connectEffect(this._shaper);\n\t this.distortion = options.distortion;\n\t this.oversample = options.oversample;\n\t };\n\t Tone.extend(Tone.Distortion, Tone.Effect);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Distortion.defaults = {\n\t 'distortion': 0.4,\n\t 'oversample': 'none'\n\t };\n\t /**\n\t\t * The amount of distortion.\n\t\t * @memberOf Tone.Distortion#\n\t\t * @type {NormalRange}\n\t\t * @name distortion\n\t\t */\n\t Object.defineProperty(Tone.Distortion.prototype, 'distortion', {\n\t get: function () {\n\t return this._distortion;\n\t },\n\t set: function (amount) {\n\t this._distortion = amount;\n\t var k = amount * 100;\n\t var deg = Math.PI / 180;\n\t this._shaper.setMap(function (x) {\n\t if (Math.abs(x) < 0.001) {\n\t //should output 0 when input is 0\n\t return 0;\n\t } else {\n\t return (3 + k) * x * 20 * deg / (Math.PI + k * Math.abs(x));\n\t }\n\t });\n\t }\n\t });\n\t /**\n\t\t * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.Distortion#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t Object.defineProperty(Tone.Distortion.prototype, 'oversample', {\n\t get: function () {\n\t return this._shaper.oversample;\n\t },\n\t set: function (oversampling) {\n\t this._shaper.oversample = oversampling;\n\t }\n\t });\n\t /**\n\t\t * Clean up. \n\t\t * @returns {Tone.Distortion} this\n\t\t */\n\t Tone.Distortion.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._shaper.dispose();\n\t this._shaper = null;\n\t return this;\n\t };\n\t return Tone.Distortion;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * \t@class Tone.FeedbackEffect provides a loop between an \n\t\t * \t audio source and its own output. This is a base-class\n\t\t * \t for feedback effects. \n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Effect}\n\t\t * @param {NormalRange|Object} [feedback] The initial feedback value.\n\t\t */\n\t Tone.FeedbackEffect = function () {\n\t var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * the gain which controls the feedback\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackGain = new Tone.Gain(options.feedback, Tone.Type.NormalRange);\n\t /**\n\t\t\t * The amount of signal which is fed back into the effect input. \n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.feedback = this._feedbackGain.gain;\n\t //the feedback loop\n\t this.effectReturn.chain(this._feedbackGain, this.effectSend);\n\t this._readOnly(['feedback']);\n\t };\n\t Tone.extend(Tone.FeedbackEffect, Tone.Effect);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.FeedbackEffect.defaults = { 'feedback': 0.125 };\n\t /**\n\t\t * Clean up. \n\t\t * @returns {Tone.FeedbackEffect} this\n\t\t */\n\t Tone.FeedbackEffect.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._writable(['feedback']);\n\t this._feedbackGain.dispose();\n\t this._feedbackGain = null;\n\t this.feedback = null;\n\t return this;\n\t };\n\t return Tone.FeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.FeedbackDelay is a DelayNode in which part of output\n\t\t * signal is fed back into the delay.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.FeedbackEffect}\n\t\t * @param {Time|Object} [delayTime] The delay applied to the incoming signal.\n\t\t * @param {NormalRange=} feedback The amount of the effected signal which\n\t\t * is fed back through the delay.\n\t\t * @example\n\t\t * var feedbackDelay = new Tone.FeedbackDelay(\"8n\", 0.5).toMaster();\n\t\t * var tom = new Tone.DrumSynth({\n\t\t * \t\"octaves\" : 4,\n\t\t * \t\"pitchDecay\" : 0.1\n\t\t * }).connect(feedbackDelay);\n\t\t * tom.triggerAttackRelease(\"A2\",\"32n\");\n\t\t */\n\t Tone.FeedbackDelay = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'delayTime',\n\t 'feedback'\n\t ], Tone.FeedbackDelay);\n\t Tone.FeedbackEffect.call(this, options);\n\t /**\n\t\t\t * the delay node\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._delayNode = new Tone.Delay(options.delayTime, options.maxDelay);\n\t /**\n\t\t\t * The delayTime of the DelayNode.\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = this._delayNode.delayTime;\n\t // connect it up\n\t this.connectEffect(this._delayNode);\n\t this._readOnly(['delayTime']);\n\t };\n\t Tone.extend(Tone.FeedbackDelay, Tone.FeedbackEffect);\n\t /**\n\t\t * The default values.\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.FeedbackDelay.defaults = {\n\t 'delayTime': 0.25,\n\t 'maxDelay': 1\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.FeedbackDelay} this\n\t\t */\n\t Tone.FeedbackDelay.prototype.dispose = function () {\n\t Tone.FeedbackEffect.prototype.dispose.call(this);\n\t this._delayNode.dispose();\n\t this._delayNode = null;\n\t this._writable(['delayTime']);\n\t this.delayTime = null;\n\t return this;\n\t };\n\t return Tone.FeedbackDelay;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * an array of comb filter delay values from Freeverb implementation\n\t\t * @static\n\t\t * @private\n\t\t * @type {Array}\n\t\t */\n\t var combFilterTunings = [\n\t 1557 / 44100,\n\t 1617 / 44100,\n\t 1491 / 44100,\n\t 1422 / 44100,\n\t 1277 / 44100,\n\t 1356 / 44100,\n\t 1188 / 44100,\n\t 1116 / 44100\n\t ];\n\t /**\n\t\t * an array of allpass filter frequency values from Freeverb implementation\n\t\t * @private\n\t\t * @static\n\t\t * @type {Array}\n\t\t */\n\t var allpassFilterFrequencies = [\n\t 225,\n\t 556,\n\t 441,\n\t 341\n\t ];\n\t /**\n\t\t * @class Tone.Freeverb is a reverb based on [Freeverb](https://ccrma.stanford.edu/~jos/pasp/Freeverb.html).\n\t\t * Read more on reverb on [Sound On Sound](https://web.archive.org/web/20160404083902/http://www.soundonsound.com:80/sos/feb01/articles/synthsecrets.asp).\n\t\t *\n\t\t * @extends {Tone.Effect}\n\t\t * @constructor\n\t\t * @param {NormalRange|Object} [roomSize] Correlated to the decay time.\n\t\t * @param {Frequency} [dampening] The cutoff frequency of a lowpass filter as part\n\t\t * of the reverb.\n\t\t * @example\n\t\t * var freeverb = new Tone.Freeverb().toMaster();\n\t\t * freeverb.dampening.value = 1000;\n\t\t * //routing synth through the reverb\n\t\t * var synth = new Tone.AMSynth().connect(freeverb);\n\t\t */\n\t Tone.Freeverb = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'roomSize',\n\t 'dampening'\n\t ], Tone.Freeverb);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * The roomSize value between. A larger roomSize\n\t\t\t * will result in a longer decay.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\t /**\n\t\t\t * The amount of dampening of the reverberant signal.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.dampening = new Tone.Signal(options.dampening, Tone.Type.Frequency);\n\t /**\n\t\t\t * the comb filters\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._combFilters = [];\n\t /**\n\t\t\t * the allpass filters on the left\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._allpassFiltersL = [];\n\t /**\n\t\t\t * the allpass filters on the right\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._allpassFiltersR = [];\n\t //make the allpass filters on the right\n\t for (var l = 0; l < allpassFilterFrequencies.length; l++) {\n\t var allpassL = this.context.createBiquadFilter();\n\t allpassL.type = 'allpass';\n\t allpassL.frequency.value = allpassFilterFrequencies[l];\n\t this._allpassFiltersL.push(allpassL);\n\t }\n\t //make the allpass filters on the left\n\t for (var r = 0; r < allpassFilterFrequencies.length; r++) {\n\t var allpassR = this.context.createBiquadFilter();\n\t allpassR.type = 'allpass';\n\t allpassR.frequency.value = allpassFilterFrequencies[r];\n\t this._allpassFiltersR.push(allpassR);\n\t }\n\t //make the comb filters\n\t for (var c = 0; c < combFilterTunings.length; c++) {\n\t var lfpf = new Tone.LowpassCombFilter(combFilterTunings[c]);\n\t if (c < combFilterTunings.length / 2) {\n\t this.effectSendL.chain(lfpf, this._allpassFiltersL[0]);\n\t } else {\n\t this.effectSendR.chain(lfpf, this._allpassFiltersR[0]);\n\t }\n\t this.roomSize.connect(lfpf.resonance);\n\t this.dampening.connect(lfpf.dampening);\n\t this._combFilters.push(lfpf);\n\t }\n\t //chain the allpass filters togetehr\n\t Tone.connectSeries.apply(Tone, this._allpassFiltersL);\n\t Tone.connectSeries.apply(Tone, this._allpassFiltersR);\n\t this._allpassFiltersL[this._allpassFiltersL.length - 1].connect(this.effectReturnL);\n\t this._allpassFiltersR[this._allpassFiltersR.length - 1].connect(this.effectReturnR);\n\t this._readOnly([\n\t 'roomSize',\n\t 'dampening'\n\t ]);\n\t };\n\t Tone.extend(Tone.Freeverb, Tone.StereoEffect);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Freeverb.defaults = {\n\t 'roomSize': 0.7,\n\t 'dampening': 3000\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Freeverb} this\n\t\t */\n\t Tone.Freeverb.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t for (var al = 0; al < this._allpassFiltersL.length; al++) {\n\t this._allpassFiltersL[al].disconnect();\n\t this._allpassFiltersL[al] = null;\n\t }\n\t this._allpassFiltersL = null;\n\t for (var ar = 0; ar < this._allpassFiltersR.length; ar++) {\n\t this._allpassFiltersR[ar].disconnect();\n\t this._allpassFiltersR[ar] = null;\n\t }\n\t this._allpassFiltersR = null;\n\t for (var cf = 0; cf < this._combFilters.length; cf++) {\n\t this._combFilters[cf].dispose();\n\t this._combFilters[cf] = null;\n\t }\n\t this._combFilters = null;\n\t this._writable([\n\t 'roomSize',\n\t 'dampening'\n\t ]);\n\t this.roomSize.dispose();\n\t this.roomSize = null;\n\t this.dampening.dispose();\n\t this.dampening = null;\n\t return this;\n\t };\n\t return Tone.Freeverb;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * an array of the comb filter delay time values\n\t\t * @private\n\t\t * @static\n\t\t * @type {Array}\n\t\t */\n\t var combFilterDelayTimes = [\n\t 1687 / 25000,\n\t 1601 / 25000,\n\t 2053 / 25000,\n\t 2251 / 25000\n\t ];\n\t /**\n\t\t * the resonances of each of the comb filters\n\t\t * @private\n\t\t * @static\n\t\t * @type {Array}\n\t\t */\n\t var combFilterResonances = [\n\t 0.773,\n\t 0.802,\n\t 0.753,\n\t 0.733\n\t ];\n\t /**\n\t\t * the allpass filter frequencies\n\t\t * @private\n\t\t * @static\n\t\t * @type {Array}\n\t\t */\n\t var allpassFilterFreqs = [\n\t 347,\n\t 113,\n\t 37\n\t ];\n\t /**\n\t\t * @class Tone.JCReverb is a simple [Schroeder Reverberator](https://ccrma.stanford.edu/~jos/pasp/Schroeder_Reverberators.html)\n\t\t * tuned by John Chowning in 1970.\n\t\t * It is made up of three allpass filters and four Tone.FeedbackCombFilter.\n\t\t *\n\t\t *\n\t\t * @extends {Tone.Effect}\n\t\t * @constructor\n\t\t * @param {NormalRange|Object} [roomSize] Coorelates to the decay time.\n\t\t * @example\n\t\t * var reverb = new Tone.JCReverb(0.4).connect(Tone.Master);\n\t\t * var delay = new Tone.FeedbackDelay(0.5);\n\t\t * //connecting the synth to reverb through delay\n\t\t * var synth = new Tone.DuoSynth().chain(delay, reverb);\n\t\t * synth.triggerAttackRelease(\"A4\",\"8n\");\n\t\t */\n\t Tone.JCReverb = function () {\n\t var options = Tone.defaults(arguments, ['roomSize'], Tone.JCReverb);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * room size control values between [0,1]\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\t /**\n\t\t\t * scale the room size\n\t\t\t * @type {Tone.Scale}\n\t\t\t * @private\n\t\t\t */\n\t this._scaleRoomSize = new Tone.Scale(-0.733, 0.197);\n\t /**\n\t\t\t * a series of allpass filters\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._allpassFilters = [];\n\t /**\n\t\t\t * parallel feedback comb filters\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackCombFilters = [];\n\t //make the allpass filters\n\t for (var af = 0; af < allpassFilterFreqs.length; af++) {\n\t var allpass = this.context.createBiquadFilter();\n\t allpass.type = 'allpass';\n\t allpass.frequency.value = allpassFilterFreqs[af];\n\t this._allpassFilters.push(allpass);\n\t }\n\t //and the comb filters\n\t for (var cf = 0; cf < combFilterDelayTimes.length; cf++) {\n\t var fbcf = new Tone.FeedbackCombFilter(combFilterDelayTimes[cf], 0.1);\n\t this._scaleRoomSize.connect(fbcf.resonance);\n\t fbcf.resonance.value = combFilterResonances[cf];\n\t this._allpassFilters[this._allpassFilters.length - 1].connect(fbcf);\n\t if (cf < combFilterDelayTimes.length / 2) {\n\t fbcf.connect(this.effectReturnL);\n\t } else {\n\t fbcf.connect(this.effectReturnR);\n\t }\n\t this._feedbackCombFilters.push(fbcf);\n\t }\n\t //chain the allpass filters together\n\t this.roomSize.connect(this._scaleRoomSize);\n\t Tone.connectSeries.apply(Tone, this._allpassFilters);\n\t this.effectSendL.connect(this._allpassFilters[0]);\n\t this.effectSendR.connect(this._allpassFilters[0]);\n\t this._readOnly(['roomSize']);\n\t };\n\t Tone.extend(Tone.JCReverb, Tone.StereoEffect);\n\t /**\n\t\t * the default values\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.JCReverb.defaults = { 'roomSize': 0.5 };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.JCReverb} this\n\t\t */\n\t Tone.JCReverb.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t for (var apf = 0; apf < this._allpassFilters.length; apf++) {\n\t this._allpassFilters[apf].disconnect();\n\t this._allpassFilters[apf] = null;\n\t }\n\t this._allpassFilters = null;\n\t for (var fbcf = 0; fbcf < this._feedbackCombFilters.length; fbcf++) {\n\t this._feedbackCombFilters[fbcf].dispose();\n\t this._feedbackCombFilters[fbcf] = null;\n\t }\n\t this._feedbackCombFilters = null;\n\t this._writable(['roomSize']);\n\t this.roomSize.dispose();\n\t this.roomSize = null;\n\t this._scaleRoomSize.dispose();\n\t this._scaleRoomSize = null;\n\t return this;\n\t };\n\t return Tone.JCReverb;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Mid/Side processing separates the the 'mid' signal\n\t\t * (which comes out of both the left and the right channel)\n\t\t * and the 'side' (which only comes out of the the side channels)\n\t\t * and effects them separately before being recombined.\n\t\t * Applies a Mid/Side seperation and recombination.\n\t\t * Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n\t\t * <br><br>\n\t\t * This is a base-class for Mid/Side Effects.\n\t\t *\n\t\t * @extends {Tone.Effect}\n\t\t * @constructor\n\t\t */\n\t Tone.MidSideEffect = function () {\n\t Tone.Effect.apply(this, arguments);\n\t /**\n\t\t\t * The mid/side split\n\t\t\t * @type {Tone.MidSideSplit}\n\t\t\t * @private\n\t\t\t */\n\t this._midSideSplit = new Tone.MidSideSplit();\n\t /**\n\t\t\t * The mid/side merge\n\t\t\t * @type {Tone.MidSideMerge}\n\t\t\t * @private\n\t\t\t */\n\t this._midSideMerge = new Tone.MidSideMerge();\n\t /**\n\t\t\t * The mid send. Connect to mid processing\n\t\t\t * @type {Tone}\n\t\t\t * @private\n\t\t\t */\n\t this.midSend = this._midSideSplit.mid;\n\t /**\n\t\t\t * The side send. Connect to side processing\n\t\t\t * @type {Tone}\n\t\t\t * @private\n\t\t\t */\n\t this.sideSend = this._midSideSplit.side;\n\t /**\n\t\t\t * The mid return connection\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.midReturn = this._midSideMerge.mid;\n\t /**\n\t\t\t * The side return connection\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this.sideReturn = this._midSideMerge.side;\n\t //the connections\n\t this.effectSend.connect(this._midSideSplit);\n\t this._midSideMerge.connect(this.effectReturn);\n\t };\n\t Tone.extend(Tone.MidSideEffect, Tone.Effect);\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.MidSideEffect} this\n\t\t */\n\t Tone.MidSideEffect.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._midSideSplit.dispose();\n\t this._midSideSplit = null;\n\t this._midSideMerge.dispose();\n\t this._midSideMerge = null;\n\t this.midSend = null;\n\t this.sideSend = null;\n\t this.midReturn = null;\n\t this.sideReturn = null;\n\t return this;\n\t };\n\t return Tone.MidSideEffect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Phaser is a phaser effect. Phasers work by changing the phase\n\t\t * of different frequency components of an incoming signal. Read more on\n\t\t * [Wikipedia](https://en.wikipedia.org/wiki/Phaser_(effect)).\n\t\t * Inspiration for this phaser comes from [Tuna.js](https://github.com/Dinahmoe/tuna/).\n\t\t *\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t *\t@constructor\n\t\t *\t@param {Frequency|Object} [frequency] The speed of the phasing.\n\t\t *\t@param {number} [octaves] The octaves of the effect.\n\t\t *\t@param {Frequency} [baseFrequency] The base frequency of the filters.\n\t\t *\t@example\n\t\t * var phaser = new Tone.Phaser({\n\t\t * \t\"frequency\" : 15,\n\t\t * \t\"octaves\" : 5,\n\t\t * \t\"baseFrequency\" : 1000\n\t\t * }).toMaster();\n\t\t * var synth = new Tone.FMSynth().connect(phaser);\n\t\t * synth.triggerAttackRelease(\"E3\", \"2n\");\n\t\t */\n\t Tone.Phaser = function () {\n\t //set the defaults\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'octaves',\n\t 'baseFrequency'\n\t ], Tone.Phaser);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * the lfo which controls the frequency on the left side\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoL = new Tone.LFO(options.frequency, 0, 1);\n\t /**\n\t\t\t * the lfo which controls the frequency on the right side\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoR = new Tone.LFO(options.frequency, 0, 1);\n\t this._lfoR.phase = 180;\n\t /**\n\t\t\t * the base modulation frequency\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._baseFrequency = options.baseFrequency;\n\t /**\n\t\t\t * the octaves of the phasing\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._octaves = options.octaves;\n\t /**\n\t\t\t * The quality factor of the filters\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.Q = new Tone.Signal(options.Q, Tone.Type.Positive);\n\t /**\n\t\t\t * the array of filters for the left side\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._filtersL = this._makeFilters(options.stages, this._lfoL, this.Q);\n\t /**\n\t\t\t * the array of filters for the left side\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._filtersR = this._makeFilters(options.stages, this._lfoR, this.Q);\n\t /**\n\t\t\t * the frequency of the effect\n\t\t\t * @type {Tone.Signal}\n\t\t\t */\n\t this.frequency = this._lfoL.frequency;\n\t this.frequency.value = options.frequency;\n\t //connect them up\n\t this.effectSendL.connect(this._filtersL[0]);\n\t this.effectSendR.connect(this._filtersR[0]);\n\t this._filtersL[options.stages - 1].connect(this.effectReturnL);\n\t this._filtersR[options.stages - 1].connect(this.effectReturnR);\n\t //control the frequency with one LFO\n\t this._lfoL.frequency.connect(this._lfoR.frequency);\n\t //set the options\n\t this.baseFrequency = options.baseFrequency;\n\t this.octaves = options.octaves;\n\t //start the lfo\n\t this._lfoL.start();\n\t this._lfoR.start();\n\t this._readOnly([\n\t 'frequency',\n\t 'Q'\n\t ]);\n\t };\n\t Tone.extend(Tone.Phaser, Tone.StereoEffect);\n\t /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {object}\n\t\t */\n\t Tone.Phaser.defaults = {\n\t 'frequency': 0.5,\n\t 'octaves': 3,\n\t 'stages': 10,\n\t 'Q': 10,\n\t 'baseFrequency': 350\n\t };\n\t /**\n\t\t * @param {number} stages\n\t\t * @returns {Array} the number of filters all connected together\n\t\t * @private\n\t\t */\n\t Tone.Phaser.prototype._makeFilters = function (stages, connectToFreq, Q) {\n\t var filters = new Array(stages);\n\t //make all the filters\n\t for (var i = 0; i < stages; i++) {\n\t var filter = this.context.createBiquadFilter();\n\t filter.type = 'allpass';\n\t Q.connect(filter.Q);\n\t connectToFreq.connect(filter.frequency);\n\t filters[i] = filter;\n\t }\n\t Tone.connectSeries.apply(Tone, filters);\n\t return filters;\n\t };\n\t /**\n\t\t * The number of octaves the phase goes above\n\t\t * the baseFrequency\n\t\t * @memberOf Tone.Phaser#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t Object.defineProperty(Tone.Phaser.prototype, 'octaves', {\n\t get: function () {\n\t return this._octaves;\n\t },\n\t set: function (octaves) {\n\t this._octaves = octaves;\n\t var max = this._baseFrequency * Math.pow(2, octaves);\n\t this._lfoL.max = max;\n\t this._lfoR.max = max;\n\t }\n\t });\n\t /**\n\t\t * The the base frequency of the filters.\n\t\t * @memberOf Tone.Phaser#\n\t\t * @type {number}\n\t\t * @name baseFrequency\n\t\t */\n\t Object.defineProperty(Tone.Phaser.prototype, 'baseFrequency', {\n\t get: function () {\n\t return this._baseFrequency;\n\t },\n\t set: function (freq) {\n\t this._baseFrequency = freq;\n\t this._lfoL.min = freq;\n\t this._lfoR.min = freq;\n\t this.octaves = this._octaves;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Phaser} this\n\t\t */\n\t Tone.Phaser.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'Q'\n\t ]);\n\t this.Q.dispose();\n\t this.Q = null;\n\t this._lfoL.dispose();\n\t this._lfoL = null;\n\t this._lfoR.dispose();\n\t this._lfoR = null;\n\t for (var i = 0; i < this._filtersL.length; i++) {\n\t this._filtersL[i].disconnect();\n\t this._filtersL[i] = null;\n\t }\n\t this._filtersL = null;\n\t for (var j = 0; j < this._filtersR.length; j++) {\n\t this._filtersR[j].disconnect();\n\t this._filtersR[j] = null;\n\t }\n\t this._filtersR = null;\n\t this.frequency = null;\n\t return this;\n\t };\n\t return Tone.Phaser;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Just like a stereo feedback effect, but the feedback is routed from left to right\n\t\t * and right to left instead of on the same channel.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t */\n\t Tone.StereoXFeedbackEffect = function () {\n\t var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * The amount of feedback from the output\n\t\t\t * back into the input of the effect (routed\n\t\t\t * across left and right channels).\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\t /**\n\t\t\t * the left side feeback\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackLR = new Tone.Gain();\n\t /**\n\t\t\t * the right side feeback\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackRL = new Tone.Gain();\n\t //connect it up\n\t this.effectReturnL.chain(this._feedbackLR, this.effectSendR);\n\t this.effectReturnR.chain(this._feedbackRL, this.effectSendL);\n\t this.feedback.fan(this._feedbackLR.gain, this._feedbackRL.gain);\n\t this._readOnly(['feedback']);\n\t };\n\t Tone.extend(Tone.StereoXFeedbackEffect, Tone.StereoEffect);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.StereoXFeedbackEffect} this\n\t\t */\n\t Tone.StereoXFeedbackEffect.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t this._writable(['feedback']);\n\t this.feedback.dispose();\n\t this.feedback = null;\n\t this._feedbackLR.dispose();\n\t this._feedbackLR = null;\n\t this._feedbackRL.dispose();\n\t this._feedbackRL = null;\n\t return this;\n\t };\n\t return Tone.StereoXFeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PingPongDelay is a feedback delay effect where the echo is heard\n\t\t * first in one channel and next in the opposite channel. In a stereo\n\t\t * system these are the right and left channels.\n\t\t * PingPongDelay in more simplified terms is two Tone.FeedbackDelays\n\t\t * with independent delay values. Each delay is routed to one channel\n\t\t * (left or right), and the channel triggered second will always\n\t\t * trigger at the same interval after the first.\n\t\t *\n\t\t * \t@constructor\n\t\t * \t@extends {Tone.StereoXFeedbackEffect}\n\t\t * @param {Time|Object} [delayTime] The delayTime between consecutive echos.\n\t\t * @param {NormalRange=} feedback The amount of the effected signal which\n\t\t * is fed back through the delay.\n\t\t * @example\n\t\t * var pingPong = new Tone.PingPongDelay(\"4n\", 0.2).toMaster();\n\t\t * var drum = new Tone.DrumSynth().connect(pingPong);\n\t\t * drum.triggerAttackRelease(\"C4\", \"32n\");\n\t\t */\n\t Tone.PingPongDelay = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'delayTime',\n\t 'feedback'\n\t ], Tone.PingPongDelay);\n\t Tone.StereoXFeedbackEffect.call(this, options);\n\t /**\n\t\t\t * the delay node on the left side\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._leftDelay = new Tone.Delay(0, options.maxDelayTime);\n\t /**\n\t\t\t * the delay node on the right side\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._rightDelay = new Tone.Delay(0, options.maxDelayTime);\n\t /**\n\t\t\t * the predelay on the right side\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._rightPreDelay = new Tone.Delay(0, options.maxDelayTime);\n\t /**\n\t\t\t * the delay time signal\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = new Tone.Signal(options.delayTime, Tone.Type.Time);\n\t //connect it up\n\t this.effectSendL.chain(this._leftDelay, this.effectReturnL);\n\t this.effectSendR.chain(this._rightPreDelay, this._rightDelay, this.effectReturnR);\n\t this.delayTime.fan(this._leftDelay.delayTime, this._rightDelay.delayTime, this._rightPreDelay.delayTime);\n\t //rearranged the feedback to be after the rightPreDelay\n\t this._feedbackLR.disconnect();\n\t this._feedbackLR.connect(this._rightDelay);\n\t this._readOnly(['delayTime']);\n\t };\n\t Tone.extend(Tone.PingPongDelay, Tone.StereoXFeedbackEffect);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.PingPongDelay.defaults = {\n\t 'delayTime': 0.25,\n\t 'maxDelayTime': 1\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.PingPongDelay} this\n\t\t */\n\t Tone.PingPongDelay.prototype.dispose = function () {\n\t Tone.StereoXFeedbackEffect.prototype.dispose.call(this);\n\t this._leftDelay.dispose();\n\t this._leftDelay = null;\n\t this._rightDelay.dispose();\n\t this._rightDelay = null;\n\t this._rightPreDelay.dispose();\n\t this._rightPreDelay = null;\n\t this._writable(['delayTime']);\n\t this.delayTime.dispose();\n\t this.delayTime = null;\n\t return this;\n\t };\n\t return Tone.PingPongDelay;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PitchShift does near-realtime pitch shifting to the incoming signal.\n\t\t * The effect is achieved by speeding up or slowing down the delayTime\n\t\t * of a DelayNode using a sawtooth wave.\n\t\t * Algorithm found in [this pdf](http://dsp-book.narod.ru/soundproc.pdf).\n\t\t * Additional reference by [Miller Pucket](http://msp.ucsd.edu/techniques/v0.11/book-html/node115.html).\n\t\t *\n\t\t * @extends {Tone.FeedbackEffect}\n\t\t * @param {Interval=} pitch The interval to transpose the incoming signal by.\n\t\t */\n\t Tone.PitchShift = function () {\n\t var options = Tone.defaults(arguments, ['pitch'], Tone.PitchShift);\n\t Tone.FeedbackEffect.call(this, options);\n\t /**\n\t\t\t * The pitch signal\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t this._frequency = new Tone.Signal(0);\n\t /**\n\t\t\t * Uses two DelayNodes to cover up the jump in\n\t\t\t * the sawtooth wave.\n\t\t\t * @type {DelayNode}\n\t\t\t * @private\n\t\t\t */\n\t this._delayA = new Tone.Delay(0, 1);\n\t /**\n\t\t\t * The first LFO.\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoA = new Tone.LFO({\n\t 'min': 0,\n\t 'max': 0.1,\n\t 'type': 'sawtooth'\n\t }).connect(this._delayA.delayTime);\n\t /**\n\t\t\t * The second DelayNode\n\t\t\t * @type {DelayNode}\n\t\t\t * @private\n\t\t\t */\n\t this._delayB = new Tone.Delay(0, 1);\n\t /**\n\t\t\t * The first LFO.\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoB = new Tone.LFO({\n\t 'min': 0,\n\t 'max': 0.1,\n\t 'type': 'sawtooth',\n\t 'phase': 180\n\t }).connect(this._delayB.delayTime);\n\t /**\n\t\t\t * Crossfade quickly between the two delay lines\n\t\t\t * to cover up the jump in the sawtooth wave\n\t\t\t * @type {Tone.CrossFade}\n\t\t\t * @private\n\t\t\t */\n\t this._crossFade = new Tone.CrossFade();\n\t /**\n\t\t\t * LFO which alternates between the two\n\t\t\t * delay lines to cover up the disparity in the\n\t\t\t * sawtooth wave.\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._crossFadeLFO = new Tone.LFO({\n\t 'min': 0,\n\t 'max': 1,\n\t 'type': 'triangle',\n\t 'phase': 90\n\t }).connect(this._crossFade.fade);\n\t /**\n\t\t\t * The delay node\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackDelay = new Tone.Delay(options.delayTime);\n\t /**\n\t\t\t * The amount of delay on the input signal\n\t\t\t * @type {Time}\n\t\t\t * @signal\n\t\t\t */\n\t this.delayTime = this._feedbackDelay.delayTime;\n\t this._readOnly('delayTime');\n\t /**\n\t\t\t * Hold the current pitch\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._pitch = options.pitch;\n\t /**\n\t\t\t * Hold the current windowSize\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._windowSize = options.windowSize;\n\t //connect the two delay lines up\n\t this._delayA.connect(this._crossFade.a);\n\t this._delayB.connect(this._crossFade.b);\n\t //connect the frequency\n\t this._frequency.fan(this._lfoA.frequency, this._lfoB.frequency, this._crossFadeLFO.frequency);\n\t //route the input\n\t this.effectSend.fan(this._delayA, this._delayB);\n\t this._crossFade.chain(this._feedbackDelay, this.effectReturn);\n\t //start the LFOs at the same time\n\t var now = this.now();\n\t this._lfoA.start(now);\n\t this._lfoB.start(now);\n\t this._crossFadeLFO.start(now);\n\t //set the initial value\n\t this.windowSize = this._windowSize;\n\t };\n\t Tone.extend(Tone.PitchShift, Tone.FeedbackEffect);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.PitchShift.defaults = {\n\t 'pitch': 0,\n\t 'windowSize': 0.1,\n\t 'delayTime': 0,\n\t 'feedback': 0\n\t };\n\t /**\n\t\t * Repitch the incoming signal by some interval (measured\n\t\t * in semi-tones).\n\t\t * @memberOf Tone.PitchShift#\n\t\t * @type {Interval}\n\t\t * @name pitch\n\t\t * @example\n\t\t * pitchShift.pitch = -12; //down one octave\n\t\t * pitchShift.pitch = 7; //up a fifth\n\t\t */\n\t Object.defineProperty(Tone.PitchShift.prototype, 'pitch', {\n\t get: function () {\n\t return this._pitch;\n\t },\n\t set: function (interval) {\n\t this._pitch = interval;\n\t var factor = 0;\n\t if (interval < 0) {\n\t this._lfoA.min = 0;\n\t this._lfoA.max = this._windowSize;\n\t this._lfoB.min = 0;\n\t this._lfoB.max = this._windowSize;\n\t factor = Tone.intervalToFrequencyRatio(interval - 1) + 1;\n\t } else {\n\t this._lfoA.min = this._windowSize;\n\t this._lfoA.max = 0;\n\t this._lfoB.min = this._windowSize;\n\t this._lfoB.max = 0;\n\t factor = Tone.intervalToFrequencyRatio(interval) - 1;\n\t }\n\t this._frequency.value = factor * (1.2 / this._windowSize);\n\t }\n\t });\n\t /**\n\t\t * The window size corresponds roughly to the sample length in a looping sampler.\n\t\t * Smaller values are desirable for a less noticeable delay time of the pitch shifted\n\t\t * signal, but larger values will result in smoother pitch shifting for larger intervals.\n\t\t * A nominal range of 0.03 to 0.1 is recommended.\n\t\t * @memberOf Tone.PitchShift#\n\t\t * @type {Time}\n\t\t * @name windowSize\n\t\t * @example\n\t\t * pitchShift.windowSize = 0.1;\n\t\t */\n\t Object.defineProperty(Tone.PitchShift.prototype, 'windowSize', {\n\t get: function () {\n\t return this._windowSize;\n\t },\n\t set: function (size) {\n\t this._windowSize = this.toSeconds(size);\n\t this.pitch = this._pitch;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.PitchShift} this\n\t\t */\n\t Tone.PitchShift.prototype.dispose = function () {\n\t Tone.FeedbackEffect.prototype.dispose.call(this);\n\t this._frequency.dispose();\n\t this._frequency = null;\n\t this._delayA.disconnect();\n\t this._delayA = null;\n\t this._delayB.disconnect();\n\t this._delayB = null;\n\t this._lfoA.dispose();\n\t this._lfoA = null;\n\t this._lfoB.dispose();\n\t this._lfoB = null;\n\t this._crossFade.dispose();\n\t this._crossFade = null;\n\t this._crossFadeLFO.dispose();\n\t this._crossFadeLFO = null;\n\t this._writable('delayTime');\n\t this._feedbackDelay.dispose();\n\t this._feedbackDelay = null;\n\t this.delayTime = null;\n\t return this;\n\t };\n\t return Tone.PitchShift;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Wrapper around the native BufferSourceNode.\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {AudioBuffer|Tone.Buffer} buffer The buffer to play\n\t\t * @param {Function} onload The callback to invoke when the\n\t\t * buffer is done playing.\n\t\t */\n\t Tone.BufferSource = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'buffer',\n\t 'onload'\n\t ], Tone.BufferSource);\n\t Tone.AudioNode.call(this, options);\n\t /**\n\t\t\t * The callback to invoke after the\n\t\t\t * buffer source is done playing.\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.onended = options.onended;\n\t /**\n\t\t\t * The time that the buffer was started.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._startTime = -1;\n\t /**\n\t\t\t * An additional flag if the actual BufferSourceNode\n\t\t\t * has been started. b/c stopping an unstarted buffer\n\t\t\t * will throw it into an invalid state\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t this._sourceStarted = false;\n\t /**\n\t\t\t * Flag if the source has already been stopped\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t this._sourceStopped = false;\n\t /**\n\t\t\t * The time that the buffer is scheduled to stop.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._stopTime = -1;\n\t /**\n\t\t\t * The gain node which envelopes the BufferSource\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._gainNode = this.output = new Tone.Gain();\n\t /**\n\t\t\t * The buffer source\n\t\t\t * @type {AudioBufferSourceNode}\n\t\t\t * @private\n\t\t\t */\n\t this._source = this.context.createBufferSource();\n\t this._source.connect(this._gainNode);\n\t this._source.onended = this._onended.bind(this);\n\t /**\n\t\t\t * The private buffer instance\n\t\t\t * @type {Tone.Buffer}\n\t\t\t * @private\n\t\t\t */\n\t this._buffer = new Tone.Buffer(options.buffer, options.onload);\n\t /**\n\t\t\t * The playbackRate of the buffer\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.playbackRate = new Tone.Param(this._source.playbackRate, Tone.Type.Positive);\n\t /**\n\t\t\t * The fadeIn time of the amplitude envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.fadeIn = options.fadeIn;\n\t /**\n\t\t\t * The fadeOut time of the amplitude envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.fadeOut = options.fadeOut;\n\t /**\n\t\t\t * The curve applied to the fades, either \"linear\" or \"exponential\"\n\t\t\t * @type {String}\n\t\t\t */\n\t this.curve = options.curve;\n\t /**\n\t\t\t * The value that the buffer ramps to\n\t\t\t * @type {Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._gain = 1;\n\t /**\n\t\t\t * The onended timeout\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._onendedTimeout = -1;\n\t //set some values initially\n\t this.loop = options.loop;\n\t this.loopStart = options.loopStart;\n\t this.loopEnd = options.loopEnd;\n\t this.playbackRate.value = options.playbackRate;\n\t };\n\t Tone.extend(Tone.BufferSource, Tone.AudioNode);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.BufferSource.defaults = {\n\t 'onended': Tone.noOp,\n\t 'onload': Tone.noOp,\n\t 'loop': false,\n\t 'loopStart': 0,\n\t 'loopEnd': 0,\n\t 'fadeIn': 0,\n\t 'fadeOut': 0,\n\t 'curve': 'linear',\n\t 'playbackRate': 1\n\t };\n\t /**\n\t\t * Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.BufferSource.prototype, 'state', {\n\t get: function () {\n\t var now = this.now();\n\t if (this._startTime !== -1 && now >= this._startTime && !this._sourceStopped) {\n\t return Tone.State.Started;\n\t } else {\n\t return Tone.State.Stopped;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Start the buffer\n\t\t * @param {Time} [startTime=now] When the player should start.\n\t\t * @param {Time} [offset=0] The offset from the beginning of the sample\n\t\t * to start at.\n\t\t * @param {Time=} duration How long the sample should play. If no duration\n\t\t * is given, it will default to the full length\n\t\t * of the sample (minus any offset)\n\t\t * @param {Gain} [gain=1] The gain to play the buffer back at.\n\t\t * @param {Time=} fadeInTime The optional fadeIn ramp time.\n\t\t * @return {Tone.BufferSource} this\n\t\t */\n\t Tone.BufferSource.prototype.start = function (time, offset, duration, gain, fadeInTime) {\n\t if (this._startTime !== -1) {\n\t throw new Error('Tone.BufferSource can only be started once.');\n\t }\n\t if (this.buffer.loaded) {\n\t time = this.toSeconds(time);\n\t //if it's a loop the default offset is the loopstart point\n\t if (this.loop) {\n\t offset = Tone.defaultArg(offset, this.loopStart);\n\t } else {\n\t //otherwise the default offset is 0\n\t offset = Tone.defaultArg(offset, 0);\n\t }\n\t offset = this.toSeconds(offset);\n\t gain = Tone.defaultArg(gain, 1);\n\t this._gain = gain;\n\t fadeInTime = this.toSeconds(Tone.defaultArg(fadeInTime, this.fadeIn));\n\t this.fadeIn = fadeInTime;\n\t if (fadeInTime > 0) {\n\t this._gainNode.gain.setValueAtTime(0, time);\n\t if (this.curve === 'linear') {\n\t this._gainNode.gain.linearRampToValueAtTime(this._gain, time + fadeInTime);\n\t } else {\n\t this._gainNode.gain.exponentialApproachValueAtTime(this._gain, time, fadeInTime);\n\t }\n\t } else {\n\t this._gainNode.gain.setValueAtTime(gain, time);\n\t }\n\t this._startTime = time;\n\t var computedDur = this.toSeconds(Tone.defaultArg(duration, this.buffer.duration - offset % this.buffer.duration));\n\t computedDur = Math.max(computedDur, 0);\n\t if (!Tone.isUndef(duration)) {\n\t //clip the duration when not looping\n\t if (!this.loop) {\n\t computedDur = Math.min(computedDur, this.buffer.duration - offset % this.buffer.duration);\n\t }\n\t this.stop(time + computedDur, this.fadeOut);\n\t }\n\t //start the buffer source\n\t if (this.loop) {\n\t //modify the offset if it's greater than the loop time\n\t var loopEnd = this.loopEnd || this.buffer.duration;\n\t var loopStart = this.loopStart;\n\t var loopDuration = loopEnd - loopStart;\n\t //move the offset back\n\t if (offset > loopEnd) {\n\t offset = (offset - loopStart) % loopDuration + loopStart;\n\t }\n\t }\n\t this._source.buffer = this.buffer.get();\n\t this._source.loopEnd = this.loopEnd || this.buffer.duration;\n\t Tone.isPast(time);\n\t if (offset < this.buffer.duration) {\n\t this._sourceStarted = true;\n\t this._source.start(time, offset);\n\t }\n\t } else {\n\t throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop the buffer. Optionally add a ramp time to fade the\n\t\t * buffer out.\n\t\t * @param {Time=} time The time the buffer should stop.\n\t\t * @param {Time=} fadeOutTime How long the gain should fade out for\n\t\t * @return {Tone.BufferSource} this\n\t\t */\n\t Tone.BufferSource.prototype.stop = function (time, fadeOutTime) {\n\t if (this.buffer.loaded) {\n\t time = this.toSeconds(time);\n\t //if this is before the previous stop\n\t if (this._stopTime === -1 || this._stopTime > time) {\n\t //stop if it's schedule before the start time\n\t if (time <= this._startTime) {\n\t this._gainNode.gain.cancelScheduledValues(time);\n\t this._gainNode.gain.value = 0;\n\t return this;\n\t }\n\t time = Math.max(this._startTime + this.fadeIn + this.sampleTime, time);\n\t //cancel the previous curve\n\t this._gainNode.gain.cancelScheduledValues(time);\n\t this._stopTime = time;\n\t //the fadeOut time\n\t fadeOutTime = this.toSeconds(Tone.defaultArg(fadeOutTime, this.fadeOut));\n\t var heldDuration = time - this._startTime - this.fadeIn - this.sampleTime;\n\t if (!this.loop) {\n\t //make sure the fade does not go beyond the length of the buffer\n\t heldDuration = Math.min(heldDuration, this.buffer.duration);\n\t }\n\t fadeOutTime = Math.min(heldDuration, fadeOutTime);\n\t var startFade = time - fadeOutTime;\n\t if (fadeOutTime > this.sampleTime) {\n\t this._gainNode.gain.setValueAtTime(this._gain, startFade);\n\t if (this.curve === 'linear') {\n\t this._gainNode.gain.linearRampToValueAtTime(0, time);\n\t } else {\n\t this._gainNode.gain.exponentialApproachValueAtTime(0, startFade, fadeOutTime);\n\t }\n\t } else {\n\t this._gainNode.gain.setValueAtTime(0, time);\n\t }\n\t Tone.context.clearTimeout(this._onendedTimeout);\n\t this._onendedTimeout = Tone.context.setTimeout(this._onended.bind(this), this._stopTime - this.now());\n\t }\n\t } else {\n\t throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Internal callback when the buffer is ended.\n\t\t * Invokes `onended` and disposes the node.\n\t\t * @private\n\t\t */\n\t Tone.BufferSource.prototype._onended = function () {\n\t if (!this._sourceStopped) {\n\t this._sourceStopped = true;\n\t //allow additional time for the exponential curve to fully decay\n\t var additionalTail = this.curve === 'exponential' ? this.fadeOut * 2 : 0;\n\t if (this._sourceStarted && this._stopTime !== -1) {\n\t this._source.stop(this._stopTime + additionalTail);\n\t }\n\t this.onended(this);\n\t }\n\t };\n\t /**\n\t\t * If loop is true, the loop will start at this position.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.BufferSource.prototype, 'loopStart', {\n\t get: function () {\n\t return this._source.loopStart;\n\t },\n\t set: function (loopStart) {\n\t this._source.loopStart = this.toSeconds(loopStart);\n\t }\n\t });\n\t /**\n\t\t * If loop is true, the loop will end at this position.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.BufferSource.prototype, 'loopEnd', {\n\t get: function () {\n\t return this._source.loopEnd;\n\t },\n\t set: function (loopEnd) {\n\t this._source.loopEnd = this.toSeconds(loopEnd);\n\t }\n\t });\n\t /**\n\t\t * The audio buffer belonging to the player.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Tone.Buffer}\n\t\t * @name buffer\n\t\t */\n\t Object.defineProperty(Tone.BufferSource.prototype, 'buffer', {\n\t get: function () {\n\t return this._buffer;\n\t },\n\t set: function (buffer) {\n\t this._buffer.set(buffer);\n\t }\n\t });\n\t /**\n\t\t * If the buffer should loop once it's over.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Boolean}\n\t\t * @name loop\n\t\t */\n\t Object.defineProperty(Tone.BufferSource.prototype, 'loop', {\n\t get: function () {\n\t return this._source.loop;\n\t },\n\t set: function (loop) {\n\t this._source.loop = loop;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.BufferSource} this\n\t\t */\n\t Tone.BufferSource.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.onended = null;\n\t this._source.onended = null;\n\t this._source.disconnect();\n\t this._source = null;\n\t this._gainNode.dispose();\n\t this._gainNode = null;\n\t this._buffer.dispose();\n\t this._buffer = null;\n\t this._startTime = -1;\n\t this.playbackRate = null;\n\t Tone.context.clearTimeout(this._onendedTimeout);\n\t return this;\n\t };\n\t return Tone.BufferSource;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Noise is a noise generator. It uses looped noise buffers to save on performance.\n\t\t * Tone.Noise supports the noise types: \"pink\", \"white\", and \"brown\". Read more about\n\t\t * colors of noise on [Wikipedia](https://en.wikipedia.org/wiki/Colors_of_noise).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Source}\n\t\t * @param {string} type the noise type (white|pink|brown)\n\t\t * @example\n\t\t * //initialize the noise and start\n\t\t * var noise = new Tone.Noise(\"pink\").start();\n\t\t *\n\t\t * //make an autofilter to shape the noise\n\t\t * var autoFilter = new Tone.AutoFilter({\n\t\t * \t\"frequency\" : \"8m\",\n\t\t * \t\"min\" : 800,\n\t\t * \t\"max\" : 15000\n\t\t * }).connect(Tone.Master);\n\t\t *\n\t\t * //connect the noise\n\t\t * noise.connect(autoFilter);\n\t\t * //start the autofilter LFO\n\t\t * autoFilter.start()\n\t\t */\n\t Tone.Noise = function () {\n\t var options = Tone.defaults(arguments, ['type'], Tone.Noise);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * @private\n\t\t\t * @type {AudioBufferSourceNode}\n\t\t\t */\n\t this._source = null;\n\t /**\n\t\t\t * the buffer\n\t\t\t * @private\n\t\t\t * @type {AudioBuffer}\n\t\t\t */\n\t this._type = options.type;\n\t /**\n\t\t\t * The playback rate of the noise. Affects\n\t\t\t * the \"frequency\" of the noise.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this._playbackRate = options.playbackRate;\n\t };\n\t Tone.extend(Tone.Noise, Tone.Source);\n\t /**\n\t\t * the default parameters\n\t\t *\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Noise.defaults = {\n\t 'type': 'white',\n\t 'playbackRate': 1\n\t };\n\t /**\n\t\t * The type of the noise. Can be \"white\", \"brown\", or \"pink\".\n\t\t * @memberOf Tone.Noise#\n\t\t * @type {string}\n\t\t * @name type\n\t\t * @example\n\t\t * noise.type = \"white\";\n\t\t */\n\t Object.defineProperty(Tone.Noise.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t if (this._type !== type) {\n\t if (type in _noiseBuffers) {\n\t this._type = type;\n\t //if it's playing, stop and restart it\n\t if (this.state === Tone.State.Started) {\n\t var now = this.now();\n\t this._stop(now);\n\t this._start(now);\n\t }\n\t } else {\n\t throw new TypeError('Tone.Noise: invalid type: ' + type);\n\t }\n\t }\n\t }\n\t });\n\t /**\n\t\t * The playback rate of the noise. Affects\n\t\t * the \"frequency\" of the noise.\n\t\t * @type {Positive}\n\t\t * @signal\n\t\t */\n\t Object.defineProperty(Tone.Noise.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._playbackRate;\n\t },\n\t set: function (rate) {\n\t this._playbackRate = rate;\n\t if (this._source) {\n\t this._source.playbackRate.value = rate;\n\t }\n\t }\n\t });\n\t /**\n\t\t * internal start method\n\t\t *\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.Noise.prototype._start = function (time) {\n\t var buffer = _noiseBuffers[this._type];\n\t this._source = new Tone.BufferSource(buffer).connect(this.output);\n\t this._source.loop = true;\n\t this._source.playbackRate.value = this._playbackRate;\n\t this._source.start(this.toSeconds(time), Math.random() * (buffer.duration - 0.001));\n\t };\n\t /**\n\t\t * internal stop method\n\t\t *\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.Noise.prototype._stop = function (time) {\n\t if (this._source) {\n\t this._source.stop(this.toSeconds(time));\n\t this._source = null;\n\t }\n\t };\n\t /**\n\t\t * Restarts the noise.\n\t\t * @param {[type]} time [description]\n\t\t * @return {[type]} [description]\n\t\t */\n\t Tone.Noise.prototype.restart = function (time) {\n\t //TODO could be optimized by cancelling the buffer source 'stop'\n\t //stop and restart\n\t this._stop(time);\n\t this._start(time);\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Noise} this\n\t\t */\n\t Tone.Noise.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t if (this._source !== null) {\n\t this._source.disconnect();\n\t this._source = null;\n\t }\n\t this._buffer = null;\n\t return this;\n\t };\n\t ///////////////////////////////////////////////////////////////////////////\n\t // THE BUFFERS\n\t ///////////////////////////////////////////////////////////////////////////\n\t //Noise buffer stats\n\t var bufferLength = 44100 * 5;\n\t var channels = 2;\n\t /**\n\t\t *\tThe noise arrays. Generated on initialization.\n\t\t * borrowed heavily from https://github.com/zacharydenton/noise.js\n\t\t * (c) 2013 Zach Denton (MIT)\n\t\t * @static\n\t\t * @private\n\t\t * @type {Array}\n\t\t */\n\t var _noiseArrays = {\n\t 'pink': function () {\n\t var buffer = [];\n\t for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t var channel = new Float32Array(bufferLength);\n\t buffer[channelNum] = channel;\n\t var b0, b1, b2, b3, b4, b5, b6;\n\t b0 = b1 = b2 = b3 = b4 = b5 = b6 = 0;\n\t for (var i = 0; i < bufferLength; i++) {\n\t var white = Math.random() * 2 - 1;\n\t b0 = 0.99886 * b0 + white * 0.0555179;\n\t b1 = 0.99332 * b1 + white * 0.0750759;\n\t b2 = 0.969 * b2 + white * 0.153852;\n\t b3 = 0.8665 * b3 + white * 0.3104856;\n\t b4 = 0.55 * b4 + white * 0.5329522;\n\t b5 = -0.7616 * b5 - white * 0.016898;\n\t channel[i] = b0 + b1 + b2 + b3 + b4 + b5 + b6 + white * 0.5362;\n\t channel[i] *= 0.11;\n\t // (roughly) compensate for gain\n\t b6 = white * 0.115926;\n\t }\n\t }\n\t return buffer;\n\t }(),\n\t 'brown': function () {\n\t var buffer = [];\n\t for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t var channel = new Float32Array(bufferLength);\n\t buffer[channelNum] = channel;\n\t var lastOut = 0;\n\t for (var i = 0; i < bufferLength; i++) {\n\t var white = Math.random() * 2 - 1;\n\t channel[i] = (lastOut + 0.02 * white) / 1.02;\n\t lastOut = channel[i];\n\t channel[i] *= 3.5; // (roughly) compensate for gain\n\t }\n\t }\n\t return buffer;\n\t }(),\n\t 'white': function () {\n\t var buffer = [];\n\t for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t var channel = new Float32Array(bufferLength);\n\t buffer[channelNum] = channel;\n\t for (var i = 0; i < bufferLength; i++) {\n\t channel[i] = Math.random() * 2 - 1;\n\t }\n\t }\n\t return buffer;\n\t }()\n\t };\n\t /**\n\t\t *\tstatic noise buffers\n\t\t * @static\n\t\t * @private\n\t\t * @type {Tone.Buffer}\n\t\t */\n\t var _noiseBuffers = {};\n\t //create the Tone.Buffers\n\t function createBuffers() {\n\t for (var type in _noiseArrays) {\n\t _noiseBuffers[type] = new Tone.Buffer().fromArray(_noiseArrays[type]);\n\t }\n\t }\n\t //create the noise buffers\n\t Tone.getContext(createBuffers);\n\t Tone.Context.on('init', createBuffers);\n\t return Tone.Noise;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Simple convolution created with decaying noise.\n\t\t * \t\tGenerates an Impulse Response Buffer\n\t\t * \t\t\twith Tone.Offline then feeds the IR into ConvolverNode.\n\t\t * \t\t\tNote: the Reverb will not make any sound until [generate](#generate)\n\t\t * \t\t\thas been invoked and resolved.\n\t\t *\n\t\t * \t\t\tInspiration from [ReverbGen](https://github.com/adelespinasse/reverbGen).\n\t\t * \t\t\tCopyright (c) 2014 Alan deLespinasse Apache 2.0 License.\n\t\t *\n\t\t * @extends {Tone.Convolver}\n\t\t * @param {Time=} decay The amount of time it will reverberate for.\n\t\t */\n\t Tone.Reverb = function () {\n\t var options = Tone.defaults(arguments, ['decay'], Tone.Reverb);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * Convolver node\n\t\t\t * @type {ConvolverNode}\n\t\t\t * @private\n\t\t\t */\n\t this._convolver = this.context.createConvolver();\n\t /**\n\t\t\t * The duration of the reverb\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.decay = options.decay;\n\t /**\n\t\t\t * The amount of time before the reverb is fully\n\t\t\t * ramped in.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.preDelay = options.preDelay;\n\t this.connectEffect(this._convolver);\n\t };\n\t Tone.extend(Tone.Reverb, Tone.Effect);\n\t /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @static\n\t\t */\n\t Tone.Reverb.defaults = {\n\t 'decay': 1.5,\n\t 'preDelay': 0.01\n\t };\n\t /**\n\t\t * Generate the Impulse Response. Returns a promise while the IR is being\n\t\t * generated.\n\t\t * @return {Promise<Tone.Reverb>} Promise which returns this object.\n\t\t */\n\t Tone.Reverb.prototype.generate = function () {\n\t return Tone.Offline(function () {\n\t //create a noise burst which decays over the duration\n\t var noiseL = new Tone.Noise();\n\t var noiseR = new Tone.Noise();\n\t var merge = new Tone.Merge();\n\t noiseL.connect(merge.left);\n\t noiseR.connect(merge.right);\n\t var gainNode = new Tone.Gain().toMaster();\n\t merge.connect(gainNode);\n\t noiseL.start(0);\n\t noiseR.start(0);\n\t //short fade in\n\t gainNode.gain.setValueAtTime(0, 0);\n\t gainNode.gain.linearRampToValueAtTime(1, this.preDelay);\n\t //decay\n\t gainNode.gain.exponentialApproachValueAtTime(0, this.preDelay, this.decay - this.preDelay);\n\t }.bind(this), this.decay).then(function (buffer) {\n\t this._convolver.buffer = buffer.get();\n\t return this;\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Reverb} this\n\t\t */\n\t Tone.Reverb.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._convolver.disconnect();\n\t this._convolver = null;\n\t return this;\n\t };\n\t return Tone.Reverb;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Base class for stereo feedback effects where the effectReturn\n\t\t * is fed back into the same channel.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t */\n\t Tone.StereoFeedbackEffect = function () {\n\t var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * controls the amount of feedback\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\t /**\n\t\t\t * the left side feeback\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackL = new Tone.Gain();\n\t /**\n\t\t\t * the right side feeback\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._feedbackR = new Tone.Gain();\n\t //connect it up\n\t this.effectReturnL.chain(this._feedbackL, this.effectSendL);\n\t this.effectReturnR.chain(this._feedbackR, this.effectSendR);\n\t this.feedback.fan(this._feedbackL.gain, this._feedbackR.gain);\n\t this._readOnly(['feedback']);\n\t };\n\t Tone.extend(Tone.StereoFeedbackEffect, Tone.StereoEffect);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.StereoFeedbackEffect} this\n\t\t */\n\t Tone.StereoFeedbackEffect.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t this._writable(['feedback']);\n\t this.feedback.dispose();\n\t this.feedback = null;\n\t this._feedbackL.dispose();\n\t this._feedbackL = null;\n\t this._feedbackR.dispose();\n\t this._feedbackR = null;\n\t return this;\n\t };\n\t return Tone.StereoFeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Applies a width factor to the mid/side seperation.\n\t\t * 0 is all mid and 1 is all side.\n\t\t * Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n\t\t * <br><br>\n\t\t * <code>\n\t\t * Mid *= 2*(1-width)<br>\n\t\t * Side *= 2*width\n\t\t * </code>\n\t\t *\n\t\t * @extends {Tone.MidSideEffect}\n\t\t * @constructor\n\t\t * @param {NormalRange|Object} [width] The stereo width. A width of 0 is mono and 1 is stereo. 0.5 is no change.\n\t\t */\n\t Tone.StereoWidener = function () {\n\t var options = Tone.defaults(arguments, ['width'], Tone.StereoWidener);\n\t Tone.MidSideEffect.call(this, options);\n\t /**\n\t\t\t * The width control. 0 = 100% mid. 1 = 100% side. 0.5 = no change.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\t this._readOnly(['width']);\n\t /**\n\t\t\t * Two times the (1-width) for the mid channel\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._twoTimesWidthMid = new Tone.Multiply(2);\n\t /**\n\t\t\t * Two times the width for the side channel\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._twoTimesWidthSide = new Tone.Multiply(2);\n\t /**\n\t\t\t * Mid multiplier\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._midMult = new Tone.Multiply();\n\t this._twoTimesWidthMid.connect(this._midMult, 0, 1);\n\t this.midSend.chain(this._midMult, this.midReturn);\n\t /**\n\t\t\t * 1 - width\n\t\t\t * @type {Tone}\n\t\t\t */\n\t this._oneMinusWidth = new Tone.Subtract();\n\t this._oneMinusWidth.connect(this._twoTimesWidthMid);\n\t this.context.getConstant(1).connect(this._oneMinusWidth, 0, 0);\n\t this.width.connect(this._oneMinusWidth, 0, 1);\n\t /**\n\t\t\t * Side multiplier\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._sideMult = new Tone.Multiply();\n\t this.width.connect(this._twoTimesWidthSide);\n\t this._twoTimesWidthSide.connect(this._sideMult, 0, 1);\n\t this.sideSend.chain(this._sideMult, this.sideReturn);\n\t };\n\t Tone.extend(Tone.StereoWidener, Tone.MidSideEffect);\n\t /**\n\t\t * the default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.StereoWidener.defaults = { 'width': 0.5 };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.StereoWidener} this\n\t\t */\n\t Tone.StereoWidener.prototype.dispose = function () {\n\t Tone.MidSideEffect.prototype.dispose.call(this);\n\t this._writable(['width']);\n\t this.width.dispose();\n\t this.width = null;\n\t this._midMult.dispose();\n\t this._midMult = null;\n\t this._sideMult.dispose();\n\t this._sideMult = null;\n\t this._twoTimesWidthMid.dispose();\n\t this._twoTimesWidthMid = null;\n\t this._twoTimesWidthSide.dispose();\n\t this._twoTimesWidthSide = null;\n\t this._oneMinusWidth.dispose();\n\t this._oneMinusWidth = null;\n\t return this;\n\t };\n\t return Tone.StereoWidener;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Tremolo modulates the amplitude of an incoming signal using a Tone.LFO.\n\t\t * The type, frequency, and depth of the LFO is controllable.\n\t\t *\n\t\t * @extends {Tone.StereoEffect}\n\t\t * @constructor\n\t\t * @param {Frequency} [frequency] The rate of the effect.\n\t\t * @param {NormalRange} [depth] The depth of the effect.\n\t\t * @example\n\t\t * //create a tremolo and start it's LFO\n\t\t * var tremolo = new Tone.Tremolo(9, 0.75).toMaster().start();\n\t\t * //route an oscillator through the tremolo and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(tremolo).start();\n\t\t */\n\t Tone.Tremolo = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'depth'\n\t ], Tone.Tremolo);\n\t Tone.StereoEffect.call(this, options);\n\t /**\n\t\t\t * The tremelo LFO in the left channel\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoL = new Tone.LFO({\n\t 'phase': options.spread,\n\t 'min': 1,\n\t 'max': 0\n\t });\n\t /**\n\t\t\t * The tremelo LFO in the left channel\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfoR = new Tone.LFO({\n\t 'phase': options.spread,\n\t 'min': 1,\n\t 'max': 0\n\t });\n\t /**\n\t\t\t * Where the gain is multiplied\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._amplitudeL = new Tone.Gain();\n\t /**\n\t\t\t * Where the gain is multiplied\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._amplitudeR = new Tone.Gain();\n\t /**\n\t\t\t * The frequency of the tremolo.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The depth of the effect. A depth of 0, has no effect\n\t\t\t * on the amplitude, and a depth of 1 makes the amplitude\n\t\t\t * modulate fully between 0 and 1.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.depth = new Tone.Signal(options.depth, Tone.Type.NormalRange);\n\t this._readOnly([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this.effectSendL.chain(this._amplitudeL, this.effectReturnL);\n\t this.effectSendR.chain(this._amplitudeR, this.effectReturnR);\n\t this._lfoL.connect(this._amplitudeL.gain);\n\t this._lfoR.connect(this._amplitudeR.gain);\n\t this.frequency.fan(this._lfoL.frequency, this._lfoR.frequency);\n\t this.depth.fan(this._lfoR.amplitude, this._lfoL.amplitude);\n\t this.type = options.type;\n\t this.spread = options.spread;\n\t };\n\t Tone.extend(Tone.Tremolo, Tone.StereoEffect);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Tremolo.defaults = {\n\t 'frequency': 10,\n\t 'type': 'sine',\n\t 'depth': 0.5,\n\t 'spread': 180\n\t };\n\t /**\n\t\t * Start the tremolo.\n\t\t * @param {Time} [time=now] When the tremolo begins.\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t Tone.Tremolo.prototype.start = function (time) {\n\t this._lfoL.start(time);\n\t this._lfoR.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the tremolo.\n\t\t * @param {Time} [time=now] When the tremolo stops.\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t Tone.Tremolo.prototype.stop = function (time) {\n\t this._lfoL.stop(time);\n\t this._lfoR.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the effect to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t * Transport has started.\n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t Tone.Tremolo.prototype.sync = function (delay) {\n\t this._lfoL.sync(delay);\n\t this._lfoR.sync(delay);\n\t Tone.Transport.syncSignal(this.frequency);\n\t return this;\n\t };\n\t /**\n\t\t * Unsync the filter from the transport\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t Tone.Tremolo.prototype.unsync = function () {\n\t this._lfoL.unsync();\n\t this._lfoR.unsync();\n\t Tone.Transport.unsyncSignal(this.frequency);\n\t return this;\n\t };\n\t /**\n\t\t * The Tremolo's oscillator type.\n\t\t * @memberOf Tone.Tremolo#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.Tremolo.prototype, 'type', {\n\t get: function () {\n\t return this._lfoL.type;\n\t },\n\t set: function (type) {\n\t this._lfoL.type = type;\n\t this._lfoR.type = type;\n\t }\n\t });\n\t /**\n\t\t * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n\t\t * When set to 180, LFO's will be panned hard left and right respectively.\n\t\t * @memberOf Tone.Tremolo#\n\t\t * @type {Degrees}\n\t\t * @name spread\n\t\t */\n\t Object.defineProperty(Tone.Tremolo.prototype, 'spread', {\n\t get: function () {\n\t return this._lfoR.phase - this._lfoL.phase; //180\n\t },\n\t set: function (spread) {\n\t this._lfoL.phase = 90 - spread / 2;\n\t this._lfoR.phase = spread / 2 + 90;\n\t }\n\t });\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t Tone.Tremolo.prototype.dispose = function () {\n\t Tone.StereoEffect.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this._lfoL.dispose();\n\t this._lfoL = null;\n\t this._lfoR.dispose();\n\t this._lfoR = null;\n\t this._amplitudeL.dispose();\n\t this._amplitudeL = null;\n\t this._amplitudeR.dispose();\n\t this._amplitudeR = null;\n\t this.frequency = null;\n\t this.depth = null;\n\t return this;\n\t };\n\t return Tone.Tremolo;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A Vibrato effect composed of a Tone.Delay and a Tone.LFO. The LFO\n\t\t * modulates the delayTime of the delay, causing the pitch to rise\n\t\t * and fall. \n\t\t * @extends {Tone.Effect}\n\t\t * @param {Frequency} frequency The frequency of the vibrato.\n\t\t * @param {NormalRange} depth The amount the pitch is modulated.\n\t\t */\n\t Tone.Vibrato = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'depth'\n\t ], Tone.Vibrato);\n\t Tone.Effect.call(this, options);\n\t /**\n\t\t\t * The delay node used for the vibrato effect\n\t\t\t * @type {Tone.Delay}\n\t\t\t * @private\n\t\t\t */\n\t this._delayNode = new Tone.Delay(0, options.maxDelay);\n\t /**\n\t\t\t * The LFO used to control the vibrato\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._lfo = new Tone.LFO({\n\t 'type': options.type,\n\t 'min': 0,\n\t 'max': options.maxDelay,\n\t 'frequency': options.frequency,\n\t 'phase': -90 //offse the phase so the resting position is in the center\n\t }).start().connect(this._delayNode.delayTime);\n\t /**\n\t\t\t * The frequency of the vibrato\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._lfo.frequency;\n\t /**\n\t\t\t * The depth of the vibrato. \n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.depth = this._lfo.amplitude;\n\t this.depth.value = options.depth;\n\t this._readOnly([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this.effectSend.chain(this._delayNode, this.effectReturn);\n\t };\n\t Tone.extend(Tone.Vibrato, Tone.Effect);\n\t /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Vibrato.defaults = {\n\t 'maxDelay': 0.005,\n\t 'frequency': 5,\n\t 'depth': 0.1,\n\t 'type': 'sine'\n\t };\n\t /**\n\t\t * Type of oscillator attached to the Vibrato.\n\t\t * @memberOf Tone.Vibrato#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.Vibrato.prototype, 'type', {\n\t get: function () {\n\t return this._lfo.type;\n\t },\n\t set: function (type) {\n\t this._lfo.type = type;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.Vibrato} this\n\t\t */\n\t Tone.Vibrato.prototype.dispose = function () {\n\t Tone.Effect.prototype.dispose.call(this);\n\t this._delayNode.dispose();\n\t this._delayNode = null;\n\t this._lfo.dispose();\n\t this._lfo = null;\n\t this._writable([\n\t 'frequency',\n\t 'depth'\n\t ]);\n\t this.frequency = null;\n\t this.depth = null;\n\t };\n\t return Tone.Vibrato;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Event abstracts away Tone.Transport.schedule and provides a schedulable\n\t\t * callback for a single or repeatable events along the timeline.\n\t\t *\n\t\t * @extends {Tone}\n\t\t * @param {function} callback The callback to invoke at the time.\n\t\t * @param {*} value The value or values which should be passed to\n\t\t * the callback function on invocation.\n\t\t * @example\n\t\t * var chord = new Tone.Event(function(time, chord){\n\t\t * \t//the chord as well as the exact time of the event\n\t\t * \t//are passed in as arguments to the callback function\n\t\t * }, [\"D4\", \"E4\", \"F4\"]);\n\t\t * //start the chord at the beginning of the transport timeline\n\t\t * chord.start();\n\t\t * //loop it every measure for 8 measures\n\t\t * chord.loop = 8;\n\t\t * chord.loopEnd = \"1m\";\n\t\t */\n\t Tone.Event = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'value'\n\t ], Tone.Event);\n\t Tone.call(this);\n\t /**\n\t\t\t * Loop value\n\t\t\t * @type {Boolean|Positive}\n\t\t\t * @private\n\t\t\t */\n\t this._loop = options.loop;\n\t /**\n\t\t\t * The callback to invoke.\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.callback = options.callback;\n\t /**\n\t\t\t * The value which is passed to the\n\t\t\t * callback function.\n\t\t\t * @type {*}\n\t\t\t * @private\n\t\t\t */\n\t this.value = options.value;\n\t /**\n\t\t\t * When the note is scheduled to start.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._loopStart = this.toTicks(options.loopStart);\n\t /**\n\t\t\t * When the note is scheduled to start.\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._loopEnd = this.toTicks(options.loopEnd);\n\t /**\n\t\t\t * Tracks the scheduled events\n\t\t\t * @type {Tone.TimelineState}\n\t\t\t * @private\n\t\t\t */\n\t this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t /**\n\t\t\t * The playback speed of the note. A speed of 1\n\t\t\t * is no change.\n\t\t\t * @private\n\t\t\t * @type {Positive}\n\t\t\t */\n\t this._playbackRate = 1;\n\t /**\n\t\t\t * A delay time from when the event is scheduled to start\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this._startOffset = 0;\n\t /**\n\t\t\t * private holder of probability value\n\t\t\t * @type {NormalRange}\n\t\t\t * @private\n\t\t\t */\n\t this._probability = options.probability;\n\t /**\n\t\t\t * the amount of variation from the\n\t\t\t * given time.\n\t\t\t * @type {Boolean|Time}\n\t\t\t * @private\n\t\t\t */\n\t this._humanize = options.humanize;\n\t /**\n\t\t\t * If mute is true, the callback won't be\n\t\t\t * invoked.\n\t\t\t * @type {Boolean}\n\t\t\t */\n\t this.mute = options.mute;\n\t //set the initial values\n\t this.playbackRate = options.playbackRate;\n\t };\n\t Tone.extend(Tone.Event);\n\t /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Event.defaults = {\n\t 'callback': Tone.noOp,\n\t 'loop': false,\n\t 'loopEnd': '1m',\n\t 'loopStart': 0,\n\t 'playbackRate': 1,\n\t 'value': null,\n\t 'probability': 1,\n\t 'mute': false,\n\t 'humanize': false\n\t };\n\t /**\n\t\t * Reschedule all of the events along the timeline\n\t\t * with the updated values.\n\t\t * @param {Time} after Only reschedules events after the given time.\n\t\t * @return {Tone.Event} this\n\t\t * @private\n\t\t */\n\t Tone.Event.prototype._rescheduleEvents = function (after) {\n\t //if no argument is given, schedules all of the events\n\t after = Tone.defaultArg(after, -1);\n\t this._state.forEachFrom(after, function (event) {\n\t var duration;\n\t if (event.state === Tone.State.Started) {\n\t if (!Tone.isUndef(event.id)) {\n\t Tone.Transport.clear(event.id);\n\t }\n\t var startTick = event.time + Math.round(this.startOffset / this._playbackRate);\n\t if (this._loop) {\n\t duration = Infinity;\n\t if (Tone.isNumber(this._loop)) {\n\t duration = this._loop * this._getLoopDuration();\n\t }\n\t var nextEvent = this._state.getAfter(startTick);\n\t if (nextEvent !== null) {\n\t duration = Math.min(duration, nextEvent.time - startTick);\n\t }\n\t if (duration !== Infinity) {\n\t //schedule a stop since it's finite duration\n\t this._state.setStateAtTime(Tone.State.Stopped, startTick + duration + 1);\n\t duration = Tone.Ticks(duration);\n\t }\n\t var interval = Tone.Ticks(this._getLoopDuration());\n\t event.id = Tone.Transport.scheduleRepeat(this._tick.bind(this), interval, Tone.Ticks(startTick), duration);\n\t } else {\n\t event.id = Tone.Transport.schedule(this._tick.bind(this), Tone.Ticks(startTick));\n\t }\n\t }\n\t }.bind(this));\n\t return this;\n\t };\n\t /**\n\t\t * Returns the playback state of the note, either \"started\" or \"stopped\".\n\t\t * @type {String}\n\t\t * @readOnly\n\t\t * @memberOf Tone.Event#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'state', {\n\t get: function () {\n\t return this._state.getValueAtTime(Tone.Transport.ticks);\n\t }\n\t });\n\t /**\n\t\t * The start from the scheduled start time\n\t\t * @type {Ticks}\n\t\t * @memberOf Tone.Event#\n\t\t * @name startOffset\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'startOffset', {\n\t get: function () {\n\t return this._startOffset;\n\t },\n\t set: function (offset) {\n\t this._startOffset = offset;\n\t }\n\t });\n\t /**\n\t\t * The probability of the notes being triggered.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {NormalRange}\n\t\t * @name probability\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'probability', {\n\t get: function () {\n\t return this._probability;\n\t },\n\t set: function (prob) {\n\t this._probability = prob;\n\t }\n\t });\n\t /**\n\t\t * If set to true, will apply small random variation\n\t\t * to the callback time. If the value is given as a time, it will randomize\n\t\t * by that amount.\n\t\t * @example\n\t\t * event.humanize = true;\n\t\t * @type {Boolean|Time}\n\t\t * @name humanize\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'humanize', {\n\t get: function () {\n\t return this._humanize;\n\t },\n\t set: function (variation) {\n\t this._humanize = variation;\n\t }\n\t });\n\t /**\n\t\t * Start the note at the given time.\n\t\t * @param {TimelinePosition} time When the note should start.\n\t\t * @return {Tone.Event} this\n\t\t */\n\t Tone.Event.prototype.start = function (time) {\n\t time = this.toTicks(time);\n\t if (this._state.getValueAtTime(time) === Tone.State.Stopped) {\n\t this._state.add({\n\t 'state': Tone.State.Started,\n\t 'time': time,\n\t 'id': undefined\n\t });\n\t this._rescheduleEvents(time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop the Event at the given time.\n\t\t * @param {TimelinePosition} time When the note should stop.\n\t\t * @return {Tone.Event} this\n\t\t */\n\t Tone.Event.prototype.stop = function (time) {\n\t this.cancel(time);\n\t time = this.toTicks(time);\n\t if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t this._state.setStateAtTime(Tone.State.Stopped, time);\n\t var previousEvent = this._state.getBefore(time);\n\t var reschedulTime = time;\n\t if (previousEvent !== null) {\n\t reschedulTime = previousEvent.time;\n\t }\n\t this._rescheduleEvents(reschedulTime);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Cancel all scheduled events greater than or equal to the given time\n\t\t * @param {TimelinePosition} [time=0] The time after which events will be cancel.\n\t\t * @return {Tone.Event} this\n\t\t */\n\t Tone.Event.prototype.cancel = function (time) {\n\t time = Tone.defaultArg(time, -Infinity);\n\t time = this.toTicks(time);\n\t this._state.forEachFrom(time, function (event) {\n\t Tone.Transport.clear(event.id);\n\t });\n\t this._state.cancel(time);\n\t return this;\n\t };\n\t /**\n\t\t * The callback function invoker. Also\n\t\t * checks if the Event is done playing\n\t\t * @param {Number} time The time of the event in seconds\n\t\t * @private\n\t\t */\n\t Tone.Event.prototype._tick = function (time) {\n\t if (!this.mute && this._state.getValueAtTime(Tone.Transport.ticks) === Tone.State.Started) {\n\t if (this.probability < 1 && Math.random() > this.probability) {\n\t return;\n\t }\n\t if (this.humanize) {\n\t var variation = 0.02;\n\t if (!Tone.isBoolean(this.humanize)) {\n\t variation = this.toSeconds(this.humanize);\n\t }\n\t time += (Math.random() * 2 - 1) * variation;\n\t }\n\t this.callback(time, this.value);\n\t }\n\t };\n\t /**\n\t\t * Get the duration of the loop.\n\t\t * @return {Ticks}\n\t\t * @private\n\t\t */\n\t Tone.Event.prototype._getLoopDuration = function () {\n\t return Math.round((this._loopEnd - this._loopStart) / this._playbackRate);\n\t };\n\t /**\n\t\t * If the note should loop or not\n\t\t * between Tone.Event.loopStart and\n\t\t * Tone.Event.loopEnd. An integer\n\t\t * value corresponds to the number of\n\t\t * loops the Event does after it starts.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {Boolean|Positive}\n\t\t * @name loop\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'loop', {\n\t get: function () {\n\t return this._loop;\n\t },\n\t set: function (loop) {\n\t this._loop = loop;\n\t this._rescheduleEvents();\n\t }\n\t });\n\t /**\n\t\t * \tThe playback rate of the note. Defaults to 1.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {Positive}\n\t\t * @name playbackRate\n\t\t * @example\n\t\t * note.loop = true;\n\t\t * //repeat the note twice as fast\n\t\t * note.playbackRate = 2;\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._playbackRate;\n\t },\n\t set: function (rate) {\n\t this._playbackRate = rate;\n\t this._rescheduleEvents();\n\t }\n\t });\n\t /**\n\t\t * The loopEnd point is the time the event will loop\n\t\t * if Tone.Event.loop is true.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'loopEnd', {\n\t get: function () {\n\t return Tone.Ticks(this._loopEnd).toSeconds();\n\t },\n\t set: function (loopEnd) {\n\t this._loopEnd = this.toTicks(loopEnd);\n\t if (this._loop) {\n\t this._rescheduleEvents();\n\t }\n\t }\n\t });\n\t /**\n\t\t * The time when the loop should start.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'loopStart', {\n\t get: function () {\n\t return Tone.Ticks(this._loopStart).toSeconds();\n\t },\n\t set: function (loopStart) {\n\t this._loopStart = this.toTicks(loopStart);\n\t if (this._loop) {\n\t this._rescheduleEvents();\n\t }\n\t }\n\t });\n\t /**\n\t\t * The current progress of the loop interval.\n\t\t * Returns 0 if the event is not started yet or\n\t\t * it is not set to loop.\n\t\t * @memberOf Tone.Event#\n\t\t * @type {NormalRange}\n\t\t * @name progress\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Event.prototype, 'progress', {\n\t get: function () {\n\t if (this._loop) {\n\t var ticks = Tone.Transport.ticks;\n\t var lastEvent = this._state.get(ticks);\n\t if (lastEvent !== null && lastEvent.state === Tone.State.Started) {\n\t var loopDuration = this._getLoopDuration();\n\t var progress = (ticks - lastEvent.time) % loopDuration;\n\t return progress / loopDuration;\n\t } else {\n\t return 0;\n\t }\n\t } else {\n\t return 0;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Event} this\n\t\t */\n\t Tone.Event.prototype.dispose = function () {\n\t this.cancel();\n\t this._state.dispose();\n\t this._state = null;\n\t this.callback = null;\n\t this.value = null;\n\t };\n\t return Tone.Event;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Loop creates a looped callback at the \n\t\t * specified interval. The callback can be \n\t\t * started, stopped and scheduled along\n\t\t * the Transport's timeline. \n\t\t * @example\n\t\t * var loop = new Tone.Loop(function(time){\n\t\t * \t//triggered every eighth note. \n\t\t * \tconsole.log(time);\n\t\t * }, \"8n\").start(0);\n\t\t * Tone.Transport.start();\n\t\t * @extends {Tone}\n\t\t * @param {Function} callback The callback to invoke with the event.\n\t\t * @param {Time} interval The time between successive callback calls. \n\t\t */\n\t Tone.Loop = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'interval'\n\t ], Tone.Loop);\n\t Tone.call(this);\n\t /**\n\t\t\t * The event which produces the callbacks\n\t\t\t */\n\t this._event = new Tone.Event({\n\t 'callback': this._tick.bind(this),\n\t 'loop': true,\n\t 'loopEnd': options.interval,\n\t 'playbackRate': options.playbackRate,\n\t 'probability': options.probability\n\t });\n\t /**\n\t\t\t * The callback to invoke with the next event in the pattern\n\t\t\t * @type {Function}\n\t\t\t */\n\t this.callback = options.callback;\n\t //set the iterations\n\t this.iterations = options.iterations;\n\t };\n\t Tone.extend(Tone.Loop);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Loop.defaults = {\n\t 'interval': '4n',\n\t 'callback': Tone.noOp,\n\t 'playbackRate': 1,\n\t 'iterations': Infinity,\n\t 'probability': true,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Start the loop at the specified time along the Transport's\n\t\t * timeline.\n\t\t * @param {TimelinePosition=} time When to start the Loop.\n\t\t * @return {Tone.Loop} this\n\t\t */\n\t Tone.Loop.prototype.start = function (time) {\n\t this._event.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Stop the loop at the given time.\n\t\t * @param {TimelinePosition=} time When to stop the Arpeggio\n\t\t * @return {Tone.Loop} this\n\t\t */\n\t Tone.Loop.prototype.stop = function (time) {\n\t this._event.stop(time);\n\t return this;\n\t };\n\t /**\n\t\t * Cancel all scheduled events greater than or equal to the given time\n\t\t * @param {TimelinePosition} [time=0] The time after which events will be cancel.\n\t\t * @return {Tone.Loop} this\n\t\t */\n\t Tone.Loop.prototype.cancel = function (time) {\n\t this._event.cancel(time);\n\t return this;\n\t };\n\t /**\n\t\t * Internal function called when the notes should be called\n\t\t * @param {Number} time The time the event occurs\n\t\t * @private\n\t\t */\n\t Tone.Loop.prototype._tick = function (time) {\n\t this.callback(time);\n\t };\n\t /**\n\t\t * The state of the Loop, either started or stopped.\n\t\t * @memberOf Tone.Loop#\n\t\t * @type {String}\n\t\t * @name state\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'state', {\n\t get: function () {\n\t return this._event.state;\n\t }\n\t });\n\t /**\n\t\t * The progress of the loop as a value between 0-1. 0, when\n\t\t * the loop is stopped or done iterating. \n\t\t * @memberOf Tone.Loop#\n\t\t * @type {NormalRange}\n\t\t * @name progress\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'progress', {\n\t get: function () {\n\t return this._event.progress;\n\t }\n\t });\n\t /**\n\t\t * The time between successive callbacks. \n\t\t * @example\n\t\t * loop.interval = \"8n\"; //loop every 8n\n\t\t * @memberOf Tone.Loop#\n\t\t * @type {Time}\n\t\t * @name interval\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'interval', {\n\t get: function () {\n\t return this._event.loopEnd;\n\t },\n\t set: function (interval) {\n\t this._event.loopEnd = interval;\n\t }\n\t });\n\t /**\n\t\t * The playback rate of the loop. The normal playback rate is 1 (no change). \n\t\t * A `playbackRate` of 2 would be twice as fast. \n\t\t * @memberOf Tone.Loop#\n\t\t * @type {Time}\n\t\t * @name playbackRate\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._event.playbackRate;\n\t },\n\t set: function (rate) {\n\t this._event.playbackRate = rate;\n\t }\n\t });\n\t /**\n\t\t * Random variation +/-0.01s to the scheduled time. \n\t\t * Or give it a time value which it will randomize by.\n\t\t * @type {Boolean|Time}\n\t\t * @memberOf Tone.Loop#\n\t\t * @name humanize\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'humanize', {\n\t get: function () {\n\t return this._event.humanize;\n\t },\n\t set: function (variation) {\n\t this._event.humanize = variation;\n\t }\n\t });\n\t /**\n\t\t * The probably of the callback being invoked.\n\t\t * @memberOf Tone.Loop#\n\t\t * @type {NormalRange}\n\t\t * @name probability\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'probability', {\n\t get: function () {\n\t return this._event.probability;\n\t },\n\t set: function (prob) {\n\t this._event.probability = prob;\n\t }\n\t });\n\t /**\n\t\t * Muting the Loop means that no callbacks are invoked.\n\t\t * @memberOf Tone.Loop#\n\t\t * @type {Boolean}\n\t\t * @name mute\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'mute', {\n\t get: function () {\n\t return this._event.mute;\n\t },\n\t set: function (mute) {\n\t this._event.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * The number of iterations of the loop. The default\n\t\t * value is Infinity (loop forever).\n\t\t * @memberOf Tone.Loop#\n\t\t * @type {Positive}\n\t\t * @name iterations\n\t\t */\n\t Object.defineProperty(Tone.Loop.prototype, 'iterations', {\n\t get: function () {\n\t if (this._event.loop === true) {\n\t return Infinity;\n\t } else {\n\t return this._event.loop;\n\t }\n\t },\n\t set: function (iters) {\n\t if (iters === Infinity) {\n\t this._event.loop = true;\n\t } else {\n\t this._event.loop = iters;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Loop} this\n\t\t */\n\t Tone.Loop.prototype.dispose = function () {\n\t this._event.dispose();\n\t this._event = null;\n\t this.callback = null;\n\t };\n\t return Tone.Loop;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Part is a collection Tone.Events which can be\n\t\t * started/stopped and looped as a single unit.\n\t\t *\n\t\t * @extends {Tone.Event}\n\t\t * @param {Function} callback The callback to invoke on each event\n\t\t * @param {Array} events the array of events\n\t\t * @example\n\t\t * var part = new Tone.Part(function(time, note){\n\t\t * \t//the notes given as the second element in the array\n\t\t * \t//will be passed in as the second argument\n\t\t * \tsynth.triggerAttackRelease(note, \"8n\", time);\n\t\t * }, [[0, \"C2\"], [\"0:2\", \"C3\"], [\"0:3:2\", \"G2\"]]);\n\t\t * @example\n\t\t * //use an array of objects as long as the object has a \"time\" attribute\n\t\t * var part = new Tone.Part(function(time, value){\n\t\t * \t//the value is an object which contains both the note and the velocity\n\t\t * \tsynth.triggerAttackRelease(value.note, \"8n\", time, value.velocity);\n\t\t * }, [{\"time\" : 0, \"note\" : \"C3\", \"velocity\": 0.9},\n\t\t * \t {\"time\" : \"0:2\", \"note\" : \"C4\", \"velocity\": 0.5}\n\t\t * ]).start(0);\n\t\t */\n\t Tone.Part = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'events'\n\t ], Tone.Part);\n\t Tone.Event.call(this, options);\n\t /**\n\t\t\t * An array of Objects.\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._events = [];\n\t //add the events\n\t for (var i = 0; i < options.events.length; i++) {\n\t if (Array.isArray(options.events[i])) {\n\t this.add(options.events[i][0], options.events[i][1]);\n\t } else {\n\t this.add(options.events[i]);\n\t }\n\t }\n\t };\n\t Tone.extend(Tone.Part, Tone.Event);\n\t /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.Part.defaults = {\n\t 'callback': Tone.noOp,\n\t 'loop': false,\n\t 'loopEnd': '1m',\n\t 'loopStart': 0,\n\t 'playbackRate': 1,\n\t 'probability': 1,\n\t 'humanize': false,\n\t 'mute': false,\n\t 'events': []\n\t };\n\t /**\n\t\t * Start the part at the given time.\n\t\t * @param {TransportTime} time When to start the part.\n\t\t * @param {Time=} offset The offset from the start of the part\n\t\t * to begin playing at.\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.start = function (time, offset) {\n\t var ticks = this.toTicks(time);\n\t if (this._state.getValueAtTime(ticks) !== Tone.State.Started) {\n\t if (this._loop) {\n\t offset = Tone.defaultArg(offset, this._loopStart);\n\t } else {\n\t offset = Tone.defaultArg(offset, 0);\n\t }\n\t offset = this.toTicks(offset);\n\t this._state.add({\n\t 'state': Tone.State.Started,\n\t 'time': ticks,\n\t 'offset': offset\n\t });\n\t this._forEach(function (event) {\n\t this._startNote(event, ticks, offset);\n\t });\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Start the event in the given event at the correct time given\n\t\t * the ticks and offset and looping.\n\t\t * @param {Tone.Event} event\n\t\t * @param {Ticks} ticks\n\t\t * @param {Ticks} offset\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._startNote = function (event, ticks, offset) {\n\t ticks -= offset;\n\t if (this._loop) {\n\t if (event.startOffset >= this._loopStart && event.startOffset < this._loopEnd) {\n\t if (event.startOffset < offset) {\n\t //start it on the next loop\n\t ticks += this._getLoopDuration();\n\t }\n\t event.start(Tone.Ticks(ticks));\n\t } else if (event.startOffset < this._loopStart && event.startOffset >= offset) {\n\t event.loop = false;\n\t event.start(Tone.Ticks(ticks));\n\t }\n\t } else if (event.startOffset >= offset) {\n\t event.start(Tone.Ticks(ticks));\n\t }\n\t };\n\t /**\n\t\t * The start from the scheduled start time\n\t\t * @type {Ticks}\n\t\t * @memberOf Tone.Part#\n\t\t * @name startOffset\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'startOffset', {\n\t get: function () {\n\t return this._startOffset;\n\t },\n\t set: function (offset) {\n\t this._startOffset = offset;\n\t this._forEach(function (event) {\n\t event.startOffset += this._startOffset;\n\t });\n\t }\n\t });\n\t /**\n\t\t * Stop the part at the given time.\n\t\t * @param {TimelinePosition} time When to stop the part.\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.stop = function (time) {\n\t var ticks = this.toTicks(time);\n\t this._state.cancel(ticks);\n\t this._state.setStateAtTime(Tone.State.Stopped, ticks);\n\t this._forEach(function (event) {\n\t event.stop(time);\n\t });\n\t return this;\n\t };\n\t /**\n\t\t * Get/Set an Event's value at the given time.\n\t\t * If a value is passed in and no event exists at\n\t\t * the given time, one will be created with that value.\n\t\t * If two events are at the same time, the first one will\n\t\t * be returned.\n\t\t * @example\n\t\t * part.at(\"1m\"); //returns the part at the first measure\n\t\t *\n\t\t * part.at(\"2m\", \"C2\"); //set the value at \"2m\" to C2.\n\t\t * //if an event didn't exist at that time, it will be created.\n\t\t * @param {TransportTime} time The time of the event to get or set.\n\t\t * @param {*=} value If a value is passed in, the value of the\n\t\t * event at the given time will be set to it.\n\t\t * @return {Tone.Event} the event at the time\n\t\t */\n\t Tone.Part.prototype.at = function (time, value) {\n\t time = Tone.TransportTime(time);\n\t var tickTime = Tone.Ticks(1).toSeconds();\n\t for (var i = 0; i < this._events.length; i++) {\n\t var event = this._events[i];\n\t if (Math.abs(time.toTicks() - event.startOffset) < tickTime) {\n\t if (!Tone.isUndef(value)) {\n\t event.value = value;\n\t }\n\t return event;\n\t }\n\t }\n\t //if there was no event at that time, create one\n\t if (!Tone.isUndef(value)) {\n\t this.add(time, value);\n\t //return the new event\n\t return this._events[this._events.length - 1];\n\t } else {\n\t return null;\n\t }\n\t };\n\t /**\n\t\t * Add a an event to the part.\n\t\t * @param {Time} time The time the note should start.\n\t\t * If an object is passed in, it should\n\t\t * have a 'time' attribute and the rest\n\t\t * of the object will be used as the 'value'.\n\t\t * @param {Tone.Event|*} value\n\t\t * @returns {Tone.Part} this\n\t\t * @example\n\t\t * part.add(\"1m\", \"C#+11\");\n\t\t */\n\t Tone.Part.prototype.add = function (time, value) {\n\t //extract the parameters\n\t if (time.hasOwnProperty('time')) {\n\t value = time;\n\t time = value.time;\n\t }\n\t time = this.toTicks(time);\n\t var event;\n\t if (value instanceof Tone.Event) {\n\t event = value;\n\t event.callback = this._tick.bind(this);\n\t } else {\n\t event = new Tone.Event({\n\t 'callback': this._tick.bind(this),\n\t 'value': value\n\t });\n\t }\n\t //the start offset\n\t event.startOffset = time;\n\t //initialize the values\n\t event.set({\n\t 'loopEnd': this.loopEnd,\n\t 'loopStart': this.loopStart,\n\t 'loop': this.loop,\n\t 'humanize': this.humanize,\n\t 'playbackRate': this.playbackRate,\n\t 'probability': this.probability\n\t });\n\t this._events.push(event);\n\t //start the note if it should be played right now\n\t this._restartEvent(event);\n\t return this;\n\t };\n\t /**\n\t\t * Restart the given event\n\t\t * @param {Tone.Event} event\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._restartEvent = function (event) {\n\t this._state.forEach(function (stateEvent) {\n\t if (stateEvent.state === Tone.State.Started) {\n\t this._startNote(event, stateEvent.time, stateEvent.offset);\n\t } else {\n\t //stop the note\n\t event.stop(Tone.Ticks(stateEvent.time));\n\t }\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Remove an event from the part. Will recursively iterate\n\t\t * into nested parts to find the event.\n\t\t * @param {Time} time The time of the event\n\t\t * @param {*} value Optionally select only a specific event value\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.remove = function (time, value) {\n\t //extract the parameters\n\t if (time.hasOwnProperty('time')) {\n\t value = time;\n\t time = value.time;\n\t }\n\t time = this.toTicks(time);\n\t for (var i = this._events.length - 1; i >= 0; i--) {\n\t var event = this._events[i];\n\t if (event instanceof Tone.Part) {\n\t event.remove(time, value);\n\t } else if (event.startOffset === time) {\n\t if (Tone.isUndef(value) || !Tone.isUndef(value) && event.value === value) {\n\t this._events.splice(i, 1);\n\t event.dispose();\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Remove all of the notes from the group.\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.removeAll = function () {\n\t this._forEach(function (event) {\n\t event.dispose();\n\t });\n\t this._events = [];\n\t return this;\n\t };\n\t /**\n\t\t * Cancel scheduled state change events: i.e. \"start\" and \"stop\".\n\t\t * @param {TimelinePosition} after The time after which to cancel the scheduled events.\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.cancel = function (after) {\n\t this._forEach(function (event) {\n\t event.cancel(after);\n\t });\n\t this._state.cancel(this.toTicks(after));\n\t return this;\n\t };\n\t /**\n\t\t * Iterate over all of the events\n\t\t * @param {Function} callback\n\t\t * @param {Object} ctx The context\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._forEach = function (callback, ctx) {\n\t if (this._events) {\n\t ctx = Tone.defaultArg(ctx, this);\n\t for (var i = this._events.length - 1; i >= 0; i--) {\n\t var e = this._events[i];\n\t if (e instanceof Tone.Part) {\n\t e._forEach(callback, ctx);\n\t } else {\n\t callback.call(ctx, e);\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Set the attribute of all of the events\n\t\t * @param {String} attr the attribute to set\n\t\t * @param {*} value The value to set it to\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._setAll = function (attr, value) {\n\t this._forEach(function (event) {\n\t event[attr] = value;\n\t });\n\t };\n\t /**\n\t\t * Internal tick method\n\t\t * @param {Number} time The time of the event in seconds\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._tick = function (time, value) {\n\t if (!this.mute) {\n\t this.callback(time, value);\n\t }\n\t };\n\t /**\n\t\t * Determine if the event should be currently looping\n\t\t * given the loop boundries of this Part.\n\t\t * @param {Tone.Event} event The event to test\n\t\t * @private\n\t\t */\n\t Tone.Part.prototype._testLoopBoundries = function (event) {\n\t if (event.startOffset < this._loopStart || event.startOffset >= this._loopEnd) {\n\t event.cancel(0);\n\t } else if (event.state === Tone.State.Stopped) {\n\t //reschedule it if it's stopped\n\t this._restartEvent(event);\n\t }\n\t };\n\t /**\n\t\t * The probability of the notes being triggered.\n\t\t * @memberOf Tone.Part#\n\t\t * @type {NormalRange}\n\t\t * @name probability\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'probability', {\n\t get: function () {\n\t return this._probability;\n\t },\n\t set: function (prob) {\n\t this._probability = prob;\n\t this._setAll('probability', prob);\n\t }\n\t });\n\t /**\n\t\t * If set to true, will apply small random variation\n\t\t * to the callback time. If the value is given as a time, it will randomize\n\t\t * by that amount.\n\t\t * @example\n\t\t * event.humanize = true;\n\t\t * @type {Boolean|Time}\n\t\t * @name humanize\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'humanize', {\n\t get: function () {\n\t return this._humanize;\n\t },\n\t set: function (variation) {\n\t this._humanize = variation;\n\t this._setAll('humanize', variation);\n\t }\n\t });\n\t /**\n\t\t * If the part should loop or not\n\t\t * between Tone.Part.loopStart and\n\t\t * Tone.Part.loopEnd. An integer\n\t\t * value corresponds to the number of\n\t\t * loops the Part does after it starts.\n\t\t * @memberOf Tone.Part#\n\t\t * @type {Boolean|Positive}\n\t\t * @name loop\n\t\t * @example\n\t\t * //loop the part 8 times\n\t\t * part.loop = 8;\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'loop', {\n\t get: function () {\n\t return this._loop;\n\t },\n\t set: function (loop) {\n\t this._loop = loop;\n\t this._forEach(function (event) {\n\t event._loopStart = this._loopStart;\n\t event._loopEnd = this._loopEnd;\n\t event.loop = loop;\n\t this._testLoopBoundries(event);\n\t });\n\t }\n\t });\n\t /**\n\t\t * The loopEnd point determines when it will\n\t\t * loop if Tone.Part.loop is true.\n\t\t * @memberOf Tone.Part#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'loopEnd', {\n\t get: function () {\n\t return Tone.Ticks(this._loopEnd).toSeconds();\n\t },\n\t set: function (loopEnd) {\n\t this._loopEnd = this.toTicks(loopEnd);\n\t if (this._loop) {\n\t this._forEach(function (event) {\n\t event.loopEnd = loopEnd;\n\t this._testLoopBoundries(event);\n\t });\n\t }\n\t }\n\t });\n\t /**\n\t\t * The loopStart point determines when it will\n\t\t * loop if Tone.Part.loop is true.\n\t\t * @memberOf Tone.Part#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'loopStart', {\n\t get: function () {\n\t return Tone.Ticks(this._loopStart).toSeconds();\n\t },\n\t set: function (loopStart) {\n\t this._loopStart = this.toTicks(loopStart);\n\t if (this._loop) {\n\t this._forEach(function (event) {\n\t event.loopStart = this.loopStart;\n\t this._testLoopBoundries(event);\n\t });\n\t }\n\t }\n\t });\n\t /**\n\t\t * \tThe playback rate of the part\n\t\t * @memberOf Tone.Part#\n\t\t * @type {Positive}\n\t\t * @name playbackRate\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._playbackRate;\n\t },\n\t set: function (rate) {\n\t this._playbackRate = rate;\n\t this._setAll('playbackRate', rate);\n\t }\n\t });\n\t /**\n\t\t * \tThe number of scheduled notes in the part.\n\t\t * @memberOf Tone.Part#\n\t\t * @type {Positive}\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Part.prototype, 'length', {\n\t get: function () {\n\t return this._events.length;\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Part} this\n\t\t */\n\t Tone.Part.prototype.dispose = function () {\n\t this.removeAll();\n\t this._state.dispose();\n\t this._state = null;\n\t this.callback = null;\n\t this._events = null;\n\t return this;\n\t };\n\t return Tone.Part;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Pattern arpeggiates between the given notes\n\t\t * in a number of patterns. See Tone.CtrlPattern for\n\t\t * a full list of patterns.\n\t\t * @example\n\t\t * var pattern = new Tone.Pattern(function(time, note){\n\t\t * //the order of the notes passed in depends on the pattern\n\t\t * }, [\"C2\", \"D4\", \"E5\", \"A6\"], \"upDown\");\n\t\t * @extends {Tone.Loop}\n\t\t * @param {Function} callback The callback to invoke with the\n\t\t * event.\n\t\t * @param {Array} values The values to arpeggiate over.\n\t\t */\n\t Tone.Pattern = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'values',\n\t 'pattern'\n\t ], Tone.Pattern);\n\t Tone.Loop.call(this, options);\n\t /**\n\t\t\t * The pattern manager\n\t\t\t * @type {Tone.CtrlPattern}\n\t\t\t * @private\n\t\t\t */\n\t this._pattern = new Tone.CtrlPattern({\n\t 'values': options.values,\n\t 'type': options.pattern,\n\t 'index': options.index\n\t });\n\t };\n\t Tone.extend(Tone.Pattern, Tone.Loop);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Pattern.defaults = {\n\t 'pattern': Tone.CtrlPattern.Type.Up,\n\t 'callback': Tone.noOp,\n\t 'values': []\n\t };\n\t /**\n\t\t * Internal function called when the notes should be called\n\t\t * @param {Number} time The time the event occurs\n\t\t * @private\n\t\t */\n\t Tone.Pattern.prototype._tick = function (time) {\n\t this.callback(time, this._pattern.value);\n\t this._pattern.next();\n\t };\n\t /**\n\t\t * The current index in the values array.\n\t\t * @memberOf Tone.Pattern#\n\t\t * @type {Positive}\n\t\t * @name index\n\t\t */\n\t Object.defineProperty(Tone.Pattern.prototype, 'index', {\n\t get: function () {\n\t return this._pattern.index;\n\t },\n\t set: function (i) {\n\t this._pattern.index = i;\n\t }\n\t });\n\t /**\n\t\t * The array of events.\n\t\t * @memberOf Tone.Pattern#\n\t\t * @type {Array}\n\t\t * @name values\n\t\t */\n\t Object.defineProperty(Tone.Pattern.prototype, 'values', {\n\t get: function () {\n\t return this._pattern.values;\n\t },\n\t set: function (vals) {\n\t this._pattern.values = vals;\n\t }\n\t });\n\t /**\n\t\t * The current value of the pattern.\n\t\t * @memberOf Tone.Pattern#\n\t\t * @type {*}\n\t\t * @name value\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Pattern.prototype, 'value', {\n\t get: function () {\n\t return this._pattern.value;\n\t }\n\t });\n\t /**\n\t\t * The pattern type. See Tone.CtrlPattern for the full list of patterns.\n\t\t * @memberOf Tone.Pattern#\n\t\t * @type {String}\n\t\t * @name pattern\n\t\t */\n\t Object.defineProperty(Tone.Pattern.prototype, 'pattern', {\n\t get: function () {\n\t return this._pattern.type;\n\t },\n\t set: function (pattern) {\n\t this._pattern.type = pattern;\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Pattern} this\n\t\t */\n\t Tone.Pattern.prototype.dispose = function () {\n\t Tone.Loop.prototype.dispose.call(this);\n\t this._pattern.dispose();\n\t this._pattern = null;\n\t };\n\t return Tone.Pattern;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class A sequence is an alternate notation of a part. Instead\n\t\t * of passing in an array of [time, event] pairs, pass\n\t\t * in an array of events which will be spaced at the\n\t\t * given subdivision. Sub-arrays will subdivide that beat\n\t\t * by the number of items are in the array.\n\t\t * Sequence notation inspiration from [Tidal](http://yaxu.org/tidal/)\n\t\t * @param {Function} callback The callback to invoke with every note\n\t\t * @param {Array} events The sequence\n\t\t * @param {Time} subdivision The subdivision between which events are placed.\n\t\t * @extends {Tone.Part}\n\t\t * @example\n\t\t * var seq = new Tone.Sequence(function(time, note){\n\t\t * \tconsole.log(note);\n\t\t * //straight quater notes\n\t\t * }, [\"C4\", \"E4\", \"G4\", \"A4\"], \"4n\");\n\t\t * @example\n\t\t * var seq = new Tone.Sequence(function(time, note){\n\t\t * \tconsole.log(note);\n\t\t * //subdivisions are given as subarrays\n\t\t * }, [\"C4\", [\"E4\", \"D4\", \"E4\"], \"G4\", [\"A4\", \"G4\"]]);\n\t\t */\n\t Tone.Sequence = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'callback',\n\t 'events',\n\t 'subdivision'\n\t ], Tone.Sequence);\n\t //remove the events\n\t var events = options.events;\n\t delete options.events;\n\t Tone.Part.call(this, options);\n\t /**\n\t\t\t * The subdivison of each note\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t this._subdivision = this.toTicks(options.subdivision);\n\t //if no time was passed in, the loop end is the end of the cycle\n\t if (Tone.isUndef(options.loopEnd) && !Tone.isUndef(events)) {\n\t this._loopEnd = events.length * this._subdivision;\n\t }\n\t //defaults to looping\n\t this._loop = true;\n\t //add all of the events\n\t if (!Tone.isUndef(events)) {\n\t for (var i = 0; i < events.length; i++) {\n\t this.add(i, events[i]);\n\t }\n\t }\n\t };\n\t Tone.extend(Tone.Sequence, Tone.Part);\n\t /**\n\t\t * The default values.\n\t\t * @type {Object}\n\t\t */\n\t Tone.Sequence.defaults = { 'subdivision': '4n' };\n\t /**\n\t\t * The subdivision of the sequence. This can only be\n\t\t * set in the constructor. The subdivision is the\n\t\t * interval between successive steps.\n\t\t * @type {Time}\n\t\t * @memberOf Tone.Sequence#\n\t\t * @name subdivision\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Sequence.prototype, 'subdivision', {\n\t get: function () {\n\t return Tone.Ticks(this._subdivision).toSeconds();\n\t }\n\t });\n\t /**\n\t\t * Get/Set an index of the sequence. If the index contains a subarray,\n\t\t * a Tone.Sequence representing that sub-array will be returned.\n\t\t * @example\n\t\t * var sequence = new Tone.Sequence(playNote, [\"E4\", \"C4\", \"F#4\", [\"A4\", \"Bb3\"]])\n\t\t * sequence.at(0)// => returns \"E4\"\n\t\t * //set a value\n\t\t * sequence.at(0, \"G3\");\n\t\t * //get a nested sequence\n\t\t * sequence.at(3).at(1)// => returns \"Bb3\"\n\t\t * @param {Positive} index The index to get or set\n\t\t * @param {*} value Optionally pass in the value to set at the given index.\n\t\t */\n\t Tone.Sequence.prototype.at = function (index, value) {\n\t //if the value is an array,\n\t if (Tone.isArray(value)) {\n\t //remove the current event at that index\n\t this.remove(index);\n\t }\n\t //call the parent's method\n\t return Tone.Part.prototype.at.call(this, this._indexTime(index), value);\n\t };\n\t /**\n\t\t * Add an event at an index, if there's already something\n\t\t * at that index, overwrite it. If `value` is an array,\n\t\t * it will be parsed as a subsequence.\n\t\t * @param {Number} index The index to add the event to\n\t\t * @param {*} value The value to add at that index\n\t\t * @returns {Tone.Sequence} this\n\t\t */\n\t Tone.Sequence.prototype.add = function (index, value) {\n\t if (value === null) {\n\t return this;\n\t }\n\t if (Tone.isArray(value)) {\n\t //make a subsequence and add that to the sequence\n\t var subSubdivision = Math.round(this._subdivision / value.length);\n\t value = new Tone.Sequence(this._tick.bind(this), value, Tone.Ticks(subSubdivision));\n\t }\n\t Tone.Part.prototype.add.call(this, this._indexTime(index), value);\n\t return this;\n\t };\n\t /**\n\t\t * Remove a value from the sequence by index\n\t\t * @param {Number} index The index of the event to remove\n\t\t * @returns {Tone.Sequence} this\n\t\t */\n\t Tone.Sequence.prototype.remove = function (index, value) {\n\t Tone.Part.prototype.remove.call(this, this._indexTime(index), value);\n\t return this;\n\t };\n\t /**\n\t\t * Get the time of the index given the Sequence's subdivision\n\t\t * @param {Number} index\n\t\t * @return {Time} The time of that index\n\t\t * @private\n\t\t */\n\t Tone.Sequence.prototype._indexTime = function (index) {\n\t if (index instanceof Tone.TransportTime) {\n\t return index;\n\t } else {\n\t return Tone.Ticks(index * this._subdivision + this.startOffset).toSeconds();\n\t }\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.Sequence} this\n\t\t */\n\t Tone.Sequence.prototype.dispose = function () {\n\t Tone.Part.prototype.dispose.call(this);\n\t return this;\n\t };\n\t return Tone.Sequence;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PulseOscillator is a pulse oscillator with control over pulse width,\n\t\t * also known as the duty cycle. At 50% duty cycle (width = 0.5) the wave is\n\t\t * a square and only odd-numbered harmonics are present. At all other widths\n\t\t * even-numbered harmonics are present. Read more\n\t\t * [here](https://wigglewave.wordpress.com/2014/08/16/pulse-waveforms-and-harmonics/).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Source}\n\t\t * @param {Frequency} [frequency] The frequency of the oscillator\n\t\t * @param {NormalRange} [width] The width of the pulse\n\t\t * @example\n\t\t * var pulse = new Tone.PulseOscillator(\"E5\", 0.4).toMaster().start();\n\t\t */\n\t Tone.PulseOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'width'\n\t ], Tone.Oscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The width of the pulse.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\t /**\n\t\t\t * gate the width amount\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._widthGate = new Tone.Gain();\n\t /**\n\t\t\t * the sawtooth oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._sawtooth = new Tone.Oscillator({\n\t frequency: options.frequency,\n\t detune: options.detune,\n\t type: 'sawtooth',\n\t phase: options.phase\n\t });\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._sawtooth.frequency;\n\t /**\n\t\t\t * The detune in cents.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this._sawtooth.detune;\n\t /**\n\t\t\t * Threshold the signal to turn it into a square\n\t\t\t * @type {Tone.WaveShaper}\n\t\t\t * @private\n\t\t\t */\n\t this._thresh = new Tone.WaveShaper(function (val) {\n\t if (val < 0) {\n\t return -1;\n\t } else {\n\t return 1;\n\t }\n\t });\n\t //connections\n\t this._sawtooth.chain(this._thresh, this.output);\n\t this.width.chain(this._widthGate, this._thresh);\n\t this._readOnly([\n\t 'width',\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.PulseOscillator, Tone.Source);\n\t /**\n\t\t * The default parameters.\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.PulseOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'width': 0.2\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.PulseOscillator.prototype._start = function (time) {\n\t time = this.toSeconds(time);\n\t this._sawtooth.start(time);\n\t this._widthGate.gain.setValueAtTime(1, time);\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.PulseOscillator.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._sawtooth.stop(time);\n\t //the width is still connected to the output.\n\t //that needs to be stopped also\n\t this._widthGate.gain.setValueAtTime(0, time);\n\t };\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.PulseOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._sawtooth.phase;\n\t },\n\t set: function (phase) {\n\t this._sawtooth.phase = phase;\n\t }\n\t });\n\t /**\n\t\t * The type of the oscillator. Always returns \"pulse\".\n\t\t * @readOnly\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.PulseOscillator.prototype, 'type', {\n\t get: function () {\n\t return 'pulse';\n\t }\n\t });\n\t /**\n\t\t * The partials of the waveform. Cannot set partials for this waveform type\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Tone.PulseOscillator.prototype, 'partials', {\n\t get: function () {\n\t return [];\n\t }\n\t });\n\t /**\n\t\t * Clean up method.\n\t\t * @return {Tone.PulseOscillator} this\n\t\t */\n\t Tone.PulseOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._sawtooth.dispose();\n\t this._sawtooth = null;\n\t this._writable([\n\t 'width',\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t this.width.dispose();\n\t this.width = null;\n\t this._widthGate.dispose();\n\t this._widthGate = null;\n\t this._thresh.dispose();\n\t this._thresh = null;\n\t this.frequency = null;\n\t this.detune = null;\n\t return this;\n\t };\n\t return Tone.PulseOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PWMOscillator modulates the width of a Tone.PulseOscillator\n\t\t * at the modulationFrequency. This has the effect of continuously\n\t\t * changing the timbre of the oscillator by altering the harmonics\n\t\t * generated.\n\t\t *\n\t\t * @extends {Tone.Source}\n\t\t * @constructor\n\t\t * @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t * @param {Frequency} modulationFrequency The modulation frequency of the width of the pulse.\n\t\t * @example\n\t\t * var pwm = new Tone.PWMOscillator(\"Ab3\", 0.3).toMaster().start();\n\t\t */\n\t Tone.PWMOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'modulationFrequency'\n\t ], Tone.PWMOscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * the pulse oscillator\n\t\t\t * @type {Tone.PulseOscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._pulse = new Tone.PulseOscillator(options.modulationFrequency);\n\t //change the pulse oscillator type\n\t this._pulse._sawtooth.type = 'sine';\n\t /**\n\t\t\t * the modulator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._modulator = new Tone.Oscillator({\n\t 'frequency': options.frequency,\n\t 'detune': options.detune,\n\t 'phase': options.phase\n\t });\n\t /**\n\t\t\t * Scale the oscillator so it doesn't go silent\n\t\t\t * at the extreme values.\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._scale = new Tone.Multiply(2);\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._modulator.frequency;\n\t /**\n\t\t\t * The detune of the oscillator.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this._modulator.detune;\n\t /**\n\t\t\t * The modulation rate of the oscillator.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.modulationFrequency = this._pulse.frequency;\n\t //connections\n\t this._modulator.chain(this._scale, this._pulse.width);\n\t this._pulse.connect(this.output);\n\t this._readOnly([\n\t 'modulationFrequency',\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.PWMOscillator, Tone.Source);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.PWMOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'modulationFrequency': 0.4\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now]\n\t\t * @private\n\t\t */\n\t Tone.PWMOscillator.prototype._start = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.start(time);\n\t this._pulse.start(time);\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @param {Time} time (optional) timing parameter\n\t\t * @private\n\t\t */\n\t Tone.PWMOscillator.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.stop(time);\n\t this._pulse.stop(time);\n\t };\n\t /**\n\t\t * The type of the oscillator. Always returns \"pwm\".\n\t\t * @readOnly\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.PWMOscillator.prototype, 'type', {\n\t get: function () {\n\t return 'pwm';\n\t }\n\t });\n\t /**\n\t\t * The partials of the waveform. Cannot set partials for this waveform type\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @private\n\t\t */\n\t Object.defineProperty(Tone.PWMOscillator.prototype, 'partials', {\n\t get: function () {\n\t return [];\n\t }\n\t });\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.PWMOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._modulator.phase;\n\t },\n\t set: function (phase) {\n\t this._modulator.phase = phase;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.PWMOscillator} this\n\t\t */\n\t Tone.PWMOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._pulse.dispose();\n\t this._pulse = null;\n\t this._scale.dispose();\n\t this._scale = null;\n\t this._modulator.dispose();\n\t this._modulator = null;\n\t this._writable([\n\t 'modulationFrequency',\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t this.frequency = null;\n\t this.detune = null;\n\t this.modulationFrequency = null;\n\t return this;\n\t };\n\t return Tone.PWMOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.FMOscillator\n\t\t *\n\t\t * @extends {Tone.Source}\n\t\t * @constructor\n\t\t * @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t * @param {String} type The type of the carrier oscillator.\n\t\t * @param {String} modulationType The type of the modulator oscillator.\n\t\t * @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.FMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t Tone.FMOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type',\n\t 'modulationType'\n\t ], Tone.FMOscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The carrier oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._carrier = new Tone.Oscillator(options.frequency, options.type);\n\t /**\n\t\t\t * The oscillator's frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune control signal.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this._carrier.detune;\n\t this.detune.value = options.detune;\n\t /**\n\t\t\t * The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t\t\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t\t * modulating signal (ma) -- as in ma/mf.\n\t\t\t *\t@type {Positive}\n\t\t\t *\t@signal\n\t\t\t */\n\t this.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\t this.modulationIndex.units = Tone.Type.Positive;\n\t /**\n\t\t\t * The modulating oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\t /**\n\t\t\t * Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t\t * A harmonicity of 1 gives both oscillators the same frequency.\n\t\t\t * Harmonicity = 2 means a change of an octave.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * //pitch the modulator an octave below carrier\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t this.harmonicity.units = Tone.Type.Positive;\n\t /**\n\t\t\t * the node where the modulation happens\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationNode = new Tone.Gain(0);\n\t //connections\n\t this.frequency.connect(this._carrier.frequency);\n\t this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t this.frequency.chain(this.modulationIndex, this._modulationNode);\n\t this._modulator.connect(this._modulationNode.gain);\n\t this._modulationNode.connect(this._carrier.frequency);\n\t this._carrier.connect(this.output);\n\t this.detune.connect(this._modulator.detune);\n\t this.phase = options.phase;\n\t this._readOnly([\n\t 'modulationIndex',\n\t 'frequency',\n\t 'detune',\n\t 'harmonicity'\n\t ]);\n\t };\n\t Tone.extend(Tone.FMOscillator, Tone.Source);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.FMOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'modulationIndex': 2,\n\t 'modulationType': 'square',\n\t 'harmonicity': 1\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now]\n\t\t * @private\n\t\t */\n\t Tone.FMOscillator.prototype._start = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.start(time);\n\t this._carrier.start(time);\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @param {Time} time (optional) timing parameter\n\t\t * @private\n\t\t */\n\t Tone.FMOscillator.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.stop(time);\n\t this._carrier.stop(time);\n\t };\n\t /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.FMOscillator.prototype, 'type', {\n\t get: function () {\n\t return this._carrier.type;\n\t },\n\t set: function (type) {\n\t this._carrier.type = type;\n\t }\n\t });\n\t /**\n\t\t * The type of the modulator oscillator\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {String}\n\t\t * @name modulationType\n\t\t */\n\t Object.defineProperty(Tone.FMOscillator.prototype, 'modulationType', {\n\t get: function () {\n\t return this._modulator.type;\n\t },\n\t set: function (type) {\n\t this._modulator.type = type;\n\t }\n\t });\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.FMOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._carrier.phase;\n\t },\n\t set: function (phase) {\n\t this._carrier.phase = phase;\n\t this._modulator.phase = phase;\n\t }\n\t });\n\t /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t Object.defineProperty(Tone.FMOscillator.prototype, 'partials', {\n\t get: function () {\n\t return this._carrier.partials;\n\t },\n\t set: function (partials) {\n\t this._carrier.partials = partials;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.FMOscillator} this\n\t\t */\n\t Tone.FMOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._writable([\n\t 'modulationIndex',\n\t 'frequency',\n\t 'detune',\n\t 'harmonicity'\n\t ]);\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune = null;\n\t this.harmonicity.dispose();\n\t this.harmonicity = null;\n\t this._carrier.dispose();\n\t this._carrier = null;\n\t this._modulator.dispose();\n\t this._modulator = null;\n\t this._modulationNode.dispose();\n\t this._modulationNode = null;\n\t this.modulationIndex.dispose();\n\t this.modulationIndex = null;\n\t return this;\n\t };\n\t return Tone.FMOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.AMOscillator\n\t\t *\n\t\t * @extends {Tone.Oscillator}\n\t\t * @constructor\n\t\t * @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t * @param {String} type The type of the carrier oscillator.\n\t\t * @param {String} modulationType The type of the modulator oscillator.\n\t\t * @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.AMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t Tone.AMOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type',\n\t 'modulationType'\n\t ], Tone.AMOscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The carrier oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._carrier = new Tone.Oscillator(options.frequency, options.type);\n\t /**\n\t\t\t * The oscillator's frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this._carrier.frequency;\n\t /**\n\t\t\t * The detune control signal.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this._carrier.detune;\n\t this.detune.value = options.detune;\n\t /**\n\t\t\t * The modulating oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\t /**\n\t\t\t * convert the -1,1 output to 0,1\n\t\t\t * @type {Tone.AudioToGain}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationScale = new Tone.AudioToGain();\n\t /**\n\t\t\t * Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t\t * A harmonicity of 1 gives both oscillators the same frequency.\n\t\t\t * Harmonicity = 2 means a change of an octave.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * //pitch the modulator an octave below carrier\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t this.harmonicity.units = Tone.Type.Positive;\n\t /**\n\t\t\t * the node where the modulation happens\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationNode = new Tone.Gain(0);\n\t //connections\n\t this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t this.detune.connect(this._modulator.detune);\n\t this._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\t this._carrier.chain(this._modulationNode, this.output);\n\t this.phase = options.phase;\n\t this._readOnly([\n\t 'frequency',\n\t 'detune',\n\t 'harmonicity'\n\t ]);\n\t };\n\t Tone.extend(Tone.AMOscillator, Tone.Oscillator);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.AMOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'modulationType': 'square',\n\t 'harmonicity': 1\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now]\n\t\t * @private\n\t\t */\n\t Tone.AMOscillator.prototype._start = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.start(time);\n\t this._carrier.start(time);\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @param {Time} time (optional) timing parameter\n\t\t * @private\n\t\t */\n\t Tone.AMOscillator.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._modulator.stop(time);\n\t this._carrier.stop(time);\n\t };\n\t /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.AMOscillator.prototype, 'type', {\n\t get: function () {\n\t return this._carrier.type;\n\t },\n\t set: function (type) {\n\t this._carrier.type = type;\n\t }\n\t });\n\t /**\n\t\t * The type of the modulator oscillator\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {string}\n\t\t * @name modulationType\n\t\t */\n\t Object.defineProperty(Tone.AMOscillator.prototype, 'modulationType', {\n\t get: function () {\n\t return this._modulator.type;\n\t },\n\t set: function (type) {\n\t this._modulator.type = type;\n\t }\n\t });\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.AMOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._carrier.phase;\n\t },\n\t set: function (phase) {\n\t this._carrier.phase = phase;\n\t this._modulator.phase = phase;\n\t }\n\t });\n\t /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t Object.defineProperty(Tone.AMOscillator.prototype, 'partials', {\n\t get: function () {\n\t return this._carrier.partials;\n\t },\n\t set: function (partials) {\n\t this._carrier.partials = partials;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.AMOscillator} this\n\t\t */\n\t Tone.AMOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'detune',\n\t 'harmonicity'\n\t ]);\n\t this.frequency = null;\n\t this.detune = null;\n\t this.harmonicity.dispose();\n\t this.harmonicity = null;\n\t this._carrier.dispose();\n\t this._carrier = null;\n\t this._modulator.dispose();\n\t this._modulator = null;\n\t this._modulationNode.dispose();\n\t this._modulationNode = null;\n\t this._modulationScale.dispose();\n\t this._modulationScale = null;\n\t return this;\n\t };\n\t return Tone.AMOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.FatOscillator\n\t\t *\n\t\t * @extends {Tone.Source}\n\t\t * @constructor\n\t\t * @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t * @param {String} type The type of the carrier oscillator.\n\t\t * @param {String} modulationType The type of the modulator oscillator.\n\t\t * @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.FatOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t Tone.FatOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type',\n\t 'spread'\n\t ], Tone.FatOscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The oscillator's frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune control signal.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t /**\n\t\t\t * The array of oscillators\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillators = [];\n\t /**\n\t\t\t * The total spread of the oscillators\n\t\t\t * @type {Cents}\n\t\t\t * @private\n\t\t\t */\n\t this._spread = options.spread;\n\t /**\n\t\t\t * The type of the oscillator\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._type = options.type;\n\t /**\n\t\t\t * The phase of the oscillators\n\t\t\t * @type {Degrees}\n\t\t\t * @private\n\t\t\t */\n\t this._phase = options.phase;\n\t /**\n\t\t\t * The partials array\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._partials = Tone.defaultArg(options.partials, []);\n\t //set the count initially\n\t this.count = options.count;\n\t this._readOnly([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.FatOscillator, Tone.Source);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.FatOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'phase': 0,\n\t 'spread': 20,\n\t 'count': 3,\n\t 'type': 'sawtooth'\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now]\n\t\t * @private\n\t\t */\n\t Tone.FatOscillator.prototype._start = function (time) {\n\t time = this.toSeconds(time);\n\t this._forEach(function (osc) {\n\t osc.start(time);\n\t });\n\t };\n\t /**\n\t\t * stop the oscillator\n\t\t * @param {Time} time (optional) timing parameter\n\t\t * @private\n\t\t */\n\t Tone.FatOscillator.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._forEach(function (osc) {\n\t osc.stop(time);\n\t });\n\t };\n\t /**\n\t\t * Iterate over all of the oscillators\n\t\t * @param {Function} iterator The iterator function\n\t\t * @private\n\t\t */\n\t Tone.FatOscillator.prototype._forEach = function (iterator) {\n\t for (var i = 0; i < this._oscillators.length; i++) {\n\t iterator.call(this, this._oscillators[i], i);\n\t }\n\t };\n\t /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t Object.defineProperty(Tone.FatOscillator.prototype, 'type', {\n\t get: function () {\n\t return this._type;\n\t },\n\t set: function (type) {\n\t this._type = type;\n\t this._forEach(function (osc) {\n\t osc.type = type;\n\t });\n\t }\n\t });\n\t /**\n\t\t * The detune spread between the oscillators. If \"count\" is\n\t\t * set to 3 oscillators and the \"spread\" is set to 40,\n\t\t * the three oscillators would be detuned like this: [-20, 0, 20]\n\t\t * for a total detune spread of 40 cents.\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Cents}\n\t\t * @name spread\n\t\t */\n\t Object.defineProperty(Tone.FatOscillator.prototype, 'spread', {\n\t get: function () {\n\t return this._spread;\n\t },\n\t set: function (spread) {\n\t this._spread = spread;\n\t if (this._oscillators.length > 1) {\n\t var start = -spread / 2;\n\t var step = spread / (this._oscillators.length - 1);\n\t this._forEach(function (osc, i) {\n\t osc.detune.value = start + step * i;\n\t });\n\t }\n\t }\n\t });\n\t /**\n\t\t * The number of detuned oscillators\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Number}\n\t\t * @name count\n\t\t */\n\t Object.defineProperty(Tone.FatOscillator.prototype, 'count', {\n\t get: function () {\n\t return this._oscillators.length;\n\t },\n\t set: function (count) {\n\t count = Math.max(count, 1);\n\t if (this._oscillators.length !== count) {\n\t // var partials = this.partials;\n\t // var type = this.type;\n\t //dispose the previous oscillators\n\t this._forEach(function (osc) {\n\t osc.dispose();\n\t });\n\t this._oscillators = [];\n\t for (var i = 0; i < count; i++) {\n\t var osc = new Tone.Oscillator();\n\t if (this.type === Tone.Oscillator.Type.Custom) {\n\t osc.partials = this._partials;\n\t } else {\n\t osc.type = this._type;\n\t }\n\t osc.phase = this._phase;\n\t osc.volume.value = -6 - count * 1.1;\n\t this.frequency.connect(osc.frequency);\n\t this.detune.connect(osc.detune);\n\t osc.connect(this.output);\n\t this._oscillators[i] = osc;\n\t }\n\t //set the spread\n\t this.spread = this._spread;\n\t if (this.state === Tone.State.Started) {\n\t this._forEach(function (osc) {\n\t osc.start();\n\t });\n\t }\n\t }\n\t }\n\t });\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Number}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.FatOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._phase;\n\t },\n\t set: function (phase) {\n\t this._phase = phase;\n\t this._forEach(function (osc) {\n\t osc.phase = phase;\n\t });\n\t }\n\t });\n\t /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t Object.defineProperty(Tone.FatOscillator.prototype, 'partials', {\n\t get: function () {\n\t return this._partials;\n\t },\n\t set: function (partials) {\n\t this._partials = partials;\n\t this._type = Tone.Oscillator.Type.Custom;\n\t this._forEach(function (osc) {\n\t osc.partials = partials;\n\t });\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.FatOscillator} this\n\t\t */\n\t Tone.FatOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t this._forEach(function (osc) {\n\t osc.dispose();\n\t });\n\t this._oscillators = null;\n\t this._partials = null;\n\t return this;\n\t };\n\t return Tone.FatOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.OmniOscillator aggregates Tone.Oscillator, Tone.PulseOscillator,\n\t\t * Tone.PWMOscillator, Tone.FMOscillator, Tone.AMOscillator, and Tone.FatOscillator\n\t\t * into one class. The oscillator class can be changed by setting the `type`.\n\t\t * `omniOsc.type = \"pwm\"` will set it to the Tone.PWMOscillator. Prefixing\n\t\t * any of the basic types (\"sine\", \"square4\", etc.) with \"fm\", \"am\", or \"fat\"\n\t\t * will use the FMOscillator, AMOscillator or FatOscillator respectively.\n\t\t * For example: `omniOsc.type = \"fatsawtooth\"` will create set the oscillator\n\t\t * to a FatOscillator of type \"sawtooth\".\n\t\t *\n\t\t * @extends {Tone.Source}\n\t\t * @constructor\n\t\t * @param {Frequency} frequency The initial frequency of the oscillator.\n\t\t * @param {String} type The type of the oscillator.\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(\"C#4\", \"pwm\");\n\t\t */\n\t Tone.OmniOscillator = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'frequency',\n\t 'type'\n\t ], Tone.OmniOscillator);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune control\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t /**\n\t\t\t * the type of the oscillator source\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t this._sourceType = undefined;\n\t /**\n\t\t\t * the oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillator = null;\n\t //set the oscillator\n\t this.type = options.type;\n\t this._readOnly([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t //set the options\n\t this.set(options);\n\t };\n\t Tone.extend(Tone.OmniOscillator, Tone.Source);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @type {Object}\n\t\t * @const\n\t\t */\n\t Tone.OmniOscillator.defaults = {\n\t 'frequency': 440,\n\t 'detune': 0,\n\t 'type': 'sine',\n\t 'phase': 0\n\t };\n\t /**\n\t\t * @enum {String}\n\t\t * @private\n\t\t */\n\t var OmniOscType = {\n\t Pulse: 'PulseOscillator',\n\t PWM: 'PWMOscillator',\n\t Osc: 'Oscillator',\n\t FM: 'FMOscillator',\n\t AM: 'AMOscillator',\n\t Fat: 'FatOscillator'\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now] the time to start the oscillator\n\t\t * @private\n\t\t */\n\t Tone.OmniOscillator.prototype._start = function (time) {\n\t this._oscillator.start(time);\n\t };\n\t /**\n\t\t * start the oscillator\n\t\t * @param {Time} [time=now] the time to start the oscillator\n\t\t * @private\n\t\t */\n\t Tone.OmniOscillator.prototype._stop = function (time) {\n\t this._oscillator.stop(time);\n\t };\n\t Tone.OmniOscillator.prototype.restart = function (time) {\n\t this._oscillator.restart(time);\n\t };\n\t /**\n\t\t * The type of the oscillator. Can be any of the basic types: sine, square, triangle, sawtooth. Or\n\t\t * prefix the basic types with \"fm\", \"am\", or \"fat\" to use the FMOscillator, AMOscillator or FatOscillator\n\t\t * types. The oscillator could also be set to \"pwm\" or \"pulse\". All of the parameters of the\n\t\t * oscillator's class are accessible when the oscillator is set to that type, but throws an error\n\t\t * when it's not.\n\t\t *\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {String}\n\t\t * @name type\n\t\t * @example\n\t\t * omniOsc.type = \"pwm\";\n\t\t * //modulationFrequency is parameter which is available\n\t\t * //only when the type is \"pwm\".\n\t\t * omniOsc.modulationFrequency.value = 0.5;\n\t\t * @example\n\t\t * //an square wave frequency modulated by a sawtooth\n\t\t * omniOsc.type = \"fmsquare\";\n\t\t * omniOsc.modulationType = \"sawtooth\";\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'type', {\n\t get: function () {\n\t var prefix = '';\n\t if (this._sourceType === OmniOscType.FM) {\n\t prefix = 'fm';\n\t } else if (this._sourceType === OmniOscType.AM) {\n\t prefix = 'am';\n\t } else if (this._sourceType === OmniOscType.Fat) {\n\t prefix = 'fat';\n\t }\n\t return prefix + this._oscillator.type;\n\t },\n\t set: function (type) {\n\t if (type.substr(0, 2) === 'fm') {\n\t this._createNewOscillator(OmniOscType.FM);\n\t this._oscillator.type = type.substr(2);\n\t } else if (type.substr(0, 2) === 'am') {\n\t this._createNewOscillator(OmniOscType.AM);\n\t this._oscillator.type = type.substr(2);\n\t } else if (type.substr(0, 3) === 'fat') {\n\t this._createNewOscillator(OmniOscType.Fat);\n\t this._oscillator.type = type.substr(3);\n\t } else if (type === 'pwm') {\n\t this._createNewOscillator(OmniOscType.PWM);\n\t } else if (type === 'pulse') {\n\t this._createNewOscillator(OmniOscType.Pulse);\n\t } else {\n\t this._createNewOscillator(OmniOscType.Osc);\n\t this._oscillator.type = type;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The partials of the waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * This is not available on \"pwm\" and \"pulse\" oscillator types.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'partials', {\n\t get: function () {\n\t return this._oscillator.partials;\n\t },\n\t set: function (partials) {\n\t this._oscillator.partials = partials;\n\t }\n\t });\n\t /**\n\t\t * Set a member/attribute of the oscillator.\n\t\t * @param {Object|String} params\n\t\t * @param {number=} value\n\t\t * @param {Time=} rampTime\n\t\t * @returns {Tone.OmniOscillator} this\n\t\t */\n\t Tone.OmniOscillator.prototype.set = function (params, value) {\n\t //make sure the type is set first\n\t if (params === 'type') {\n\t this.type = value;\n\t } else if (Tone.isObject(params) && params.hasOwnProperty('type')) {\n\t this.type = params.type;\n\t }\n\t //then set the rest\n\t Tone.prototype.set.apply(this, arguments);\n\t return this;\n\t };\n\t /**\n\t\t * connect the oscillator to the frequency and detune signals\n\t\t * @private\n\t\t */\n\t Tone.OmniOscillator.prototype._createNewOscillator = function (oscType) {\n\t if (oscType !== this._sourceType) {\n\t this._sourceType = oscType;\n\t var OscillatorConstructor = Tone[oscType];\n\t //short delay to avoid clicks on the change\n\t var now = this.now();\n\t if (this._oscillator !== null) {\n\t var oldOsc = this._oscillator;\n\t oldOsc.stop(now);\n\t //dispose the old one\n\t this.context.setTimeout(function () {\n\t oldOsc.dispose();\n\t oldOsc = null;\n\t }, this.blockTime);\n\t }\n\t this._oscillator = new OscillatorConstructor();\n\t this.frequency.connect(this._oscillator.frequency);\n\t this.detune.connect(this._oscillator.detune);\n\t this._oscillator.connect(this.output);\n\t if (this.state === Tone.State.Started) {\n\t this._oscillator.start(now);\n\t }\n\t }\n\t };\n\t /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'phase', {\n\t get: function () {\n\t return this._oscillator.phase;\n\t },\n\t set: function (phase) {\n\t this._oscillator.phase = phase;\n\t }\n\t });\n\t /**\n\t\t * The width of the oscillator (only if the oscillator is set to \"pulse\")\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {NormalRange}\n\t\t * @signal\n\t\t * @name width\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(440, \"pulse\");\n\t\t * //can access the width attribute only if type === \"pulse\"\n\t\t * omniOsc.width.value = 0.2;\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'width', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.Pulse) {\n\t return this._oscillator.width;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The number of detuned oscillators\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Number}\n\t\t * @name count\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'count', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.Fat) {\n\t return this._oscillator.count;\n\t }\n\t },\n\t set: function (count) {\n\t if (this._sourceType === OmniOscType.Fat) {\n\t this._oscillator.count = count;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The detune spread between the oscillators. If \"count\" is\n\t\t * set to 3 oscillators and the \"spread\" is set to 40,\n\t\t * the three oscillators would be detuned like this: [-20, 0, 20]\n\t\t * for a total detune spread of 40 cents. See Tone.FatOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Cents}\n\t\t * @name spread\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'spread', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.Fat) {\n\t return this._oscillator.spread;\n\t }\n\t },\n\t set: function (spread) {\n\t if (this._sourceType === OmniOscType.Fat) {\n\t this._oscillator.spread = spread;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The type of the modulator oscillator. Only if the oscillator\n\t\t * is set to \"am\" or \"fm\" types. see. Tone.AMOscillator or Tone.FMOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {String}\n\t\t * @name modulationType\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationType', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t return this._oscillator.modulationType;\n\t }\n\t },\n\t set: function (mType) {\n\t if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t this._oscillator.modulationType = mType;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t * modulating signal (ma) -- as in ma/mf.\n\t\t * See Tone.FMOscillator for more info.\n\t\t * @type {Positive}\n\t\t * @signal\n\t\t * @name modulationIndex\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationIndex', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.FM) {\n\t return this._oscillator.modulationIndex;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t * A harmonicity of 1 gives both oscillators the same frequency.\n\t\t * Harmonicity = 2 means a change of an octave. See Tone.AMOscillator or Tone.FMOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @signal\n\t\t * @type {Positive}\n\t\t * @name harmonicity\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'harmonicity', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t return this._oscillator.harmonicity;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The modulationFrequency Signal of the oscillator\n\t\t * (only if the oscillator type is set to pwm). See\n\t\t * Tone.PWMOscillator for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Frequency}\n\t\t * @signal\n\t\t * @name modulationFrequency\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(440, \"pwm\");\n\t\t * //can access the modulationFrequency attribute only if type === \"pwm\"\n\t\t * omniOsc.modulationFrequency.value = 0.2;\n\t\t */\n\t Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationFrequency', {\n\t get: function () {\n\t if (this._sourceType === OmniOscType.PWM) {\n\t return this._oscillator.modulationFrequency;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.OmniOscillator} this\n\t\t */\n\t Tone.OmniOscillator.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'detune'\n\t ]);\n\t this.detune.dispose();\n\t this.detune = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this._oscillator.dispose();\n\t this._oscillator = null;\n\t this._sourceType = null;\n\t return this;\n\t };\n\t return Tone.OmniOscillator;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Base-class for all instruments\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t */\n\t Tone.Instrument = function (options) {\n\t //get the defaults\n\t options = Tone.defaultArg(options, Tone.Instrument.defaults);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The output and volume triming node\n\t\t\t * @type {Tone.Volume}\n\t\t\t * @private\n\t\t\t */\n\t this._volume = this.output = new Tone.Volume(options.volume);\n\t /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t this.volume = this._volume.volume;\n\t this._readOnly('volume');\n\t /**\n\t\t\t * Keep track of all events scheduled to the transport\n\t\t\t * when the instrument is 'synced'\n\t\t\t * @type {Array<Number>}\n\t\t\t * @private\n\t\t\t */\n\t this._scheduledEvents = [];\n\t };\n\t Tone.extend(Tone.Instrument, Tone.AudioNode);\n\t /**\n\t\t * the default attributes\n\t\t * @type {object}\n\t\t */\n\t Tone.Instrument.defaults = {\n\t /** the volume of the output in decibels */\n\t 'volume': 0\n\t };\n\t /**\n\t\t * @abstract\n\t\t * @param {string|number} note the note to trigger\n\t\t * @param {Time} [time=now] the time to trigger the ntoe\n\t\t * @param {number} [velocity=1] the velocity to trigger the note\n\t\t */\n\t Tone.Instrument.prototype.triggerAttack = Tone.noOp;\n\t /**\n\t\t * @abstract\n\t\t * @param {Time} [time=now] when to trigger the release\n\t\t */\n\t Tone.Instrument.prototype.triggerRelease = Tone.noOp;\n\t /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * instrument.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * instrument.triggerAttackRelease('C4', '8n', 0)\n\t\t * instrument.triggerAttackRelease('E4', '8n', '8n')\n\t\t * instrument.triggerAttackRelease('G4', '8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.Instrument.prototype.sync = function () {\n\t this._syncMethod('triggerAttack', 1);\n\t this._syncMethod('triggerRelease', 0);\n\t return this;\n\t };\n\t /**\n\t\t * Wrap the given method so that it can be synchronized\n\t\t * @param {String} method Which method to wrap and sync\n\t\t * @param {Number} timePosition What position the time argument appears in\n\t\t * @private\n\t\t */\n\t Tone.Instrument.prototype._syncMethod = function (method, timePosition) {\n\t var originalMethod = this['_original_' + method] = this[method];\n\t this[method] = function () {\n\t var args = Array.prototype.slice.call(arguments);\n\t var time = args[timePosition];\n\t var id = Tone.Transport.schedule(function (t) {\n\t args[timePosition] = t;\n\t originalMethod.apply(this, args);\n\t }.bind(this), time);\n\t this._scheduledEvents.push(id);\n\t }.bind(this);\n\t };\n\t /**\n\t\t * Unsync the instrument from the Transport\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.Instrument.prototype.unsync = function () {\n\t this._scheduledEvents.forEach(function (id) {\n\t Tone.Transport.clear(id);\n\t });\n\t this._scheduledEvents = [];\n\t if (this._original_triggerAttack) {\n\t this.triggerAttack = this._original_triggerAttack;\n\t this.triggerRelease = this._original_triggerRelease;\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the attack and then the release after the duration.\n\t\t * @param {Frequency} note The note to trigger.\n\t\t * @param {Time} duration How long the note should be held for before\n\t\t * triggering the release. This value must be greater than 0.\n\t\t * @param {Time} [time=now] When the note should be triggered.\n\t\t * @param {NormalRange} [velocity=1] The velocity the note should be triggered at.\n\t\t * @returns {Tone.Instrument} this\n\t\t * @example\n\t\t * //trigger \"C4\" for the duration of an 8th note\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t Tone.Instrument.prototype.triggerAttackRelease = function (note, duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t duration = this.toSeconds(duration);\n\t this.triggerAttack(note, time, velocity);\n\t this.triggerRelease(time + duration);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.Instrument.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._volume.dispose();\n\t this._volume = null;\n\t this._writable(['volume']);\n\t this.volume = null;\n\t this.unsync();\n\t this._scheduledEvents = null;\n\t return this;\n\t };\n\t return Tone.Instrument;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class This is an abstract base class for other monophonic instruments to \n\t\t * extend. IMPORTANT: It does not make any sound on its own and\n\t\t * shouldn't be directly instantiated.\n\t\t *\n\t\t * @constructor\n\t\t * @abstract\n\t\t * @extends {Tone.Instrument}\n\t\t */\n\t Tone.Monophonic = function (options) {\n\t //get the defaults\n\t options = Tone.defaultArg(options, Tone.Monophonic.defaults);\n\t Tone.Instrument.call(this, options);\n\t /**\n\t\t\t * The glide time between notes. \n\t\t\t * @type {Time}\n\t\t\t */\n\t this.portamento = options.portamento;\n\t };\n\t Tone.extend(Tone.Monophonic, Tone.Instrument);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Monophonic.defaults = { 'portamento': 0 };\n\t /**\n\t\t * Trigger the attack of the note optionally with a given velocity. \n\t\t * \n\t\t * \n\t\t * @param {Frequency} note The note to trigger.\n\t\t * @param {Time} [time=now] When the note should start.\n\t\t * @param {number} [velocity=1] velocity The velocity scaler \n\t\t * determines how \"loud\" the note \n\t\t * will be triggered.\n\t\t * @returns {Tone.Monophonic} this\n\t\t * @example\n\t\t * synth.triggerAttack(\"C4\");\n\t\t * @example\n\t\t * //trigger the note a half second from now at half velocity\n\t\t * synth.triggerAttack(\"C4\", \"+0.5\", 0.5);\n\t\t */\n\t Tone.Monophonic.prototype.triggerAttack = function (note, time, velocity) {\n\t time = this.toSeconds(time);\n\t this._triggerEnvelopeAttack(time, velocity);\n\t this.setNote(note, time);\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the release portion of the envelope\n\t\t * @param {Time} [time=now] If no time is given, the release happens immediatly\n\t\t * @returns {Tone.Monophonic} this\n\t\t * @example\n\t\t * synth.triggerRelease();\n\t\t */\n\t Tone.Monophonic.prototype.triggerRelease = function (time) {\n\t time = this.toSeconds(time);\n\t this._triggerEnvelopeRelease(time);\n\t return this;\n\t };\n\t /**\n\t\t * override this method with the actual method\n\t\t * @abstract\n\t\t * @private\n\t\t */\n\t Tone.Monophonic.prototype._triggerEnvelopeAttack = function () {\n\t };\n\t /**\n\t\t * override this method with the actual method\n\t\t * @abstract\n\t\t * @private\n\t\t */\n\t Tone.Monophonic.prototype._triggerEnvelopeRelease = function () {\n\t };\n\t /**\n\t\t * Set the note at the given time. If no time is given, the note\n\t\t * will set immediately. \n\t\t * @param {Frequency} note The note to change to.\n\t\t * @param {Time} [time=now] The time when the note should be set. \n\t\t * @returns {Tone.Monophonic} this\n\t\t * @example\n\t\t * //change to F#6 in one quarter note from now.\n\t\t * synth.setNote(\"F#6\", \"+4n\");\n\t\t * @example\n\t\t * //change to Bb4 right now\n\t\t * synth.setNote(\"Bb4\");\n\t\t */\n\t Tone.Monophonic.prototype.setNote = function (note, time) {\n\t time = this.toSeconds(time);\n\t if (this.portamento > 0) {\n\t var currentNote = this.frequency.value;\n\t this.frequency.setValueAtTime(currentNote, time);\n\t var portTime = this.toSeconds(this.portamento);\n\t this.frequency.exponentialRampToValueAtTime(note, time + portTime);\n\t } else {\n\t this.frequency.setValueAtTime(note, time);\n\t }\n\t return this;\n\t };\n\t return Tone.Monophonic;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Synth is composed simply of a Tone.OmniOscillator\n\t\t * routed through a Tone.AmplitudeEnvelope.\n\t\t * <img src=\"https://docs.google.com/drawings/d/1-1_0YW2Z1J2EPI36P8fNCMcZG7N1w1GZluPs4og4evo/pub?w=1163&h=231\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Monophonic}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var synth = new Tone.Synth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t Tone.Synth = function (options) {\n\t //get the defaults\n\t options = Tone.defaultArg(options, Tone.Synth.defaults);\n\t Tone.Monophonic.call(this, options);\n\t /**\n\t\t\t * The oscillator.\n\t\t\t * @type {Tone.OmniOscillator}\n\t\t\t */\n\t this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this.oscillator.frequency;\n\t /**\n\t\t\t * The detune control.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this.oscillator.detune;\n\t /**\n\t\t\t * The amplitude envelope.\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t //connect the oscillators to the output\n\t this.oscillator.chain(this.envelope, this.output);\n\t this._readOnly([\n\t 'oscillator',\n\t 'frequency',\n\t 'detune',\n\t 'envelope'\n\t ]);\n\t };\n\t Tone.extend(Tone.Synth, Tone.Monophonic);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.Synth.defaults = {\n\t 'oscillator': { 'type': 'triangle' },\n\t 'envelope': {\n\t 'attack': 0.005,\n\t 'decay': 0.1,\n\t 'sustain': 0.3,\n\t 'release': 1\n\t }\n\t };\n\t /**\n\t\t * start the attack portion of the envelope\n\t\t * @param {Time} [time=now] the time the attack should start\n\t\t * @param {number} [velocity=1] the velocity of the note (0-1)\n\t\t * @returns {Tone.Synth} this\n\t\t * @private\n\t\t */\n\t Tone.Synth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t //the envelopes\n\t this.envelope.triggerAttack(time, velocity);\n\t this.oscillator.start(time);\n\t //if there is no release portion, stop the oscillator\n\t if (this.envelope.sustain === 0) {\n\t this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * start the release portion of the envelope\n\t\t * @param {Time} [time=now] the time the release should start\n\t\t * @returns {Tone.Synth} this\n\t\t * @private\n\t\t */\n\t Tone.Synth.prototype._triggerEnvelopeRelease = function (time) {\n\t time = this.toSeconds(time);\n\t this.envelope.triggerRelease(time);\n\t this.oscillator.stop(time + this.envelope.release);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Synth} this\n\t\t */\n\t Tone.Synth.prototype.dispose = function () {\n\t Tone.Monophonic.prototype.dispose.call(this);\n\t this._writable([\n\t 'oscillator',\n\t 'frequency',\n\t 'detune',\n\t 'envelope'\n\t ]);\n\t this.oscillator.dispose();\n\t this.oscillator = null;\n\t this.envelope.dispose();\n\t this.envelope = null;\n\t this.frequency = null;\n\t this.detune = null;\n\t return this;\n\t };\n\t return Tone.Synth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class AMSynth uses the output of one Tone.Synth to modulate the\n\t\t * amplitude of another Tone.Synth. The harmonicity (the ratio between\n\t\t * the two signals) affects the timbre of the output signal greatly.\n\t\t * Read more about Amplitude Modulation Synthesis on\n\t\t * [SoundOnSound](https://web.archive.org/web/20160404103653/http://www.soundonsound.com:80/sos/mar00/articles/synthsecrets.htm).\n\t\t * <img src=\"https://docs.google.com/drawings/d/1TQu8Ed4iFr1YTLKpB3U1_hur-UwBrh5gdBXc8BxfGKw/pub?w=1009&h=457\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Monophonic}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var synth = new Tone.AMSynth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"4n\");\n\t\t */\n\t Tone.AMSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.AMSynth.defaults);\n\t Tone.Monophonic.call(this, options);\n\t /**\n\t\t\t * The carrier voice.\n\t\t\t * @type {Tone.Synth}\n\t\t\t * @private\n\t\t\t */\n\t this._carrier = new Tone.Synth();\n\t this._carrier.volume.value = -10;\n\t /**\n\t\t\t * The carrier's oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.oscillator = this._carrier.oscillator;\n\t /**\n\t\t\t * The carrier's envelope\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.envelope = this._carrier.envelope.set(options.envelope);\n\t /**\n\t\t\t * The modulator voice.\n\t\t\t * @type {Tone.Synth}\n\t\t\t * @private\n\t\t\t */\n\t this._modulator = new Tone.Synth();\n\t this._modulator.volume.value = -10;\n\t /**\n\t\t\t * The modulator's oscillator which is applied\n\t\t\t * to the amplitude of the oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.modulation = this._modulator.oscillator.set(options.modulation);\n\t /**\n\t\t\t * The modulator's envelope\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\t /**\n\t\t\t * The frequency.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune in cents\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t /**\n\t\t\t * Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t * 1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t this.harmonicity.units = Tone.Type.Positive;\n\t /**\n\t\t\t * convert the -1,1 output to 0,1\n\t\t\t * @type {Tone.AudioToGain}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationScale = new Tone.AudioToGain();\n\t /**\n\t\t\t * the node where the modulation happens\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationNode = new Tone.Gain();\n\t //control the two voices frequency\n\t this.frequency.connect(this._carrier.frequency);\n\t this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t this.detune.fan(this._carrier.detune, this._modulator.detune);\n\t this._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\t this._carrier.chain(this._modulationNode, this.output);\n\t this._readOnly([\n\t 'frequency',\n\t 'harmonicity',\n\t 'oscillator',\n\t 'envelope',\n\t 'modulation',\n\t 'modulationEnvelope',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.AMSynth, Tone.Monophonic);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.AMSynth.defaults = {\n\t 'harmonicity': 3,\n\t 'detune': 0,\n\t 'oscillator': { 'type': 'sine' },\n\t 'envelope': {\n\t 'attack': 0.01,\n\t 'decay': 0.01,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t },\n\t 'modulation': { 'type': 'square' },\n\t 'modulationEnvelope': {\n\t 'attack': 0.5,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t }\n\t };\n\t /**\n\t\t * trigger the attack portion of the note\n\t\t *\n\t\t * @param {Time} [time=now] the time the note will occur\n\t\t * @param {NormalRange} [velocity=1] the velocity of the note\n\t\t * @private\n\t\t * @returns {Tone.AMSynth} this\n\t\t */\n\t Tone.AMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t //the port glide\n\t time = this.toSeconds(time);\n\t //the envelopes\n\t this._carrier._triggerEnvelopeAttack(time, velocity);\n\t this._modulator._triggerEnvelopeAttack(time);\n\t return this;\n\t };\n\t /**\n\t\t * trigger the release portion of the note\n\t\t *\n\t\t * @param {Time} [time=now] the time the note will release\n\t\t * @private\n\t\t * @returns {Tone.AMSynth} this\n\t\t */\n\t Tone.AMSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t this._carrier._triggerEnvelopeRelease(time);\n\t this._modulator._triggerEnvelopeRelease(time);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.AMSynth} this\n\t\t */\n\t Tone.AMSynth.prototype.dispose = function () {\n\t Tone.Monophonic.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'harmonicity',\n\t 'oscillator',\n\t 'envelope',\n\t 'modulation',\n\t 'modulationEnvelope',\n\t 'detune'\n\t ]);\n\t this._carrier.dispose();\n\t this._carrier = null;\n\t this._modulator.dispose();\n\t this._modulator = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t this.harmonicity.dispose();\n\t this.harmonicity = null;\n\t this._modulationScale.dispose();\n\t this._modulationScale = null;\n\t this._modulationNode.dispose();\n\t this._modulationNode = null;\n\t this.oscillator = null;\n\t this.envelope = null;\n\t this.modulationEnvelope = null;\n\t this.modulation = null;\n\t return this;\n\t };\n\t return Tone.AMSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.MonoSynth is composed of one oscillator, one filter, and two envelopes.\n\t\t * The amplitude of the Tone.Oscillator and the cutoff frequency of the\n\t\t * Tone.Filter are controlled by Tone.Envelopes.\n\t\t * <img src=\"https://docs.google.com/drawings/d/1gaY1DF9_Hzkodqf8JI1Cg2VZfwSElpFQfI94IQwad38/pub?w=924&h=240\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Monophonic}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var synth = new Tone.MonoSynth({\n\t\t * \t\"oscillator\" : {\n\t\t * \t\t\"type\" : \"square\"\n\t\t * },\n\t\t * \"envelope\" : {\n\t\t * \t\"attack\" : 0.1\n\t\t * }\n\t\t * }).toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t Tone.MonoSynth = function (options) {\n\t //get the defaults\n\t options = Tone.defaultArg(options, Tone.MonoSynth.defaults);\n\t Tone.Monophonic.call(this, options);\n\t /**\n\t\t\t * The oscillator.\n\t\t\t * @type {Tone.OmniOscillator}\n\t\t\t */\n\t this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = this.oscillator.frequency;\n\t /**\n\t\t\t * The detune control.\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = this.oscillator.detune;\n\t /**\n\t\t\t * The filter.\n\t\t\t * @type {Tone.Filter}\n\t\t\t */\n\t this.filter = new Tone.Filter(options.filter);\n\t /**\n\t\t\t * The filter envelope.\n\t\t\t * @type {Tone.FrequencyEnvelope}\n\t\t\t */\n\t this.filterEnvelope = new Tone.FrequencyEnvelope(options.filterEnvelope);\n\t /**\n\t\t\t * The amplitude envelope.\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t //connect the oscillators to the output\n\t this.oscillator.chain(this.filter, this.envelope, this.output);\n\t //connect the filter envelope\n\t this.filterEnvelope.connect(this.filter.frequency);\n\t this._readOnly([\n\t 'oscillator',\n\t 'frequency',\n\t 'detune',\n\t 'filter',\n\t 'filterEnvelope',\n\t 'envelope'\n\t ]);\n\t };\n\t Tone.extend(Tone.MonoSynth, Tone.Monophonic);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.MonoSynth.defaults = {\n\t 'frequency': 'C4',\n\t 'detune': 0,\n\t 'oscillator': { 'type': 'square' },\n\t 'filter': {\n\t 'Q': 6,\n\t 'type': 'lowpass',\n\t 'rolloff': -24\n\t },\n\t 'envelope': {\n\t 'attack': 0.005,\n\t 'decay': 0.1,\n\t 'sustain': 0.9,\n\t 'release': 1\n\t },\n\t 'filterEnvelope': {\n\t 'attack': 0.06,\n\t 'decay': 0.2,\n\t 'sustain': 0.5,\n\t 'release': 2,\n\t 'baseFrequency': 200,\n\t 'octaves': 7,\n\t 'exponent': 2\n\t }\n\t };\n\t /**\n\t\t * start the attack portion of the envelope\n\t\t * @param {Time} [time=now] the time the attack should start\n\t\t * @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n\t\t * @returns {Tone.MonoSynth} this\n\t\t * @private\n\t\t */\n\t Tone.MonoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t time = this.toSeconds(time);\n\t //the envelopes\n\t this.envelope.triggerAttack(time, velocity);\n\t this.filterEnvelope.triggerAttack(time);\n\t this.oscillator.start(time);\n\t if (this.envelope.sustain === 0) {\n\t this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * start the release portion of the envelope\n\t\t * @param {Time} [time=now] the time the release should start\n\t\t * @returns {Tone.MonoSynth} this\n\t\t * @private\n\t\t */\n\t Tone.MonoSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t this.envelope.triggerRelease(time);\n\t this.filterEnvelope.triggerRelease(time);\n\t this.oscillator.stop(time + this.envelope.release);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.MonoSynth} this\n\t\t */\n\t Tone.MonoSynth.prototype.dispose = function () {\n\t Tone.Monophonic.prototype.dispose.call(this);\n\t this._writable([\n\t 'oscillator',\n\t 'frequency',\n\t 'detune',\n\t 'filter',\n\t 'filterEnvelope',\n\t 'envelope'\n\t ]);\n\t this.oscillator.dispose();\n\t this.oscillator = null;\n\t this.envelope.dispose();\n\t this.envelope = null;\n\t this.filterEnvelope.dispose();\n\t this.filterEnvelope = null;\n\t this.filter.dispose();\n\t this.filter = null;\n\t this.frequency = null;\n\t this.detune = null;\n\t return this;\n\t };\n\t return Tone.MonoSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.DuoSynth is a monophonic synth composed of two\n\t\t * MonoSynths run in parallel with control over the\n\t\t * frequency ratio between the two voices and vibrato effect.\n\t\t * <img src=\"https://docs.google.com/drawings/d/1bL4GXvfRMMlqS7XyBm9CjL9KJPSUKbcdBNpqOlkFLxk/pub?w=1012&h=448\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Monophonic}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var duoSynth = new Tone.DuoSynth().toMaster();\n\t\t * duoSynth.triggerAttackRelease(\"C4\", \"2n\");\n\t\t */\n\t Tone.DuoSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.DuoSynth.defaults);\n\t Tone.Monophonic.call(this, options);\n\t /**\n\t\t\t * the first voice\n\t\t\t * @type {Tone.MonoSynth}\n\t\t\t */\n\t this.voice0 = new Tone.MonoSynth(options.voice0);\n\t this.voice0.volume.value = -10;\n\t /**\n\t\t\t * the second voice\n\t\t\t * @type {Tone.MonoSynth}\n\t\t\t */\n\t this.voice1 = new Tone.MonoSynth(options.voice1);\n\t this.voice1.volume.value = -10;\n\t /**\n\t\t\t * The vibrato LFO.\n\t\t\t * @type {Tone.LFO}\n\t\t\t * @private\n\t\t\t */\n\t this._vibrato = new Tone.LFO(options.vibratoRate, -50, 50);\n\t this._vibrato.start();\n\t /**\n\t\t\t * the vibrato frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.vibratoRate = this._vibrato.frequency;\n\t /**\n\t\t\t * the vibrato gain\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._vibratoGain = new Tone.Gain(options.vibratoAmount, Tone.Type.Positive);\n\t /**\n\t\t\t * The amount of vibrato\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t this.vibratoAmount = this._vibratoGain.gain;\n\t /**\n\t\t\t * the frequency control\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t /**\n\t\t\t * Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t * 1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * duoSynth.harmonicity.value = 0.5;\n\t\t\t */\n\t this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t this.harmonicity.units = Tone.Type.Positive;\n\t //control the two voices frequency\n\t this.frequency.connect(this.voice0.frequency);\n\t this.frequency.chain(this.harmonicity, this.voice1.frequency);\n\t this._vibrato.connect(this._vibratoGain);\n\t this._vibratoGain.fan(this.voice0.detune, this.voice1.detune);\n\t this.voice0.connect(this.output);\n\t this.voice1.connect(this.output);\n\t this._readOnly([\n\t 'voice0',\n\t 'voice1',\n\t 'frequency',\n\t 'vibratoAmount',\n\t 'vibratoRate'\n\t ]);\n\t };\n\t Tone.extend(Tone.DuoSynth, Tone.Monophonic);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.DuoSynth.defaults = {\n\t 'vibratoAmount': 0.5,\n\t 'vibratoRate': 5,\n\t 'harmonicity': 1.5,\n\t 'voice0': {\n\t 'volume': -10,\n\t 'portamento': 0,\n\t 'oscillator': { 'type': 'sine' },\n\t 'filterEnvelope': {\n\t 'attack': 0.01,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t },\n\t 'envelope': {\n\t 'attack': 0.01,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t }\n\t },\n\t 'voice1': {\n\t 'volume': -10,\n\t 'portamento': 0,\n\t 'oscillator': { 'type': 'sine' },\n\t 'filterEnvelope': {\n\t 'attack': 0.01,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t },\n\t 'envelope': {\n\t 'attack': 0.01,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t }\n\t }\n\t };\n\t /**\n\t\t * start the attack portion of the envelopes\n\t\t *\n\t\t * @param {Time} [time=now] the time the attack should start\n\t\t * @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n\t\t * @returns {Tone.DuoSynth} this\n\t\t * @private\n\t\t */\n\t Tone.DuoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t time = this.toSeconds(time);\n\t this.voice0._triggerEnvelopeAttack(time, velocity);\n\t this.voice1._triggerEnvelopeAttack(time, velocity);\n\t return this;\n\t };\n\t /**\n\t\t * start the release portion of the envelopes\n\t\t *\n\t\t * @param {Time} [time=now] the time the release should start\n\t\t * @returns {Tone.DuoSynth} this\n\t\t * @private\n\t\t */\n\t Tone.DuoSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t this.voice0._triggerEnvelopeRelease(time);\n\t this.voice1._triggerEnvelopeRelease(time);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.DuoSynth} this\n\t\t */\n\t Tone.DuoSynth.prototype.dispose = function () {\n\t Tone.Monophonic.prototype.dispose.call(this);\n\t this._writable([\n\t 'voice0',\n\t 'voice1',\n\t 'frequency',\n\t 'vibratoAmount',\n\t 'vibratoRate'\n\t ]);\n\t this.voice0.dispose();\n\t this.voice0 = null;\n\t this.voice1.dispose();\n\t this.voice1 = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this._vibratoGain.dispose();\n\t this._vibratoGain = null;\n\t this._vibrato = null;\n\t this.harmonicity.dispose();\n\t this.harmonicity = null;\n\t this.vibratoAmount.dispose();\n\t this.vibratoAmount = null;\n\t this.vibratoRate = null;\n\t return this;\n\t };\n\t return Tone.DuoSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class FMSynth is composed of two Tone.Synths where one Tone.Synth modulates\n\t\t * the frequency of a second Tone.Synth. A lot of spectral content\n\t\t * can be explored using the modulationIndex parameter. Read more about\n\t\t * frequency modulation synthesis on Sound On Sound: [Part 1](https://web.archive.org/web/20160403123704/http://www.soundonsound.com/sos/apr00/articles/synthsecrets.htm), [Part 2](https://web.archive.org/web/20160403115835/http://www.soundonsound.com/sos/may00/articles/synth.htm).\n\t\t * <img src=\"https://docs.google.com/drawings/d/1h0PUDZXPgi4Ikx6bVT6oncrYPLluFKy7lj53puxj-DM/pub?w=902&h=462\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Monophonic}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var fmSynth = new Tone.FMSynth().toMaster();\n\t\t * fmSynth.triggerAttackRelease(\"C5\", \"4n\");\n\t\t */\n\t Tone.FMSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.FMSynth.defaults);\n\t Tone.Monophonic.call(this, options);\n\t /**\n\t\t\t * The carrier voice.\n\t\t\t * @type {Tone.Synth}\n\t\t\t * @private\n\t\t\t */\n\t this._carrier = new Tone.Synth(options.carrier);\n\t this._carrier.volume.value = -10;\n\t /**\n\t\t\t * The carrier's oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.oscillator = this._carrier.oscillator;\n\t /**\n\t\t\t * The carrier's envelope\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.envelope = this._carrier.envelope.set(options.envelope);\n\t /**\n\t\t\t * The modulator voice.\n\t\t\t * @type {Tone.Synth}\n\t\t\t * @private\n\t\t\t */\n\t this._modulator = new Tone.Synth(options.modulator);\n\t this._modulator.volume.value = -10;\n\t /**\n\t\t\t * The modulator's oscillator which is applied\n\t\t\t * to the amplitude of the oscillator\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.modulation = this._modulator.oscillator.set(options.modulation);\n\t /**\n\t\t\t * The modulator's envelope\n\t\t\t * @type {Tone.Oscillator}\n\t\t\t */\n\t this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\t /**\n\t\t\t * The frequency control.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t /**\n\t\t\t * The detune in cents\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t /**\n\t\t\t * Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t * 1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t this.harmonicity.units = Tone.Type.Positive;\n\t /**\n\t\t\t * The modulation index which essentially the depth or amount of the modulation. It is the\n\t\t\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t\t * modulating signal (ma) -- as in ma/mf.\n\t\t\t *\t@type {Positive}\n\t\t\t *\t@signal\n\t\t\t */\n\t this.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\t this.modulationIndex.units = Tone.Type.Positive;\n\t /**\n\t\t\t * the node where the modulation happens\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t this._modulationNode = new Tone.Gain(0);\n\t //control the two voices frequency\n\t this.frequency.connect(this._carrier.frequency);\n\t this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t this.frequency.chain(this.modulationIndex, this._modulationNode);\n\t this.detune.fan(this._carrier.detune, this._modulator.detune);\n\t this._modulator.connect(this._modulationNode.gain);\n\t this._modulationNode.connect(this._carrier.frequency);\n\t this._carrier.connect(this.output);\n\t this._readOnly([\n\t 'frequency',\n\t 'harmonicity',\n\t 'modulationIndex',\n\t 'oscillator',\n\t 'envelope',\n\t 'modulation',\n\t 'modulationEnvelope',\n\t 'detune'\n\t ]);\n\t };\n\t Tone.extend(Tone.FMSynth, Tone.Monophonic);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.FMSynth.defaults = {\n\t 'harmonicity': 3,\n\t 'modulationIndex': 10,\n\t 'detune': 0,\n\t 'oscillator': { 'type': 'sine' },\n\t 'envelope': {\n\t 'attack': 0.01,\n\t 'decay': 0.01,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t },\n\t 'modulation': { 'type': 'square' },\n\t 'modulationEnvelope': {\n\t 'attack': 0.5,\n\t 'decay': 0,\n\t 'sustain': 1,\n\t 'release': 0.5\n\t }\n\t };\n\t /**\n\t\t * \ttrigger the attack portion of the note\n\t\t *\n\t\t * @param {Time} [time=now] the time the note will occur\n\t\t * @param {number} [velocity=1] the velocity of the note\n\t\t * @returns {Tone.FMSynth} this\n\t\t * @private\n\t\t */\n\t Tone.FMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t time = this.toSeconds(time);\n\t //the envelopes\n\t this._carrier._triggerEnvelopeAttack(time, velocity);\n\t this._modulator._triggerEnvelopeAttack(time);\n\t return this;\n\t };\n\t /**\n\t\t * trigger the release portion of the note\n\t\t *\n\t\t * @param {Time} [time=now] the time the note will release\n\t\t * @returns {Tone.FMSynth} this\n\t\t * @private\n\t\t */\n\t Tone.FMSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t time = this.toSeconds(time);\n\t this._carrier._triggerEnvelopeRelease(time);\n\t this._modulator._triggerEnvelopeRelease(time);\n\t return this;\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.FMSynth} this\n\t\t */\n\t Tone.FMSynth.prototype.dispose = function () {\n\t Tone.Monophonic.prototype.dispose.call(this);\n\t this._writable([\n\t 'frequency',\n\t 'harmonicity',\n\t 'modulationIndex',\n\t 'oscillator',\n\t 'envelope',\n\t 'modulation',\n\t 'modulationEnvelope',\n\t 'detune'\n\t ]);\n\t this._carrier.dispose();\n\t this._carrier = null;\n\t this._modulator.dispose();\n\t this._modulator = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this.detune.dispose();\n\t this.detune = null;\n\t this.modulationIndex.dispose();\n\t this.modulationIndex = null;\n\t this.harmonicity.dispose();\n\t this.harmonicity = null;\n\t this._modulationNode.dispose();\n\t this._modulationNode = null;\n\t this.oscillator = null;\n\t this.envelope = null;\n\t this.modulationEnvelope = null;\n\t this.modulation = null;\n\t return this;\n\t };\n\t return Tone.FMSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.MembraneSynth makes kick and tom sounds using a single oscillator\n\t\t * with an amplitude envelope and frequency ramp. A Tone.OmniOscillator\n\t\t * is routed through a Tone.AmplitudeEnvelope to the output. The drum\n\t\t * quality of the sound comes from the frequency envelope applied\n\t\t * during Tone.MembraneSynth.triggerAttack(note). The frequency envelope\n\t\t * starts at <code>note * .octaves</code> and ramps to <code>note</code>\n\t\t * over the duration of <code>.pitchDecay</code>.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Instrument}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var synth = new Tone.MembraneSynth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C2\", \"8n\");\n\t\t */\n\t Tone.MembraneSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.MembraneSynth.defaults);\n\t Tone.Instrument.call(this, options);\n\t /**\n\t\t\t * The oscillator.\n\t\t\t * @type {Tone.OmniOscillator}\n\t\t\t */\n\t this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t /**\n\t\t\t * The amplitude envelope.\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t /**\n\t\t\t * The number of octaves the pitch envelope ramps.\n\t\t\t * @type {Positive}\n\t\t\t */\n\t this.octaves = options.octaves;\n\t /**\n\t\t\t * The amount of time the frequency envelope takes.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.pitchDecay = options.pitchDecay;\n\t this.oscillator.chain(this.envelope, this.output);\n\t this._readOnly([\n\t 'oscillator',\n\t 'envelope'\n\t ]);\n\t };\n\t Tone.extend(Tone.MembraneSynth, Tone.Instrument);\n\t /**\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.MembraneSynth.defaults = {\n\t 'pitchDecay': 0.05,\n\t 'octaves': 10,\n\t 'oscillator': { 'type': 'sine' },\n\t 'envelope': {\n\t 'attack': 0.001,\n\t 'decay': 0.4,\n\t 'sustain': 0.01,\n\t 'release': 1.4,\n\t 'attackCurve': 'exponential'\n\t }\n\t };\n\t /**\n\t\t * Trigger the note at the given time with the given velocity.\n\t\t *\n\t\t * @param {Frequency} note the note\n\t\t * @param {Time} [time=now] the time, if not given is now\n\t\t * @param {number} [velocity=1] velocity defaults to 1\n\t\t * @returns {Tone.MembraneSynth} this\n\t\t * @example\n\t\t * kick.triggerAttack(60);\n\t\t */\n\t Tone.MembraneSynth.prototype.triggerAttack = function (note, time, velocity) {\n\t time = this.toSeconds(time);\n\t note = this.toFrequency(note);\n\t var maxNote = note * this.octaves;\n\t this.oscillator.frequency.setValueAtTime(maxNote, time);\n\t this.oscillator.frequency.exponentialRampToValueAtTime(note, time + this.toSeconds(this.pitchDecay));\n\t this.envelope.triggerAttack(time, velocity);\n\t this.oscillator.start(time);\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the release portion of the note.\n\t\t *\n\t\t * @param {Time} [time=now] the time the note will release\n\t\t * @returns {Tone.MembraneSynth} this\n\t\t */\n\t Tone.MembraneSynth.prototype.triggerRelease = function (time) {\n\t time = this.toSeconds(time);\n\t this.envelope.triggerRelease(time);\n\t this.oscillator.stop(time + this.envelope.release);\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.MembraneSynth} this\n\t\t */\n\t Tone.MembraneSynth.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t this._writable([\n\t 'oscillator',\n\t 'envelope'\n\t ]);\n\t this.oscillator.dispose();\n\t this.oscillator = null;\n\t this.envelope.dispose();\n\t this.envelope = null;\n\t return this;\n\t };\n\t return Tone.MembraneSynth;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * Inharmonic ratio of frequencies based on the Roland TR-808\n\t\t * Taken from https://ccrma.stanford.edu/papers/tr-808-cymbal-physically-informed-circuit-bendable-digital-model\n\t\t * @private\n\t\t * @static\n\t\t * @type {Array}\n\t\t */\n\t var inharmRatios = [\n\t 1,\n\t 1.483,\n\t 1.932,\n\t 2.546,\n\t 2.63,\n\t 3.897\n\t ];\n\t /**\n\t\t * @class A highly inharmonic and spectrally complex source with a highpass filter\n\t\t * and amplitude envelope which is good for making metalophone sounds. Based\n\t\t * on CymbalSynth by [@polyrhythmatic](https://github.com/polyrhythmatic).\n\t\t * Inspiration from [Sound on Sound](https://web.archive.org/web/20160610143924/https://www.soundonsound.com/sos/jul02/articles/synthsecrets0702.asp).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Instrument}\n\t\t * @param {Object} [options] The options availble for the synth\n\t\t * see defaults below\n\t\t */\n\t Tone.MetalSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.MetalSynth.defaults);\n\t Tone.Instrument.call(this, options);\n\t /**\n\t\t\t * The frequency of the cymbal\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t /**\n\t\t\t * The array of FMOscillators\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._oscillators = [];\n\t /**\n\t\t\t * The frequency multipliers\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._freqMultipliers = [];\n\t /**\n\t\t\t * The amplitude for the body\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t this._amplitue = new Tone.Gain(0).connect(this.output);\n\t /**\n\t\t\t * highpass the output\n\t\t\t * @type {Tone.Filter}\n\t\t\t * @private\n\t\t\t */\n\t this._highpass = new Tone.Filter({\n\t 'type': 'highpass',\n\t 'Q': -3.0102999566398125\n\t }).connect(this._amplitue);\n\t /**\n\t\t\t * The number of octaves the highpass\n\t\t\t * filter frequency ramps\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._octaves = options.octaves;\n\t /**\n\t\t\t * Scale the body envelope\n\t\t\t * for the bandpass\n\t\t\t * @type {Tone.Scale}\n\t\t\t * @private\n\t\t\t */\n\t this._filterFreqScaler = new Tone.Scale(options.resonance, 7000);\n\t /**\n\t\t\t * The envelope which is connected both to the\n\t\t\t * amplitude and highpass filter's cutoff frequency\n\t\t\t * @type {Tone.Envelope}\n\t\t\t */\n\t this.envelope = new Tone.Envelope({\n\t 'attack': options.envelope.attack,\n\t 'attackCurve': 'linear',\n\t 'decay': options.envelope.decay,\n\t 'sustain': 0,\n\t 'release': options.envelope.release\n\t }).chain(this._filterFreqScaler, this._highpass.frequency);\n\t this.envelope.connect(this._amplitue.gain);\n\t for (var i = 0; i < inharmRatios.length; i++) {\n\t var osc = new Tone.FMOscillator({\n\t 'type': 'square',\n\t 'modulationType': 'square',\n\t 'harmonicity': options.harmonicity,\n\t 'modulationIndex': options.modulationIndex\n\t });\n\t osc.connect(this._highpass);\n\t this._oscillators[i] = osc;\n\t var mult = new Tone.Multiply(inharmRatios[i]);\n\t this._freqMultipliers[i] = mult;\n\t this.frequency.chain(mult, osc.frequency);\n\t }\n\t //set the octaves\n\t this.octaves = options.octaves;\n\t };\n\t Tone.extend(Tone.MetalSynth, Tone.Instrument);\n\t /**\n\t\t * default values\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.MetalSynth.defaults = {\n\t 'frequency': 200,\n\t 'envelope': {\n\t 'attack': 0.001,\n\t 'decay': 1.4,\n\t 'release': 0.2\n\t },\n\t 'harmonicity': 5.1,\n\t 'modulationIndex': 32,\n\t 'resonance': 4000,\n\t 'octaves': 1.5\n\t };\n\t /**\n\t\t * Trigger the attack.\n\t\t * @param {Time} time When the attack should be triggered.\n\t\t * @param {NormalRange} [velocity=1] The velocity that the envelope should be triggered at.\n\t\t * @return {Tone.MetalSynth} this\n\t\t */\n\t Tone.MetalSynth.prototype.triggerAttack = function (time, vel) {\n\t time = this.toSeconds(time);\n\t vel = Tone.defaultArg(vel, 1);\n\t this.envelope.triggerAttack(time, vel);\n\t this._oscillators.forEach(function (osc) {\n\t osc.start(time);\n\t });\n\t //if the sustain is 0, stop the oscillator as well\n\t if (this.envelope.sustain === 0) {\n\t this._oscillators.forEach(function (osc) {\n\t osc.stop(time + this.envelope.attack + this.envelope.decay);\n\t }.bind(this));\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the release of the envelope.\n\t\t * @param {Time} time When the release should be triggered.\n\t\t * @return {Tone.MetalSynth} this\n\t\t */\n\t Tone.MetalSynth.prototype.triggerRelease = function (time) {\n\t time = this.toSeconds(time);\n\t this.envelope.triggerRelease(time);\n\t this._oscillators.forEach(function (osc) {\n\t osc.stop(time + this.envelope.release);\n\t }.bind(this));\n\t return this;\n\t };\n\t /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.MetalSynth.prototype.sync = function () {\n\t this._syncMethod('triggerAttack', 0);\n\t this._syncMethod('triggerRelease', 0);\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the attack and release of the envelope after the given\n\t\t * duration.\n\t\t * @param {Time} duration The duration before triggering the release\n\t\t * @param {Time} time When the attack should be triggered.\n\t\t * @param {NormalRange} [velocity=1] The velocity that the envelope should be triggered at.\n\t\t * @return {Tone.MetalSynth} this\n\t\t */\n\t Tone.MetalSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t duration = this.toSeconds(duration);\n\t this.triggerAttack(time, velocity);\n\t this.triggerRelease(time + duration);\n\t return this;\n\t };\n\t /**\n\t\t * The modulationIndex of the oscillators which make up the source.\n\t\t * see Tone.FMOscillator.modulationIndex\n\t\t * @memberOf Tone.MetalSynth#\n\t\t * @type {Positive}\n\t\t * @name modulationIndex\n\t\t */\n\t Object.defineProperty(Tone.MetalSynth.prototype, 'modulationIndex', {\n\t get: function () {\n\t return this._oscillators[0].modulationIndex.value;\n\t },\n\t set: function (val) {\n\t for (var i = 0; i < this._oscillators.length; i++) {\n\t this._oscillators[i].modulationIndex.value = val;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The harmonicity of the oscillators which make up the source.\n\t\t * see Tone.FMOscillator.harmonicity\n\t\t * @memberOf Tone.MetalSynth#\n\t\t * @type {Positive}\n\t\t * @name harmonicity\n\t\t */\n\t Object.defineProperty(Tone.MetalSynth.prototype, 'harmonicity', {\n\t get: function () {\n\t return this._oscillators[0].harmonicity.value;\n\t },\n\t set: function (val) {\n\t for (var i = 0; i < this._oscillators.length; i++) {\n\t this._oscillators[i].harmonicity.value = val;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The frequency of the highpass filter attached to the envelope\n\t\t * @memberOf Tone.MetalSynth#\n\t\t * @type {Frequency}\n\t\t * @name resonance\n\t\t */\n\t Object.defineProperty(Tone.MetalSynth.prototype, 'resonance', {\n\t get: function () {\n\t return this._filterFreqScaler.min;\n\t },\n\t set: function (val) {\n\t this._filterFreqScaler.min = val;\n\t this.octaves = this._octaves;\n\t }\n\t });\n\t /**\n\t\t * The number of octaves above the \"resonance\" frequency\n\t\t * that the filter ramps during the attack/decay envelope\n\t\t * @memberOf Tone.MetalSynth#\n\t\t * @type {Number}\n\t\t * @name octaves\n\t\t */\n\t Object.defineProperty(Tone.MetalSynth.prototype, 'octaves', {\n\t get: function () {\n\t return this._octaves;\n\t },\n\t set: function (octs) {\n\t this._octaves = octs;\n\t this._filterFreqScaler.max = this._filterFreqScaler.min * Math.pow(2, octs);\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @returns {Tone.MetalSynth} this\n\t\t */\n\t Tone.MetalSynth.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t for (var i = 0; i < this._oscillators.length; i++) {\n\t this._oscillators[i].dispose();\n\t this._freqMultipliers[i].dispose();\n\t }\n\t this._oscillators = null;\n\t this._freqMultipliers = null;\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t this._filterFreqScaler.dispose();\n\t this._filterFreqScaler = null;\n\t this._amplitue.dispose();\n\t this._amplitue = null;\n\t this.envelope.dispose();\n\t this.envelope = null;\n\t this._highpass.dispose();\n\t this._highpass = null;\n\t };\n\t return Tone.MetalSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.NoiseSynth is composed of a noise generator (Tone.Noise), one filter (Tone.Filter),\n\t\t * and two envelopes (Tone.Envelop). One envelope controls the amplitude\n\t\t * of the noise and the other is controls the cutoff frequency of the filter.\n\t\t * <img src=\"https://docs.google.com/drawings/d/1rqzuX9rBlhT50MRvD2TKml9bnZhcZmzXF1rf_o7vdnE/pub?w=918&h=242\">\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Instrument}\n\t\t * @param {Object} [options] the options available for the synth\n\t\t * see defaults below\n\t\t * @example\n\t\t * var noiseSynth = new Tone.NoiseSynth().toMaster();\n\t\t * noiseSynth.triggerAttackRelease(\"8n\");\n\t\t */\n\t Tone.NoiseSynth = function (options) {\n\t //get the defaults\n\t options = Tone.defaultArg(options, Tone.NoiseSynth.defaults);\n\t Tone.Instrument.call(this, options);\n\t /**\n\t\t\t * The noise source.\n\t\t\t * @type {Tone.Noise}\n\t\t\t * @example\n\t\t\t * noiseSynth.set(\"noise.type\", \"brown\");\n\t\t\t */\n\t this.noise = new Tone.Noise();\n\t /**\n\t\t\t * The amplitude envelope.\n\t\t\t * @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t //connect the noise to the output\n\t this.noise.chain(this.envelope, this.output);\n\t this._readOnly([\n\t 'noise',\n\t 'envelope'\n\t ]);\n\t };\n\t Tone.extend(Tone.NoiseSynth, Tone.Instrument);\n\t /**\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.NoiseSynth.defaults = {\n\t 'noise': { 'type': 'white' },\n\t 'envelope': {\n\t 'attack': 0.005,\n\t 'decay': 0.1,\n\t 'sustain': 0\n\t }\n\t };\n\t /**\n\t\t * Start the attack portion of the envelopes. Unlike other\n\t\t * instruments, Tone.NoiseSynth doesn't have a note.\n\t\t * @param {Time} [time=now] the time the attack should start\n\t\t * @param {number} [velocity=1] the velocity of the note (0-1)\n\t\t * @returns {Tone.NoiseSynth} this\n\t\t * @example\n\t\t * noiseSynth.triggerAttack();\n\t\t */\n\t Tone.NoiseSynth.prototype.triggerAttack = function (time, velocity) {\n\t //the envelopes\n\t this.envelope.triggerAttack(time, velocity);\n\t //start the noise\n\t this.noise.start(time);\n\t if (this.envelope.sustain === 0) {\n\t this.noise.stop(time = this.envelope.attack + this.envelope.decay);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Start the release portion of the envelopes.\n\t\t * @param {Time} [time=now] the time the release should start\n\t\t * @returns {Tone.NoiseSynth} this\n\t\t */\n\t Tone.NoiseSynth.prototype.triggerRelease = function (time) {\n\t this.envelope.triggerRelease(time);\n\t this.noise.stop(time + this.envelope.release);\n\t return this;\n\t };\n\t /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.NoiseSynth.prototype.sync = function () {\n\t this._syncMethod('triggerAttack', 0);\n\t this._syncMethod('triggerRelease', 0);\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the attack and then the release.\n\t\t * @param {Time} duration the duration of the note\n\t\t * @param {Time} [time=now] the time of the attack\n\t\t * @param {number} [velocity=1] the velocity\n\t\t * @returns {Tone.NoiseSynth} this\n\t\t */\n\t Tone.NoiseSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t duration = this.toSeconds(duration);\n\t this.triggerAttack(time, velocity);\n\t this.triggerRelease(time + duration);\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.NoiseSynth} this\n\t\t */\n\t Tone.NoiseSynth.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t this._writable([\n\t 'noise',\n\t 'envelope'\n\t ]);\n\t this.noise.dispose();\n\t this.noise = null;\n\t this.envelope.dispose();\n\t this.envelope = null;\n\t return this;\n\t };\n\t return Tone.NoiseSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Karplus-String string synthesis. Often out of tune.\n\t\t * Will change when the AudioWorkerNode is available across\n\t\t * browsers.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Instrument}\n\t\t * @param {Object} [options] see the defaults\n\t\t * @example\n\t\t * var plucky = new Tone.PluckSynth().toMaster();\n\t\t * plucky.triggerAttack(\"C4\");\n\t\t */\n\t Tone.PluckSynth = function (options) {\n\t options = Tone.defaultArg(options, Tone.PluckSynth.defaults);\n\t Tone.Instrument.call(this, options);\n\t /**\n\t\t\t * @type {Tone.Noise}\n\t\t\t * @private\n\t\t\t */\n\t this._noise = new Tone.Noise('pink');\n\t /**\n\t\t\t * The amount of noise at the attack.\n\t\t\t * Nominal range of [0.1, 20]\n\t\t\t * @type {number}\n\t\t\t */\n\t this.attackNoise = options.attackNoise;\n\t /**\n\t\t\t * the LFCF\n\t\t\t * @type {Tone.LowpassCombFilter}\n\t\t\t * @private\n\t\t\t */\n\t this._lfcf = new Tone.LowpassCombFilter({\n\t 'resonance': options.resonance,\n\t 'dampening': options.dampening\n\t });\n\t /**\n\t\t\t * The resonance control.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t this.resonance = this._lfcf.resonance;\n\t /**\n\t\t\t * The dampening control. i.e. the lowpass filter frequency of the comb filter\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.dampening = this._lfcf.dampening;\n\t //connections\n\t this._noise.connect(this._lfcf);\n\t this._lfcf.connect(this.output);\n\t this._readOnly([\n\t 'resonance',\n\t 'dampening'\n\t ]);\n\t };\n\t Tone.extend(Tone.PluckSynth, Tone.Instrument);\n\t /**\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.PluckSynth.defaults = {\n\t 'attackNoise': 1,\n\t 'dampening': 4000,\n\t 'resonance': 0.7\n\t };\n\t /**\n\t\t * Trigger the note.\n\t\t * @param {Frequency} note The note to trigger.\n\t\t * @param {Time} [time=now] When the note should be triggered.\n\t\t * @returns {Tone.PluckSynth} this\n\t\t */\n\t Tone.PluckSynth.prototype.triggerAttack = function (note, time) {\n\t note = this.toFrequency(note);\n\t time = this.toSeconds(time);\n\t var delayAmount = 1 / note;\n\t this._lfcf.delayTime.setValueAtTime(delayAmount, time);\n\t this._noise.start(time);\n\t this._noise.stop(time + delayAmount * this.attackNoise);\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.PluckSynth} this\n\t\t */\n\t Tone.PluckSynth.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t this._noise.dispose();\n\t this._lfcf.dispose();\n\t this._noise = null;\n\t this._lfcf = null;\n\t this._writable([\n\t 'resonance',\n\t 'dampening'\n\t ]);\n\t this.dampening = null;\n\t this.resonance = null;\n\t return this;\n\t };\n\t return Tone.PluckSynth;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.PolySynth handles voice creation and allocation for any\n\t\t * instruments passed in as the second paramter. PolySynth is\n\t\t * not a synthesizer by itself, it merely manages voices of\n\t\t * one of the other types of synths, allowing any of the\n\t\t * monophonic synthesizers to be polyphonic.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Instrument}\n\t\t * @param {number|Object} [polyphony=4] The number of voices to create\n\t\t * @param {function} [voice=Tone.Synth] The constructor of the voices\n\t\t * uses Tone.Synth by default.\n\t\t * @example\n\t\t * //a polysynth composed of 6 Voices of Synth\n\t\t * var synth = new Tone.PolySynth(6, Tone.Synth).toMaster();\n\t\t * //set the attributes using the set interface\n\t\t * synth.set(\"detune\", -1200);\n\t\t * //play a chord\n\t\t * synth.triggerAttackRelease([\"C4\", \"E4\", \"A4\"], \"4n\");\n\t\t */\n\t Tone.PolySynth = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'polyphony',\n\t 'voice'\n\t ], Tone.PolySynth);\n\t Tone.Instrument.call(this, options);\n\t options = Tone.defaultArg(options, Tone.Instrument.defaults);\n\t //max polyphony\n\t options.polyphony = Math.min(Tone.PolySynth.MAX_POLYPHONY, options.polyphony);\n\t /**\n\t\t\t * the array of voices\n\t\t\t * @type {Array}\n\t\t\t */\n\t this.voices = new Array(options.polyphony);\n\t /**\n\t\t\t * The queue of voices with data about last trigger\n\t\t\t * and the triggered note\n\t\t\t * @private\n\t\t\t * @type {Array}\n\t\t\t */\n\t this._triggers = new Array(options.polyphony);\n\t /**\n\t\t\t * The detune in cents\n\t\t\t * @type {Cents}\n\t\t\t * @signal\n\t\t\t */\n\t this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t this._readOnly('detune');\n\t //create the voices\n\t for (var i = 0; i < options.polyphony; i++) {\n\t var v = new options.voice(arguments[2], arguments[3]);\n\t if (!(v instanceof Tone.Monophonic)) {\n\t throw new Error('Synth constructor must be instance of Tone.Monophonic');\n\t }\n\t this.voices[i] = v;\n\t v.connect(this.output);\n\t if (v.hasOwnProperty('detune')) {\n\t this.detune.connect(v.detune);\n\t }\n\t this._triggers[i] = {\n\t release: -1,\n\t note: null,\n\t voice: v\n\t };\n\t }\n\t };\n\t Tone.extend(Tone.PolySynth, Tone.Instrument);\n\t /**\n\t\t * the defaults\n\t\t * @const\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t Tone.PolySynth.defaults = {\n\t 'polyphony': 4,\n\t 'volume': 0,\n\t 'detune': 0,\n\t 'voice': Tone.Synth\n\t };\n\t /**\n\t\t * Trigger the attack portion of the note\n\t\t * @param {Frequency|Array} notes The notes to play. Accepts a single\n\t\t * Frequency or an array of frequencies.\n\t\t * @param {Time} [time=now] The start time of the note.\n\t\t * @param {number} [velocity=1] The velocity of the note.\n\t\t * @returns {Tone.PolySynth} this\n\t\t * @example\n\t\t * //trigger a chord immediately with a velocity of 0.2\n\t\t * poly.triggerAttack([\"Ab3\", \"C4\", \"F5\"], undefined, 0.2);\n\t\t */\n\t Tone.PolySynth.prototype.triggerAttack = function (notes, time, velocity) {\n\t if (!Array.isArray(notes)) {\n\t notes = [notes];\n\t }\n\t time = this.toSeconds(time);\n\t for (var i = 0; i < notes.length; i++) {\n\t var val = notes[i];\n\t //trigger the oldest voice\n\t var oldest = this._triggers[0];\n\t for (var j = 1; j < this._triggers.length; j++) {\n\t if (this._triggers[j].release < oldest.release) {\n\t oldest = this._triggers[j];\n\t }\n\t }\n\t oldest.release = Infinity;\n\t oldest.note = JSON.stringify(val);\n\t oldest.voice.triggerAttack(val, time, velocity);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the attack and release after the specified duration\n\t\t *\n\t\t * @param {Frequency|Array} notes The notes to play. Accepts a single\n\t\t * Frequency or an array of frequencies.\n\t\t * @param {Time} duration the duration of the note\n\t\t * @param {Time} [time=now] if no time is given, defaults to now\n\t\t * @param {number} [velocity=1] the velocity of the attack (0-1)\n\t\t * @returns {Tone.PolySynth} this\n\t\t * @example\n\t\t * //trigger a chord for a duration of a half note\n\t\t * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], \"2n\");\n\t\t * @example\n\t\t * //can pass in an array of durations as well\n\t\t * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], [\"2n\", \"4n\", \"4n\"]);\n\t\t */\n\t Tone.PolySynth.prototype.triggerAttackRelease = function (notes, duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t this.triggerAttack(notes, time, velocity);\n\t if (Tone.isArray(duration) && Tone.isArray(notes)) {\n\t for (var i = 0; i < notes.length; i++) {\n\t var d = duration[Math.min(i, duration.length - 1)];\n\t this.triggerRelease(notes[i], time + this.toSeconds(d));\n\t }\n\t } else {\n\t this.triggerRelease(notes, time + this.toSeconds(duration));\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Trigger the release of the note. Unlike monophonic instruments,\n\t\t * a note (or array of notes) needs to be passed in as the first argument.\n\t\t * @param {Frequency|Array} notes The notes to play. Accepts a single\n\t\t * Frequency or an array of frequencies.\n\t\t * @param {Time} [time=now] When the release will be triggered.\n\t\t * @returns {Tone.PolySynth} this\n\t\t * @example\n\t\t * poly.triggerRelease([\"Ab3\", \"C4\", \"F5\"], \"+2n\");\n\t\t */\n\t Tone.PolySynth.prototype.triggerRelease = function (notes, time) {\n\t if (!Array.isArray(notes)) {\n\t notes = [notes];\n\t }\n\t time = this.toSeconds(time);\n\t for (var i = 0; i < notes.length; i++) {\n\t //get the voice\n\t var stringified = JSON.stringify(notes[i]);\n\t for (var v = 0; v < this._triggers.length; v++) {\n\t var desc = this._triggers[v];\n\t if (desc.note === stringified && desc.release > time) {\n\t desc.voice.triggerRelease(time);\n\t desc.release = time;\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.PolySynth.prototype.sync = function () {\n\t this._syncMethod('triggerAttack', 1);\n\t this._syncMethod('triggerRelease', 1);\n\t return this;\n\t };\n\t /**\n\t\t * Set a member/attribute of the voices.\n\t\t * @param {Object|string} params\n\t\t * @param {number=} value\n\t\t * @param {Time=} rampTime\n\t\t * @returns {Tone.PolySynth} this\n\t\t * @example\n\t\t * poly.set({\n\t\t * \t\"filter\" : {\n\t\t * \t\t\"type\" : \"highpass\"\n\t\t * \t},\n\t\t * \t\"envelope\" : {\n\t\t * \t\t\"attack\" : 0.25\n\t\t * \t}\n\t\t * });\n\t\t */\n\t Tone.PolySynth.prototype.set = function (params, value, rampTime) {\n\t for (var i = 0; i < this.voices.length; i++) {\n\t this.voices[i].set(params, value, rampTime);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Get the synth's attributes. Given no arguments get\n\t\t * will return all available object properties and their corresponding\n\t\t * values. Pass in a single attribute to retrieve or an array\n\t\t * of attributes. The attribute strings can also include a \".\"\n\t\t * to access deeper properties.\n\t\t * @param {Array=} params the parameters to get, otherwise will return\n\t\t * \t\t\t\t\t all available.\n\t\t */\n\t Tone.PolySynth.prototype.get = function (params) {\n\t return this.voices[0].get(params);\n\t };\n\t /**\n\t\t * Trigger the release portion of all the currently active voices.\n\t\t * @param {Time} [time=now] When the notes should be released.\n\t\t * @return {Tone.PolySynth} this\n\t\t */\n\t Tone.PolySynth.prototype.releaseAll = function (time) {\n\t time = this.toSeconds(time);\n\t for (var i = 0; i < this._triggers.length; i++) {\n\t var desc = this._triggers[i];\n\t if (desc.release > time) {\n\t desc.release = time;\n\t desc.voice.triggerRelease(time);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Clean up.\n\t\t * @returns {Tone.PolySynth} this\n\t\t */\n\t Tone.PolySynth.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t for (var i = 0; i < this.voices.length; i++) {\n\t this.voices[i].dispose();\n\t this.voices[i] = null;\n\t }\n\t this._writable('detune');\n\t this.detune.dispose();\n\t this.detune = null;\n\t this.voices = null;\n\t this._triggers = null;\n\t return this;\n\t };\n\t /**\n\t\t * The maximum number of notes that can be allocated\n\t\t * to a polysynth.\n\t\t * @type {Number}\n\t\t * @static\n\t\t */\n\t Tone.PolySynth.MAX_POLYPHONY = 20;\n\t return Tone.PolySynth;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Automatically interpolates between a set of pitched samples. Pass in an object which maps the note's pitch or midi value to the url, then you can trigger the attack and release of that note like other instruments. By automatically repitching the samples, it is possible to play pitches which were not explicitly included which can save loading time.\n\t\t * For sample or buffer playback where repitching is not necessary, use [Tone.Player](https://tonejs.github.io/docs/Player).\n\t\t * @param {Object} samples An object of samples mapping either Midi\n\t\t * Note Numbers or Scientific Pitch Notation\n\t\t * to the url of that sample.\n\t\t * @param {Function=} onload The callback to invoke when all of the samples are loaded.\n\t\t * @param {String=} baseUrl The root URL of all of the samples, which is prepended to all the URLs.\n\t\t * @example\n\t\t * var sampler = new Tone.Sampler({\n\t\t * \t\"C3\" : \"path/to/C3.mp3\",\n\t\t * \t\"D#3\" : \"path/to/Dsharp3.mp3\",\n\t\t * \t\"F#3\" : \"path/to/Fsharp3.mp3\",\n\t\t * \t\"A3\" : \"path/to/A3.mp3\",\n\t\t * }, function(){\n\t\t * \t//sampler will repitch the closest sample\n\t\t * \tsampler.triggerAttack(\"D3\")\n\t\t * })\n\t\t * @extends {Tone.Instrument}\n\t\t */\n\t Tone.Sampler = function (urls) {\n\t // shift arguments over one. Those are the remainder of the options\n\t var args = Array.prototype.slice.call(arguments);\n\t args.shift();\n\t var options = Tone.defaults(args, [\n\t 'onload',\n\t 'baseUrl'\n\t ], Tone.Sampler);\n\t Tone.Instrument.call(this, options);\n\t var urlMap = {};\n\t for (var note in urls) {\n\t if (Tone.isNote(note)) {\n\t //convert the note name to MIDI\n\t var mid = Tone.Frequency(note).toMidi();\n\t urlMap[mid] = urls[note];\n\t } else if (!isNaN(parseFloat(note))) {\n\t //otherwise if it's numbers assume it's midi\n\t urlMap[note] = urls[note];\n\t } else {\n\t throw new Error('Tone.Sampler: url keys must be the note\\'s pitch');\n\t }\n\t }\n\t /**\n\t\t\t * The stored and loaded buffers\n\t\t\t * @type {Tone.Buffers}\n\t\t\t * @private\n\t\t\t */\n\t this._buffers = new Tone.Buffers(urlMap, options.onload, options.baseUrl);\n\t /**\n\t\t\t * The object of all currently playing BufferSources\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t this._activeSources = {};\n\t /**\n\t\t\t * The envelope applied to the beginning of the sample.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.attack = options.attack;\n\t /**\n\t\t\t * The envelope applied to the end of the envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.release = options.release;\n\t };\n\t Tone.extend(Tone.Sampler, Tone.Instrument);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Sampler.defaults = {\n\t attack: 0,\n\t release: 0.1,\n\t onload: Tone.noOp,\n\t baseUrl: ''\n\t };\n\t /**\n\t\t * Returns the difference in steps between the given midi note at the closets sample.\n\t\t * @param {Midi} midi\n\t\t * @return {Interval}\n\t\t * @private\n\t\t */\n\t Tone.Sampler.prototype._findClosest = function (midi) {\n\t var MAX_INTERVAL = 24;\n\t var interval = 0;\n\t while (interval < MAX_INTERVAL) {\n\t // check above and below\n\t if (this._buffers.has(midi + interval)) {\n\t return -interval;\n\t } else if (this._buffers.has(midi - interval)) {\n\t return interval;\n\t }\n\t interval++;\n\t }\n\t return null;\n\t };\n\t /**\n\t\t * @param {Frequency} note The note to play\n\t\t * @param {Time=} time When to play the note\n\t\t * @param {NormalRange=} velocity The velocity to play the sample back.\n\t\t * @return {Tone.Sampler} this\n\t\t */\n\t Tone.Sampler.prototype.triggerAttack = function (note, time, velocity) {\n\t var midi = Tone.Frequency(note).toMidi();\n\t // find the closest note pitch\n\t var difference = this._findClosest(midi);\n\t if (difference !== null) {\n\t var closestNote = midi - difference;\n\t var buffer = this._buffers.get(closestNote);\n\t // play that note\n\t var source = new Tone.BufferSource({\n\t 'buffer': buffer,\n\t 'playbackRate': Tone.intervalToFrequencyRatio(difference),\n\t 'fadeIn': this.attack,\n\t 'fadeOut': this.release,\n\t 'curve': 'exponential'\n\t }).connect(this.output);\n\t source.start(time, 0, buffer.duration, velocity);\n\t // add it to the active sources\n\t if (!Tone.isArray(this._activeSources[midi])) {\n\t this._activeSources[midi] = [];\n\t }\n\t this._activeSources[midi].push({\n\t note: midi,\n\t source: source\n\t });\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * @param {Frequency} note The note to release.\n\t\t * @param {Time=} time \tWhen to release the note.\n\t\t * @return {Tone.Sampler}\tthis\n\t\t */\n\t Tone.Sampler.prototype.triggerRelease = function (note, time) {\n\t var midi = Tone.Frequency(note).toMidi();\n\t // find the note\n\t if (this._activeSources[midi] && this._activeSources[midi].length) {\n\t var source = this._activeSources[midi].shift().source;\n\t time = this.toSeconds(time);\n\t source.stop(time + this.release, this.release);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Release all currently active notes.\n\t\t * @param {Time=} time \tWhen to release the notes.\n\t\t * @return {Tone.Sampler}\tthis\n\t\t */\n\t Tone.Sampler.prototype.releaseAll = function (time) {\n\t time = this.toSeconds(time);\n\t for (var note in this._activeSources) {\n\t var sources = this._activeSources[note];\n\t while (sources.length) {\n\t var source = sources.shift().source;\n\t source.stop(time + this.release, this.release);\n\t }\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t Tone.Sampler.prototype.sync = function () {\n\t this._syncMethod('triggerAttack', 1);\n\t this._syncMethod('triggerRelease', 1);\n\t return this;\n\t };\n\t /**\n\t\t * Invoke the attack phase, then after the duration, invoke the release.\n\t\t * @param {Frequency} note The note to play\n\t\t * @param {Time} duration The time the note should be held\n\t\t * @param {Time=} time When to start the attack\n\t\t * @param {NormalRange} [velocity=1] The velocity of the attack\n\t\t * @return {Tone.Sampler} this\n\t\t */\n\t Tone.Sampler.prototype.triggerAttackRelease = function (note, duration, time, velocity) {\n\t time = this.toSeconds(time);\n\t duration = this.toSeconds(duration);\n\t this.triggerAttack(note, time, velocity);\n\t this.triggerRelease(note, time + duration);\n\t return this;\n\t };\n\t /**\n\t\t * Add a note to the sampler.\n\t\t * @param {Note|Midi} note The buffer's pitch.\n\t\t * @param {String|Tone.Buffer|Audiobuffer} url Either the url of the bufer,\n\t\t * or a buffer which will be added\n\t\t * with the given name.\n\t\t * @param {Function=} callback The callback to invoke\n\t\t * when the url is loaded.\n\t\t */\n\t Tone.Sampler.prototype.add = function (note, url, callback) {\n\t if (Tone.isNote(note)) {\n\t //convert the note name to MIDI\n\t var mid = Tone.Frequency(note).toMidi();\n\t this._buffers.add(mid, url, callback);\n\t } else if (!isNaN(parseFloat(note))) {\n\t //otherwise if it's numbers assume it's midi\n\t this._buffers.add(note, url, callback);\n\t } else {\n\t throw new Error('Tone.Sampler: note must be the note\\'s pitch. Instead got ' + note);\n\t }\n\t };\n\t /**\n\t\t * If the buffers are loaded or not\n\t\t * @memberOf Tone.Sampler#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Sampler.prototype, 'loaded', {\n\t get: function () {\n\t return this._buffers.loaded;\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.Sampler} this\n\t\t */\n\t Tone.Sampler.prototype.dispose = function () {\n\t Tone.Instrument.prototype.dispose.call(this);\n\t this._buffers.dispose();\n\t this._buffers = null;\n\t for (var midi in this._activeSources) {\n\t this._activeSources[midi].forEach(function (event) {\n\t event.source.dispose();\n\t });\n\t }\n\t this._activeSources = null;\n\t return this;\n\t };\n\t return Tone.Sampler;\n\t});\n\tModule(function (Tone) {\n\t if (Tone.supported) {\n\t if (!OscillatorNode.prototype.setPeriodicWave) {\n\t OscillatorNode.prototype.setPeriodicWave = OscillatorNode.prototype.setWaveTable;\n\t }\n\t if (!AudioContext.prototype.createPeriodicWave) {\n\t AudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable;\n\t }\n\t }\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Maps a NormalRange [0, 1] to an AudioRange [-1, 1]. \n\t\t * See also Tone.AudioToGain. \n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @example\n\t\t * var g2a = new Tone.GainToAudio();\n\t\t */\n\t Tone.GainToAudio = function () {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * @type {WaveShaperNode}\n\t\t\t * @private\n\t\t\t */\n\t this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {\n\t return Math.abs(x) * 2 - 1;\n\t });\n\t };\n\t Tone.extend(Tone.GainToAudio, Tone.SignalBase);\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.GainToAudio} this\n\t\t */\n\t Tone.GainToAudio.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._norm.dispose();\n\t this._norm = null;\n\t return this;\n\t };\n\t return Tone.GainToAudio;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Normalize takes an input min and max and maps it linearly to NormalRange [0,1]\n\t\t *\n\t\t * @extends {Tone.SignalBase}\n\t\t * @constructor\n\t\t * @param {number} inputMin the min input value\n\t\t * @param {number} inputMax the max input value\n\t\t * @example\n\t\t * var norm = new Tone.Normalize(2, 4);\n\t\t * var sig = new Tone.Signal(3).connect(norm);\n\t\t * //output of norm is 0.5. \n\t\t */\n\t Tone.Normalize = function (inputMin, inputMax) {\n\t Tone.SignalBase.call(this);\n\t /**\n\t\t\t * the min input value\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._inputMin = Tone.defaultArg(inputMin, 0);\n\t /**\n\t\t\t * the max input value\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t this._inputMax = Tone.defaultArg(inputMax, 1);\n\t /**\n\t\t\t * subtract the min from the input\n\t\t\t * @type {Tone.Add}\n\t\t\t * @private\n\t\t\t */\n\t this._sub = this.input = new Tone.Add(0);\n\t /**\n\t\t\t * divide by the difference between the input and output\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t this._div = this.output = new Tone.Multiply(1);\n\t this._sub.connect(this._div);\n\t this._setRange();\n\t };\n\t Tone.extend(Tone.Normalize, Tone.SignalBase);\n\t /**\n\t\t * The minimum value the input signal will reach.\n\t\t * @memberOf Tone.Normalize#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t Object.defineProperty(Tone.Normalize.prototype, 'min', {\n\t get: function () {\n\t return this._inputMin;\n\t },\n\t set: function (min) {\n\t this._inputMin = min;\n\t this._setRange();\n\t }\n\t });\n\t /**\n\t\t * The maximum value the input signal will reach.\n\t\t * @memberOf Tone.Normalize#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t Object.defineProperty(Tone.Normalize.prototype, 'max', {\n\t get: function () {\n\t return this._inputMax;\n\t },\n\t set: function (max) {\n\t this._inputMax = max;\n\t this._setRange();\n\t }\n\t });\n\t /**\n\t\t * set the values\n\t\t * @private\n\t\t */\n\t Tone.Normalize.prototype._setRange = function () {\n\t this._sub.value = -this._inputMin;\n\t this._div.value = 1 / (this._inputMax - this._inputMin);\n\t };\n\t /**\n\t\t * clean up\n\t\t * @returns {Tone.Normalize} this\n\t\t */\n\t Tone.Normalize.prototype.dispose = function () {\n\t Tone.SignalBase.prototype.dispose.call(this);\n\t this._sub.dispose();\n\t this._sub = null;\n\t this._div.dispose();\n\t this._div = null;\n\t return this;\n\t };\n\t return Tone.Normalize;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.TransportTimelineSignal extends Tone.Signal, but adds the ability to synchronize the signal to the signal to the Tone.Transport\n\t\t * @extends {Tone.Signal}\n\t\t */\n\t Tone.TransportTimelineSignal = function () {\n\t Tone.Signal.apply(this, arguments);\n\t /**\n\t\t\t * The real signal output\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t this.output = this._outputSig = new Tone.Signal(this._initialValue);\n\t /**\n\t\t\t * Keep track of the last value. (small optimization)\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._lastVal = this.value;\n\t /**\n\t\t\t * The event id of the tick update loop\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._synced = Tone.Transport.scheduleRepeat(this._onTick.bind(this), '1i');\n\t /**\n\t\t\t * A bound version of the anchor value methods\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t this._bindAnchorValue = this._anchorValue.bind(this);\n\t Tone.Transport.on('start stop pause', this._bindAnchorValue);\n\t this._events.memory = Infinity;\n\t };\n\t Tone.extend(Tone.TransportTimelineSignal, Tone.Signal);\n\t /**\n\t\t * If scheduling past events should create a warning notification\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t Tone.TransportTimelineSignal.prototype._ignorePast = true;\n\t /**\n\t\t * Callback which is invoked every tick.\n\t\t * @private\n\t\t * @param {Number} time\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype._onTick = function (time) {\n\t var val = this.getValueAtTime(Tone.Transport.seconds);\n\t if (this._lastVal !== val) {\n\t this._lastVal = val;\n\t //approximate ramp curves with linear ramps\n\t this._outputSig.linearRampToValueAtTime(val, time);\n\t }\n\t };\n\t /**\n\t\t * Anchor the value at the start and stop of the Transport\n\t\t * @param {Number} time The time of the event\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t * @private\n\t\t */\n\t Tone.TransportTimelineSignal.prototype._anchorValue = function (time) {\n\t var val = this.getValueAtTime(Tone.Transport.seconds);\n\t this._lastVal = val;\n\t this._outputSig.cancelScheduledValues(time);\n\t this._outputSig.setValueAtTime(val, time);\n\t return this;\n\t };\n\t /**\n\t\t * Get the scheduled value at the given time. This will\n\t\t * return the unconverted (raw) value.\n\t\t * @param {TransportTime} time The time in seconds.\n\t\t * @return {Number} The scheduled value at the given time.\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.getValueAtTime = function (time) {\n\t time = Tone.TransportTime(time);\n\t return Tone.Signal.prototype.getValueAtTime.call(this, time);\n\t };\n\t /**\n\t\t * Set the output of the signal at the given time\n\t\t * @param {Number} value The value to change to at the given time\n\t\t * @param {TransportTime} time The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.setValueAtTime = function (value, time) {\n\t time = Tone.TransportTime(time);\n\t Tone.Signal.prototype.setValueAtTime.call(this, value, time);\n\t return this;\n\t };\n\t /**\n\t\t * Linear ramp to the given value from the previous scheduled point to the given value\n\t\t * @param {Number} value The value to change to at the given time\n\t\t * @param {TransportTime} time The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.linearRampToValueAtTime = function (value, time) {\n\t time = Tone.TransportTime(time);\n\t Tone.Signal.prototype.linearRampToValueAtTime.call(this, value, time);\n\t return this;\n\t };\n\t /**\n\t\t * Exponential ramp to the given value from the previous scheduled point to the given value\n\t\t * @param {Number} value The value to change to at the given time\n\t\t * @param {TransportTime} time The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.exponentialRampToValueAtTime = function (value, time) {\n\t time = Tone.TransportTime(time);\n\t Tone.Signal.prototype.exponentialRampToValueAtTime.call(this, value, time);\n\t return this;\n\t };\n\t /**\n\t\t * Start exponentially approaching the target value at the given time with\n\t\t * a rate having the given time constant.\n\t\t * @param {number} value\n\t\t * @param {TransportTime} startTime\n\t\t * @param {number} timeConstant\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.setTargetAtTime = function (value, startTime, timeConstant) {\n\t startTime = Tone.TransportTime(startTime);\n\t Tone.Signal.prototype.setTargetAtTime.call(this, value, startTime, timeConstant);\n\t return this;\n\t };\n\t /**\n\t\t * Cancels all scheduled parameter changes with times greater than or\n\t\t * equal to startTime.\n\t\t * @param {TransportTime} startTime\n\t\t * @returns {Tone.Param} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.cancelScheduledValues = function (startTime) {\n\t startTime = Tone.TransportTime(startTime);\n\t Tone.Signal.prototype.cancelScheduledValues.call(this, startTime);\n\t return this;\n\t };\n\t /**\n\t\t * Set an array of arbitrary values starting at the given time for the given duration.\n\t\t * @param {Float32Array} values\n\t\t * @param {Time} startTime\n\t\t * @param {Time} duration\n\t\t * @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n\t\t * @returns {Tone.Signal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {\n\t startTime = Tone.TransportTime(startTime);\n\t duration = Tone.TransportTime(duration);\n\t Tone.Signal.prototype.setValueCurveAtTime.call(this, values, startTime, duration, scaling);\n\t return this;\n\t };\n\t /**\n\t\t * This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n\t\t * it holds the automated value at time until the next automated event.\n\t\t * @param {Time} time\n\t\t * @returns {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.cancelAndHoldAtTime = function (time) {\n\t return Tone.Signal.prototype.cancelAndHoldAtTime.call(this, Tone.TransportTime(time));\n\t };\n\t /**\n\t\t * Dispose and disconnect\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t Tone.TransportTimelineSignal.prototype.dispose = function () {\n\t Tone.Transport.clear(this._synced);\n\t Tone.Transport.off('start stop pause', this._syncedCallback);\n\t this._events.cancel(0);\n\t Tone.Signal.prototype.dispose.call(this);\n\t this._outputSig.dispose();\n\t this._outputSig = null;\n\t };\n\t return Tone.TransportTimelineSignal;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.GrainPlayer implements [granular synthesis](https://en.wikipedia.org/wiki/Granular_synthesis).\n\t\t * Granular Synthesis enables you to adjust pitch and playback rate independently. The grainSize is the\n\t\t * amount of time each small chunk of audio is played for and the overlap is the\n\t\t * amount of crossfading transition time between successive grains.\n\t\t * @extends {Tone.Source}\n\t\t * @param {String|Tone.Buffer} url\tThe url to load, or the Tone.Buffer to play.\n\t\t * @param {Function=} callback The callback to invoke after the url is loaded.\n\t\t */\n\t Tone.GrainPlayer = function () {\n\t var options = Tone.defaults(arguments, [\n\t 'url',\n\t 'onload'\n\t ], Tone.GrainPlayer);\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * The audio buffer belonging to the player.\n\t\t\t * @type {Tone.Buffer}\n\t\t\t */\n\t this.buffer = new Tone.Buffer(options.url, options.onload);\n\t /**\n\t\t\t * Create a repeating tick to schedule\n\t\t\t * the grains.\n\t\t\t * @type {Tone.Clock}\n\t\t\t * @private\n\t\t\t */\n\t this._clock = new Tone.Clock(this._tick.bind(this), options.grainSize);\n\t /**\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._loopStart = 0;\n\t /**\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._loopEnd = 0;\n\t /**\n\t\t\t * All of the currently playing BufferSources\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t this._activeSources = [];\n\t /**\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._playbackRate = options.playbackRate;\n\t /**\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._grainSize = options.grainSize;\n\t /**\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t this._overlap = options.overlap;\n\t /**\n\t\t\t * Adjust the pitch independently of the playbackRate.\n\t\t\t * @type {Cents}\n\t\t\t */\n\t this.detune = options.detune;\n\t //setup\n\t this.overlap = options.overlap;\n\t this.loop = options.loop;\n\t this.playbackRate = options.playbackRate;\n\t this.grainSize = options.grainSize;\n\t this.loopStart = options.loopStart;\n\t this.loopEnd = options.loopEnd;\n\t this.reverse = options.reverse;\n\t this._clock.on('stop', this._onstop.bind(this));\n\t };\n\t Tone.extend(Tone.GrainPlayer, Tone.Source);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.GrainPlayer.defaults = {\n\t 'onload': Tone.noOp,\n\t 'overlap': 0.1,\n\t 'grainSize': 0.2,\n\t 'playbackRate': 1,\n\t 'detune': 0,\n\t 'loop': false,\n\t 'loopStart': 0,\n\t 'loopEnd': 0,\n\t 'reverse': false\n\t };\n\t /**\n\t\t * Play the buffer at the given startTime. Optionally add an offset\n\t\t * and/or duration which will play the buffer from a position\n\t\t * within the buffer for the given duration.\n\t\t *\n\t\t * @param {Time} [startTime=now] When the player should start.\n\t\t * @param {Time} [offset=0] The offset from the beginning of the sample\n\t\t * to start at.\n\t\t * @param {Time=} duration How long the sample should play. If no duration\n\t\t * is given, it will default to the full length\n\t\t * of the sample (minus any offset)\n\t\t * @returns {Tone.GrainPlayer} this\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @method start\n\t\t * @name start\n\t\t */\n\t /**\n\t\t * Internal start method\n\t\t * @param {Time} time\n\t\t * @param {Time} offset\n\t\t * @private\n\t\t */\n\t Tone.GrainPlayer.prototype._start = function (time, offset, duration) {\n\t offset = Tone.defaultArg(offset, 0);\n\t offset = this.toSeconds(offset);\n\t time = this.toSeconds(time);\n\t this._offset = offset;\n\t this._clock.start(time);\n\t if (duration) {\n\t this.stop(time + this.toSeconds(duration));\n\t }\n\t };\n\t /**\n\t\t * Internal start method\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.GrainPlayer.prototype._stop = function (time) {\n\t this._clock.stop(time);\n\t };\n\t /**\n\t\t * Invoked when the clock is stopped\n\t\t * @param {Number} time\n\t\t * @private\n\t\t */\n\t Tone.GrainPlayer.prototype._onstop = function (time) {\n\t //stop the players\n\t this._activeSources.forEach(function (source) {\n\t source.stop(time, 0);\n\t });\n\t };\n\t /**\n\t\t * Invoked on each clock tick. scheduled a new\n\t\t * grain at this time.\n\t\t * @param {Time} time\n\t\t * @private\n\t\t */\n\t Tone.GrainPlayer.prototype._tick = function (time) {\n\t var fadeIn = this._offset < this._overlap ? 0 : this._overlap;\n\t var source = new Tone.BufferSource({\n\t 'buffer': this.buffer,\n\t 'fadeIn': fadeIn,\n\t 'fadeOut': this._overlap,\n\t 'loop': this.loop,\n\t 'loopStart': this._loopStart,\n\t 'loopEnd': this._loopEnd,\n\t 'playbackRate': Tone.intervalToFrequencyRatio(this.detune / 100)\n\t }).connect(this.output);\n\t source.start(time, this._offset);\n\t this._offset += this.grainSize;\n\t source.stop(time + this.grainSize);\n\t //add it to the active sources\n\t this._activeSources.push(source);\n\t //remove it when it's done\n\t source.onended = function () {\n\t var index = this._activeSources.indexOf(source);\n\t if (index !== -1) {\n\t this._activeSources.splice(index, 1);\n\t }\n\t }.bind(this);\n\t };\n\t /**\n\t\t * Jump to a specific time and play it.\n\t\t * @param {Time} offset The offset to jump to.\n\t\t * @param {Time=} time When to make the jump.\n\t\t * @return {Tone.GrainPlayer} this\n\t\t */\n\t Tone.GrainPlayer.prototype.seek = function (offset, time) {\n\t this._offset = this.toSeconds(offset);\n\t this._tick(this.toSeconds(time));\n\t return this;\n\t };\n\t /**\n\t\t * The playback rate of the sample\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Positive}\n\t\t * @name playbackRate\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._playbackRate;\n\t },\n\t set: function (rate) {\n\t this._playbackRate = rate;\n\t this.grainSize = this._grainSize;\n\t }\n\t });\n\t /**\n\t\t * The loop start time.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'loopStart', {\n\t get: function () {\n\t return this._loopStart;\n\t },\n\t set: function (time) {\n\t this._loopStart = this.toSeconds(time);\n\t }\n\t });\n\t /**\n\t\t * The loop end time.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'loopEnd', {\n\t get: function () {\n\t return this._loopEnd;\n\t },\n\t set: function (time) {\n\t this._loopEnd = this.toSeconds(time);\n\t }\n\t });\n\t /**\n\t\t * The direction the buffer should play in\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {boolean}\n\t\t * @name reverse\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'reverse', {\n\t get: function () {\n\t return this.buffer.reverse;\n\t },\n\t set: function (rev) {\n\t this.buffer.reverse = rev;\n\t }\n\t });\n\t /**\n\t\t * The size of each chunk of audio that the\n\t\t * buffer is chopped into and played back at.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name grainSize\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'grainSize', {\n\t get: function () {\n\t return this._grainSize;\n\t },\n\t set: function (size) {\n\t this._grainSize = this.toSeconds(size);\n\t this._clock.frequency.value = this._playbackRate / this._grainSize;\n\t }\n\t });\n\t /**\n\t\t * This is the duration of the cross-fade between\n\t\t * sucessive grains.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name overlap\n\t\t */\n\t Object.defineProperty(Tone.GrainPlayer.prototype, 'overlap', {\n\t get: function () {\n\t return this._overlap;\n\t },\n\t set: function (time) {\n\t this._overlap = this.toSeconds(time);\n\t }\n\t });\n\t /**\n\t\t * Clean up\n\t\t * @return {Tone.GrainPlayer} this\n\t\t */\n\t Tone.GrainPlayer.prototype.dispose = function () {\n\t Tone.Source.prototype.dispose.call(this);\n\t this.buffer.dispose();\n\t this.buffer = null;\n\t this._clock.dispose();\n\t this._clock = null;\n\t this._activeSources.forEach(function (source) {\n\t source.dispose();\n\t });\n\t this._activeSources = null;\n\t return this;\n\t };\n\t return Tone.GrainPlayer;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Player is an audio file player with start, loop, and stop functions.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.Source}\n\t\t * @param {string|AudioBuffer} url Either the AudioBuffer or the url from\n\t\t * which to load the AudioBuffer\n\t\t * @param {function=} onload The function to invoke when the buffer is loaded.\n\t\t * Recommended to use Tone.Buffer.on('load') instead.\n\t\t * @example\n\t\t * var player = new Tone.Player(\"./path/to/sample.mp3\").toMaster();\n\t\t * //play as soon as the buffer is loaded\n\t\t * player.autostart = true;\n\t\t */\n\t Tone.Player = function (url) {\n\t var options;\n\t if (url instanceof Tone.Buffer && url.loaded) {\n\t url = url.get();\n\t options = Tone.Player.defaults;\n\t } else {\n\t options = Tone.defaults(arguments, [\n\t 'url',\n\t 'onload'\n\t ], Tone.Player);\n\t }\n\t Tone.Source.call(this, options);\n\t /**\n\t\t\t * If the file should play as soon\n\t\t\t * as the buffer is loaded.\n\t\t\t * @type {boolean}\n\t\t\t * @example\n\t\t\t * //will play as soon as it's loaded\n\t\t\t * var player = new Tone.Player({\n\t\t\t * \t\"url\" : \"./path/to/sample.mp3\",\n\t\t\t * \t\"autostart\" : true,\n\t\t\t * }).toMaster();\n\t\t\t */\n\t this.autostart = options.autostart;\n\t /**\n\t\t\t * the buffer\n\t\t\t * @private\n\t\t\t * @type {Tone.Buffer}\n\t\t\t */\n\t this._buffer = new Tone.Buffer({\n\t 'url': options.url,\n\t 'onload': this._onload.bind(this, options.onload),\n\t 'reverse': options.reverse\n\t });\n\t if (url instanceof AudioBuffer) {\n\t this._buffer.set(url);\n\t }\n\t /**\n\t\t\t * if the buffer should loop once it's over\n\t\t\t * @type {boolean}\n\t\t\t * @private\n\t\t\t */\n\t this._loop = options.loop;\n\t /**\n\t\t\t * if 'loop' is true, the loop will start at this position\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t this._loopStart = options.loopStart;\n\t /**\n\t\t\t * if 'loop' is true, the loop will end at this position\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t this._loopEnd = options.loopEnd;\n\t /**\n\t\t\t * the playback rate\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t this._playbackRate = options.playbackRate;\n\t /**\n\t\t\t * Enabling retrigger will allow a player to be restarted\n\t\t\t * before the the previous 'start' is done playing. Otherwise,\n\t\t\t * successive calls to Tone.Player.start will only start\n\t\t\t * the sample if it had played all the way through.\n\t\t\t * @type {boolean}\n\t\t\t */\n\t this.retrigger = options.retrigger;\n\t /**\n\t\t\t * The fadeIn time of the amplitude envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.fadeIn = options.fadeIn;\n\t /**\n\t\t\t * The fadeOut time of the amplitude envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t this.fadeOut = options.fadeOut;\n\t };\n\t Tone.extend(Tone.Player, Tone.Source);\n\t /**\n\t\t * the default parameters\n\t\t * @static\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.Player.defaults = {\n\t 'onload': Tone.noOp,\n\t 'playbackRate': 1,\n\t 'loop': false,\n\t 'autostart': false,\n\t 'loopStart': 0,\n\t 'loopEnd': 0,\n\t 'retrigger': false,\n\t 'reverse': false,\n\t 'fadeIn': 0,\n\t 'fadeOut': 0\n\t };\n\t /**\n\t\t * Load the audio file as an audio buffer.\n\t\t * Decodes the audio asynchronously and invokes\n\t\t * the callback once the audio buffer loads.\n\t\t * Note: this does not need to be called if a url\n\t\t * was passed in to the constructor. Only use this\n\t\t * if you want to manually load a new url.\n\t\t * @param {string} url The url of the buffer to load.\n\t\t * Filetype support depends on the\n\t\t * browser.\n\t\t * @param {function=} callback The function to invoke once\n\t\t * the sample is loaded.\n\t\t * @returns {Promise}\n\t\t */\n\t Tone.Player.prototype.load = function (url, callback) {\n\t return this._buffer.load(url, this._onload.bind(this, callback));\n\t };\n\t /**\n\t\t * Internal callback when the buffer is loaded.\n\t\t * @private\n\t\t */\n\t Tone.Player.prototype._onload = function (callback) {\n\t callback = Tone.defaultArg(callback, Tone.noOp);\n\t callback(this);\n\t if (this.autostart) {\n\t this.start();\n\t }\n\t };\n\t /**\n\t\t * Play the buffer at the given startTime. Optionally add an offset\n\t\t * and/or duration which will play the buffer from a position\n\t\t * within the buffer for the given duration.\n\t\t *\n\t\t * @param {Time} [startTime=now] When the player should start.\n\t\t * @param {Time} [offset=0] The offset from the beginning of the sample\n\t\t * to start at.\n\t\t * @param {Time=} duration How long the sample should play. If no duration\n\t\t * is given, it will default to the full length\n\t\t * of the sample (minus any offset)\n\t\t * @returns {Tone.Player} this\n\t\t * @memberOf Tone.Player#\n\t\t * @method start\n\t\t * @name start\n\t\t */\n\t /**\n\t\t * Internal start method\n\t\t * @private\n\t\t */\n\t Tone.Player.prototype._start = function (startTime, offset, duration) {\n\t //if it's a loop the default offset is the loopstart point\n\t if (this._loop) {\n\t offset = Tone.defaultArg(offset, this._loopStart);\n\t } else {\n\t //otherwise the default offset is 0\n\t offset = Tone.defaultArg(offset, 0);\n\t }\n\t //compute the values in seconds\n\t offset = this.toSeconds(offset);\n\t duration = Tone.defaultArg(duration, Math.max(this._buffer.duration - offset, 0));\n\t duration = this.toSeconds(duration);\n\t startTime = this.toSeconds(startTime);\n\t //make the source\n\t var source = new Tone.BufferSource({\n\t 'buffer': this._buffer,\n\t 'loop': this._loop,\n\t 'loopStart': this._loopStart,\n\t 'loopEnd': this._loopEnd,\n\t 'playbackRate': this._playbackRate,\n\t 'fadeIn': this.fadeIn,\n\t 'fadeOut': this.fadeOut\n\t }).connect(this.output);\n\t //set the looping properties\n\t if (!this._loop && !this._synced) {\n\t //if it's not looping, set the state change at the end of the sample\n\t this._state.setStateAtTime(Tone.State.Stopped, startTime + duration);\n\t }\n\t var event = this._state.get(startTime);\n\t event.source = source;\n\t //start it\n\t if (this._loop) {\n\t source.start(startTime, offset);\n\t } else {\n\t source.start(startTime, offset, duration);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop playback.\n\t\t * @private\n\t\t * @param {Time} [time=now]\n\t\t * @returns {Tone.Player} this\n\t\t */\n\t Tone.Player.prototype._stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._state.forEachFrom(0, function (event) {\n\t if (event.source) {\n\t event.source.stop(time);\n\t }\n\t });\n\t return this;\n\t };\n\t /**\n\t\t * Stop and then restart the player from the beginning (or offset)\n\t\t * @param {Time} [startTime=now] When the player should start.\n\t\t * @param {Time} [offset=0] The offset from the beginning of the sample\n\t\t * to start at.\n\t\t * @param {Time=} duration How long the sample should play. If no duration\n\t\t * is given, it will default to the full length\n\t\t * of the sample (minus any offset)\n\t\t * @returns {Tone.Player} this\n\t\t */\n\t Tone.Player.prototype.restart = function (time, offset, duration) {\n\t if (!this.retrigger) {\n\t this.stop(time);\n\t }\n\t this._start(time, offset, duration);\n\t return this;\n\t };\n\t /**\n\t\t * Seek to a specific time in the player's buffer. If the\n\t\t * source is no longer playing at that time, it will stop.\n\t\t * If you seek to a time that\n\t\t * @param {Time} offset The time to seek to.\n\t\t * @param {Time=} time The time for the seek event to occur.\n\t\t * @return {Tone.Player} this\n\t\t * @example\n\t\t * source.start(0.2);\n\t\t * source.stop(0.4);\n\t\t */\n\t Tone.Player.prototype.seek = function (offset, time) {\n\t time = this.toSeconds(time);\n\t if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t offset = this.toSeconds(offset);\n\t // if it's currently playing, stop it\n\t this._stop(time);\n\t //restart it at the given time\n\t this._start(time, offset);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Set the loop start and end. Will only loop if loop is\n\t\t * set to true.\n\t\t * @param {Time} loopStart The loop end time\n\t\t * @param {Time} loopEnd The loop end time\n\t\t * @returns {Tone.Player} this\n\t\t * @example\n\t\t * //loop 0.1 seconds of the file.\n\t\t * player.setLoopPoints(0.2, 0.3);\n\t\t * player.loop = true;\n\t\t */\n\t Tone.Player.prototype.setLoopPoints = function (loopStart, loopEnd) {\n\t this.loopStart = loopStart;\n\t this.loopEnd = loopEnd;\n\t return this;\n\t };\n\t /**\n\t\t * If loop is true, the loop will start at this position.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'loopStart', {\n\t get: function () {\n\t return this._loopStart;\n\t },\n\t set: function (loopStart) {\n\t this._loopStart = loopStart;\n\t //get the current source\n\t var event = this._state.get(this.now());\n\t if (event && event.source) {\n\t event.source.loopStart = this.toSeconds(loopStart);\n\t }\n\t }\n\t });\n\t /**\n\t\t * If loop is true, the loop will end at this position.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'loopEnd', {\n\t get: function () {\n\t return this._loopEnd;\n\t },\n\t set: function (loopEnd) {\n\t this._loopEnd = loopEnd;\n\t //get the current source\n\t var event = this._state.get(this.now());\n\t if (event && event.source) {\n\t event.source.loopEnd = this.toSeconds(loopEnd);\n\t }\n\t }\n\t });\n\t /**\n\t\t * The audio buffer belonging to the player.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Tone.Buffer}\n\t\t * @name buffer\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'buffer', {\n\t get: function () {\n\t return this._buffer;\n\t },\n\t set: function (buffer) {\n\t this._buffer.set(buffer);\n\t }\n\t });\n\t /**\n\t\t * If the buffer should loop once it's over.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {boolean}\n\t\t * @name loop\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'loop', {\n\t get: function () {\n\t return this._loop;\n\t },\n\t set: function (loop) {\n\t this._loop = loop;\n\t //get the current source\n\t var event = this._state.get(this.now());\n\t if (event && event.source) {\n\t event.source.loop = loop;\n\t }\n\t }\n\t });\n\t /**\n\t\t * The playback speed. 1 is normal speed. This is not a signal because\n\t\t * Safari and iOS currently don't support playbackRate as a signal.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {number}\n\t\t * @name playbackRate\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'playbackRate', {\n\t get: function () {\n\t return this._playbackRate;\n\t },\n\t set: function (rate) {\n\t this._playbackRate = rate;\n\t //set all future sources\n\t this._state.forEachFrom(this.now(), function (event) {\n\t if (event.source) {\n\t event.source.playbackRate.value = rate;\n\t }\n\t });\n\t }\n\t });\n\t /**\n\t\t * The direction the buffer should play in\n\t\t * @memberOf Tone.Player#\n\t\t * @type {boolean}\n\t\t * @name reverse\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'reverse', {\n\t get: function () {\n\t return this._buffer.reverse;\n\t },\n\t set: function (rev) {\n\t this._buffer.reverse = rev;\n\t }\n\t });\n\t /**\n\t\t * If all the buffer is loaded\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Player.prototype, 'loaded', {\n\t get: function () {\n\t return this._buffer.loaded;\n\t }\n\t });\n\t /**\n\t\t * Dispose and disconnect.\n\t\t * @return {Tone.Player} this\n\t\t */\n\t Tone.Player.prototype.dispose = function () {\n\t //disconnect all of the players\n\t this._state.forEach(function (event) {\n\t if (event.source) {\n\t event.source.disconnect();\n\t event.source = null;\n\t }\n\t });\n\t Tone.Source.prototype.dispose.call(this);\n\t this._buffer.dispose();\n\t this._buffer = null;\n\t return this;\n\t };\n\t return Tone.Player;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.Players combines multiple [Tone.Player](Player) objects.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Object} urls An object mapping a name to a url.\n\t\t * @param {function=} onload The function to invoke when all buffers are loaded.\n\t\t */\n\t Tone.Players = function (urls) {\n\t var args = Array.prototype.slice.call(arguments);\n\t args.shift();\n\t var options = Tone.defaults(args, ['onload'], Tone.Players);\n\t Tone.call(this);\n\t /**\n\t\t\t * The output volume node\n\t\t\t * @type {Tone.Volume}\n\t\t\t * @private\n\t\t\t */\n\t this._volume = this.output = new Tone.Volume(options.volume);\n\t /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t this.volume = this._volume.volume;\n\t this._readOnly('volume');\n\t //make the output explicitly stereo\n\t this._volume.output.output.channelCount = 2;\n\t this._volume.output.output.channelCountMode = 'explicit';\n\t //mute initially\n\t this.mute = options.mute;\n\t /**\n\t\t\t * The container of all of the players\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t this._players = {};\n\t /**\n\t\t\t * The loading count\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t this._loadingCount = 0;\n\t /**\n\t\t\t * private holder of the fadeIn time\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t this._fadeIn = options.fadeIn;\n\t /**\n\t\t\t * private holder of the fadeOut time\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t this._fadeOut = options.fadeOut;\n\t //add all of the players\n\t for (var name in urls) {\n\t this._loadingCount++;\n\t this.add(name, urls[name], this._bufferLoaded.bind(this, options.onload));\n\t }\n\t };\n\t Tone.extend(Tone.Players, Tone.AudioNode);\n\t /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t */\n\t Tone.Players.defaults = {\n\t 'volume': 0,\n\t 'mute': false,\n\t 'onload': Tone.noOp,\n\t 'fadeIn': 0,\n\t 'fadeOut': 0\n\t };\n\t /**\n\t\t * A buffer was loaded. decrement the counter.\n\t\t * @param {Function} callback\n\t\t * @private\n\t\t */\n\t Tone.Players.prototype._bufferLoaded = function (callback) {\n\t this._loadingCount--;\n\t if (this._loadingCount === 0 && callback) {\n\t callback(this);\n\t }\n\t };\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * source.mute = true;\n\t\t */\n\t Object.defineProperty(Tone.Players.prototype, 'mute', {\n\t get: function () {\n\t return this._volume.mute;\n\t },\n\t set: function (mute) {\n\t this._volume.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * The fadeIn time of the amplitude envelope.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {Time}\n\t\t * @name fadeIn\n\t\t */\n\t Object.defineProperty(Tone.Players.prototype, 'fadeIn', {\n\t get: function () {\n\t return this._fadeIn;\n\t },\n\t set: function (fadeIn) {\n\t this._fadeIn = fadeIn;\n\t this._forEach(function (player) {\n\t player.fadeIn = fadeIn;\n\t });\n\t }\n\t });\n\t /**\n\t\t * The fadeOut time of the amplitude envelope.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {Time}\n\t\t * @name fadeOut\n\t\t */\n\t Object.defineProperty(Tone.Players.prototype, 'fadeOut', {\n\t get: function () {\n\t return this._fadeOut;\n\t },\n\t set: function (fadeOut) {\n\t this._fadeOut = fadeOut;\n\t this._forEach(function (player) {\n\t player.fadeOut = fadeOut;\n\t });\n\t }\n\t });\n\t /**\n\t\t * The state of the players object. Returns \"started\" if any of the players are playing.\n\t\t * @memberOf Tone.Players#\n\t\t * @type {String}\n\t\t * @name state\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Players.prototype, 'state', {\n\t get: function () {\n\t var playing = false;\n\t this._forEach(function (player) {\n\t playing = playing || player.state === Tone.State.Started;\n\t });\n\t return playing ? Tone.State.Started : Tone.State.Stopped;\n\t }\n\t });\n\t /**\n\t\t * True if the buffers object has a buffer by that name.\n\t\t * @param {String|Number} name The key or index of the\n\t\t * buffer.\n\t\t * @return {Boolean}\n\t\t */\n\t Tone.Players.prototype.has = function (name) {\n\t return this._players.hasOwnProperty(name);\n\t };\n\t /**\n\t\t * Get a player by name.\n\t\t * @param {String} name The players name as defined in\n\t\t * the constructor object or `add` method.\n\t\t * @return {Tone.Player}\n\t\t */\n\t Tone.Players.prototype.get = function (name) {\n\t if (this.has(name)) {\n\t return this._players[name];\n\t } else {\n\t throw new Error('Tone.Players: no player named ' + name);\n\t }\n\t };\n\t /**\n\t\t * Iterate over all of the players\n\t\t * @param {Function} callback\n\t\t * @return {Tone.Players} this\n\t\t * @private\n\t\t */\n\t Tone.Players.prototype._forEach = function (callback) {\n\t for (var playerName in this._players) {\n\t callback(this._players[playerName], playerName);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * If all the buffers are loaded or not\n\t\t * @memberOf Tone.Players#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.Players.prototype, 'loaded', {\n\t get: function () {\n\t var isLoaded = true;\n\t this._forEach(function (player) {\n\t isLoaded = isLoaded && player.loaded;\n\t });\n\t return isLoaded;\n\t }\n\t });\n\t /**\n\t\t * Add a player by name and url to the Players\n\t\t * @param {String} name A unique name to give the player\n\t\t * @param {String|Tone.Buffer|Audiobuffer} url Either the url of the bufer,\n\t\t * or a buffer which will be added\n\t\t * with the given name.\n\t\t * @param {Function=} callback The callback to invoke\n\t\t * when the url is loaded.\n\t\t */\n\t Tone.Players.prototype.add = function (name, url, callback) {\n\t this._players[name] = new Tone.Player(url, callback).connect(this.output);\n\t this._players[name].fadeIn = this._fadeIn;\n\t this._players[name].fadeOut = this._fadeOut;\n\t return this;\n\t };\n\t /**\n\t\t * Stop all of the players at the given time\n\t\t * @param {Time} time The time to stop all of the players.\n\t\t * @return {Tone.Players} this\n\t\t */\n\t Tone.Players.prototype.stopAll = function (time) {\n\t this._forEach(function (player) {\n\t player.stop(time);\n\t });\n\t };\n\t /**\n\t\t * Dispose and disconnect.\n\t\t * @return {Tone.Players} this\n\t\t */\n\t Tone.Players.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this._volume.dispose();\n\t this._volume = null;\n\t this._writable('volume');\n\t this.volume = null;\n\t this.output = null;\n\t this._forEach(function (player) {\n\t player.dispose();\n\t });\n\t this._players = null;\n\t return this;\n\t };\n\t return Tone.Players;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Uses [Tone.TickSignal](TickSignal) to track elapsed ticks with\n\t\t * \t\tcomplex automation curves.\n\t\t *\n\t\t * \t@constructor\n\t * @param {Frequency} frequency The initial frequency that the signal ticks at\n\t\t * @extends {Tone}\n\t\t */\n\t Tone.TickSource = function () {\n\t var options = Tone.defaults(arguments, ['frequency'], Tone.TickSource);\n\t /**\n\t\t\t * The frequency the callback function should be invoked.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t this.frequency = new Tone.TickSignal(options.frequency, Tone.Type.Frequency);\n\t this._readOnly('frequency');\n\t /**\n\t\t\t * The state timeline\n\t\t\t * @type {Tone.TimelineState}\n\t\t\t * @private\n\t\t\t */\n\t this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t /**\n\t\t\t * The offset values of the ticks\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t this._tickOffset = new Tone.Timeline();\n\t //add the first event\n\t this._tickOffset.add({\n\t 'time': 0,\n\t 'ticks': -1\n\t });\n\t };\n\t Tone.extend(Tone.TickSource);\n\t /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t Tone.TickSource.defaults = { 'frequency': 1 };\n\t /**\n\t\t * Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.TickSource#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.TickSource.prototype, 'state', {\n\t get: function () {\n\t return this._state.getValueAtTime(this.now());\n\t }\n\t });\n\t /**\n\t\t * Start the clock at the given time. Optionally pass in an offset\n\t\t * of where to start the tick counter from.\n\t\t * @param {Time=} time The time the clock should start\n\t\t * @param {Ticks=} offset Where the tick counter starts counting from.\n\t\t * @return {Tone.TickSource} this\n\t\t */\n\t Tone.TickSource.prototype.start = function (time, offset) {\n\t time = this.toSeconds(time);\n\t if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t var ticksAtTime = this.getTicksAtTime(time);\n\t if (ticksAtTime === -1) {\n\t ticksAtTime = 0;\n\t }\n\t offset = Tone.defaultArg(offset, ticksAtTime);\n\t this._state.setStateAtTime(Tone.State.Started, time);\n\t this._state.get(time).offset = offset;\n\t this.setTicksAtTime(offset, time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * Stop the clock. Stopping the clock resets the tick counter to 0.\n\t\t * @param {Time} [time=now] The time when the clock should stop.\n\t\t * @returns {Tone.TickSource} this\n\t\t * @example\n\t\t * clock.stop();\n\t\t */\n\t Tone.TickSource.prototype.stop = function (time) {\n\t time = this.toSeconds(time);\n\t this._state.cancel(time);\n\t this._state.setStateAtTime(Tone.State.Stopped, time);\n\t this.setTicksAtTime(-1, time);\n\t return this;\n\t };\n\t /**\n\t\t * Pause the clock. Pausing does not reset the tick counter.\n\t\t * @param {Time} [time=now] The time when the clock should stop.\n\t\t * @returns {Tone.TickSource} this\n\t\t */\n\t Tone.TickSource.prototype.pause = function (time) {\n\t time = this.toSeconds(time);\n\t if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t var pausedTicks = this.getTicksAtTime(time);\n\t this.setTicksAtTime(pausedTicks, time);\n\t this._state.setStateAtTime(Tone.State.Paused, time);\n\t }\n\t return this;\n\t };\n\t /**\n\t\t * The number of times the callback was invoked. Starts counting at 0\n\t\t * and increments after the callback was invoked. Returns -1 when stopped.\n\t\t * @memberOf Tone.TickSource#\n\t\t * @name ticks\n\t\t * @type {Ticks}\n\t\t */\n\t Object.defineProperty(Tone.TickSource.prototype, 'ticks', {\n\t get: function () {\n\t return this.getTicksAtTime(this.now());\n\t },\n\t set: function (t) {\n\t this.setTicksAtTime(t, this.now());\n\t }\n\t });\n\t /**\n\t\t * The time since ticks=0 that the TickSource has been running. Accounts\n\t\t * for tempo curves\n\t\t * @memberOf Tone.TickSource#\n\t\t * @name seconds\n\t\t * @type {Seconds}\n\t\t */\n\t Object.defineProperty(Tone.TickSource.prototype, 'seconds', {\n\t get: function () {\n\t var time = this.now();\n\t var ticks = this.getTicksAtTime(time);\n\t var totalTicks = this.frequency.getTicksAtTime(time);\n\t if (totalTicks - ticks > 0) {\n\t var tickTime = this.frequency.getTimeOfTick(totalTicks - ticks);\n\t return this.frequency.ticksToTime(ticks, tickTime).toSeconds();\n\t } else {\n\t return this.frequency.ticksToTime(ticks, time).toSeconds();\n\t }\n\t },\n\t set: function (s) {\n\t var now = this.now();\n\t var ticks = this.frequency.timeToTicks(s, now - s);\n\t this.setTicksAtTime(ticks, now);\n\t }\n\t });\n\t /**\n\t\t * Get the elapsed ticks at the given time\n\t\t * @param {Time} time When to get the ticks\n\t\t * @return {Ticks} The elapsed ticks at the given time.\n\t\t */\n\t Tone.TickSource.prototype.getTicksAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t var tickEvent = this._tickOffset.get(time);\n\t var offset = tickEvent.ticks;\n\t var elapsedTicks = this.frequency.getTicksAtTime(time) - tickEvent.position;\n\t if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t return offset;\n\t } else {\n\t return elapsedTicks + offset;\n\t }\n\t };\n\t /**\n\t\t * Set the clock's ticks at the given time.\n\t\t * @param {Ticks} ticks The tick value to set\n\t\t * @param {Time} time When to set the tick value\n\t\t * @return {Tone.TickSource} this\n\t\t */\n\t Tone.TickSource.prototype.setTicksAtTime = function (ticks, time) {\n\t time = this.toSeconds(time);\n\t this._tickOffset.cancel(time);\n\t this._tickOffset.add({\n\t 'time': time,\n\t 'ticks': ticks,\n\t 'position': this.frequency.getTicksAtTime(time)\n\t });\n\t return this;\n\t };\n\t /**\n\t\t * Returns the scheduled state at the given time.\n\t\t * @param {Time} time The time to query.\n\t\t * @return {String} The name of the state input in setStateAtTime.\n\t\t * @example\n\t\t * source.start(\"+0.1\");\n\t\t * source.getStateAtTime(\"+0.1\"); //returns \"started\"\n\t\t */\n\t Tone.TickSource.prototype.getStateAtTime = function (time) {\n\t time = this.toSeconds(time);\n\t return this._state.getValueAtTime(time);\n\t };\n\t /**\n\t\t * Clean up\n\t\t * @returns {Tone.TickSource} this\n\t\t */\n\t Tone.TickSource.prototype.dispose = function () {\n\t Tone.Param.prototype.dispose.call(this);\n\t this._state.dispose();\n\t this._state = null;\n\t this._tickOffset.dispose();\n\t this._tickOffset = null;\n\t this._writable('frequency');\n\t this.frequency.dispose();\n\t this.frequency = null;\n\t return this;\n\t };\n\t return Tone.TickSource;\n\t});\n\tModule(function (Tone) {\n\t \n\t /**\n\t\t * @class Tone.UserMedia uses MediaDevices.getUserMedia to open up\n\t\t * and external microphone or audio input. Check\n\t\t * [MediaDevices API Support](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia)\n\t\t * to see which browsers are supported. Access to an external input\n\t\t * is limited to secure (HTTPS) connections.\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {Decibels=} volume The level of the input\n\t\t * @example\n\t\t * //list the inputs and open the third one\n\t\t * var motu = new Tone.UserMedia();\n\t\t *\n\t\t * //opening the input asks the user to activate their mic\n\t\t * motu.open().then(function(){\n\t\t * \t//opening is activates the microphone\n\t\t * \t//starting lets audio through\n\t\t * \tmotu.start(10);\n\t\t * });\n\t\t */\n\t Tone.UserMedia = function () {\n\t var options = Tone.defaults(arguments, ['volume'], Tone.UserMedia);\n\t Tone.AudioNode.call(this);\n\t /**\n\t\t\t * The MediaStreamNode\n\t\t\t * @type {MediaStreamAudioSourceNode}\n\t\t\t * @private\n\t\t\t */\n\t this._mediaStream = null;\n\t /**\n\t\t\t * The media stream created by getUserMedia.\n\t\t\t * @type {LocalMediaStream}\n\t\t\t * @private\n\t\t\t */\n\t this._stream = null;\n\t /**\n\t\t\t * The open device\n\t\t\t * @type {MediaDeviceInfo}\n\t\t\t * @private\n\t\t\t */\n\t this._device = null;\n\t /**\n\t\t\t * The output volume node\n\t\t\t * @type {Tone.Volume}\n\t\t\t * @private\n\t\t\t */\n\t this._volume = this.output = new Tone.Volume(options.volume);\n\t /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * input.volume.value = -6;\n\t\t\t */\n\t this.volume = this._volume.volume;\n\t this._readOnly('volume');\n\t this.mute = options.mute;\n\t };\n\t Tone.extend(Tone.UserMedia, Tone.AudioNode);\n\t /**\n\t\t * the default parameters\n\t\t * @type {Object}\n\t\t */\n\t Tone.UserMedia.defaults = {\n\t 'volume': 0,\n\t 'mute': false\n\t };\n\t /**\n\t\t * Open the media stream. If a string is passed in, it is assumed\n\t\t * to be the label or id of the stream, if a number is passed in,\n\t\t * it is the input number of the stream.\n\t\t * @param {String|Number} [labelOrId=\"default\"] The label or id of the audio input media device.\n\t\t * With no argument, the default stream is opened.\n\t\t * @return {Promise} The promise is resolved when the stream is open.\n\t\t */\n\t Tone.UserMedia.prototype.open = function (labelOrId) {\n\t return Tone.UserMedia.enumerateDevices().then(function (devices) {\n\t var device;\n\t if (Tone.isNumber(labelOrId)) {\n\t device = devices[labelOrId];\n\t } else {\n\t device = devices.find(function (device) {\n\t return device.label === labelOrId || device.deviceId === labelOrId;\n\t });\n\t //didn't find a matching device\n\t if (!device && devices.length > 0) {\n\t device = devices[0];\n\t } else if (!device && !Tone.isUndef(labelOrId)) {\n\t throw new Error('Tone.UserMedia: no matching device: ' + labelOrId);\n\t }\n\t }\n\t this._device = device;\n\t //do getUserMedia\n\t var constraints = {\n\t audio: {\n\t 'echoCancellation': false,\n\t 'sampleRate': this.context.sampleRate\n\t }\n\t };\n\t if (device) {\n\t constraints.audio.deviceId = device.deviceId;\n\t }\n\t return navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n\t //start a new source only if the previous one is closed\n\t if (!this._stream) {\n\t this._stream = stream;\n\t //Wrap a MediaStreamSourceNode around the live input stream.\n\t this._mediaStream = this.context.createMediaStreamSource(stream);\n\t //Connect the MediaStreamSourceNode to a gate gain node\n\t this._mediaStream.connect(this.output);\n\t }\n\t return this;\n\t }.bind(this));\n\t }.bind(this));\n\t };\n\t /**\n\t\t * Close the media stream\n\t\t * @return {Tone.UserMedia} this\n\t\t */\n\t Tone.UserMedia.prototype.close = function () {\n\t if (this._stream) {\n\t this._stream.getAudioTracks().forEach(function (track) {\n\t track.stop();\n\t });\n\t this._stream = null;\n\t //remove the old media stream\n\t this._mediaStream.disconnect();\n\t this._mediaStream = null;\n\t }\n\t this._device = null;\n\t return this;\n\t };\n\t /**\n\t\t * Returns a promise which resolves with the list of audio input devices available.\n\t\t * @return {Promise} The promise that is resolved with the devices\n\t\t * @static\n\t\t * @example\n\t\t * Tone.UserMedia.enumerateDevices().then(function(devices){\n\t\t * \tconsole.log(devices)\n\t\t * })\n\t\t */\n\t Tone.UserMedia.enumerateDevices = function () {\n\t return navigator.mediaDevices.enumerateDevices().then(function (devices) {\n\t return devices.filter(function (device) {\n\t return device.kind === 'audioinput';\n\t });\n\t });\n\t };\n\t /**\n\t\t * Returns the playback state of the source, \"started\" when the microphone is open\n\t\t * and \"stopped\" when the mic is closed.\n\t\t * @type {Tone.State}\n\t\t * @readOnly\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @name state\n\t\t */\n\t Object.defineProperty(Tone.UserMedia.prototype, 'state', {\n\t get: function () {\n\t return this._stream && this._stream.active ? Tone.State.Started : Tone.State.Stopped;\n\t }\n\t });\n\t /**\n\t\t * \tReturns an identifier for the represented device that is\n\t\t * \tpersisted across sessions. It is un-guessable by other applications and\n\t\t * \tunique to the origin of the calling application. It is reset when the\n\t\t * \tuser clears cookies (for Private Browsing, a different identifier is\n\t\t * \tused that is not persisted across sessions). Returns undefined when the\n\t\t * \tdevice is not open.\n\t\t * @type {String}\n\t\t * @readOnly\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @name deviceId\n\t\t */\n\t Object.defineProperty(Tone.UserMedia.prototype, 'deviceId', {\n\t get: function () {\n\t if (this._device) {\n\t return this._device.deviceId;\n\t }\n\t }\n\t });\n\t /**\n\t\t * \tReturns a group identifier. Two devices have the\n\t\t * \tsame group identifier if they belong to the same physical device.\n\t\t * \tReturns undefined when the device is not open.\n\t\t * @type {String}\n\t\t * @readOnly\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @name groupId\n\t\t */\n\t Object.defineProperty(Tone.UserMedia.prototype, 'groupId', {\n\t get: function () {\n\t if (this._device) {\n\t return this._device.groupId;\n\t }\n\t }\n\t });\n\t /**\n\t\t * \tReturns a label describing this device (for example \"Built-in Microphone\").\n\t\t * \tReturns undefined when the device is not open or label is not available\n\t\t * \tbecause of permissions.\n\t\t * @type {String}\n\t\t * @readOnly\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @name groupId\n\t\t */\n\t Object.defineProperty(Tone.UserMedia.prototype, 'label', {\n\t get: function () {\n\t if (this._device) {\n\t return this._device.label;\n\t }\n\t }\n\t });\n\t /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * userMedia.mute = true;\n\t\t */\n\t Object.defineProperty(Tone.UserMedia.prototype, 'mute', {\n\t get: function () {\n\t return this._volume.mute;\n\t },\n\t set: function (mute) {\n\t this._volume.mute = mute;\n\t }\n\t });\n\t /**\n\t\t * Clean up.\n\t\t * @return {Tone.UserMedia} this\n\t\t */\n\t Tone.UserMedia.prototype.dispose = function () {\n\t Tone.AudioNode.prototype.dispose.call(this);\n\t this.close();\n\t this._writable('volume');\n\t this._volume.dispose();\n\t this._volume = null;\n\t this.volume = null;\n\t return this;\n\t };\n\t /**\n\t\t * If getUserMedia is supported by the browser.\n\t\t * @type {Boolean}\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @name supported\n\t\t * @static\n\t\t * @readOnly\n\t\t */\n\t Object.defineProperty(Tone.UserMedia, 'supported', {\n\t get: function () {\n\t return !Tone.isUndef(navigator.mediaDevices) && Tone.isFunction(navigator.mediaDevices.getUserMedia);\n\t }\n\t });\n\t return Tone.UserMedia;\n\t});\n\tModule(function (Tone) {\n\t /**\n\t\t * @class Tone.Midi is a primitive type for encoding Time values.\n\t\t * Tone.Midi can be constructed with or without the `new` keyword. Tone.Midi can be passed\n\t\t * into the parameter of any method which takes time as an argument.\n\t\t * @constructor\n\t\t * @extends {Tone.Frequency}\n\t\t * @param {String|Number} val The time value.\n\t\t * @param {String=} units The units of the value.\n\t\t * @example\n\t\t * var t = Tone.Midi(\"4n\");//a quarter note\n\t\t */\n\t Tone.Midi = function (val, units) {\n\t if (this instanceof Tone.Midi) {\n\t Tone.Frequency.call(this, val, units);\n\t } else {\n\t return new Tone.Midi(val, units);\n\t }\n\t };\n\t Tone.extend(Tone.Midi, Tone.Frequency);\n\t /**\n\t\t * The default units if none are given.\n\t\t * @type {String}\n\t\t * @private\n\t\t */\n\t Tone.Midi.prototype._defaultUnits = 'midi';\n\t /**\n\t\t * Returns the value of a frequency in the current units\n\t\t * @param {Frequency} freq\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Midi.prototype._frequencyToUnits = function (freq) {\n\t return Tone.Frequency.ftom(Tone.Frequency.prototype._frequencyToUnits.call(this, freq));\n\t };\n\t /**\n\t\t * Returns the value of a tick in the current time units\n\t\t * @param {Ticks} ticks\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Midi.prototype._ticksToUnits = function (ticks) {\n\t return Tone.Frequency.ftom(Tone.Frequency.prototype._ticksToUnits.call(this, ticks));\n\t };\n\t /**\n\t\t * Return the value of the beats in the current units\n\t\t * @param {Number} beats\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Midi.prototype._beatsToUnits = function (beats) {\n\t return Tone.Frequency.ftom(Tone.Frequency.prototype._beatsToUnits.call(this, beats));\n\t };\n\t /**\n\t\t * Returns the value of a second in the current units\n\t\t * @param {Seconds} seconds\n\t\t * @return {Number}\n\t\t * @private\n\t\t */\n\t Tone.Midi.prototype._secondsToUnits = function (seconds) {\n\t return Tone.Frequency.ftom(Tone.Frequency.prototype._secondsToUnits.call(this, seconds));\n\t };\n\t /**\n\t\t * Return the value of the frequency as a MIDI note\n\t\t * @return {MIDI}\n\t\t * @example\n\t\t * Tone.Midi(60).toMidi(); //60\n\t\t */\n\t Tone.Midi.prototype.toMidi = function () {\n\t return this.valueOf();\n\t };\n\t /**\n\t\t * Return the value of the frequency as a MIDI note\n\t\t * @return {MIDI}\n\t\t * @example\n\t\t * Tone.Midi(60).toMidi(); //60\n\t\t */\n\t Tone.Midi.prototype.toFrequency = function () {\n\t return Tone.Frequency.mtof(this.toMidi());\n\t };\n\t /**\n\t\t * Transposes the frequency by the given number of semitones.\n\t\t * @param {Interval} interval\n\t\t * @return {Tone.Frequency} A new transposed frequency\n\t\t * @example\n\t\t * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n\t\t */\n\t Tone.Midi.prototype.transpose = function (interval) {\n\t return new this.constructor(this.toMidi() + interval);\n\t };\n\t return Tone.Midi;\n\t});\n\t\n\treturn Tone;\n}));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/tone/build/Tone.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nmodule.exports = {\n /**\n * True if this is running in Nodejs, will be undefined in a browser.\n * In a browser, browserify won't include this file and the whole module\n * will be resolved an empty object.\n */\n isNode : typeof Buffer !== \"undefined\",\n /**\n * Create a new nodejs Buffer from an existing content.\n * @param {Object} data the data to pass to the constructor.\n * @param {String} encoding the encoding to use.\n * @return {Buffer} a new Buffer.\n */\n newBufferFrom: function(data, encoding) {\n // XXX We can't use `Buffer.from` which comes from `Uint8Array.from`\n // in nodejs v4 (< v.4.5). It's not the expected implementation (and\n // has a different signature).\n // see https://github.com/nodejs/node/issues/8053\n // A condition on nodejs' version won't solve the issue as we don't\n // control the Buffer polyfills that may or may not be used.\n return new Buffer(data, encoding);\n },\n /**\n * Create a new nodejs Buffer with the specified size.\n * @param {Integer} size the size of the buffer.\n * @return {Buffer} a new Buffer.\n */\n allocBuffer: function (size) {\n if (Buffer.alloc) {\n return Buffer.alloc(size);\n } else {\n return new Buffer(size);\n }\n },\n /**\n * Find out if an object is a Buffer.\n * @param {Object} b the object to test.\n * @return {Boolean} true if the object is a Buffer, false otherwise.\n */\n isBuffer : function(b){\n return Buffer.isBuffer(b);\n },\n\n isStream : function (obj) {\n return obj &&\n typeof obj.on === \"function\" &&\n typeof obj.pause === \"function\" &&\n typeof obj.resume === \"function\";\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/nodejsUtils.js\n// module id = 12\n// module chunks = 0","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_global.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nif (!process.version ||\n process.version.indexOf('v0.') === 0 ||\n process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = { nextTick: nextTick };\n} else {\n module.exports = process\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process-nextick-args/index.js\n// module id = 14\n// module chunks = 0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 15\n// module chunks = 0","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/safe-buffer/index.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.requestAudioContext = exports.browser = exports.gaussian = exports.shuffle = exports.randsign = exports.randrange = exports.randint = exports.quantize = exports.xor = exports.dist = exports.angle = exports.lerp = exports.mod = exports.choice = exports.clamp = undefined;\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _startAudioContext = require('./startAudioContext');\n\nvar _startAudioContext2 = _interopRequireDefault(_startAudioContext);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar isIphone = navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i);\nvar isIpad = navigator.userAgent.match(/iPad/i);\nvar isAndroid = navigator.userAgent.match(/Android/i);\nvar isMobile = isIphone || isIpad || isAndroid;\nvar isDesktop = !isMobile;\n\ndocument.body.classList.add(isMobile ? 'mobile' : 'desktop');\n\nvar browser = { isIphone: isIphone, isIpad: isIpad, isAndroid: isAndroid, isMobile: isMobile, isDesktop: isDesktop };\n\nfunction clamp(n, a, b) {\n return n < a ? a : n < b ? n : b;\n}\nfunction choice(a) {\n return a[Math.floor(Math.random() * a.length)];\n}\nfunction mod(n, m) {\n return n - m * Math.floor(n / m);\n}\nfunction randint(n) {\n return Math.random() * n | 0;\n}\nfunction randrange(a, b) {\n return a + Math.random() * (b - a);\n}\nfunction randsign() {\n return Math.random() >= 0.5 ? -1 : 1;\n}\nfunction lerp(n, a, b) {\n return (b - a) * n + a;\n}\nfunction angle(x0, y0, x1, y1) {\n return Math.atan2(y1 - y0, x1 - x0);\n}\nfunction dist(x0, y0, x1, y1) {\n return Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));\n}\nfunction xor(a, b) {\n a = !!a;b = !!b;return (a || b) && !(a && b);\n}\nfunction quantize(a, b) {\n return Math.floor(a / b) * b;\n}\nfunction shuffle(a) {\n for (var i = a.length; i > 0; i--) {\n var r = randint(i);\n var swap = a[i - 1];\n a[i - 1] = a[r];\n a[r] = swap;\n }\n return a;\n}\n// returns a gaussian random function with the given mean and stdev.\nfunction gaussian(mean, stdev) {\n var y2 = void 0;\n var use_last = false;\n return function () {\n var y1 = void 0;\n if (use_last) {\n y1 = y2;\n use_last = false;\n } else {\n var x1 = void 0,\n x2 = void 0,\n w = void 0;\n do {\n x1 = 2.0 * Math.random() - 1.0;\n x2 = 2.0 * Math.random() - 1.0;\n w = x1 * x1 + x2 * x2;\n } while (w >= 1.0);\n w = Math.sqrt(-2.0 * Math.log(w) / w);\n y1 = x1 * w;\n y2 = x2 * w;\n use_last = true;\n }\n\n var retval = mean + stdev * y1;\n if (retval > 0) return retval;\n return -retval;\n };\n}\n\nfunction requestAudioContext(fn) {\n if (isMobile) {\n var container = document.createElement('div');\n var button = document.createElement('div');\n button.innerHTML = 'Tap to start - please unmute your phone';\n Object.assign(container.style, {\n display: 'block',\n position: 'absolute',\n width: '100%',\n height: '100%',\n zIndex: '10000',\n top: '0px',\n left: '0px',\n backgroundColor: 'rgba(0, 0, 0, 0.8)'\n });\n Object.assign(button.style, {\n display: 'block',\n position: 'absolute',\n left: '50%',\n top: '50%',\n padding: '20px',\n backgroundColor: '#7F33ED',\n color: 'white',\n fontFamily: 'monospace',\n borderRadius: '3px',\n transform: 'translate3D(-50%,-50%,0)',\n textAlign: 'center',\n lineHeight: '1.5',\n width: '150px'\n });\n container.appendChild(button);\n document.body.appendChild(container);\n _startAudioContext2.default.setContext(_tone2.default.context);\n _startAudioContext2.default.on(button);\n _startAudioContext2.default.onStarted(function (_) {\n container.remove();\n fn();\n });\n } else {\n fn();\n }\n}\n\nexports.clamp = clamp;\nexports.choice = choice;\nexports.mod = mod;\nexports.lerp = lerp;\nexports.angle = angle;\nexports.dist = dist;\nexports.xor = xor;\nexports.quantize = quantize;\nexports.randint = randint;\nexports.randrange = randrange;\nexports.randsign = randsign;\nexports.shuffle = shuffle;\nexports.gaussian = gaussian;\nexports.browser = browser;\nexports.requestAudioContext = requestAudioContext;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/util.js\n// module id = 17\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/events/events.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar external = require(\"./external\");\nvar DataWorker = require('./stream/DataWorker');\nvar DataLengthProbe = require('./stream/DataLengthProbe');\nvar Crc32Probe = require('./stream/Crc32Probe');\nvar DataLengthProbe = require('./stream/DataLengthProbe');\n\n/**\n * Represent a compressed object, with everything needed to decompress it.\n * @constructor\n * @param {number} compressedSize the size of the data compressed.\n * @param {number} uncompressedSize the size of the data after decompression.\n * @param {number} crc32 the crc32 of the decompressed file.\n * @param {object} compression the type of compression, see lib/compressions.js.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data.\n */\nfunction CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) {\n this.compressedSize = compressedSize;\n this.uncompressedSize = uncompressedSize;\n this.crc32 = crc32;\n this.compression = compression;\n this.compressedContent = data;\n}\n\nCompressedObject.prototype = {\n /**\n * Create a worker to get the uncompressed content.\n * @return {GenericWorker} the worker.\n */\n getContentWorker : function () {\n var worker = new DataWorker(external.Promise.resolve(this.compressedContent))\n .pipe(this.compression.uncompressWorker())\n .pipe(new DataLengthProbe(\"data_length\"));\n\n var that = this;\n worker.on(\"end\", function () {\n if(this.streamInfo['data_length'] !== that.uncompressedSize) {\n throw new Error(\"Bug : uncompressed data size mismatch\");\n }\n });\n return worker;\n },\n /**\n * Create a worker to get the compressed content.\n * @return {GenericWorker} the worker.\n */\n getCompressedWorker : function () {\n return new DataWorker(external.Promise.resolve(this.compressedContent))\n .withStreamInfo(\"compressedSize\", this.compressedSize)\n .withStreamInfo(\"uncompressedSize\", this.uncompressedSize)\n .withStreamInfo(\"crc32\", this.crc32)\n .withStreamInfo(\"compression\", this.compression)\n ;\n }\n};\n\n/**\n * Chain the given worker with other workers to compress the content with the\n * given compresion.\n * @param {GenericWorker} uncompressedWorker the worker to pipe.\n * @param {Object} compression the compression object.\n * @param {Object} compressionOptions the options to use when compressing.\n * @return {GenericWorker} the new worker compressing the content.\n */\nCompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) {\n return uncompressedWorker\n .pipe(new Crc32Probe())\n .pipe(new DataLengthProbe(\"uncompressedSize\"))\n .pipe(compression.compressWorker(compressionOptions))\n .pipe(new DataLengthProbe(\"compressedSize\"))\n .withStreamInfo(\"compression\", compression);\n};\n\nmodule.exports = CompressedObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/compressedObject.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * The following functions come from pako, from pako/lib/zlib/crc32.js\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for(var n =0; n < 256; n++){\n c = n;\n for(var k =0; k < 8; k++){\n c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable, end = pos + len;\n\n crc = crc ^ (-1);\n\n for (var i = pos; i < end; i++ ) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n// That's all for the pako functions.\n\n/**\n * Compute the crc32 of a string.\n * This is almost the same as the function crc32, but for strings. Using the\n * same function for the two use cases leads to horrible performances.\n * @param {Number} crc the starting value of the crc.\n * @param {String} str the string to use.\n * @param {Number} len the length of the string.\n * @param {Number} pos the starting position for the crc32 computation.\n * @return {Number} the computed crc32.\n */\nfunction crc32str(crc, str, len, pos) {\n var t = crcTable, end = pos + len;\n\n crc = crc ^ (-1);\n\n for (var i = pos; i < end; i++ ) {\n crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\nmodule.exports = function crc32wrapper(input, crc) {\n if (typeof input === \"undefined\" || !input.length) {\n return 0;\n }\n\n var isArray = utils.getTypeOf(input) !== \"string\";\n\n if(isArray) {\n return crc32(crc|0, input, input.length, 0);\n } else {\n return crc32str(crc|0, input, input.length, 0);\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/crc32.js\n// module id = 20\n// module chunks = 0","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_descriptors.js\n// module id = 21\n// module chunks = 0","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_is-object.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/messages.js\n// module id = 23\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\n/*<replacement>*/\n\nvar processNextTick = require('process-nextick-args').nextTick;\n/*</replacement>*/\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function (object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function (object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n processNextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n processNextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n processNextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /*<replacement>*/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /*</replacement>*/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n stream.emit('error', err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n processNextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) processNextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = corkReq;\n } else {\n state.corkedRequestsFree = corkReq;\n }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function () {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_writable.js\n// module id = 24\n// module chunks = 0","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/readable-browser.js\n// module id = 25\n// module chunks = 0","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n\nmouse.register({\n down: (x, y) => {\n },\n move: (x, y, dx, dy) => {\n },\n up: (x, y) => {\n },\n})\n\n*/\n\nvar fns = {\n down: [],\n move: [],\n drag: [],\n up: []\n};\n\ndocument.body.scrollTo(0, 0);\ndocument.body.parentNode.scrollTo(0, 0);\ndocument.body.addEventListener(\"scroll\", function (e) {\n e.preventDefault();\n});\ndocument.body.parentNode.addEventListener(\"scroll\", function (e) {\n e.preventDefault();\n});\n\nexports.default = {\n register: function register(callbacks) {\n callbacks.down && fns.down.push(callbacks.down);\n callbacks.move && fns.move.push(callbacks.move);\n callbacks.drag && fns.drag.push(callbacks.drag);\n callbacks.up && fns.up.push(callbacks.up);\n }\n};\n\n\nvar x = void 0,\n y = void 0,\n dragging = false;\n\nfunction down(e) {\n x = e.pageX;\n y = e.pageY;\n x /= window.innerWidth;\n y /= window.innerHeight;\n dragging = true;\n fns.down.map(function (f) {\n return f(x, y);\n });\n}\nfunction move(e) {\n var dx = e.pageX - x;\n var dy = e.pageY - y;\n x = e.pageX;\n y = e.pageY;\n x /= window.innerWidth;\n y /= window.innerHeight;\n fns.move.map(function (f) {\n return f(x, y, dx, dy);\n });\n dragging && fns.drag.map(function (f) {\n return f(x, y, dx, dy);\n });\n}\nfunction up(e) {\n dragging = false;\n fns.up.map(function (f) {\n return f(x, y);\n });\n}\n\nfunction touch(f) {\n return function (e) {\n e.preventDefault();\n f(e.touches[0]);\n };\n}\ndocument.body.addEventListener(\"mousedown\", down);\ndocument.body.addEventListener(\"mousemove\", move);\nwindow.addEventListener(\"mouseup\", up);\ndocument.body.addEventListener(\"touchstart\", touch(down));\ndocument.body.addEventListener(\"touchmove\", touch(move));\ndocument.body.addEventListener(\"touchup\", touch(up));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/mouse.js\n// module id = 26\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/isarray/index.js\n// module id = 27\n// module chunks = 0","'use strict';\nvar utils = require('./utils');\nvar support = require('./support');\n// private property\nvar _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n\n// public method for encoding\nexports.encode = function(input) {\n var output = [];\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n var i = 0, len = input.length, remainingBytes = len;\n\n var isArray = utils.getTypeOf(input) !== \"string\";\n while (i < input.length) {\n remainingBytes = len - i;\n\n if (!isArray) {\n chr1 = input.charCodeAt(i++);\n chr2 = i < len ? input.charCodeAt(i++) : 0;\n chr3 = i < len ? input.charCodeAt(i++) : 0;\n } else {\n chr1 = input[i++];\n chr2 = i < len ? input[i++] : 0;\n chr3 = i < len ? input[i++] : 0;\n }\n\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;\n enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;\n\n output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));\n\n }\n\n return output.join(\"\");\n};\n\n// public method for decoding\nexports.decode = function(input) {\n var chr1, chr2, chr3;\n var enc1, enc2, enc3, enc4;\n var i = 0, resultIndex = 0;\n\n var dataUrlPrefix = \"data:\";\n\n if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {\n // This is a common error: people give a data url\n // (data:image/png;base64,iVBOR...) with a {base64: true} and\n // wonders why things don't work.\n // We can detect that the string input looks like a data url but we\n // *can't* be sure it is one: removing everything up to the comma would\n // be too dangerous.\n throw new Error(\"Invalid base64 input, it looks like a data url.\");\n }\n\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n var totalLength = input.length * 3 / 4;\n if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {\n totalLength--;\n }\n if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {\n totalLength--;\n }\n if (totalLength % 1 !== 0) {\n // totalLength is not an integer, the length does not match a valid\n // base64 content. That can happen if:\n // - the input is not a base64 content\n // - the input is *almost* a base64 content, with a extra chars at the\n // beginning or at the end\n // - the input uses a base64 variant (base64url for example)\n throw new Error(\"Invalid base64 input, bad content length.\");\n }\n var output;\n if (support.uint8array) {\n output = new Uint8Array(totalLength|0);\n } else {\n output = new Array(totalLength|0);\n }\n\n while (i < input.length) {\n\n enc1 = _keyStr.indexOf(input.charAt(i++));\n enc2 = _keyStr.indexOf(input.charAt(i++));\n enc3 = _keyStr.indexOf(input.charAt(i++));\n enc4 = _keyStr.indexOf(input.charAt(i++));\n\n chr1 = (enc1 << 2) | (enc2 >> 4);\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n chr3 = ((enc3 & 3) << 6) | enc4;\n\n output[resultIndex++] = chr1;\n\n if (enc3 !== 64) {\n output[resultIndex++] = chr2;\n }\n if (enc4 !== 64) {\n output[resultIndex++] = chr3;\n }\n\n }\n\n return output;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/base64.js\n// module id = 28\n// module chunks = 0","'use strict';\n\nvar GenericWorker = require(\"./stream/GenericWorker\");\n\nexports.STORE = {\n magic: \"\\x00\\x00\",\n compressWorker : function (compressionOptions) {\n return new GenericWorker(\"STORE compression\");\n },\n uncompressWorker : function () {\n return new GenericWorker(\"STORE decompression\");\n }\n};\nexports.DEFLATE = require('./flate');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/compressions.js\n// module id = 29\n// module chunks = 0","'use strict';\nexports.base64 = false;\nexports.binary = false;\nexports.dir = false;\nexports.createFolders = true;\nexports.date = null;\nexports.compression = null;\nexports.compressionOptions = null;\nexports.comment = null;\nexports.unixPermissions = null;\nexports.dosPermissions = null;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/defaults.js\n// module id = 30\n// module chunks = 0","/*\n * This file is used by module bundlers (browserify/webpack/etc) when\n * including a stream implementation. We use \"readable-stream\" to get a\n * consistent behavior between nodejs versions but bundlers often have a shim\n * for \"stream\". Using this shim greatly improve the compatibility and greatly\n * reduce the final size of the bundle (only one stream implementation, not\n * two).\n */\nmodule.exports = require(\"stream\");\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/readable-stream-browser.js\n// module id = 31\n// module chunks = 0","'use strict';\nvar DataReader = require('./DataReader');\nvar utils = require('../utils');\n\nfunction ArrayReader(data) {\n DataReader.call(this, data);\n\tfor(var i = 0; i < this.data.length; i++) {\n\t\tdata[i] = data[i] & 0xFF;\n\t}\n}\nutils.inherits(ArrayReader, DataReader);\n/**\n * @see DataReader.byteAt\n */\nArrayReader.prototype.byteAt = function(i) {\n return this.data[this.zero + i];\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nArrayReader.prototype.lastIndexOfSignature = function(sig) {\n var sig0 = sig.charCodeAt(0),\n sig1 = sig.charCodeAt(1),\n sig2 = sig.charCodeAt(2),\n sig3 = sig.charCodeAt(3);\n for (var i = this.length - 4; i >= 0; --i) {\n if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {\n return i - this.zero;\n }\n }\n\n return -1;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nArrayReader.prototype.readAndCheckSignature = function (sig) {\n var sig0 = sig.charCodeAt(0),\n sig1 = sig.charCodeAt(1),\n sig2 = sig.charCodeAt(2),\n sig3 = sig.charCodeAt(3),\n data = this.readData(4);\n return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3];\n};\n/**\n * @see DataReader.readData\n */\nArrayReader.prototype.readData = function(size) {\n this.checkOffset(size);\n if(size === 0) {\n return [];\n }\n var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = ArrayReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/ArrayReader.js\n// module id = 32\n// module chunks = 0","'use strict';\nvar utils = require('../utils');\n\nfunction DataReader(data) {\n this.data = data; // type : see implementation\n this.length = data.length;\n this.index = 0;\n this.zero = 0;\n}\nDataReader.prototype = {\n /**\n * Check that the offset will not go too far.\n * @param {string} offset the additional offset to check.\n * @throws {Error} an Error if the offset is out of bounds.\n */\n checkOffset: function(offset) {\n this.checkIndex(this.index + offset);\n },\n /**\n * Check that the specified index will not be too far.\n * @param {string} newIndex the index to check.\n * @throws {Error} an Error if the index is out of bounds.\n */\n checkIndex: function(newIndex) {\n if (this.length < this.zero + newIndex || newIndex < 0) {\n throw new Error(\"End of data reached (data length = \" + this.length + \", asked index = \" + (newIndex) + \"). Corrupted zip ?\");\n }\n },\n /**\n * Change the index.\n * @param {number} newIndex The new index.\n * @throws {Error} if the new index is out of the data.\n */\n setIndex: function(newIndex) {\n this.checkIndex(newIndex);\n this.index = newIndex;\n },\n /**\n * Skip the next n bytes.\n * @param {number} n the number of bytes to skip.\n * @throws {Error} if the new index is out of the data.\n */\n skip: function(n) {\n this.setIndex(this.index + n);\n },\n /**\n * Get the byte at the specified index.\n * @param {number} i the index to use.\n * @return {number} a byte.\n */\n byteAt: function(i) {\n // see implementations\n },\n /**\n * Get the next number with a given byte size.\n * @param {number} size the number of bytes to read.\n * @return {number} the corresponding number.\n */\n readInt: function(size) {\n var result = 0,\n i;\n this.checkOffset(size);\n for (i = this.index + size - 1; i >= this.index; i--) {\n result = (result << 8) + this.byteAt(i);\n }\n this.index += size;\n return result;\n },\n /**\n * Get the next string with a given byte size.\n * @param {number} size the number of bytes to read.\n * @return {string} the corresponding string.\n */\n readString: function(size) {\n return utils.transformTo(\"string\", this.readData(size));\n },\n /**\n * Get raw data without conversion, <size> bytes.\n * @param {number} size the number of bytes to read.\n * @return {Object} the raw data, implementation specific.\n */\n readData: function(size) {\n // see implementations\n },\n /**\n * Find the last occurence of a zip signature (4 bytes).\n * @param {string} sig the signature to find.\n * @return {number} the index of the last occurence, -1 if not found.\n */\n lastIndexOfSignature: function(sig) {\n // see implementations\n },\n /**\n * Read the signature (4 bytes) at the current position and compare it with sig.\n * @param {string} sig the expected signature\n * @return {boolean} true if the signature matches, false otherwise.\n */\n readAndCheckSignature: function(sig) {\n // see implementations\n },\n /**\n * Get the next date.\n * @return {Date} the date.\n */\n readDate: function() {\n var dostime = this.readInt(4);\n return new Date(Date.UTC(\n ((dostime >> 25) & 0x7f) + 1980, // year\n ((dostime >> 21) & 0x0f) - 1, // month\n (dostime >> 16) & 0x1f, // day\n (dostime >> 11) & 0x1f, // hour\n (dostime >> 5) & 0x3f, // minute\n (dostime & 0x1f) << 1)); // second\n }\n};\nmodule.exports = DataReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/DataReader.js\n// module id = 33\n// module chunks = 0","'use strict';\nvar ArrayReader = require('./ArrayReader');\nvar utils = require('../utils');\n\nfunction Uint8ArrayReader(data) {\n ArrayReader.call(this, data);\n}\nutils.inherits(Uint8ArrayReader, ArrayReader);\n/**\n * @see DataReader.readData\n */\nUint8ArrayReader.prototype.readData = function(size) {\n this.checkOffset(size);\n if(size === 0) {\n // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].\n return new Uint8Array(0);\n }\n var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = Uint8ArrayReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/Uint8ArrayReader.js\n// module id = 34\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\nvar support = require('../support');\nvar ArrayReader = require('./ArrayReader');\nvar StringReader = require('./StringReader');\nvar NodeBufferReader = require('./NodeBufferReader');\nvar Uint8ArrayReader = require('./Uint8ArrayReader');\n\n/**\n * Create a reader adapted to the data.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read.\n * @return {DataReader} the data reader.\n */\nmodule.exports = function (data) {\n var type = utils.getTypeOf(data);\n utils.checkSupport(type);\n if (type === \"string\" && !support.uint8array) {\n return new StringReader(data);\n }\n if (type === \"nodebuffer\") {\n return new NodeBufferReader(data);\n }\n if (support.uint8array) {\n return new Uint8ArrayReader(utils.transformTo(\"uint8array\", data));\n }\n return new ArrayReader(utils.transformTo(\"array\", data));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/readerFor.js\n// module id = 35\n// module chunks = 0","'use strict';\nexports.LOCAL_FILE_HEADER = \"PK\\x03\\x04\";\nexports.CENTRAL_FILE_HEADER = \"PK\\x01\\x02\";\nexports.CENTRAL_DIRECTORY_END = \"PK\\x05\\x06\";\nexports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = \"PK\\x06\\x07\";\nexports.ZIP64_CENTRAL_DIRECTORY_END = \"PK\\x06\\x06\";\nexports.DATA_DESCRIPTOR = \"PK\\x07\\x08\";\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/signature.js\n// module id = 36\n// module chunks = 0","'use strict';\n\nvar GenericWorker = require('./GenericWorker');\nvar crc32 = require('../crc32');\nvar utils = require('../utils');\n\n/**\n * A worker which calculate the crc32 of the data flowing through.\n * @constructor\n */\nfunction Crc32Probe() {\n GenericWorker.call(this, \"Crc32Probe\");\n this.withStreamInfo(\"crc32\", 0);\n}\nutils.inherits(Crc32Probe, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nCrc32Probe.prototype.processChunk = function (chunk) {\n this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);\n this.push(chunk);\n};\nmodule.exports = Crc32Probe;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/Crc32Probe.js\n// module id = 37\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('./GenericWorker');\n\n/**\n * A worker which calculate the total length of the data flowing through.\n * @constructor\n * @param {String} propName the name used to expose the length\n */\nfunction DataLengthProbe(propName) {\n GenericWorker.call(this, \"DataLengthProbe for \" + propName);\n this.propName = propName;\n this.withStreamInfo(propName, 0);\n}\nutils.inherits(DataLengthProbe, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nDataLengthProbe.prototype.processChunk = function (chunk) {\n if(chunk) {\n var length = this.streamInfo[this.propName] || 0;\n this.streamInfo[this.propName] = length + chunk.data.length;\n }\n GenericWorker.prototype.processChunk.call(this, chunk);\n};\nmodule.exports = DataLengthProbe;\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/DataLengthProbe.js\n// module id = 38\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('./GenericWorker');\n\n// the size of the generated chunks\n// TODO expose this as a public variable\nvar DEFAULT_BLOCK_SIZE = 16 * 1024;\n\n/**\n * A worker that reads a content and emits chunks.\n * @constructor\n * @param {Promise} dataP the promise of the data to split\n */\nfunction DataWorker(dataP) {\n GenericWorker.call(this, \"DataWorker\");\n var self = this;\n this.dataIsReady = false;\n this.index = 0;\n this.max = 0;\n this.data = null;\n this.type = \"\";\n\n this._tickScheduled = false;\n\n dataP.then(function (data) {\n self.dataIsReady = true;\n self.data = data;\n self.max = data && data.length || 0;\n self.type = utils.getTypeOf(data);\n if(!self.isPaused) {\n self._tickAndRepeat();\n }\n }, function (e) {\n self.error(e);\n });\n}\n\nutils.inherits(DataWorker, GenericWorker);\n\n/**\n * @see GenericWorker.cleanUp\n */\nDataWorker.prototype.cleanUp = function () {\n GenericWorker.prototype.cleanUp.call(this);\n this.data = null;\n};\n\n/**\n * @see GenericWorker.resume\n */\nDataWorker.prototype.resume = function () {\n if(!GenericWorker.prototype.resume.call(this)) {\n return false;\n }\n\n if (!this._tickScheduled && this.dataIsReady) {\n this._tickScheduled = true;\n utils.delay(this._tickAndRepeat, [], this);\n }\n return true;\n};\n\n/**\n * Trigger a tick a schedule an other call to this function.\n */\nDataWorker.prototype._tickAndRepeat = function() {\n this._tickScheduled = false;\n if(this.isPaused || this.isFinished) {\n return;\n }\n this._tick();\n if(!this.isFinished) {\n utils.delay(this._tickAndRepeat, [], this);\n this._tickScheduled = true;\n }\n};\n\n/**\n * Read and push a chunk.\n */\nDataWorker.prototype._tick = function() {\n\n if(this.isPaused || this.isFinished) {\n return false;\n }\n\n var size = DEFAULT_BLOCK_SIZE;\n var data = null, nextIndex = Math.min(this.max, this.index + size);\n if (this.index >= this.max) {\n // EOF\n return this.end();\n } else {\n switch(this.type) {\n case \"string\":\n data = this.data.substring(this.index, nextIndex);\n break;\n case \"uint8array\":\n data = this.data.subarray(this.index, nextIndex);\n break;\n case \"array\":\n case \"nodebuffer\":\n data = this.data.slice(this.index, nextIndex);\n break;\n }\n this.index = nextIndex;\n return this.push({\n data : data,\n meta : {\n percent : this.max ? this.index / this.max * 100 : 0\n }\n });\n }\n};\n\nmodule.exports = DataWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/DataWorker.js\n// module id = 39\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\nvar ConvertWorker = require('./ConvertWorker');\nvar GenericWorker = require('./GenericWorker');\nvar base64 = require('../base64');\nvar support = require(\"../support\");\nvar external = require(\"../external\");\n\nvar NodejsStreamOutputAdapter = null;\nif (support.nodestream) {\n try {\n NodejsStreamOutputAdapter = require('../nodejs/NodejsStreamOutputAdapter');\n } catch(e) {}\n}\n\n/**\n * Apply the final transformation of the data. If the user wants a Blob for\n * example, it's easier to work with an U8intArray and finally do the\n * ArrayBuffer/Blob conversion.\n * @param {String} type the name of the final type\n * @param {String|Uint8Array|Buffer} content the content to transform\n * @param {String} mimeType the mime type of the content, if applicable.\n * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format.\n */\nfunction transformZipOutput(type, content, mimeType) {\n switch(type) {\n case \"blob\" :\n return utils.newBlob(utils.transformTo(\"arraybuffer\", content), mimeType);\n case \"base64\" :\n return base64.encode(content);\n default :\n return utils.transformTo(type, content);\n }\n}\n\n/**\n * Concatenate an array of data of the given type.\n * @param {String} type the type of the data in the given array.\n * @param {Array} dataArray the array containing the data chunks to concatenate\n * @return {String|Uint8Array|Buffer} the concatenated data\n * @throws Error if the asked type is unsupported\n */\nfunction concat (type, dataArray) {\n var i, index = 0, res = null, totalLength = 0;\n for(i = 0; i < dataArray.length; i++) {\n totalLength += dataArray[i].length;\n }\n switch(type) {\n case \"string\":\n return dataArray.join(\"\");\n case \"array\":\n return Array.prototype.concat.apply([], dataArray);\n case \"uint8array\":\n res = new Uint8Array(totalLength);\n for(i = 0; i < dataArray.length; i++) {\n res.set(dataArray[i], index);\n index += dataArray[i].length;\n }\n return res;\n case \"nodebuffer\":\n return Buffer.concat(dataArray);\n default:\n throw new Error(\"concat : unsupported type '\" + type + \"'\");\n }\n}\n\n/**\n * Listen a StreamHelper, accumulate its content and concatenate it into a\n * complete block.\n * @param {StreamHelper} helper the helper to use.\n * @param {Function} updateCallback a callback called on each update. Called\n * with one arg :\n * - the metadata linked to the update received.\n * @return Promise the promise for the accumulation.\n */\nfunction accumulate(helper, updateCallback) {\n return new external.Promise(function (resolve, reject){\n var dataArray = [];\n var chunkType = helper._internalType,\n resultType = helper._outputType,\n mimeType = helper._mimeType;\n helper\n .on('data', function (data, meta) {\n dataArray.push(data);\n if(updateCallback) {\n updateCallback(meta);\n }\n })\n .on('error', function(err) {\n dataArray = [];\n reject(err);\n })\n .on('end', function (){\n try {\n var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);\n resolve(result);\n } catch (e) {\n reject(e);\n }\n dataArray = [];\n })\n .resume();\n });\n}\n\n/**\n * An helper to easily use workers outside of JSZip.\n * @constructor\n * @param {Worker} worker the worker to wrap\n * @param {String} outputType the type of data expected by the use\n * @param {String} mimeType the mime type of the content, if applicable.\n */\nfunction StreamHelper(worker, outputType, mimeType) {\n var internalType = outputType;\n switch(outputType) {\n case \"blob\":\n case \"arraybuffer\":\n internalType = \"uint8array\";\n break;\n case \"base64\":\n internalType = \"string\";\n break;\n }\n\n try {\n // the type used internally\n this._internalType = internalType;\n // the type used to output results\n this._outputType = outputType;\n // the mime type\n this._mimeType = mimeType;\n utils.checkSupport(internalType);\n this._worker = worker.pipe(new ConvertWorker(internalType));\n // the last workers can be rewired without issues but we need to\n // prevent any updates on previous workers.\n worker.lock();\n } catch(e) {\n this._worker = new GenericWorker(\"error\");\n this._worker.error(e);\n }\n}\n\nStreamHelper.prototype = {\n /**\n * Listen a StreamHelper, accumulate its content and concatenate it into a\n * complete block.\n * @param {Function} updateCb the update callback.\n * @return Promise the promise for the accumulation.\n */\n accumulate : function (updateCb) {\n return accumulate(this, updateCb);\n },\n /**\n * Add a listener on an event triggered on a stream.\n * @param {String} evt the name of the event\n * @param {Function} fn the listener\n * @return {StreamHelper} the current helper.\n */\n on : function (evt, fn) {\n var self = this;\n\n if(evt === \"data\") {\n this._worker.on(evt, function (chunk) {\n fn.call(self, chunk.data, chunk.meta);\n });\n } else {\n this._worker.on(evt, function () {\n utils.delay(fn, arguments, self);\n });\n }\n return this;\n },\n /**\n * Resume the flow of chunks.\n * @return {StreamHelper} the current helper.\n */\n resume : function () {\n utils.delay(this._worker.resume, [], this._worker);\n return this;\n },\n /**\n * Pause the flow of chunks.\n * @return {StreamHelper} the current helper.\n */\n pause : function () {\n this._worker.pause();\n return this;\n },\n /**\n * Return a nodejs stream for this helper.\n * @param {Function} updateCb the update callback.\n * @return {NodejsStreamOutputAdapter} the nodejs stream.\n */\n toNodejsStream : function (updateCb) {\n utils.checkSupport(\"nodestream\");\n if (this._outputType !== \"nodebuffer\") {\n // an object stream containing blob/arraybuffer/uint8array/string\n // is strange and I don't know if it would be useful.\n // I you find this comment and have a good usecase, please open a\n // bug report !\n throw new Error(this._outputType + \" is not supported by this method\");\n }\n\n return new NodejsStreamOutputAdapter(this, {\n objectMode : this._outputType !== \"nodebuffer\"\n }, updateCb);\n }\n};\n\n\nmodule.exports = StreamHelper;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/StreamHelper.js\n// module id = 40\n// module chunks = 0","var core = module.exports = {version: '2.3.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_core.js\n// module id = 41\n// module chunks = 0","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_ctx.js\n// module id = 42\n// module chunks = 0","var isObject = require('./_is-object')\n , document = require('./_global').document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_dom-create.js\n// module id = 43\n// module chunks = 0","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_fails.js\n// module id = 44\n// module chunks = 0","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // use fallback for big arrays to avoid stack overflow\n if (len < 65537) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/utils/strings.js\n// module id = 45\n// module chunks = 0","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/adler32.js\n// module id = 46\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/constants.js\n// module id = 47\n// module chunks = 0","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/crc32.js\n// module id = 48\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/zstream.js\n// module id = 49\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/*<replacement>*/\n\nvar processNextTick = require('process-nextick-args').nextTick;\n/*</replacement>*/\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar isArray = require('isarray');\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/*</replacement>*/\n\nvar BufferList = require('./internal/streams/BufferList');\nvar destroyImpl = require('./internal/streams/destroy');\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n processNextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = { hasUnpiped: false };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, unpipeInfo);\n }return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this, unpipeInfo);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n processNextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n processNextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n processNextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_readable.js\n// module id = 50\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) {\n return this.emit('error', new Error('write callback called multiple times'));\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n\n cb(er);\n\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function') {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n var _this2 = this;\n\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n _this2.emit('close');\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_transform.js\n// module id = 51\n// module chunks = 0","'use strict';\n\n/*<replacement>*/\n\nvar processNextTick = require('process-nextick-args').nextTick;\n/*</replacement>*/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n processNextTick(emitErrorNT, this, err);\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n processNextTick(emitErrorNT, _this, err);\n if (_this._writableState) {\n _this._writableState.errorEmitted = true;\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/internal/streams/destroy.js\n// module id = 52\n// module chunks = 0","module.exports = require('events').EventEmitter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/internal/streams/stream-browser.js\n// module id = 53\n// module chunks = 0","'use strict';\n\nvar Buffer = require('safe-buffer').Buffer;\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return -1;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// UTF-8 replacement characters ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd'.repeat(p);\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd'.repeat(p + 1);\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd'.repeat(p + 2);\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character for each buffered byte of a (partial)\n// character needs to be added to the output.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd'.repeat(this.lastTotal - this.lastNeed);\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/string_decoder/lib/string_decoder.js\n// module id = 54\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _util = require('./lib/util');\n\nrequire('./lib/vendor/hidpi-canvas');\n\nvar _mouse = require('./lib/mouse');\n\nvar _mouse2 = _interopRequireDefault(_mouse);\n\nvar _color = require('./lib/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar w = void 0,\n h = void 0;\nvar rx = void 0,\n ry = void 0;\n\nvar pixels_per_second = 512; // 1024\n\nvar canvas = document.createElement('canvas');\n// document.body.appendChild(canvas)\n// document.body.addEventListener('resize', resize)\nresize();\nrecenter();\nrequestAnimationFrame(animate);\n\n// must request context after resizing\nvar ctx = canvas.getContext('2d');\n\nvar scratch = document.createElement('canvas');\nvar scratchCtx = scratch.getContext('2d-lodpi');\n\nfunction resize(ww, hh) {\n w = canvas.width = ww || window.innerWidth;\n h = canvas.height = hh || window.innerHeight;\n canvas.style.width = w + 'px';\n canvas.style.height = h + 'px';\n}\nfunction recenter() {\n rx = (0, _util.randint)(w), ry = (0, _util.randint)(h);\n}\nvar frame = null;\nfunction onFrame(fn) {\n frame = fn;\n}\nfunction animate(t) {\n requestAnimationFrame(animate);\n if (frame) {\n frame(t);\n frame = null;\n }\n // ctx.save()\n // ctx.globalAlpha = 0.0001\n // ctx.translate(w/2, h/2)\n // ctx.rotate(0.1)\n // ctx.translate(-rx, -ry)\n // ctx.drawImage(canvas, 0, 0)\n // ctx.restore()\n}\nfunction clear(n, x, y, ww, hh) {\n ctx.fillStyle = 'rgba(255,255,255,' + (n || 0.9) + ')';\n ctx.fillRect(x || 0, y || 0, ww || w, hh || h);\n recenter();\n}\nfunction triangle(px, py, r) {\n setTimeout(function () {\n return tri(px, py, r);\n }, Math.random() * 10);\n // setTimeout( () => tri(px,py,r), Math.random()*200)\n // setTimeout( () => tri(px,py,r), Math.random()*300)\n}\nfunction tri(px, py, r) {\n ctx.save();\n ctx.globalCompositeOperation = 'multiply';\n ctx.fillStyle = _color2.default.color((px + py) / (w + h), 0, 1, 0.2);\n function p() {\n var theta = (0, _util.randrange)(0, Math.PI * 2);\n var x = px + Math.cos(theta) * r;\n var y = py + Math.sin(theta) * r;\n return { x: x, y: y };\n }\n ctx.beginPath();\n var p0 = p(),\n p1 = p(),\n p2 = p();\n ctx.moveTo(p0.x, p0.y);\n ctx.lineTo(p1.x, p1.y);\n ctx.lineTo(p2.x, p2.y);\n ctx.lineTo(p0.x, p0.y);\n ctx.fill();\n ctx.restore();\n}\nfunction line(y) {\n ctx.beginPath();\n ctx.moveTo(0, y);\n ctx.lineTo(w, y);\n ctx.strokeStyle = \"#888\";\n ctx.strokeWidth = 1;\n ctx.stroke();\n}\nfunction dot(x, y, r) {\n ctx.fillStyle = \"#f00\";\n ctx.beginPath();\n ctx.moveTo(x, y);\n ctx.arc(x, y, r, 0, 2 * Math.PI);\n ctx.fill();\n}\nfunction waveform(pcm, sr, pos, zoom) {\n sr = sr || 44100;\n pos = pos || 0;\n\n var width = w;\n var height = Math.floor(h / 4);\n var half_height = Math.floor(height / 2);\n var x0 = 0;\n var y0 = 20;\n var ymid = y0 + half_height;\n var max_width_in_seconds = width / pixels_per_second;\n var max_width_in_samples = max_width_in_seconds * sr;\n var pcm_length = pcm.length;\n var len = Math.min(pcm_length, max_width_in_samples);\n var pcm_step = sr / pixels_per_second;\n var i;\n ctx.save();\n\n clear(1, x0, y0, width, height);\n\n line(ymid);\n ctx.beginPath();\n for (i = 0; i < width; i += 0.5) {\n var si = Math.floor(pcm_step * i + pos);\n if (si > pcm_length) break;\n var val = pcm[si]; // -1, 1\n // ctx.moveTo(x0 + i, ymid)\n ctx.lineTo(x0 + i, ymid + val * half_height);\n }\n ctx.strokeStyle = \"rgba(250,20,0,0.9)\";\n ctx.strokeWidth = 1;\n ctx.stroke();\n ctx.restore();\n}\n\nfunction spectrum(spec, x0, y0, ww, hh) {\n var data = spec.data;\n var fft_size = spec.fft_size;\n var half_fft_size = spec.fft_size / 2;\n var spec_len = data.length;\n\n scratch.width = data.length;\n scratch.height = half_fft_size;\n\n var imageData = ctx.createImageData(scratch.width, scratch.height);\n var pixels = imageData.data;\n\n var i = void 0,\n j = void 0,\n u = void 0,\n v = void 0,\n _r = void 0,\n _i = void 0,\n col = void 0,\n hsl = void 0;\n\n for (i = 0; i < spec_len; i++) {\n col = data[i];\n\n for (j = 0; j < half_fft_size; j++) {\n u = ((half_fft_size - j) * spec_len + i) * 4;\n v = j * 2;\n _r = col[v];\n _i = (0, _util.mod)(col[v + 1], Math.PI * 2) / (Math.PI * 2);\n hsl = _color2.default.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10));\n // red - real part\n // pixels[u] = _r * 127 + 127\n // // green - imag part\n // pixels[u+1] = _i * 127 + 127\n // // blue - magnitude\n // pixels[u+2] = Math.sqrt(Math.pow(_r, 2) + Math.pow(_i, 2)) * 128 + 127\n // pixels[u+3] = 255\n pixels[u] = hsl[0];\n pixels[u + 1] = hsl[1];\n pixels[u + 2] = hsl[2];\n pixels[u + 3] = 255;\n }\n }\n\n scratchCtx.putImageData(imageData, 0, 0);\n\n var pcm_length = spec.fft_overlap * spec_len;\n\n x0 = x0 * devicePixelRatio || 0;\n y0 = y0 * devicePixelRatio || Math.floor(h / 4);\n ww = ww * devicePixelRatio || w;\n hh = hh * devicePixelRatio || h / 4;\n\n var width = Math.round(pcm_length / spec.sr * pixels_per_second);\n var height = Math.floor(hh);\n\n ctx.save();\n clear(1, x0, y0, w, height);\n ctx.drawImage(scratch, x0, y0, width, height);\n ctx.restore();\n}\nfunction raw_spectrum(spec, x0, y0, ww, hh, def_min_r, def_min_i) {\n var data = spec.data;\n var fft_size = spec.fft_size;\n var half_fft_size = spec.fft_size / 2;\n var spec_len = data.length;\n\n var _scratch = document.createElement('canvas');\n var _scratchCtx = _scratch.getContext('2d-lodpi');\n _scratch.width = data.length;\n _scratch.height = half_fft_size;\n // console.log(\"spectrum w/h:\", _scratch.width, _scratch.height)\n\n var imageData = _scratchCtx.createImageData(_scratch.width, _scratch.height);\n var pixels = imageData.data;\n\n var i = void 0,\n j = void 0,\n u = void 0,\n v = void 0,\n _r = void 0,\n _i = void 0,\n col = void 0,\n hsl = void 0;\n // let min_r = Infinity, max_r = -Infinity\n // let min_i = Infinity, max_i = -Infinity\n\n // determined empirically..\n // let min_r = -60.4894057005308\n // let max_r = 107.23800966675353\n // let min_i = -59.4894057005308\n // let max_i = 108.23800966675353\n var min_r = -def_min_r;\n var max_r = def_min_r;\n var min_i = -def_min_i;\n var max_i = def_min_i;\n var delta_r = max_r - min_r;\n var delta_i = max_i - min_i;\n var mean_r = 0;\n var mean_i = 0;\n var sum_mean_r = 0,\n sum_mean_i = 0;\n var real = void 0,\n imag = void 0;\n\n for (i = 0; i < spec_len; i++) {\n col = data[i];\n mean_r = 0;\n mean_i = 0;\n\n for (j = 0; j < half_fft_size; j++) {\n u = (j * spec_len + i) * 4;\n v = j * 2;\n real = col[v];\n imag = col[v + 1];\n mean_r += real;\n mean_i += imag;\n _r = (0, _util.clamp)((real - min_r) / delta_r * 255, 0, 255);\n _i = (0, _util.clamp)((imag - min_i) / delta_i * 255, 0, 255);\n\n // hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10))\n pixels[u + 0] = _r;\n pixels[u + 1] = _i;\n pixels[u + 2] = 127; // hsl[2]\n pixels[u + 3] = 255;\n\n // min_r = Math.min(min_r, col[v])\n // max_r = Math.max(max_r, col[v])\n // min_i = Math.min(min_i, col[v]+1)\n // max_i = Math.max(max_i, col[v]+1)\n }\n mean_r /= half_fft_size;\n mean_i /= half_fft_size;\n sum_mean_r += mean_r;\n sum_mean_i += mean_i;\n }\n\n sum_mean_r /= spec_len;\n sum_mean_i /= spec_len;\n // console.log(sum_mean_r, sum_mean_i)\n // console.log(\"r:\", min_r, max_r)\n // console.log(\"i:\", min_i, max_i)\n _scratchCtx.putImageData(imageData, 0, 0);\n\n return { canvas: _scratch, imageData: imageData };\n}\n\nexports.default = {\n canvas: canvas, ctx: ctx, onFrame: onFrame, resize: resize,\n triangle: triangle, clear: clear, line: line, dot: dot,\n waveform: waveform, spectrum: spectrum, raw_spectrum: raw_spectrum\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/draw.js\n// module id = 55\n// module chunks = 0","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar keys = {};\nvar key_numbers = {};\nvar letters = \"yxcvbnmasdfghjklqwertuiopz\";\nvar numbers = \"1234567890\";\n\nvar callback = function callback() {};\n\nletters.toUpperCase().split(\"\").map(function (k, i) {\n keys[k.charCodeAt(0)] = i;\n});\n\nkeys['Z'.charCodeAt(0)] = 0;\n\nnumbers.split(\"\").map(function (k, i) {\n keys[k.charCodeAt(0)] = i + letters.length;\n key_numbers[k.charCodeAt(0)] = true;\n});\n\nwindow.addEventListener(\"keydown\", keydown, true);\nfunction keydown(e) {\n if (e.altKey || e.ctrlKey || e.metaKey) {\n e.stopPropagation();\n return;\n }\n if (document.activeElement instanceof HTMLInputElement && e.keyCode in key_numbers) {\n e.stopPropagation();\n return;\n }\n if (!(e.keyCode in keys)) return;\n var index = keys[e.keyCode];\n if (e.shiftKey) index += letters.length;\n index -= 7;\n callback(index);\n}\n\nfunction listen(fn) {\n callback = fn;\n}\n\nexports.default = { listen: listen };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/keys.js\n// module id = 56\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// const compressor = new Tone.Compressor(-30, 3).toMaster()\n\nvar compressor = new _tone2.default.Compressor(-30, 3).toMaster();\nvar gain = new _tone2.default.Gain(1).connect(compressor);\n\nexports.default = gain;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/output.js\n// module id = 57\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _util = require('./util');\n\nvar _signalWindows = require('signal-windows');\n\nvar _fft = require('fft.js');\n\nvar _fft2 = _interopRequireDefault(_fft);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fft_size = 512;\nvar fft_overlap = fft_size / 4;\n\nvar fft = new _fft2.default(fft_size);\n\nfunction toSpectrum(pcm, sr) {\n sr = sr || 44100;\n var ham = _signalWindows.windows.construct('ham', fft_size);\n var pcm_in = new Array(fft_size);\n var pcm_length = pcm.length;\n var pcm_q_length = Math.ceil(pcm_length / fft_size) * fft_size;\n var i = void 0,\n j = void 0,\n fft_out = void 0,\n data = [];\n for (i = -fft_size; i < pcm_q_length; i += fft_overlap) {\n for (j = 0; j < fft_size; j++) {\n pcm_in[j] = pcm[i + j] * ham[j] || 0;\n }\n fft_out = fft.createComplexArray();\n fft.realTransform(fft_out, pcm_in);\n fft.completeSpectrum(fft_out);\n data.push(fft_out);\n }\n return {\n data: data,\n sr: sr,\n fft_size: fft_size,\n fft_overlap: fft_overlap\n };\n}\n\nfunction fromSpectrum(spec) {\n var data = spec.data;\n var sr = spec.sr;\n var fft_size = spec.fft_size;\n var fft_overlap = spec.fft_overlap;\n var spec_len = data.length;\n\n var ham = _signalWindows.windows.construct('ham', fft_size);\n var out = fft.createComplexArray();\n var pcm_length = fft_overlap * spec_len;\n\n var audioBuffer = _tone2.default.context.createBuffer(1, pcm_length, sr);\n var pcm = audioBuffer.getChannelData(0);\n\n var i = void 0,\n j = void 0,\n u = void 0,\n col = void 0;\n\n for (i = 0; i < spec_len; i++) {\n col = data[i];\n // for (j = fft_size; j < fft_size << 1; j++) {\n // col[j] = 0\n // }\n // if (i == 0) console.log(col)\n fft.inverseTransform(out, col);\n u = i * fft_overlap;\n for (j = 0; j < fft_size; j++) {\n pcm[u + j] += out[j * 2] * ham[j] || 0;\n }\n }\n\n fadeInOut(pcm, fft_size);\n // console.log(pcm)\n return audioBuffer;\n}\n\nfunction fromImageData(imageData, sr, _r, _i) {\n var pixels = imageData.data;\n var w = imageData.width;\n var h = imageData.height;\n var data = new Array(w);\n var x = void 0,\n y = void 0,\n u = void 0,\n v = void 0,\n v2 = void 0;\n for (y = 0; y < h; y++) {\n var col = data[y] = new Float32Array(h * 4);\n for (x = 0; x < w; x++) {\n u = (x * w + y) * 4;\n v = x * 2;\n col[v] = (pixels[u] / 255 - 0.5) * _r;\n col[v + 1] = (pixels[u + 1] / 255 - 0.5) * _i;\n v2 = (h - y + h) * 2;\n col[v2] = col[v];\n col[v2 + 1] = 0; // col[v+1]\n }\n col[h * 2] = col[h * 2 + 1] = col[h * 2 - 1] = col[h * 2 - 2] = 0;\n }\n var spec = {\n data: data,\n sr: sr,\n fft_size: fft_size, fft_overlap: fft_overlap\n };\n return spec;\n}\n\nfunction binToHz(spec, i) {\n return i / spec.fft_size * spec.sr;\n}\n\nfunction fadeInOut(pcm, fade_size) {\n var pcm_length = pcm.length;\n var fade = 0,\n i = void 0;\n for (i = 0; i < fade_size; i++) {\n fade = i / fade_size;\n fade *= fade;\n pcm[i] *= fade;\n pcm[pcm_length - i] *= fade;\n }\n}\nfunction rotatePhase(spec, theta) {\n var data = spec.data,\n fft_size = spec.fft_size;\n\n var i = void 0,\n j = void 0,\n col = void 0,\n len = data.length;\n for (i = 0; i < len; i++) {\n col = data[i];\n for (j = 0; j < fft_size; j++) {\n col[j * 2 + 1] += theta;\n }\n }\n return spec;\n}\n\nfunction linearBins(spec, n) {\n n = n || 1;\n\n var bins = [],\n i = void 0,\n q_i = void 0;\n for (q_i = 0; q_i < n; q_i++) {\n bins[q_i] = [];\n }\n var step = Math.floor(spec.fft_size / n);\n var len_quantize_n = (0, _util.quantize)(spec.fft_size, n);\n for (i = 0; i < len_quantize_n; i++) {\n q_i = Math.floor(i / step);\n bins[q_i] = bins[q_i] || [];\n bins[q_i].push(i);\n }\n // leftover bins get put at end\n for (; i < spec.fft_size; i++) {\n bins[q_i].push(i);\n }\n return bins;\n}\nfunction logarithmicBins(spec) {\n var bins = [],\n i = void 0,\n j = void 0,\n q_i = void 0;\n var binCount = Math.log2(spec.fft_size) - 1;\n for (i = 0, q_i = 0, j = 0; i < binCount; i++) {\n j += 1 << i;\n bins[i] = [];\n for (; q_i < j; q_i++) {\n bins[i].push(q_i);\n }\n }\n return bins;\n}\nfunction concatBins(bins) {\n return bins.reduce(function (acc, cv) {\n return acc.concat(cv);\n }, []);\n}\nfunction reverseBins(bins) {\n return bins.map(function (bin) {\n return bin.reverse();\n });\n}\nfunction minBins(bins) {\n return bins.map(function (bin) {\n var b = bin[0];\n return bin.map(function () {\n return b;\n });\n });\n}\nfunction maxBins(bins) {\n return bins.map(function (bin) {\n var b = bin[bin.length - 1];\n return bin.map(function () {\n return b;\n });\n });\n}\nfunction rotateSpectrum(spec, n) {\n var fft_size = spec.fft_size;\n\n if (n && n < 1) {\n n -= 0.5;\n n *= fft_size;\n }\n n = Math.floor(n);\n var order = new Array(fft_size),\n i = void 0;\n for (i = 0; i < fft_size; i++) {\n order[i] = (0, _util.mod)(i + n, fft_size / 2);\n }\n return reorderBins(spec, order);\n}\nfunction cloneSpectrum(spec) {\n var data = spec.data,\n fft_size = spec.fft_size,\n sr = spec.sr,\n fft_overlap = spec.fft_overlap;\n\n var spec_len = data.length;\n\n var new_data = new Array(spec_len);\n var i = void 0;\n for (i = 0; i < spec_len; i++) {\n new_data[i] = data[i].concat();\n new_data[i][2] = 0;\n }\n\n return {\n data: new_data,\n fft_size: fft_size,\n sr: sr, fft_overlap: fft_overlap\n };\n}\nfunction reverseSpectrum(spec) {\n var new_spec = cloneSpectrum(spec);\n new_spec.data = new_spec.data.reverse();\n return new_spec;\n}\nfunction shuffleSpectrum(spec) {\n var fft_size = spec.fft_size;\n\n var order = new Array(fft_size),\n i = void 0;\n for (i = 0; i < fft_size; i++) {\n order[i] = i;\n }\n (0, _util.shuffle)(order);\n return reorderBins(spec, order);\n}\nfunction invertSpectrum(spec) {\n var fft_size = spec.fft_size;\n\n var order = new Array(fft_size),\n i = void 0;\n for (i = 0; i < fft_size; i++) {\n order[i] = fft_size - i - 1;\n }\n return reorderBins(spec, order);\n}\nfunction reorderBins(spec, order) {\n var new_spec = cloneSpectrum(spec);\n var data = spec.data,\n sr = spec.sr,\n fft_size = spec.fft_size,\n fft_overlap = spec.fft_overlap;\n\n var spec_len = data.length;\n var new_data = new_spec.data;\n\n\n var i = void 0,\n j = void 0,\n col = void 0,\n new_col = void 0;\n for (j = order.length; j < fft_size; j++) {\n order[j] = j;\n }\n\n for (i = 0; i < spec_len; i++) {\n col = data[i];\n new_col = new_data[i] = data[i].concat();\n col[0] = 0;\n col[2] = 0;\n col[4] = 0;\n for (j = 0; j < fft_size / 2; j++) {\n new_col[j * 2] = col[order[j] * 2];\n new_col[j * 2 + 1] = col[order[j] * 2 + 1];\n }\n for (; j < fft_size; j++) {\n new_col[j * 2] = 0;\n new_col[j * 2 + 1] = 0;\n }\n }\n\n return {\n data: new_data,\n sr: sr, fft_size: fft_size, fft_overlap: fft_overlap\n };\n}\n\nexports.default = {\n toSpectrum: toSpectrum, fromSpectrum: fromSpectrum, fromImageData: fromImageData, binToHz: binToHz,\n fadeInOut: fadeInOut,\n cloneSpectrum: cloneSpectrum,\n reverseSpectrum: reverseSpectrum, shuffleSpectrum: shuffleSpectrum, invertSpectrum: invertSpectrum, rotateSpectrum: rotateSpectrum,\n reorderBins: reorderBins,\n linearBins: linearBins, logarithmicBins: logarithmicBins,\n concatBins: concatBins,\n reverseBins: reverseBins, minBins: minBins, maxBins: maxBins,\n rotatePhase: rotatePhase\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/spectrum.js\n// module id = 58\n// module chunks = 0","'use strict';\n\n/**\n * Representation a of zip file in js\n * @constructor\n */\nfunction JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}\nJSZip.prototype = require('./object');\nJSZip.prototype.loadAsync = require('./load');\nJSZip.support = require('./support');\nJSZip.defaults = require('./defaults');\n\n// TODO find a better way to handle this version,\n// a require('package.json').version doesn't work with webpack, see #327\nJSZip.version = \"3.1.5\";\n\nJSZip.loadAsync = function (content, options) {\n return new JSZip().loadAsync(content, options);\n};\n\nJSZip.external = require(\"./external\");\nmodule.exports = JSZip;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/index.js\n// module id = 59\n// module chunks = 0","'use strict';\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _jszip = require('jszip');\n\nvar _jszip2 = _interopRequireDefault(_jszip);\n\nvar _sprintfJs = require('sprintf-js');\n\nvar _fileSaver = require('file-saver');\n\nvar _fileSaver2 = _interopRequireDefault(_fileSaver);\n\nvar _draw = require('./draw');\n\nvar _draw2 = _interopRequireDefault(_draw);\n\nvar _keys = require('./lib/keys');\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _mouse = require('./lib/mouse');\n\nvar _mouse2 = _interopRequireDefault(_mouse);\n\nvar _output = require('./lib/output');\n\nvar _output2 = _interopRequireDefault(_output);\n\nvar _spectrum = require('./lib/spectrum');\n\nvar _spectrum2 = _interopRequireDefault(_spectrum);\n\nvar _util = require('./lib/util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar selfDrag = false;\nvar buffer = void 0;\nvar players = [];\nvar gallery = void 0;\nvar sr = 44100;\nvar last_i = 0;\nvar _r = 8,\n _i = 8;\nfunction init() {\n (0, _util.requestAudioContext)(ready);\n document.body.addEventListener('dragover', dragover);\n document.body.addEventListener('dragstart', dragstart);\n document.body.addEventListener('drop', drop);\n document.querySelector(\"#upload\").addEventListener('change', handleFileSelect);\n // draw.onFrame(() => {})\n _draw2.default.resize(256, 256);\n\n gallery = document.querySelector('#gallery');\n _mouse2.default.register({\n move: function move(x, y) {}\n });\n _keys2.default.listen(function (z) {\n // console.log(z)\n play((0, _util.mod)(z, players.length));\n });\n}\nfunction ready() {}\nfunction dragover(e) {\n e.preventDefault();\n}\nfunction dragstart(e) {\n selfDrag = true;\n}\nfunction drop(e) {\n e.stopPropagation();\n e.preventDefault();\n\n if (e.dataTransfer && !selfDrag) {\n if (e.dataTransfer.files.length) {\n handleFileSelect(e);\n }\n } else {\n handleFileSelect(e);\n }\n selfDrag = false;\n}\nfunction handleFileSelect(e) {\n var files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n var file = files[0];\n // console.log(files, file)\n if (!file) return;\n load(file);\n}\nfunction load(file) {\n players = [];\n buffer = new _tone2.default.Buffer(URL.createObjectURL(file), loadBuffer, function (err) {\n return console.error('err', err);\n });\n}\nfunction loadBuffer() {\n console.log('loaded buffer', buffer);\n var pcm = buffer._buffer.getChannelData(0);\n sr = buffer._buffer.sampleRate;\n if (!pcm) return;\n\n var FRAME_LENGTH = 126 * 255;\n var FRAME_OFFSET = FRAME_LENGTH / 8;\n\n var zip = new _jszip2.default();\n\n var zip_folder = zip.folder(\"images\");\n\n for (var offset = 0, count = 0, _len = pcm.length; offset < _len; offset += FRAME_OFFSET, count += 1) {\n // console.log('generating', count, offset)\n var player = render(pcm.slice(offset, offset + FRAME_LENGTH), count, zip_folder);\n register(player, count);\n // if (count > 20) break\n }\n\n console.log('done exporting');\n // zip.generateAsync({type:\"blob\"}).then(function(content) {\n // console.log('saving zip')\n // FileSaver.saveAs(content, \"img2pix.zip\")\n // })\n play(0);\n}\nfunction render(pcm, count, zip) {\n var fft = _spectrum2.default.toSpectrum(pcm, sr);\n // console.log('render', fft)\n // const pcm_rev = pcm.slice().reverse()\n // const spec_rev = spectrum.toSpectrum(pcm_rev, spec.sr)\n _draw2.default.clear();\n\n var _draw$raw_spectrum = _draw2.default.raw_spectrum(fft, 0, 256, 0, 256, _r, _i),\n canvas = _draw$raw_spectrum.canvas,\n imageData = _draw$raw_spectrum.imageData;\n\n var dataURL = canvas.toDataURL(\"image/png\");\n if (zip) {\n var fn = (0, _sprintfJs.sprintf)('frame_%05d.png', count);\n zip.file(fn, dataURL.split(',')[1], { base64: true });\n }\n return { fft: fft, canvas: canvas, imageData: imageData, dataURL: dataURL };\n}\nfunction play(i) {\n // console.log('play', i)\n last_i = i;\n var player = players[(0, _util.clamp)(i, 0, players.length)];\n // const { canvas, imageData } = draw.raw_spectrum(fft, 0, 256, 0, 256, 1, 1)\n // console.log(_r, _i)\n // const { canvas, imageData } = draw.raw_spectrum(player.fft, 0, 256, 0, 256, _r, _i)\n var new_fft = _spectrum2.default.fromImageData(player.imageData, 44100, _r, _i);\n // gallery.innerHTML = ''\n\n // console.log(player.fft.data, new_fft.data)\n var buf = _spectrum2.default.fromSpectrum(new_fft);\n var _p = new _tone2.default.Player(buf);\n _p.connect(_output2.default);\n _p.start(_tone2.default.now());\n redraw(new_fft);\n}\nfunction redraw(new_fft) {\n var _draw$raw_spectrum2 = _draw2.default.raw_spectrum(new_fft, 0, 256, 0, 256, _r, _i),\n canvas = _draw$raw_spectrum2.canvas,\n imageData = _draw$raw_spectrum2.imageData;\n}\nfunction register(player, i) {\n // console.log('register', player)\n players.push(player);\n player.canvas.addEventListener('click', function () {\n play(i);\n });\n gallery.appendChild(player.canvas);\n}\ninit();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/index.js\n// module id = 60\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar palettes = [[[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [1.0, 1.0, 1.0], [0.00, 0.33, 0.67]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [1.0, 1.0, 1.0], [0.00, 0.10, 0.20]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [1.0, 1.0, 1.0], [0.30, 0.20, 0.20]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [1.0, 1.0, 0.5], [0.80, 0.90, 0.30]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [1.0, 0.7, 0.4], [0.00, 0.15, 0.20]], [[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [2.0, 1.0, 0.0], [0.50, 0.20, 0.25]], [[0.8, 0.5, 0.4], [0.2, 0.4, 0.2], [2.0, 1.0, 1.0], [0.00, 0.25, 0.25]]];\n\nvar palette = palettes[0];\n\nfunction channel(t, a, b, c, d, add, mul) {\n return a + b * Math.cos(2 * Math.PI * (c * t + d)) * mul + add;\n}\n\nfunction color(t, add, mul, alpha) {\n add = add || 0;\n mul = mul || 1;\n var a = void 0,\n b = void 0,\n c = void 0,\n d = void 0;\n var rgb = [];\n for (var i = 0; i < 3; i++) {\n a = palette[0][i];\n b = palette[1][i];\n c = palette[2][i];\n d = palette[3][i];\n rgb[i] = Math.round(channel(t, a, b, c, d, add, mul) * 255);\n }\n return 'rgba(' + rgb + ',' + alpha + ')';\n}\n\nfunction hsl2rgb(H, S, L) {\n var R, G, B;\n var var_1, var_2;\n if (S == 0) {\n //HSL from 0 to 1\n R = L * 255; //RGB results from 0 to 255\n G = L * 255;\n B = L * 255;\n } else {\n if (L < 0.5) var_2 = L * (1 + S);else var_2 = L + S - S * L;\n\n var_1 = 2 * L - var_2;\n\n R = 255 * hue2rgb(var_1, var_2, H + 1 / 3);\n G = 255 * hue2rgb(var_1, var_2, H);\n B = 255 * hue2rgb(var_1, var_2, H - 1 / 3);\n }\n return [R, G, B];\n}\nfunction hue2rgb(v1, v2, vH) {\n if (vH < 0) vH += 1;\n if (vH > 1) vH -= 1;\n if (6 * vH < 1) return v1 + (v2 - v1) * 6 * vH;\n if (2 * vH < 1) return v2;\n if (3 * vH < 2) return v1 + (v2 - v1) * (2 / 3 - vH) * 6;\n return v1;\n}\n\nexports.default = { color: color, hsl2rgb: hsl2rgb };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/color.js\n// module id = 61\n// module chunks = 0","\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * StartAudioContext.js\n * @author Yotam Mann\n * @license http://opensource.org/licenses/MIT MIT License\n * @copyright 2016 Yotam Mann\n */\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && module.exports) {\n module.exports = factory();\n } else {\n root.StartAudioContext = factory();\n }\n})(undefined, function () {\n\n /**\n * The StartAudioContext object\n */\n var StartAudioContext = {\n /**\n * The audio context passed in by the user\n * @type {AudioContext}\n */\n context: null,\n /**\n * The TapListeners bound to the elements\n * @type {Array}\n * @private\n */\n _tapListeners: [],\n /**\n * Callbacks to invoke when the audio context is started\n * @type {Array}\n * @private\n */\n _onStarted: []\n };\n\n /**\n * Set the context\n * @param {AudioContext} ctx\n * @returns {StartAudioContext}\n */\n StartAudioContext.setContext = function (ctx) {\n StartAudioContext.context = ctx;\n return StartAudioContext;\n };\n\n /**\n * Add a tap listener to the audio context\n * @param {Array|Element|String|jQuery} element\n * @returns {StartAudioContext}\n */\n StartAudioContext.on = function (element) {\n if (Array.isArray(element) || NodeList && element instanceof NodeList) {\n for (var i = 0; i < element.length; i++) {\n StartAudioContext.on(element[i]);\n }\n } else if (typeof element === \"string\") {\n StartAudioContext.on(document.querySelectorAll(element));\n } else if (element.jquery && typeof element.toArray === \"function\") {\n StartAudioContext.on(element.toArray());\n } else if (Element && element instanceof Element) {\n //if it's an element, create a TapListener\n var tap = new TapListener(element, onTap);\n StartAudioContext._tapListeners.push(tap);\n }\n return StartAudioContext;\n };\n\n /**\n * Bind a callback to when the audio context is started. \n * @param {Function} cb\n * @return {StartAudioContext}\n */\n StartAudioContext.onStarted = function (cb) {\n //if it's already started, invoke the callback\n if (StartAudioContext.isStarted()) {\n cb();\n } else {\n StartAudioContext._onStarted.push(cb);\n }\n return StartAudioContext;\n };\n\n /**\n * returns true if the context is started\n * @return {Boolean}\n */\n StartAudioContext.isStarted = function () {\n return StartAudioContext.context !== null && StartAudioContext.context.state === \"running\";\n };\n\n /**\n * @class Listens for non-dragging tap ends on the given element\n * @param {Element} element\n * @internal\n */\n var TapListener = function TapListener(element) {\n\n this._dragged = false;\n\n this._element = element;\n\n this._bindedMove = this._moved.bind(this);\n this._bindedEnd = this._ended.bind(this);\n\n element.addEventListener(\"touchmove\", this._bindedMove);\n element.addEventListener(\"touchend\", this._bindedEnd);\n element.addEventListener(\"mouseup\", this._bindedEnd);\n };\n\n /**\n * drag move event\n */\n TapListener.prototype._moved = function (e) {\n this._dragged = true;\n };\n\n /**\n * tap ended listener\n */\n TapListener.prototype._ended = function (e) {\n if (!this._dragged) {\n onTap();\n }\n this._dragged = false;\n };\n\n /**\n * remove all the bound events\n */\n TapListener.prototype.dispose = function () {\n this._element.removeEventListener(\"touchmove\", this._bindedMove);\n this._element.removeEventListener(\"touchend\", this._bindedEnd);\n this._element.removeEventListener(\"mouseup\", this._bindedEnd);\n this._bindedMove = null;\n this._bindedEnd = null;\n this._element = null;\n };\n\n /**\n * Invoked the first time of the elements is tapped.\n * Creates a silent oscillator when a non-dragging touchend \n * event has been triggered.\n */\n function onTap() {\n //start the audio context with a silent oscillator\n if (StartAudioContext.context && !StartAudioContext.isStarted()) {\n var osc = StartAudioContext.context.createOscillator();\n var silent = StartAudioContext.context.createGain();\n silent.gain.value = 0;\n osc.connect(silent);\n silent.connect(StartAudioContext.context.destination);\n var now = StartAudioContext.context.currentTime;\n osc.start(now);\n osc.stop(now + 0.5);\n }\n\n //dispose all the tap listeners\n if (StartAudioContext._tapListeners) {\n for (var i = 0; i < StartAudioContext._tapListeners.length; i++) {\n StartAudioContext._tapListeners[i].dispose();\n }\n StartAudioContext._tapListeners = null;\n }\n //the onstarted callbacks\n if (StartAudioContext._onStarted) {\n for (var j = 0; j < StartAudioContext._onStarted.length; j++) {\n StartAudioContext._onStarted[j]();\n }\n StartAudioContext._onStarted = null;\n }\n }\n\n return StartAudioContext;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/startAudioContext.js\n// module id = 62\n// module chunks = 0","'use strict';\n\n/**\n * HiDPI Canvas Polyfill (1.0.10)\n *\n * Author: Jonathan D. Johnson (http://jondavidjohn.com)\n * Homepage: https://github.com/jondavidjohn/hidpi-canvas-polyfill\n * Issue Tracker: https://github.com/jondavidjohn/hidpi-canvas-polyfill/issues\n * License: Apache-2.0\n*/\n(function (prototype) {\n\n\tvar pixelRatio = function () {\n\t\tvar canvas = window.document.createElement('canvas'),\n\t\t context = canvas.getContext('2d'),\n\t\t backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n\n\t\treturn (window.devicePixelRatio || 1) / backingStore;\n\t}(),\n\t forEach = function forEach(obj, func) {\n\t\tfor (var p in obj) {\n\t\t\tif (obj.hasOwnProperty(p)) {\n\t\t\t\tfunc(obj[p], p);\n\t\t\t}\n\t\t}\n\t},\n\t ratioArgs = {\n\t\t'fillRect': 'all',\n\t\t'clearRect': 'all',\n\t\t'strokeRect': 'all',\n\t\t'moveTo': 'all',\n\t\t'lineTo': 'all',\n\t\t'arc': [0, 1, 2],\n\t\t'arcTo': 'all',\n\t\t'bezierCurveTo': 'all',\n\t\t'isPointinPath': 'all',\n\t\t'isPointinStroke': 'all',\n\t\t'quadraticCurveTo': 'all',\n\t\t'rect': 'all',\n\t\t'translate': 'all',\n\t\t'createRadialGradient': 'all',\n\t\t'createLinearGradient': 'all'\n\t};\n\n\tif (pixelRatio === 1) return;\n\n\tforEach(ratioArgs, function (value, key) {\n\t\tprototype[key] = function (_super) {\n\t\t\treturn function () {\n\t\t\t\tvar i,\n\t\t\t\t len,\n\t\t\t\t args = Array.prototype.slice.call(arguments);\n\n\t\t\t\tif (value === 'all') {\n\t\t\t\t\targs = args.map(function (a) {\n\t\t\t\t\t\treturn a * pixelRatio;\n\t\t\t\t\t});\n\t\t\t\t} else if (Array.isArray(value)) {\n\t\t\t\t\tfor (i = 0, len = value.length; i < len; i++) {\n\t\t\t\t\t\targs[value[i]] *= pixelRatio;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn _super.apply(this, args);\n\t\t\t};\n\t\t}(prototype[key]);\n\t});\n\n\t// Stroke lineWidth adjustment\n\tprototype.stroke = function (_super) {\n\t\treturn function () {\n\t\t\tthis.lineWidth *= pixelRatio;\n\t\t\t_super.apply(this, arguments);\n\t\t\tthis.lineWidth /= pixelRatio;\n\t\t};\n\t}(prototype.stroke);\n\n\t// Text\n\t//\n\tprototype.fillText = function (_super) {\n\t\treturn function () {\n\t\t\tvar args = Array.prototype.slice.call(arguments);\n\n\t\t\targs[1] *= pixelRatio; // x\n\t\t\targs[2] *= pixelRatio; // y\n\n\t\t\tthis.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n\t\t\t\treturn m * pixelRatio + u;\n\t\t\t});\n\n\t\t\t_super.apply(this, args);\n\n\t\t\tthis.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n\t\t\t\treturn m / pixelRatio + u;\n\t\t\t});\n\t\t};\n\t}(prototype.fillText);\n\n\tprototype.strokeText = function (_super) {\n\t\treturn function () {\n\t\t\tvar args = Array.prototype.slice.call(arguments);\n\n\t\t\targs[1] *= pixelRatio; // x\n\t\t\targs[2] *= pixelRatio; // y\n\n\t\t\tthis.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n\t\t\t\treturn m * pixelRatio + u;\n\t\t\t});\n\n\t\t\t_super.apply(this, args);\n\n\t\t\tthis.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n\t\t\t\treturn m / pixelRatio + u;\n\t\t\t});\n\t\t};\n\t}(prototype.strokeText);\n})(window.CanvasRenderingContext2D.prototype);\n;(function (prototype) {\n\tprototype.getContext = function (_super) {\n\t\treturn function (type) {\n\t\t\tvar backingStore, ratio, context;\n\n\t\t\tif (type == '2d-lodpi') {\n\t\t\t\tcontext = _super.call(this, '2d');\n\t\t\t} else if (type === '2d') {\n\t\t\t\tcontext = _super.call(this, '2d');\n\n\t\t\t\tbackingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n\n\t\t\t\tratio = (window.devicePixelRatio || 1) / backingStore;\n\n\t\t\t\tif (ratio > 1) {\n\t\t\t\t\tthis.style.height = this.height + 'px';\n\t\t\t\t\tthis.style.width = this.width + 'px';\n\t\t\t\t\tthis.width *= ratio;\n\t\t\t\t\tthis.height *= ratio;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcontext = _super.call(this, type);\n\t\t\t}\n\n\t\t\treturn context;\n\t\t};\n\t}(prototype.getContext);\n})(window.HTMLCanvasElement.prototype);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/lib/vendor/hidpi-canvas.js\n// module id = 63\n// module chunks = 0","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return (b64.length * 3 / 4) - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\n arr = new Arr((len * 3 / 4) - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0; i < l; i += 4) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = ((uint8[i] << 16) & 0xFF0000) + ((uint8[i + 1] << 8) & 0xFF00) + (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/base64-js/index.js\n// module id = 64\n// module chunks = 0","'use strict';\n\nfunction FFT(size) {\n this.size = size | 0;\n if (this.size <= 1 || (this.size & (this.size - 1)) !== 0)\n throw new Error('FFT size must be a power of two and bigger than 1');\n\n this._csize = size << 1;\n\n // NOTE: Use of `var` is intentional for old V8 versions\n var table = new Array(this.size * 2);\n for (var i = 0; i < table.length; i += 2) {\n const angle = Math.PI * i / this.size;\n table[i] = Math.cos(angle);\n table[i + 1] = -Math.sin(angle);\n }\n this.table = table;\n\n // Find size's power of two\n var power = 0;\n for (var t = 1; this.size > t; t <<= 1)\n power++;\n\n // Calculate initial step's width:\n // * If we are full radix-4 - it is 2x smaller to give inital len=8\n // * Otherwise it is the same as `power` to give len=4\n this._width = power % 2 === 0 ? power - 1 : power;\n\n // Pre-compute bit-reversal patterns\n this._bitrev = new Array(1 << this._width);\n for (var j = 0; j < this._bitrev.length; j++) {\n this._bitrev[j] = 0;\n for (var shift = 0; shift < this._width; shift += 2) {\n var revShift = this._width - shift - 2;\n this._bitrev[j] |= ((j >>> shift) & 3) << revShift;\n }\n }\n\n this._out = null;\n this._data = null;\n this._inv = 0;\n}\nmodule.exports = FFT;\n\nFFT.prototype.fromComplexArray = function fromComplexArray(complex, storage) {\n var res = storage || new Array(complex.length >>> 1);\n for (var i = 0; i < complex.length; i += 2)\n res[i >>> 1] = complex[i];\n return res;\n};\n\nFFT.prototype.createComplexArray = function createComplexArray() {\n const res = new Array(this._csize);\n for (var i = 0; i < res.length; i++)\n res[i] = 0;\n return res;\n};\n\nFFT.prototype.toComplexArray = function toComplexArray(input, storage) {\n var res = storage || this.createComplexArray();\n for (var i = 0; i < res.length; i += 2) {\n res[i] = input[i >>> 1];\n res[i + 1] = 0;\n }\n return res;\n};\n\nFFT.prototype.completeSpectrum = function completeSpectrum(spectrum) {\n var size = this._csize;\n var half = size >>> 1;\n for (var i = 2; i < half; i += 2) {\n spectrum[size - i] = spectrum[i];\n spectrum[size - i + 1] = -spectrum[i + 1];\n }\n};\n\nFFT.prototype.transform = function transform(out, data) {\n if (out === data)\n throw new Error('Input and output buffers must be different');\n\n this._out = out;\n this._data = data;\n this._inv = 0;\n this._transform4();\n this._out = null;\n this._data = null;\n};\n\nFFT.prototype.realTransform = function realTransform(out, data) {\n if (out === data)\n throw new Error('Input and output buffers must be different');\n\n this._out = out;\n this._data = data;\n this._inv = 0;\n this._realTransform4();\n this._out = null;\n this._data = null;\n};\n\nFFT.prototype.inverseTransform = function inverseTransform(out, data) {\n if (out === data)\n throw new Error('Input and output buffers must be different');\n\n this._out = out;\n this._data = data;\n this._inv = 1;\n this._transform4();\n for (var i = 0; i < out.length; i++)\n out[i] /= this.size;\n this._out = null;\n this._data = null;\n};\n\n// radix-4 implementation\n//\n// NOTE: Uses of `var` are intentional for older V8 version that do not\n// support both `let compound assignments` and `const phi`\nFFT.prototype._transform4 = function _transform4() {\n var out = this._out;\n var size = this._csize;\n\n // Initial step (permute and transform)\n var width = this._width;\n var step = 1 << width;\n var len = (size / step) << 1;\n\n var outOff;\n var t;\n var bitrev = this._bitrev;\n if (len === 4) {\n for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n const off = bitrev[t];\n this._singleTransform2(outOff, off, step);\n }\n } else {\n // len === 8\n for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n const off = bitrev[t];\n this._singleTransform4(outOff, off, step);\n }\n }\n\n // Loop through steps in decreasing order\n var inv = this._inv ? -1 : 1;\n var table = this.table;\n for (step >>= 2; step >= 2; step >>= 2) {\n len = (size / step) << 1;\n var quarterLen = len >>> 2;\n\n // Loop through offsets in the data\n for (outOff = 0; outOff < size; outOff += len) {\n // Full case\n var limit = outOff + quarterLen;\n for (var i = outOff, k = 0; i < limit; i += 2, k += step) {\n const A = i;\n const B = A + quarterLen;\n const C = B + quarterLen;\n const D = C + quarterLen;\n\n // Original values\n const Ar = out[A];\n const Ai = out[A + 1];\n const Br = out[B];\n const Bi = out[B + 1];\n const Cr = out[C];\n const Ci = out[C + 1];\n const Dr = out[D];\n const Di = out[D + 1];\n\n // Middle values\n const MAr = Ar;\n const MAi = Ai;\n\n const tableBr = table[k];\n const tableBi = inv * table[k + 1];\n const MBr = Br * tableBr - Bi * tableBi;\n const MBi = Br * tableBi + Bi * tableBr;\n\n const tableCr = table[2 * k];\n const tableCi = inv * table[2 * k + 1];\n const MCr = Cr * tableCr - Ci * tableCi;\n const MCi = Cr * tableCi + Ci * tableCr;\n\n const tableDr = table[3 * k];\n const tableDi = inv * table[3 * k + 1];\n const MDr = Dr * tableDr - Di * tableDi;\n const MDi = Dr * tableDi + Di * tableDr;\n\n // Pre-Final values\n const T0r = MAr + MCr;\n const T0i = MAi + MCi;\n const T1r = MAr - MCr;\n const T1i = MAi - MCi;\n const T2r = MBr + MDr;\n const T2i = MBi + MDi;\n const T3r = inv * (MBr - MDr);\n const T3i = inv * (MBi - MDi);\n\n // Final values\n const FAr = T0r + T2r;\n const FAi = T0i + T2i;\n\n const FCr = T0r - T2r;\n const FCi = T0i - T2i;\n\n const FBr = T1r + T3i;\n const FBi = T1i - T3r;\n\n const FDr = T1r - T3i;\n const FDi = T1i + T3r;\n\n out[A] = FAr;\n out[A + 1] = FAi;\n out[B] = FBr;\n out[B + 1] = FBi;\n out[C] = FCr;\n out[C + 1] = FCi;\n out[D] = FDr;\n out[D + 1] = FDi;\n }\n }\n }\n};\n\n// radix-2 implementation\n//\n// NOTE: Only called for len=4\nFFT.prototype._singleTransform2 = function _singleTransform2(outOff, off,\n step) {\n const out = this._out;\n const data = this._data;\n\n const evenR = data[off];\n const evenI = data[off + 1];\n const oddR = data[off + step];\n const oddI = data[off + step + 1];\n\n const leftR = evenR + oddR;\n const leftI = evenI + oddI;\n const rightR = evenR - oddR;\n const rightI = evenI - oddI;\n\n out[outOff] = leftR;\n out[outOff + 1] = leftI;\n out[outOff + 2] = rightR;\n out[outOff + 3] = rightI;\n};\n\n// radix-4\n//\n// NOTE: Only called for len=8\nFFT.prototype._singleTransform4 = function _singleTransform4(outOff, off,\n step) {\n const out = this._out;\n const data = this._data;\n const inv = this._inv ? -1 : 1;\n const step2 = step * 2;\n const step3 = step * 3;\n\n // Original values\n const Ar = data[off];\n const Ai = data[off + 1];\n const Br = data[off + step];\n const Bi = data[off + step + 1];\n const Cr = data[off + step2];\n const Ci = data[off + step2 + 1];\n const Dr = data[off + step3];\n const Di = data[off + step3 + 1];\n\n // Pre-Final values\n const T0r = Ar + Cr;\n const T0i = Ai + Ci;\n const T1r = Ar - Cr;\n const T1i = Ai - Ci;\n const T2r = Br + Dr;\n const T2i = Bi + Di;\n const T3r = inv * (Br - Dr);\n const T3i = inv * (Bi - Di);\n\n // Final values\n const FAr = T0r + T2r;\n const FAi = T0i + T2i;\n\n const FBr = T1r + T3i;\n const FBi = T1i - T3r;\n\n const FCr = T0r - T2r;\n const FCi = T0i - T2i;\n\n const FDr = T1r - T3i;\n const FDi = T1i + T3r;\n\n out[outOff] = FAr;\n out[outOff + 1] = FAi;\n out[outOff + 2] = FBr;\n out[outOff + 3] = FBi;\n out[outOff + 4] = FCr;\n out[outOff + 5] = FCi;\n out[outOff + 6] = FDr;\n out[outOff + 7] = FDi;\n};\n\n// Real input radix-4 implementation\nFFT.prototype._realTransform4 = function _realTransform4() {\n var out = this._out;\n var size = this._csize;\n\n // Initial step (permute and transform)\n var width = this._width;\n var step = 1 << width;\n var len = (size / step) << 1;\n\n var outOff;\n var t;\n var bitrev = this._bitrev;\n if (len === 4) {\n for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n const off = bitrev[t];\n this._singleRealTransform2(outOff, off >>> 1, step >>> 1);\n }\n } else {\n // len === 8\n for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n const off = bitrev[t];\n this._singleRealTransform4(outOff, off >>> 1, step >>> 1);\n }\n }\n\n // Loop through steps in decreasing order\n var inv = this._inv ? -1 : 1;\n var table = this.table;\n for (step >>= 2; step >= 2; step >>= 2) {\n len = (size / step) << 1;\n var halfLen = len >>> 1;\n var quarterLen = halfLen >>> 1;\n var hquarterLen = quarterLen >>> 1;\n\n // Loop through offsets in the data\n for (outOff = 0; outOff < size; outOff += len) {\n for (var i = 0, k = 0; i <= hquarterLen; i += 2, k += step) {\n var A = outOff + i;\n var B = A + quarterLen;\n var C = B + quarterLen;\n var D = C + quarterLen;\n\n // Original values\n var Ar = out[A];\n var Ai = out[A + 1];\n var Br = out[B];\n var Bi = out[B + 1];\n var Cr = out[C];\n var Ci = out[C + 1];\n var Dr = out[D];\n var Di = out[D + 1];\n\n // Middle values\n var MAr = Ar;\n var MAi = Ai;\n\n var tableBr = table[k];\n var tableBi = inv * table[k + 1];\n var MBr = Br * tableBr - Bi * tableBi;\n var MBi = Br * tableBi + Bi * tableBr;\n\n var tableCr = table[2 * k];\n var tableCi = inv * table[2 * k + 1];\n var MCr = Cr * tableCr - Ci * tableCi;\n var MCi = Cr * tableCi + Ci * tableCr;\n\n var tableDr = table[3 * k];\n var tableDi = inv * table[3 * k + 1];\n var MDr = Dr * tableDr - Di * tableDi;\n var MDi = Dr * tableDi + Di * tableDr;\n\n // Pre-Final values\n var T0r = MAr + MCr;\n var T0i = MAi + MCi;\n var T1r = MAr - MCr;\n var T1i = MAi - MCi;\n var T2r = MBr + MDr;\n var T2i = MBi + MDi;\n var T3r = inv * (MBr - MDr);\n var T3i = inv * (MBi - MDi);\n\n // Final values\n var FAr = T0r + T2r;\n var FAi = T0i + T2i;\n\n var FBr = T1r + T3i;\n var FBi = T1i - T3r;\n\n out[A] = FAr;\n out[A + 1] = FAi;\n out[B] = FBr;\n out[B + 1] = FBi;\n\n // Output final middle point\n if (i === 0) {\n var FCr = T0r - T2r;\n var FCi = T0i - T2i;\n out[C] = FCr;\n out[C + 1] = FCi;\n continue;\n }\n\n // Do not overwrite ourselves\n if (i === hquarterLen)\n continue;\n\n // In the flipped case:\n // MAi = -MAi\n // MBr=-MBi, MBi=-MBr\n // MCr=-MCr\n // MDr=MDi, MDi=MDr\n var ST0r = T1r;\n var ST0i = -T1i;\n var ST1r = T0r;\n var ST1i = -T0i;\n var ST2r = -inv * T3i;\n var ST2i = -inv * T3r;\n var ST3r = -inv * T2i;\n var ST3i = -inv * T2r;\n\n var SFAr = ST0r + ST2r;\n var SFAi = ST0i + ST2i;\n\n var SFBr = ST1r + ST3i;\n var SFBi = ST1i - ST3r;\n\n var SA = outOff + quarterLen - i;\n var SB = outOff + halfLen - i;\n\n out[SA] = SFAr;\n out[SA + 1] = SFAi;\n out[SB] = SFBr;\n out[SB + 1] = SFBi;\n }\n }\n }\n};\n\n// radix-2 implementation\n//\n// NOTE: Only called for len=4\nFFT.prototype._singleRealTransform2 = function _singleRealTransform2(outOff,\n off,\n step) {\n const out = this._out;\n const data = this._data;\n\n const evenR = data[off];\n const oddR = data[off + step];\n\n const leftR = evenR + oddR;\n const rightR = evenR - oddR;\n\n out[outOff] = leftR;\n out[outOff + 1] = 0;\n out[outOff + 2] = rightR;\n out[outOff + 3] = 0;\n};\n\n// radix-4\n//\n// NOTE: Only called for len=8\nFFT.prototype._singleRealTransform4 = function _singleRealTransform4(outOff,\n off,\n step) {\n const out = this._out;\n const data = this._data;\n const inv = this._inv ? -1 : 1;\n const step2 = step * 2;\n const step3 = step * 3;\n\n // Original values\n const Ar = data[off];\n const Br = data[off + step];\n const Cr = data[off + step2];\n const Dr = data[off + step3];\n\n // Pre-Final values\n const T0r = Ar + Cr;\n const T1r = Ar - Cr;\n const T2r = Br + Dr;\n const T3r = inv * (Br - Dr);\n\n // Final values\n const FAr = T0r + T2r;\n\n const FBr = T1r;\n const FBi = -T3r;\n\n const FCr = T0r - T2r;\n\n const FDr = T1r;\n const FDi = T3r;\n\n out[outOff] = FAr;\n out[outOff + 1] = 0;\n out[outOff + 2] = FBr;\n out[outOff + 3] = FBi;\n out[outOff + 4] = FCr;\n out[outOff + 5] = 0;\n out[outOff + 6] = FDr;\n out[outOff + 7] = FDi;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fft.js/lib/fft.js\n// module id = 65\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ieee754/index.js\n// module id = 66\n// module chunks = 0","'use strict';\nvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\nvar scheduleDrain;\n\n{\n if (Mutation) {\n var called = 0;\n var observer = new Mutation(nextTick);\n var element = global.document.createTextNode('');\n observer.observe(element, {\n characterData: true\n });\n scheduleDrain = function () {\n element.data = (called = ++called % 2);\n };\n } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n var channel = new global.MessageChannel();\n channel.port1.onmessage = nextTick;\n scheduleDrain = function () {\n channel.port2.postMessage(0);\n };\n } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n scheduleDrain = function () {\n\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/immediate/lib/browser.js\n// module id = 67\n// module chunks = 0","'use strict';\nvar USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');\n\nvar pako = require(\"pako\");\nvar utils = require(\"./utils\");\nvar GenericWorker = require(\"./stream/GenericWorker\");\n\nvar ARRAY_TYPE = USE_TYPEDARRAY ? \"uint8array\" : \"array\";\n\nexports.magic = \"\\x08\\x00\";\n\n/**\n * Create a worker that uses pako to inflate/deflate.\n * @constructor\n * @param {String} action the name of the pako function to call : either \"Deflate\" or \"Inflate\".\n * @param {Object} options the options to use when (de)compressing.\n */\nfunction FlateWorker(action, options) {\n GenericWorker.call(this, \"FlateWorker/\" + action);\n\n this._pako = null;\n this._pakoAction = action;\n this._pakoOptions = options;\n // the `meta` object from the last chunk received\n // this allow this worker to pass around metadata\n this.meta = {};\n}\n\nutils.inherits(FlateWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nFlateWorker.prototype.processChunk = function (chunk) {\n this.meta = chunk.meta;\n if (this._pako === null) {\n this._createPako();\n }\n this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false);\n};\n\n/**\n * @see GenericWorker.flush\n */\nFlateWorker.prototype.flush = function () {\n GenericWorker.prototype.flush.call(this);\n if (this._pako === null) {\n this._createPako();\n }\n this._pako.push([], true);\n};\n/**\n * @see GenericWorker.cleanUp\n */\nFlateWorker.prototype.cleanUp = function () {\n GenericWorker.prototype.cleanUp.call(this);\n this._pako = null;\n};\n\n/**\n * Create the _pako object.\n * TODO: lazy-loading this object isn't the best solution but it's the\n * quickest. The best solution is to lazy-load the worker list. See also the\n * issue #446.\n */\nFlateWorker.prototype._createPako = function () {\n this._pako = new pako[this._pakoAction]({\n raw: true,\n level: this._pakoOptions.level || -1 // default compression\n });\n var self = this;\n this._pako.onData = function(data) {\n self.push({\n data : data,\n meta : self.meta\n });\n };\n};\n\nexports.compressWorker = function (compressionOptions) {\n return new FlateWorker(\"Deflate\", compressionOptions);\n};\nexports.uncompressWorker = function () {\n return new FlateWorker(\"Inflate\", {});\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/flate.js\n// module id = 68\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('../stream/GenericWorker');\nvar utf8 = require('../utf8');\nvar crc32 = require('../crc32');\nvar signature = require('../signature');\n\n/**\n * Transform an integer into a string in hexadecimal.\n * @private\n * @param {number} dec the number to convert.\n * @param {number} bytes the number of bytes to generate.\n * @returns {string} the result.\n */\nvar decToHex = function(dec, bytes) {\n var hex = \"\", i;\n for (i = 0; i < bytes; i++) {\n hex += String.fromCharCode(dec & 0xff);\n dec = dec >>> 8;\n }\n return hex;\n};\n\n/**\n * Generate the UNIX part of the external file attributes.\n * @param {Object} unixPermissions the unix permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :\n *\n * TTTTsstrwxrwxrwx0000000000ADVSHR\n * ^^^^____________________________ file type, see zipinfo.c (UNX_*)\n * ^^^_________________________ setuid, setgid, sticky\n * ^^^^^^^^^________________ permissions\n * ^^^^^^^^^^______ not used ?\n * ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only\n */\nvar generateUnixExternalFileAttr = function (unixPermissions, isDir) {\n\n var result = unixPermissions;\n if (!unixPermissions) {\n // I can't use octal values in strict mode, hence the hexa.\n // 040775 => 0x41fd\n // 0100664 => 0x81b4\n result = isDir ? 0x41fd : 0x81b4;\n }\n return (result & 0xFFFF) << 16;\n};\n\n/**\n * Generate the DOS part of the external file attributes.\n * @param {Object} dosPermissions the dos permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * Bit 0 Read-Only\n * Bit 1 Hidden\n * Bit 2 System\n * Bit 3 Volume Label\n * Bit 4 Directory\n * Bit 5 Archive\n */\nvar generateDosExternalFileAttr = function (dosPermissions, isDir) {\n\n // the dir flag is already set for compatibility\n return (dosPermissions || 0) & 0x3F;\n};\n\n/**\n * Generate the various parts used in the construction of the final zip file.\n * @param {Object} streamInfo the hash with informations about the compressed file.\n * @param {Boolean} streamedContent is the content streamed ?\n * @param {Boolean} streamingEnded is the stream finished ?\n * @param {number} offset the current offset from the start of the zip file.\n * @param {String} platform let's pretend we are this platform (change platform dependents fields)\n * @param {Function} encodeFileName the function to encode the file name / comment.\n * @return {Object} the zip parts.\n */\nvar generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) {\n var file = streamInfo['file'],\n compression = streamInfo['compression'],\n useCustomEncoding = encodeFileName !== utf8.utf8encode,\n encodedFileName = utils.transformTo(\"string\", encodeFileName(file.name)),\n utfEncodedFileName = utils.transformTo(\"string\", utf8.utf8encode(file.name)),\n comment = file.comment,\n encodedComment = utils.transformTo(\"string\", encodeFileName(comment)),\n utfEncodedComment = utils.transformTo(\"string\", utf8.utf8encode(comment)),\n useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,\n useUTF8ForComment = utfEncodedComment.length !== comment.length,\n dosTime,\n dosDate,\n extraFields = \"\",\n unicodePathExtraField = \"\",\n unicodeCommentExtraField = \"\",\n dir = file.dir,\n date = file.date;\n\n\n var dataInfo = {\n crc32 : 0,\n compressedSize : 0,\n uncompressedSize : 0\n };\n\n // if the content is streamed, the sizes/crc32 are only available AFTER\n // the end of the stream.\n if (!streamedContent || streamingEnded) {\n dataInfo.crc32 = streamInfo['crc32'];\n dataInfo.compressedSize = streamInfo['compressedSize'];\n dataInfo.uncompressedSize = streamInfo['uncompressedSize'];\n }\n\n var bitflag = 0;\n if (streamedContent) {\n // Bit 3: the sizes/crc32 are set to zero in the local header.\n // The correct values are put in the data descriptor immediately\n // following the compressed data.\n bitflag |= 0x0008;\n }\n if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) {\n // Bit 11: Language encoding flag (EFS).\n bitflag |= 0x0800;\n }\n\n\n var extFileAttr = 0;\n var versionMadeBy = 0;\n if (dir) {\n // dos or unix, we set the dos dir flag\n extFileAttr |= 0x00010;\n }\n if(platform === \"UNIX\") {\n versionMadeBy = 0x031E; // UNIX, version 3.0\n extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);\n } else { // DOS or other, fallback to DOS\n versionMadeBy = 0x0014; // DOS, version 2.0\n extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);\n }\n\n // date\n // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html\n // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html\n // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html\n\n dosTime = date.getUTCHours();\n dosTime = dosTime << 6;\n dosTime = dosTime | date.getUTCMinutes();\n dosTime = dosTime << 5;\n dosTime = dosTime | date.getUTCSeconds() / 2;\n\n dosDate = date.getUTCFullYear() - 1980;\n dosDate = dosDate << 4;\n dosDate = dosDate | (date.getUTCMonth() + 1);\n dosDate = dosDate << 5;\n dosDate = dosDate | date.getUTCDate();\n\n if (useUTF8ForFileName) {\n // set the unicode path extra field. unzip needs at least one extra\n // field to correctly handle unicode path, so using the path is as good\n // as any other information. This could improve the situation with\n // other archive managers too.\n // This field is usually used without the utf8 flag, with a non\n // unicode path in the header (winrar, winzip). This helps (a bit)\n // with the messy Windows' default compressed folders feature but\n // breaks on p7zip which doesn't seek the unicode path extra field.\n // So for now, UTF-8 everywhere !\n unicodePathExtraField =\n // Version\n decToHex(1, 1) +\n // NameCRC32\n decToHex(crc32(encodedFileName), 4) +\n // UnicodeName\n utfEncodedFileName;\n\n extraFields +=\n // Info-ZIP Unicode Path Extra Field\n \"\\x75\\x70\" +\n // size\n decToHex(unicodePathExtraField.length, 2) +\n // content\n unicodePathExtraField;\n }\n\n if(useUTF8ForComment) {\n\n unicodeCommentExtraField =\n // Version\n decToHex(1, 1) +\n // CommentCRC32\n decToHex(crc32(encodedComment), 4) +\n // UnicodeName\n utfEncodedComment;\n\n extraFields +=\n // Info-ZIP Unicode Path Extra Field\n \"\\x75\\x63\" +\n // size\n decToHex(unicodeCommentExtraField.length, 2) +\n // content\n unicodeCommentExtraField;\n }\n\n var header = \"\";\n\n // version needed to extract\n header += \"\\x0A\\x00\";\n // general purpose bit flag\n header += decToHex(bitflag, 2);\n // compression method\n header += compression.magic;\n // last mod file time\n header += decToHex(dosTime, 2);\n // last mod file date\n header += decToHex(dosDate, 2);\n // crc-32\n header += decToHex(dataInfo.crc32, 4);\n // compressed size\n header += decToHex(dataInfo.compressedSize, 4);\n // uncompressed size\n header += decToHex(dataInfo.uncompressedSize, 4);\n // file name length\n header += decToHex(encodedFileName.length, 2);\n // extra field length\n header += decToHex(extraFields.length, 2);\n\n\n var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields;\n\n var dirRecord = signature.CENTRAL_FILE_HEADER +\n // version made by (00: DOS)\n decToHex(versionMadeBy, 2) +\n // file header (common to file and central directory)\n header +\n // file comment length\n decToHex(encodedComment.length, 2) +\n // disk number start\n \"\\x00\\x00\" +\n // internal file attributes TODO\n \"\\x00\\x00\" +\n // external file attributes\n decToHex(extFileAttr, 4) +\n // relative offset of local header\n decToHex(offset, 4) +\n // file name\n encodedFileName +\n // extra field\n extraFields +\n // file comment\n encodedComment;\n\n return {\n fileRecord: fileRecord,\n dirRecord: dirRecord\n };\n};\n\n/**\n * Generate the EOCD record.\n * @param {Number} entriesCount the number of entries in the zip file.\n * @param {Number} centralDirLength the length (in bytes) of the central dir.\n * @param {Number} localDirLength the length (in bytes) of the local dir.\n * @param {String} comment the zip file comment as a binary string.\n * @param {Function} encodeFileName the function to encode the comment.\n * @return {String} the EOCD record.\n */\nvar generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) {\n var dirEnd = \"\";\n var encodedComment = utils.transformTo(\"string\", encodeFileName(comment));\n\n // end of central dir signature\n dirEnd = signature.CENTRAL_DIRECTORY_END +\n // number of this disk\n \"\\x00\\x00\" +\n // number of the disk with the start of the central directory\n \"\\x00\\x00\" +\n // total number of entries in the central directory on this disk\n decToHex(entriesCount, 2) +\n // total number of entries in the central directory\n decToHex(entriesCount, 2) +\n // size of the central directory 4 bytes\n decToHex(centralDirLength, 4) +\n // offset of start of central directory with respect to the starting disk number\n decToHex(localDirLength, 4) +\n // .ZIP file comment length\n decToHex(encodedComment.length, 2) +\n // .ZIP file comment\n encodedComment;\n\n return dirEnd;\n};\n\n/**\n * Generate data descriptors for a file entry.\n * @param {Object} streamInfo the hash generated by a worker, containing informations\n * on the file entry.\n * @return {String} the data descriptors.\n */\nvar generateDataDescriptors = function (streamInfo) {\n var descriptor = \"\";\n descriptor = signature.DATA_DESCRIPTOR +\n // crc-32 4 bytes\n decToHex(streamInfo['crc32'], 4) +\n // compressed size 4 bytes\n decToHex(streamInfo['compressedSize'], 4) +\n // uncompressed size 4 bytes\n decToHex(streamInfo['uncompressedSize'], 4);\n\n return descriptor;\n};\n\n\n/**\n * A worker to concatenate other workers to create a zip file.\n * @param {Boolean} streamFiles `true` to stream the content of the files,\n * `false` to accumulate it.\n * @param {String} comment the comment to use.\n * @param {String} platform the platform to use, \"UNIX\" or \"DOS\".\n * @param {Function} encodeFileName the function to encode file names and comments.\n */\nfunction ZipFileWorker(streamFiles, comment, platform, encodeFileName) {\n GenericWorker.call(this, \"ZipFileWorker\");\n // The number of bytes written so far. This doesn't count accumulated chunks.\n this.bytesWritten = 0;\n // The comment of the zip file\n this.zipComment = comment;\n // The platform \"generating\" the zip file.\n this.zipPlatform = platform;\n // the function to encode file names and comments.\n this.encodeFileName = encodeFileName;\n // Should we stream the content of the files ?\n this.streamFiles = streamFiles;\n // If `streamFiles` is false, we will need to accumulate the content of the\n // files to calculate sizes / crc32 (and write them *before* the content).\n // This boolean indicates if we are accumulating chunks (it will change a lot\n // during the lifetime of this worker).\n this.accumulate = false;\n // The buffer receiving chunks when accumulating content.\n this.contentBuffer = [];\n // The list of generated directory records.\n this.dirRecords = [];\n // The offset (in bytes) from the beginning of the zip file for the current source.\n this.currentSourceOffset = 0;\n // The total number of entries in this zip file.\n this.entriesCount = 0;\n // the name of the file currently being added, null when handling the end of the zip file.\n // Used for the emited metadata.\n this.currentFile = null;\n\n\n\n this._sources = [];\n}\nutils.inherits(ZipFileWorker, GenericWorker);\n\n/**\n * @see GenericWorker.push\n */\nZipFileWorker.prototype.push = function (chunk) {\n\n var currentFilePercent = chunk.meta.percent || 0;\n var entriesCount = this.entriesCount;\n var remainingFiles = this._sources.length;\n\n if(this.accumulate) {\n this.contentBuffer.push(chunk);\n } else {\n this.bytesWritten += chunk.data.length;\n\n GenericWorker.prototype.push.call(this, {\n data : chunk.data,\n meta : {\n currentFile : this.currentFile,\n percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100\n }\n });\n }\n};\n\n/**\n * The worker started a new source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the new source.\n */\nZipFileWorker.prototype.openedSource = function (streamInfo) {\n this.currentSourceOffset = this.bytesWritten;\n this.currentFile = streamInfo['file'].name;\n\n var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n\n // don't stream folders (because they don't have any content)\n if(streamedContent) {\n var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n this.push({\n data : record.fileRecord,\n meta : {percent:0}\n });\n } else {\n // we need to wait for the whole file before pushing anything\n this.accumulate = true;\n }\n};\n\n/**\n * The worker finished a source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the finished source.\n */\nZipFileWorker.prototype.closedSource = function (streamInfo) {\n this.accumulate = false;\n var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n\n this.dirRecords.push(record.dirRecord);\n if(streamedContent) {\n // after the streamed file, we put data descriptors\n this.push({\n data : generateDataDescriptors(streamInfo),\n meta : {percent:100}\n });\n } else {\n // the content wasn't streamed, we need to push everything now\n // first the file record, then the content\n this.push({\n data : record.fileRecord,\n meta : {percent:0}\n });\n while(this.contentBuffer.length) {\n this.push(this.contentBuffer.shift());\n }\n }\n this.currentFile = null;\n};\n\n/**\n * @see GenericWorker.flush\n */\nZipFileWorker.prototype.flush = function () {\n\n var localDirLength = this.bytesWritten;\n for(var i = 0; i < this.dirRecords.length; i++) {\n this.push({\n data : this.dirRecords[i],\n meta : {percent:100}\n });\n }\n var centralDirLength = this.bytesWritten - localDirLength;\n\n var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName);\n\n this.push({\n data : dirEnd,\n meta : {percent:100}\n });\n};\n\n/**\n * Prepare the next source to be read.\n */\nZipFileWorker.prototype.prepareNextSource = function () {\n this.previous = this._sources.shift();\n this.openedSource(this.previous.streamInfo);\n if (this.isPaused) {\n this.previous.pause();\n } else {\n this.previous.resume();\n }\n};\n\n/**\n * @see GenericWorker.registerPrevious\n */\nZipFileWorker.prototype.registerPrevious = function (previous) {\n this._sources.push(previous);\n var self = this;\n\n previous.on('data', function (chunk) {\n self.processChunk(chunk);\n });\n previous.on('end', function () {\n self.closedSource(self.previous.streamInfo);\n if(self._sources.length) {\n self.prepareNextSource();\n } else {\n self.end();\n }\n });\n previous.on('error', function (e) {\n self.error(e);\n });\n return this;\n};\n\n/**\n * @see GenericWorker.resume\n */\nZipFileWorker.prototype.resume = function () {\n if(!GenericWorker.prototype.resume.call(this)) {\n return false;\n }\n\n if (!this.previous && this._sources.length) {\n this.prepareNextSource();\n return true;\n }\n if (!this.previous && !this._sources.length && !this.generatedError) {\n this.end();\n return true;\n }\n};\n\n/**\n * @see GenericWorker.error\n */\nZipFileWorker.prototype.error = function (e) {\n var sources = this._sources;\n if(!GenericWorker.prototype.error.call(this, e)) {\n return false;\n }\n for(var i = 0; i < sources.length; i++) {\n try {\n sources[i].error(e);\n } catch(e) {\n // the `error` exploded, nothing to do\n }\n }\n return true;\n};\n\n/**\n * @see GenericWorker.lock\n */\nZipFileWorker.prototype.lock = function () {\n GenericWorker.prototype.lock.call(this);\n var sources = this._sources;\n for(var i = 0; i < sources.length; i++) {\n sources[i].lock();\n }\n};\n\nmodule.exports = ZipFileWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/generate/ZipFileWorker.js\n// module id = 69\n// module chunks = 0","'use strict';\n\nvar compressions = require('../compressions');\nvar ZipFileWorker = require('./ZipFileWorker');\n\n/**\n * Find the compression to use.\n * @param {String} fileCompression the compression defined at the file level, if any.\n * @param {String} zipCompression the compression defined at the load() level.\n * @return {Object} the compression object to use.\n */\nvar getCompression = function (fileCompression, zipCompression) {\n\n var compressionName = fileCompression || zipCompression;\n var compression = compressions[compressionName];\n if (!compression) {\n throw new Error(compressionName + \" is not a valid compression method !\");\n }\n return compression;\n};\n\n/**\n * Create a worker to generate a zip file.\n * @param {JSZip} zip the JSZip instance at the right root level.\n * @param {Object} options to generate the zip file.\n * @param {String} comment the comment to use.\n */\nexports.generateWorker = function (zip, options, comment) {\n\n var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName);\n var entriesCount = 0;\n try {\n\n zip.forEach(function (relativePath, file) {\n entriesCount++;\n var compression = getCompression(file.options.compression, options.compression);\n var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};\n var dir = file.dir, date = file.date;\n\n file._compressWorker(compression, compressionOptions)\n .withStreamInfo(\"file\", {\n name : relativePath,\n dir : dir,\n date : date,\n comment : file.comment || \"\",\n unixPermissions : file.unixPermissions,\n dosPermissions : file.dosPermissions\n })\n .pipe(zipFileWorker);\n });\n zipFileWorker.entriesCount = entriesCount;\n } catch (e) {\n zipFileWorker.error(e);\n }\n\n return zipFileWorker;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/generate/index.js\n// module id = 70\n// module chunks = 0","'use strict';\nvar utils = require('./utils');\nvar external = require(\"./external\");\nvar utf8 = require('./utf8');\nvar utils = require('./utils');\nvar ZipEntries = require('./zipEntries');\nvar Crc32Probe = require('./stream/Crc32Probe');\nvar nodejsUtils = require(\"./nodejsUtils\");\n\n/**\n * Check the CRC32 of an entry.\n * @param {ZipEntry} zipEntry the zip entry to check.\n * @return {Promise} the result.\n */\nfunction checkEntryCRC32(zipEntry) {\n return new external.Promise(function (resolve, reject) {\n var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe());\n worker.on(\"error\", function (e) {\n reject(e);\n })\n .on(\"end\", function () {\n if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {\n reject(new Error(\"Corrupted zip : CRC32 mismatch\"));\n } else {\n resolve();\n }\n })\n .resume();\n });\n}\n\nmodule.exports = function(data, options) {\n var zip = this;\n options = utils.extend(options || {}, {\n base64: false,\n checkCRC32: false,\n optimizedBinaryString: false,\n createFolders: false,\n decodeFileName: utf8.utf8decode\n });\n\n if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {\n return external.Promise.reject(new Error(\"JSZip can't accept a stream when loading a zip file.\"));\n }\n\n return utils.prepareContent(\"the loaded zip file\", data, true, options.optimizedBinaryString, options.base64)\n .then(function(data) {\n var zipEntries = new ZipEntries(options);\n zipEntries.load(data);\n return zipEntries;\n }).then(function checkCRC32(zipEntries) {\n var promises = [external.Promise.resolve(zipEntries)];\n var files = zipEntries.files;\n if (options.checkCRC32) {\n for (var i = 0; i < files.length; i++) {\n promises.push(checkEntryCRC32(files[i]));\n }\n }\n return external.Promise.all(promises);\n }).then(function addFiles(results) {\n var zipEntries = results.shift();\n var files = zipEntries.files;\n for (var i = 0; i < files.length; i++) {\n var input = files[i];\n zip.file(input.fileNameStr, input.decompressed, {\n binary: true,\n optimizedBinaryString: true,\n date: input.date,\n dir: input.dir,\n comment : input.fileCommentStr.length ? input.fileCommentStr : null,\n unixPermissions : input.unixPermissions,\n dosPermissions : input.dosPermissions,\n createFolders: options.createFolders\n });\n }\n if (zipEntries.zipComment.length) {\n zip.comment = zipEntries.zipComment;\n }\n\n return zip;\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/load.js\n// module id = 71\n// module chunks = 0","\"use strict\";\n\nvar utils = require('../utils');\nvar GenericWorker = require('../stream/GenericWorker');\n\n/**\n * A worker that use a nodejs stream as source.\n * @constructor\n * @param {String} filename the name of the file entry for this stream.\n * @param {Readable} stream the nodejs stream.\n */\nfunction NodejsStreamInputAdapter(filename, stream) {\n GenericWorker.call(this, \"Nodejs stream input adapter for \" + filename);\n this._upstreamEnded = false;\n this._bindStream(stream);\n}\n\nutils.inherits(NodejsStreamInputAdapter, GenericWorker);\n\n/**\n * Prepare the stream and bind the callbacks on it.\n * Do this ASAP on node 0.10 ! A lazy binding doesn't always work.\n * @param {Stream} stream the nodejs stream to use.\n */\nNodejsStreamInputAdapter.prototype._bindStream = function (stream) {\n var self = this;\n this._stream = stream;\n stream.pause();\n stream\n .on(\"data\", function (chunk) {\n self.push({\n data: chunk,\n meta : {\n percent : 0\n }\n });\n })\n .on(\"error\", function (e) {\n if(self.isPaused) {\n this.generatedError = e;\n } else {\n self.error(e);\n }\n })\n .on(\"end\", function () {\n if(self.isPaused) {\n self._upstreamEnded = true;\n } else {\n self.end();\n }\n });\n};\nNodejsStreamInputAdapter.prototype.pause = function () {\n if(!GenericWorker.prototype.pause.call(this)) {\n return false;\n }\n this._stream.pause();\n return true;\n};\nNodejsStreamInputAdapter.prototype.resume = function () {\n if(!GenericWorker.prototype.resume.call(this)) {\n return false;\n }\n\n if(this._upstreamEnded) {\n this.end();\n } else {\n this._stream.resume();\n }\n\n return true;\n};\n\nmodule.exports = NodejsStreamInputAdapter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/nodejs/NodejsStreamInputAdapter.js\n// module id = 72\n// module chunks = 0","'use strict';\n\nvar Readable = require('readable-stream').Readable;\n\nvar utils = require('../utils');\nutils.inherits(NodejsStreamOutputAdapter, Readable);\n\n/**\n* A nodejs stream using a worker as source.\n* @see the SourceWrapper in http://nodejs.org/api/stream.html\n* @constructor\n* @param {StreamHelper} helper the helper wrapping the worker\n* @param {Object} options the nodejs stream options\n* @param {Function} updateCb the update callback.\n*/\nfunction NodejsStreamOutputAdapter(helper, options, updateCb) {\n Readable.call(this, options);\n this._helper = helper;\n\n var self = this;\n helper.on(\"data\", function (data, meta) {\n if (!self.push(data)) {\n self._helper.pause();\n }\n if(updateCb) {\n updateCb(meta);\n }\n })\n .on(\"error\", function(e) {\n self.emit('error', e);\n })\n .on(\"end\", function () {\n self.push(null);\n });\n}\n\n\nNodejsStreamOutputAdapter.prototype._read = function() {\n this._helper.resume();\n};\n\nmodule.exports = NodejsStreamOutputAdapter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/nodejs/NodejsStreamOutputAdapter.js\n// module id = 73\n// module chunks = 0","'use strict';\nvar utf8 = require('./utf8');\nvar utils = require('./utils');\nvar GenericWorker = require('./stream/GenericWorker');\nvar StreamHelper = require('./stream/StreamHelper');\nvar defaults = require('./defaults');\nvar CompressedObject = require('./compressedObject');\nvar ZipObject = require('./zipObject');\nvar generate = require(\"./generate\");\nvar nodejsUtils = require(\"./nodejsUtils\");\nvar NodejsStreamInputAdapter = require(\"./nodejs/NodejsStreamInputAdapter\");\n\n\n/**\n * Add a file in the current folder.\n * @private\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file\n * @param {Object} originalOptions the options of the file\n * @return {Object} the new file.\n */\nvar fileAdd = function(name, data, originalOptions) {\n // be sure sub folders exist\n var dataType = utils.getTypeOf(data),\n parent;\n\n\n /*\n * Correct options.\n */\n\n var o = utils.extend(originalOptions || {}, defaults);\n o.date = o.date || new Date();\n if (o.compression !== null) {\n o.compression = o.compression.toUpperCase();\n }\n\n if (typeof o.unixPermissions === \"string\") {\n o.unixPermissions = parseInt(o.unixPermissions, 8);\n }\n\n // UNX_IFDIR 0040000 see zipinfo.c\n if (o.unixPermissions && (o.unixPermissions & 0x4000)) {\n o.dir = true;\n }\n // Bit 4 Directory\n if (o.dosPermissions && (o.dosPermissions & 0x0010)) {\n o.dir = true;\n }\n\n if (o.dir) {\n name = forceTrailingSlash(name);\n }\n if (o.createFolders && (parent = parentFolder(name))) {\n folderAdd.call(this, parent, true);\n }\n\n var isUnicodeString = dataType === \"string\" && o.binary === false && o.base64 === false;\n if (!originalOptions || typeof originalOptions.binary === \"undefined\") {\n o.binary = !isUnicodeString;\n }\n\n\n var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0;\n\n if (isCompressedEmpty || o.dir || !data || data.length === 0) {\n o.base64 = false;\n o.binary = true;\n data = \"\";\n o.compression = \"STORE\";\n dataType = \"string\";\n }\n\n /*\n * Convert content to fit.\n */\n\n var zipObjectContent = null;\n if (data instanceof CompressedObject || data instanceof GenericWorker) {\n zipObjectContent = data;\n } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {\n zipObjectContent = new NodejsStreamInputAdapter(name, data);\n } else {\n zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);\n }\n\n var object = new ZipObject(name, zipObjectContent, o);\n this.files[name] = object;\n /*\n TODO: we can't throw an exception because we have async promises\n (we can have a promise of a Date() for example) but returning a\n promise is useless because file(name, data) returns the JSZip\n object for chaining. Should we break that to allow the user\n to catch the error ?\n\n return external.Promise.resolve(zipObjectContent)\n .then(function () {\n return object;\n });\n */\n};\n\n/**\n * Find the parent folder of the path.\n * @private\n * @param {string} path the path to use\n * @return {string} the parent folder, or \"\"\n */\nvar parentFolder = function (path) {\n if (path.slice(-1) === '/') {\n path = path.substring(0, path.length - 1);\n }\n var lastSlash = path.lastIndexOf('/');\n return (lastSlash > 0) ? path.substring(0, lastSlash) : \"\";\n};\n\n/**\n * Returns the path with a slash at the end.\n * @private\n * @param {String} path the path to check.\n * @return {String} the path with a trailing slash.\n */\nvar forceTrailingSlash = function(path) {\n // Check the name ends with a /\n if (path.slice(-1) !== \"/\") {\n path += \"/\"; // IE doesn't like substr(-1)\n }\n return path;\n};\n\n/**\n * Add a (sub) folder in the current folder.\n * @private\n * @param {string} name the folder's name\n * @param {boolean=} [createFolders] If true, automatically create sub\n * folders. Defaults to false.\n * @return {Object} the new folder.\n */\nvar folderAdd = function(name, createFolders) {\n createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders;\n\n name = forceTrailingSlash(name);\n\n // Does this folder already exist?\n if (!this.files[name]) {\n fileAdd.call(this, name, null, {\n dir: true,\n createFolders: createFolders\n });\n }\n return this.files[name];\n};\n\n/**\n* Cross-window, cross-Node-context regular expression detection\n* @param {Object} object Anything\n* @return {Boolean} true if the object is a regular expression,\n* false otherwise\n*/\nfunction isRegExp(object) {\n return Object.prototype.toString.call(object) === \"[object RegExp]\";\n}\n\n// return the actual prototype of JSZip\nvar out = {\n /**\n * @see loadAsync\n */\n load: function() {\n throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n },\n\n\n /**\n * Call a callback function for each entry at this folder level.\n * @param {Function} cb the callback function:\n * function (relativePath, file) {...}\n * It takes 2 arguments : the relative path and the file.\n */\n forEach: function(cb) {\n var filename, relativePath, file;\n for (filename in this.files) {\n if (!this.files.hasOwnProperty(filename)) {\n continue;\n }\n file = this.files[filename];\n relativePath = filename.slice(this.root.length, filename.length);\n if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root\n cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...\n }\n }\n },\n\n /**\n * Filter nested files/folders with the specified function.\n * @param {Function} search the predicate to use :\n * function (relativePath, file) {...}\n * It takes 2 arguments : the relative path and the file.\n * @return {Array} An array of matching elements.\n */\n filter: function(search) {\n var result = [];\n this.forEach(function (relativePath, entry) {\n if (search(relativePath, entry)) { // the file matches the function\n result.push(entry);\n }\n\n });\n return result;\n },\n\n /**\n * Add a file to the zip file, or search a file.\n * @param {string|RegExp} name The name of the file to add (if data is defined),\n * the name of the file to find (if no data) or a regex to match files.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded\n * @param {Object} o File options\n * @return {JSZip|Object|Array} this JSZip object (when adding a file),\n * a file (when searching by string) or an array of files (when searching by regex).\n */\n file: function(name, data, o) {\n if (arguments.length === 1) {\n if (isRegExp(name)) {\n var regexp = name;\n return this.filter(function(relativePath, file) {\n return !file.dir && regexp.test(relativePath);\n });\n }\n else { // text\n var obj = this.files[this.root + name];\n if (obj && !obj.dir) {\n return obj;\n } else {\n return null;\n }\n }\n }\n else { // more than one argument : we have data !\n name = this.root + name;\n fileAdd.call(this, name, data, o);\n }\n return this;\n },\n\n /**\n * Add a directory to the zip file, or search.\n * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders.\n * @return {JSZip} an object with the new directory as the root, or an array containing matching folders.\n */\n folder: function(arg) {\n if (!arg) {\n return this;\n }\n\n if (isRegExp(arg)) {\n return this.filter(function(relativePath, file) {\n return file.dir && arg.test(relativePath);\n });\n }\n\n // else, name is a new folder\n var name = this.root + arg;\n var newFolder = folderAdd.call(this, name);\n\n // Allow chaining by returning a new object with this folder as the root\n var ret = this.clone();\n ret.root = newFolder.name;\n return ret;\n },\n\n /**\n * Delete a file, or a directory and all sub-files, from the zip\n * @param {string} name the name of the file to delete\n * @return {JSZip} this JSZip object\n */\n remove: function(name) {\n name = this.root + name;\n var file = this.files[name];\n if (!file) {\n // Look for any folders\n if (name.slice(-1) !== \"/\") {\n name += \"/\";\n }\n file = this.files[name];\n }\n\n if (file && !file.dir) {\n // file\n delete this.files[name];\n } else {\n // maybe a folder, delete recursively\n var kids = this.filter(function(relativePath, file) {\n return file.name.slice(0, name.length) === name;\n });\n for (var i = 0; i < kids.length; i++) {\n delete this.files[kids[i].name];\n }\n }\n\n return this;\n },\n\n /**\n * Generate the complete zip file\n * @param {Object} options the options to generate the zip file :\n * - compression, \"STORE\" by default.\n * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file\n */\n generate: function(options) {\n throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n },\n\n /**\n * Generate the complete zip file as an internal stream.\n * @param {Object} options the options to generate the zip file :\n * - compression, \"STORE\" by default.\n * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n * @return {StreamHelper} the streamed zip file.\n */\n generateInternalStream: function(options) {\n var worker, opts = {};\n try {\n opts = utils.extend(options || {}, {\n streamFiles: false,\n compression: \"STORE\",\n compressionOptions : null,\n type: \"\",\n platform: \"DOS\",\n comment: null,\n mimeType: 'application/zip',\n encodeFileName: utf8.utf8encode\n });\n\n opts.type = opts.type.toLowerCase();\n opts.compression = opts.compression.toUpperCase();\n\n // \"binarystring\" is prefered but the internals use \"string\".\n if(opts.type === \"binarystring\") {\n opts.type = \"string\";\n }\n\n if (!opts.type) {\n throw new Error(\"No output type specified.\");\n }\n\n utils.checkSupport(opts.type);\n\n // accept nodejs `process.platform`\n if(\n opts.platform === 'darwin' ||\n opts.platform === 'freebsd' ||\n opts.platform === 'linux' ||\n opts.platform === 'sunos'\n ) {\n opts.platform = \"UNIX\";\n }\n if (opts.platform === 'win32') {\n opts.platform = \"DOS\";\n }\n\n var comment = opts.comment || this.comment || \"\";\n worker = generate.generateWorker(this, opts, comment);\n } catch (e) {\n worker = new GenericWorker(\"error\");\n worker.error(e);\n }\n return new StreamHelper(worker, opts.type || \"string\", opts.mimeType);\n },\n /**\n * Generate the complete zip file asynchronously.\n * @see generateInternalStream\n */\n generateAsync: function(options, onUpdate) {\n return this.generateInternalStream(options).accumulate(onUpdate);\n },\n /**\n * Generate the complete zip file asynchronously.\n * @see generateInternalStream\n */\n generateNodeStream: function(options, onUpdate) {\n options = options || {};\n if (!options.type) {\n options.type = \"nodebuffer\";\n }\n return this.generateInternalStream(options).toNodejsStream(onUpdate);\n }\n};\nmodule.exports = out;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/object.js\n// module id = 74\n// module chunks = 0","'use strict';\nvar Uint8ArrayReader = require('./Uint8ArrayReader');\nvar utils = require('../utils');\n\nfunction NodeBufferReader(data) {\n Uint8ArrayReader.call(this, data);\n}\nutils.inherits(NodeBufferReader, Uint8ArrayReader);\n\n/**\n * @see DataReader.readData\n */\nNodeBufferReader.prototype.readData = function(size) {\n this.checkOffset(size);\n var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = NodeBufferReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/NodeBufferReader.js\n// module id = 75\n// module chunks = 0","'use strict';\nvar DataReader = require('./DataReader');\nvar utils = require('../utils');\n\nfunction StringReader(data) {\n DataReader.call(this, data);\n}\nutils.inherits(StringReader, DataReader);\n/**\n * @see DataReader.byteAt\n */\nStringReader.prototype.byteAt = function(i) {\n return this.data.charCodeAt(this.zero + i);\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nStringReader.prototype.lastIndexOfSignature = function(sig) {\n return this.data.lastIndexOf(sig) - this.zero;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nStringReader.prototype.readAndCheckSignature = function (sig) {\n var data = this.readData(4);\n return sig === data;\n};\n/**\n * @see DataReader.readData\n */\nStringReader.prototype.readData = function(size) {\n this.checkOffset(size);\n // this will work because the constructor applied the \"& 0xff\" mask.\n var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = StringReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/reader/StringReader.js\n// module id = 76\n// module chunks = 0","'use strict';\n\nvar GenericWorker = require('./GenericWorker');\nvar utils = require('../utils');\n\n/**\n * A worker which convert chunks to a specified type.\n * @constructor\n * @param {String} destType the destination type.\n */\nfunction ConvertWorker(destType) {\n GenericWorker.call(this, \"ConvertWorker to \" + destType);\n this.destType = destType;\n}\nutils.inherits(ConvertWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nConvertWorker.prototype.processChunk = function (chunk) {\n this.push({\n data : utils.transformTo(this.destType, chunk.data),\n meta : chunk.meta\n });\n};\nmodule.exports = ConvertWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/stream/ConvertWorker.js\n// module id = 77\n// module chunks = 0","'use strict';\nvar readerFor = require('./reader/readerFor');\nvar utils = require('./utils');\nvar sig = require('./signature');\nvar ZipEntry = require('./zipEntry');\nvar utf8 = require('./utf8');\nvar support = require('./support');\n// class ZipEntries {{{\n/**\n * All the entries in the zip file.\n * @constructor\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntries(loadOptions) {\n this.files = [];\n this.loadOptions = loadOptions;\n}\nZipEntries.prototype = {\n /**\n * Check that the reader is on the specified signature.\n * @param {string} expectedSignature the expected signature.\n * @throws {Error} if it is an other signature.\n */\n checkSignature: function(expectedSignature) {\n if (!this.reader.readAndCheckSignature(expectedSignature)) {\n this.reader.index -= 4;\n var signature = this.reader.readString(4);\n throw new Error(\"Corrupted zip or bug: unexpected signature \" + \"(\" + utils.pretty(signature) + \", expected \" + utils.pretty(expectedSignature) + \")\");\n }\n },\n /**\n * Check if the given signature is at the given index.\n * @param {number} askedIndex the index to check.\n * @param {string} expectedSignature the signature to expect.\n * @return {boolean} true if the signature is here, false otherwise.\n */\n isSignature: function(askedIndex, expectedSignature) {\n var currentIndex = this.reader.index;\n this.reader.setIndex(askedIndex);\n var signature = this.reader.readString(4);\n var result = signature === expectedSignature;\n this.reader.setIndex(currentIndex);\n return result;\n },\n /**\n * Read the end of the central directory.\n */\n readBlockEndOfCentral: function() {\n this.diskNumber = this.reader.readInt(2);\n this.diskWithCentralDirStart = this.reader.readInt(2);\n this.centralDirRecordsOnThisDisk = this.reader.readInt(2);\n this.centralDirRecords = this.reader.readInt(2);\n this.centralDirSize = this.reader.readInt(4);\n this.centralDirOffset = this.reader.readInt(4);\n\n this.zipCommentLength = this.reader.readInt(2);\n // warning : the encoding depends of the system locale\n // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.\n // On a windows machine, this field is encoded with the localized windows code page.\n var zipComment = this.reader.readData(this.zipCommentLength);\n var decodeParamType = support.uint8array ? \"uint8array\" : \"array\";\n // To get consistent behavior with the generation part, we will assume that\n // this is utf8 encoded unless specified otherwise.\n var decodeContent = utils.transformTo(decodeParamType, zipComment);\n this.zipComment = this.loadOptions.decodeFileName(decodeContent);\n },\n /**\n * Read the end of the Zip 64 central directory.\n * Not merged with the method readEndOfCentral :\n * The end of central can coexist with its Zip64 brother,\n * I don't want to read the wrong number of bytes !\n */\n readBlockZip64EndOfCentral: function() {\n this.zip64EndOfCentralSize = this.reader.readInt(8);\n this.reader.skip(4);\n // this.versionMadeBy = this.reader.readString(2);\n // this.versionNeeded = this.reader.readInt(2);\n this.diskNumber = this.reader.readInt(4);\n this.diskWithCentralDirStart = this.reader.readInt(4);\n this.centralDirRecordsOnThisDisk = this.reader.readInt(8);\n this.centralDirRecords = this.reader.readInt(8);\n this.centralDirSize = this.reader.readInt(8);\n this.centralDirOffset = this.reader.readInt(8);\n\n this.zip64ExtensibleData = {};\n var extraDataSize = this.zip64EndOfCentralSize - 44,\n index = 0,\n extraFieldId,\n extraFieldLength,\n extraFieldValue;\n while (index < extraDataSize) {\n extraFieldId = this.reader.readInt(2);\n extraFieldLength = this.reader.readInt(4);\n extraFieldValue = this.reader.readData(extraFieldLength);\n this.zip64ExtensibleData[extraFieldId] = {\n id: extraFieldId,\n length: extraFieldLength,\n value: extraFieldValue\n };\n }\n },\n /**\n * Read the end of the Zip 64 central directory locator.\n */\n readBlockZip64EndOfCentralLocator: function() {\n this.diskWithZip64CentralDirStart = this.reader.readInt(4);\n this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);\n this.disksCount = this.reader.readInt(4);\n if (this.disksCount > 1) {\n throw new Error(\"Multi-volumes zip are not supported\");\n }\n },\n /**\n * Read the local files, based on the offset read in the central part.\n */\n readLocalFiles: function() {\n var i, file;\n for (i = 0; i < this.files.length; i++) {\n file = this.files[i];\n this.reader.setIndex(file.localHeaderOffset);\n this.checkSignature(sig.LOCAL_FILE_HEADER);\n file.readLocalPart(this.reader);\n file.handleUTF8();\n file.processAttributes();\n }\n },\n /**\n * Read the central directory.\n */\n readCentralDir: function() {\n var file;\n\n this.reader.setIndex(this.centralDirOffset);\n while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) {\n file = new ZipEntry({\n zip64: this.zip64\n }, this.loadOptions);\n file.readCentralPart(this.reader);\n this.files.push(file);\n }\n\n if (this.centralDirRecords !== this.files.length) {\n if (this.centralDirRecords !== 0 && this.files.length === 0) {\n // We expected some records but couldn't find ANY.\n // This is really suspicious, as if something went wrong.\n throw new Error(\"Corrupted zip or bug: expected \" + this.centralDirRecords + \" records in central dir, got \" + this.files.length);\n } else {\n // We found some records but not all.\n // Something is wrong but we got something for the user: no error here.\n // console.warn(\"expected\", this.centralDirRecords, \"records in central dir, got\", this.files.length);\n }\n }\n },\n /**\n * Read the end of central directory.\n */\n readEndOfCentral: function() {\n var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);\n if (offset < 0) {\n // Check if the content is a truncated zip or complete garbage.\n // A \"LOCAL_FILE_HEADER\" is not required at the beginning (auto\n // extractible zip for example) but it can give a good hint.\n // If an ajax request was used without responseType, we will also\n // get unreadable data.\n var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER);\n\n if (isGarbage) {\n throw new Error(\"Can't find end of central directory : is this a zip file ? \" +\n \"If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html\");\n } else {\n throw new Error(\"Corrupted zip: can't find end of central directory\");\n }\n\n }\n this.reader.setIndex(offset);\n var endOfCentralDirOffset = offset;\n this.checkSignature(sig.CENTRAL_DIRECTORY_END);\n this.readBlockEndOfCentral();\n\n\n /* extract from the zip spec :\n 4) If one of the fields in the end of central directory\n record is too small to hold required data, the field\n should be set to -1 (0xFFFF or 0xFFFFFFFF) and the\n ZIP64 format record should be created.\n 5) The end of central directory record and the\n Zip64 end of central directory locator record must\n reside on the same disk when splitting or spanning\n an archive.\n */\n if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {\n this.zip64 = true;\n\n /*\n Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from\n the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents\n all numbers as 64-bit double precision IEEE 754 floating point numbers.\n So, we have 53bits for integers and bitwise operations treat everything as 32bits.\n see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators\n and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5\n */\n\n // should look for a zip64 EOCD locator\n offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n if (offset < 0) {\n throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory locator\");\n }\n this.reader.setIndex(offset);\n this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n this.readBlockZip64EndOfCentralLocator();\n\n // now the zip64 EOCD record\n if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) {\n // console.warn(\"ZIP64 end of central directory not where expected.\");\n this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n if (this.relativeOffsetEndOfZip64CentralDir < 0) {\n throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory\");\n }\n }\n this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);\n this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n this.readBlockZip64EndOfCentral();\n }\n\n var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize;\n if (this.zip64) {\n expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator\n expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize;\n }\n\n var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset;\n\n if (extraBytes > 0) {\n // console.warn(extraBytes, \"extra bytes at beginning or within zipfile\");\n if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) {\n // The offsets seem wrong, but we have something at the specified offset.\n // So… we keep it.\n } else {\n // the offset is wrong, update the \"zero\" of the reader\n // this happens if data has been prepended (crx files for example)\n this.reader.zero = extraBytes;\n }\n } else if (extraBytes < 0) {\n throw new Error(\"Corrupted zip: missing \" + Math.abs(extraBytes) + \" bytes.\");\n }\n },\n prepareReader: function(data) {\n this.reader = readerFor(data);\n },\n /**\n * Read a zip file and create ZipEntries.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.\n */\n load: function(data) {\n this.prepareReader(data);\n this.readEndOfCentral();\n this.readCentralDir();\n this.readLocalFiles();\n }\n};\n// }}} end of ZipEntries\nmodule.exports = ZipEntries;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/zipEntries.js\n// module id = 78\n// module chunks = 0","'use strict';\nvar readerFor = require('./reader/readerFor');\nvar utils = require('./utils');\nvar CompressedObject = require('./compressedObject');\nvar crc32fn = require('./crc32');\nvar utf8 = require('./utf8');\nvar compressions = require('./compressions');\nvar support = require('./support');\n\nvar MADE_BY_DOS = 0x00;\nvar MADE_BY_UNIX = 0x03;\n\n/**\n * Find a compression registered in JSZip.\n * @param {string} compressionMethod the method magic to find.\n * @return {Object|null} the JSZip compression object, null if none found.\n */\nvar findCompression = function(compressionMethod) {\n for (var method in compressions) {\n if (!compressions.hasOwnProperty(method)) {\n continue;\n }\n if (compressions[method].magic === compressionMethod) {\n return compressions[method];\n }\n }\n return null;\n};\n\n// class ZipEntry {{{\n/**\n * An entry in the zip file.\n * @constructor\n * @param {Object} options Options of the current file.\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntry(options, loadOptions) {\n this.options = options;\n this.loadOptions = loadOptions;\n}\nZipEntry.prototype = {\n /**\n * say if the file is encrypted.\n * @return {boolean} true if the file is encrypted, false otherwise.\n */\n isEncrypted: function() {\n // bit 1 is set\n return (this.bitFlag & 0x0001) === 0x0001;\n },\n /**\n * say if the file has utf-8 filename/comment.\n * @return {boolean} true if the filename/comment is in utf-8, false otherwise.\n */\n useUTF8: function() {\n // bit 11 is set\n return (this.bitFlag & 0x0800) === 0x0800;\n },\n /**\n * Read the local part of a zip file and add the info in this object.\n * @param {DataReader} reader the reader to use.\n */\n readLocalPart: function(reader) {\n var compression, localExtraFieldsLength;\n\n // we already know everything from the central dir !\n // If the central dir data are false, we are doomed.\n // On the bright side, the local part is scary : zip64, data descriptors, both, etc.\n // The less data we get here, the more reliable this should be.\n // Let's skip the whole header and dash to the data !\n reader.skip(22);\n // in some zip created on windows, the filename stored in the central dir contains \\ instead of /.\n // Strangely, the filename here is OK.\n // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes\n // or APPNOTE#4.4.17.1, \"All slashes MUST be forward slashes '/'\") but there are a lot of bad zip generators...\n // Search \"unzip mismatching \"local\" filename continuing with \"central\" filename version\" on\n // the internet.\n //\n // I think I see the logic here : the central directory is used to display\n // content and the local directory is used to extract the files. Mixing / and \\\n // may be used to display \\ to windows users and use / when extracting the files.\n // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394\n this.fileNameLength = reader.readInt(2);\n localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir\n // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding.\n this.fileName = reader.readData(this.fileNameLength);\n reader.skip(localExtraFieldsLength);\n\n if (this.compressedSize === -1 || this.uncompressedSize === -1) {\n throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory \" + \"(compressedSize === -1 || uncompressedSize === -1)\");\n }\n\n compression = findCompression(this.compressionMethod);\n if (compression === null) { // no compression found\n throw new Error(\"Corrupted zip : compression \" + utils.pretty(this.compressionMethod) + \" unknown (inner file : \" + utils.transformTo(\"string\", this.fileName) + \")\");\n }\n this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize));\n },\n\n /**\n * Read the central part of a zip file and add the info in this object.\n * @param {DataReader} reader the reader to use.\n */\n readCentralPart: function(reader) {\n this.versionMadeBy = reader.readInt(2);\n reader.skip(2);\n // this.versionNeeded = reader.readInt(2);\n this.bitFlag = reader.readInt(2);\n this.compressionMethod = reader.readString(2);\n this.date = reader.readDate();\n this.crc32 = reader.readInt(4);\n this.compressedSize = reader.readInt(4);\n this.uncompressedSize = reader.readInt(4);\n var fileNameLength = reader.readInt(2);\n this.extraFieldsLength = reader.readInt(2);\n this.fileCommentLength = reader.readInt(2);\n this.diskNumberStart = reader.readInt(2);\n this.internalFileAttributes = reader.readInt(2);\n this.externalFileAttributes = reader.readInt(4);\n this.localHeaderOffset = reader.readInt(4);\n\n if (this.isEncrypted()) {\n throw new Error(\"Encrypted zip are not supported\");\n }\n\n // will be read in the local part, see the comments there\n reader.skip(fileNameLength);\n this.readExtraFields(reader);\n this.parseZIP64ExtraField(reader);\n this.fileComment = reader.readData(this.fileCommentLength);\n },\n\n /**\n * Parse the external file attributes and get the unix/dos permissions.\n */\n processAttributes: function () {\n this.unixPermissions = null;\n this.dosPermissions = null;\n var madeBy = this.versionMadeBy >> 8;\n\n // Check if we have the DOS directory flag set.\n // We look for it in the DOS and UNIX permissions\n // but some unknown platform could set it as a compatibility flag.\n this.dir = this.externalFileAttributes & 0x0010 ? true : false;\n\n if(madeBy === MADE_BY_DOS) {\n // first 6 bits (0 to 5)\n this.dosPermissions = this.externalFileAttributes & 0x3F;\n }\n\n if(madeBy === MADE_BY_UNIX) {\n this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;\n // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);\n }\n\n // fail safe : if the name ends with a / it probably means a folder\n if (!this.dir && this.fileNameStr.slice(-1) === '/') {\n this.dir = true;\n }\n },\n\n /**\n * Parse the ZIP64 extra field and merge the info in the current ZipEntry.\n * @param {DataReader} reader the reader to use.\n */\n parseZIP64ExtraField: function(reader) {\n\n if (!this.extraFields[0x0001]) {\n return;\n }\n\n // should be something, preparing the extra reader\n var extraReader = readerFor(this.extraFields[0x0001].value);\n\n // I really hope that these 64bits integer can fit in 32 bits integer, because js\n // won't let us have more.\n if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {\n this.uncompressedSize = extraReader.readInt(8);\n }\n if (this.compressedSize === utils.MAX_VALUE_32BITS) {\n this.compressedSize = extraReader.readInt(8);\n }\n if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {\n this.localHeaderOffset = extraReader.readInt(8);\n }\n if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {\n this.diskNumberStart = extraReader.readInt(4);\n }\n },\n /**\n * Read the central part of a zip file and add the info in this object.\n * @param {DataReader} reader the reader to use.\n */\n readExtraFields: function(reader) {\n var end = reader.index + this.extraFieldsLength,\n extraFieldId,\n extraFieldLength,\n extraFieldValue;\n\n if (!this.extraFields) {\n this.extraFields = {};\n }\n\n while (reader.index < end) {\n extraFieldId = reader.readInt(2);\n extraFieldLength = reader.readInt(2);\n extraFieldValue = reader.readData(extraFieldLength);\n\n this.extraFields[extraFieldId] = {\n id: extraFieldId,\n length: extraFieldLength,\n value: extraFieldValue\n };\n }\n },\n /**\n * Apply an UTF8 transformation if needed.\n */\n handleUTF8: function() {\n var decodeParamType = support.uint8array ? \"uint8array\" : \"array\";\n if (this.useUTF8()) {\n this.fileNameStr = utf8.utf8decode(this.fileName);\n this.fileCommentStr = utf8.utf8decode(this.fileComment);\n } else {\n var upath = this.findExtraFieldUnicodePath();\n if (upath !== null) {\n this.fileNameStr = upath;\n } else {\n // ASCII text or unsupported code page\n var fileNameByteArray = utils.transformTo(decodeParamType, this.fileName);\n this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray);\n }\n\n var ucomment = this.findExtraFieldUnicodeComment();\n if (ucomment !== null) {\n this.fileCommentStr = ucomment;\n } else {\n // ASCII text or unsupported code page\n var commentByteArray = utils.transformTo(decodeParamType, this.fileComment);\n this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray);\n }\n }\n },\n\n /**\n * Find the unicode path declared in the extra field, if any.\n * @return {String} the unicode path, null otherwise.\n */\n findExtraFieldUnicodePath: function() {\n var upathField = this.extraFields[0x7075];\n if (upathField) {\n var extraReader = readerFor(upathField.value);\n\n // wrong version\n if (extraReader.readInt(1) !== 1) {\n return null;\n }\n\n // the crc of the filename changed, this field is out of date.\n if (crc32fn(this.fileName) !== extraReader.readInt(4)) {\n return null;\n }\n\n return utf8.utf8decode(extraReader.readData(upathField.length - 5));\n }\n return null;\n },\n\n /**\n * Find the unicode comment declared in the extra field, if any.\n * @return {String} the unicode comment, null otherwise.\n */\n findExtraFieldUnicodeComment: function() {\n var ucommentField = this.extraFields[0x6375];\n if (ucommentField) {\n var extraReader = readerFor(ucommentField.value);\n\n // wrong version\n if (extraReader.readInt(1) !== 1) {\n return null;\n }\n\n // the crc of the comment changed, this field is out of date.\n if (crc32fn(this.fileComment) !== extraReader.readInt(4)) {\n return null;\n }\n\n return utf8.utf8decode(extraReader.readData(ucommentField.length - 5));\n }\n return null;\n }\n};\nmodule.exports = ZipEntry;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/zipEntry.js\n// module id = 79\n// module chunks = 0","'use strict';\n\nvar StreamHelper = require('./stream/StreamHelper');\nvar DataWorker = require('./stream/DataWorker');\nvar utf8 = require('./utf8');\nvar CompressedObject = require('./compressedObject');\nvar GenericWorker = require('./stream/GenericWorker');\n\n/**\n * A simple object representing a file in the zip file.\n * @constructor\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data\n * @param {Object} options the options of the file\n */\nvar ZipObject = function(name, data, options) {\n this.name = name;\n this.dir = options.dir;\n this.date = options.date;\n this.comment = options.comment;\n this.unixPermissions = options.unixPermissions;\n this.dosPermissions = options.dosPermissions;\n\n this._data = data;\n this._dataBinary = options.binary;\n // keep only the compression\n this.options = {\n compression : options.compression,\n compressionOptions : options.compressionOptions\n };\n};\n\nZipObject.prototype = {\n /**\n * Create an internal stream for the content of this object.\n * @param {String} type the type of each chunk.\n * @return StreamHelper the stream.\n */\n internalStream: function (type) {\n var result = null, outputType = \"string\";\n try {\n if (!type) {\n throw new Error(\"No output type specified.\");\n }\n outputType = type.toLowerCase();\n var askUnicodeString = outputType === \"string\" || outputType === \"text\";\n if (outputType === \"binarystring\" || outputType === \"text\") {\n outputType = \"string\";\n }\n result = this._decompressWorker();\n\n var isUnicodeString = !this._dataBinary;\n\n if (isUnicodeString && !askUnicodeString) {\n result = result.pipe(new utf8.Utf8EncodeWorker());\n }\n if (!isUnicodeString && askUnicodeString) {\n result = result.pipe(new utf8.Utf8DecodeWorker());\n }\n } catch (e) {\n result = new GenericWorker(\"error\");\n result.error(e);\n }\n\n return new StreamHelper(result, outputType, \"\");\n },\n\n /**\n * Prepare the content in the asked type.\n * @param {String} type the type of the result.\n * @param {Function} onUpdate a function to call on each internal update.\n * @return Promise the promise of the result.\n */\n async: function (type, onUpdate) {\n return this.internalStream(type).accumulate(onUpdate);\n },\n\n /**\n * Prepare the content as a nodejs stream.\n * @param {String} type the type of each chunk.\n * @param {Function} onUpdate a function to call on each internal update.\n * @return Stream the stream.\n */\n nodeStream: function (type, onUpdate) {\n return this.internalStream(type || \"nodebuffer\").toNodejsStream(onUpdate);\n },\n\n /**\n * Return a worker for the compressed content.\n * @private\n * @param {Object} compression the compression object to use.\n * @param {Object} compressionOptions the options to use when compressing.\n * @return Worker the worker.\n */\n _compressWorker: function (compression, compressionOptions) {\n if (\n this._data instanceof CompressedObject &&\n this._data.compression.magic === compression.magic\n ) {\n return this._data.getCompressedWorker();\n } else {\n var result = this._decompressWorker();\n if(!this._dataBinary) {\n result = result.pipe(new utf8.Utf8EncodeWorker());\n }\n return CompressedObject.createWorkerFrom(result, compression, compressionOptions);\n }\n },\n /**\n * Return a worker for the decompressed content.\n * @private\n * @return Worker the worker.\n */\n _decompressWorker : function () {\n if (this._data instanceof CompressedObject) {\n return this._data.getContentWorker();\n } else if (this._data instanceof GenericWorker) {\n return this._data;\n } else {\n return new DataWorker(this._data);\n }\n }\n};\n\nvar removedMethods = [\"asText\", \"asBinary\", \"asNodeBuffer\", \"asUint8Array\", \"asArrayBuffer\"];\nvar removedFn = function () {\n throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n};\n\nfor(var i = 0; i < removedMethods.length; i++) {\n ZipObject.prototype[removedMethods[i]] = removedFn;\n}\nmodule.exports = ZipObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/lib/zipObject.js\n// module id = 80\n// module chunks = 0","require('../modules/web.immediate');\nmodule.exports = require('../modules/_core').setImmediate;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/fn/set-immediate.js\n// module id = 81\n// module chunks = 0","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_a-function.js\n// module id = 82\n// module chunks = 0","var isObject = require('./_is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_an-object.js\n// module id = 83\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_cof.js\n// module id = 84\n// module chunks = 0","var global = require('./_global')\n , core = require('./_core')\n , ctx = require('./_ctx')\n , hide = require('./_hide')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE]\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(a, b, c){\n if(this instanceof C){\n switch(arguments.length){\n case 0: return new C;\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if(IS_PROTO){\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_export.js\n// module id = 85\n// module chunks = 0","var dP = require('./_object-dp')\n , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_hide.js\n// module id = 86\n// module chunks = 0","module.exports = require('./_global').document && document.documentElement;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_html.js\n// module id = 87\n// module chunks = 0","module.exports = !require('./_descriptors') && !require('./_fails')(function(){\r\n return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\r\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_ie8-dom-define.js\n// module id = 88\n// module chunks = 0","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_invoke.js\n// module id = 89\n// module chunks = 0","var anObject = require('./_an-object')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , toPrimitive = require('./_to-primitive')\n , dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if(IE8_DOM_DEFINE)try {\n return dP(O, P, Attributes);\n } catch(e){ /* empty */ }\n if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n if('value' in Attributes)O[P] = Attributes.value;\n return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_object-dp.js\n// module id = 90\n// module chunks = 0","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_property-desc.js\n// module id = 91\n// module chunks = 0","var ctx = require('./_ctx')\n , invoke = require('./_invoke')\n , html = require('./_html')\n , cel = require('./_dom-create')\n , global = require('./_global')\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(require('./_cof')(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_task.js\n// module id = 92\n// module chunks = 0","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n if(!isObject(it))return it;\n var fn, val;\n if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/_to-primitive.js\n// module id = 93\n// module chunks = 0","var $export = require('./_export')\n , $task = require('./_task');\n$export($export.G + $export.B, {\n setImmediate: $task.set,\n clearImmediate: $task.clear\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jszip/~/core-js/library/modules/web.immediate.js\n// module id = 94\n// module chunks = 0","'use strict';\nvar immediate = require('immediate');\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lie/lib/browser.js\n// module id = 95\n// module chunks = 0","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/index.js\n// module id = 96\n// module chunks = 0","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/deflate.js\n// module id = 97\n// module chunks = 0","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n var dict;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n // Convert data if needed\n if (typeof dictionary === 'string') {\n dict = strings.string2buf(dictionary);\n } else if (toString.call(dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(dictionary);\n } else {\n dict = dictionary;\n }\n\n status = zlib_inflate.inflateSetDictionary(this.strm, dict);\n\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/inflate.js\n// module id = 98\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/deflate.js\n// module id = 99\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/gzheader.js\n// module id = 100\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/inffast.js\n// module id = 101\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/inflate.js\n// module id = 102\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/inftrees.js\n// module id = 103\n// module chunks = 0","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n var len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n var n; /* iterates over tree elements */\n var bits; /* bit counter */\n var length; /* length value */\n var code; /* code value */\n var dist; /* distance index */\n var bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/trees.js\n// module id = 104\n// module chunks = 0","module.exports = require('./lib/_stream_duplex.js');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/duplex-browser.js\n// module id = 105\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_passthrough.js\n// module id = 106\n// module chunks = 0","'use strict';\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = require('safe-buffer').Buffer;\nvar util = require('util');\n\nfunction copyBuffer(src, target, offset) {\n src.copy(target, offset);\n}\n\nmodule.exports = function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n BufferList.prototype.push = function push(v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n };\n\n BufferList.prototype.unshift = function unshift(v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n };\n\n BufferList.prototype.shift = function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n };\n\n BufferList.prototype.clear = function clear() {\n this.head = this.tail = null;\n this.length = 0;\n };\n\n BufferList.prototype.join = function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n };\n\n BufferList.prototype.concat = function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n };\n\n return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n module.exports.prototype[util.inspect.custom] = function () {\n var obj = util.inspect({ length: this.length });\n return this.constructor.name + ' ' + obj;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/internal/streams/BufferList.js\n// module id = 107\n// module chunks = 0","module.exports = require('./readable').PassThrough\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/passthrough.js\n// module id = 108\n// module chunks = 0","module.exports = require('./readable').Transform\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/transform.js\n// module id = 109\n// module chunks = 0","module.exports = require('./lib/_stream_writable.js');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/writable-browser.js\n// module id = 110\n// module chunks = 0","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/setimmediate/setImmediate.js\n// module id = 111\n// module chunks = 0","module.exports = {\n framer: require('./src/framer.js'),\n windows: require('./src/windows.js')\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/signal-windows/index.js\n// module id = 112\n// module chunks = 0","/*===========================================================================*\\\n * Framer for breaking a U-Law ByteBuffer or Array into windows of a particular\n * size at an arbitrary step.\n *\n * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015\n\\*===========================================================================*/\nvar Framer = function (options) {\n options = options || {};\n\n this.frameIx = 0;\n this.frameSize = options.frameSize || 64;\n this.frameStep = options.frameStep|| this.frameSize;\n this.map = options.map || undefined;\n this.scale = options.scale || undefined;\n this.offset = options.offset ? options.offset : 0;\n this.sampleType = options.sampleType || 'UInt8';\n this.wordSize = options.wordSize || 1;\n};\n\nFramer.prototype = {\n /**\n * Frames a buffer of single-byte char values or an array of Numbers into windows of the specified size.\n */\n frame: function(bufferOrArray, callback) {\n var self = this,\n ix = this.offset,\n frame = [],\n isArray = Object.prototype.toString.call( bufferOrArray) === '[object Array]';\n\n self.frameIx = 0;\n\n while (ix < bufferOrArray.length) {\n var value = isArray ? bufferOrArray[ix] : bufferOrArray['read' + self.sampleType](ix); \n\n frame.push(this.map ? this.map[value] : value);\n\n if (frame.length == this.frameSize || ix+self.wordSize == bufferOrArray.length) finishFrame(frame);\n\n ix += self.wordSize;\n }\n\n // Did we not process any frames at all for some reason?\n if (this.frameIx == 0) callback(undefined);\n\n function finishFrame(frame) {\n if (this.scale) frame = frame.map(function (s, ix) {return s * self.scale[ix];});\n\n callback(frame, self.frameIx);\n\n if (ix != bufferOrArray.length - self.wordSize)\n {\n ix -= (self.frameSize - self.frameStep) * self.wordSize;\n\n self.frameIx++;\n frame.length = 0;\n }\n }\n }\n};\n\nmodule.exports = Framer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/signal-windows/src/framer.js\n// module id = 113\n// module chunks = 0","/*===========================================================================*\\\n * Method for producing the coefficients for windowing functions of an\n * arbitrary length.\n *\n * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015\n\\*===========================================================================*/\nmodule.exports = {\n construct: function (type, sampleCount, alpha) {\n var coef = [];\n switch (type)\n {\n case 'ham': \n for (var i = 0; i < sampleCount; i++) {\n coef[i] = 0.54 - 0.46 * Math.cos((2 * Math.PI * i)/(sampleCount - 1));\n }\n break;\n case 'tukey':\n var sm1 = sampleCount - 1,\n asm1 = alpha * sm1;\n for (var i = 0; i < sampleCount; i++) {\n // Left tail\n if (i < asm1 / 2)\n coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - 1))); \n // Right tail\n else if (i > (sm1 * (1 - alpha / 2)))\n coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - (2 / alpha) + 1)));\n // Middle (rectangular)\n else coef[i] = 1;\n }\n break;\n case 'rectangular':\n for (var i = 0; i < sampleCount; i++)\n coef[i] = 1.0;\n break;\n }\n return coef;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/signal-windows/src/windows.js\n// module id = 114\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/stream-browserify/index.js\n// module id = 115\n// module chunks = 0","var apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmeidate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/timers-browserify/main.js\n// module id = 116\n// module chunks = 0","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/util-deprecate/browser.js\n// module id = 117\n// module chunks = 0","/* global window, exports, define */\n\n!function() {\n 'use strict'\n\n var re = {\n not_string: /[^s]/,\n not_bool: /[^t]/,\n not_type: /[^T]/,\n not_primitive: /[^v]/,\n number: /[diefg]/,\n numeric_arg: /[bcdiefguxX]/,\n json: /[j]/,\n not_json: /[^j]/,\n text: /^[^\\x25]+/,\n modulo: /^\\x25{2}/,\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n key: /^([a-z_][a-z_\\d]*)/i,\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n index_access: /^\\[(\\d+)\\]/,\n sign: /^[\\+\\-]/\n }\n\n function sprintf(key) {\n // `arguments` is not an array, but should be fine for this call\n return sprintf_format(sprintf_parse(key), arguments)\n }\n\n function vsprintf(fmt, argv) {\n return sprintf.apply(null, [fmt].concat(argv || []))\n }\n\n function sprintf_format(parse_tree, argv) {\n var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, match, pad, pad_character, pad_length, is_positive, sign\n for (i = 0; i < tree_length; i++) {\n if (typeof parse_tree[i] === 'string') {\n output += parse_tree[i]\n }\n else if (Array.isArray(parse_tree[i])) {\n match = parse_tree[i] // convenience purposes only\n if (match[2]) { // keyword argument\n arg = argv[cursor]\n for (k = 0; k < match[2].length; k++) {\n if (!arg.hasOwnProperty(match[2][k])) {\n throw new Error(sprintf('[sprintf] property \"%s\" does not exist', match[2][k]))\n }\n arg = arg[match[2][k]]\n }\n }\n else if (match[1]) { // positional argument (explicit)\n arg = argv[match[1]]\n }\n else { // positional argument (implicit)\n arg = argv[cursor++]\n }\n\n if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && arg instanceof Function) {\n arg = arg()\n }\n\n if (re.numeric_arg.test(match[8]) && (typeof arg !== 'number' && isNaN(arg))) {\n throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))\n }\n\n if (re.number.test(match[8])) {\n is_positive = arg >= 0\n }\n\n switch (match[8]) {\n case 'b':\n arg = parseInt(arg, 10).toString(2)\n break\n case 'c':\n arg = String.fromCharCode(parseInt(arg, 10))\n break\n case 'd':\n case 'i':\n arg = parseInt(arg, 10)\n break\n case 'j':\n arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0)\n break\n case 'e':\n arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential()\n break\n case 'f':\n arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)\n break\n case 'g':\n arg = match[7] ? String(Number(arg.toPrecision(match[7]))) : parseFloat(arg)\n break\n case 'o':\n arg = (parseInt(arg, 10) >>> 0).toString(8)\n break\n case 's':\n arg = String(arg)\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 't':\n arg = String(!!arg)\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 'T':\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 'u':\n arg = parseInt(arg, 10) >>> 0\n break\n case 'v':\n arg = arg.valueOf()\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 'x':\n arg = (parseInt(arg, 10) >>> 0).toString(16)\n break\n case 'X':\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\n break\n }\n if (re.json.test(match[8])) {\n output += arg\n }\n else {\n if (re.number.test(match[8]) && (!is_positive || match[3])) {\n sign = is_positive ? '+' : '-'\n arg = arg.toString().replace(re.sign, '')\n }\n else {\n sign = ''\n }\n pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' '\n pad_length = match[6] - (sign + arg).length\n pad = match[6] ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\n output += match[5] ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\n }\n }\n }\n return output\n }\n\n var sprintf_cache = Object.create(null)\n\n function sprintf_parse(fmt) {\n if (sprintf_cache[fmt]) {\n return sprintf_cache[fmt]\n }\n\n var _fmt = fmt, match, parse_tree = [], arg_names = 0\n while (_fmt) {\n if ((match = re.text.exec(_fmt)) !== null) {\n parse_tree.push(match[0])\n }\n else if ((match = re.modulo.exec(_fmt)) !== null) {\n parse_tree.push('%')\n }\n else if ((match = re.placeholder.exec(_fmt)) !== null) {\n if (match[2]) {\n arg_names |= 1\n var field_list = [], replacement_field = match[2], field_match = []\n if ((field_match = re.key.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n }\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n match[2] = field_list\n }\n else {\n arg_names |= 2\n }\n if (arg_names === 3) {\n throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\n }\n parse_tree.push(match)\n }\n else {\n throw new SyntaxError('[sprintf] unexpected placeholder')\n }\n _fmt = _fmt.substring(match[0].length)\n }\n return sprintf_cache[fmt] = parse_tree\n }\n\n /**\n * export to either browser or node.js\n */\n /* eslint-disable quote-props */\n if (typeof exports !== 'undefined') {\n exports['sprintf'] = sprintf\n exports['vsprintf'] = vsprintf\n }\n if (typeof window !== 'undefined') {\n window['sprintf'] = sprintf\n window['vsprintf'] = vsprintf\n\n if (typeof define === 'function' && define['amd']) {\n define(function() {\n return {\n 'sprintf': sprintf,\n 'vsprintf': vsprintf\n }\n })\n }\n }\n /* eslint-enable quote-props */\n}()\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprintf-js/src/sprintf.js\n// module id = 120\n// module chunks = 0","/* FileSaver.js\n * A saveAs() FileSaver implementation.\n * 1.3.2\n * 2016-06-16 18:25:19\n *\n * By Eli Grey, http://eligrey.com\n * License: MIT\n * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n */\n\n/*global self */\n/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */\n\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */\n\nvar saveAs = saveAs || (function(view) {\n\t\"use strict\";\n\t// IE <10 is explicitly unsupported\n\tif (typeof view === \"undefined\" || typeof navigator !== \"undefined\" && /MSIE [1-9]\\./.test(navigator.userAgent)) {\n\t\treturn;\n\t}\n\tvar\n\t\t doc = view.document\n\t\t // only get URL when necessary in case Blob.js hasn't overridden it yet\n\t\t, get_URL = function() {\n\t\t\treturn view.URL || view.webkitURL || view;\n\t\t}\n\t\t, save_link = doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"a\")\n\t\t, can_use_save_link = \"download\" in save_link\n\t\t, click = function(node) {\n\t\t\tvar event = new MouseEvent(\"click\");\n\t\t\tnode.dispatchEvent(event);\n\t\t}\n\t\t, is_safari = /constructor/i.test(view.HTMLElement) || view.safari\n\t\t, is_chrome_ios =/CriOS\\/[\\d]+/.test(navigator.userAgent)\n\t\t, throw_outside = function(ex) {\n\t\t\t(view.setImmediate || view.setTimeout)(function() {\n\t\t\t\tthrow ex;\n\t\t\t}, 0);\n\t\t}\n\t\t, force_saveable_type = \"application/octet-stream\"\n\t\t// the Blob API is fundamentally broken as there is no \"downloadfinished\" event to subscribe to\n\t\t, arbitrary_revoke_timeout = 1000 * 40 // in ms\n\t\t, revoke = function(file) {\n\t\t\tvar revoker = function() {\n\t\t\t\tif (typeof file === \"string\") { // file is an object URL\n\t\t\t\t\tget_URL().revokeObjectURL(file);\n\t\t\t\t} else { // file is a File\n\t\t\t\t\tfile.remove();\n\t\t\t\t}\n\t\t\t};\n\t\t\tsetTimeout(revoker, arbitrary_revoke_timeout);\n\t\t}\n\t\t, dispatch = function(filesaver, event_types, event) {\n\t\t\tevent_types = [].concat(event_types);\n\t\t\tvar i = event_types.length;\n\t\t\twhile (i--) {\n\t\t\t\tvar listener = filesaver[\"on\" + event_types[i]];\n\t\t\t\tif (typeof listener === \"function\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener.call(filesaver, event || filesaver);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tthrow_outside(ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t, auto_bom = function(blob) {\n\t\t\t// prepend BOM for UTF-8 XML and text/* types (including HTML)\n\t\t\t// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n\t\t\tif (/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n\t\t\t\treturn new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});\n\t\t\t}\n\t\t\treturn blob;\n\t\t}\n\t\t, FileSaver = function(blob, name, no_auto_bom) {\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\t// First try a.download, then web filesystem, then object URLs\n\t\t\tvar\n\t\t\t\t filesaver = this\n\t\t\t\t, type = blob.type\n\t\t\t\t, force = type === force_saveable_type\n\t\t\t\t, object_url\n\t\t\t\t, dispatch_all = function() {\n\t\t\t\t\tdispatch(filesaver, \"writestart progress write writeend\".split(\" \"));\n\t\t\t\t}\n\t\t\t\t// on any filesys errors revert to saving with object URLs\n\t\t\t\t, fs_error = function() {\n\t\t\t\t\tif ((is_chrome_ios || (force && is_safari)) && view.FileReader) {\n\t\t\t\t\t\t// Safari doesn't allow downloading of blob urls\n\t\t\t\t\t\tvar reader = new FileReader();\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');\n\t\t\t\t\t\t\tvar popup = view.open(url, '_blank');\n\t\t\t\t\t\t\tif(!popup) view.location.href = url;\n\t\t\t\t\t\t\turl=undefined; // release reference before dispatching\n\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\tdispatch_all();\n\t\t\t\t\t\t};\n\t\t\t\t\t\treader.readAsDataURL(blob);\n\t\t\t\t\t\tfilesaver.readyState = filesaver.INIT;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// don't create more object URLs than needed\n\t\t\t\t\tif (!object_url) {\n\t\t\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t\t}\n\t\t\t\t\tif (force) {\n\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar opened = view.open(object_url, \"_blank\");\n\t\t\t\t\t\tif (!opened) {\n\t\t\t\t\t\t\t// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html\n\t\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t}\n\t\t\t;\n\t\t\tfilesaver.readyState = filesaver.INIT;\n\n\t\t\tif (can_use_save_link) {\n\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tsave_link.href = object_url;\n\t\t\t\t\tsave_link.download = name;\n\t\t\t\t\tclick(save_link);\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfs_error();\n\t\t}\n\t\t, FS_proto = FileSaver.prototype\n\t\t, saveAs = function(blob, name, no_auto_bom) {\n\t\t\treturn new FileSaver(blob, name || blob.name || \"download\", no_auto_bom);\n\t\t}\n\t;\n\t// IE 10+ (native saveAs)\n\tif (typeof navigator !== \"undefined\" && navigator.msSaveOrOpenBlob) {\n\t\treturn function(blob, name, no_auto_bom) {\n\t\t\tname = name || blob.name || \"download\";\n\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\treturn navigator.msSaveOrOpenBlob(blob, name);\n\t\t};\n\t}\n\n\tFS_proto.abort = function(){};\n\tFS_proto.readyState = FS_proto.INIT = 0;\n\tFS_proto.WRITING = 1;\n\tFS_proto.DONE = 2;\n\n\tFS_proto.error =\n\tFS_proto.onwritestart =\n\tFS_proto.onprogress =\n\tFS_proto.onwrite =\n\tFS_proto.onabort =\n\tFS_proto.onerror =\n\tFS_proto.onwriteend =\n\t\tnull;\n\n\treturn saveAs;\n}(\n\t typeof self !== \"undefined\" && self\n\t|| typeof window !== \"undefined\" && window\n\t|| this.content\n));\n// `self` is undefined in Firefox for Android content script context\n// while `this` is nsIContentFrameMessageManager\n// with an attribute `content` that corresponds to the window\n\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports.saveAs = saveAs;\n} else if ((typeof define !== \"undefined\" && define !== null) && (define.amd !== null)) {\n define(\"FileSaver.js\", function() {\n return saveAs;\n });\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/file-saver/FileSaver.js\n// module id = 121\n// module chunks = 0","module.exports = function() {\r\n\tthrow new Error(\"define cannot be used indirect\");\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-define.js\n// module id = 122\n// module chunks = 0","/* globals __webpack_amd_options__ */\r\nmodule.exports = __webpack_amd_options__;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-options.js\n// module id = 123\n// module chunks = 0"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5vDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnivBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpqBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC1FA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnNA;AACA;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACt/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACzEA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC/QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpIA;AACA;;;;;;ACDA;AACA;AACA;AACA;;;;;;ACHA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;;;;;;ACAA;AACA;AACA;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACj1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnhDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnsCA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC9EA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzLA;AACA;AACA;AACA;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;ACzNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;;;;;;;AC3LA;AACA;AACA;;;;;;;ACFA;AACA;;;;;A","sourceRoot":""} \ No newline at end of file
diff --git a/client/index.js b/client/index.js
index 2fc20bb..d506f23 100644
--- a/client/index.js
+++ b/client/index.js
@@ -80,7 +80,7 @@ function loadBuffer(){
if (! pcm) return
const FRAME_LENGTH = 126 * 255
- const FRAME_OFFSET = FRAME_LENGTH / 4
+ const FRAME_OFFSET = FRAME_LENGTH / 8
var zip = new JSZip()
@@ -90,15 +90,14 @@ function loadBuffer(){
// console.log('generating', count, offset)
let player = render(pcm.slice(offset, offset+FRAME_LENGTH), count, zip_folder)
register(player, count)
- if (count > 20) break
- // break
+ // if (count > 20) break
}
console.log('done exporting')
- zip.generateAsync({type:"blob"}).then(function(content) {
- console.log('saving zip')
- FileSaver.saveAs(content, "img2pix.zip")
- });
+ // zip.generateAsync({type:"blob"}).then(function(content) {
+ // console.log('saving zip')
+ // FileSaver.saveAs(content, "img2pix.zip")
+ // })
play(0)
}
function render(pcm, count, zip){
@@ -106,7 +105,6 @@ function render(pcm, count, zip){
// console.log('render', fft)
// const pcm_rev = pcm.slice().reverse()
// const spec_rev = spectrum.toSpectrum(pcm_rev, spec.sr)
- // const { buf, pcm } = spectrum.fromSpectrum(fft)
draw.clear()
const { canvas, imageData } = draw.raw_spectrum(fft, 0, 256, 0, 256, _r, _i)
const dataURL = canvas.toDataURL("image/png")
@@ -122,9 +120,9 @@ function play(i) {
let player = players[clamp(i, 0, players.length)]
// const { canvas, imageData } = draw.raw_spectrum(fft, 0, 256, 0, 256, 1, 1)
// console.log(_r, _i)
- const { canvas, imageData } = draw.raw_spectrum(player.fft, 0, 256, 0, 256, _r, _i)
+ // const { canvas, imageData } = draw.raw_spectrum(player.fft, 0, 256, 0, 256, _r, _i)
const new_fft = spectrum.fromImageData(player.imageData, 44100, _r, _i)
- gallery.innerHTML = ''
+ // gallery.innerHTML = ''
// console.log(player.fft.data, new_fft.data)
const buf = spectrum.fromSpectrum(new_fft)