From 032efae22d4ce018412a27117c6b697cc43a3430 Mon Sep 17 00:00:00 2001 From: Santiago Soto Date: Wed, 23 Oct 2024 15:11:26 -0300 Subject: [PATCH] revert to snapweb v5 --- ...j39Pm5R-.mp3 => 10-seconds-of-silence.mp3} | Bin .../snapcast/snapweb/3rd-party/libflac.js | 34568 ++++++++++++++++ .../snapweb/apple-touch-icon-180x180.png | Bin 1788 -> 0 bytes .../snapweb/assets/index-BDBx6C_I.css | 1 - .../snapcast/snapweb/assets/index-BYMjFABP.js | 135 - .../snapweb/assets/logo192-wKJb_L8G.png | Bin 11870 -> 0 bytes .../providers/snapcast/snapweb/config.js | 5 + .../providers/snapcast/snapweb/favicon.ico | Bin 969 -> 9662 bytes .../providers/snapcast/snapweb/index.html | 45 +- .../snapcast/snapweb/launcher-icon.png | Bin 0 -> 15275 bytes .../providers/snapcast/snapweb/logo.svg | 192 - .../providers/snapcast/snapweb/manifest.json | 16 + .../snapcast/snapweb/manifest.webmanifest | 1 - .../snapweb/maskable-icon-512x512.png | Bin 13747 -> 0 bytes .../providers/snapcast/snapweb/mute_icon.png | Bin 0 -> 2594 bytes .../providers/snapcast/snapweb/play.png | Bin 0 -> 1183 bytes .../snapcast/snapweb/pwa-192x192.png | Bin 2349 -> 0 bytes .../snapcast/snapweb/pwa-512x512.png | Bin 6041 -> 0 bytes .../providers/snapcast/snapweb/pwa-64x64.png | Bin 907 -> 0 bytes .../providers/snapcast/snapweb/registerSW.js | 1 - .../providers/snapcast/snapweb/robots.txt | 3 - ...cast-512-B1PzHP_P.png => snapcast-512.png} | Bin .../providers/snapcast/snapweb/snapcontrol.js | 903 + .../providers/snapcast/snapweb/snapstream.js | 919 + .../snapcast/snapweb/speaker_icon.png | Bin 0 -> 3883 bytes .../providers/snapcast/snapweb/stop.png | Bin 0 -> 441 bytes .../providers/snapcast/snapweb/styles.css | 314 + .../server/providers/snapcast/snapweb/sw.js | 1 - .../snapcast/snapweb/workbox-3e911b1d.js | 1 - 29 files changed, 36748 insertions(+), 357 deletions(-) rename music_assistant/server/providers/snapcast/snapweb/{assets/10-seconds-of-silence-j39Pm5R-.mp3 => 10-seconds-of-silence.mp3} (100%) create mode 100644 music_assistant/server/providers/snapcast/snapweb/3rd-party/libflac.js delete mode 100644 music_assistant/server/providers/snapcast/snapweb/apple-touch-icon-180x180.png delete mode 100644 music_assistant/server/providers/snapcast/snapweb/assets/index-BDBx6C_I.css delete mode 100644 music_assistant/server/providers/snapcast/snapweb/assets/index-BYMjFABP.js delete mode 100644 music_assistant/server/providers/snapcast/snapweb/assets/logo192-wKJb_L8G.png create mode 100644 music_assistant/server/providers/snapcast/snapweb/config.js create mode 100644 music_assistant/server/providers/snapcast/snapweb/launcher-icon.png delete mode 100644 music_assistant/server/providers/snapcast/snapweb/logo.svg create mode 100644 music_assistant/server/providers/snapcast/snapweb/manifest.json delete mode 100644 music_assistant/server/providers/snapcast/snapweb/manifest.webmanifest delete mode 100644 music_assistant/server/providers/snapcast/snapweb/maskable-icon-512x512.png create mode 100644 music_assistant/server/providers/snapcast/snapweb/mute_icon.png create mode 100644 music_assistant/server/providers/snapcast/snapweb/play.png delete mode 100644 music_assistant/server/providers/snapcast/snapweb/pwa-192x192.png delete mode 100644 music_assistant/server/providers/snapcast/snapweb/pwa-512x512.png delete mode 100644 music_assistant/server/providers/snapcast/snapweb/pwa-64x64.png delete mode 100644 music_assistant/server/providers/snapcast/snapweb/registerSW.js delete mode 100644 music_assistant/server/providers/snapcast/snapweb/robots.txt rename music_assistant/server/providers/snapcast/snapweb/{assets/snapcast-512-B1PzHP_P.png => snapcast-512.png} (100%) create mode 100644 music_assistant/server/providers/snapcast/snapweb/snapcontrol.js create mode 100644 music_assistant/server/providers/snapcast/snapweb/snapstream.js create mode 100644 music_assistant/server/providers/snapcast/snapweb/speaker_icon.png create mode 100644 music_assistant/server/providers/snapcast/snapweb/stop.png create mode 100644 music_assistant/server/providers/snapcast/snapweb/styles.css delete mode 100644 music_assistant/server/providers/snapcast/snapweb/sw.js delete mode 100644 music_assistant/server/providers/snapcast/snapweb/workbox-3e911b1d.js diff --git a/music_assistant/server/providers/snapcast/snapweb/assets/10-seconds-of-silence-j39Pm5R-.mp3 b/music_assistant/server/providers/snapcast/snapweb/10-seconds-of-silence.mp3 similarity index 100% rename from music_assistant/server/providers/snapcast/snapweb/assets/10-seconds-of-silence-j39Pm5R-.mp3 rename to music_assistant/server/providers/snapcast/snapweb/10-seconds-of-silence.mp3 diff --git a/music_assistant/server/providers/snapcast/snapweb/3rd-party/libflac.js b/music_assistant/server/providers/snapcast/snapweb/3rd-party/libflac.js new file mode 100644 index 000000000..c320c8c04 --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/3rd-party/libflac.js @@ -0,0 +1,34568 @@ + + +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module !== 'undefined' ? Module : {}; + + + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) +// libflac.js - port of libflac to JavaScript using emscripten + + +(function (root, factory) { + + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['module', 'require'], factory.bind(null, root)); + } else if (typeof module === 'object' && module.exports) { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + + // use process.env (if available) for reading Flac environment settings: + var env = typeof process !== 'undefined' && process && process.env? process.env : root; + factory(env, module, module.require); + } else { + // Browser globals + root.Flac = factory(root); + } + +}(typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : this, function (global, expLib, require) { +'use strict'; + +var Module = Module || {}; +var _flac_ready = false; +//in case resources are loaded asynchronously (e.g. *.mem file for minified version): setup "ready" handling +Module["onRuntimeInitialized"] = function(){ + _flac_ready = true; + if(!_exported){ + //if _exported is not yet set (may happen, in case initialization was strictly synchronously), + // do "pause" until sync initialization has run through + setTimeout(function(){do_fire_event('ready', [{type: 'ready', target: _exported}], true);}, 0); + } else { + do_fire_event('ready', [{type: 'ready', target: _exported}], true); + } +}; + +if(global && global.FLAC_SCRIPT_LOCATION){ + + Module["locateFile"] = function(fileName){ + var path = global.FLAC_SCRIPT_LOCATION || ''; + if(path[fileName]){ + return path[fileName]; + } + path += path && !/\/$/.test(path)? '/' : ''; + return path + fileName; + }; + + //NOTE will be overwritten if emscripten has env specific implementation for this + var readBinary = function(filePath){ + + //for Node: use default implementation (copied from generated code): + if(ENVIRONMENT_IS_NODE){ + var ret = read_(filePath, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + } + + //otherwise: try "fallback" to AJAX + return new Promise(function(resolve, reject){ + var xhr = new XMLHttpRequest(); + xhr.responseType = "arraybuffer"; + xhr.addEventListener("load", function(evt){ + resolve(xhr.response); + }); + xhr.addEventListener("error", function(err){ + reject(err); + }); + xhr.open("GET", filePath); + xhr.send(); + }); + }; +} + +//fallback for fetch && support file://-protocol: try read as binary if fetch fails +if(global && typeof global.fetch === 'function'){ + var _fetch = global.fetch; + global.fetch = function(url){ + return _fetch.apply(null, arguments).catch(function(err){ + try{ + var result = readBinary(url); + if(result && result.catch){ + result.catch(function(_err){throw err}); + } + return result; + } catch(_err){ + throw err; + } + }); + }; +} + + + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = {}; +var key; +for (key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +var arguments_ = []; +var thisProgram = './this.program'; +var quit_ = function(status, toThrow) { + throw toThrow; +}; + +// Determine the runtime environment we are in. You can customize this by +// setting the ENVIRONMENT setting at compile time (see settings.js). + +var ENVIRONMENT_IS_WEB = false; +var ENVIRONMENT_IS_WORKER = false; +var ENVIRONMENT_IS_NODE = false; +var ENVIRONMENT_IS_SHELL = false; +ENVIRONMENT_IS_WEB = typeof window === 'object'; +ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; +// N.b. Electron.js environment is simultaneously a NODE-environment, but +// also a web environment. +ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string'; +ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + + + + +// `/` should be present at the end if `scriptDirectory` is not empty +var scriptDirectory = ''; +function locateFile(path) { + if (Module['locateFile']) { + return Module['locateFile'](path, scriptDirectory); + } + return scriptDirectory + path; +} + +// Hooks that are implemented differently in different runtime environments. +var read_, + readAsync, + readBinary, + setWindowTitle; + +var nodeFS; +var nodePath; + +if (ENVIRONMENT_IS_NODE) { + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = require('path').dirname(scriptDirectory) + '/'; + } else { + scriptDirectory = __dirname + '/'; + } + + + + + read_ = function shell_read(filename, binary) { + var ret = tryParseAsDataURI(filename); + if (ret) { + return binary ? ret : ret.toString(); + } + if (!nodeFS) nodeFS = require('fs'); + if (!nodePath) nodePath = require('path'); + filename = nodePath['normalize'](filename); + return nodeFS['readFileSync'](filename, binary ? null : 'utf8'); + }; + + readBinary = function readBinary(filename) { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; + + + + + if (process['argv'].length > 1) { + thisProgram = process['argv'][1].replace(/\\/g, '/'); + } + + arguments_ = process['argv'].slice(2); + + if (typeof module !== 'undefined') { + module['exports'] = Module; + } + + + + quit_ = function(status) { + process['exit'](status); + }; + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; + + + +} else +if (ENVIRONMENT_IS_SHELL) { + + + if (typeof read != 'undefined') { + read_ = function shell_read(f) { + var data = tryParseAsDataURI(f); + if (data) { + return intArrayToString(data); + } + return read(f); + }; + } + + readBinary = function readBinary(f) { + var data; + data = tryParseAsDataURI(f); + if (data) { + return data; + } + if (typeof readbuffer === 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data === 'object'); + return data; + }; + + if (typeof scriptArgs != 'undefined') { + arguments_ = scriptArgs; + } else if (typeof arguments != 'undefined') { + arguments_ = arguments; + } + + if (typeof quit === 'function') { + quit_ = function(status) { + quit(status); + }; + } + + if (typeof print !== 'undefined') { + // Prefer to use print/printErr where they exist, as they usually work better. + if (typeof console === 'undefined') console = /** @type{!Console} */({}); + console.log = /** @type{!function(this:Console, ...*): undefined} */ (print); + console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr !== 'undefined' ? printErr : print); + } + + +} else + +// Note that this includes Node.js workers when relevant (pthreads is enabled). +// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and +// ENVIRONMENT_IS_NODE. +if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled + scriptDirectory = self.location.href; + } else if (document.currentScript) { // web + scriptDirectory = document.currentScript.src; + } + // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. + // otherwise, slice off the final part of the url to find the script directory. + // if scriptDirectory does not contain a slash, lastIndexOf will return -1, + // and scriptDirectory will correctly be replaced with an empty string. + if (scriptDirectory.indexOf('blob:') !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf('/')+1); + } else { + scriptDirectory = ''; + } + + + // Differentiate the Web Worker from the Node Worker case, as reading must + // be done differently. + { + + + + + read_ = function shell_read(url) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + } catch (err) { + var data = tryParseAsDataURI(url); + if (data) { + return intArrayToString(data); + } + throw err; + } + }; + + if (ENVIRONMENT_IS_WORKER) { + readBinary = function readBinary(url) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response)); + } catch (err) { + var data = tryParseAsDataURI(url); + if (data) { + return data; + } + throw err; + } + }; + } + + readAsync = function readAsync(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = function xhr_onload() { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + var data = tryParseAsDataURI(url); + if (data) { + onload(data.buffer); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + + + + + } + + setWindowTitle = function(title) { document.title = title }; +} else +{ +} + + +// Set up the out() and err() hooks, which are how we can print to stdout or +// stderr, respectively. +var out = Module['print'] || console.log.bind(console); +var err = Module['printErr'] || console.warn.bind(console); + +// Merge back in the overrides +for (key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = null; + +// Emit code to handle expected values on the Module object. This applies Module.x +// to the proper local x. This has two benefits: first, we only emit it if it is +// expected to arrive, and second, by using a local everywhere else that can be +// minified. +if (Module['arguments']) arguments_ = Module['arguments']; +if (Module['thisProgram']) thisProgram = Module['thisProgram']; +if (Module['quit']) quit_ = Module['quit']; + +// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message + + + + + +// {{PREAMBLE_ADDITIONS}} + +var STACK_ALIGN = 16; + +function dynamicAlloc(size) { + var ret = HEAP32[DYNAMICTOP_PTR>>2]; + var end = (ret + size + 15) & -16; + HEAP32[DYNAMICTOP_PTR>>2] = end; + return ret; +} + +function alignMemory(size, factor) { + if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default + return Math.ceil(size / factor) * factor; +} + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': return 1; + case 'i16': return 2; + case 'i32': return 4; + case 'i64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length-1] === '*') { + return 4; // A pointer + } else if (type[0] === 'i') { + var bits = Number(type.substr(1)); + assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); + return bits / 8; + } else { + return 0; + } + } + } +} + +function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + err(text); + } +} + + + + + + + + +// Wraps a JS function as a wasm function with a given signature. +function convertJsFunctionToWasm(func, sig) { + return func; +} + +var freeTableIndexes = []; + +// Weak map of functions in the table to their indexes, created on first use. +var functionsInTableMap; + +// Add a wasm function to the table. +function addFunctionWasm(func, sig) { + var table = wasmTable; + + // Check if the function is already in the table, to ensure each function + // gets a unique index. First, create the map if this is the first use. + if (!functionsInTableMap) { + functionsInTableMap = new WeakMap(); + for (var i = 0; i < table.length; i++) { + var item = table.get(i); + // Ignore null values. + if (item) { + functionsInTableMap.set(item, i); + } + } + } + if (functionsInTableMap.has(func)) { + return functionsInTableMap.get(func); + } + + // It's not in the table, add it now. + + + var ret; + // Reuse a free index if there is one, otherwise grow. + if (freeTableIndexes.length) { + ret = freeTableIndexes.pop(); + } else { + ret = table.length; + // Grow the table + try { + table.grow(1); + } catch (err) { + if (!(err instanceof RangeError)) { + throw err; + } + throw 'Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.'; + } + } + + // Set the new value. + try { + // Attempting to call this with JS function will cause of table.set() to fail + table.set(ret, func); + } catch (err) { + if (!(err instanceof TypeError)) { + throw err; + } + var wrapped = convertJsFunctionToWasm(func, sig); + table.set(ret, wrapped); + } + + functionsInTableMap.set(func, ret); + + return ret; +} + +function removeFunctionWasm(index) { + functionsInTableMap.delete(wasmTable.get(index)); + freeTableIndexes.push(index); +} + +// 'sig' parameter is required for the llvm backend but only when func is not +// already a WebAssembly function. +function addFunction(func, sig) { + + return addFunctionWasm(func, sig); +} + +function removeFunction(index) { + removeFunctionWasm(index); +} + + + +var funcWrappers = {}; + +function getFuncWrapper(func, sig) { + if (!func) return; // on null pointer, return undefined + assert(sig); + if (!funcWrappers[sig]) { + funcWrappers[sig] = {}; + } + var sigCache = funcWrappers[sig]; + if (!sigCache[func]) { + // optimize away arguments usage in common cases + if (sig.length === 1) { + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func); + }; + } else if (sig.length === 2) { + sigCache[func] = function dynCall_wrapper(arg) { + return dynCall(sig, func, [arg]); + }; + } else { + // general case + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func, Array.prototype.slice.call(arguments)); + }; + } + } + return sigCache[func]; +} + + + + + + + +function makeBigInt(low, high, unsigned) { + return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0)); +} + +/** @param {Array=} args */ +function dynCall(sig, ptr, args) { + if (args && args.length) { + return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); + } else { + return Module['dynCall_' + sig].call(null, ptr); + } +} + +var tempRet0 = 0; + +var setTempRet0 = function(value) { + tempRet0 = value; +}; + +var getTempRet0 = function() { + return tempRet0; +}; + + +// The address globals begin at. Very low in memory, for code size and optimization opportunities. +// Above 0 is static memory, starting with globals. +// Then the stack. +// Then 'dynamic' memory for sbrk. +var GLOBAL_BASE = 1024; + + + + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + + +var wasmBinary;if (Module['wasmBinary']) wasmBinary = Module['wasmBinary']; +var noExitRuntime;if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime']; + + + + +// wasm2js.js - enough of a polyfill for the WebAssembly object so that we can load +// wasm2js code that way. + +// Emit "var WebAssembly" if definitely using wasm2js. Otherwise, in MAYBE_WASM2JS +// mode, we can't use a "var" since it would prevent normal wasm from working. +/** @suppress{const} */ +var +WebAssembly = { + // Note that we do not use closure quoting (this['buffer'], etc.) on these + // functions, as they are just meant for internal use. In other words, this is + // not a fully general polyfill. + Memory: function(opts) { + this.buffer = new ArrayBuffer(opts['initial'] * 65536); + this.grow = function(amount) { + var ret = __growWasmMemory(amount); + return ret; + }; + }, + + // Table is not a normal constructor and instead returns the array object. + // That lets us use the length property automatically, which is simpler and + // smaller (but instanceof will not report that an instance of Table is an + // instance of this function). + Table: /** @constructor */ function(opts) { + var ret = new Array(opts['initial']); + ret.grow = function(by) { + if (ret.length >= 22 + 5) { + abort('Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH.') + } + ret.push(null); + }; + ret.set = function(i, func) { + ret[i] = func; + }; + ret.get = function(i) { + return ret[i]; + }; + return ret; + }, + + Module: function(binary) { + // TODO: use the binary and info somehow - right now the wasm2js output is embedded in + // the main JS + }, + + Instance: function(module, info) { + // TODO: use the module and info somehow - right now the wasm2js output is embedded in + // the main JS + // This will be replaced by the actual wasm2js code. + this.exports = ( +function instantiate(asmLibraryArg, wasmMemory, wasmTable) { + + + var scratchBuffer = new ArrayBuffer(8); + var i32ScratchView = new Int32Array(scratchBuffer); + var f32ScratchView = new Float32Array(scratchBuffer); + var f64ScratchView = new Float64Array(scratchBuffer); + + function wasm2js_scratch_load_i32(index) { + return i32ScratchView[index]; + } + + function wasm2js_scratch_store_i32(index, value) { + i32ScratchView[index] = value; + } + + function wasm2js_scratch_load_f64() { + return f64ScratchView[0]; + } + + function wasm2js_scratch_store_f64(value) { + f64ScratchView[0] = value; + } + + function wasm2js_scratch_store_f32(value) { + f32ScratchView[0] = value; + } + +function asmFunc(global, env, buffer) { + var memory = env.memory; + var FUNCTION_TABLE = wasmTable; + var HEAP8 = new global.Int8Array(buffer); + var HEAP16 = new global.Int16Array(buffer); + var HEAP32 = new global.Int32Array(buffer); + var HEAPU8 = new global.Uint8Array(buffer); + var HEAPU16 = new global.Uint16Array(buffer); + var HEAPU32 = new global.Uint32Array(buffer); + var HEAPF32 = new global.Float32Array(buffer); + var HEAPF64 = new global.Float64Array(buffer); + var Math_imul = global.Math.imul; + var Math_fround = global.Math.fround; + var Math_abs = global.Math.abs; + var Math_clz32 = global.Math.clz32; + var Math_min = global.Math.min; + var Math_max = global.Math.max; + var Math_floor = global.Math.floor; + var Math_ceil = global.Math.ceil; + var Math_sqrt = global.Math.sqrt; + var abort = env.abort; + var nan = global.NaN; + var infinity = global.Infinity; + var emscripten_resize_heap = env.emscripten_resize_heap; + var emscripten_memcpy_big = env.emscripten_memcpy_big; + var __wasi_fd_close = env.fd_close; + var __wasi_fd_read = env.fd_read; + var round = env.round; + var __wasi_fd_write = env.fd_write; + var setTempRet0 = env.setTempRet0; + var legalimport$__wasi_fd_seek = env.fd_seek; + var global$0 = 5257216; + var global$1 = 14168; + var __wasm_intrinsics_temp_i64 = 0; + var __wasm_intrinsics_temp_i64$hi = 0; + var i64toi32_i32$HIGH_BITS = 0; + // EMSCRIPTEN_START_FUNCS +; + function __wasm_call_ctors() { + + } + + function __errno_location() { + return 11584; + } + + function sbrk($0) { + var $1 = 0, $2 = 0; + $1 = HEAP32[3544]; + $2 = $0 + 3 & -4; + $0 = $1 + $2 | 0; + label$1 : { + if ($0 >>> 0 <= $1 >>> 0 ? ($2 | 0) >= 1 : 0) { + break label$1 + } + if ($0 >>> 0 > __wasm_memory_size() << 16 >>> 0) { + if (!emscripten_resize_heap($0 | 0)) { + break label$1 + } + } + HEAP32[3544] = $0; + return $1; + } + HEAP32[2896] = 48; + return -1; + } + + function memset($0, $1) { + var $2 = 0, $3 = 0; + label$1 : { + if (!$1) { + break label$1 + } + $2 = $0 + $1 | 0; + HEAP8[$2 + -1 | 0] = 0; + HEAP8[$0 | 0] = 0; + if ($1 >>> 0 < 3) { + break label$1 + } + HEAP8[$2 + -2 | 0] = 0; + HEAP8[$0 + 1 | 0] = 0; + HEAP8[$2 + -3 | 0] = 0; + HEAP8[$0 + 2 | 0] = 0; + if ($1 >>> 0 < 7) { + break label$1 + } + HEAP8[$2 + -4 | 0] = 0; + HEAP8[$0 + 3 | 0] = 0; + if ($1 >>> 0 < 9) { + break label$1 + } + $3 = 0 - $0 & 3; + $2 = $3 + $0 | 0; + HEAP32[$2 >> 2] = 0; + $3 = $1 - $3 & -4; + $1 = $3 + $2 | 0; + HEAP32[$1 + -4 >> 2] = 0; + if ($3 >>> 0 < 9) { + break label$1 + } + HEAP32[$2 + 8 >> 2] = 0; + HEAP32[$2 + 4 >> 2] = 0; + HEAP32[$1 + -8 >> 2] = 0; + HEAP32[$1 + -12 >> 2] = 0; + if ($3 >>> 0 < 25) { + break label$1 + } + HEAP32[$2 + 24 >> 2] = 0; + HEAP32[$2 + 20 >> 2] = 0; + HEAP32[$2 + 16 >> 2] = 0; + HEAP32[$2 + 12 >> 2] = 0; + HEAP32[$1 + -16 >> 2] = 0; + HEAP32[$1 + -20 >> 2] = 0; + HEAP32[$1 + -24 >> 2] = 0; + HEAP32[$1 + -28 >> 2] = 0; + $1 = $3; + $3 = $2 & 4 | 24; + $1 = $1 - $3 | 0; + if ($1 >>> 0 < 32) { + break label$1 + } + $2 = $2 + $3 | 0; + while (1) { + HEAP32[$2 + 24 >> 2] = 0; + HEAP32[$2 + 28 >> 2] = 0; + HEAP32[$2 + 16 >> 2] = 0; + HEAP32[$2 + 20 >> 2] = 0; + HEAP32[$2 + 8 >> 2] = 0; + HEAP32[$2 + 12 >> 2] = 0; + HEAP32[$2 >> 2] = 0; + HEAP32[$2 + 4 >> 2] = 0; + $2 = $2 + 32 | 0; + $1 = $1 + -32 | 0; + if ($1 >>> 0 > 31) { + continue + } + break; + }; + } + return $0; + } + + function memcpy($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0; + if ($2 >>> 0 >= 512) { + emscripten_memcpy_big($0 | 0, $1 | 0, $2 | 0) | 0; + return $0; + } + $4 = $0 + $2 | 0; + label$2 : { + if (!(($0 ^ $1) & 3)) { + label$4 : { + if (($2 | 0) < 1) { + $2 = $0; + break label$4; + } + if (!($0 & 3)) { + $2 = $0; + break label$4; + } + $2 = $0; + while (1) { + HEAP8[$2 | 0] = HEAPU8[$1 | 0]; + $1 = $1 + 1 | 0; + $2 = $2 + 1 | 0; + if ($2 >>> 0 >= $4 >>> 0) { + break label$4 + } + if ($2 & 3) { + continue + } + break; + }; + } + $3 = $4 & -4; + label$8 : { + if ($3 >>> 0 < 64) { + break label$8 + } + $5 = $3 + -64 | 0; + if ($2 >>> 0 > $5 >>> 0) { + break label$8 + } + while (1) { + HEAP32[$2 >> 2] = HEAP32[$1 >> 2]; + HEAP32[$2 + 4 >> 2] = HEAP32[$1 + 4 >> 2]; + HEAP32[$2 + 8 >> 2] = HEAP32[$1 + 8 >> 2]; + HEAP32[$2 + 12 >> 2] = HEAP32[$1 + 12 >> 2]; + HEAP32[$2 + 16 >> 2] = HEAP32[$1 + 16 >> 2]; + HEAP32[$2 + 20 >> 2] = HEAP32[$1 + 20 >> 2]; + HEAP32[$2 + 24 >> 2] = HEAP32[$1 + 24 >> 2]; + HEAP32[$2 + 28 >> 2] = HEAP32[$1 + 28 >> 2]; + HEAP32[$2 + 32 >> 2] = HEAP32[$1 + 32 >> 2]; + HEAP32[$2 + 36 >> 2] = HEAP32[$1 + 36 >> 2]; + HEAP32[$2 + 40 >> 2] = HEAP32[$1 + 40 >> 2]; + HEAP32[$2 + 44 >> 2] = HEAP32[$1 + 44 >> 2]; + HEAP32[$2 + 48 >> 2] = HEAP32[$1 + 48 >> 2]; + HEAP32[$2 + 52 >> 2] = HEAP32[$1 + 52 >> 2]; + HEAP32[$2 + 56 >> 2] = HEAP32[$1 + 56 >> 2]; + HEAP32[$2 + 60 >> 2] = HEAP32[$1 + 60 >> 2]; + $1 = $1 - -64 | 0; + $2 = $2 - -64 | 0; + if ($2 >>> 0 <= $5 >>> 0) { + continue + } + break; + }; + } + if ($2 >>> 0 >= $3 >>> 0) { + break label$2 + } + while (1) { + HEAP32[$2 >> 2] = HEAP32[$1 >> 2]; + $1 = $1 + 4 | 0; + $2 = $2 + 4 | 0; + if ($2 >>> 0 < $3 >>> 0) { + continue + } + break; + }; + break label$2; + } + if ($4 >>> 0 < 4) { + $2 = $0; + break label$2; + } + $3 = $4 + -4 | 0; + if ($3 >>> 0 < $0 >>> 0) { + $2 = $0; + break label$2; + } + $2 = $0; + while (1) { + HEAP8[$2 | 0] = HEAPU8[$1 | 0]; + HEAP8[$2 + 1 | 0] = HEAPU8[$1 + 1 | 0]; + HEAP8[$2 + 2 | 0] = HEAPU8[$1 + 2 | 0]; + HEAP8[$2 + 3 | 0] = HEAPU8[$1 + 3 | 0]; + $1 = $1 + 4 | 0; + $2 = $2 + 4 | 0; + if ($2 >>> 0 <= $3 >>> 0) { + continue + } + break; + }; + } + if ($2 >>> 0 < $4 >>> 0) { + while (1) { + HEAP8[$2 | 0] = HEAPU8[$1 | 0]; + $1 = $1 + 1 | 0; + $2 = $2 + 1 | 0; + if (($4 | 0) != ($2 | 0)) { + continue + } + break; + } + } + return $0; + } + + function dlmalloc($0) { + $0 = $0 | 0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $11 = global$0 - 16 | 0; + global$0 = $11; + label$1 : { + label$2 : { + label$3 : { + label$4 : { + label$5 : { + label$6 : { + label$7 : { + label$8 : { + label$9 : { + label$10 : { + label$11 : { + if ($0 >>> 0 <= 244) { + $6 = HEAP32[2897]; + $5 = $0 >>> 0 < 11 ? 16 : $0 + 11 & -8; + $0 = $5 >>> 3 | 0; + $1 = $6 >>> $0 | 0; + if ($1 & 3) { + $2 = $0 + (($1 ^ -1) & 1) | 0; + $5 = $2 << 3; + $1 = HEAP32[$5 + 11636 >> 2]; + $0 = $1 + 8 | 0; + $3 = HEAP32[$1 + 8 >> 2]; + $5 = $5 + 11628 | 0; + label$14 : { + if (($3 | 0) == ($5 | 0)) { + (wasm2js_i32$0 = 11588, wasm2js_i32$1 = __wasm_rotl_i32(-2, $2) & $6), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$14; + } + HEAP32[$3 + 12 >> 2] = $5; + HEAP32[$5 + 8 >> 2] = $3; + } + $2 = $2 << 3; + HEAP32[$1 + 4 >> 2] = $2 | 3; + $1 = $1 + $2 | 0; + HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1; + break label$1; + } + $7 = HEAP32[2899]; + if ($5 >>> 0 <= $7 >>> 0) { + break label$11 + } + if ($1) { + $2 = 2 << $0; + $0 = (0 - $2 | $2) & $1 << $0; + $0 = (0 - $0 & $0) + -1 | 0; + $1 = $0 >>> 12 & 16; + $2 = $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 5 & 8; + $2 = $2 | $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 2 & 4; + $2 = $2 | $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 1 & 2; + $2 = $2 | $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 1 & 1; + $2 = ($2 | $1) + ($0 >>> $1 | 0) | 0; + $3 = $2 << 3; + $1 = HEAP32[$3 + 11636 >> 2]; + $0 = HEAP32[$1 + 8 >> 2]; + $3 = $3 + 11628 | 0; + label$17 : { + if (($0 | 0) == ($3 | 0)) { + $6 = __wasm_rotl_i32(-2, $2) & $6; + HEAP32[2897] = $6; + break label$17; + } + HEAP32[$0 + 12 >> 2] = $3; + HEAP32[$3 + 8 >> 2] = $0; + } + $0 = $1 + 8 | 0; + HEAP32[$1 + 4 >> 2] = $5 | 3; + $4 = $1 + $5 | 0; + $2 = $2 << 3; + $3 = $2 - $5 | 0; + HEAP32[$4 + 4 >> 2] = $3 | 1; + HEAP32[$1 + $2 >> 2] = $3; + if ($7) { + $5 = $7 >>> 3 | 0; + $1 = ($5 << 3) + 11628 | 0; + $2 = HEAP32[2902]; + $5 = 1 << $5; + label$20 : { + if (!($5 & $6)) { + HEAP32[2897] = $5 | $6; + $5 = $1; + break label$20; + } + $5 = HEAP32[$1 + 8 >> 2]; + } + HEAP32[$1 + 8 >> 2] = $2; + HEAP32[$5 + 12 >> 2] = $2; + HEAP32[$2 + 12 >> 2] = $1; + HEAP32[$2 + 8 >> 2] = $5; + } + HEAP32[2902] = $4; + HEAP32[2899] = $3; + break label$1; + } + $10 = HEAP32[2898]; + if (!$10) { + break label$11 + } + $0 = ($10 & 0 - $10) + -1 | 0; + $1 = $0 >>> 12 & 16; + $2 = $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 5 & 8; + $2 = $2 | $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 2 & 4; + $2 = $2 | $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 1 & 2; + $2 = $2 | $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 1 & 1; + $1 = HEAP32[(($2 | $1) + ($0 >>> $1 | 0) << 2) + 11892 >> 2]; + $3 = (HEAP32[$1 + 4 >> 2] & -8) - $5 | 0; + $2 = $1; + while (1) { + label$23 : { + $0 = HEAP32[$2 + 16 >> 2]; + if (!$0) { + $0 = HEAP32[$2 + 20 >> 2]; + if (!$0) { + break label$23 + } + } + $4 = (HEAP32[$0 + 4 >> 2] & -8) - $5 | 0; + $2 = $4 >>> 0 < $3 >>> 0; + $3 = $2 ? $4 : $3; + $1 = $2 ? $0 : $1; + $2 = $0; + continue; + } + break; + }; + $9 = HEAP32[$1 + 24 >> 2]; + $4 = HEAP32[$1 + 12 >> 2]; + if (($4 | 0) != ($1 | 0)) { + $0 = HEAP32[$1 + 8 >> 2]; + HEAP32[$0 + 12 >> 2] = $4; + HEAP32[$4 + 8 >> 2] = $0; + break label$2; + } + $2 = $1 + 20 | 0; + $0 = HEAP32[$2 >> 2]; + if (!$0) { + $0 = HEAP32[$1 + 16 >> 2]; + if (!$0) { + break label$10 + } + $2 = $1 + 16 | 0; + } + while (1) { + $8 = $2; + $4 = $0; + $2 = $0 + 20 | 0; + $0 = HEAP32[$2 >> 2]; + if ($0) { + continue + } + $2 = $4 + 16 | 0; + $0 = HEAP32[$4 + 16 >> 2]; + if ($0) { + continue + } + break; + }; + HEAP32[$8 >> 2] = 0; + break label$2; + } + $5 = -1; + if ($0 >>> 0 > 4294967231) { + break label$11 + } + $0 = $0 + 11 | 0; + $5 = $0 & -8; + $8 = HEAP32[2898]; + if (!$8) { + break label$11 + } + $2 = 0 - $5 | 0; + $0 = $0 >>> 8 | 0; + $7 = 0; + label$29 : { + if (!$0) { + break label$29 + } + $7 = 31; + if ($5 >>> 0 > 16777215) { + break label$29 + } + $3 = $0 + 1048320 >>> 16 & 8; + $1 = $0 << $3; + $0 = $1 + 520192 >>> 16 & 4; + $6 = $1 << $0; + $1 = $6 + 245760 >>> 16 & 2; + $0 = ($6 << $1 >>> 15 | 0) - ($1 | ($0 | $3)) | 0; + $7 = ($0 << 1 | $5 >>> $0 + 21 & 1) + 28 | 0; + } + $3 = HEAP32[($7 << 2) + 11892 >> 2]; + label$30 : { + label$31 : { + label$32 : { + if (!$3) { + $0 = 0; + break label$32; + } + $1 = $5 << (($7 | 0) == 31 ? 0 : 25 - ($7 >>> 1 | 0) | 0); + $0 = 0; + while (1) { + label$35 : { + $6 = (HEAP32[$3 + 4 >> 2] & -8) - $5 | 0; + if ($6 >>> 0 >= $2 >>> 0) { + break label$35 + } + $4 = $3; + $2 = $6; + if ($2) { + break label$35 + } + $2 = 0; + $0 = $3; + break label$31; + } + $6 = HEAP32[$3 + 20 >> 2]; + $3 = HEAP32[(($1 >>> 29 & 4) + $3 | 0) + 16 >> 2]; + $0 = $6 ? (($6 | 0) == ($3 | 0) ? $0 : $6) : $0; + $1 = $1 << (($3 | 0) != 0); + if ($3) { + continue + } + break; + }; + } + if (!($0 | $4)) { + $0 = 2 << $7; + $0 = (0 - $0 | $0) & $8; + if (!$0) { + break label$11 + } + $0 = ($0 & 0 - $0) + -1 | 0; + $1 = $0 >>> 12 & 16; + $3 = $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 5 & 8; + $3 = $3 | $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 2 & 4; + $3 = $3 | $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 1 & 2; + $3 = $3 | $1; + $0 = $0 >>> $1 | 0; + $1 = $0 >>> 1 & 1; + $0 = HEAP32[(($3 | $1) + ($0 >>> $1 | 0) << 2) + 11892 >> 2]; + } + if (!$0) { + break label$30 + } + } + while (1) { + $3 = (HEAP32[$0 + 4 >> 2] & -8) - $5 | 0; + $1 = $3 >>> 0 < $2 >>> 0; + $2 = $1 ? $3 : $2; + $4 = $1 ? $0 : $4; + $1 = HEAP32[$0 + 16 >> 2]; + if ($1) { + $0 = $1 + } else { + $0 = HEAP32[$0 + 20 >> 2] + } + if ($0) { + continue + } + break; + }; + } + if (!$4 | $2 >>> 0 >= HEAP32[2899] - $5 >>> 0) { + break label$11 + } + $7 = HEAP32[$4 + 24 >> 2]; + $1 = HEAP32[$4 + 12 >> 2]; + if (($4 | 0) != ($1 | 0)) { + $0 = HEAP32[$4 + 8 >> 2]; + HEAP32[$0 + 12 >> 2] = $1; + HEAP32[$1 + 8 >> 2] = $0; + break label$3; + } + $3 = $4 + 20 | 0; + $0 = HEAP32[$3 >> 2]; + if (!$0) { + $0 = HEAP32[$4 + 16 >> 2]; + if (!$0) { + break label$9 + } + $3 = $4 + 16 | 0; + } + while (1) { + $6 = $3; + $1 = $0; + $3 = $0 + 20 | 0; + $0 = HEAP32[$3 >> 2]; + if ($0) { + continue + } + $3 = $1 + 16 | 0; + $0 = HEAP32[$1 + 16 >> 2]; + if ($0) { + continue + } + break; + }; + HEAP32[$6 >> 2] = 0; + break label$3; + } + $1 = HEAP32[2899]; + if ($1 >>> 0 >= $5 >>> 0) { + $0 = HEAP32[2902]; + $2 = $1 - $5 | 0; + label$45 : { + if ($2 >>> 0 >= 16) { + HEAP32[2899] = $2; + $3 = $0 + $5 | 0; + HEAP32[2902] = $3; + HEAP32[$3 + 4 >> 2] = $2 | 1; + HEAP32[$0 + $1 >> 2] = $2; + HEAP32[$0 + 4 >> 2] = $5 | 3; + break label$45; + } + HEAP32[2902] = 0; + HEAP32[2899] = 0; + HEAP32[$0 + 4 >> 2] = $1 | 3; + $1 = $0 + $1 | 0; + HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1; + } + $0 = $0 + 8 | 0; + break label$1; + } + $1 = HEAP32[2900]; + if ($1 >>> 0 > $5 >>> 0) { + $1 = $1 - $5 | 0; + HEAP32[2900] = $1; + $0 = HEAP32[2903]; + $2 = $0 + $5 | 0; + HEAP32[2903] = $2; + HEAP32[$2 + 4 >> 2] = $1 | 1; + HEAP32[$0 + 4 >> 2] = $5 | 3; + $0 = $0 + 8 | 0; + break label$1; + } + $0 = 0; + $4 = $5 + 47 | 0; + $3 = $4; + if (HEAP32[3015]) { + $2 = HEAP32[3017] + } else { + HEAP32[3018] = -1; + HEAP32[3019] = -1; + HEAP32[3016] = 4096; + HEAP32[3017] = 4096; + HEAP32[3015] = $11 + 12 & -16 ^ 1431655768; + HEAP32[3020] = 0; + HEAP32[3008] = 0; + $2 = 4096; + } + $6 = $3 + $2 | 0; + $8 = 0 - $2 | 0; + $2 = $6 & $8; + if ($2 >>> 0 <= $5 >>> 0) { + break label$1 + } + $3 = HEAP32[3007]; + if ($3) { + $7 = HEAP32[3005]; + $9 = $7 + $2 | 0; + if ($9 >>> 0 <= $7 >>> 0 | $9 >>> 0 > $3 >>> 0) { + break label$1 + } + } + if (HEAPU8[12032] & 4) { + break label$6 + } + label$51 : { + label$52 : { + $3 = HEAP32[2903]; + if ($3) { + $0 = 12036; + while (1) { + $7 = HEAP32[$0 >> 2]; + if ($7 + HEAP32[$0 + 4 >> 2] >>> 0 > $3 >>> 0 ? $7 >>> 0 <= $3 >>> 0 : 0) { + break label$52 + } + $0 = HEAP32[$0 + 8 >> 2]; + if ($0) { + continue + } + break; + }; + } + $1 = sbrk(0); + if (($1 | 0) == -1) { + break label$7 + } + $6 = $2; + $0 = HEAP32[3016]; + $3 = $0 + -1 | 0; + if ($3 & $1) { + $6 = ($2 - $1 | 0) + ($1 + $3 & 0 - $0) | 0 + } + if ($6 >>> 0 <= $5 >>> 0 | $6 >>> 0 > 2147483646) { + break label$7 + } + $0 = HEAP32[3007]; + if ($0) { + $3 = HEAP32[3005]; + $8 = $3 + $6 | 0; + if ($8 >>> 0 <= $3 >>> 0 | $8 >>> 0 > $0 >>> 0) { + break label$7 + } + } + $0 = sbrk($6); + if (($1 | 0) != ($0 | 0)) { + break label$51 + } + break label$5; + } + $6 = $8 & $6 - $1; + if ($6 >>> 0 > 2147483646) { + break label$7 + } + $1 = sbrk($6); + if (($1 | 0) == (HEAP32[$0 >> 2] + HEAP32[$0 + 4 >> 2] | 0)) { + break label$8 + } + $0 = $1; + } + if (!(($0 | 0) == -1 | $5 + 48 >>> 0 <= $6 >>> 0)) { + $1 = HEAP32[3017]; + $1 = $1 + ($4 - $6 | 0) & 0 - $1; + if ($1 >>> 0 > 2147483646) { + $1 = $0; + break label$5; + } + if ((sbrk($1) | 0) != -1) { + $6 = $1 + $6 | 0; + $1 = $0; + break label$5; + } + sbrk(0 - $6 | 0); + break label$7; + } + $1 = $0; + if (($0 | 0) != -1) { + break label$5 + } + break label$7; + } + $4 = 0; + break label$2; + } + $1 = 0; + break label$3; + } + if (($1 | 0) != -1) { + break label$5 + } + } + HEAP32[3008] = HEAP32[3008] | 4; + } + if ($2 >>> 0 > 2147483646) { + break label$4 + } + $1 = sbrk($2); + $0 = sbrk(0); + if ($1 >>> 0 >= $0 >>> 0 | ($1 | 0) == -1 | ($0 | 0) == -1) { + break label$4 + } + $6 = $0 - $1 | 0; + if ($6 >>> 0 <= $5 + 40 >>> 0) { + break label$4 + } + } + $0 = HEAP32[3005] + $6 | 0; + HEAP32[3005] = $0; + if ($0 >>> 0 > HEAPU32[3006]) { + HEAP32[3006] = $0 + } + label$62 : { + label$63 : { + label$64 : { + $3 = HEAP32[2903]; + if ($3) { + $0 = 12036; + while (1) { + $2 = HEAP32[$0 >> 2]; + $4 = HEAP32[$0 + 4 >> 2]; + if (($2 + $4 | 0) == ($1 | 0)) { + break label$64 + } + $0 = HEAP32[$0 + 8 >> 2]; + if ($0) { + continue + } + break; + }; + break label$63; + } + $0 = HEAP32[2901]; + if (!($1 >>> 0 >= $0 >>> 0 ? $0 : 0)) { + HEAP32[2901] = $1 + } + $0 = 0; + HEAP32[3010] = $6; + HEAP32[3009] = $1; + HEAP32[2905] = -1; + HEAP32[2906] = HEAP32[3015]; + HEAP32[3012] = 0; + while (1) { + $2 = $0 << 3; + $3 = $2 + 11628 | 0; + HEAP32[$2 + 11636 >> 2] = $3; + HEAP32[$2 + 11640 >> 2] = $3; + $0 = $0 + 1 | 0; + if (($0 | 0) != 32) { + continue + } + break; + }; + $0 = $6 + -40 | 0; + $2 = $1 + 8 & 7 ? -8 - $1 & 7 : 0; + $3 = $0 - $2 | 0; + HEAP32[2900] = $3; + $2 = $1 + $2 | 0; + HEAP32[2903] = $2; + HEAP32[$2 + 4 >> 2] = $3 | 1; + HEAP32[($0 + $1 | 0) + 4 >> 2] = 40; + HEAP32[2904] = HEAP32[3019]; + break label$62; + } + if (HEAPU8[$0 + 12 | 0] & 8 | $1 >>> 0 <= $3 >>> 0 | $2 >>> 0 > $3 >>> 0) { + break label$63 + } + HEAP32[$0 + 4 >> 2] = $4 + $6; + $0 = $3 + 8 & 7 ? -8 - $3 & 7 : 0; + $1 = $0 + $3 | 0; + HEAP32[2903] = $1; + $2 = HEAP32[2900] + $6 | 0; + $0 = $2 - $0 | 0; + HEAP32[2900] = $0; + HEAP32[$1 + 4 >> 2] = $0 | 1; + HEAP32[($2 + $3 | 0) + 4 >> 2] = 40; + HEAP32[2904] = HEAP32[3019]; + break label$62; + } + $0 = HEAP32[2901]; + if ($1 >>> 0 < $0 >>> 0) { + HEAP32[2901] = $1; + $0 = 0; + } + $2 = $1 + $6 | 0; + $0 = 12036; + label$70 : { + label$71 : { + label$72 : { + label$73 : { + label$74 : { + label$75 : { + while (1) { + if (($2 | 0) != HEAP32[$0 >> 2]) { + $0 = HEAP32[$0 + 8 >> 2]; + if ($0) { + continue + } + break label$75; + } + break; + }; + if (!(HEAPU8[$0 + 12 | 0] & 8)) { + break label$74 + } + } + $0 = 12036; + while (1) { + $2 = HEAP32[$0 >> 2]; + if ($2 >>> 0 <= $3 >>> 0) { + $4 = $2 + HEAP32[$0 + 4 >> 2] | 0; + if ($4 >>> 0 > $3 >>> 0) { + break label$73 + } + } + $0 = HEAP32[$0 + 8 >> 2]; + continue; + }; + } + HEAP32[$0 >> 2] = $1; + HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + $6; + $7 = ($1 + 8 & 7 ? -8 - $1 & 7 : 0) + $1 | 0; + HEAP32[$7 + 4 >> 2] = $5 | 3; + $1 = $2 + ($2 + 8 & 7 ? -8 - $2 & 7 : 0) | 0; + $0 = ($1 - $7 | 0) - $5 | 0; + $4 = $5 + $7 | 0; + if (($1 | 0) == ($3 | 0)) { + HEAP32[2903] = $4; + $0 = HEAP32[2900] + $0 | 0; + HEAP32[2900] = $0; + HEAP32[$4 + 4 >> 2] = $0 | 1; + break label$71; + } + if (HEAP32[2902] == ($1 | 0)) { + HEAP32[2902] = $4; + $0 = HEAP32[2899] + $0 | 0; + HEAP32[2899] = $0; + HEAP32[$4 + 4 >> 2] = $0 | 1; + HEAP32[$0 + $4 >> 2] = $0; + break label$71; + } + $2 = HEAP32[$1 + 4 >> 2]; + if (($2 & 3) == 1) { + $9 = $2 & -8; + label$83 : { + if ($2 >>> 0 <= 255) { + $3 = HEAP32[$1 + 8 >> 2]; + $5 = $2 >>> 3 | 0; + $2 = HEAP32[$1 + 12 >> 2]; + if (($2 | 0) == ($3 | 0)) { + (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $5)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$83; + } + HEAP32[$3 + 12 >> 2] = $2; + HEAP32[$2 + 8 >> 2] = $3; + break label$83; + } + $8 = HEAP32[$1 + 24 >> 2]; + $6 = HEAP32[$1 + 12 >> 2]; + label$86 : { + if (($6 | 0) != ($1 | 0)) { + $2 = HEAP32[$1 + 8 >> 2]; + HEAP32[$2 + 12 >> 2] = $6; + HEAP32[$6 + 8 >> 2] = $2; + break label$86; + } + label$89 : { + $3 = $1 + 20 | 0; + $5 = HEAP32[$3 >> 2]; + if ($5) { + break label$89 + } + $3 = $1 + 16 | 0; + $5 = HEAP32[$3 >> 2]; + if ($5) { + break label$89 + } + $6 = 0; + break label$86; + } + while (1) { + $2 = $3; + $6 = $5; + $3 = $5 + 20 | 0; + $5 = HEAP32[$3 >> 2]; + if ($5) { + continue + } + $3 = $6 + 16 | 0; + $5 = HEAP32[$6 + 16 >> 2]; + if ($5) { + continue + } + break; + }; + HEAP32[$2 >> 2] = 0; + } + if (!$8) { + break label$83 + } + $2 = HEAP32[$1 + 28 >> 2]; + $3 = ($2 << 2) + 11892 | 0; + label$91 : { + if (HEAP32[$3 >> 2] == ($1 | 0)) { + HEAP32[$3 >> 2] = $6; + if ($6) { + break label$91 + } + (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$83; + } + HEAP32[$8 + (HEAP32[$8 + 16 >> 2] == ($1 | 0) ? 16 : 20) >> 2] = $6; + if (!$6) { + break label$83 + } + } + HEAP32[$6 + 24 >> 2] = $8; + $2 = HEAP32[$1 + 16 >> 2]; + if ($2) { + HEAP32[$6 + 16 >> 2] = $2; + HEAP32[$2 + 24 >> 2] = $6; + } + $2 = HEAP32[$1 + 20 >> 2]; + if (!$2) { + break label$83 + } + HEAP32[$6 + 20 >> 2] = $2; + HEAP32[$2 + 24 >> 2] = $6; + } + $1 = $1 + $9 | 0; + $0 = $0 + $9 | 0; + } + HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] & -2; + HEAP32[$4 + 4 >> 2] = $0 | 1; + HEAP32[$0 + $4 >> 2] = $0; + if ($0 >>> 0 <= 255) { + $1 = $0 >>> 3 | 0; + $0 = ($1 << 3) + 11628 | 0; + $2 = HEAP32[2897]; + $1 = 1 << $1; + label$95 : { + if (!($2 & $1)) { + HEAP32[2897] = $1 | $2; + $1 = $0; + break label$95; + } + $1 = HEAP32[$0 + 8 >> 2]; + } + HEAP32[$0 + 8 >> 2] = $4; + HEAP32[$1 + 12 >> 2] = $4; + HEAP32[$4 + 12 >> 2] = $0; + HEAP32[$4 + 8 >> 2] = $1; + break label$71; + } + $6 = $4; + $1 = $0 >>> 8 | 0; + $2 = 0; + label$97 : { + if (!$1) { + break label$97 + } + $2 = 31; + if ($0 >>> 0 > 16777215) { + break label$97 + } + $3 = $1 + 1048320 >>> 16 & 8; + $2 = $1 << $3; + $1 = $2 + 520192 >>> 16 & 4; + $5 = $2 << $1; + $2 = $5 + 245760 >>> 16 & 2; + $1 = ($5 << $2 >>> 15 | 0) - ($2 | ($1 | $3)) | 0; + $2 = ($1 << 1 | $0 >>> $1 + 21 & 1) + 28 | 0; + } + $1 = $2; + HEAP32[$6 + 28 >> 2] = $1; + HEAP32[$4 + 16 >> 2] = 0; + HEAP32[$4 + 20 >> 2] = 0; + $2 = ($1 << 2) + 11892 | 0; + $3 = HEAP32[2898]; + $5 = 1 << $1; + label$98 : { + if (!($3 & $5)) { + HEAP32[2898] = $3 | $5; + HEAP32[$2 >> 2] = $4; + break label$98; + } + $3 = $0 << (($1 | 0) == 31 ? 0 : 25 - ($1 >>> 1 | 0) | 0); + $1 = HEAP32[$2 >> 2]; + while (1) { + $2 = $1; + if ((HEAP32[$1 + 4 >> 2] & -8) == ($0 | 0)) { + break label$72 + } + $1 = $3 >>> 29 | 0; + $3 = $3 << 1; + $5 = ($2 + ($1 & 4) | 0) + 16 | 0; + $1 = HEAP32[$5 >> 2]; + if ($1) { + continue + } + break; + }; + HEAP32[$5 >> 2] = $4; + } + HEAP32[$4 + 24 >> 2] = $2; + HEAP32[$4 + 12 >> 2] = $4; + HEAP32[$4 + 8 >> 2] = $4; + break label$71; + } + $0 = $6 + -40 | 0; + $2 = $1 + 8 & 7 ? -8 - $1 & 7 : 0; + $8 = $0 - $2 | 0; + HEAP32[2900] = $8; + $2 = $1 + $2 | 0; + HEAP32[2903] = $2; + HEAP32[$2 + 4 >> 2] = $8 | 1; + HEAP32[($0 + $1 | 0) + 4 >> 2] = 40; + HEAP32[2904] = HEAP32[3019]; + $0 = ($4 + ($4 + -39 & 7 ? 39 - $4 & 7 : 0) | 0) + -47 | 0; + $2 = $0 >>> 0 < $3 + 16 >>> 0 ? $3 : $0; + HEAP32[$2 + 4 >> 2] = 27; + $0 = HEAP32[3012]; + HEAP32[$2 + 16 >> 2] = HEAP32[3011]; + HEAP32[$2 + 20 >> 2] = $0; + $0 = HEAP32[3010]; + HEAP32[$2 + 8 >> 2] = HEAP32[3009]; + HEAP32[$2 + 12 >> 2] = $0; + HEAP32[3011] = $2 + 8; + HEAP32[3010] = $6; + HEAP32[3009] = $1; + HEAP32[3012] = 0; + $0 = $2 + 24 | 0; + while (1) { + HEAP32[$0 + 4 >> 2] = 7; + $1 = $0 + 8 | 0; + $0 = $0 + 4 | 0; + if ($4 >>> 0 > $1 >>> 0) { + continue + } + break; + }; + if (($2 | 0) == ($3 | 0)) { + break label$62 + } + HEAP32[$2 + 4 >> 2] = HEAP32[$2 + 4 >> 2] & -2; + $6 = $2 - $3 | 0; + HEAP32[$3 + 4 >> 2] = $6 | 1; + HEAP32[$2 >> 2] = $6; + if ($6 >>> 0 <= 255) { + $1 = $6 >>> 3 | 0; + $0 = ($1 << 3) + 11628 | 0; + $2 = HEAP32[2897]; + $1 = 1 << $1; + label$103 : { + if (!($2 & $1)) { + HEAP32[2897] = $1 | $2; + $1 = $0; + break label$103; + } + $1 = HEAP32[$0 + 8 >> 2]; + } + HEAP32[$0 + 8 >> 2] = $3; + HEAP32[$1 + 12 >> 2] = $3; + HEAP32[$3 + 12 >> 2] = $0; + HEAP32[$3 + 8 >> 2] = $1; + break label$62; + } + HEAP32[$3 + 16 >> 2] = 0; + HEAP32[$3 + 20 >> 2] = 0; + $7 = $3; + $0 = $6 >>> 8 | 0; + $1 = 0; + label$105 : { + if (!$0) { + break label$105 + } + $1 = 31; + if ($6 >>> 0 > 16777215) { + break label$105 + } + $2 = $0 + 1048320 >>> 16 & 8; + $1 = $0 << $2; + $0 = $1 + 520192 >>> 16 & 4; + $4 = $1 << $0; + $1 = $4 + 245760 >>> 16 & 2; + $0 = ($4 << $1 >>> 15 | 0) - ($1 | ($0 | $2)) | 0; + $1 = ($0 << 1 | $6 >>> $0 + 21 & 1) + 28 | 0; + } + $0 = $1; + HEAP32[$7 + 28 >> 2] = $0; + $1 = ($0 << 2) + 11892 | 0; + $2 = HEAP32[2898]; + $4 = 1 << $0; + label$106 : { + if (!($2 & $4)) { + HEAP32[2898] = $2 | $4; + HEAP32[$1 >> 2] = $3; + HEAP32[$3 + 24 >> 2] = $1; + break label$106; + } + $0 = $6 << (($0 | 0) == 31 ? 0 : 25 - ($0 >>> 1 | 0) | 0); + $1 = HEAP32[$1 >> 2]; + while (1) { + $2 = $1; + if (($6 | 0) == (HEAP32[$1 + 4 >> 2] & -8)) { + break label$70 + } + $1 = $0 >>> 29 | 0; + $0 = $0 << 1; + $4 = ($2 + ($1 & 4) | 0) + 16 | 0; + $1 = HEAP32[$4 >> 2]; + if ($1) { + continue + } + break; + }; + HEAP32[$4 >> 2] = $3; + HEAP32[$3 + 24 >> 2] = $2; + } + HEAP32[$3 + 12 >> 2] = $3; + HEAP32[$3 + 8 >> 2] = $3; + break label$62; + } + $0 = HEAP32[$2 + 8 >> 2]; + HEAP32[$0 + 12 >> 2] = $4; + HEAP32[$2 + 8 >> 2] = $4; + HEAP32[$4 + 24 >> 2] = 0; + HEAP32[$4 + 12 >> 2] = $2; + HEAP32[$4 + 8 >> 2] = $0; + } + $0 = $7 + 8 | 0; + break label$1; + } + $0 = HEAP32[$2 + 8 >> 2]; + HEAP32[$0 + 12 >> 2] = $3; + HEAP32[$2 + 8 >> 2] = $3; + HEAP32[$3 + 24 >> 2] = 0; + HEAP32[$3 + 12 >> 2] = $2; + HEAP32[$3 + 8 >> 2] = $0; + } + $0 = HEAP32[2900]; + if ($0 >>> 0 <= $5 >>> 0) { + break label$4 + } + $1 = $0 - $5 | 0; + HEAP32[2900] = $1; + $0 = HEAP32[2903]; + $2 = $0 + $5 | 0; + HEAP32[2903] = $2; + HEAP32[$2 + 4 >> 2] = $1 | 1; + HEAP32[$0 + 4 >> 2] = $5 | 3; + $0 = $0 + 8 | 0; + break label$1; + } + HEAP32[2896] = 48; + $0 = 0; + break label$1; + } + label$109 : { + if (!$7) { + break label$109 + } + $0 = HEAP32[$4 + 28 >> 2]; + $3 = ($0 << 2) + 11892 | 0; + label$110 : { + if (HEAP32[$3 >> 2] == ($4 | 0)) { + HEAP32[$3 >> 2] = $1; + if ($1) { + break label$110 + } + $8 = __wasm_rotl_i32(-2, $0) & $8; + HEAP32[2898] = $8; + break label$109; + } + HEAP32[$7 + (HEAP32[$7 + 16 >> 2] == ($4 | 0) ? 16 : 20) >> 2] = $1; + if (!$1) { + break label$109 + } + } + HEAP32[$1 + 24 >> 2] = $7; + $0 = HEAP32[$4 + 16 >> 2]; + if ($0) { + HEAP32[$1 + 16 >> 2] = $0; + HEAP32[$0 + 24 >> 2] = $1; + } + $0 = HEAP32[$4 + 20 >> 2]; + if (!$0) { + break label$109 + } + HEAP32[$1 + 20 >> 2] = $0; + HEAP32[$0 + 24 >> 2] = $1; + } + label$113 : { + if ($2 >>> 0 <= 15) { + $0 = $2 + $5 | 0; + HEAP32[$4 + 4 >> 2] = $0 | 3; + $0 = $0 + $4 | 0; + HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] | 1; + break label$113; + } + HEAP32[$4 + 4 >> 2] = $5 | 3; + $1 = $4 + $5 | 0; + HEAP32[$1 + 4 >> 2] = $2 | 1; + HEAP32[$1 + $2 >> 2] = $2; + if ($2 >>> 0 <= 255) { + $2 = $2 >>> 3 | 0; + $0 = ($2 << 3) + 11628 | 0; + $3 = HEAP32[2897]; + $2 = 1 << $2; + label$116 : { + if (!($3 & $2)) { + HEAP32[2897] = $2 | $3; + $2 = $0; + break label$116; + } + $2 = HEAP32[$0 + 8 >> 2]; + } + HEAP32[$0 + 8 >> 2] = $1; + HEAP32[$2 + 12 >> 2] = $1; + HEAP32[$1 + 12 >> 2] = $0; + HEAP32[$1 + 8 >> 2] = $2; + break label$113; + } + $7 = $1; + $0 = $2 >>> 8 | 0; + $3 = 0; + label$118 : { + if (!$0) { + break label$118 + } + $3 = 31; + if ($2 >>> 0 > 16777215) { + break label$118 + } + $5 = $0 + 1048320 >>> 16 & 8; + $3 = $0 << $5; + $0 = $3 + 520192 >>> 16 & 4; + $6 = $3 << $0; + $3 = $6 + 245760 >>> 16 & 2; + $0 = ($6 << $3 >>> 15 | 0) - ($3 | ($0 | $5)) | 0; + $3 = ($0 << 1 | $2 >>> $0 + 21 & 1) + 28 | 0; + } + $0 = $3; + HEAP32[$7 + 28 >> 2] = $0; + HEAP32[$1 + 16 >> 2] = 0; + HEAP32[$1 + 20 >> 2] = 0; + $3 = ($0 << 2) + 11892 | 0; + label$119 : { + $5 = 1 << $0; + label$120 : { + if (!($5 & $8)) { + HEAP32[2898] = $5 | $8; + HEAP32[$3 >> 2] = $1; + break label$120; + } + $0 = $2 << (($0 | 0) == 31 ? 0 : 25 - ($0 >>> 1 | 0) | 0); + $5 = HEAP32[$3 >> 2]; + while (1) { + $3 = $5; + if ((HEAP32[$3 + 4 >> 2] & -8) == ($2 | 0)) { + break label$119 + } + $5 = $0 >>> 29 | 0; + $0 = $0 << 1; + $6 = ($3 + ($5 & 4) | 0) + 16 | 0; + $5 = HEAP32[$6 >> 2]; + if ($5) { + continue + } + break; + }; + HEAP32[$6 >> 2] = $1; + } + HEAP32[$1 + 24 >> 2] = $3; + HEAP32[$1 + 12 >> 2] = $1; + HEAP32[$1 + 8 >> 2] = $1; + break label$113; + } + $0 = HEAP32[$3 + 8 >> 2]; + HEAP32[$0 + 12 >> 2] = $1; + HEAP32[$3 + 8 >> 2] = $1; + HEAP32[$1 + 24 >> 2] = 0; + HEAP32[$1 + 12 >> 2] = $3; + HEAP32[$1 + 8 >> 2] = $0; + } + $0 = $4 + 8 | 0; + break label$1; + } + label$123 : { + if (!$9) { + break label$123 + } + $0 = HEAP32[$1 + 28 >> 2]; + $2 = ($0 << 2) + 11892 | 0; + label$124 : { + if (HEAP32[$2 >> 2] == ($1 | 0)) { + HEAP32[$2 >> 2] = $4; + if ($4) { + break label$124 + } + (wasm2js_i32$0 = 11592, wasm2js_i32$1 = __wasm_rotl_i32(-2, $0) & $10), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$123; + } + HEAP32[(HEAP32[$9 + 16 >> 2] == ($1 | 0) ? 16 : 20) + $9 >> 2] = $4; + if (!$4) { + break label$123 + } + } + HEAP32[$4 + 24 >> 2] = $9; + $0 = HEAP32[$1 + 16 >> 2]; + if ($0) { + HEAP32[$4 + 16 >> 2] = $0; + HEAP32[$0 + 24 >> 2] = $4; + } + $0 = HEAP32[$1 + 20 >> 2]; + if (!$0) { + break label$123 + } + HEAP32[$4 + 20 >> 2] = $0; + HEAP32[$0 + 24 >> 2] = $4; + } + label$127 : { + if ($3 >>> 0 <= 15) { + $0 = $3 + $5 | 0; + HEAP32[$1 + 4 >> 2] = $0 | 3; + $0 = $0 + $1 | 0; + HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] | 1; + break label$127; + } + HEAP32[$1 + 4 >> 2] = $5 | 3; + $5 = $1 + $5 | 0; + HEAP32[$5 + 4 >> 2] = $3 | 1; + HEAP32[$3 + $5 >> 2] = $3; + if ($7) { + $4 = $7 >>> 3 | 0; + $0 = ($4 << 3) + 11628 | 0; + $2 = HEAP32[2902]; + $4 = 1 << $4; + label$130 : { + if (!($4 & $6)) { + HEAP32[2897] = $4 | $6; + $6 = $0; + break label$130; + } + $6 = HEAP32[$0 + 8 >> 2]; + } + HEAP32[$0 + 8 >> 2] = $2; + HEAP32[$6 + 12 >> 2] = $2; + HEAP32[$2 + 12 >> 2] = $0; + HEAP32[$2 + 8 >> 2] = $6; + } + HEAP32[2902] = $5; + HEAP32[2899] = $3; + } + $0 = $1 + 8 | 0; + } + global$0 = $11 + 16 | 0; + return $0 | 0; + } + + function dlfree($0) { + $0 = $0 | 0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + label$1 : { + if (!$0) { + break label$1 + } + $3 = $0 + -8 | 0; + $2 = HEAP32[$0 + -4 >> 2]; + $0 = $2 & -8; + $5 = $3 + $0 | 0; + label$2 : { + if ($2 & 1) { + break label$2 + } + if (!($2 & 3)) { + break label$1 + } + $2 = HEAP32[$3 >> 2]; + $3 = $3 - $2 | 0; + if ($3 >>> 0 < HEAPU32[2901]) { + break label$1 + } + $0 = $0 + $2 | 0; + if (HEAP32[2902] != ($3 | 0)) { + if ($2 >>> 0 <= 255) { + $4 = HEAP32[$3 + 8 >> 2]; + $2 = $2 >>> 3 | 0; + $1 = HEAP32[$3 + 12 >> 2]; + if (($1 | 0) == ($4 | 0)) { + (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$2; + } + HEAP32[$4 + 12 >> 2] = $1; + HEAP32[$1 + 8 >> 2] = $4; + break label$2; + } + $7 = HEAP32[$3 + 24 >> 2]; + $2 = HEAP32[$3 + 12 >> 2]; + label$6 : { + if (($2 | 0) != ($3 | 0)) { + $1 = HEAP32[$3 + 8 >> 2]; + HEAP32[$1 + 12 >> 2] = $2; + HEAP32[$2 + 8 >> 2] = $1; + break label$6; + } + label$9 : { + $4 = $3 + 20 | 0; + $1 = HEAP32[$4 >> 2]; + if ($1) { + break label$9 + } + $4 = $3 + 16 | 0; + $1 = HEAP32[$4 >> 2]; + if ($1) { + break label$9 + } + $2 = 0; + break label$6; + } + while (1) { + $6 = $4; + $2 = $1; + $4 = $2 + 20 | 0; + $1 = HEAP32[$4 >> 2]; + if ($1) { + continue + } + $4 = $2 + 16 | 0; + $1 = HEAP32[$2 + 16 >> 2]; + if ($1) { + continue + } + break; + }; + HEAP32[$6 >> 2] = 0; + } + if (!$7) { + break label$2 + } + $4 = HEAP32[$3 + 28 >> 2]; + $1 = ($4 << 2) + 11892 | 0; + label$11 : { + if (HEAP32[$1 >> 2] == ($3 | 0)) { + HEAP32[$1 >> 2] = $2; + if ($2) { + break label$11 + } + (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$2; + } + HEAP32[$7 + (HEAP32[$7 + 16 >> 2] == ($3 | 0) ? 16 : 20) >> 2] = $2; + if (!$2) { + break label$2 + } + } + HEAP32[$2 + 24 >> 2] = $7; + $1 = HEAP32[$3 + 16 >> 2]; + if ($1) { + HEAP32[$2 + 16 >> 2] = $1; + HEAP32[$1 + 24 >> 2] = $2; + } + $1 = HEAP32[$3 + 20 >> 2]; + if (!$1) { + break label$2 + } + HEAP32[$2 + 20 >> 2] = $1; + HEAP32[$1 + 24 >> 2] = $2; + break label$2; + } + $2 = HEAP32[$5 + 4 >> 2]; + if (($2 & 3) != 3) { + break label$2 + } + HEAP32[2899] = $0; + HEAP32[$5 + 4 >> 2] = $2 & -2; + HEAP32[$3 + 4 >> 2] = $0 | 1; + HEAP32[$0 + $3 >> 2] = $0; + return; + } + if ($5 >>> 0 <= $3 >>> 0) { + break label$1 + } + $2 = HEAP32[$5 + 4 >> 2]; + if (!($2 & 1)) { + break label$1 + } + label$14 : { + if (!($2 & 2)) { + if (($5 | 0) == HEAP32[2903]) { + HEAP32[2903] = $3; + $0 = HEAP32[2900] + $0 | 0; + HEAP32[2900] = $0; + HEAP32[$3 + 4 >> 2] = $0 | 1; + if (HEAP32[2902] != ($3 | 0)) { + break label$1 + } + HEAP32[2899] = 0; + HEAP32[2902] = 0; + return; + } + if (($5 | 0) == HEAP32[2902]) { + HEAP32[2902] = $3; + $0 = HEAP32[2899] + $0 | 0; + HEAP32[2899] = $0; + HEAP32[$3 + 4 >> 2] = $0 | 1; + HEAP32[$0 + $3 >> 2] = $0; + return; + } + $0 = ($2 & -8) + $0 | 0; + label$18 : { + if ($2 >>> 0 <= 255) { + $1 = HEAP32[$5 + 8 >> 2]; + $2 = $2 >>> 3 | 0; + $4 = HEAP32[$5 + 12 >> 2]; + if (($1 | 0) == ($4 | 0)) { + (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$18; + } + HEAP32[$1 + 12 >> 2] = $4; + HEAP32[$4 + 8 >> 2] = $1; + break label$18; + } + $7 = HEAP32[$5 + 24 >> 2]; + $2 = HEAP32[$5 + 12 >> 2]; + label$23 : { + if (($5 | 0) != ($2 | 0)) { + $1 = HEAP32[$5 + 8 >> 2]; + HEAP32[$1 + 12 >> 2] = $2; + HEAP32[$2 + 8 >> 2] = $1; + break label$23; + } + label$26 : { + $4 = $5 + 20 | 0; + $1 = HEAP32[$4 >> 2]; + if ($1) { + break label$26 + } + $4 = $5 + 16 | 0; + $1 = HEAP32[$4 >> 2]; + if ($1) { + break label$26 + } + $2 = 0; + break label$23; + } + while (1) { + $6 = $4; + $2 = $1; + $4 = $2 + 20 | 0; + $1 = HEAP32[$4 >> 2]; + if ($1) { + continue + } + $4 = $2 + 16 | 0; + $1 = HEAP32[$2 + 16 >> 2]; + if ($1) { + continue + } + break; + }; + HEAP32[$6 >> 2] = 0; + } + if (!$7) { + break label$18 + } + $4 = HEAP32[$5 + 28 >> 2]; + $1 = ($4 << 2) + 11892 | 0; + label$28 : { + if (($5 | 0) == HEAP32[$1 >> 2]) { + HEAP32[$1 >> 2] = $2; + if ($2) { + break label$28 + } + (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$18; + } + HEAP32[$7 + (($5 | 0) == HEAP32[$7 + 16 >> 2] ? 16 : 20) >> 2] = $2; + if (!$2) { + break label$18 + } + } + HEAP32[$2 + 24 >> 2] = $7; + $1 = HEAP32[$5 + 16 >> 2]; + if ($1) { + HEAP32[$2 + 16 >> 2] = $1; + HEAP32[$1 + 24 >> 2] = $2; + } + $1 = HEAP32[$5 + 20 >> 2]; + if (!$1) { + break label$18 + } + HEAP32[$2 + 20 >> 2] = $1; + HEAP32[$1 + 24 >> 2] = $2; + } + HEAP32[$3 + 4 >> 2] = $0 | 1; + HEAP32[$0 + $3 >> 2] = $0; + if (HEAP32[2902] != ($3 | 0)) { + break label$14 + } + HEAP32[2899] = $0; + return; + } + HEAP32[$5 + 4 >> 2] = $2 & -2; + HEAP32[$3 + 4 >> 2] = $0 | 1; + HEAP32[$0 + $3 >> 2] = $0; + } + if ($0 >>> 0 <= 255) { + $0 = $0 >>> 3 | 0; + $2 = ($0 << 3) + 11628 | 0; + $1 = HEAP32[2897]; + $0 = 1 << $0; + label$32 : { + if (!($1 & $0)) { + HEAP32[2897] = $0 | $1; + $0 = $2; + break label$32; + } + $0 = HEAP32[$2 + 8 >> 2]; + } + HEAP32[$2 + 8 >> 2] = $3; + HEAP32[$0 + 12 >> 2] = $3; + HEAP32[$3 + 12 >> 2] = $2; + HEAP32[$3 + 8 >> 2] = $0; + return; + } + HEAP32[$3 + 16 >> 2] = 0; + HEAP32[$3 + 20 >> 2] = 0; + $5 = $3; + $4 = $0 >>> 8 | 0; + $1 = 0; + label$34 : { + if (!$4) { + break label$34 + } + $1 = 31; + if ($0 >>> 0 > 16777215) { + break label$34 + } + $2 = $4; + $4 = $4 + 1048320 >>> 16 & 8; + $1 = $2 << $4; + $7 = $1 + 520192 >>> 16 & 4; + $1 = $1 << $7; + $6 = $1 + 245760 >>> 16 & 2; + $1 = ($1 << $6 >>> 15 | 0) - ($6 | ($4 | $7)) | 0; + $1 = ($1 << 1 | $0 >>> $1 + 21 & 1) + 28 | 0; + } + HEAP32[$5 + 28 >> 2] = $1; + $6 = ($1 << 2) + 11892 | 0; + label$35 : { + label$36 : { + $4 = HEAP32[2898]; + $2 = 1 << $1; + label$37 : { + if (!($4 & $2)) { + HEAP32[2898] = $2 | $4; + HEAP32[$6 >> 2] = $3; + HEAP32[$3 + 24 >> 2] = $6; + break label$37; + } + $4 = $0 << (($1 | 0) == 31 ? 0 : 25 - ($1 >>> 1 | 0) | 0); + $2 = HEAP32[$6 >> 2]; + while (1) { + $1 = $2; + if ((HEAP32[$2 + 4 >> 2] & -8) == ($0 | 0)) { + break label$36 + } + $2 = $4 >>> 29 | 0; + $4 = $4 << 1; + $6 = ($1 + ($2 & 4) | 0) + 16 | 0; + $2 = HEAP32[$6 >> 2]; + if ($2) { + continue + } + break; + }; + HEAP32[$6 >> 2] = $3; + HEAP32[$3 + 24 >> 2] = $1; + } + HEAP32[$3 + 12 >> 2] = $3; + HEAP32[$3 + 8 >> 2] = $3; + break label$35; + } + $0 = HEAP32[$1 + 8 >> 2]; + HEAP32[$0 + 12 >> 2] = $3; + HEAP32[$1 + 8 >> 2] = $3; + HEAP32[$3 + 24 >> 2] = 0; + HEAP32[$3 + 12 >> 2] = $1; + HEAP32[$3 + 8 >> 2] = $0; + } + $0 = HEAP32[2905] + -1 | 0; + HEAP32[2905] = $0; + if ($0) { + break label$1 + } + $3 = 12044; + while (1) { + $0 = HEAP32[$3 >> 2]; + $3 = $0 + 8 | 0; + if ($0) { + continue + } + break; + }; + HEAP32[2905] = -1; + } + } + + function dlcalloc($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + $2 = 0; + label$2 : { + if (!$0) { + break label$2 + } + $3 = __wasm_i64_mul($0, 0, $1, 0); + $4 = i64toi32_i32$HIGH_BITS; + $2 = $3; + if (($0 | $1) >>> 0 < 65536) { + break label$2 + } + $2 = $4 ? -1 : $3; + } + $1 = $2; + $0 = dlmalloc($1); + if (!(!$0 | !(HEAPU8[$0 + -4 | 0] & 3))) { + memset($0, $1) + } + return $0; + } + + function dlrealloc($0, $1) { + var $2 = 0, $3 = 0; + if (!$0) { + return dlmalloc($1) + } + if ($1 >>> 0 >= 4294967232) { + HEAP32[2896] = 48; + return 0; + } + $2 = try_realloc_chunk($0 + -8 | 0, $1 >>> 0 < 11 ? 16 : $1 + 11 & -8); + if ($2) { + return $2 + 8 | 0 + } + $2 = dlmalloc($1); + if (!$2) { + return 0 + } + $3 = HEAP32[$0 + -4 >> 2]; + $3 = ($3 & 3 ? -4 : -8) + ($3 & -8) | 0; + memcpy($2, $0, $3 >>> 0 < $1 >>> 0 ? $3 : $1); + dlfree($0); + return $2; + } + + function try_realloc_chunk($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $7 = HEAP32[$0 + 4 >> 2]; + $2 = $7 & 3; + $3 = $7 & -8; + $5 = $3 + $0 | 0; + label$2 : { + if (!$2) { + $2 = 0; + if ($1 >>> 0 < 256) { + break label$2 + } + if ($3 >>> 0 >= $1 + 4 >>> 0) { + $2 = $0; + if ($3 - $1 >>> 0 <= HEAP32[3017] << 1 >>> 0) { + break label$2 + } + } + return 0; + } + label$5 : { + if ($3 >>> 0 >= $1 >>> 0) { + $2 = $3 - $1 | 0; + if ($2 >>> 0 < 16) { + break label$5 + } + HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2; + $1 = $0 + $1 | 0; + HEAP32[$1 + 4 >> 2] = $2 | 3; + HEAP32[$5 + 4 >> 2] = HEAP32[$5 + 4 >> 2] | 1; + dispose_chunk($1, $2); + break label$5; + } + $2 = 0; + if (($5 | 0) == HEAP32[2903]) { + $4 = $3 + HEAP32[2900] | 0; + if ($4 >>> 0 <= $1 >>> 0) { + break label$2 + } + HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2; + $2 = $0 + $1 | 0; + $1 = $4 - $1 | 0; + HEAP32[$2 + 4 >> 2] = $1 | 1; + HEAP32[2900] = $1; + HEAP32[2903] = $2; + break label$5; + } + if (($5 | 0) == HEAP32[2902]) { + $4 = $3 + HEAP32[2899] | 0; + if ($4 >>> 0 < $1 >>> 0) { + break label$2 + } + $2 = $4 - $1 | 0; + label$9 : { + if ($2 >>> 0 >= 16) { + HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2; + $1 = $0 + $1 | 0; + HEAP32[$1 + 4 >> 2] = $2 | 1; + $4 = $0 + $4 | 0; + HEAP32[$4 >> 2] = $2; + HEAP32[$4 + 4 >> 2] = HEAP32[$4 + 4 >> 2] & -2; + break label$9; + } + HEAP32[$0 + 4 >> 2] = $4 | $7 & 1 | 2; + $1 = $0 + $4 | 0; + HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1; + $2 = 0; + $1 = 0; + } + HEAP32[2902] = $1; + HEAP32[2899] = $2; + break label$5; + } + $6 = HEAP32[$5 + 4 >> 2]; + if ($6 & 2) { + break label$2 + } + $8 = $3 + ($6 & -8) | 0; + if ($8 >>> 0 < $1 >>> 0) { + break label$2 + } + $10 = $8 - $1 | 0; + label$11 : { + if ($6 >>> 0 <= 255) { + $2 = $6 >>> 3 | 0; + $6 = HEAP32[$5 + 8 >> 2]; + $4 = HEAP32[$5 + 12 >> 2]; + if (($6 | 0) == ($4 | 0)) { + (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$11; + } + HEAP32[$6 + 12 >> 2] = $4; + HEAP32[$4 + 8 >> 2] = $6; + break label$11; + } + $9 = HEAP32[$5 + 24 >> 2]; + $3 = HEAP32[$5 + 12 >> 2]; + label$14 : { + if (($5 | 0) != ($3 | 0)) { + $2 = HEAP32[$5 + 8 >> 2]; + HEAP32[$2 + 12 >> 2] = $3; + HEAP32[$3 + 8 >> 2] = $2; + break label$14; + } + label$17 : { + $2 = $5 + 20 | 0; + $6 = HEAP32[$2 >> 2]; + if ($6) { + break label$17 + } + $2 = $5 + 16 | 0; + $6 = HEAP32[$2 >> 2]; + if ($6) { + break label$17 + } + $3 = 0; + break label$14; + } + while (1) { + $4 = $2; + $3 = $6; + $2 = $3 + 20 | 0; + $6 = HEAP32[$2 >> 2]; + if ($6) { + continue + } + $2 = $3 + 16 | 0; + $6 = HEAP32[$3 + 16 >> 2]; + if ($6) { + continue + } + break; + }; + HEAP32[$4 >> 2] = 0; + } + if (!$9) { + break label$11 + } + $4 = HEAP32[$5 + 28 >> 2]; + $2 = ($4 << 2) + 11892 | 0; + label$19 : { + if (($5 | 0) == HEAP32[$2 >> 2]) { + HEAP32[$2 >> 2] = $3; + if ($3) { + break label$19 + } + (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$11; + } + HEAP32[(($5 | 0) == HEAP32[$9 + 16 >> 2] ? 16 : 20) + $9 >> 2] = $3; + if (!$3) { + break label$11 + } + } + HEAP32[$3 + 24 >> 2] = $9; + $2 = HEAP32[$5 + 16 >> 2]; + if ($2) { + HEAP32[$3 + 16 >> 2] = $2; + HEAP32[$2 + 24 >> 2] = $3; + } + $2 = HEAP32[$5 + 20 >> 2]; + if (!$2) { + break label$11 + } + HEAP32[$3 + 20 >> 2] = $2; + HEAP32[$2 + 24 >> 2] = $3; + } + if ($10 >>> 0 <= 15) { + HEAP32[$0 + 4 >> 2] = $7 & 1 | $8 | 2; + $1 = $0 + $8 | 0; + HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1; + break label$5; + } + HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2; + $2 = $0 + $1 | 0; + HEAP32[$2 + 4 >> 2] = $10 | 3; + $1 = $0 + $8 | 0; + HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1; + dispose_chunk($2, $10); + } + $2 = $0; + } + return $2; + } + + function dispose_chunk($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $5 = $0 + $1 | 0; + label$1 : { + label$2 : { + $2 = HEAP32[$0 + 4 >> 2]; + if ($2 & 1) { + break label$2 + } + if (!($2 & 3)) { + break label$1 + } + $2 = HEAP32[$0 >> 2]; + $1 = $2 + $1 | 0; + $0 = $0 - $2 | 0; + if (($0 | 0) != HEAP32[2902]) { + if ($2 >>> 0 <= 255) { + $4 = $2 >>> 3 | 0; + $2 = HEAP32[$0 + 8 >> 2]; + $3 = HEAP32[$0 + 12 >> 2]; + if (($3 | 0) == ($2 | 0)) { + (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$2; + } + HEAP32[$2 + 12 >> 2] = $3; + HEAP32[$3 + 8 >> 2] = $2; + break label$2; + } + $7 = HEAP32[$0 + 24 >> 2]; + $2 = HEAP32[$0 + 12 >> 2]; + label$6 : { + if (($2 | 0) != ($0 | 0)) { + $3 = HEAP32[$0 + 8 >> 2]; + HEAP32[$3 + 12 >> 2] = $2; + HEAP32[$2 + 8 >> 2] = $3; + break label$6; + } + label$9 : { + $3 = $0 + 20 | 0; + $4 = HEAP32[$3 >> 2]; + if ($4) { + break label$9 + } + $3 = $0 + 16 | 0; + $4 = HEAP32[$3 >> 2]; + if ($4) { + break label$9 + } + $2 = 0; + break label$6; + } + while (1) { + $6 = $3; + $2 = $4; + $3 = $2 + 20 | 0; + $4 = HEAP32[$3 >> 2]; + if ($4) { + continue + } + $3 = $2 + 16 | 0; + $4 = HEAP32[$2 + 16 >> 2]; + if ($4) { + continue + } + break; + }; + HEAP32[$6 >> 2] = 0; + } + if (!$7) { + break label$2 + } + $3 = HEAP32[$0 + 28 >> 2]; + $4 = ($3 << 2) + 11892 | 0; + label$11 : { + if (HEAP32[$4 >> 2] == ($0 | 0)) { + HEAP32[$4 >> 2] = $2; + if ($2) { + break label$11 + } + (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $3)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$2; + } + HEAP32[$7 + (HEAP32[$7 + 16 >> 2] == ($0 | 0) ? 16 : 20) >> 2] = $2; + if (!$2) { + break label$2 + } + } + HEAP32[$2 + 24 >> 2] = $7; + $3 = HEAP32[$0 + 16 >> 2]; + if ($3) { + HEAP32[$2 + 16 >> 2] = $3; + HEAP32[$3 + 24 >> 2] = $2; + } + $3 = HEAP32[$0 + 20 >> 2]; + if (!$3) { + break label$2 + } + HEAP32[$2 + 20 >> 2] = $3; + HEAP32[$3 + 24 >> 2] = $2; + break label$2; + } + $2 = HEAP32[$5 + 4 >> 2]; + if (($2 & 3) != 3) { + break label$2 + } + HEAP32[2899] = $1; + HEAP32[$5 + 4 >> 2] = $2 & -2; + HEAP32[$0 + 4 >> 2] = $1 | 1; + HEAP32[$5 >> 2] = $1; + return; + } + $2 = HEAP32[$5 + 4 >> 2]; + label$14 : { + if (!($2 & 2)) { + if (($5 | 0) == HEAP32[2903]) { + HEAP32[2903] = $0; + $1 = HEAP32[2900] + $1 | 0; + HEAP32[2900] = $1; + HEAP32[$0 + 4 >> 2] = $1 | 1; + if (HEAP32[2902] != ($0 | 0)) { + break label$1 + } + HEAP32[2899] = 0; + HEAP32[2902] = 0; + return; + } + if (($5 | 0) == HEAP32[2902]) { + HEAP32[2902] = $0; + $1 = HEAP32[2899] + $1 | 0; + HEAP32[2899] = $1; + HEAP32[$0 + 4 >> 2] = $1 | 1; + HEAP32[$0 + $1 >> 2] = $1; + return; + } + $1 = ($2 & -8) + $1 | 0; + label$18 : { + if ($2 >>> 0 <= 255) { + $4 = $2 >>> 3 | 0; + $2 = HEAP32[$5 + 8 >> 2]; + $3 = HEAP32[$5 + 12 >> 2]; + if (($2 | 0) == ($3 | 0)) { + (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$18; + } + HEAP32[$2 + 12 >> 2] = $3; + HEAP32[$3 + 8 >> 2] = $2; + break label$18; + } + $7 = HEAP32[$5 + 24 >> 2]; + $2 = HEAP32[$5 + 12 >> 2]; + label$21 : { + if (($5 | 0) != ($2 | 0)) { + $3 = HEAP32[$5 + 8 >> 2]; + HEAP32[$3 + 12 >> 2] = $2; + HEAP32[$2 + 8 >> 2] = $3; + break label$21; + } + label$24 : { + $3 = $5 + 20 | 0; + $4 = HEAP32[$3 >> 2]; + if ($4) { + break label$24 + } + $3 = $5 + 16 | 0; + $4 = HEAP32[$3 >> 2]; + if ($4) { + break label$24 + } + $2 = 0; + break label$21; + } + while (1) { + $6 = $3; + $2 = $4; + $3 = $2 + 20 | 0; + $4 = HEAP32[$3 >> 2]; + if ($4) { + continue + } + $3 = $2 + 16 | 0; + $4 = HEAP32[$2 + 16 >> 2]; + if ($4) { + continue + } + break; + }; + HEAP32[$6 >> 2] = 0; + } + if (!$7) { + break label$18 + } + $3 = HEAP32[$5 + 28 >> 2]; + $4 = ($3 << 2) + 11892 | 0; + label$26 : { + if (($5 | 0) == HEAP32[$4 >> 2]) { + HEAP32[$4 >> 2] = $2; + if ($2) { + break label$26 + } + (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $3)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + break label$18; + } + HEAP32[$7 + (($5 | 0) == HEAP32[$7 + 16 >> 2] ? 16 : 20) >> 2] = $2; + if (!$2) { + break label$18 + } + } + HEAP32[$2 + 24 >> 2] = $7; + $3 = HEAP32[$5 + 16 >> 2]; + if ($3) { + HEAP32[$2 + 16 >> 2] = $3; + HEAP32[$3 + 24 >> 2] = $2; + } + $3 = HEAP32[$5 + 20 >> 2]; + if (!$3) { + break label$18 + } + HEAP32[$2 + 20 >> 2] = $3; + HEAP32[$3 + 24 >> 2] = $2; + } + HEAP32[$0 + 4 >> 2] = $1 | 1; + HEAP32[$0 + $1 >> 2] = $1; + if (HEAP32[2902] != ($0 | 0)) { + break label$14 + } + HEAP32[2899] = $1; + return; + } + HEAP32[$5 + 4 >> 2] = $2 & -2; + HEAP32[$0 + 4 >> 2] = $1 | 1; + HEAP32[$0 + $1 >> 2] = $1; + } + if ($1 >>> 0 <= 255) { + $2 = $1 >>> 3 | 0; + $1 = ($2 << 3) + 11628 | 0; + $3 = HEAP32[2897]; + $2 = 1 << $2; + label$30 : { + if (!($3 & $2)) { + HEAP32[2897] = $2 | $3; + $2 = $1; + break label$30; + } + $2 = HEAP32[$1 + 8 >> 2]; + } + HEAP32[$1 + 8 >> 2] = $0; + HEAP32[$2 + 12 >> 2] = $0; + HEAP32[$0 + 12 >> 2] = $1; + HEAP32[$0 + 8 >> 2] = $2; + return; + } + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + $3 = $0; + $4 = $1 >>> 8 | 0; + $2 = 0; + label$32 : { + if (!$4) { + break label$32 + } + $2 = 31; + if ($1 >>> 0 > 16777215) { + break label$32 + } + $6 = $4 + 1048320 >>> 16 & 8; + $4 = $4 << $6; + $2 = $4 + 520192 >>> 16 & 4; + $5 = $4 << $2; + $4 = $5 + 245760 >>> 16 & 2; + $2 = ($5 << $4 >>> 15 | 0) - ($4 | ($2 | $6)) | 0; + $2 = ($2 << 1 | $1 >>> $2 + 21 & 1) + 28 | 0; + } + HEAP32[$3 + 28 >> 2] = $2; + $4 = ($2 << 2) + 11892 | 0; + label$33 : { + $3 = HEAP32[2898]; + $6 = 1 << $2; + label$34 : { + if (!($3 & $6)) { + HEAP32[2898] = $3 | $6; + HEAP32[$4 >> 2] = $0; + break label$34; + } + $3 = $1 << (($2 | 0) == 31 ? 0 : 25 - ($2 >>> 1 | 0) | 0); + $2 = HEAP32[$4 >> 2]; + while (1) { + $4 = $2; + if ((HEAP32[$2 + 4 >> 2] & -8) == ($1 | 0)) { + break label$33 + } + $2 = $3 >>> 29 | 0; + $3 = $3 << 1; + $6 = ($4 + ($2 & 4) | 0) + 16 | 0; + $2 = HEAP32[$6 >> 2]; + if ($2) { + continue + } + break; + }; + HEAP32[$6 >> 2] = $0; + } + HEAP32[$0 + 24 >> 2] = $4; + HEAP32[$0 + 12 >> 2] = $0; + HEAP32[$0 + 8 >> 2] = $0; + return; + } + $1 = HEAP32[$4 + 8 >> 2]; + HEAP32[$1 + 12 >> 2] = $0; + HEAP32[$4 + 8 >> 2] = $0; + HEAP32[$0 + 24 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = $4; + HEAP32[$0 + 8 >> 2] = $1; + } + } + + function memchr($0, $1) { + var $2 = 0; + $2 = ($1 | 0) != 0; + label$1 : { + label$2 : { + label$3 : { + if (!$1 | !($0 & 3)) { + break label$3 + } + while (1) { + if (HEAPU8[$0 | 0] == 79) { + break label$2 + } + $0 = $0 + 1 | 0; + $1 = $1 + -1 | 0; + $2 = ($1 | 0) != 0; + if (!$1) { + break label$3 + } + if ($0 & 3) { + continue + } + break; + }; + } + if (!$2) { + break label$1 + } + } + label$5 : { + if (HEAPU8[$0 | 0] == 79 | $1 >>> 0 < 4) { + break label$5 + } + while (1) { + $2 = HEAP32[$0 >> 2] ^ 1330597711; + if (($2 ^ -1) & $2 + -16843009 & -2139062144) { + break label$5 + } + $0 = $0 + 4 | 0; + $1 = $1 + -4 | 0; + if ($1 >>> 0 > 3) { + continue + } + break; + }; + } + if (!$1) { + break label$1 + } + while (1) { + if (HEAPU8[$0 | 0] == 79) { + return $0 + } + $0 = $0 + 1 | 0; + $1 = $1 + -1 | 0; + if ($1) { + continue + } + break; + }; + } + return 0; + } + + function frexp($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + wasm2js_scratch_store_f64(+$0); + $2 = wasm2js_scratch_load_i32(1) | 0; + $3 = wasm2js_scratch_load_i32(0) | 0; + $4 = $2; + $2 = $2 >>> 20 & 2047; + if (($2 | 0) != 2047) { + if (!$2) { + $2 = $1; + if ($0 == 0.0) { + $1 = 0 + } else { + $0 = frexp($0 * 18446744073709551615.0, $1); + $1 = HEAP32[$1 >> 2] + -64 | 0; + } + HEAP32[$2 >> 2] = $1; + return $0; + } + HEAP32[$1 >> 2] = $2 + -1022; + wasm2js_scratch_store_i32(0, $3 | 0); + wasm2js_scratch_store_i32(1, $4 & -2146435073 | 1071644672); + $0 = +wasm2js_scratch_load_f64(); + } + return $0; + } + + function __ashlti3($0, $1, $2, $3, $4, $5) { + var $6 = 0, $7 = 0, $8 = 0, $9 = 0; + label$1 : { + if ($5 & 64) { + $3 = $1; + $4 = $5 + -64 | 0; + $1 = $4 & 31; + if (32 <= ($4 & 63) >>> 0) { + $4 = $3 << $1; + $3 = 0; + } else { + $4 = (1 << $1) - 1 & $3 >>> 32 - $1 | $2 << $1; + $3 = $3 << $1; + } + $1 = 0; + $2 = 0; + break label$1; + } + if (!$5) { + break label$1 + } + $6 = $3; + $8 = $5; + $3 = $5 & 31; + if (32 <= ($5 & 63) >>> 0) { + $7 = $6 << $3; + $9 = 0; + } else { + $7 = (1 << $3) - 1 & $6 >>> 32 - $3 | $4 << $3; + $9 = $6 << $3; + } + $3 = $2; + $6 = $1; + $5 = 64 - $5 | 0; + $4 = $5 & 31; + if (32 <= ($5 & 63) >>> 0) { + $5 = 0; + $3 = $3 >>> $4 | 0; + } else { + $5 = $3 >>> $4 | 0; + $3 = ((1 << $4) - 1 & $3) << 32 - $4 | $6 >>> $4; + } + $3 = $9 | $3; + $4 = $5 | $7; + $5 = $1; + $1 = $8 & 31; + if (32 <= ($8 & 63) >>> 0) { + $7 = $5 << $1; + $1 = 0; + } else { + $7 = (1 << $1) - 1 & $5 >>> 32 - $1 | $2 << $1; + $1 = $5 << $1; + } + $2 = $7; + } + HEAP32[$0 >> 2] = $1; + HEAP32[$0 + 4 >> 2] = $2; + HEAP32[$0 + 8 >> 2] = $3; + HEAP32[$0 + 12 >> 2] = $4; + } + + function __lshrti3($0, $1, $2, $3, $4, $5) { + var $6 = 0, $7 = 0, $8 = 0, $9 = 0; + label$1 : { + if ($5 & 64) { + $2 = $5 + -64 | 0; + $1 = $2 & 31; + if (32 <= ($2 & 63) >>> 0) { + $2 = 0; + $1 = $4 >>> $1 | 0; + } else { + $2 = $4 >>> $1 | 0; + $1 = ((1 << $1) - 1 & $4) << 32 - $1 | $3 >>> $1; + } + $3 = 0; + $4 = 0; + break label$1; + } + if (!$5) { + break label$1 + } + $7 = $4; + $8 = $3; + $9 = 64 - $5 | 0; + $6 = $9 & 31; + if (32 <= ($9 & 63) >>> 0) { + $7 = $8 << $6; + $9 = 0; + } else { + $7 = (1 << $6) - 1 & $8 >>> 32 - $6 | $7 << $6; + $9 = $8 << $6; + } + $8 = $1; + $6 = $5; + $1 = $6 & 31; + if (32 <= ($6 & 63) >>> 0) { + $6 = 0; + $1 = $2 >>> $1 | 0; + } else { + $6 = $2 >>> $1 | 0; + $1 = ((1 << $1) - 1 & $2) << 32 - $1 | $8 >>> $1; + } + $1 = $9 | $1; + $2 = $6 | $7; + $6 = $3; + $3 = $5 & 31; + if (32 <= ($5 & 63) >>> 0) { + $7 = 0; + $3 = $4 >>> $3 | 0; + } else { + $7 = $4 >>> $3 | 0; + $3 = ((1 << $3) - 1 & $4) << 32 - $3 | $6 >>> $3; + } + $4 = $7; + } + HEAP32[$0 >> 2] = $1; + HEAP32[$0 + 4 >> 2] = $2; + HEAP32[$0 + 8 >> 2] = $3; + HEAP32[$0 + 12 >> 2] = $4; + } + + function __trunctfdf2($0, $1, $2, $3) { + var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0; + $6 = global$0 - 32 | 0; + global$0 = $6; + $4 = $3 & 2147483647; + $8 = $4; + $4 = $4 + -1006698496 | 0; + $7 = $2; + $5 = $2; + if ($2 >>> 0 < 0) { + $4 = $4 + 1 | 0 + } + $9 = $5; + $5 = $4; + $4 = $8 + -1140785152 | 0; + $10 = $7; + if ($7 >>> 0 < 0) { + $4 = $4 + 1 | 0 + } + label$1 : { + if (($4 | 0) == ($5 | 0) & $9 >>> 0 < $10 >>> 0 | $5 >>> 0 < $4 >>> 0) { + $4 = $3 << 4 | $2 >>> 28; + $2 = $2 << 4 | $1 >>> 28; + $1 = $1 & 268435455; + $7 = $1; + if (($1 | 0) == 134217728 & $0 >>> 0 >= 1 | $1 >>> 0 > 134217728) { + $4 = $4 + 1073741824 | 0; + $0 = $2 + 1 | 0; + if ($0 >>> 0 < 1) { + $4 = $4 + 1 | 0 + } + $5 = $0; + break label$1; + } + $5 = $2; + $4 = $4 - (($2 >>> 0 < 0) + -1073741824 | 0) | 0; + if ($0 | $7 ^ 134217728) { + break label$1 + } + $0 = $5 + ($5 & 1) | 0; + if ($0 >>> 0 < $5 >>> 0) { + $4 = $4 + 1 | 0 + } + $5 = $0; + break label$1; + } + if (!(!$7 & ($8 | 0) == 2147418112 ? !($0 | $1) : ($8 | 0) == 2147418112 & $7 >>> 0 < 0 | $8 >>> 0 < 2147418112)) { + $4 = $3 << 4 | $2 >>> 28; + $5 = $2 << 4 | $1 >>> 28; + $4 = $4 & 524287 | 2146959360; + break label$1; + } + $5 = 0; + $4 = 2146435072; + if ($8 >>> 0 > 1140785151) { + break label$1 + } + $4 = 0; + $7 = $8 >>> 16 | 0; + if ($7 >>> 0 < 15249) { + break label$1 + } + $4 = $3 & 65535 | 65536; + __ashlti3($6 + 16 | 0, $0, $1, $2, $4, $7 + -15233 | 0); + __lshrti3($6, $0, $1, $2, $4, 15361 - $7 | 0); + $2 = HEAP32[$6 + 4 >> 2]; + $0 = HEAP32[$6 + 8 >> 2]; + $4 = HEAP32[$6 + 12 >> 2] << 4 | $0 >>> 28; + $5 = $0 << 4 | $2 >>> 28; + $0 = $2 & 268435455; + $2 = $0; + $1 = HEAP32[$6 >> 2] | ((HEAP32[$6 + 16 >> 2] | HEAP32[$6 + 24 >> 2]) != 0 | (HEAP32[$6 + 20 >> 2] | HEAP32[$6 + 28 >> 2]) != 0); + if (($0 | 0) == 134217728 & $1 >>> 0 >= 1 | $0 >>> 0 > 134217728) { + $0 = $5 + 1 | 0; + if ($0 >>> 0 < 1) { + $4 = $4 + 1 | 0 + } + $5 = $0; + break label$1; + } + if ($1 | $2 ^ 134217728) { + break label$1 + } + $0 = $5 + ($5 & 1) | 0; + if ($0 >>> 0 < $5 >>> 0) { + $4 = $4 + 1 | 0 + } + $5 = $0; + } + global$0 = $6 + 32 | 0; + wasm2js_scratch_store_i32(0, $5 | 0); + wasm2js_scratch_store_i32(1, $3 & -2147483648 | $4); + return +wasm2js_scratch_load_f64(); + } + + function FLAC__crc8($0, $1) { + var $2 = 0; + if ($1) { + while (1) { + $2 = HEAPU8[(HEAPU8[$0 | 0] ^ $2) + 1024 | 0]; + $0 = $0 + 1 | 0; + $1 = $1 + -1 | 0; + if ($1) { + continue + } + break; + } + } + return $2; + } + + function FLAC__crc16($0, $1) { + var $2 = 0, $3 = 0; + if ($1 >>> 0 > 7) { + while (1) { + $3 = $2; + $2 = HEAPU8[$0 | 0] | HEAPU8[$0 + 1 | 0] << 8; + $2 = $3 ^ ($2 << 8 & 16711680 | $2 << 24) >>> 16; + $2 = HEAPU16[(HEAPU8[$0 + 7 | 0] << 1) + 1280 >> 1] ^ (HEAPU16[((HEAPU8[$0 + 6 | 0] << 1) + 1280 | 0) + 512 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 5 | 0] << 1) + 2304 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 4 | 0] << 1) + 2816 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 3 | 0] << 1) + 3328 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 2 | 0] << 1) + 3840 >> 1] ^ (HEAPU16[(($2 & 255) << 1) + 4352 >> 1] ^ HEAPU16[($2 >>> 7 & 510) + 4864 >> 1])))))); + $0 = $0 + 8 | 0; + $1 = $1 + -8 | 0; + if ($1 >>> 0 > 7) { + continue + } + break; + } + } + if ($1) { + while (1) { + $2 = HEAPU16[((HEAPU8[$0 | 0] ^ ($2 & 65280) >>> 8) << 1) + 1280 >> 1] ^ $2 << 8; + $0 = $0 + 1 | 0; + $1 = $1 + -1 | 0; + if ($1) { + continue + } + break; + } + } + return $2 & 65535; + } + + function FLAC__crc16_update_words32($0, $1, $2) { + var $3 = 0; + if ($1 >>> 0 >= 2) { + while (1) { + $3 = $2; + $2 = HEAP32[$0 >> 2]; + $3 = $3 ^ $2 >>> 16; + $3 = HEAPU16[(($3 & 255) << 1) + 4352 >> 1] ^ HEAPU16[($3 >>> 7 & 510) + 4864 >> 1] ^ HEAPU16[($2 >>> 7 & 510) + 3840 >> 1] ^ HEAPU16[(($2 & 255) << 1) + 3328 >> 1]; + $2 = HEAP32[$0 + 4 >> 2]; + $2 = $3 ^ HEAPU16[($2 >>> 23 & 510) + 2816 >> 1] ^ HEAPU16[($2 >>> 15 & 510) + 2304 >> 1] ^ HEAPU16[(($2 >>> 7 & 510) + 1280 | 0) + 512 >> 1] ^ HEAPU16[(($2 & 255) << 1) + 1280 >> 1]; + $0 = $0 + 8 | 0; + $1 = $1 + -2 | 0; + if ($1 >>> 0 > 1) { + continue + } + break; + } + } + if ($1) { + $0 = HEAP32[$0 >> 2]; + $1 = $0 >>> 16 ^ $2; + $2 = HEAPU16[(($1 & 255) << 1) + 2304 >> 1] ^ HEAPU16[($1 >>> 7 & 510) + 2816 >> 1] ^ HEAPU16[(($0 >>> 7 & 510) + 1280 | 0) + 512 >> 1] ^ HEAPU16[(($0 & 255) << 1) + 1280 >> 1]; + } + return $2 & 65535; + } + + function memmove($0, $1, $2) { + var $3 = 0; + label$1 : { + if (($0 | 0) == ($1 | 0)) { + break label$1 + } + if (($1 - $0 | 0) - $2 >>> 0 <= 0 - ($2 << 1) >>> 0) { + memcpy($0, $1, $2); + return; + } + $3 = ($0 ^ $1) & 3; + label$3 : { + label$4 : { + if ($0 >>> 0 < $1 >>> 0) { + if ($3) { + break label$3 + } + if (!($0 & 3)) { + break label$4 + } + while (1) { + if (!$2) { + break label$1 + } + HEAP8[$0 | 0] = HEAPU8[$1 | 0]; + $1 = $1 + 1 | 0; + $2 = $2 + -1 | 0; + $0 = $0 + 1 | 0; + if ($0 & 3) { + continue + } + break; + }; + break label$4; + } + label$9 : { + if ($3) { + break label$9 + } + if ($0 + $2 & 3) { + while (1) { + if (!$2) { + break label$1 + } + $2 = $2 + -1 | 0; + $3 = $2 + $0 | 0; + HEAP8[$3 | 0] = HEAPU8[$1 + $2 | 0]; + if ($3 & 3) { + continue + } + break; + } + } + if ($2 >>> 0 <= 3) { + break label$9 + } + while (1) { + $2 = $2 + -4 | 0; + HEAP32[$2 + $0 >> 2] = HEAP32[$1 + $2 >> 2]; + if ($2 >>> 0 > 3) { + continue + } + break; + }; + } + if (!$2) { + break label$1 + } + while (1) { + $2 = $2 + -1 | 0; + HEAP8[$2 + $0 | 0] = HEAPU8[$1 + $2 | 0]; + if ($2) { + continue + } + break; + }; + break label$1; + } + if ($2 >>> 0 <= 3) { + break label$3 + } + while (1) { + HEAP32[$0 >> 2] = HEAP32[$1 >> 2]; + $1 = $1 + 4 | 0; + $0 = $0 + 4 | 0; + $2 = $2 + -4 | 0; + if ($2 >>> 0 > 3) { + continue + } + break; + }; + } + if (!$2) { + break label$1 + } + while (1) { + HEAP8[$0 | 0] = HEAPU8[$1 | 0]; + $0 = $0 + 1 | 0; + $1 = $1 + 1 | 0; + $2 = $2 + -1 | 0; + if ($2) { + continue + } + break; + }; + } + } + + function FLAC__bitreader_delete($0) { + var $1 = 0; + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + dlfree($0); + } + + function FLAC__bitreader_free($0) { + var $1 = 0; + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + HEAP32[$0 + 36 >> 2] = 0; + HEAP32[$0 + 40 >> 2] = 0; + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + } + + function FLAC__bitreader_init($0, $1) { + var $2 = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 2048; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + $2 = dlmalloc(8192); + HEAP32[$0 >> 2] = $2; + if (!$2) { + return 0 + } + HEAP32[$0 + 40 >> 2] = $1; + HEAP32[$0 + 36 >> 2] = 7; + return 1; + } + + function FLAC__bitreader_get_read_crc16($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + $5 = HEAP32[$0 + 16 >> 2]; + $2 = HEAP32[$0 + 28 >> 2]; + label$1 : { + if ($5 >>> 0 <= $2 >>> 0) { + $4 = $2; + break label$1; + } + $1 = HEAP32[$0 + 32 >> 2]; + if (!$1) { + $4 = $2; + break label$1; + } + $4 = $2 + 1 | 0; + HEAP32[$0 + 28 >> 2] = $4; + $3 = HEAP32[$0 + 24 >> 2]; + if ($1 >>> 0 <= 31) { + $2 = HEAP32[HEAP32[$0 >> 2] + ($2 << 2) >> 2]; + while (1) { + $3 = HEAPU16[(($2 >>> 24 - $1 & 255 ^ $3 >>> 8) << 1) + 1280 >> 1] ^ $3 << 8 & 65280; + $7 = $1 >>> 0 < 24; + $6 = $1 + 8 | 0; + $1 = $6; + if ($7) { + continue + } + break; + }; + HEAP32[$0 + 32 >> 2] = $6; + } + HEAP32[$0 + 32 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = $3; + } + $1 = FLAC__crc16_update_words32(HEAP32[$0 >> 2] + ($4 << 2) | 0, $5 - $4 | 0, HEAPU16[$0 + 24 >> 1]); + HEAP32[$0 + 28 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = $1; + $2 = HEAP32[$0 + 20 >> 2]; + label$6 : { + if (!$2) { + break label$6 + } + $3 = HEAP32[$0 + 32 >> 2]; + if ($3 >>> 0 >= $2 >>> 0) { + break label$6 + } + $4 = HEAP32[HEAP32[$0 >> 2] + (HEAP32[$0 + 16 >> 2] << 2) >> 2]; + while (1) { + $1 = HEAPU16[(($4 >>> 24 - $3 & 255 ^ $1 >>> 8) << 1) + 1280 >> 1] ^ $1 << 8 & 65280; + $3 = $3 + 8 | 0; + if ($3 >>> 0 < $2 >>> 0) { + continue + } + break; + }; + HEAP32[$0 + 32 >> 2] = $3; + HEAP32[$0 + 24 >> 2] = $1; + } + return $1; + } + + function FLAC__bitreader_is_consumed_byte_aligned($0) { + return !(HEAPU8[$0 + 20 | 0] & 7); + } + + function FLAC__bitreader_bits_left_for_byte_alignment($0) { + return 8 - (HEAP32[$0 + 20 >> 2] & 7) | 0; + } + + function FLAC__bitreader_read_raw_uint32($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0; + label$1 : { + if ($2) { + label$4 : { + while (1) { + $5 = HEAP32[$0 + 8 >> 2]; + $4 = HEAP32[$0 + 16 >> 2]; + $3 = HEAP32[$0 + 20 >> 2]; + if ((($5 - $4 << 5) + (HEAP32[$0 + 12 >> 2] << 3) | 0) - $3 >>> 0 >= $2 >>> 0) { + break label$4 + } + if (bitreader_read_from_client_($0)) { + continue + } + break; + }; + return 0; + } + if ($5 >>> 0 > $4 >>> 0) { + if ($3) { + $5 = HEAP32[$0 >> 2]; + $4 = HEAP32[$5 + ($4 << 2) >> 2] & -1 >>> $3; + $3 = 32 - $3 | 0; + if ($3 >>> 0 > $2 >>> 0) { + HEAP32[$1 >> 2] = $4 >>> $3 - $2; + HEAP32[$0 + 20 >> 2] = HEAP32[$0 + 20 >> 2] + $2; + break label$1; + } + HEAP32[$1 >> 2] = $4; + HEAP32[$0 + 20 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = HEAP32[$0 + 16 >> 2] + 1; + $2 = $2 - $3 | 0; + if (!$2) { + break label$1 + } + $3 = HEAP32[$1 >> 2] << $2; + HEAP32[$1 >> 2] = $3; + HEAP32[$1 >> 2] = $3 | HEAP32[(HEAP32[$0 + 16 >> 2] << 2) + $5 >> 2] >>> 32 - $2; + HEAP32[$0 + 20 >> 2] = $2; + return 1; + } + $3 = HEAP32[HEAP32[$0 >> 2] + ($4 << 2) >> 2]; + if ($2 >>> 0 <= 31) { + HEAP32[$1 >> 2] = $3 >>> 32 - $2; + HEAP32[$0 + 20 >> 2] = $2; + break label$1; + } + HEAP32[$1 >> 2] = $3; + HEAP32[$0 + 16 >> 2] = HEAP32[$0 + 16 >> 2] + 1; + return 1; + } + $4 = HEAP32[HEAP32[$0 >> 2] + ($4 << 2) >> 2]; + if ($3) { + HEAP32[$1 >> 2] = ($4 & -1 >>> $3) >>> 32 - ($2 + $3 | 0); + HEAP32[$0 + 20 >> 2] = HEAP32[$0 + 20 >> 2] + $2; + break label$1; + } + HEAP32[$1 >> 2] = $4 >>> 32 - $2; + HEAP32[$0 + 20 >> 2] = HEAP32[$0 + 20 >> 2] + $2; + break label$1; + } + HEAP32[$1 >> 2] = 0; + } + return 1; + } + + function bitreader_read_from_client_($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + $6 = global$0 - 16 | 0; + global$0 = $6; + $5 = HEAP32[$0 + 16 >> 2]; + label$1 : { + if (!$5) { + $2 = HEAP32[$0 + 8 >> 2]; + break label$1; + } + $1 = HEAP32[$0 + 28 >> 2]; + label$3 : { + if ($5 >>> 0 <= $1 >>> 0) { + $3 = $1; + break label$3; + } + $2 = HEAP32[$0 + 32 >> 2]; + if (!$2) { + $3 = $1; + break label$3; + } + $3 = $1 + 1 | 0; + HEAP32[$0 + 28 >> 2] = $3; + $4 = HEAP32[$0 + 24 >> 2]; + if ($2 >>> 0 <= 31) { + $1 = HEAP32[HEAP32[$0 >> 2] + ($1 << 2) >> 2]; + while (1) { + $4 = HEAPU16[(($1 >>> 24 - $2 & 255 ^ $4 >>> 8) << 1) + 1280 >> 1] ^ $4 << 8 & 65280; + $7 = $2 >>> 0 < 24; + $8 = $2 + 8 | 0; + $2 = $8; + if ($7) { + continue + } + break; + }; + HEAP32[$0 + 32 >> 2] = $8; + } + HEAP32[$0 + 32 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = $4; + } + $1 = FLAC__crc16_update_words32(HEAP32[$0 >> 2] + ($3 << 2) | 0, $5 - $3 | 0, HEAPU16[$0 + 24 >> 1]); + HEAP32[$0 + 28 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = $1; + $3 = HEAP32[$0 >> 2]; + $1 = HEAP32[$0 + 16 >> 2]; + memmove($3, $3 + ($1 << 2) | 0, (HEAP32[$0 + 8 >> 2] - $1 | 0) + (HEAP32[$0 + 12 >> 2] != 0) << 2); + HEAP32[$0 + 16 >> 2] = 0; + $2 = HEAP32[$0 + 8 >> 2] - $1 | 0; + HEAP32[$0 + 8 >> 2] = $2; + } + $1 = HEAP32[$0 + 12 >> 2]; + $3 = (HEAP32[$0 + 4 >> 2] - $2 << 2) - $1 | 0; + HEAP32[$6 + 12 >> 2] = $3; + $4 = 0; + label$8 : { + if (!$3) { + break label$8 + } + $3 = HEAP32[$0 >> 2] + ($2 << 2) | 0; + $2 = $3 + $1 | 0; + if ($1) { + $1 = HEAP32[$3 >> 2]; + HEAP32[$3 >> 2] = $1 << 24 | $1 << 8 & 16711680 | ($1 >>> 8 & 65280 | $1 >>> 24); + } + if (!FUNCTION_TABLE[HEAP32[$0 + 36 >> 2]]($2, $6 + 12 | 0, HEAP32[$0 + 40 >> 2])) { + break label$8 + } + $5 = HEAP32[$6 + 12 >> 2]; + $2 = HEAP32[$0 + 12 >> 2]; + $4 = HEAP32[$0 + 8 >> 2]; + $1 = $4 << 2; + $3 = ($5 + ($2 + $1 | 0) | 0) + 3 >>> 2 | 0; + $8 = $0; + if ($4 >>> 0 < $3 >>> 0) { + $2 = HEAP32[$0 >> 2]; + while (1) { + $7 = $2 + ($4 << 2) | 0; + $1 = HEAP32[$7 >> 2]; + HEAP32[$7 >> 2] = $1 << 8 & 16711680 | $1 << 24 | ($1 >>> 8 & 65280 | $1 >>> 24); + $4 = $4 + 1 | 0; + if (($3 | 0) != ($4 | 0)) { + continue + } + break; + }; + $2 = HEAP32[$0 + 12 >> 2]; + $1 = HEAP32[$0 + 8 >> 2] << 2; + } + $1 = $1 + ($2 + $5 | 0) | 0; + HEAP32[$8 + 12 >> 2] = $1 & 3; + HEAP32[$0 + 8 >> 2] = $1 >>> 2; + $4 = 1; + } + global$0 = $6 + 16 | 0; + return $4; + } + + function FLAC__bitreader_read_raw_int32($0, $1, $2) { + var $3 = 0, $4 = 0; + $3 = global$0 - 16 | 0; + global$0 = $3; + $4 = 0; + label$1 : { + if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, $2)) { + break label$1 + } + $0 = 1 << $2 + -1; + HEAP32[$1 >> 2] = ($0 ^ HEAP32[$3 + 12 >> 2]) - $0; + $4 = 1; + } + $0 = $4; + global$0 = $3 + 16 | 0; + return $0; + } + + function FLAC__bitreader_read_raw_uint64($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0, $6 = 0; + $3 = global$0 - 16 | 0; + global$0 = $3; + $4 = $1; + $5 = $1; + label$1 : { + label$2 : { + if ($2 >>> 0 >= 33) { + if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, $2 + -32 | 0)) { + break label$1 + } + if (!FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, 32)) { + break label$1 + } + $0 = HEAP32[$3 + 12 >> 2]; + $2 = 0; + HEAP32[$1 >> 2] = $2; + HEAP32[$1 + 4 >> 2] = $0; + $1 = HEAP32[$3 + 8 >> 2] | $2; + break label$2; + } + if (!FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, $2)) { + break label$1 + } + $0 = 0; + $1 = HEAP32[$3 + 8 >> 2]; + } + HEAP32[$5 >> 2] = $1; + HEAP32[$4 + 4 >> 2] = $0; + $6 = 1; + } + global$0 = $3 + 16 | 0; + return $6; + } + + function FLAC__bitreader_read_uint32_little_endian($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + $2 = global$0 - 16 | 0; + global$0 = $2; + HEAP32[$2 + 8 >> 2] = 0; + label$1 : { + if (!FLAC__bitreader_read_raw_uint32($0, $2 + 8 | 0, 8)) { + break label$1 + } + if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) { + break label$1 + } + $3 = HEAP32[$2 + 8 >> 2] | HEAP32[$2 + 12 >> 2] << 8; + HEAP32[$2 + 8 >> 2] = $3; + if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) { + break label$1 + } + $3 = $3 | HEAP32[$2 + 12 >> 2] << 16; + HEAP32[$2 + 8 >> 2] = $3; + if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) { + break label$1 + } + $0 = $3 | HEAP32[$2 + 12 >> 2] << 24; + HEAP32[$2 + 8 >> 2] = $0; + HEAP32[$1 >> 2] = $0; + $4 = 1; + } + global$0 = $2 + 16 | 0; + return $4; + } + + function FLAC__bitreader_skip_bits_no_crc($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0; + $3 = global$0 - 16 | 0; + global$0 = $3; + $4 = 1; + label$1 : { + if (!$1) { + break label$1 + } + $2 = HEAP32[$0 + 20 >> 2] & 7; + label$2 : { + if ($2) { + $2 = 8 - $2 | 0; + $2 = $2 >>> 0 < $1 >>> 0 ? $2 : $1; + if (!FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, $2)) { + break label$2 + } + $1 = $1 - $2 | 0; + } + $2 = $1 >>> 3 | 0; + if ($2) { + while (1) { + label$7 : { + if (!HEAP32[$0 + 20 >> 2]) { + if ($2 >>> 0 > 3) { + while (1) { + $5 = HEAP32[$0 + 16 >> 2]; + label$11 : { + if ($5 >>> 0 < HEAPU32[$0 + 8 >> 2]) { + HEAP32[$0 + 16 >> 2] = $5 + 1; + $2 = $2 + -4 | 0; + break label$11; + } + if (!bitreader_read_from_client_($0)) { + break label$2 + } + } + if ($2 >>> 0 > 3) { + continue + } + break; + }; + if (!$2) { + break label$7 + } + } + while (1) { + if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, 8)) { + break label$2 + } + $2 = $2 + -1 | 0; + if ($2) { + continue + } + break; + }; + break label$7; + } + if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, 8)) { + break label$2 + } + $2 = $2 + -1 | 0; + if ($2) { + continue + } + } + break; + }; + $1 = $1 & 7; + } + if (!$1) { + break label$1 + } + if (FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, $1)) { + break label$1 + } + } + $4 = 0; + } + global$0 = $3 + 16 | 0; + return $4; + } + + function FLAC__bitreader_skip_byte_block_aligned_no_crc($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + $2 = global$0 - 16 | 0; + global$0 = $2; + $3 = 1; + label$1 : { + if (!$1) { + break label$1 + } + while (1) { + label$3 : { + if (!HEAP32[$0 + 20 >> 2]) { + label$5 : { + if ($1 >>> 0 < 4) { + break label$5 + } + while (1) { + $4 = HEAP32[$0 + 16 >> 2]; + label$7 : { + if ($4 >>> 0 < HEAPU32[$0 + 8 >> 2]) { + HEAP32[$0 + 16 >> 2] = $4 + 1; + $1 = $1 + -4 | 0; + break label$7; + } + if (!bitreader_read_from_client_($0)) { + break label$3 + } + } + if ($1 >>> 0 > 3) { + continue + } + break; + }; + if ($1) { + break label$5 + } + break label$1; + } + while (1) { + if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) { + break label$3 + } + $1 = $1 + -1 | 0; + if ($1) { + continue + } + break; + }; + break label$1; + } + if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) { + break label$3 + } + $1 = $1 + -1 | 0; + if ($1) { + continue + } + break label$1; + } + break; + }; + $3 = 0; + } + global$0 = $2 + 16 | 0; + return $3; + } + + function FLAC__bitreader_read_byte_block_aligned_no_crc($0, $1, $2) { + var $3 = 0, $4 = 0; + $4 = global$0 - 16 | 0; + global$0 = $4; + label$1 : { + if (!$2) { + $3 = 1; + break label$1; + } + while (1) { + if (!HEAP32[$0 + 20 >> 2]) { + label$5 : { + if ($2 >>> 0 < 4) { + break label$5 + } + while (1) { + label$7 : { + $3 = HEAP32[$0 + 16 >> 2]; + if ($3 >>> 0 < HEAPU32[$0 + 8 >> 2]) { + HEAP32[$0 + 16 >> 2] = $3 + 1; + $3 = HEAP32[HEAP32[$0 >> 2] + ($3 << 2) >> 2]; + $3 = $3 << 24 | $3 << 8 & 16711680 | ($3 >>> 8 & 65280 | $3 >>> 24); + HEAP8[$1 | 0] = $3; + HEAP8[$1 + 1 | 0] = $3 >>> 8; + HEAP8[$1 + 2 | 0] = $3 >>> 16; + HEAP8[$1 + 3 | 0] = $3 >>> 24; + $2 = $2 + -4 | 0; + $1 = $1 + 4 | 0; + break label$7; + } + if (bitreader_read_from_client_($0)) { + break label$7 + } + $3 = 0; + break label$1; + } + if ($2 >>> 0 > 3) { + continue + } + break; + }; + if ($2) { + break label$5 + } + $3 = 1; + break label$1; + } + while (1) { + if (!FLAC__bitreader_read_raw_uint32($0, $4 + 12 | 0, 8)) { + $3 = 0; + break label$1; + } + HEAP8[$1 | 0] = HEAP32[$4 + 12 >> 2]; + $3 = 1; + $1 = $1 + 1 | 0; + $2 = $2 + -1 | 0; + if ($2) { + continue + } + break; + }; + break label$1; + } + if (!FLAC__bitreader_read_raw_uint32($0, $4 + 12 | 0, 8)) { + $3 = 0; + break label$1; + } + HEAP8[$1 | 0] = HEAP32[$4 + 12 >> 2]; + $3 = 1; + $1 = $1 + 1 | 0; + $2 = $2 + -1 | 0; + if ($2) { + continue + } + break; + }; + } + global$0 = $4 + 16 | 0; + return $3; + } + + function FLAC__bitreader_read_unary_unsigned($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + HEAP32[$1 >> 2] = 0; + label$1 : { + while (1) { + $3 = HEAP32[$0 + 16 >> 2]; + label$3 : { + if ($3 >>> 0 >= HEAPU32[$0 + 8 >> 2]) { + $2 = HEAP32[$0 + 20 >> 2]; + break label$3; + } + $2 = HEAP32[$0 + 20 >> 2]; + $4 = HEAP32[$0 >> 2]; + while (1) { + $3 = HEAP32[$4 + ($3 << 2) >> 2] << $2; + if ($3) { + $2 = $1; + $4 = HEAP32[$1 >> 2]; + $1 = Math_clz32($3); + HEAP32[$2 >> 2] = $4 + $1; + $2 = ($1 + HEAP32[$0 + 20 >> 2] | 0) + 1 | 0; + HEAP32[$0 + 20 >> 2] = $2; + $1 = 1; + if ($2 >>> 0 < 32) { + break label$1 + } + HEAP32[$0 + 20 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = HEAP32[$0 + 16 >> 2] + 1; + return 1; + } + HEAP32[$1 >> 2] = (HEAP32[$1 >> 2] - $2 | 0) + 32; + $2 = 0; + HEAP32[$0 + 20 >> 2] = 0; + $3 = HEAP32[$0 + 16 >> 2] + 1 | 0; + HEAP32[$0 + 16 >> 2] = $3; + if ($3 >>> 0 < HEAPU32[$0 + 8 >> 2]) { + continue + } + break; + }; + } + $4 = HEAP32[$0 + 12 >> 2] << 3; + if ($4 >>> 0 > $2 >>> 0) { + $3 = (HEAP32[HEAP32[$0 >> 2] + ($3 << 2) >> 2] & -1 << 32 - $4) << $2; + if ($3) { + $2 = $1; + $4 = HEAP32[$1 >> 2]; + $1 = Math_clz32($3); + HEAP32[$2 >> 2] = $4 + $1; + HEAP32[$0 + 20 >> 2] = ($1 + HEAP32[$0 + 20 >> 2] | 0) + 1; + return 1; + } + HEAP32[$1 >> 2] = HEAP32[$1 >> 2] + ($4 - $2 | 0); + HEAP32[$0 + 20 >> 2] = $4; + } + if (bitreader_read_from_client_($0)) { + continue + } + break; + }; + $1 = 0; + } + return $1; + } + + function FLAC__bitreader_read_rice_signed_block($0, $1, $2, $3) { + var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0; + $6 = global$0 - 16 | 0; + global$0 = $6; + $12 = ($2 << 2) + $1 | 0; + label$1 : { + if (!$3) { + $14 = 1; + if (($2 | 0) < 1) { + break label$1 + } + while (1) { + if (!FLAC__bitreader_read_unary_unsigned($0, $6 + 8 | 0)) { + $14 = 0; + break label$1; + } + $2 = HEAP32[$6 + 8 >> 2]; + HEAP32[$1 >> 2] = $2 >>> 1 ^ 0 - ($2 & 1); + $1 = $1 + 4 | 0; + if ($1 >>> 0 < $12 >>> 0) { + continue + } + break; + }; + break label$1; + } + label$5 : { + label$6 : { + $4 = HEAP32[$0 + 16 >> 2]; + $10 = HEAP32[$0 + 8 >> 2]; + if ($4 >>> 0 >= $10 >>> 0) { + break label$6 + } + $11 = HEAP32[$0 >> 2]; + $13 = HEAP32[$0 + 20 >> 2]; + $9 = HEAP32[$11 + ($4 << 2) >> 2] << $13; + $2 = 0; + break label$5; + } + $2 = 1; + } + while (1) { + label$9 : { + label$10 : { + label$11 : { + label$12 : { + if (!$2) { + $5 = 32 - $13 | 0; + label$14 : { + if ($1 >>> 0 < $12 >>> 0) { + $15 = 32 - $3 | 0; + while (1) { + $2 = $4; + $7 = $5; + label$17 : { + if ($9) { + $7 = Math_clz32($9); + $8 = $7; + break label$17; + } + while (1) { + $2 = $2 + 1 | 0; + if ($2 >>> 0 >= $10 >>> 0) { + break label$14 + } + $9 = HEAP32[($2 << 2) + $11 >> 2]; + $8 = Math_clz32($9); + $7 = $8 + $7 | 0; + if (!$9) { + continue + } + break; + }; + } + $4 = $9 << $8 << 1; + $8 = $4 >>> $15 | 0; + HEAP32[$6 + 8 >> 2] = $7; + $5 = ($7 ^ -1) + $5 & 31; + label$20 : { + if ($5 >>> 0 >= $3 >>> 0) { + $9 = $4 << $3; + $5 = $5 - $3 | 0; + $4 = $2; + break label$20; + } + $4 = $2 + 1 | 0; + if ($4 >>> 0 >= $10 >>> 0) { + break label$12 + } + $2 = HEAP32[($4 << 2) + $11 >> 2]; + $5 = $5 + $15 | 0; + $9 = $2 << 32 - $5; + $8 = $2 >>> $5 | $8; + } + HEAP32[$6 + 12 >> 2] = $8; + $2 = $7 << $3 | $8; + HEAP32[$1 >> 2] = $2 >>> 1 ^ 0 - ($2 & 1); + $1 = $1 + 4 | 0; + if ($1 >>> 0 < $12 >>> 0) { + continue + } + break; + }; + } + $1 = $4 >>> 0 < $10 >>> 0; + HEAP32[$0 + 16 >> 2] = ($1 & !$5) + $4; + HEAP32[$0 + 20 >> 2] = 32 - ($5 ? $5 : $1 << 5); + $14 = 1; + break label$1; + } + HEAP32[$0 + 20 >> 2] = 0; + $2 = $4 + 1 | 0; + HEAP32[$0 + 16 >> 2] = $10 >>> 0 > $2 >>> 0 ? $10 : $2; + break label$10; + } + if (!FLAC__bitreader_read_unary_unsigned($0, $6 + 8 | 0)) { + break label$1 + } + $7 = HEAP32[$6 + 8 >> 2] + $7 | 0; + HEAP32[$6 + 8 >> 2] = $7; + $8 = 0; + $5 = 0; + break label$11; + } + HEAP32[$0 + 16 >> 2] = $4; + HEAP32[$0 + 20 >> 2] = 0; + } + if (!FLAC__bitreader_read_raw_uint32($0, $6 + 12 | 0, $3 - $5 | 0)) { + break label$1 + } + $2 = $7 << $3; + $4 = HEAP32[$6 + 12 >> 2] | $8; + HEAP32[$6 + 12 >> 2] = $4; + $7 = 0; + $2 = $2 | $4; + HEAP32[$1 >> 2] = $2 >>> 1 ^ 0 - ($2 & 1); + $11 = HEAP32[$0 >> 2]; + $4 = HEAP32[$0 + 16 >> 2]; + $13 = HEAP32[$0 + 20 >> 2]; + $9 = HEAP32[$11 + ($4 << 2) >> 2] << $13; + $10 = HEAP32[$0 + 8 >> 2]; + $1 = $1 + 4 | 0; + if ($4 >>> 0 < $10 >>> 0 | $1 >>> 0 >= $12 >>> 0) { + break label$9 + } + } + $2 = 1; + continue; + } + $2 = 0; + continue; + }; + } + global$0 = $6 + 16 | 0; + return $14; + } + + function FLAC__bitreader_read_utf8_uint32($0, $1, $2, $3) { + var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + $7 = global$0 - 16 | 0; + global$0 = $7; + label$1 : { + if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) { + break label$1 + } + $4 = HEAP32[$7 + 12 >> 2]; + if ($2) { + $5 = HEAP32[$3 >> 2]; + HEAP32[$3 >> 2] = $5 + 1; + HEAP8[$2 + $5 | 0] = $4; + } + label$3 : { + label$4 : { + label$5 : { + label$6 : { + if (!($4 & 128)) { + break label$6 + } + label$7 : { + if (!(!($4 & 192) | $4 & 32)) { + $6 = 31; + $5 = 1; + break label$7; + } + if (!(!($4 & 224) | $4 & 16)) { + $6 = 15; + $5 = 2; + break label$7; + } + if (!(!($4 & 240) | $4 & 8)) { + $6 = 7; + $5 = 3; + break label$7; + } + if ($4 & 248) { + $6 = 3; + $5 = 4; + if (!($4 & 4)) { + break label$7 + } + } + if (!($4 & 252) | $4 & 2) { + break label$5 + } + $6 = 1; + $5 = 5; + } + $4 = $4 & $6; + if (!$2) { + while (1) { + if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) { + break label$1 + } + $2 = HEAP32[$7 + 12 >> 2]; + if (($2 & 192) != 128) { + break label$4 + } + $4 = $2 & 63 | $4 << 6; + $5 = $5 + -1 | 0; + if ($5) { + continue + } + break label$6; + } + } + while (1) { + if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) { + break label$1 + } + $6 = HEAP32[$7 + 12 >> 2]; + $8 = HEAP32[$3 >> 2]; + HEAP32[$3 >> 2] = $8 + 1; + HEAP8[$2 + $8 | 0] = $6; + if (($6 & 192) != 128) { + break label$4 + } + $4 = $6 & 63 | $4 << 6; + $5 = $5 + -1 | 0; + if ($5) { + continue + } + break; + }; + } + HEAP32[$1 >> 2] = $4; + break label$3; + } + HEAP32[$1 >> 2] = -1; + break label$3; + } + HEAP32[$1 >> 2] = -1; + } + $9 = 1; + } + global$0 = $7 + 16 | 0; + return $9; + } + + function FLAC__bitreader_read_utf8_uint64($0, $1, $2, $3) { + var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + $7 = global$0 - 16 | 0; + global$0 = $7; + label$1 : { + if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) { + break label$1 + } + $4 = HEAP32[$7 + 12 >> 2]; + if ($2) { + $6 = HEAP32[$3 >> 2]; + HEAP32[$3 >> 2] = $6 + 1; + HEAP8[$2 + $6 | 0] = $4; + } + label$4 : { + label$5 : { + label$6 : { + label$7 : { + if ($4 & 128) { + if (!(!($4 & 192) | $4 & 32)) { + $4 = $4 & 31; + $5 = 1; + break label$7; + } + if (!(!($4 & 224) | $4 & 16)) { + $4 = $4 & 15; + $5 = 2; + break label$7; + } + if (!(!($4 & 240) | $4 & 8)) { + $4 = $4 & 7; + $5 = 3; + break label$7; + } + if (!(!($4 & 248) | $4 & 4)) { + $4 = $4 & 3; + $5 = 4; + break label$7; + } + if (!(!($4 & 252) | $4 & 2)) { + $4 = $4 & 1; + $5 = 5; + break label$7; + } + $5 = 1; + if (!(!($4 & 254) | $4 & 1)) { + $5 = 6; + $4 = 0; + break label$7; + } + HEAP32[$1 >> 2] = -1; + HEAP32[$1 + 4 >> 2] = -1; + break label$1; + } + $6 = 0; + break label$6; + } + $6 = 0; + if (!$2) { + while (1) { + if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) { + $5 = 0; + break label$1; + } + $2 = HEAP32[$7 + 12 >> 2]; + if (($2 & 192) != 128) { + break label$5 + } + $2 = $2 & 63; + $6 = $6 << 6 | $4 >>> 26; + $4 = $2 | $4 << 6; + $5 = $5 + -1 | 0; + if ($5) { + continue + } + break label$6; + } + } + while (1) { + if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) { + $5 = 0; + break label$1; + } + $8 = HEAP32[$7 + 12 >> 2]; + $9 = HEAP32[$3 >> 2]; + HEAP32[$3 >> 2] = $9 + 1; + HEAP8[$2 + $9 | 0] = $8; + if (($8 & 192) != 128) { + break label$5 + } + $6 = $6 << 6 | $4 >>> 26; + $4 = $8 & 63 | $4 << 6; + $5 = $5 + -1 | 0; + if ($5) { + continue + } + break; + }; + } + HEAP32[$1 >> 2] = $4; + HEAP32[$1 + 4 >> 2] = $6; + break label$4; + } + HEAP32[$1 >> 2] = -1; + HEAP32[$1 + 4 >> 2] = -1; + } + $5 = 1; + } + global$0 = $7 + 16 | 0; + return $5; + } + + function qsort($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; + $2 = global$0 - 208 | 0; + global$0 = $2; + HEAP32[$2 + 8 >> 2] = 1; + HEAP32[$2 + 12 >> 2] = 0; + label$1 : { + $5 = Math_imul($1, 24); + if (!$5) { + break label$1 + } + HEAP32[$2 + 16 >> 2] = 24; + HEAP32[$2 + 20 >> 2] = 24; + $1 = 24; + $4 = $1; + $3 = 2; + while (1) { + $6 = $4 + 24 | 0; + $4 = $1; + $1 = $1 + $6 | 0; + HEAP32[($2 + 16 | 0) + ($3 << 2) >> 2] = $1; + $3 = $3 + 1 | 0; + if ($1 >>> 0 < $5 >>> 0) { + continue + } + break; + }; + $4 = ($0 + $5 | 0) + -24 | 0; + label$3 : { + if ($4 >>> 0 <= $0 >>> 0) { + $3 = 1; + $1 = 1; + break label$3; + } + $3 = 1; + $1 = 1; + while (1) { + label$6 : { + if (($3 & 3) == 3) { + sift($0, $1, $2 + 16 | 0); + shr($2 + 8 | 0, 2); + $1 = $1 + 2 | 0; + break label$6; + } + $3 = $1 + -1 | 0; + label$8 : { + if (HEAPU32[($2 + 16 | 0) + ($3 << 2) >> 2] >= $4 - $0 >>> 0) { + trinkle($0, $2 + 8 | 0, $1, 0, $2 + 16 | 0); + break label$8; + } + sift($0, $1, $2 + 16 | 0); + } + if (($1 | 0) == 1) { + shl($2 + 8 | 0, 1); + $1 = 0; + break label$6; + } + shl($2 + 8 | 0, $3); + $1 = 1; + } + $3 = HEAP32[$2 + 8 >> 2] | 1; + HEAP32[$2 + 8 >> 2] = $3; + $0 = $0 + 24 | 0; + if ($0 >>> 0 < $4 >>> 0) { + continue + } + break; + }; + } + trinkle($0, $2 + 8 | 0, $1, 0, $2 + 16 | 0); + while (1) { + label$12 : { + label$13 : { + label$14 : { + if (!(($1 | 0) != 1 | ($3 | 0) != 1)) { + if (HEAP32[$2 + 12 >> 2]) { + break label$14 + } + break label$1; + } + if (($1 | 0) > 1) { + break label$13 + } + } + $4 = pntz($2 + 8 | 0); + shr($2 + 8 | 0, $4); + $3 = HEAP32[$2 + 8 >> 2]; + $1 = $1 + $4 | 0; + break label$12; + } + shl($2 + 8 | 0, 2); + HEAP32[$2 + 8 >> 2] = HEAP32[$2 + 8 >> 2] ^ 7; + shr($2 + 8 | 0, 1); + $5 = $0 + -24 | 0; + $4 = $1 + -2 | 0; + trinkle($5 - HEAP32[($2 + 16 | 0) + ($4 << 2) >> 2] | 0, $2 + 8 | 0, $1 + -1 | 0, 1, $2 + 16 | 0); + shl($2 + 8 | 0, 1); + $3 = HEAP32[$2 + 8 >> 2] | 1; + HEAP32[$2 + 8 >> 2] = $3; + trinkle($5, $2 + 8 | 0, $4, 1, $2 + 16 | 0); + $1 = $4; + } + $0 = $0 + -24 | 0; + continue; + }; + } + global$0 = $2 + 208 | 0; + } + + function sift($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + $3 = global$0 - 240 | 0; + global$0 = $3; + HEAP32[$3 >> 2] = $0; + $6 = 1; + label$1 : { + if (($1 | 0) < 2) { + break label$1 + } + $4 = $0; + while (1) { + $5 = $4 + -24 | 0; + $7 = $1 + -2 | 0; + $4 = $5 - HEAP32[($7 << 2) + $2 >> 2] | 0; + if ((FUNCTION_TABLE[1]($0, $4) | 0) >= 0) { + if ((FUNCTION_TABLE[1]($0, $5) | 0) > -1) { + break label$1 + } + } + $0 = ($6 << 2) + $3 | 0; + label$4 : { + if ((FUNCTION_TABLE[1]($4, $5) | 0) >= 0) { + HEAP32[$0 >> 2] = $4; + $7 = $1 + -1 | 0; + break label$4; + } + HEAP32[$0 >> 2] = $5; + $4 = $5; + } + $6 = $6 + 1 | 0; + if (($7 | 0) < 2) { + break label$1 + } + $0 = HEAP32[$3 >> 2]; + $1 = $7; + continue; + }; + } + cycle($3, $6); + global$0 = $3 + 240 | 0; + } + + function shr($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + $4 = $0; + label$1 : { + if ($1 >>> 0 <= 31) { + $2 = HEAP32[$0 >> 2]; + $3 = HEAP32[$0 + 4 >> 2]; + break label$1; + } + $2 = HEAP32[$0 + 4 >> 2]; + HEAP32[$0 + 4 >> 2] = 0; + HEAP32[$0 >> 2] = $2; + $1 = $1 + -32 | 0; + $3 = 0; + } + HEAP32[$4 + 4 >> 2] = $3 >>> $1; + HEAP32[$0 >> 2] = $3 << 32 - $1 | $2 >>> $1; + } + + function trinkle($0, $1, $2, $3, $4) { + var $5 = 0, $6 = 0, $7 = 0, $8 = 0; + $5 = global$0 - 240 | 0; + global$0 = $5; + $6 = HEAP32[$1 >> 2]; + HEAP32[$5 + 232 >> 2] = $6; + $1 = HEAP32[$1 + 4 >> 2]; + HEAP32[$5 >> 2] = $0; + HEAP32[$5 + 236 >> 2] = $1; + $7 = 1; + label$1 : { + label$2 : { + label$3 : { + label$4 : { + if ($1 ? 0 : ($6 | 0) == 1) { + break label$4 + } + $6 = $0 - HEAP32[($2 << 2) + $4 >> 2] | 0; + if ((FUNCTION_TABLE[1]($6, $0) | 0) < 1) { + break label$4 + } + $8 = !$3; + while (1) { + label$6 : { + $1 = $6; + if (!(!$8 | ($2 | 0) < 2)) { + $3 = HEAP32[(($2 << 2) + $4 | 0) + -8 >> 2]; + $6 = $0 + -24 | 0; + if ((FUNCTION_TABLE[1]($6, $1) | 0) > -1) { + break label$6 + } + if ((FUNCTION_TABLE[1]($6 - $3 | 0, $1) | 0) > -1) { + break label$6 + } + } + HEAP32[($7 << 2) + $5 >> 2] = $1; + $0 = pntz($5 + 232 | 0); + shr($5 + 232 | 0, $0); + $7 = $7 + 1 | 0; + $2 = $0 + $2 | 0; + if (HEAP32[$5 + 236 >> 2] ? 0 : HEAP32[$5 + 232 >> 2] == 1) { + break label$2 + } + $3 = 0; + $8 = 1; + $0 = $1; + $6 = $1 - HEAP32[($2 << 2) + $4 >> 2] | 0; + if ((FUNCTION_TABLE[1]($6, HEAP32[$5 >> 2]) | 0) > 0) { + continue + } + break label$3; + } + break; + }; + $1 = $0; + break label$2; + } + $1 = $0; + } + if ($3) { + break label$1 + } + } + cycle($5, $7); + sift($1, $2, $4); + } + global$0 = $5 + 240 | 0; + } + + function shl($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + $4 = $0; + label$1 : { + if ($1 >>> 0 <= 31) { + $2 = HEAP32[$0 + 4 >> 2]; + $3 = HEAP32[$0 >> 2]; + break label$1; + } + $2 = HEAP32[$0 >> 2]; + HEAP32[$0 + 4 >> 2] = $2; + HEAP32[$0 >> 2] = 0; + $1 = $1 + -32 | 0; + $3 = 0; + } + HEAP32[$4 >> 2] = $3 << $1; + HEAP32[$0 + 4 >> 2] = $2 << $1 | $3 >>> 32 - $1; + } + + function pntz($0) { + var $1 = 0; + $1 = __wasm_ctz_i32(HEAP32[$0 >> 2] + -1 | 0); + if (!$1) { + $0 = __wasm_ctz_i32(HEAP32[$0 + 4 >> 2]); + return $0 ? $0 + 32 | 0 : 0; + } + return $1; + } + + function cycle($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + $3 = 24; + $4 = global$0 - 256 | 0; + global$0 = $4; + label$1 : { + if (($1 | 0) < 2) { + break label$1 + } + $7 = ($1 << 2) + $0 | 0; + HEAP32[$7 >> 2] = $4; + $2 = $4; + while (1) { + $5 = $3 >>> 0 < 256 ? $3 : 256; + memcpy($2, HEAP32[$0 >> 2], $5); + $2 = 0; + while (1) { + $6 = ($2 << 2) + $0 | 0; + $2 = $2 + 1 | 0; + memcpy(HEAP32[$6 >> 2], HEAP32[($2 << 2) + $0 >> 2], $5); + HEAP32[$6 >> 2] = HEAP32[$6 >> 2] + $5; + if (($1 | 0) != ($2 | 0)) { + continue + } + break; + }; + $3 = $3 - $5 | 0; + if (!$3) { + break label$1 + } + $2 = HEAP32[$7 >> 2]; + continue; + }; + } + global$0 = $4 + 256 | 0; + } + + function FLAC__format_sample_rate_is_subset($0) { + if ($0 + -1 >>> 0 <= 655349) { + return !(($0 >>> 0) % 10) | (!(($0 >>> 0) % 1e3) | $0 >>> 0 < 65536) + } + return 0; + } + + function FLAC__format_seektable_is_legal($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + $3 = HEAP32[$0 >> 2]; + if (!$3) { + return 1 + } + $6 = HEAP32[$0 + 4 >> 2]; + $0 = 0; + $4 = 1; + while (1) { + $7 = $2; + $5 = $1; + $1 = Math_imul($0, 24) + $6 | 0; + $2 = HEAP32[$1 >> 2]; + $1 = HEAP32[$1 + 4 >> 2]; + if (!(($2 | 0) == -1 & ($1 | 0) == -1 | $4 | (($1 | 0) == ($5 | 0) & $2 >>> 0 > $7 >>> 0 | $1 >>> 0 > $5 >>> 0))) { + return 0 + } + $4 = 0; + $0 = $0 + 1 | 0; + if ($0 >>> 0 < $3 >>> 0) { + continue + } + break; + }; + return 1; + } + + function FLAC__format_seektable_sort($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + label$1 : { + $2 = HEAP32[$0 >> 2]; + if (!$2) { + break label$1 + } + qsort(HEAP32[$0 + 4 >> 2], $2); + if (!HEAP32[$0 >> 2]) { + break label$1 + } + $2 = 1; + $1 = HEAP32[$0 >> 2]; + if ($1 >>> 0 > 1) { + $6 = 1; + while (1) { + $4 = HEAP32[$0 + 4 >> 2]; + $3 = $4 + Math_imul($6, 24) | 0; + $5 = HEAP32[$3 >> 2]; + $7 = HEAP32[$3 + 4 >> 2]; + $8 = $7; + label$4 : { + if (($5 | 0) != -1 | ($7 | 0) != -1) { + $7 = $5; + $5 = ($4 + Math_imul($2, 24) | 0) + -24 | 0; + if (($7 | 0) == HEAP32[$5 >> 2] & HEAP32[$5 + 4 >> 2] == ($8 | 0)) { + break label$4 + } + } + $5 = HEAP32[$3 + 4 >> 2]; + $1 = $4 + Math_imul($2, 24) | 0; + HEAP32[$1 >> 2] = HEAP32[$3 >> 2]; + HEAP32[$1 + 4 >> 2] = $5; + $4 = HEAP32[$3 + 20 >> 2]; + HEAP32[$1 + 16 >> 2] = HEAP32[$3 + 16 >> 2]; + HEAP32[$1 + 20 >> 2] = $4; + $4 = HEAP32[$3 + 12 >> 2]; + HEAP32[$1 + 8 >> 2] = HEAP32[$3 + 8 >> 2]; + HEAP32[$1 + 12 >> 2] = $4; + $2 = $2 + 1 | 0; + $1 = HEAP32[$0 >> 2]; + } + $6 = $6 + 1 | 0; + if ($6 >>> 0 < $1 >>> 0) { + continue + } + break; + }; + } + if ($2 >>> 0 >= $1 >>> 0) { + break label$1 + } + $3 = HEAP32[$0 + 4 >> 2]; + while (1) { + $0 = $3 + Math_imul($2, 24) | 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + HEAP32[$0 >> 2] = -1; + HEAP32[$0 + 4 >> 2] = -1; + $2 = $2 + 1 | 0; + if (($1 | 0) != ($2 | 0)) { + continue + } + break; + }; + } + } + + function seekpoint_compare_($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + var $2 = 0, $3 = 0; + $2 = HEAP32[$0 + 4 >> 2]; + $3 = HEAP32[$1 + 4 >> 2]; + $0 = HEAP32[$0 >> 2]; + $1 = HEAP32[$1 >> 2]; + return (($0 | 0) == ($1 | 0) & ($2 | 0) == ($3 | 0) ? 0 : ($2 | 0) == ($3 | 0) & $0 >>> 0 < $1 >>> 0 | $2 >>> 0 < $3 >>> 0 ? -1 : 1) | 0; + } + + function utf8len_($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0; + $2 = 1; + label$1 : { + $1 = HEAPU8[$0 | 0]; + label$2 : { + if (!($1 & 128)) { + break label$2 + } + if (!(($1 & 224) != 192 | (HEAPU8[$0 + 1 | 0] & 192) != 128)) { + return (($1 & 254) != 192) << 1 + } + label$4 : { + if (($1 & 240) != 224) { + break label$4 + } + $3 = HEAPU8[$0 + 1 | 0]; + if (($3 & 192) != 128) { + break label$4 + } + $4 = HEAPU8[$0 + 2 | 0]; + if (($4 & 192) != 128) { + break label$4 + } + $2 = 0; + if (($3 & 224) == 128 ? ($1 | 0) == 224 : 0) { + break label$2 + } + label$5 : { + label$6 : { + switch ($1 + -237 | 0) { + case 0: + if (($3 & 224) != 160) { + break label$5 + } + break label$2; + case 2: + break label$6; + default: + break label$5; + }; + } + if (($3 | 0) != 191) { + break label$5 + } + if (($4 & 254) == 190) { + break label$2 + } + } + return 3; + } + label$8 : { + if (($1 & 248) != 240) { + break label$8 + } + $2 = HEAPU8[$0 + 1 | 0]; + if (($2 & 192) != 128 | (HEAPU8[$0 + 2 | 0] & 192) != 128) { + break label$8 + } + if ((HEAPU8[$0 + 3 | 0] & 192) == 128) { + break label$1 + } + } + label$9 : { + if (($1 & 252) != 248) { + break label$9 + } + $2 = HEAPU8[$0 + 1 | 0]; + if (($2 & 192) != 128 | (HEAPU8[$0 + 2 | 0] & 192) != 128 | ((HEAPU8[$0 + 3 | 0] & 192) != 128 | (HEAPU8[$0 + 4 | 0] & 192) != 128)) { + break label$9 + } + return ($1 | 0) == 248 ? (($2 & 248) == 128 ? 0 : 5) : 5; + } + $2 = 0; + if (($1 & 254) != 252) { + break label$2 + } + $3 = HEAPU8[$0 + 1 | 0]; + if (($3 & 192) != 128 | (HEAPU8[$0 + 2 | 0] & 192) != 128 | ((HEAPU8[$0 + 3 | 0] & 192) != 128 | (HEAPU8[$0 + 4 | 0] & 192) != 128)) { + break label$2 + } + if ((HEAPU8[$0 + 5 | 0] & 192) != 128) { + break label$2 + } + $2 = ($1 | 0) == 252 ? (($3 & 252) == 128 ? 0 : 6) : 6; + } + return $2; + } + return ($1 | 0) == 240 ? (($2 & 240) != 128) << 2 : 4; + } + + function FLAC__format_cuesheet_is_legal($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + label$1 : { + label$2 : { + label$3 : { + label$4 : { + label$5 : { + label$6 : { + label$7 : { + if ($1) { + $1 = HEAP32[$0 + 140 >> 2]; + $3 = $1; + $2 = HEAP32[$0 + 136 >> 2]; + if (!$1 & $2 >>> 0 <= 88199 | $1 >>> 0 < 0) { + $0 = 0; + break label$1; + } + if (__wasm_i64_urem($2, $3) | i64toi32_i32$HIGH_BITS) { + $0 = 0; + break label$1; + } + $3 = HEAP32[$0 + 148 >> 2]; + if (!$3) { + break label$2 + } + if (HEAPU8[(HEAP32[$0 + 152 >> 2] + ($3 << 5) | 0) + -24 | 0] == 170) { + break label$7 + } + $0 = 0; + break label$1; + } + $2 = HEAP32[$0 + 148 >> 2]; + if (!$2) { + break label$2 + } + $4 = $2 + -1 | 0; + $6 = HEAP32[$0 + 152 >> 2]; + $1 = 0; + while (1) { + $0 = $6 + ($1 << 5) | 0; + if (!HEAPU8[$0 + 8 | 0]) { + break label$3 + } + $3 = HEAPU8[$0 + 23 | 0]; + label$12 : { + label$13 : { + if ($1 >>> 0 < $4 >>> 0) { + if (!$3) { + break label$4 + } + if (HEAPU8[HEAP32[$0 + 24 >> 2] + 8 | 0] > 1) { + break label$5 + } + break label$13; + } + if (!$3) { + break label$12 + } + } + $7 = $0 + 24 | 0; + $0 = 0; + while (1) { + if ($0) { + $5 = HEAP32[$7 >> 2] + ($0 << 4) | 0; + if ((HEAPU8[$5 + -8 | 0] + 1 | 0) != HEAPU8[$5 + 8 | 0]) { + break label$6 + } + } + $0 = $0 + 1 | 0; + if ($0 >>> 0 < $3 >>> 0) { + continue + } + break; + }; + } + $0 = 1; + $1 = $1 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + $6 = $3 + -1 | 0; + $7 = HEAP32[$0 + 152 >> 2]; + $1 = 0; + while (1) { + $0 = $7 + ($1 << 5) | 0; + $2 = HEAPU8[$0 + 8 | 0]; + if (!$2) { + break label$3 + } + if (!(($2 | 0) == 170 | $2 >>> 0 < 100)) { + $0 = 0; + break label$1; + } + if (__wasm_i64_urem(HEAP32[$0 >> 2], HEAP32[$0 + 4 >> 2]) | i64toi32_i32$HIGH_BITS) { + $0 = 0; + break label$1; + } + $2 = HEAPU8[$0 + 23 | 0]; + label$21 : { + label$22 : { + if ($1 >>> 0 < $6 >>> 0) { + if (!$2) { + break label$4 + } + if (HEAPU8[HEAP32[$0 + 24 >> 2] + 8 | 0] < 2) { + break label$22 + } + break label$5; + } + if (!$2) { + break label$21 + } + } + $5 = HEAP32[$0 + 24 >> 2]; + $0 = 0; + while (1) { + $4 = $5 + ($0 << 4) | 0; + if (__wasm_i64_urem(HEAP32[$4 >> 2], HEAP32[$4 + 4 >> 2]) | i64toi32_i32$HIGH_BITS) { + $0 = 0; + break label$1; + } + if (HEAPU8[$4 + 8 | 0] != (HEAPU8[$4 + -8 | 0] + 1 | 0) ? $0 : 0) { + break label$6 + } + $0 = $0 + 1 | 0; + if ($0 >>> 0 < $2 >>> 0) { + continue + } + break; + }; + } + $0 = 1; + $1 = $1 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + $0 = 0; + break label$1; + } + $0 = 0; + break label$1; + } + $0 = 0; + break label$1; + } + $0 = 0; + break label$1; + } + $0 = 0; + } + return $0; + } + + function FLAC__format_picture_is_legal($0) { + var $1 = 0, $2 = 0; + label$1 : { + label$2 : { + $2 = HEAP32[$0 + 4 >> 2]; + $1 = HEAPU8[$2 | 0]; + if (!$1) { + break label$2 + } + while (1) { + if (($1 + -32 & 255) >>> 0 < 95) { + $2 = $2 + 1 | 0; + $1 = HEAPU8[$2 | 0]; + if ($1) { + continue + } + break label$2; + } + break; + }; + $2 = 0; + break label$1; + } + $2 = 1; + $1 = HEAP32[$0 + 8 >> 2]; + if (!HEAPU8[$1 | 0]) { + break label$1 + } + while (1) { + $0 = utf8len_($1); + if (!$0) { + $2 = 0; + break label$1; + } + $1 = $0 + $1 | 0; + if (HEAPU8[$1 | 0]) { + continue + } + break; + }; + } + return $2; + } + + function FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_and_predictor_order($0, $1, $2) { + var $3 = 0; + while (1) { + $3 = $0; + if ($3) { + $0 = $3 + -1 | 0; + if ($1 >>> $3 >>> 0 <= $2 >>> 0) { + continue + } + } + break; + }; + return $3; + } + + function FLAC__format_get_max_rice_partition_order_from_blocksize($0) { + var $1 = 0, $2 = 0; + label$1 : { + if (!($0 & 1)) { + while (1) { + $1 = $1 + 1 | 0; + $2 = $0 & 2; + $0 = $0 >>> 1 | 0; + if (!$2) { + continue + } + break; + }; + $0 = 15; + if ($1 >>> 0 > 14) { + break label$1 + } + } + $0 = $1; + } + return $0; + } + + function FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0) { + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + } + + function FLAC__format_entropy_coding_method_partitioned_rice_contents_clear($0) { + var $1 = 0; + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + $1 = HEAP32[$0 + 4 >> 2]; + if ($1) { + dlfree($1) + } + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + } + + function FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0; + $3 = 1; + label$1 : { + if (HEAPU32[$0 + 8 >> 2] >= $1 >>> 0) { + break label$1 + } + $3 = HEAP32[$0 >> 2]; + $4 = 4 << $1; + $2 = dlrealloc($3, $4); + if (!($2 | $1 >>> 0 > 29)) { + dlfree($3) + } + HEAP32[$0 >> 2] = $2; + $3 = 0; + if (!$2) { + break label$1 + } + $5 = HEAP32[$0 + 4 >> 2]; + $2 = dlrealloc($5, $4); + if (!($2 | $1 >>> 0 > 29)) { + dlfree($5) + } + HEAP32[$0 + 4 >> 2] = $2; + if (!$2) { + break label$1 + } + memset($2, $4); + HEAP32[$0 + 8 >> 2] = $1; + $3 = 1; + } + return $3; + } + + function ogg_page_serialno($0) { + $0 = HEAP32[$0 >> 2]; + return HEAPU8[$0 + 14 | 0] | HEAPU8[$0 + 15 | 0] << 8 | (HEAPU8[$0 + 16 | 0] << 16 | HEAPU8[$0 + 17 | 0] << 24); + } + + function ogg_stream_init($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + if ($0) { + memset($0 + 8 | 0, 352); + HEAP32[$0 + 24 >> 2] = 1024; + HEAP32[$0 + 4 >> 2] = 16384; + $3 = dlmalloc(16384); + HEAP32[$0 >> 2] = $3; + $2 = dlmalloc(4096); + HEAP32[$0 + 16 >> 2] = $2; + $4 = dlmalloc(8192); + HEAP32[$0 + 20 >> 2] = $4; + label$2 : { + if ($3) { + if ($2 ? $4 : 0) { + break label$2 + } + dlfree($3); + $2 = HEAP32[$0 + 16 >> 2]; + } + if ($2) { + dlfree($2) + } + $1 = HEAP32[$0 + 20 >> 2]; + if ($1) { + dlfree($1) + } + memset($0, 360); + return -1; + } + HEAP32[$0 + 336 >> 2] = $1; + $0 = 0; + } else { + $0 = -1 + } + return $0; + } + + function ogg_stream_clear($0) { + var $1 = 0; + if ($0) { + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + $1 = HEAP32[$0 + 16 >> 2]; + if ($1) { + dlfree($1) + } + $1 = HEAP32[$0 + 20 >> 2]; + if ($1) { + dlfree($1) + } + memset($0, 360); + } + } + + function ogg_page_checksum_set($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0; + if ($0) { + HEAP8[HEAP32[$0 >> 2] + 22 | 0] = 0; + HEAP8[HEAP32[$0 >> 2] + 23 | 0] = 0; + HEAP8[HEAP32[$0 >> 2] + 24 | 0] = 0; + HEAP8[HEAP32[$0 >> 2] + 25 | 0] = 0; + $3 = HEAP32[$0 + 4 >> 2]; + if (($3 | 0) >= 1) { + $4 = HEAP32[$0 >> 2]; + while (1) { + $1 = HEAP32[((HEAPU8[$2 + $4 | 0] ^ $1 >>> 24) << 2) + 6512 >> 2] ^ $1 << 8; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + } + $3 = HEAP32[$0 + 12 >> 2]; + if (($3 | 0) >= 1) { + $4 = HEAP32[$0 + 8 >> 2]; + $2 = 0; + while (1) { + $1 = HEAP32[((HEAPU8[$2 + $4 | 0] ^ $1 >>> 24) << 2) + 6512 >> 2] ^ $1 << 8; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + } + HEAP8[HEAP32[$0 >> 2] + 22 | 0] = $1; + HEAP8[HEAP32[$0 >> 2] + 23 | 0] = $1 >>> 8; + HEAP8[HEAP32[$0 >> 2] + 24 | 0] = $1 >>> 16; + HEAP8[HEAP32[$0 >> 2] + 25 | 0] = $1 >>> 24; + } + } + + function ogg_stream_iovecin($0, $1, $2, $3, $4) { + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0; + $6 = -1; + folding_inner0 : { + label$1 : { + if (!$0) { + break label$1 + } + $8 = HEAP32[$0 >> 2]; + if (!$8) { + break label$1 + } + if (!$1) { + return 0 + } + while (1) { + $7 = HEAP32[(($5 << 3) + $1 | 0) + 4 >> 2]; + if (($7 | 0) < 0 | ($9 | 0) > (2147483647 - $7 | 0)) { + break label$1 + } + $9 = $7 + $9 | 0; + $5 = $5 + 1 | 0; + if (($5 | 0) != 1) { + continue + } + break; + }; + $5 = HEAP32[$0 + 12 >> 2]; + if ($5) { + $7 = HEAP32[$0 + 8 >> 2] - $5 | 0; + HEAP32[$0 + 8 >> 2] = $7; + if ($7) { + memmove($8, $5 + $8 | 0, $7) + } + HEAP32[$0 + 12 >> 2] = 0; + } + $5 = HEAP32[$0 + 4 >> 2]; + if (($5 - $9 | 0) <= HEAP32[$0 + 8 >> 2]) { + if (($5 | 0) > (2147483647 - $9 | 0)) { + break folding_inner0 + } + $5 = $5 + $9 | 0; + $5 = ($5 | 0) < 2147482623 ? $5 + 1024 | 0 : $5; + $8 = dlrealloc(HEAP32[$0 >> 2], $5); + if (!$8) { + break folding_inner0 + } + HEAP32[$0 >> 2] = $8; + HEAP32[$0 + 4 >> 2] = $5; + } + $8 = ($9 | 0) / 255 | 0; + $11 = $8 + 1 | 0; + if (_os_lacing_expand($0, $11)) { + break label$1 + } + $6 = HEAP32[$0 + 8 >> 2]; + $5 = 0; + while (1) { + $7 = HEAP32[$0 >> 2] + $6 | 0; + $6 = ($5 << 3) + $1 | 0; + memcpy($7, HEAP32[$6 >> 2], HEAP32[$6 + 4 >> 2]); + $6 = HEAP32[$0 + 8 >> 2] + HEAP32[$6 + 4 >> 2] | 0; + HEAP32[$0 + 8 >> 2] = $6; + $5 = $5 + 1 | 0; + if (($5 | 0) != 1) { + continue + } + break; + }; + $7 = HEAP32[$0 + 16 >> 2]; + $12 = $7; + $1 = HEAP32[$0 + 28 >> 2]; + $13 = $1; + label$19 : { + if (($9 | 0) <= 254) { + $6 = HEAP32[$0 + 20 >> 2]; + $5 = 0; + break label$19; + } + $6 = HEAP32[$0 + 20 >> 2]; + $5 = 0; + while (1) { + $10 = $1 + $5 | 0; + HEAP32[$7 + ($10 << 2) >> 2] = 255; + $14 = HEAP32[$0 + 356 >> 2]; + $10 = ($10 << 3) + $6 | 0; + HEAP32[$10 >> 2] = HEAP32[$0 + 352 >> 2]; + HEAP32[$10 + 4 >> 2] = $14; + $5 = $5 + 1 | 0; + if (($8 | 0) != ($5 | 0)) { + continue + } + break; + }; + $5 = $8; + } + $5 = $13 + $5 | 0; + HEAP32[$12 + ($5 << 2) >> 2] = $9 - Math_imul($8, 255); + $5 = ($5 << 3) + $6 | 0; + HEAP32[$5 >> 2] = $3; + HEAP32[$5 + 4 >> 2] = $4; + HEAP32[$0 + 352 >> 2] = $3; + HEAP32[$0 + 356 >> 2] = $4; + $3 = $7 + ($1 << 2) | 0; + HEAP32[$3 >> 2] = HEAP32[$3 >> 2] | 256; + HEAP32[$0 + 28 >> 2] = $1 + $11; + $1 = HEAP32[$0 + 348 >> 2]; + $3 = HEAP32[$0 + 344 >> 2] + 1 | 0; + if ($3 >>> 0 < 1) { + $1 = $1 + 1 | 0 + } + HEAP32[$0 + 344 >> 2] = $3; + HEAP32[$0 + 348 >> 2] = $1; + $6 = 0; + if (!$2) { + break label$1 + } + HEAP32[$0 + 328 >> 2] = 1; + } + return $6; + } + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + $1 = HEAP32[$0 + 16 >> 2]; + if ($1) { + dlfree($1) + } + $1 = HEAP32[$0 + 20 >> 2]; + if ($1) { + dlfree($1) + } + memset($0, 360); + return -1; + } + + function _os_lacing_expand($0, $1) { + var $2 = 0; + folding_inner0 : { + $2 = HEAP32[$0 + 24 >> 2]; + if (($2 - $1 | 0) <= HEAP32[$0 + 28 >> 2]) { + if (($2 | 0) > (2147483647 - $1 | 0)) { + break folding_inner0 + } + $1 = $1 + $2 | 0; + $1 = ($1 | 0) < 2147483615 ? $1 + 32 | 0 : $1; + $2 = dlrealloc(HEAP32[$0 + 16 >> 2], $1 << 2); + if (!$2) { + break folding_inner0 + } + HEAP32[$0 + 16 >> 2] = $2; + $2 = dlrealloc(HEAP32[$0 + 20 >> 2], $1 << 3); + if (!$2) { + break folding_inner0 + } + HEAP32[$0 + 24 >> 2] = $1; + HEAP32[$0 + 20 >> 2] = $2; + } + return 0; + } + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + $1 = HEAP32[$0 + 16 >> 2]; + if ($1) { + dlfree($1) + } + $1 = HEAP32[$0 + 20 >> 2]; + if ($1) { + dlfree($1) + } + memset($0, 360); + return -1; + } + + function ogg_stream_packetin($0, $1) { + var $2 = 0; + $2 = global$0 - 16 | 0; + global$0 = $2; + HEAP32[$2 + 8 >> 2] = HEAP32[$1 >> 2]; + HEAP32[$2 + 12 >> 2] = HEAP32[$1 + 4 >> 2]; + $0 = ogg_stream_iovecin($0, $2 + 8 | 0, HEAP32[$1 + 12 >> 2], HEAP32[$1 + 16 >> 2], HEAP32[$1 + 20 >> 2]); + global$0 = $2 + 16 | 0; + return $0; + } + + function ogg_stream_flush_i($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0; + label$1 : { + if (!$0) { + break label$1 + } + $8 = HEAP32[$0 + 28 >> 2]; + $4 = ($8 | 0) < 255 ? $8 : 255; + if (!$4) { + break label$1 + } + $10 = HEAP32[$0 >> 2]; + if (!$10) { + break label$1 + } + label$2 : { + label$3 : { + label$4 : { + $11 = HEAP32[$0 + 332 >> 2]; + if ($11) { + if (($8 | 0) >= 1) { + break label$4 + } + $7 = -1; + $5 = -1; + break label$3; + } + $3 = ($4 | 0) > 0 ? $4 : 0; + while (1) { + if (($3 | 0) == ($6 | 0)) { + break label$3 + } + $9 = $6 << 2; + $4 = $6 + 1 | 0; + $6 = $4; + if (HEAPU8[$9 + HEAP32[$0 + 16 >> 2] | 0] == 255) { + continue + } + break; + }; + $3 = $4; + break label$3; + } + $4 = ($4 | 0) > 1 ? $4 : 1; + $7 = -1; + $5 = -1; + label$7 : { + while (1) { + if (!(($6 | 0) <= 4096 | ($9 | 0) <= 3)) { + $2 = 1; + break label$7; + } + $9 = 0; + $12 = HEAPU8[HEAP32[$0 + 16 >> 2] + ($3 << 2) | 0]; + if (($12 | 0) != 255) { + $13 = $13 + 1 | 0; + $9 = $13; + $5 = HEAP32[$0 + 20 >> 2] + ($3 << 3) | 0; + $7 = HEAP32[$5 >> 2]; + $5 = HEAP32[$5 + 4 >> 2]; + } + $6 = $6 + $12 | 0; + $3 = $3 + 1 | 0; + if (($4 | 0) != ($3 | 0)) { + continue + } + break; + }; + $3 = $4; + } + $4 = 255; + if (($3 | 0) == 255) { + break label$2 + } + } + $4 = $3; + if (!$2) { + break label$1 + } + } + HEAP32[$0 + 40 >> 2] = 1399285583; + HEAP16[$0 + 44 >> 1] = 0; + $2 = HEAP32[$0 + 16 >> 2]; + $3 = (HEAPU8[$2 + 1 | 0] ^ -1) & 1; + $3 = $11 ? $3 : $3 | 2; + HEAP8[$0 + 45 | 0] = $3; + if (!(!HEAP32[$0 + 328 >> 2] | ($4 | 0) != ($8 | 0))) { + HEAP8[$0 + 45 | 0] = $3 | 4 + } + HEAP32[$0 + 332 >> 2] = 1; + HEAP8[$0 + 53 | 0] = $5 >>> 24; + HEAP8[$0 + 52 | 0] = $5 >>> 16; + HEAP8[$0 + 51 | 0] = $5 >>> 8; + HEAP8[$0 + 50 | 0] = $5; + HEAP8[$0 + 49 | 0] = ($5 & 16777215) << 8 | $7 >>> 24; + HEAP8[$0 + 48 | 0] = ($5 & 65535) << 16 | $7 >>> 16; + HEAP8[$0 + 47 | 0] = ($5 & 255) << 24 | $7 >>> 8; + HEAP8[$0 + 46 | 0] = $7; + $3 = HEAP32[$0 + 336 >> 2]; + HEAP8[$0 + 54 | 0] = $3; + HEAP8[$0 + 55 | 0] = $3 >>> 8; + HEAP8[$0 + 56 | 0] = $3 >>> 16; + HEAP8[$0 + 57 | 0] = $3 >>> 24; + $3 = HEAP32[$0 + 340 >> 2]; + if (($3 | 0) == -1) { + HEAP32[$0 + 340 >> 2] = 0; + $3 = 0; + } + HEAP8[$0 + 66 | 0] = $4; + $6 = 0; + HEAP16[$0 + 62 >> 1] = 0; + HEAP16[$0 + 64 >> 1] = 0; + HEAP8[$0 + 61 | 0] = $3 >>> 24; + HEAP8[$0 + 60 | 0] = $3 >>> 16; + HEAP8[$0 + 59 | 0] = $3 >>> 8; + HEAP8[$0 + 58 | 0] = $3; + $14 = 1; + HEAP32[$0 + 340 >> 2] = $3 + 1; + if (($4 | 0) >= 1) { + $3 = 0; + while (1) { + $5 = HEAP32[$2 + ($3 << 2) >> 2]; + HEAP8[($0 + $3 | 0) + 67 | 0] = $5; + $6 = ($5 & 255) + $6 | 0; + $3 = $3 + 1 | 0; + if (($4 | 0) != ($3 | 0)) { + continue + } + break; + }; + } + HEAP32[$1 >> 2] = $0 + 40; + $3 = $4 + 27 | 0; + HEAP32[$0 + 324 >> 2] = $3; + HEAP32[$1 + 4 >> 2] = $3; + $3 = HEAP32[$0 + 12 >> 2]; + HEAP32[$1 + 12 >> 2] = $6; + HEAP32[$1 + 8 >> 2] = $3 + $10; + $3 = $8 - $4 | 0; + HEAP32[$0 + 28 >> 2] = $3; + memmove($2, $2 + ($4 << 2) | 0, $3 << 2); + $2 = HEAP32[$0 + 20 >> 2]; + memmove($2, $2 + ($4 << 3) | 0, HEAP32[$0 + 28 >> 2] << 3); + HEAP32[$0 + 12 >> 2] = HEAP32[$0 + 12 >> 2] + $6; + if (!$1) { + break label$1 + } + $0 = 0; + HEAP8[HEAP32[$1 >> 2] + 22 | 0] = 0; + HEAP8[HEAP32[$1 >> 2] + 23 | 0] = 0; + HEAP8[HEAP32[$1 >> 2] + 24 | 0] = 0; + HEAP8[HEAP32[$1 >> 2] + 25 | 0] = 0; + $2 = HEAP32[$1 + 4 >> 2]; + if (($2 | 0) >= 1) { + $4 = HEAP32[$1 >> 2]; + $3 = 0; + while (1) { + $0 = HEAP32[((HEAPU8[$3 + $4 | 0] ^ $0 >>> 24) << 2) + 6512 >> 2] ^ $0 << 8; + $3 = $3 + 1 | 0; + if (($2 | 0) != ($3 | 0)) { + continue + } + break; + }; + } + $2 = HEAP32[$1 + 12 >> 2]; + if (($2 | 0) >= 1) { + $4 = HEAP32[$1 + 8 >> 2]; + $3 = 0; + while (1) { + $0 = HEAP32[((HEAPU8[$3 + $4 | 0] ^ $0 >>> 24) << 2) + 6512 >> 2] ^ $0 << 8; + $3 = $3 + 1 | 0; + if (($2 | 0) != ($3 | 0)) { + continue + } + break; + }; + } + HEAP8[HEAP32[$1 >> 2] + 22 | 0] = $0; + HEAP8[HEAP32[$1 >> 2] + 23 | 0] = $0 >>> 8; + HEAP8[HEAP32[$1 >> 2] + 24 | 0] = $0 >>> 16; + HEAP8[HEAP32[$1 >> 2] + 25 | 0] = $0 >>> 24; + } + return $14; + } + + function ogg_stream_pageout($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + if (!(!$0 | !HEAP32[$0 >> 2])) { + $2 = HEAP32[$0 + 28 >> 2]; + $4 = $0; + label$2 : { + label$3 : { + if (HEAP32[$0 + 328 >> 2]) { + if ($2) { + break label$3 + } + $3 = 0; + break label$2; + } + $3 = 0; + if (HEAP32[$0 + 332 >> 2] | !$2) { + break label$2 + } + } + $3 = 1; + } + $2 = ogg_stream_flush_i($4, $1, $3); + } + return $2; + } + + function ogg_sync_init($0) { + if ($0) { + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + } + return 0; + } + + function ogg_sync_clear($0) { + var $1 = 0; + if ($0) { + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + } + } + + function ogg_sync_buffer($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + $2 = HEAP32[$0 + 4 >> 2]; + if (($2 | 0) >= 0) { + $4 = HEAP32[$0 + 12 >> 2]; + if ($4) { + $3 = HEAP32[$0 + 8 >> 2] - $4 | 0; + HEAP32[$0 + 8 >> 2] = $3; + if (($3 | 0) >= 1) { + $2 = HEAP32[$0 >> 2]; + memmove($2, $2 + $4 | 0, $3); + $2 = HEAP32[$0 + 4 >> 2]; + } + HEAP32[$0 + 12 >> 2] = 0; + } + $3 = $2; + $2 = HEAP32[$0 + 8 >> 2]; + label$4 : { + if (($3 - $2 | 0) >= ($1 | 0)) { + $1 = HEAP32[$0 >> 2]; + break label$4; + } + $2 = ($1 + $2 | 0) + 4096 | 0; + $1 = HEAP32[$0 >> 2]; + label$6 : { + if ($1) { + $1 = dlrealloc($1, $2); + break label$6; + } + $1 = dlmalloc($2); + } + if (!$1) { + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + return 0; + } + HEAP32[$0 + 4 >> 2] = $2; + HEAP32[$0 >> 2] = $1; + $2 = HEAP32[$0 + 8 >> 2]; + } + $0 = $1 + $2 | 0; + } else { + $0 = 0 + } + return $0; + } + + function ogg_sync_wrote($0, $1) { + var $2 = 0, $3 = 0; + $2 = -1; + $3 = HEAP32[$0 + 4 >> 2]; + label$1 : { + if (($3 | 0) < 0) { + break label$1 + } + $1 = HEAP32[$0 + 8 >> 2] + $1 | 0; + if (($1 | 0) > ($3 | 0)) { + break label$1 + } + HEAP32[$0 + 8 >> 2] = $1; + $2 = 0; + } + return $2; + } + + function ogg_sync_pageseek($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0; + $9 = global$0 - 16 | 0; + global$0 = $9; + label$1 : { + if (HEAP32[$0 + 4 >> 2] < 0) { + break label$1 + } + $4 = HEAP32[$0 + 12 >> 2]; + $10 = HEAP32[$0 + 8 >> 2] - $4 | 0; + $2 = $4 + HEAP32[$0 >> 2] | 0; + label$2 : { + label$3 : { + label$4 : { + $5 = HEAP32[$0 + 20 >> 2]; + label$5 : { + if (!$5) { + if (($10 | 0) < 27) { + break label$1 + } + if ((HEAPU8[$2 | 0] | HEAPU8[$2 + 1 | 0] << 8 | (HEAPU8[$2 + 2 | 0] << 16 | HEAPU8[$2 + 3 | 0] << 24)) != 1399285583) { + break label$5 + } + $4 = HEAPU8[$2 + 26 | 0]; + $5 = $4 + 27 | 0; + if (($10 | 0) < ($5 | 0)) { + break label$1 + } + if ($4) { + $4 = HEAP32[$0 + 24 >> 2]; + while (1) { + $4 = HEAPU8[($2 + $6 | 0) + 27 | 0] + $4 | 0; + HEAP32[$0 + 24 >> 2] = $4; + $6 = $6 + 1 | 0; + if ($6 >>> 0 < HEAPU8[$2 + 26 | 0]) { + continue + } + break; + }; + } + HEAP32[$0 + 20 >> 2] = $5; + } + if ((HEAP32[$0 + 24 >> 2] + $5 | 0) > ($10 | 0)) { + break label$1 + } + $7 = HEAPU8[$2 + 22 | 0] | HEAPU8[$2 + 23 | 0] << 8 | (HEAPU8[$2 + 24 | 0] << 16 | HEAPU8[$2 + 25 | 0] << 24); + HEAP32[$9 + 12 >> 2] = $7; + $6 = 0; + HEAP8[$2 + 22 | 0] = 0; + HEAP8[$2 + 23 | 0] = 0; + HEAP8[$2 + 24 | 0] = 0; + HEAP8[$2 + 25 | 0] = 0; + $11 = HEAP32[$0 + 24 >> 2]; + $8 = HEAP32[$0 + 20 >> 2]; + HEAP8[$2 + 22 | 0] = 0; + HEAP8[$2 + 23 | 0] = 0; + HEAP8[$2 + 24 | 0] = 0; + HEAP8[$2 + 25 | 0] = 0; + if (($8 | 0) > 0) { + $5 = 0; + while (1) { + $3 = HEAP32[((HEAPU8[$2 + $5 | 0] ^ $3 >>> 24) << 2) + 6512 >> 2] ^ $3 << 8; + $5 = $5 + 1 | 0; + if (($8 | 0) != ($5 | 0)) { + continue + } + break; + }; + } + $4 = $2 + 22 | 0; + if (($11 | 0) > 0) { + $8 = $2 + $8 | 0; + while (1) { + $3 = HEAP32[((HEAPU8[$6 + $8 | 0] ^ $3 >>> 24) << 2) + 6512 >> 2] ^ $3 << 8; + $6 = $6 + 1 | 0; + if (($11 | 0) != ($6 | 0)) { + continue + } + break; + }; + } + HEAP8[$2 + 22 | 0] = $3; + HEAP8[$2 + 23 | 0] = $3 >>> 8; + HEAP8[$2 + 24 | 0] = $3 >>> 16; + HEAP8[$2 + 25 | 0] = $3 >>> 24; + if (HEAP32[$9 + 12 >> 2] == (HEAPU8[$4 | 0] | HEAPU8[$4 + 1 | 0] << 8 | (HEAPU8[$4 + 2 | 0] << 16 | HEAPU8[$4 + 3 | 0] << 24))) { + break label$4 + } + HEAP8[$4 | 0] = $7; + HEAP8[$4 + 1 | 0] = $7 >>> 8; + HEAP8[$4 + 2 | 0] = $7 >>> 16; + HEAP8[$4 + 3 | 0] = $7 >>> 24; + } + HEAP32[$0 + 20 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = 0; + $3 = memchr($2 + 1 | 0, $10 + -1 | 0); + if (!$3) { + break label$3 + } + $6 = HEAP32[$0 >> 2]; + break label$2; + } + $7 = HEAP32[$0 + 12 >> 2]; + label$13 : { + if (!$1) { + $5 = HEAP32[$0 + 24 >> 2]; + $3 = HEAP32[$0 + 20 >> 2]; + break label$13; + } + $4 = $7 + HEAP32[$0 >> 2] | 0; + HEAP32[$1 >> 2] = $4; + $3 = HEAP32[$0 + 20 >> 2]; + HEAP32[$1 + 4 >> 2] = $3; + HEAP32[$1 + 8 >> 2] = $3 + $4; + $5 = HEAP32[$0 + 24 >> 2]; + HEAP32[$1 + 12 >> 2] = $5; + } + HEAP32[$0 + 24 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + $3 = $3 + $5 | 0; + HEAP32[$0 + 12 >> 2] = $7 + $3; + break label$1; + } + $6 = HEAP32[$0 >> 2]; + $3 = $6 + HEAP32[$0 + 8 >> 2] | 0; + } + HEAP32[$0 + 12 >> 2] = $3 - $6; + $3 = $2 - $3 | 0; + } + global$0 = $9 + 16 | 0; + return $3; + } + + function ogg_sync_pageout($0, $1) { + var $2 = 0; + if (HEAP32[$0 + 4 >> 2] >= 0) { + while (1) { + $2 = ogg_sync_pageseek($0, $1); + if (($2 | 0) > 0) { + return 1 + } + if (!$2) { + return 0 + } + if (HEAP32[$0 + 16 >> 2]) { + continue + } + break; + }; + HEAP32[$0 + 16 >> 2] = 1; + $0 = -1; + } else { + $0 = 0 + } + return $0; + } + + function ogg_stream_pagein($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0; + $4 = -1; + folding_inner0 : { + label$1 : { + if (!$0) { + break label$1 + } + $6 = HEAP32[$0 >> 2]; + if (!$6) { + break label$1 + } + $3 = HEAP32[$1 >> 2]; + $10 = HEAPU8[$3 + 5 | 0]; + $5 = HEAP32[$1 + 12 >> 2]; + $11 = HEAP32[$1 + 8 >> 2]; + $8 = HEAPU8[$3 + 26 | 0]; + $13 = HEAPU8[$3 + 18 | 0] | HEAPU8[$3 + 19 | 0] << 8 | (HEAPU8[$3 + 20 | 0] << 16 | HEAPU8[$3 + 21 | 0] << 24); + $9 = HEAPU8[$3 + 14 | 0] | HEAPU8[$3 + 15 | 0] << 8 | (HEAPU8[$3 + 16 | 0] << 16 | HEAPU8[$3 + 17 | 0] << 24); + $14 = HEAPU8[$3 + 6 | 0] | HEAPU8[$3 + 7 | 0] << 8 | (HEAPU8[$3 + 8 | 0] << 16 | HEAPU8[$3 + 9 | 0] << 24); + $15 = HEAPU8[$3 + 10 | 0] | HEAPU8[$3 + 11 | 0] << 8 | (HEAPU8[$3 + 12 | 0] << 16 | HEAPU8[$3 + 13 | 0] << 24); + $12 = HEAPU8[$3 + 4 | 0]; + $2 = HEAP32[$0 + 36 >> 2]; + $1 = HEAP32[$0 + 12 >> 2]; + if ($1) { + $7 = HEAP32[$0 + 8 >> 2] - $1 | 0; + HEAP32[$0 + 8 >> 2] = $7; + if ($7) { + memmove($6, $1 + $6 | 0, $7) + } + HEAP32[$0 + 12 >> 2] = 0; + } + if ($2) { + $1 = $0; + $6 = HEAP32[$0 + 28 >> 2] - $2 | 0; + if ($6) { + $7 = HEAP32[$0 + 16 >> 2]; + memmove($7, $7 + ($2 << 2) | 0, $6 << 2); + $6 = HEAP32[$0 + 20 >> 2]; + memmove($6, $6 + ($2 << 3) | 0, HEAP32[$0 + 28 >> 2] - $2 << 3); + $7 = HEAP32[$0 + 28 >> 2] - $2 | 0; + } else { + $7 = 0 + } + HEAP32[$1 + 28 >> 2] = $7; + HEAP32[$0 + 36 >> 2] = 0; + HEAP32[$0 + 32 >> 2] = HEAP32[$0 + 32 >> 2] - $2; + } + if (($9 | 0) != HEAP32[$0 + 336 >> 2] | $12) { + break label$1 + } + if (_os_lacing_expand($0, $8 + 1 | 0)) { + break label$1 + } + $7 = $10 & 1; + $6 = HEAP32[$0 + 340 >> 2]; + label$7 : { + if (($6 | 0) == ($13 | 0)) { + break label$7 + } + $2 = HEAP32[$0 + 32 >> 2]; + $9 = HEAP32[$0 + 28 >> 2]; + if (($2 | 0) < ($9 | 0)) { + $4 = HEAP32[$0 + 8 >> 2]; + $12 = HEAP32[$0 + 16 >> 2]; + $1 = $2; + while (1) { + $4 = $4 - HEAPU8[$12 + ($1 << 2) | 0] | 0; + $1 = $1 + 1 | 0; + if (($1 | 0) < ($9 | 0)) { + continue + } + break; + }; + HEAP32[$0 + 8 >> 2] = $4; + } + HEAP32[$0 + 28 >> 2] = $2; + if (($6 | 0) == -1) { + break label$7 + } + $1 = $2 + 1 | 0; + HEAP32[$0 + 28 >> 2] = $1; + HEAP32[HEAP32[$0 + 16 >> 2] + ($2 << 2) >> 2] = 1024; + HEAP32[$0 + 32 >> 2] = $1; + } + $6 = $10 & 2; + $4 = 0; + label$10 : { + if (!$7) { + break label$10 + } + $1 = HEAP32[$0 + 28 >> 2]; + if (HEAP32[(HEAP32[$0 + 16 >> 2] + ($1 << 2) | 0) + -4 >> 2] != 1024 ? ($1 | 0) >= 1 : 0) { + break label$10 + } + $6 = 0; + if (!$8) { + break label$10 + } + $1 = 0; + while (1) { + $4 = $1 + 1 | 0; + $1 = HEAPU8[($1 + $3 | 0) + 27 | 0]; + $5 = $5 - $1 | 0; + $11 = $1 + $11 | 0; + if (($1 | 0) != 255) { + break label$10 + } + $1 = $4; + if (($8 | 0) != ($1 | 0)) { + continue + } + break; + }; + $4 = $8; + } + if ($5) { + $2 = HEAP32[$0 + 4 >> 2]; + $1 = HEAP32[$0 + 8 >> 2]; + label$15 : { + if (($2 - $5 | 0) > ($1 | 0)) { + $2 = HEAP32[$0 >> 2]; + break label$15; + } + if (($2 | 0) > (2147483647 - $5 | 0)) { + break folding_inner0 + } + $1 = $2 + $5 | 0; + $1 = ($1 | 0) < 2147482623 ? $1 + 1024 | 0 : $1; + $2 = dlrealloc(HEAP32[$0 >> 2], $1); + if (!$2) { + break folding_inner0 + } + HEAP32[$0 >> 2] = $2; + HEAP32[$0 + 4 >> 2] = $1; + $1 = HEAP32[$0 + 8 >> 2]; + } + memcpy($1 + $2 | 0, $11, $5); + HEAP32[$0 + 8 >> 2] = HEAP32[$0 + 8 >> 2] + $5; + } + $11 = $10 & 4; + label$25 : { + if (($4 | 0) >= ($8 | 0)) { + break label$25 + } + $10 = HEAP32[$0 + 20 >> 2]; + $7 = HEAP32[$0 + 16 >> 2]; + $2 = HEAP32[$0 + 28 >> 2]; + $1 = $7 + ($2 << 2) | 0; + $5 = HEAPU8[($3 + $4 | 0) + 27 | 0]; + HEAP32[$1 >> 2] = $5; + $9 = $10 + ($2 << 3) | 0; + HEAP32[$9 >> 2] = -1; + HEAP32[$9 + 4 >> 2] = -1; + if ($6) { + HEAP32[$1 >> 2] = $5 | 256 + } + $1 = $2 + 1 | 0; + HEAP32[$0 + 28 >> 2] = $1; + $4 = $4 + 1 | 0; + label$27 : { + if (($5 | 0) == 255) { + $2 = -1; + break label$27; + } + HEAP32[$0 + 32 >> 2] = $1; + } + if (($4 | 0) != ($8 | 0)) { + while (1) { + $6 = HEAPU8[($3 + $4 | 0) + 27 | 0]; + HEAP32[$7 + ($1 << 2) >> 2] = $6; + $5 = $10 + ($1 << 3) | 0; + HEAP32[$5 >> 2] = -1; + HEAP32[$5 + 4 >> 2] = -1; + $5 = $1 + 1 | 0; + HEAP32[$0 + 28 >> 2] = $5; + $4 = $4 + 1 | 0; + if (($6 | 0) != 255) { + HEAP32[$0 + 32 >> 2] = $5; + $2 = $1; + } + $1 = $5; + if (($4 | 0) != ($8 | 0)) { + continue + } + break; + } + } + if (($2 | 0) == -1) { + break label$25 + } + $1 = HEAP32[$0 + 20 >> 2] + ($2 << 3) | 0; + HEAP32[$1 >> 2] = $14; + HEAP32[$1 + 4 >> 2] = $15; + } + label$32 : { + if (!$11) { + break label$32 + } + HEAP32[$0 + 328 >> 2] = 1; + $1 = HEAP32[$0 + 28 >> 2]; + if (($1 | 0) < 1) { + break label$32 + } + $1 = (HEAP32[$0 + 16 >> 2] + ($1 << 2) | 0) + -4 | 0; + HEAP32[$1 >> 2] = HEAP32[$1 >> 2] | 512; + } + HEAP32[$0 + 340 >> 2] = $13 + 1; + $4 = 0; + } + return $4; + } + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + $1 = HEAP32[$0 + 16 >> 2]; + if ($1) { + dlfree($1) + } + $1 = HEAP32[$0 + 20 >> 2]; + if ($1) { + dlfree($1) + } + memset($0, 360); + return -1; + } + + function ogg_sync_reset($0) { + if (HEAP32[$0 + 4 >> 2] < 0) { + return + } + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + } + + function ogg_stream_reset($0) { + if (!$0 | !HEAP32[$0 >> 2]) { + $0 = -1 + } else { + HEAP32[$0 + 344 >> 2] = 0; + HEAP32[$0 + 348 >> 2] = 0; + HEAP32[$0 + 340 >> 2] = -1; + HEAP32[$0 + 332 >> 2] = 0; + HEAP32[$0 + 324 >> 2] = 0; + HEAP32[$0 + 328 >> 2] = 0; + HEAP32[$0 + 36 >> 2] = 0; + HEAP32[$0 + 28 >> 2] = 0; + HEAP32[$0 + 32 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + HEAP32[$0 + 352 >> 2] = 0; + HEAP32[$0 + 356 >> 2] = 0; + $0 = 0; + } + } + + function ogg_stream_packetout($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + label$1 : { + if (!$0) { + break label$1 + } + $8 = HEAP32[$0 >> 2]; + if (!$8) { + break label$1 + } + $5 = HEAP32[$0 + 36 >> 2]; + if (HEAP32[$0 + 32 >> 2] <= ($5 | 0)) { + break label$1 + } + $3 = HEAP32[$0 + 16 >> 2]; + $6 = HEAP32[$3 + ($5 << 2) >> 2]; + if ($6 & 1024) { + HEAP32[$0 + 36 >> 2] = $5 + 1; + $1 = $0; + $3 = $0; + $2 = HEAP32[$0 + 348 >> 2]; + $0 = HEAP32[$0 + 344 >> 2] + 1 | 0; + if ($0 >>> 0 < 1) { + $2 = $2 + 1 | 0 + } + HEAP32[$3 + 344 >> 2] = $0; + HEAP32[$1 + 348 >> 2] = $2; + return -1; + } + $4 = $6 & 512; + $7 = 255; + $2 = $6 & 255; + label$3 : { + if (($2 | 0) != 255) { + $7 = $2; + break label$3; + } + while (1) { + $5 = $5 + 1 | 0; + $2 = HEAP32[($5 << 2) + $3 >> 2]; + $4 = $2 & 512 ? 512 : $4; + $2 = $2 & 255; + $7 = $2 + $7 | 0; + if (($2 | 0) == 255) { + continue + } + break; + }; + } + label$6 : { + if (!$1) { + $4 = HEAP32[$0 + 344 >> 2]; + $2 = HEAP32[$0 + 348 >> 2]; + $6 = HEAP32[$0 + 12 >> 2]; + break label$6; + } + HEAP32[$1 + 8 >> 2] = $6 & 256; + HEAP32[$1 + 12 >> 2] = $4; + $6 = HEAP32[$0 + 12 >> 2]; + HEAP32[$1 >> 2] = $8 + $6; + $3 = HEAP32[$0 + 348 >> 2]; + $2 = $3; + $4 = HEAP32[$0 + 344 >> 2]; + HEAP32[$1 + 24 >> 2] = $4; + HEAP32[$1 + 28 >> 2] = $2; + $3 = HEAP32[$0 + 20 >> 2] + ($5 << 3) | 0; + $8 = HEAP32[$3 + 4 >> 2]; + $3 = HEAP32[$3 >> 2]; + HEAP32[$1 + 4 >> 2] = $7; + HEAP32[$1 + 16 >> 2] = $3; + HEAP32[$1 + 20 >> 2] = $8; + } + $3 = $4 + 1 | 0; + if ($3 >>> 0 < 1) { + $2 = $2 + 1 | 0 + } + HEAP32[$0 + 344 >> 2] = $3; + HEAP32[$0 + 348 >> 2] = $2; + $4 = 1; + HEAP32[$0 + 36 >> 2] = $5 + 1; + HEAP32[$0 + 12 >> 2] = $6 + $7; + } + return $4; + } + + function FLAC__ogg_decoder_aspect_init($0) { + var $1 = 0; + label$1 : { + if (ogg_stream_init($0 + 8 | 0, HEAP32[$0 + 4 >> 2])) { + break label$1 + } + if (ogg_sync_init($0 + 368 | 0)) { + break label$1 + } + HEAP32[$0 + 396 >> 2] = -1; + HEAP32[$0 + 400 >> 2] = -1; + HEAP32[$0 + 408 >> 2] = 0; + HEAP32[$0 + 412 >> 2] = 0; + HEAP32[$0 + 404 >> 2] = HEAP32[$0 >> 2]; + $1 = 1; + } + return $1; + } + + function FLAC__ogg_decoder_aspect_set_defaults($0) { + HEAP32[$0 >> 2] = 1; + } + + function FLAC__ogg_decoder_aspect_reset($0) { + ogg_stream_reset($0 + 8 | 0); + ogg_sync_reset($0 + 368 | 0); + HEAP32[$0 + 408 >> 2] = 0; + HEAP32[$0 + 412 >> 2] = 0; + if (HEAP32[$0 >> 2]) { + HEAP32[$0 + 404 >> 2] = 1 + } + } + + function FLAC__ogg_decoder_aspect_read_callback_wrapper($0, $1, $2, $3, $4) { + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; + $8 = global$0 - 16 | 0; + global$0 = $8; + $9 = HEAP32[$2 >> 2]; + HEAP32[$2 >> 2] = 0; + label$1 : { + label$2 : { + label$3 : { + if (!$9) { + break label$3 + } + $10 = $0 + 416 | 0; + $11 = $0 + 368 | 0; + $13 = $0 + 440 | 0; + $14 = $0 + 8 | 0; + $15 = HEAP32[2721]; + $16 = HEAPU8[7536]; + while (1) { + if (HEAP32[$0 + 408 >> 2]) { + break label$3 + } + label$5 : { + label$6 : { + if (HEAP32[$0 + 412 >> 2]) { + if (HEAP32[$0 + 432 >> 2]) { + $7 = HEAP32[$0 + 440 >> 2]; + $6 = HEAP32[$0 + 444 >> 2]; + $5 = $9 - $5 | 0; + if ($6 >>> 0 > $5 >>> 0) { + break label$6 + } + $1 = memcpy($1, $7, $6); + HEAP32[$2 >> 2] = $6 + HEAP32[$2 >> 2]; + HEAP32[$0 + 432 >> 2] = 0; + $1 = $1 + $6 | 0; + break label$5; + } + $5 = ogg_stream_packetout($14, $13); + if (($5 | 0) >= 1) { + HEAP32[$0 + 432 >> 2] = 1; + $12 = HEAP32[$0 + 444 >> 2]; + if (($12 | 0) < 1) { + break label$5 + } + $6 = HEAP32[$13 >> 2]; + if (HEAPU8[$6 | 0] != ($16 | 0)) { + break label$5 + } + $7 = 3; + if (($12 | 0) < 9) { + break label$1 + } + $5 = $15; + if ((HEAPU8[$6 + 1 | 0] | HEAPU8[$6 + 2 | 0] << 8 | (HEAPU8[$6 + 3 | 0] << 16 | HEAPU8[$6 + 4 | 0] << 24)) != (HEAPU8[$5 | 0] | HEAPU8[$5 + 1 | 0] << 8 | (HEAPU8[$5 + 2 | 0] << 16 | HEAPU8[$5 + 3 | 0] << 24))) { + break label$1 + } + $5 = HEAPU8[$6 + 5 | 0]; + HEAP32[$0 + 396 >> 2] = $5; + HEAP32[$0 + 400 >> 2] = HEAPU8[$6 + 6 | 0]; + if (($5 | 0) != 1) { + $7 = 4; + break label$1; + } + HEAP32[$0 + 444 >> 2] = $12 + -9; + HEAP32[$0 + 440 >> 2] = $6 + 9; + break label$5; + } + if ($5) { + $7 = 2; + break label$1; + } + HEAP32[$0 + 412 >> 2] = 0; + break label$5; + } + $5 = ogg_sync_pageout($11, $10); + if (($5 | 0) >= 1) { + if (HEAP32[$0 + 404 >> 2]) { + $5 = ogg_page_serialno($10); + HEAP32[$0 + 404 >> 2] = 0; + HEAP32[$0 + 344 >> 2] = $5; + HEAP32[$0 + 4 >> 2] = $5; + } + if (ogg_stream_pagein($14, $10)) { + break label$5 + } + HEAP32[$0 + 432 >> 2] = 0; + HEAP32[$0 + 412 >> 2] = 1; + break label$5; + } + if ($5) { + $7 = 2; + break label$1; + } + $5 = $9 - HEAP32[$2 >> 2] | 0; + $5 = $5 >>> 0 > 8192 ? $5 : 8192; + $6 = ogg_sync_buffer($11, $5); + if (!$6) { + $7 = 7; + break label$1; + } + HEAP32[$8 + 12 >> 2] = $5; + label$16 : { + switch ((FUNCTION_TABLE[8]($3, $6, $8 + 12 | 0, $4) | 0) + -1 | 0) { + case 0: + HEAP32[$0 + 408 >> 2] = 1; + break; + case 4: + break label$2; + default: + break label$16; + }; + } + if ((ogg_sync_wrote($11, HEAP32[$8 + 12 >> 2]) | 0) >= 0) { + break label$5 + } + $7 = 6; + break label$1; + } + $1 = memcpy($1, $7, $5); + HEAP32[$2 >> 2] = $5 + HEAP32[$2 >> 2]; + HEAP32[$0 + 440 >> 2] = $5 + HEAP32[$0 + 440 >> 2]; + HEAP32[$0 + 444 >> 2] = HEAP32[$0 + 444 >> 2] - $5; + $1 = $1 + $5 | 0; + } + $5 = HEAP32[$2 >> 2]; + if ($9 >>> 0 > $5 >>> 0) { + continue + } + break; + }; + } + global$0 = $8 + 16 | 0; + return !$5 & HEAP32[$0 + 408 >> 2] != 0; + } + $7 = 5; + } + global$0 = $8 + 16 | 0; + return $7; + } + + function FLAC__MD5Init($0) { + HEAP32[$0 + 80 >> 2] = 0; + HEAP32[$0 + 84 >> 2] = 0; + HEAP32[$0 + 64 >> 2] = 1732584193; + HEAP32[$0 + 68 >> 2] = -271733879; + HEAP32[$0 + 72 >> 2] = -1732584194; + HEAP32[$0 + 76 >> 2] = 271733878; + HEAP32[$0 + 88 >> 2] = 0; + HEAP32[$0 + 92 >> 2] = 0; + } + + function FLAC__MD5Final($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + $3 = HEAP32[$1 + 80 >> 2] & 63; + $2 = $3 + $1 | 0; + HEAP8[$2 | 0] = 128; + $2 = $2 + 1 | 0; + $4 = 56; + label$1 : { + if ($3 >>> 0 < 56) { + $4 = 55 - $3 | 0; + break label$1; + } + memset($2, $3 ^ 63); + FLAC__MD5Transform($1 - -64 | 0, $1); + $2 = $1; + } + memset($2, $4); + $2 = HEAP32[$1 + 80 >> 2]; + HEAP32[$1 + 56 >> 2] = $2 << 3; + HEAP32[$1 + 60 >> 2] = HEAP32[$1 + 84 >> 2] << 3 | $2 >>> 29; + FLAC__MD5Transform($1 - -64 | 0, $1); + $2 = HEAPU8[$1 + 76 | 0] | HEAPU8[$1 + 77 | 0] << 8 | (HEAPU8[$1 + 78 | 0] << 16 | HEAPU8[$1 + 79 | 0] << 24); + $3 = HEAPU8[$1 + 72 | 0] | HEAPU8[$1 + 73 | 0] << 8 | (HEAPU8[$1 + 74 | 0] << 16 | HEAPU8[$1 + 75 | 0] << 24); + HEAP8[$0 + 8 | 0] = $3; + HEAP8[$0 + 9 | 0] = $3 >>> 8; + HEAP8[$0 + 10 | 0] = $3 >>> 16; + HEAP8[$0 + 11 | 0] = $3 >>> 24; + HEAP8[$0 + 12 | 0] = $2; + HEAP8[$0 + 13 | 0] = $2 >>> 8; + HEAP8[$0 + 14 | 0] = $2 >>> 16; + HEAP8[$0 + 15 | 0] = $2 >>> 24; + $2 = HEAPU8[$1 + 68 | 0] | HEAPU8[$1 + 69 | 0] << 8 | (HEAPU8[$1 + 70 | 0] << 16 | HEAPU8[$1 + 71 | 0] << 24); + $3 = HEAPU8[$1 + 64 | 0] | HEAPU8[$1 + 65 | 0] << 8 | (HEAPU8[$1 + 66 | 0] << 16 | HEAPU8[$1 + 67 | 0] << 24); + HEAP8[$0 | 0] = $3; + HEAP8[$0 + 1 | 0] = $3 >>> 8; + HEAP8[$0 + 2 | 0] = $3 >>> 16; + HEAP8[$0 + 3 | 0] = $3 >>> 24; + HEAP8[$0 + 4 | 0] = $2; + HEAP8[$0 + 5 | 0] = $2 >>> 8; + HEAP8[$0 + 6 | 0] = $2 >>> 16; + HEAP8[$0 + 7 | 0] = $2 >>> 24; + $0 = HEAP32[$1 + 88 >> 2]; + if ($0) { + dlfree($0); + HEAP32[$1 + 88 >> 2] = 0; + HEAP32[$1 + 92 >> 2] = 0; + } + memset($1, 96); + } + + function FLAC__MD5Transform($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $11 = HEAP32[$1 + 16 >> 2]; + $8 = HEAP32[$1 + 32 >> 2]; + $12 = HEAP32[$1 + 48 >> 2]; + $13 = HEAP32[$1 + 36 >> 2]; + $14 = HEAP32[$1 + 52 >> 2]; + $15 = HEAP32[$1 + 4 >> 2]; + $6 = HEAP32[$1 + 20 >> 2]; + $7 = HEAP32[$0 + 4 >> 2]; + $9 = HEAP32[$1 >> 2]; + $25 = HEAP32[$0 >> 2]; + $16 = HEAP32[$0 + 12 >> 2]; + $10 = HEAP32[$0 + 8 >> 2]; + $3 = $7 + __wasm_rotl_i32((($9 + $25 | 0) + ($16 ^ ($16 ^ $10) & $7) | 0) + -680876936 | 0, 7) | 0; + $17 = HEAP32[$1 + 12 >> 2]; + $18 = HEAP32[$1 + 8 >> 2]; + $4 = __wasm_rotl_i32((($15 + $16 | 0) + ($3 & ($7 ^ $10) ^ $10) | 0) + -389564586 | 0, 12) + $3 | 0; + $2 = __wasm_rotl_i32((($18 + $10 | 0) + ($4 & ($3 ^ $7) ^ $7) | 0) + 606105819 | 0, 17) + $4 | 0; + $5 = __wasm_rotl_i32((($7 + $17 | 0) + ($3 ^ $2 & ($3 ^ $4)) | 0) + -1044525330 | 0, 22) + $2 | 0; + $3 = __wasm_rotl_i32((($3 + $11 | 0) + ($4 ^ $5 & ($2 ^ $4)) | 0) + -176418897 | 0, 7) + $5 | 0; + $19 = HEAP32[$1 + 28 >> 2]; + $20 = HEAP32[$1 + 24 >> 2]; + $4 = __wasm_rotl_i32((($4 + $6 | 0) + ($2 ^ $3 & ($2 ^ $5)) | 0) + 1200080426 | 0, 12) + $3 | 0; + $2 = __wasm_rotl_i32((($2 + $20 | 0) + ($5 ^ $4 & ($3 ^ $5)) | 0) + -1473231341 | 0, 17) + $4 | 0; + $5 = __wasm_rotl_i32((($5 + $19 | 0) + ($3 ^ $2 & ($3 ^ $4)) | 0) + -45705983 | 0, 22) + $2 | 0; + $3 = __wasm_rotl_i32((($3 + $8 | 0) + ($4 ^ $5 & ($2 ^ $4)) | 0) + 1770035416 | 0, 7) + $5 | 0; + $21 = HEAP32[$1 + 44 >> 2]; + $22 = HEAP32[$1 + 40 >> 2]; + $4 = __wasm_rotl_i32((($4 + $13 | 0) + ($2 ^ $3 & ($2 ^ $5)) | 0) + -1958414417 | 0, 12) + $3 | 0; + $2 = __wasm_rotl_i32((($2 + $22 | 0) + ($5 ^ $4 & ($3 ^ $5)) | 0) + -42063 | 0, 17) + $4 | 0; + $5 = __wasm_rotl_i32((($5 + $21 | 0) + ($3 ^ $2 & ($3 ^ $4)) | 0) + -1990404162 | 0, 22) + $2 | 0; + $3 = __wasm_rotl_i32((($3 + $12 | 0) + ($4 ^ $5 & ($2 ^ $4)) | 0) + 1804603682 | 0, 7) + $5 | 0; + $23 = HEAP32[$1 + 56 >> 2]; + $24 = HEAP32[$1 + 60 >> 2]; + $4 = __wasm_rotl_i32((($4 + $14 | 0) + ($2 ^ $3 & ($2 ^ $5)) | 0) + -40341101 | 0, 12) + $3 | 0; + $1 = $4 + __wasm_rotl_i32((($2 + $23 | 0) + ($5 ^ ($3 ^ $5) & $4) | 0) + -1502002290 | 0, 17) | 0; + $26 = $1 + $21 | 0; + $2 = $3 + $15 | 0; + $3 = __wasm_rotl_i32((($5 + $24 | 0) + ($3 ^ $1 & ($3 ^ $4)) | 0) + 1236535329 | 0, 22) + $1 | 0; + $2 = __wasm_rotl_i32(($2 + ($1 ^ ($3 ^ $1) & $4) | 0) + -165796510 | 0, 5) + $3 | 0; + $1 = __wasm_rotl_i32((($4 + $20 | 0) + ($3 ^ $1 & ($3 ^ $2)) | 0) + -1069501632 | 0, 9) + $2 | 0; + $4 = __wasm_rotl_i32(($26 + (($2 ^ $1) & $3 ^ $2) | 0) + 643717713 | 0, 14) + $1 | 0; + $3 = __wasm_rotl_i32((($3 + $9 | 0) + ($1 ^ $2 & ($1 ^ $4)) | 0) + -373897302 | 0, 20) + $4 | 0; + $2 = __wasm_rotl_i32((($2 + $6 | 0) + ($4 ^ $1 & ($3 ^ $4)) | 0) + -701558691 | 0, 5) + $3 | 0; + $1 = __wasm_rotl_i32((($1 + $22 | 0) + ($3 ^ $4 & ($3 ^ $2)) | 0) + 38016083 | 0, 9) + $2 | 0; + $4 = __wasm_rotl_i32((($24 + $4 | 0) + (($2 ^ $1) & $3 ^ $2) | 0) + -660478335 | 0, 14) + $1 | 0; + $3 = __wasm_rotl_i32((($3 + $11 | 0) + ($1 ^ $2 & ($1 ^ $4)) | 0) + -405537848 | 0, 20) + $4 | 0; + $2 = __wasm_rotl_i32((($2 + $13 | 0) + ($4 ^ $1 & ($3 ^ $4)) | 0) + 568446438 | 0, 5) + $3 | 0; + $1 = __wasm_rotl_i32((($1 + $23 | 0) + ($3 ^ $4 & ($3 ^ $2)) | 0) + -1019803690 | 0, 9) + $2 | 0; + $4 = __wasm_rotl_i32((($4 + $17 | 0) + (($2 ^ $1) & $3 ^ $2) | 0) + -187363961 | 0, 14) + $1 | 0; + $3 = __wasm_rotl_i32((($3 + $8 | 0) + ($1 ^ $2 & ($1 ^ $4)) | 0) + 1163531501 | 0, 20) + $4 | 0; + $2 = __wasm_rotl_i32((($2 + $14 | 0) + ($4 ^ $1 & ($3 ^ $4)) | 0) + -1444681467 | 0, 5) + $3 | 0; + $1 = __wasm_rotl_i32((($1 + $18 | 0) + ($3 ^ $4 & ($3 ^ $2)) | 0) + -51403784 | 0, 9) + $2 | 0; + $4 = __wasm_rotl_i32((($4 + $19 | 0) + (($2 ^ $1) & $3 ^ $2) | 0) + 1735328473 | 0, 14) + $1 | 0; + $5 = $1 ^ $4; + $3 = __wasm_rotl_i32((($3 + $12 | 0) + ($1 ^ $5 & $2) | 0) + -1926607734 | 0, 20) + $4 | 0; + $2 = __wasm_rotl_i32((($2 + $6 | 0) + ($3 ^ $5) | 0) + -378558 | 0, 4) + $3 | 0; + $1 = __wasm_rotl_i32((($1 + $8 | 0) + ($3 ^ $4 ^ $2) | 0) + -2022574463 | 0, 11) + $2 | 0; + $4 = __wasm_rotl_i32((($4 + $21 | 0) + ($1 ^ ($3 ^ $2)) | 0) + 1839030562 | 0, 16) + $1 | 0; + $3 = __wasm_rotl_i32((($3 + $23 | 0) + ($4 ^ ($1 ^ $2)) | 0) + -35309556 | 0, 23) + $4 | 0; + $2 = __wasm_rotl_i32((($2 + $15 | 0) + ($3 ^ ($1 ^ $4)) | 0) + -1530992060 | 0, 4) + $3 | 0; + $1 = __wasm_rotl_i32((($1 + $11 | 0) + ($2 ^ ($3 ^ $4)) | 0) + 1272893353 | 0, 11) + $2 | 0; + $4 = __wasm_rotl_i32((($4 + $19 | 0) + ($1 ^ ($3 ^ $2)) | 0) + -155497632 | 0, 16) + $1 | 0; + $3 = __wasm_rotl_i32((($3 + $22 | 0) + ($4 ^ ($1 ^ $2)) | 0) + -1094730640 | 0, 23) + $4 | 0; + $2 = __wasm_rotl_i32((($2 + $14 | 0) + ($3 ^ ($1 ^ $4)) | 0) + 681279174 | 0, 4) + $3 | 0; + $1 = __wasm_rotl_i32((($1 + $9 | 0) + ($2 ^ ($3 ^ $4)) | 0) + -358537222 | 0, 11) + $2 | 0; + $4 = __wasm_rotl_i32((($4 + $17 | 0) + ($1 ^ ($3 ^ $2)) | 0) + -722521979 | 0, 16) + $1 | 0; + $3 = __wasm_rotl_i32((($3 + $20 | 0) + ($4 ^ ($1 ^ $2)) | 0) + 76029189 | 0, 23) + $4 | 0; + $2 = __wasm_rotl_i32((($2 + $13 | 0) + ($3 ^ ($1 ^ $4)) | 0) + -640364487 | 0, 4) + $3 | 0; + $1 = __wasm_rotl_i32((($1 + $12 | 0) + ($2 ^ ($3 ^ $4)) | 0) + -421815835 | 0, 11) + $2 | 0; + $5 = $2 + $9 | 0; + $9 = $1 ^ $2; + $2 = __wasm_rotl_i32((($4 + $24 | 0) + ($1 ^ ($3 ^ $2)) | 0) + 530742520 | 0, 16) + $1 | 0; + $4 = __wasm_rotl_i32((($3 + $18 | 0) + ($9 ^ $2) | 0) + -995338651 | 0, 23) + $2 | 0; + $3 = __wasm_rotl_i32(($5 + (($4 | $1 ^ -1) ^ $2) | 0) + -198630844 | 0, 6) + $4 | 0; + $5 = $4 + $6 | 0; + $6 = $2 + $23 | 0; + $2 = __wasm_rotl_i32((($1 + $19 | 0) + ($4 ^ ($3 | $2 ^ -1)) | 0) + 1126891415 | 0, 10) + $3 | 0; + $4 = __wasm_rotl_i32(($6 + ($3 ^ ($2 | $4 ^ -1)) | 0) + -1416354905 | 0, 15) + $2 | 0; + $1 = __wasm_rotl_i32(($5 + (($4 | $3 ^ -1) ^ $2) | 0) + -57434055 | 0, 21) + $4 | 0; + $5 = $4 + $22 | 0; + $6 = $2 + $17 | 0; + $2 = __wasm_rotl_i32((($3 + $12 | 0) + ($4 ^ ($1 | $2 ^ -1)) | 0) + 1700485571 | 0, 6) + $1 | 0; + $4 = __wasm_rotl_i32(($6 + ($1 ^ ($2 | $4 ^ -1)) | 0) + -1894986606 | 0, 10) + $2 | 0; + $3 = __wasm_rotl_i32(($5 + (($4 | $1 ^ -1) ^ $2) | 0) + -1051523 | 0, 15) + $4 | 0; + $5 = $4 + $24 | 0; + $8 = $2 + $8 | 0; + $2 = __wasm_rotl_i32((($1 + $15 | 0) + ($4 ^ ($3 | $2 ^ -1)) | 0) + -2054922799 | 0, 21) + $3 | 0; + $4 = __wasm_rotl_i32(($8 + ($3 ^ ($2 | $4 ^ -1)) | 0) + 1873313359 | 0, 6) + $2 | 0; + $1 = __wasm_rotl_i32(($5 + (($4 | $3 ^ -1) ^ $2) | 0) + -30611744 | 0, 10) + $4 | 0; + $3 = __wasm_rotl_i32((($3 + $20 | 0) + ($4 ^ ($1 | $2 ^ -1)) | 0) + -1560198380 | 0, 15) + $1 | 0; + $2 = __wasm_rotl_i32((($2 + $14 | 0) + ($1 ^ ($3 | $4 ^ -1)) | 0) + 1309151649 | 0, 21) + $3 | 0; + $4 = __wasm_rotl_i32((($4 + $11 | 0) + (($2 | $1 ^ -1) ^ $3) | 0) + -145523070 | 0, 6) + $2 | 0; + HEAP32[$0 >> 2] = $4 + $25; + $1 = __wasm_rotl_i32((($1 + $21 | 0) + ($2 ^ ($4 | $3 ^ -1)) | 0) + -1120210379 | 0, 10) + $4 | 0; + HEAP32[$0 + 12 >> 2] = $1 + $16; + $3 = __wasm_rotl_i32((($3 + $18 | 0) + ($4 ^ ($1 | $2 ^ -1)) | 0) + 718787259 | 0, 15) + $1 | 0; + HEAP32[$0 + 8 >> 2] = $3 + $10; + (wasm2js_i32$0 = $0, wasm2js_i32$1 = __wasm_rotl_i32((($2 + $13 | 0) + ($1 ^ ($3 | $4 ^ -1)) | 0) + -343485551 | 0, 21) + ($3 + $7 | 0) | 0), HEAP32[wasm2js_i32$0 + 4 >> 2] = wasm2js_i32$1; + } + + function FLAC__MD5Accumulate($0, $1, $2, $3, $4) { + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0; + __wasm_i64_mul($4, 0, $2, 0); + label$1 : { + if (i64toi32_i32$HIGH_BITS) { + break label$1 + } + $7 = Math_imul($2, $4); + __wasm_i64_mul($3, 0, $7, 0); + if (i64toi32_i32$HIGH_BITS) { + break label$1 + } + $6 = HEAP32[$0 + 88 >> 2]; + $11 = Math_imul($3, $7); + label$2 : { + if (HEAPU32[$0 + 92 >> 2] >= $11 >>> 0) { + $5 = $6; + break label$2; + } + $5 = dlrealloc($6, $11); + label$4 : { + if (!$5) { + dlfree($6); + $5 = dlmalloc($11); + HEAP32[$0 + 88 >> 2] = $5; + if ($5) { + break label$4 + } + HEAP32[$0 + 92 >> 2] = 0; + return 0; + } + HEAP32[$0 + 88 >> 2] = $5; + } + HEAP32[$0 + 92 >> 2] = $11; + } + label$6 : { + label$7 : { + label$8 : { + label$9 : { + label$10 : { + label$11 : { + label$12 : { + label$13 : { + label$14 : { + label$15 : { + label$16 : { + label$17 : { + $6 = Math_imul($4, 100) + $2 | 0; + if (($6 | 0) <= 300) { + label$19 : { + switch ($6 + -101 | 0) { + case 3: + break label$10; + case 5: + break label$11; + case 7: + break label$12; + case 2: + case 4: + case 6: + break label$7; + case 0: + break label$8; + case 1: + break label$9; + default: + break label$19; + }; + } + switch ($6 + -201 | 0) { + case 0: + break label$13; + case 1: + break label$14; + case 3: + break label$15; + case 5: + break label$16; + case 7: + break label$17; + default: + break label$7; + }; + } + label$20 : { + label$21 : { + label$22 : { + switch ($6 + -401 | 0) { + default: + switch ($6 + -301 | 0) { + case 0: + break label$20; + case 1: + break label$21; + default: + break label$7; + }; + case 7: + if (!$3) { + break label$6 + } + $13 = HEAP32[$1 + 28 >> 2]; + $8 = HEAP32[$1 + 24 >> 2]; + $12 = HEAP32[$1 + 20 >> 2]; + $7 = HEAP32[$1 + 16 >> 2]; + $10 = HEAP32[$1 + 12 >> 2]; + $6 = HEAP32[$1 + 8 >> 2]; + $4 = HEAP32[$1 + 4 >> 2]; + $1 = HEAP32[$1 >> 2]; + $2 = 0; + while (1) { + $9 = $2 << 2; + HEAP32[$5 >> 2] = HEAP32[$9 + $1 >> 2]; + HEAP32[$5 + 4 >> 2] = HEAP32[$4 + $9 >> 2]; + HEAP32[$5 + 8 >> 2] = HEAP32[$6 + $9 >> 2]; + HEAP32[$5 + 12 >> 2] = HEAP32[$10 + $9 >> 2]; + HEAP32[$5 + 16 >> 2] = HEAP32[$7 + $9 >> 2]; + HEAP32[$5 + 20 >> 2] = HEAP32[$9 + $12 >> 2]; + HEAP32[$5 + 24 >> 2] = HEAP32[$8 + $9 >> 2]; + HEAP32[$5 + 28 >> 2] = HEAP32[$9 + $13 >> 2]; + $5 = $5 + 32 | 0; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + break label$6; + case 5: + if (!$3) { + break label$6 + } + $12 = HEAP32[$1 + 20 >> 2]; + $7 = HEAP32[$1 + 16 >> 2]; + $10 = HEAP32[$1 + 12 >> 2]; + $6 = HEAP32[$1 + 8 >> 2]; + $4 = HEAP32[$1 + 4 >> 2]; + $1 = HEAP32[$1 >> 2]; + $2 = 0; + while (1) { + $8 = $2 << 2; + HEAP32[$5 >> 2] = HEAP32[$8 + $1 >> 2]; + HEAP32[$5 + 4 >> 2] = HEAP32[$4 + $8 >> 2]; + HEAP32[$5 + 8 >> 2] = HEAP32[$6 + $8 >> 2]; + HEAP32[$5 + 12 >> 2] = HEAP32[$8 + $10 >> 2]; + HEAP32[$5 + 16 >> 2] = HEAP32[$7 + $8 >> 2]; + HEAP32[$5 + 20 >> 2] = HEAP32[$8 + $12 >> 2]; + $5 = $5 + 24 | 0; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + break label$6; + case 3: + if (!$3) { + break label$6 + } + $10 = HEAP32[$1 + 12 >> 2]; + $6 = HEAP32[$1 + 8 >> 2]; + $4 = HEAP32[$1 + 4 >> 2]; + $1 = HEAP32[$1 >> 2]; + $2 = 0; + while (1) { + $7 = $2 << 2; + HEAP32[$5 >> 2] = HEAP32[$7 + $1 >> 2]; + HEAP32[$5 + 4 >> 2] = HEAP32[$4 + $7 >> 2]; + HEAP32[$5 + 8 >> 2] = HEAP32[$6 + $7 >> 2]; + HEAP32[$5 + 12 >> 2] = HEAP32[$7 + $10 >> 2]; + $5 = $5 + 16 | 0; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + break label$6; + case 1: + if (!$3) { + break label$6 + } + $6 = HEAP32[$1 + 4 >> 2]; + $4 = HEAP32[$1 >> 2]; + $1 = 0; + while (1) { + $2 = $1 << 2; + HEAP32[$5 >> 2] = HEAP32[$2 + $4 >> 2]; + HEAP32[$5 + 4 >> 2] = HEAP32[$2 + $6 >> 2]; + $5 = $5 + 8 | 0; + $1 = $1 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$6; + case 0: + break label$22; + case 2: + case 4: + case 6: + break label$7; + }; + } + if (!$3) { + break label$6 + } + $2 = HEAP32[$1 >> 2]; + $1 = 0; + while (1) { + HEAP32[$5 >> 2] = HEAP32[$2 + ($1 << 2) >> 2]; + $5 = $5 + 4 | 0; + $1 = $1 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $2 = 0; + while (1) { + $4 = $2 << 2; + $6 = HEAP32[$4 + HEAP32[$1 >> 2] >> 2]; + HEAP8[$5 | 0] = $6; + HEAP8[$5 + 2 | 0] = $6 >>> 16; + HEAP8[$5 + 1 | 0] = $6 >>> 8; + $4 = HEAP32[$4 + HEAP32[$1 + 4 >> 2] >> 2]; + HEAP8[$5 + 3 | 0] = $4; + HEAP8[$5 + 5 | 0] = $4 >>> 16; + HEAP8[$5 + 4 | 0] = $4 >>> 8; + $5 = $5 + 6 | 0; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $2 = 0; + while (1) { + $4 = HEAP32[HEAP32[$1 >> 2] + ($2 << 2) >> 2]; + HEAP8[$5 | 0] = $4; + HEAP8[$5 + 2 | 0] = $4 >>> 16; + HEAP8[$5 + 1 | 0] = $4 >>> 8; + $5 = $5 + 3 | 0; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $13 = HEAP32[$1 + 28 >> 2]; + $8 = HEAP32[$1 + 24 >> 2]; + $12 = HEAP32[$1 + 20 >> 2]; + $7 = HEAP32[$1 + 16 >> 2]; + $10 = HEAP32[$1 + 12 >> 2]; + $6 = HEAP32[$1 + 8 >> 2]; + $4 = HEAP32[$1 + 4 >> 2]; + $1 = HEAP32[$1 >> 2]; + $2 = 0; + while (1) { + $9 = $2 << 2; + HEAP16[$5 >> 1] = HEAP32[$9 + $1 >> 2]; + HEAP16[$5 + 2 >> 1] = HEAP32[$4 + $9 >> 2]; + HEAP16[$5 + 4 >> 1] = HEAP32[$6 + $9 >> 2]; + HEAP16[$5 + 6 >> 1] = HEAP32[$10 + $9 >> 2]; + HEAP16[$5 + 8 >> 1] = HEAP32[$7 + $9 >> 2]; + HEAP16[$5 + 10 >> 1] = HEAP32[$9 + $12 >> 2]; + HEAP16[$5 + 12 >> 1] = HEAP32[$8 + $9 >> 2]; + HEAP16[$5 + 14 >> 1] = HEAP32[$9 + $13 >> 2]; + $5 = $5 + 16 | 0; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $12 = HEAP32[$1 + 20 >> 2]; + $7 = HEAP32[$1 + 16 >> 2]; + $10 = HEAP32[$1 + 12 >> 2]; + $6 = HEAP32[$1 + 8 >> 2]; + $4 = HEAP32[$1 + 4 >> 2]; + $1 = HEAP32[$1 >> 2]; + $2 = 0; + while (1) { + $8 = $2 << 2; + HEAP16[$5 >> 1] = HEAP32[$8 + $1 >> 2]; + HEAP16[$5 + 2 >> 1] = HEAP32[$4 + $8 >> 2]; + HEAP16[$5 + 4 >> 1] = HEAP32[$6 + $8 >> 2]; + HEAP16[$5 + 6 >> 1] = HEAP32[$8 + $10 >> 2]; + HEAP16[$5 + 8 >> 1] = HEAP32[$7 + $8 >> 2]; + HEAP16[$5 + 10 >> 1] = HEAP32[$8 + $12 >> 2]; + $5 = $5 + 12 | 0; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $10 = HEAP32[$1 + 12 >> 2]; + $6 = HEAP32[$1 + 8 >> 2]; + $4 = HEAP32[$1 + 4 >> 2]; + $1 = HEAP32[$1 >> 2]; + $2 = 0; + while (1) { + $7 = $2 << 2; + HEAP16[$5 >> 1] = HEAP32[$7 + $1 >> 2]; + HEAP16[$5 + 2 >> 1] = HEAP32[$4 + $7 >> 2]; + HEAP16[$5 + 4 >> 1] = HEAP32[$6 + $7 >> 2]; + HEAP16[$5 + 6 >> 1] = HEAP32[$7 + $10 >> 2]; + $5 = $5 + 8 | 0; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $6 = HEAP32[$1 + 4 >> 2]; + $4 = HEAP32[$1 >> 2]; + $1 = 0; + while (1) { + $2 = $1 << 2; + HEAP16[$5 >> 1] = HEAP32[$2 + $4 >> 2]; + HEAP16[$5 + 2 >> 1] = HEAP32[$2 + $6 >> 2]; + $5 = $5 + 4 | 0; + $1 = $1 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $2 = HEAP32[$1 >> 2]; + $1 = 0; + while (1) { + HEAP16[$5 >> 1] = HEAP32[$2 + ($1 << 2) >> 2]; + $5 = $5 + 2 | 0; + $1 = $1 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $4 = 0; + while (1) { + $2 = $4 << 2; + HEAP8[$5 | 0] = HEAP32[$2 + HEAP32[$1 >> 2] >> 2]; + HEAP8[$5 + 1 | 0] = HEAP32[$2 + HEAP32[$1 + 4 >> 2] >> 2]; + HEAP8[$5 + 2 | 0] = HEAP32[$2 + HEAP32[$1 + 8 >> 2] >> 2]; + HEAP8[$5 + 3 | 0] = HEAP32[$2 + HEAP32[$1 + 12 >> 2] >> 2]; + HEAP8[$5 + 4 | 0] = HEAP32[$2 + HEAP32[$1 + 16 >> 2] >> 2]; + HEAP8[$5 + 5 | 0] = HEAP32[$2 + HEAP32[$1 + 20 >> 2] >> 2]; + HEAP8[$5 + 6 | 0] = HEAP32[$2 + HEAP32[$1 + 24 >> 2] >> 2]; + HEAP8[$5 + 7 | 0] = HEAP32[$2 + HEAP32[$1 + 28 >> 2] >> 2]; + $5 = $5 + 8 | 0; + $4 = $4 + 1 | 0; + if (($4 | 0) != ($3 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $4 = 0; + while (1) { + $2 = $4 << 2; + HEAP8[$5 | 0] = HEAP32[$2 + HEAP32[$1 >> 2] >> 2]; + HEAP8[$5 + 1 | 0] = HEAP32[$2 + HEAP32[$1 + 4 >> 2] >> 2]; + HEAP8[$5 + 2 | 0] = HEAP32[$2 + HEAP32[$1 + 8 >> 2] >> 2]; + HEAP8[$5 + 3 | 0] = HEAP32[$2 + HEAP32[$1 + 12 >> 2] >> 2]; + HEAP8[$5 + 4 | 0] = HEAP32[$2 + HEAP32[$1 + 16 >> 2] >> 2]; + HEAP8[$5 + 5 | 0] = HEAP32[$2 + HEAP32[$1 + 20 >> 2] >> 2]; + $5 = $5 + 6 | 0; + $4 = $4 + 1 | 0; + if (($4 | 0) != ($3 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $4 = 0; + while (1) { + $2 = $4 << 2; + HEAP8[$5 | 0] = HEAP32[$2 + HEAP32[$1 >> 2] >> 2]; + HEAP8[$5 + 1 | 0] = HEAP32[$2 + HEAP32[$1 + 4 >> 2] >> 2]; + HEAP8[$5 + 2 | 0] = HEAP32[$2 + HEAP32[$1 + 8 >> 2] >> 2]; + HEAP8[$5 + 3 | 0] = HEAP32[$2 + HEAP32[$1 + 12 >> 2] >> 2]; + $5 = $5 + 4 | 0; + $4 = $4 + 1 | 0; + if (($4 | 0) != ($3 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $2 = 0; + while (1) { + $4 = $2 << 2; + HEAP8[$5 | 0] = HEAP32[$4 + HEAP32[$1 >> 2] >> 2]; + HEAP8[$5 + 1 | 0] = HEAP32[$4 + HEAP32[$1 + 4 >> 2] >> 2]; + $5 = $5 + 2 | 0; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + break label$6; + } + if (!$3) { + break label$6 + } + $2 = 0; + while (1) { + HEAP8[$5 | 0] = HEAP32[HEAP32[$1 >> 2] + ($2 << 2) >> 2]; + $5 = $5 + 1 | 0; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + break label$6; + } + label$45 : { + switch ($4 + -1 | 0) { + case 3: + if (!$2 | !$3) { + break label$6 + } + $6 = 0; + while (1) { + $4 = 0; + while (1) { + HEAP32[$5 >> 2] = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($6 << 2) >> 2]; + $5 = $5 + 4 | 0; + $4 = $4 + 1 | 0; + if (($4 | 0) != ($2 | 0)) { + continue + } + break; + }; + $6 = $6 + 1 | 0; + if (($6 | 0) != ($3 | 0)) { + continue + } + break; + }; + break label$6; + case 2: + if (!$2 | !$3) { + break label$6 + } + while (1) { + $4 = 0; + while (1) { + $6 = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($10 << 2) >> 2]; + HEAP8[$5 | 0] = $6; + HEAP8[$5 + 2 | 0] = $6 >>> 16; + HEAP8[$5 + 1 | 0] = $6 >>> 8; + $5 = $5 + 3 | 0; + $4 = $4 + 1 | 0; + if (($4 | 0) != ($2 | 0)) { + continue + } + break; + }; + $10 = $10 + 1 | 0; + if (($10 | 0) != ($3 | 0)) { + continue + } + break; + }; + break label$6; + case 1: + if (!$2 | !$3) { + break label$6 + } + $6 = 0; + while (1) { + $4 = 0; + while (1) { + HEAP16[$5 >> 1] = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($6 << 2) >> 2]; + $5 = $5 + 2 | 0; + $4 = $4 + 1 | 0; + if (($4 | 0) != ($2 | 0)) { + continue + } + break; + }; + $6 = $6 + 1 | 0; + if (($6 | 0) != ($3 | 0)) { + continue + } + break; + }; + break label$6; + case 0: + break label$45; + default: + break label$6; + }; + } + if (!$2 | !$3) { + break label$6 + } + $6 = 0; + while (1) { + $4 = 0; + while (1) { + HEAP8[$5 | 0] = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($6 << 2) >> 2]; + $5 = $5 + 1 | 0; + $4 = $4 + 1 | 0; + if (($4 | 0) != ($2 | 0)) { + continue + } + break; + }; + $6 = $6 + 1 | 0; + if (($6 | 0) != ($3 | 0)) { + continue + } + break; + }; + } + $2 = HEAP32[$0 + 80 >> 2]; + $1 = $2 + $11 | 0; + HEAP32[$0 + 80 >> 2] = $1; + $3 = HEAP32[$0 + 88 >> 2]; + if ($1 >>> 0 < $2 >>> 0) { + $1 = $0 + 84 | 0; + HEAP32[$1 >> 2] = HEAP32[$1 >> 2] + 1; + } + $4 = 64 - ($2 & 63) | 0; + $1 = ($0 - $4 | 0) - -64 | 0; + label$58 : { + if ($11 >>> 0 < $4 >>> 0) { + memcpy($1, $3, $11); + break label$58; + } + memcpy($1, $3, $4); + $2 = $0 - -64 | 0; + FLAC__MD5Transform($2, $0); + $5 = $3 + $4 | 0; + $1 = $11 - $4 | 0; + if ($1 >>> 0 >= 64) { + while (1) { + $4 = HEAPU8[$5 + 4 | 0] | HEAPU8[$5 + 5 | 0] << 8 | (HEAPU8[$5 + 6 | 0] << 16 | HEAPU8[$5 + 7 | 0] << 24); + $3 = HEAPU8[$5 | 0] | HEAPU8[$5 + 1 | 0] << 8 | (HEAPU8[$5 + 2 | 0] << 16 | HEAPU8[$5 + 3 | 0] << 24); + HEAP8[$0 | 0] = $3; + HEAP8[$0 + 1 | 0] = $3 >>> 8; + HEAP8[$0 + 2 | 0] = $3 >>> 16; + HEAP8[$0 + 3 | 0] = $3 >>> 24; + HEAP8[$0 + 4 | 0] = $4; + HEAP8[$0 + 5 | 0] = $4 >>> 8; + HEAP8[$0 + 6 | 0] = $4 >>> 16; + HEAP8[$0 + 7 | 0] = $4 >>> 24; + $4 = HEAPU8[$5 + 60 | 0] | HEAPU8[$5 + 61 | 0] << 8 | (HEAPU8[$5 + 62 | 0] << 16 | HEAPU8[$5 + 63 | 0] << 24); + $3 = HEAPU8[$5 + 56 | 0] | HEAPU8[$5 + 57 | 0] << 8 | (HEAPU8[$5 + 58 | 0] << 16 | HEAPU8[$5 + 59 | 0] << 24); + HEAP8[$0 + 56 | 0] = $3; + HEAP8[$0 + 57 | 0] = $3 >>> 8; + HEAP8[$0 + 58 | 0] = $3 >>> 16; + HEAP8[$0 + 59 | 0] = $3 >>> 24; + HEAP8[$0 + 60 | 0] = $4; + HEAP8[$0 + 61 | 0] = $4 >>> 8; + HEAP8[$0 + 62 | 0] = $4 >>> 16; + HEAP8[$0 + 63 | 0] = $4 >>> 24; + $4 = HEAPU8[$5 + 52 | 0] | HEAPU8[$5 + 53 | 0] << 8 | (HEAPU8[$5 + 54 | 0] << 16 | HEAPU8[$5 + 55 | 0] << 24); + $3 = HEAPU8[$5 + 48 | 0] | HEAPU8[$5 + 49 | 0] << 8 | (HEAPU8[$5 + 50 | 0] << 16 | HEAPU8[$5 + 51 | 0] << 24); + HEAP8[$0 + 48 | 0] = $3; + HEAP8[$0 + 49 | 0] = $3 >>> 8; + HEAP8[$0 + 50 | 0] = $3 >>> 16; + HEAP8[$0 + 51 | 0] = $3 >>> 24; + HEAP8[$0 + 52 | 0] = $4; + HEAP8[$0 + 53 | 0] = $4 >>> 8; + HEAP8[$0 + 54 | 0] = $4 >>> 16; + HEAP8[$0 + 55 | 0] = $4 >>> 24; + $4 = HEAPU8[$5 + 44 | 0] | HEAPU8[$5 + 45 | 0] << 8 | (HEAPU8[$5 + 46 | 0] << 16 | HEAPU8[$5 + 47 | 0] << 24); + $3 = HEAPU8[$5 + 40 | 0] | HEAPU8[$5 + 41 | 0] << 8 | (HEAPU8[$5 + 42 | 0] << 16 | HEAPU8[$5 + 43 | 0] << 24); + HEAP8[$0 + 40 | 0] = $3; + HEAP8[$0 + 41 | 0] = $3 >>> 8; + HEAP8[$0 + 42 | 0] = $3 >>> 16; + HEAP8[$0 + 43 | 0] = $3 >>> 24; + HEAP8[$0 + 44 | 0] = $4; + HEAP8[$0 + 45 | 0] = $4 >>> 8; + HEAP8[$0 + 46 | 0] = $4 >>> 16; + HEAP8[$0 + 47 | 0] = $4 >>> 24; + $4 = HEAPU8[$5 + 36 | 0] | HEAPU8[$5 + 37 | 0] << 8 | (HEAPU8[$5 + 38 | 0] << 16 | HEAPU8[$5 + 39 | 0] << 24); + $3 = HEAPU8[$5 + 32 | 0] | HEAPU8[$5 + 33 | 0] << 8 | (HEAPU8[$5 + 34 | 0] << 16 | HEAPU8[$5 + 35 | 0] << 24); + HEAP8[$0 + 32 | 0] = $3; + HEAP8[$0 + 33 | 0] = $3 >>> 8; + HEAP8[$0 + 34 | 0] = $3 >>> 16; + HEAP8[$0 + 35 | 0] = $3 >>> 24; + HEAP8[$0 + 36 | 0] = $4; + HEAP8[$0 + 37 | 0] = $4 >>> 8; + HEAP8[$0 + 38 | 0] = $4 >>> 16; + HEAP8[$0 + 39 | 0] = $4 >>> 24; + $4 = HEAPU8[$5 + 28 | 0] | HEAPU8[$5 + 29 | 0] << 8 | (HEAPU8[$5 + 30 | 0] << 16 | HEAPU8[$5 + 31 | 0] << 24); + $3 = HEAPU8[$5 + 24 | 0] | HEAPU8[$5 + 25 | 0] << 8 | (HEAPU8[$5 + 26 | 0] << 16 | HEAPU8[$5 + 27 | 0] << 24); + HEAP8[$0 + 24 | 0] = $3; + HEAP8[$0 + 25 | 0] = $3 >>> 8; + HEAP8[$0 + 26 | 0] = $3 >>> 16; + HEAP8[$0 + 27 | 0] = $3 >>> 24; + HEAP8[$0 + 28 | 0] = $4; + HEAP8[$0 + 29 | 0] = $4 >>> 8; + HEAP8[$0 + 30 | 0] = $4 >>> 16; + HEAP8[$0 + 31 | 0] = $4 >>> 24; + $4 = HEAPU8[$5 + 20 | 0] | HEAPU8[$5 + 21 | 0] << 8 | (HEAPU8[$5 + 22 | 0] << 16 | HEAPU8[$5 + 23 | 0] << 24); + $3 = HEAPU8[$5 + 16 | 0] | HEAPU8[$5 + 17 | 0] << 8 | (HEAPU8[$5 + 18 | 0] << 16 | HEAPU8[$5 + 19 | 0] << 24); + HEAP8[$0 + 16 | 0] = $3; + HEAP8[$0 + 17 | 0] = $3 >>> 8; + HEAP8[$0 + 18 | 0] = $3 >>> 16; + HEAP8[$0 + 19 | 0] = $3 >>> 24; + HEAP8[$0 + 20 | 0] = $4; + HEAP8[$0 + 21 | 0] = $4 >>> 8; + HEAP8[$0 + 22 | 0] = $4 >>> 16; + HEAP8[$0 + 23 | 0] = $4 >>> 24; + $4 = HEAPU8[$5 + 12 | 0] | HEAPU8[$5 + 13 | 0] << 8 | (HEAPU8[$5 + 14 | 0] << 16 | HEAPU8[$5 + 15 | 0] << 24); + $3 = HEAPU8[$5 + 8 | 0] | HEAPU8[$5 + 9 | 0] << 8 | (HEAPU8[$5 + 10 | 0] << 16 | HEAPU8[$5 + 11 | 0] << 24); + HEAP8[$0 + 8 | 0] = $3; + HEAP8[$0 + 9 | 0] = $3 >>> 8; + HEAP8[$0 + 10 | 0] = $3 >>> 16; + HEAP8[$0 + 11 | 0] = $3 >>> 24; + HEAP8[$0 + 12 | 0] = $4; + HEAP8[$0 + 13 | 0] = $4 >>> 8; + HEAP8[$0 + 14 | 0] = $4 >>> 16; + HEAP8[$0 + 15 | 0] = $4 >>> 24; + FLAC__MD5Transform($2, $0); + $5 = $5 - -64 | 0; + $1 = $1 + -64 | 0; + if ($1 >>> 0 > 63) { + continue + } + break; + } + } + memcpy($0, $5, $1); + } + $5 = 1; + } + return $5; + } + + function __stdio_close($0) { + $0 = $0 | 0; + return __wasi_fd_close(HEAP32[$0 + 60 >> 2]) | 0; + } + + function __wasi_syscall_ret($0) { + if (!$0) { + return 0 + } + HEAP32[2896] = $0; + return -1; + } + + function __stdio_read($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0; + $3 = global$0 - 32 | 0; + global$0 = $3; + HEAP32[$3 + 16 >> 2] = $1; + $4 = HEAP32[$0 + 48 >> 2]; + HEAP32[$3 + 20 >> 2] = $2 - (($4 | 0) != 0); + $5 = HEAP32[$0 + 44 >> 2]; + HEAP32[$3 + 28 >> 2] = $4; + HEAP32[$3 + 24 >> 2] = $5; + label$1 : { + label$2 : { + label$3 : { + if (__wasi_syscall_ret(__wasi_fd_read(HEAP32[$0 + 60 >> 2], $3 + 16 | 0, 2, $3 + 12 | 0) | 0)) { + HEAP32[$3 + 12 >> 2] = -1; + $2 = -1; + break label$3; + } + $4 = HEAP32[$3 + 12 >> 2]; + if (($4 | 0) > 0) { + break label$2 + } + $2 = $4; + } + HEAP32[$0 >> 2] = HEAP32[$0 >> 2] | $2 & 48 ^ 16; + break label$1; + } + $6 = HEAP32[$3 + 20 >> 2]; + if ($4 >>> 0 <= $6 >>> 0) { + $2 = $4; + break label$1; + } + $5 = HEAP32[$0 + 44 >> 2]; + HEAP32[$0 + 4 >> 2] = $5; + HEAP32[$0 + 8 >> 2] = $5 + ($4 - $6 | 0); + if (!HEAP32[$0 + 48 >> 2]) { + break label$1 + } + HEAP32[$0 + 4 >> 2] = $5 + 1; + HEAP8[($1 + $2 | 0) + -1 | 0] = HEAPU8[$5 | 0]; + } + global$0 = $3 + 32 | 0; + return $2 | 0; + } + + function __stdio_seek($0, $1, $2, $3) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + var $4 = 0; + $4 = global$0 - 16 | 0; + global$0 = $4; + label$1 : { + if (!__wasi_syscall_ret(legalimport$__wasi_fd_seek(HEAP32[$0 + 60 >> 2], $1 | 0, $2 | 0, $3 & 255, $4 + 8 | 0) | 0)) { + $1 = HEAP32[$4 + 12 >> 2]; + $0 = HEAP32[$4 + 8 >> 2]; + break label$1; + } + HEAP32[$4 + 8 >> 2] = -1; + HEAP32[$4 + 12 >> 2] = -1; + $1 = -1; + $0 = -1; + } + global$0 = $4 + 16 | 0; + i64toi32_i32$HIGH_BITS = $1; + return $0 | 0; + } + + function fflush($0) { + var $1 = 0; + if ($0) { + if (HEAP32[$0 + 76 >> 2] <= -1) { + return __fflush_unlocked($0) + } + return __fflush_unlocked($0); + } + if (HEAP32[2794]) { + $1 = fflush(HEAP32[2794]) + } + $0 = HEAP32[3023]; + if ($0) { + while (1) { + if (HEAPU32[$0 + 20 >> 2] > HEAPU32[$0 + 28 >> 2]) { + $1 = __fflush_unlocked($0) | $1 + } + $0 = HEAP32[$0 + 56 >> 2]; + if ($0) { + continue + } + break; + } + } + return $1; + } + + function __fflush_unlocked($0) { + var $1 = 0, $2 = 0; + label$1 : { + if (HEAPU32[$0 + 20 >> 2] <= HEAPU32[$0 + 28 >> 2]) { + break label$1 + } + FUNCTION_TABLE[HEAP32[$0 + 36 >> 2]]($0, 0, 0) | 0; + if (HEAP32[$0 + 20 >> 2]) { + break label$1 + } + return -1; + } + $1 = HEAP32[$0 + 4 >> 2]; + $2 = HEAP32[$0 + 8 >> 2]; + if ($1 >>> 0 < $2 >>> 0) { + $1 = $1 - $2 | 0; + FUNCTION_TABLE[HEAP32[$0 + 40 >> 2]]($0, $1, $1 >> 31, 1) | 0; + } + HEAP32[$0 + 28 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + return 0; + } + + function fclose($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0; + $4 = HEAP32[$0 + 76 >> 2] >= 0 ? 1 : 0; + $3 = HEAP32[$0 >> 2] & 1; + if (!$3) { + $1 = HEAP32[$0 + 52 >> 2]; + if ($1) { + HEAP32[$1 + 56 >> 2] = HEAP32[$0 + 56 >> 2] + } + $2 = HEAP32[$0 + 56 >> 2]; + if ($2) { + HEAP32[$2 + 52 >> 2] = $1 + } + if (HEAP32[3023] == ($0 | 0)) { + HEAP32[3023] = $2 + } + } + fflush($0); + FUNCTION_TABLE[HEAP32[$0 + 12 >> 2]]($0) | 0; + $1 = HEAP32[$0 + 96 >> 2]; + if ($1) { + dlfree($1) + } + label$7 : { + if (!$3) { + dlfree($0); + break label$7; + } + if (!$4) { + break label$7 + } + } + } + + function memcmp($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0; + label$1 : { + if (!$2) { + break label$1 + } + while (1) { + $3 = HEAPU8[$0 | 0]; + $4 = HEAPU8[$1 | 0]; + if (($3 | 0) == ($4 | 0)) { + $1 = $1 + 1 | 0; + $0 = $0 + 1 | 0; + $2 = $2 + -1 | 0; + if ($2) { + continue + } + break label$1; + } + break; + }; + $5 = $3 - $4 | 0; + } + return $5; + } + + function FLAC__cpu_info($0) { + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 3; + HEAP32[$0 + 56 >> 2] = 0; + HEAP32[$0 + 60 >> 2] = 0; + HEAP32[$0 + 48 >> 2] = 0; + HEAP32[$0 + 52 >> 2] = 0; + HEAP32[$0 + 40 >> 2] = 0; + HEAP32[$0 + 44 >> 2] = 0; + HEAP32[$0 + 32 >> 2] = 0; + HEAP32[$0 + 36 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = 0; + HEAP32[$0 + 28 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + } + + function lround($0) { + $0 = +round(+$0); + if (Math_abs($0) < 2147483648.0) { + return ~~$0 + } + return -2147483648; + } + + function log($0) { + var $1 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $10 = 0.0; + label$1 : { + label$2 : { + label$3 : { + label$4 : { + wasm2js_scratch_store_f64(+$0); + $1 = wasm2js_scratch_load_i32(1) | 0; + $3 = wasm2js_scratch_load_i32(0) | 0; + if (($1 | 0) > 0 ? 1 : ($1 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) { + $5 = $1; + if ($1 >>> 0 > 1048575) { + break label$4 + } + } + if (!($1 & 2147483647 | $3)) { + return -1.0 / ($0 * $0) + } + if (($1 | 0) > -1 ? 1 : 0) { + break label$3 + } + return ($0 - $0) / 0.0; + } + if ($5 >>> 0 > 2146435071) { + break label$1 + } + $1 = 1072693248; + $6 = -1023; + if (($5 | 0) != 1072693248) { + $1 = $5; + break label$2; + } + if ($3) { + break label$2 + } + return 0.0; + } + wasm2js_scratch_store_f64(+($0 * 18014398509481984.0)); + $1 = wasm2js_scratch_load_i32(1) | 0; + $3 = wasm2js_scratch_load_i32(0) | 0; + $6 = -1077; + } + $1 = $1 + 614242 | 0; + $4 = +(($1 >>> 20 | 0) + $6 | 0); + wasm2js_scratch_store_i32(0, $3 | 0); + wasm2js_scratch_store_i32(1, ($1 & 1048575) + 1072079006 | 0); + $0 = +wasm2js_scratch_load_f64() + -1.0; + $2 = $0 / ($0 + 2.0); + $7 = $4 * .6931471803691238; + $8 = $0; + $9 = $4 * 1.9082149292705877e-10; + $10 = $2; + $4 = $0 * ($0 * .5); + $2 = $2 * $2; + $0 = $2 * $2; + $0 = $7 + ($8 + ($9 + $10 * ($4 + ($0 * ($0 * ($0 * .15313837699209373 + .22222198432149784) + .3999999999940942) + $2 * ($0 * ($0 * ($0 * .14798198605116586 + .1818357216161805) + .2857142874366239) + .6666666666666735))) - $4)); + } + return $0; + } + + function FLAC__lpc_window_data($0, $1, $2, $3) { + var $4 = 0, $5 = 0; + if ($3) { + while (1) { + $5 = $4 << 2; + HEAPF32[$5 + $2 >> 2] = HEAPF32[$1 + $5 >> 2] * Math_fround(HEAP32[$0 + $5 >> 2]); + $4 = $4 + 1 | 0; + if (($4 | 0) != ($3 | 0)) { + continue + } + break; + } + } + } + + function FLAC__lpc_compute_autocorrelation($0, $1, $2, $3) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + var $4 = 0, $5 = 0, $6 = 0, $7 = Math_fround(0), $8 = 0, $9 = 0; + $6 = $1 - $2 | 0; + label$1 : { + if (!$2) { + while (1) { + $4 = $4 + 1 | 0; + if ($4 >>> 0 <= $6 >>> 0) { + continue + } + break; + }; + break label$1; + } + $9 = memset($3, $2 << 2); + while (1) { + $7 = HEAPF32[($4 << 2) + $0 >> 2]; + $5 = 0; + while (1) { + $8 = ($5 << 2) + $9 | 0; + HEAPF32[$8 >> 2] = HEAPF32[$8 >> 2] + Math_fround($7 * HEAPF32[($4 + $5 << 2) + $0 >> 2]); + $5 = $5 + 1 | 0; + if (($5 | 0) != ($2 | 0)) { + continue + } + break; + }; + $4 = $4 + 1 | 0; + if ($4 >>> 0 <= $6 >>> 0) { + continue + } + break; + }; + } + if ($4 >>> 0 < $1 >>> 0) { + while (1) { + $2 = $1 - $4 | 0; + if ($2) { + $7 = HEAPF32[($4 << 2) + $0 >> 2]; + $5 = 0; + while (1) { + $6 = ($5 << 2) + $3 | 0; + HEAPF32[$6 >> 2] = HEAPF32[$6 >> 2] + Math_fround($7 * HEAPF32[($4 + $5 << 2) + $0 >> 2]); + $5 = $5 + 1 | 0; + if ($5 >>> 0 < $2 >>> 0) { + continue + } + break; + }; + } + $4 = $4 + 1 | 0; + if (($4 | 0) != ($1 | 0)) { + continue + } + break; + } + } + } + + function FLAC__lpc_compute_lp_coefficients($0, $1, $2, $3) { + var $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0; + $7 = global$0 - 256 | 0; + global$0 = $7; + $13 = HEAP32[$1 >> 2]; + $10 = +HEAPF32[$0 >> 2]; + label$1 : { + while (1) { + if (($5 | 0) == ($13 | 0)) { + break label$1 + } + $11 = $5 + 1 | 0; + $6 = +Math_fround(-HEAPF32[($11 << 2) + $0 >> 2]); + label$3 : { + if ($5) { + $12 = $5 >>> 1 | 0; + $4 = 0; + while (1) { + $6 = $6 - HEAPF64[($4 << 3) + $7 >> 3] * +HEAPF32[($5 - $4 << 2) + $0 >> 2]; + $4 = $4 + 1 | 0; + if (($5 | 0) != ($4 | 0)) { + continue + } + break; + }; + $6 = $6 / $10; + HEAPF64[($5 << 3) + $7 >> 3] = $6; + $4 = 0; + if ($12) { + while (1) { + $8 = ($4 << 3) + $7 | 0; + $9 = HEAPF64[$8 >> 3]; + $14 = $8; + $8 = (($4 ^ -1) + $5 << 3) + $7 | 0; + HEAPF64[$14 >> 3] = $9 + $6 * HEAPF64[$8 >> 3]; + HEAPF64[$8 >> 3] = $6 * $9 + HEAPF64[$8 >> 3]; + $4 = $4 + 1 | 0; + if (($12 | 0) != ($4 | 0)) { + continue + } + break; + } + } + if (!($5 & 1)) { + break label$3 + } + $8 = ($12 << 3) + $7 | 0; + $9 = HEAPF64[$8 >> 3]; + HEAPF64[$8 >> 3] = $9 + $6 * $9; + break label$3; + } + $6 = $6 / $10; + HEAPF64[($5 << 3) + $7 >> 3] = $6; + } + $9 = 1.0 - $6 * $6; + $4 = 0; + while (1) { + HEAPF32[(($5 << 7) + $2 | 0) + ($4 << 2) >> 2] = -Math_fround(HEAPF64[($4 << 3) + $7 >> 3]); + $4 = $4 + 1 | 0; + if ($4 >>> 0 <= $5 >>> 0) { + continue + } + break; + }; + $10 = $10 * $9; + HEAPF64[($5 << 3) + $3 >> 3] = $10; + $5 = $11; + if ($10 != 0.0) { + continue + } + break; + }; + HEAP32[$1 >> 2] = $11; + } + global$0 = $7 + 256 | 0; + } + + function FLAC__lpc_quantize_coefficients($0, $1, $2, $3, $4) { + var $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = Math_fround(0); + $8 = global$0 - 16 | 0; + global$0 = $8; + label$1 : { + if (!$1) { + $7 = 2; + break label$1; + } + $5 = $2 + -1 | 0; + $2 = 0; + while (1) { + $11 = +Math_fround(Math_abs(HEAPF32[($2 << 2) + $0 >> 2])); + $6 = $6 < $11 ? $11 : $6; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + $7 = 2; + if ($6 <= 0.0) { + break label$1 + } + $9 = 1 << $5; + $12 = $9 + -1 | 0; + $10 = 0 - $9 | 0; + frexp($6, $8 + 12 | 0); + $2 = HEAP32[$8 + 12 >> 2]; + HEAP32[$8 + 12 >> 2] = $2 + -1; + $5 = $5 - $2 | 0; + HEAP32[$4 >> 2] = $5; + label$4 : { + $7 = -1 << HEAP32[1413] + -1; + $2 = $7 ^ -1; + if (($5 | 0) > ($2 | 0)) { + HEAP32[$4 >> 2] = $2; + $5 = $2; + break label$4; + } + if (($5 | 0) >= ($7 | 0)) { + break label$4 + } + $7 = 1; + break label$1; + } + $7 = 0; + if (($5 | 0) >= 0) { + if (!$1) { + break label$1 + } + $6 = 0.0; + $2 = 0; + while (1) { + $13 = $2 << 2; + $6 = $6 + +Math_fround(HEAPF32[$13 + $0 >> 2] * Math_fround(1 << $5)); + $5 = lround($6); + $5 = ($5 | 0) < ($9 | 0) ? (($5 | 0) < ($10 | 0) ? $10 : $5) : $12; + HEAP32[$3 + $13 >> 2] = $5; + $2 = $2 + 1 | 0; + if (($2 | 0) == ($1 | 0)) { + break label$1 + } + $6 = $6 - +($5 | 0); + $5 = HEAP32[$4 >> 2]; + continue; + }; + } + if ($1) { + $2 = 0; + $14 = Math_fround(1 << 0 - $5); + $6 = 0.0; + while (1) { + $7 = $2 << 2; + $6 = $6 + +Math_fround(HEAPF32[$7 + $0 >> 2] / $14); + $5 = lround($6); + $5 = ($5 | 0) < ($9 | 0) ? (($5 | 0) < ($10 | 0) ? $10 : $5) : $12; + HEAP32[$3 + $7 >> 2] = $5; + $6 = $6 - +($5 | 0); + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + $7 = 0; + HEAP32[$4 >> 2] = 0; + } + global$0 = $8 + 16 | 0; + return $7; + } + + function FLAC__lpc_compute_residual_from_qlp_coefficients($0, $1, $2, $3, $4, $5) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0; + label$1 : { + if ($3 >>> 0 >= 13) { + if (($1 | 0) < 1) { + break label$1 + } + $25 = $3 + -13 | 0; + while (1) { + $17 = 0; + $20 = 0; + $19 = 0; + $22 = 0; + $21 = 0; + $24 = 0; + $23 = 0; + $26 = 0; + $18 = 0; + $16 = 0; + $15 = 0; + $14 = 0; + $13 = 0; + $12 = 0; + $11 = 0; + $10 = 0; + $9 = 0; + $8 = 0; + $7 = 0; + $3 = 0; + label$4 : { + switch ($25 | 0) { + case 19: + $17 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -128 >> 2], HEAP32[$2 + 124 >> 2]); + case 18: + $20 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -124 >> 2], HEAP32[$2 + 120 >> 2]) + $17 | 0; + case 17: + $19 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -120 >> 2], HEAP32[$2 + 116 >> 2]) + $20 | 0; + case 16: + $22 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -116 >> 2], HEAP32[$2 + 112 >> 2]) + $19 | 0; + case 15: + $21 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -112 >> 2], HEAP32[$2 + 108 >> 2]) + $22 | 0; + case 14: + $24 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -108 >> 2], HEAP32[$2 + 104 >> 2]) + $21 | 0; + case 13: + $23 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -104 >> 2], HEAP32[$2 + 100 >> 2]) + $24 | 0; + case 12: + $26 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -100 >> 2], HEAP32[$2 + 96 >> 2]) + $23 | 0; + case 11: + $18 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -96 >> 2], HEAP32[$2 + 92 >> 2]) + $26 | 0; + case 10: + $16 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -92 >> 2], HEAP32[$2 + 88 >> 2]) + $18 | 0; + case 9: + $15 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -88 >> 2], HEAP32[$2 + 84 >> 2]) + $16 | 0; + case 8: + $14 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -84 >> 2], HEAP32[$2 + 80 >> 2]) + $15 | 0; + case 7: + $13 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -80 >> 2], HEAP32[$2 + 76 >> 2]) + $14 | 0; + case 6: + $12 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -76 >> 2], HEAP32[$2 + 72 >> 2]) + $13 | 0; + case 5: + $11 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -72 >> 2], HEAP32[$2 + 68 >> 2]) + $12 | 0; + case 4: + $10 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -68 >> 2], HEAP32[$2 + 64 >> 2]) + $11 | 0; + case 3: + $9 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -64 >> 2], HEAP32[$2 + 60 >> 2]) + $10 | 0; + case 2: + $8 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -60 >> 2], HEAP32[$2 + 56 >> 2]) + $9 | 0; + case 1: + $7 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -56 >> 2], HEAP32[$2 + 52 >> 2]) + $8 | 0; + case 0: + $3 = ($6 << 2) + $0 | 0; + $3 = ((((((((((((Math_imul(HEAP32[$3 + -52 >> 2], HEAP32[$2 + 48 >> 2]) + $7 | 0) + Math_imul(HEAP32[$3 + -48 >> 2], HEAP32[$2 + 44 >> 2]) | 0) + Math_imul(HEAP32[$3 + -44 >> 2], HEAP32[$2 + 40 >> 2]) | 0) + Math_imul(HEAP32[$3 + -40 >> 2], HEAP32[$2 + 36 >> 2]) | 0) + Math_imul(HEAP32[$3 + -36 >> 2], HEAP32[$2 + 32 >> 2]) | 0) + Math_imul(HEAP32[$3 + -32 >> 2], HEAP32[$2 + 28 >> 2]) | 0) + Math_imul(HEAP32[$3 + -28 >> 2], HEAP32[$2 + 24 >> 2]) | 0) + Math_imul(HEAP32[$3 + -24 >> 2], HEAP32[$2 + 20 >> 2]) | 0) + Math_imul(HEAP32[$3 + -20 >> 2], HEAP32[$2 + 16 >> 2]) | 0) + Math_imul(HEAP32[$3 + -16 >> 2], HEAP32[$2 + 12 >> 2]) | 0) + Math_imul(HEAP32[$3 + -12 >> 2], HEAP32[$2 + 8 >> 2]) | 0) + Math_imul(HEAP32[$3 + -8 >> 2], HEAP32[$2 + 4 >> 2]) | 0) + Math_imul(HEAP32[$3 + -4 >> 2], HEAP32[$2 >> 2]) | 0; + break; + default: + break label$4; + }; + } + $7 = $6 << 2; + HEAP32[$7 + $5 >> 2] = HEAP32[$0 + $7 >> 2] - ($3 >> $4); + $6 = $6 + 1 | 0; + if (($6 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 9) { + if ($3 >>> 0 >= 11) { + if (($3 | 0) != 12) { + if (($1 | 0) < 1) { + break label$1 + } + $15 = HEAP32[$0 + -4 >> 2]; + $6 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $7 = HEAP32[$0 + -16 >> 2]; + $8 = HEAP32[$0 + -20 >> 2]; + $9 = HEAP32[$0 + -24 >> 2]; + $10 = HEAP32[$0 + -28 >> 2]; + $11 = HEAP32[$0 + -32 >> 2]; + $12 = HEAP32[$0 + -36 >> 2]; + $13 = HEAP32[$0 + -40 >> 2]; + $16 = HEAP32[$0 + -44 >> 2]; + $18 = HEAP32[$2 >> 2]; + $17 = HEAP32[$2 + 4 >> 2]; + $20 = HEAP32[$2 + 8 >> 2]; + $19 = HEAP32[$2 + 12 >> 2]; + $22 = HEAP32[$2 + 16 >> 2]; + $21 = HEAP32[$2 + 20 >> 2]; + $24 = HEAP32[$2 + 24 >> 2]; + $23 = HEAP32[$2 + 28 >> 2]; + $26 = HEAP32[$2 + 32 >> 2]; + $25 = HEAP32[$2 + 36 >> 2]; + $28 = HEAP32[$2 + 40 >> 2]; + $2 = 0; + while (1) { + $14 = $13; + $13 = $12; + $12 = $11; + $11 = $10; + $10 = $9; + $9 = $8; + $8 = $7; + $7 = $3; + $3 = $6; + $6 = $15; + $27 = $2 << 2; + $15 = HEAP32[$27 + $0 >> 2]; + HEAP32[$5 + $27 >> 2] = $15 - ((((((((((Math_imul($14, $25) + Math_imul($16, $28) | 0) + Math_imul($13, $26) | 0) + Math_imul($12, $23) | 0) + Math_imul($11, $24) | 0) + Math_imul($10, $21) | 0) + Math_imul($9, $22) | 0) + Math_imul($8, $19) | 0) + Math_imul($7, $20) | 0) + Math_imul($3, $17) | 0) + Math_imul($6, $18) >> $4); + $16 = $14; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $16 = HEAP32[$0 + -4 >> 2]; + $6 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $7 = HEAP32[$0 + -16 >> 2]; + $8 = HEAP32[$0 + -20 >> 2]; + $9 = HEAP32[$0 + -24 >> 2]; + $10 = HEAP32[$0 + -28 >> 2]; + $11 = HEAP32[$0 + -32 >> 2]; + $12 = HEAP32[$0 + -36 >> 2]; + $13 = HEAP32[$0 + -40 >> 2]; + $14 = HEAP32[$0 + -44 >> 2]; + $18 = HEAP32[$0 + -48 >> 2]; + $17 = HEAP32[$2 >> 2]; + $20 = HEAP32[$2 + 4 >> 2]; + $19 = HEAP32[$2 + 8 >> 2]; + $22 = HEAP32[$2 + 12 >> 2]; + $21 = HEAP32[$2 + 16 >> 2]; + $24 = HEAP32[$2 + 20 >> 2]; + $23 = HEAP32[$2 + 24 >> 2]; + $26 = HEAP32[$2 + 28 >> 2]; + $25 = HEAP32[$2 + 32 >> 2]; + $28 = HEAP32[$2 + 36 >> 2]; + $27 = HEAP32[$2 + 40 >> 2]; + $30 = HEAP32[$2 + 44 >> 2]; + $2 = 0; + while (1) { + $15 = $14; + $14 = $13; + $13 = $12; + $12 = $11; + $11 = $10; + $10 = $9; + $9 = $8; + $8 = $7; + $7 = $3; + $3 = $6; + $6 = $16; + $29 = $2 << 2; + $16 = HEAP32[$29 + $0 >> 2]; + HEAP32[$5 + $29 >> 2] = $16 - (((((((((((Math_imul($15, $27) + Math_imul($18, $30) | 0) + Math_imul($14, $28) | 0) + Math_imul($13, $25) | 0) + Math_imul($12, $26) | 0) + Math_imul($11, $23) | 0) + Math_imul($10, $24) | 0) + Math_imul($9, $21) | 0) + Math_imul($8, $22) | 0) + Math_imul($7, $19) | 0) + Math_imul($3, $20) | 0) + Math_imul($6, $17) >> $4); + $18 = $15; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 10) { + if (($1 | 0) < 1) { + break label$1 + } + $13 = HEAP32[$0 + -4 >> 2]; + $6 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $7 = HEAP32[$0 + -16 >> 2]; + $8 = HEAP32[$0 + -20 >> 2]; + $9 = HEAP32[$0 + -24 >> 2]; + $10 = HEAP32[$0 + -28 >> 2]; + $11 = HEAP32[$0 + -32 >> 2]; + $14 = HEAP32[$0 + -36 >> 2]; + $16 = HEAP32[$2 >> 2]; + $15 = HEAP32[$2 + 4 >> 2]; + $18 = HEAP32[$2 + 8 >> 2]; + $17 = HEAP32[$2 + 12 >> 2]; + $20 = HEAP32[$2 + 16 >> 2]; + $19 = HEAP32[$2 + 20 >> 2]; + $22 = HEAP32[$2 + 24 >> 2]; + $21 = HEAP32[$2 + 28 >> 2]; + $24 = HEAP32[$2 + 32 >> 2]; + $2 = 0; + while (1) { + $12 = $11; + $11 = $10; + $10 = $9; + $9 = $8; + $8 = $7; + $7 = $3; + $3 = $6; + $6 = $13; + $23 = $2 << 2; + $13 = HEAP32[$23 + $0 >> 2]; + HEAP32[$5 + $23 >> 2] = $13 - ((((((((Math_imul($12, $21) + Math_imul($14, $24) | 0) + Math_imul($11, $22) | 0) + Math_imul($10, $19) | 0) + Math_imul($9, $20) | 0) + Math_imul($8, $17) | 0) + Math_imul($7, $18) | 0) + Math_imul($3, $15) | 0) + Math_imul($6, $16) >> $4); + $14 = $12; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $14 = HEAP32[$0 + -4 >> 2]; + $6 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $7 = HEAP32[$0 + -16 >> 2]; + $8 = HEAP32[$0 + -20 >> 2]; + $9 = HEAP32[$0 + -24 >> 2]; + $10 = HEAP32[$0 + -28 >> 2]; + $11 = HEAP32[$0 + -32 >> 2]; + $12 = HEAP32[$0 + -36 >> 2]; + $15 = HEAP32[$0 + -40 >> 2]; + $16 = HEAP32[$2 >> 2]; + $18 = HEAP32[$2 + 4 >> 2]; + $17 = HEAP32[$2 + 8 >> 2]; + $20 = HEAP32[$2 + 12 >> 2]; + $19 = HEAP32[$2 + 16 >> 2]; + $22 = HEAP32[$2 + 20 >> 2]; + $21 = HEAP32[$2 + 24 >> 2]; + $24 = HEAP32[$2 + 28 >> 2]; + $23 = HEAP32[$2 + 32 >> 2]; + $26 = HEAP32[$2 + 36 >> 2]; + $2 = 0; + while (1) { + $13 = $12; + $12 = $11; + $11 = $10; + $10 = $9; + $9 = $8; + $8 = $7; + $7 = $3; + $3 = $6; + $6 = $14; + $25 = $2 << 2; + $14 = HEAP32[$25 + $0 >> 2]; + HEAP32[$5 + $25 >> 2] = $14 - (((((((((Math_imul($13, $23) + Math_imul($15, $26) | 0) + Math_imul($12, $24) | 0) + Math_imul($11, $21) | 0) + Math_imul($10, $22) | 0) + Math_imul($9, $19) | 0) + Math_imul($8, $20) | 0) + Math_imul($7, $17) | 0) + Math_imul($3, $18) | 0) + Math_imul($6, $16) >> $4); + $15 = $13; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 5) { + if ($3 >>> 0 >= 7) { + if (($3 | 0) != 8) { + if (($1 | 0) < 1) { + break label$1 + } + $11 = HEAP32[$0 + -4 >> 2]; + $6 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $7 = HEAP32[$0 + -16 >> 2]; + $8 = HEAP32[$0 + -20 >> 2]; + $9 = HEAP32[$0 + -24 >> 2]; + $12 = HEAP32[$0 + -28 >> 2]; + $13 = HEAP32[$2 >> 2]; + $14 = HEAP32[$2 + 4 >> 2]; + $16 = HEAP32[$2 + 8 >> 2]; + $15 = HEAP32[$2 + 12 >> 2]; + $18 = HEAP32[$2 + 16 >> 2]; + $17 = HEAP32[$2 + 20 >> 2]; + $20 = HEAP32[$2 + 24 >> 2]; + $2 = 0; + while (1) { + $10 = $9; + $9 = $8; + $8 = $7; + $7 = $3; + $3 = $6; + $6 = $11; + $19 = $2 << 2; + $11 = HEAP32[$19 + $0 >> 2]; + HEAP32[$5 + $19 >> 2] = $11 - ((((((Math_imul($10, $17) + Math_imul($12, $20) | 0) + Math_imul($9, $18) | 0) + Math_imul($8, $15) | 0) + Math_imul($7, $16) | 0) + Math_imul($3, $14) | 0) + Math_imul($6, $13) >> $4); + $12 = $10; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $12 = HEAP32[$0 + -4 >> 2]; + $6 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $7 = HEAP32[$0 + -16 >> 2]; + $8 = HEAP32[$0 + -20 >> 2]; + $9 = HEAP32[$0 + -24 >> 2]; + $10 = HEAP32[$0 + -28 >> 2]; + $13 = HEAP32[$0 + -32 >> 2]; + $14 = HEAP32[$2 >> 2]; + $16 = HEAP32[$2 + 4 >> 2]; + $15 = HEAP32[$2 + 8 >> 2]; + $18 = HEAP32[$2 + 12 >> 2]; + $17 = HEAP32[$2 + 16 >> 2]; + $20 = HEAP32[$2 + 20 >> 2]; + $19 = HEAP32[$2 + 24 >> 2]; + $22 = HEAP32[$2 + 28 >> 2]; + $2 = 0; + while (1) { + $11 = $10; + $10 = $9; + $9 = $8; + $8 = $7; + $7 = $3; + $3 = $6; + $6 = $12; + $21 = $2 << 2; + $12 = HEAP32[$21 + $0 >> 2]; + HEAP32[$5 + $21 >> 2] = $12 - (((((((Math_imul($11, $19) + Math_imul($13, $22) | 0) + Math_imul($10, $20) | 0) + Math_imul($9, $17) | 0) + Math_imul($8, $18) | 0) + Math_imul($7, $15) | 0) + Math_imul($3, $16) | 0) + Math_imul($6, $14) >> $4); + $13 = $11; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 6) { + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$0 + -4 >> 2]; + $6 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $7 = HEAP32[$0 + -16 >> 2]; + $10 = HEAP32[$0 + -20 >> 2]; + $11 = HEAP32[$2 >> 2]; + $12 = HEAP32[$2 + 4 >> 2]; + $13 = HEAP32[$2 + 8 >> 2]; + $14 = HEAP32[$2 + 12 >> 2]; + $16 = HEAP32[$2 + 16 >> 2]; + $2 = 0; + while (1) { + $8 = $7; + $7 = $3; + $3 = $6; + $6 = $9; + $15 = $2 << 2; + $9 = HEAP32[$15 + $0 >> 2]; + HEAP32[$5 + $15 >> 2] = $9 - ((((Math_imul($8, $14) + Math_imul($10, $16) | 0) + Math_imul($7, $13) | 0) + Math_imul($3, $12) | 0) + Math_imul($6, $11) >> $4); + $10 = $8; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $10 = HEAP32[$0 + -4 >> 2]; + $6 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $7 = HEAP32[$0 + -16 >> 2]; + $8 = HEAP32[$0 + -20 >> 2]; + $11 = HEAP32[$0 + -24 >> 2]; + $12 = HEAP32[$2 >> 2]; + $13 = HEAP32[$2 + 4 >> 2]; + $14 = HEAP32[$2 + 8 >> 2]; + $16 = HEAP32[$2 + 12 >> 2]; + $15 = HEAP32[$2 + 16 >> 2]; + $18 = HEAP32[$2 + 20 >> 2]; + $2 = 0; + while (1) { + $9 = $8; + $8 = $7; + $7 = $3; + $3 = $6; + $6 = $10; + $17 = $2 << 2; + $10 = HEAP32[$17 + $0 >> 2]; + HEAP32[$5 + $17 >> 2] = $10 - (((((Math_imul($9, $15) + Math_imul($11, $18) | 0) + Math_imul($8, $16) | 0) + Math_imul($7, $14) | 0) + Math_imul($3, $13) | 0) + Math_imul($6, $12) >> $4); + $11 = $9; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 3) { + if (($3 | 0) != 4) { + if (($1 | 0) < 1) { + break label$1 + } + $7 = HEAP32[$0 + -4 >> 2]; + $6 = HEAP32[$0 + -8 >> 2]; + $8 = HEAP32[$0 + -12 >> 2]; + $9 = HEAP32[$2 >> 2]; + $10 = HEAP32[$2 + 4 >> 2]; + $11 = HEAP32[$2 + 8 >> 2]; + $2 = 0; + while (1) { + $3 = $6; + $6 = $7; + $12 = $2 << 2; + $7 = HEAP32[$12 + $0 >> 2]; + HEAP32[$5 + $12 >> 2] = $7 - ((Math_imul($3, $10) + Math_imul($8, $11) | 0) + Math_imul($6, $9) >> $4); + $8 = $3; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $8 = HEAP32[$0 + -4 >> 2]; + $6 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $9 = HEAP32[$0 + -16 >> 2]; + $10 = HEAP32[$2 >> 2]; + $11 = HEAP32[$2 + 4 >> 2]; + $12 = HEAP32[$2 + 8 >> 2]; + $13 = HEAP32[$2 + 12 >> 2]; + $2 = 0; + while (1) { + $7 = $3; + $3 = $6; + $6 = $8; + $14 = $2 << 2; + $8 = HEAP32[$14 + $0 >> 2]; + HEAP32[$5 + $14 >> 2] = $8 - (((Math_imul($7, $12) + Math_imul($9, $13) | 0) + Math_imul($3, $11) | 0) + Math_imul($6, $10) >> $4); + $9 = $7; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 2) { + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$0 + -4 >> 2]; + $3 = HEAP32[$2 >> 2]; + $2 = 0; + while (1) { + $7 = Math_imul($3, $6); + $8 = $2 << 2; + $6 = HEAP32[$8 + $0 >> 2]; + HEAP32[$5 + $8 >> 2] = $6 - ($7 >> $4); + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $3 = HEAP32[$0 + -4 >> 2]; + $7 = HEAP32[$0 + -8 >> 2]; + $8 = HEAP32[$2 >> 2]; + $9 = HEAP32[$2 + 4 >> 2]; + $2 = 0; + while (1) { + $6 = $3; + $10 = $2 << 2; + $3 = HEAP32[$10 + $0 >> 2]; + HEAP32[$5 + $10 >> 2] = $3 - (Math_imul($6, $8) + Math_imul($7, $9) >> $4); + $7 = $6; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__lpc_compute_residual_from_qlp_coefficients_wide($0, $1, $2, $3, $4, $5) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; + label$1 : { + if ($3 >>> 0 >= 13) { + if (($1 | 0) < 1) { + break label$1 + } + $18 = $4; + $12 = $3 + -13 | 0; + while (1) { + $4 = 0; + $3 = 0; + label$4 : { + switch ($12 | 0) { + case 19: + $3 = HEAP32[(($15 << 2) + $0 | 0) + -128 >> 2]; + $4 = $3; + $7 = $3 >> 31; + $3 = HEAP32[$2 + 124 >> 2]; + $4 = __wasm_i64_mul($4, $7, $3, $3 >> 31); + $3 = i64toi32_i32$HIGH_BITS; + case 18: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -124 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 120 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 17: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -120 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 116 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 16: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -116 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 112 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 15: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -112 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 108 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 14: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -108 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 104 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 13: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -104 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 100 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 12: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -100 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 96 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 11: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -96 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 92 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 10: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -92 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 88 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 9: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -88 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 84 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 8: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -84 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 80 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 7: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -80 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 76 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 6: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -76 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 72 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 5: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -72 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 68 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 4: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -68 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 64 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 3: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -64 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 60 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 2: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -60 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 56 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 1: + $7 = HEAP32[(($15 << 2) + $0 | 0) + -56 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 52 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 0: + $8 = ($15 << 2) + $0 | 0; + $7 = HEAP32[$8 + -52 >> 2]; + $6 = $7; + $9 = $7 >> 31; + $7 = HEAP32[$2 + 48 >> 2]; + $7 = __wasm_i64_mul($6, $9, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -48 >> 2]; + $4 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 44 >> 2]; + $3 = __wasm_i64_mul($4, $9, $3, $3 >> 31); + $4 = $3 + $7 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -44 >> 2]; + $7 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 40 >> 2]; + $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -40 >> 2]; + $7 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 36 >> 2]; + $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -36 >> 2]; + $7 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 32 >> 2]; + $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -32 >> 2]; + $7 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 28 >> 2]; + $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -28 >> 2]; + $7 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 24 >> 2]; + $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -24 >> 2]; + $7 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 20 >> 2]; + $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -20 >> 2]; + $7 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 16 >> 2]; + $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -16 >> 2]; + $7 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 12 >> 2]; + $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -12 >> 2]; + $7 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 8 >> 2]; + $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -8 >> 2]; + $7 = $3; + $9 = $3 >> 31; + $3 = HEAP32[$2 + 4 >> 2]; + $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$8 + -4 >> 2]; + $7 = $3; + $8 = $3 >> 31; + $3 = HEAP32[$2 >> 2]; + $3 = __wasm_i64_mul($7, $8, $3, $3 >> 31); + $4 = $3 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6; + $3 = $6; + break; + default: + break label$4; + }; + } + $7 = $15 << 2; + $6 = $7 + $5 | 0; + $9 = HEAP32[$0 + $7 >> 2]; + $7 = $3; + $3 = $18; + $8 = $3 & 31; + HEAP32[$6 >> 2] = $9 - (32 <= ($3 & 63) >>> 0 ? $7 >> $8 : ((1 << $8) - 1 & $7) << 32 - $8 | $4 >>> $8); + $15 = $15 + 1 | 0; + if (($15 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 9) { + if ($3 >>> 0 >= 11) { + if (($3 | 0) != 12) { + if (($1 | 0) < 1) { + break label$1 + } + $10 = HEAP32[$0 + -4 >> 2]; + $15 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $18 = HEAP32[$0 + -16 >> 2]; + $7 = HEAP32[$0 + -20 >> 2]; + $12 = HEAP32[$0 + -24 >> 2]; + $8 = HEAP32[$0 + -28 >> 2]; + $9 = HEAP32[$0 + -32 >> 2]; + $11 = HEAP32[$0 + -36 >> 2]; + $17 = HEAP32[$0 + -40 >> 2]; + $13 = HEAP32[$0 + -44 >> 2]; + $6 = HEAP32[$2 >> 2]; + $40 = $6; + $41 = $6 >> 31; + $6 = HEAP32[$2 + 4 >> 2]; + $42 = $6; + $37 = $6 >> 31; + $6 = HEAP32[$2 + 8 >> 2]; + $38 = $6; + $39 = $6 >> 31; + $6 = HEAP32[$2 + 12 >> 2]; + $34 = $6; + $35 = $6 >> 31; + $6 = HEAP32[$2 + 16 >> 2]; + $36 = $6; + $31 = $6 >> 31; + $6 = HEAP32[$2 + 20 >> 2]; + $32 = $6; + $33 = $6 >> 31; + $6 = HEAP32[$2 + 24 >> 2]; + $29 = $6; + $30 = $6 >> 31; + $6 = HEAP32[$2 + 28 >> 2]; + $26 = $6; + $27 = $6 >> 31; + $6 = HEAP32[$2 + 32 >> 2]; + $28 = $6; + $23 = $6 >> 31; + $6 = HEAP32[$2 + 36 >> 2]; + $24 = $6; + $25 = $6 >> 31; + $2 = HEAP32[$2 + 40 >> 2]; + $21 = $2; + $22 = $2 >> 31; + $2 = 0; + while (1) { + $16 = $17; + $17 = $11; + $11 = $9; + $9 = $8; + $8 = $12; + $12 = $7; + $7 = $18; + $18 = $3; + $3 = $15; + $15 = $10; + $6 = $2 << 2; + $20 = $6 + $5 | 0; + $10 = HEAP32[$0 + $6 >> 2]; + $14 = __wasm_i64_mul($16, $16 >> 31, $24, $25); + $6 = i64toi32_i32$HIGH_BITS; + $13 = __wasm_i64_mul($13, $13 >> 31, $21, $22); + $14 = $13 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $13 = __wasm_i64_mul($17, $17 >> 31, $28, $23); + $14 = $13 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $13 = __wasm_i64_mul($11, $11 >> 31, $26, $27); + $14 = $13 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $13 = __wasm_i64_mul($9, $9 >> 31, $29, $30); + $14 = $13 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $13 = __wasm_i64_mul($8, $8 >> 31, $32, $33); + $14 = $13 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $13 = __wasm_i64_mul($12, $12 >> 31, $36, $31); + $14 = $13 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $13 = __wasm_i64_mul($7, $7 >> 31, $34, $35); + $14 = $13 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $13 = __wasm_i64_mul($18, $18 >> 31, $38, $39); + $14 = $13 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $13 = __wasm_i64_mul($3, $3 >> 31, $42, $37); + $14 = $13 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $13 = __wasm_i64_mul($15, $15 >> 31, $40, $41); + $14 = $13 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $13 = $6; + $6 = $4; + $19 = $6 & 31; + HEAP32[$20 >> 2] = $10 - (32 <= ($6 & 63) >>> 0 ? $13 >> $19 : ((1 << $19) - 1 & $13) << 32 - $19 | $14 >>> $19); + $13 = $16; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $13 = HEAP32[$0 + -4 >> 2]; + $15 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $18 = HEAP32[$0 + -16 >> 2]; + $7 = HEAP32[$0 + -20 >> 2]; + $12 = HEAP32[$0 + -24 >> 2]; + $8 = HEAP32[$0 + -28 >> 2]; + $9 = HEAP32[$0 + -32 >> 2]; + $11 = HEAP32[$0 + -36 >> 2]; + $17 = HEAP32[$0 + -40 >> 2]; + $16 = HEAP32[$0 + -44 >> 2]; + $6 = HEAP32[$0 + -48 >> 2]; + $10 = HEAP32[$2 >> 2]; + $43 = $10; + $44 = $10 >> 31; + $10 = HEAP32[$2 + 4 >> 2]; + $45 = $10; + $40 = $10 >> 31; + $10 = HEAP32[$2 + 8 >> 2]; + $41 = $10; + $42 = $10 >> 31; + $10 = HEAP32[$2 + 12 >> 2]; + $37 = $10; + $38 = $10 >> 31; + $10 = HEAP32[$2 + 16 >> 2]; + $39 = $10; + $34 = $10 >> 31; + $10 = HEAP32[$2 + 20 >> 2]; + $35 = $10; + $36 = $10 >> 31; + $10 = HEAP32[$2 + 24 >> 2]; + $31 = $10; + $32 = $10 >> 31; + $10 = HEAP32[$2 + 28 >> 2]; + $33 = $10; + $29 = $10 >> 31; + $10 = HEAP32[$2 + 32 >> 2]; + $30 = $10; + $26 = $10 >> 31; + $10 = HEAP32[$2 + 36 >> 2]; + $27 = $10; + $28 = $10 >> 31; + $10 = HEAP32[$2 + 40 >> 2]; + $23 = $10; + $24 = $10 >> 31; + $2 = HEAP32[$2 + 44 >> 2]; + $25 = $2; + $21 = $2 >> 31; + $2 = 0; + while (1) { + $10 = $16; + $16 = $17; + $17 = $11; + $11 = $9; + $9 = $8; + $8 = $12; + $12 = $7; + $7 = $18; + $18 = $3; + $3 = $15; + $15 = $13; + $13 = $2 << 2; + $22 = $13 + $5 | 0; + $13 = HEAP32[$0 + $13 >> 2]; + $14 = __wasm_i64_mul($10, $10 >> 31, $23, $24); + $19 = i64toi32_i32$HIGH_BITS; + $20 = $14; + $14 = __wasm_i64_mul($6, $6 >> 31, $25, $21); + $20 = $20 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $19 | 0; + $6 = $20 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = __wasm_i64_mul($16, $16 >> 31, $27, $28); + $19 = $14 + $20 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = __wasm_i64_mul($17, $17 >> 31, $30, $26); + $19 = $14 + $19 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = __wasm_i64_mul($11, $11 >> 31, $33, $29); + $19 = $14 + $19 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = __wasm_i64_mul($9, $9 >> 31, $31, $32); + $19 = $14 + $19 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = __wasm_i64_mul($8, $8 >> 31, $35, $36); + $19 = $14 + $19 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = __wasm_i64_mul($12, $12 >> 31, $39, $34); + $19 = $14 + $19 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = __wasm_i64_mul($7, $7 >> 31, $37, $38); + $19 = $14 + $19 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = __wasm_i64_mul($18, $18 >> 31, $41, $42); + $19 = $14 + $19 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = __wasm_i64_mul($3, $3 >> 31, $45, $40); + $19 = $14 + $19 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = __wasm_i64_mul($15, $15 >> 31, $43, $44); + $19 = $14 + $19 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = $6; + $6 = $4; + $20 = $6 & 31; + HEAP32[$22 >> 2] = $13 - (32 <= ($6 & 63) >>> 0 ? $14 >> $20 : ((1 << $20) - 1 & $14) << 32 - $20 | $19 >>> $20); + $6 = $10; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 10) { + if (($1 | 0) < 1) { + break label$1 + } + $17 = HEAP32[$0 + -4 >> 2]; + $15 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $18 = HEAP32[$0 + -16 >> 2]; + $7 = HEAP32[$0 + -20 >> 2]; + $12 = HEAP32[$0 + -24 >> 2]; + $8 = HEAP32[$0 + -28 >> 2]; + $9 = HEAP32[$0 + -32 >> 2]; + $16 = HEAP32[$0 + -36 >> 2]; + $11 = HEAP32[$2 >> 2]; + $34 = $11; + $35 = $11 >> 31; + $11 = HEAP32[$2 + 4 >> 2]; + $36 = $11; + $31 = $11 >> 31; + $11 = HEAP32[$2 + 8 >> 2]; + $32 = $11; + $33 = $11 >> 31; + $11 = HEAP32[$2 + 12 >> 2]; + $29 = $11; + $30 = $11 >> 31; + $11 = HEAP32[$2 + 16 >> 2]; + $26 = $11; + $27 = $11 >> 31; + $11 = HEAP32[$2 + 20 >> 2]; + $28 = $11; + $23 = $11 >> 31; + $11 = HEAP32[$2 + 24 >> 2]; + $24 = $11; + $25 = $11 >> 31; + $11 = HEAP32[$2 + 28 >> 2]; + $21 = $11; + $22 = $11 >> 31; + $2 = HEAP32[$2 + 32 >> 2]; + $20 = $2; + $19 = $2 >> 31; + $2 = 0; + while (1) { + $11 = $9; + $9 = $8; + $8 = $12; + $12 = $7; + $7 = $18; + $18 = $3; + $3 = $15; + $15 = $17; + $6 = $2 << 2; + $14 = $6 + $5 | 0; + $17 = HEAP32[$0 + $6 >> 2]; + $10 = __wasm_i64_mul($11, $11 >> 31, $21, $22); + $6 = i64toi32_i32$HIGH_BITS; + $16 = __wasm_i64_mul($16, $16 >> 31, $20, $19); + $10 = $16 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = __wasm_i64_mul($9, $9 >> 31, $24, $25); + $10 = $16 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = __wasm_i64_mul($8, $8 >> 31, $28, $23); + $10 = $16 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = __wasm_i64_mul($12, $12 >> 31, $26, $27); + $10 = $16 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = __wasm_i64_mul($7, $7 >> 31, $29, $30); + $10 = $16 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = __wasm_i64_mul($18, $18 >> 31, $32, $33); + $10 = $16 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = __wasm_i64_mul($3, $3 >> 31, $36, $31); + $10 = $16 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = __wasm_i64_mul($15, $15 >> 31, $34, $35); + $10 = $16 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = $6; + $6 = $4; + $13 = $6 & 31; + HEAP32[$14 >> 2] = $17 - (32 <= ($6 & 63) >>> 0 ? $16 >> $13 : ((1 << $13) - 1 & $16) << 32 - $13 | $10 >>> $13); + $16 = $11; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $16 = HEAP32[$0 + -4 >> 2]; + $15 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $18 = HEAP32[$0 + -16 >> 2]; + $7 = HEAP32[$0 + -20 >> 2]; + $12 = HEAP32[$0 + -24 >> 2]; + $8 = HEAP32[$0 + -28 >> 2]; + $9 = HEAP32[$0 + -32 >> 2]; + $11 = HEAP32[$0 + -36 >> 2]; + $10 = HEAP32[$0 + -40 >> 2]; + $6 = HEAP32[$2 >> 2]; + $37 = $6; + $38 = $6 >> 31; + $6 = HEAP32[$2 + 4 >> 2]; + $39 = $6; + $34 = $6 >> 31; + $6 = HEAP32[$2 + 8 >> 2]; + $35 = $6; + $36 = $6 >> 31; + $6 = HEAP32[$2 + 12 >> 2]; + $31 = $6; + $32 = $6 >> 31; + $6 = HEAP32[$2 + 16 >> 2]; + $33 = $6; + $29 = $6 >> 31; + $6 = HEAP32[$2 + 20 >> 2]; + $30 = $6; + $26 = $6 >> 31; + $6 = HEAP32[$2 + 24 >> 2]; + $27 = $6; + $28 = $6 >> 31; + $6 = HEAP32[$2 + 28 >> 2]; + $23 = $6; + $24 = $6 >> 31; + $6 = HEAP32[$2 + 32 >> 2]; + $25 = $6; + $21 = $6 >> 31; + $2 = HEAP32[$2 + 36 >> 2]; + $22 = $2; + $20 = $2 >> 31; + $2 = 0; + while (1) { + $17 = $11; + $11 = $9; + $9 = $8; + $8 = $12; + $12 = $7; + $7 = $18; + $18 = $3; + $3 = $15; + $15 = $16; + $6 = $2 << 2; + $19 = $6 + $5 | 0; + $16 = HEAP32[$0 + $6 >> 2]; + $13 = __wasm_i64_mul($17, $17 >> 31, $25, $21); + $6 = i64toi32_i32$HIGH_BITS; + $10 = __wasm_i64_mul($10, $10 >> 31, $22, $20); + $13 = $10 + $13 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = __wasm_i64_mul($11, $11 >> 31, $23, $24); + $13 = $10 + $13 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = __wasm_i64_mul($9, $9 >> 31, $27, $28); + $13 = $10 + $13 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = __wasm_i64_mul($8, $8 >> 31, $30, $26); + $13 = $10 + $13 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = __wasm_i64_mul($12, $12 >> 31, $33, $29); + $13 = $10 + $13 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = __wasm_i64_mul($7, $7 >> 31, $31, $32); + $13 = $10 + $13 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = __wasm_i64_mul($18, $18 >> 31, $35, $36); + $13 = $10 + $13 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = __wasm_i64_mul($3, $3 >> 31, $39, $34); + $13 = $10 + $13 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = __wasm_i64_mul($15, $15 >> 31, $37, $38); + $13 = $10 + $13 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = $6; + $6 = $4; + $14 = $6 & 31; + HEAP32[$19 >> 2] = $16 - (32 <= ($6 & 63) >>> 0 ? $10 >> $14 : ((1 << $14) - 1 & $10) << 32 - $14 | $13 >>> $14); + $10 = $17; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 5) { + if ($3 >>> 0 >= 7) { + if (($3 | 0) != 8) { + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$0 + -4 >> 2]; + $15 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $18 = HEAP32[$0 + -16 >> 2]; + $7 = HEAP32[$0 + -20 >> 2]; + $12 = HEAP32[$0 + -24 >> 2]; + $11 = HEAP32[$0 + -28 >> 2]; + $8 = HEAP32[$2 >> 2]; + $29 = $8; + $30 = $8 >> 31; + $8 = HEAP32[$2 + 4 >> 2]; + $26 = $8; + $27 = $8 >> 31; + $8 = HEAP32[$2 + 8 >> 2]; + $28 = $8; + $23 = $8 >> 31; + $8 = HEAP32[$2 + 12 >> 2]; + $24 = $8; + $25 = $8 >> 31; + $8 = HEAP32[$2 + 16 >> 2]; + $21 = $8; + $22 = $8 >> 31; + $8 = HEAP32[$2 + 20 >> 2]; + $20 = $8; + $19 = $8 >> 31; + $2 = HEAP32[$2 + 24 >> 2]; + $14 = $2; + $13 = $2 >> 31; + $2 = 0; + while (1) { + $8 = $12; + $12 = $7; + $7 = $18; + $18 = $3; + $3 = $15; + $15 = $9; + $9 = $2 << 2; + $10 = $9 + $5 | 0; + $9 = HEAP32[$0 + $9 >> 2]; + $17 = __wasm_i64_mul($8, $8 >> 31, $20, $19); + $6 = i64toi32_i32$HIGH_BITS; + $11 = __wasm_i64_mul($11, $11 >> 31, $14, $13); + $17 = $11 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $11 = __wasm_i64_mul($12, $12 >> 31, $21, $22); + $17 = $11 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $11 = __wasm_i64_mul($7, $7 >> 31, $24, $25); + $17 = $11 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $11 = __wasm_i64_mul($18, $18 >> 31, $28, $23); + $17 = $11 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $11 = __wasm_i64_mul($3, $3 >> 31, $26, $27); + $17 = $11 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $11 = __wasm_i64_mul($15, $15 >> 31, $29, $30); + $17 = $11 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $16 = $4 & 31; + HEAP32[$10 >> 2] = $9 - (32 <= ($4 & 63) >>> 0 ? $6 >> $16 : ((1 << $16) - 1 & $6) << 32 - $16 | $17 >>> $16); + $11 = $8; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $11 = HEAP32[$0 + -4 >> 2]; + $15 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $18 = HEAP32[$0 + -16 >> 2]; + $7 = HEAP32[$0 + -20 >> 2]; + $12 = HEAP32[$0 + -24 >> 2]; + $8 = HEAP32[$0 + -28 >> 2]; + $17 = HEAP32[$0 + -32 >> 2]; + $9 = HEAP32[$2 >> 2]; + $31 = $9; + $32 = $9 >> 31; + $9 = HEAP32[$2 + 4 >> 2]; + $33 = $9; + $29 = $9 >> 31; + $9 = HEAP32[$2 + 8 >> 2]; + $30 = $9; + $26 = $9 >> 31; + $9 = HEAP32[$2 + 12 >> 2]; + $27 = $9; + $28 = $9 >> 31; + $9 = HEAP32[$2 + 16 >> 2]; + $23 = $9; + $24 = $9 >> 31; + $9 = HEAP32[$2 + 20 >> 2]; + $25 = $9; + $21 = $9 >> 31; + $9 = HEAP32[$2 + 24 >> 2]; + $22 = $9; + $20 = $9 >> 31; + $2 = HEAP32[$2 + 28 >> 2]; + $19 = $2; + $14 = $2 >> 31; + $2 = 0; + while (1) { + $9 = $8; + $8 = $12; + $12 = $7; + $7 = $18; + $18 = $3; + $3 = $15; + $15 = $11; + $11 = $2 << 2; + $13 = $11 + $5 | 0; + $11 = HEAP32[$0 + $11 >> 2]; + $16 = __wasm_i64_mul($9, $9 >> 31, $22, $20); + $6 = i64toi32_i32$HIGH_BITS; + $17 = __wasm_i64_mul($17, $17 >> 31, $19, $14); + $16 = $17 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = __wasm_i64_mul($8, $8 >> 31, $25, $21); + $16 = $17 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = __wasm_i64_mul($12, $12 >> 31, $23, $24); + $16 = $17 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = __wasm_i64_mul($7, $7 >> 31, $27, $28); + $16 = $17 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = __wasm_i64_mul($18, $18 >> 31, $30, $26); + $16 = $17 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = __wasm_i64_mul($3, $3 >> 31, $33, $29); + $16 = $17 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = __wasm_i64_mul($15, $15 >> 31, $31, $32); + $16 = $17 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = $6; + $6 = $4; + $10 = $6 & 31; + HEAP32[$13 >> 2] = $11 - (32 <= ($6 & 63) >>> 0 ? $17 >> $10 : ((1 << $10) - 1 & $17) << 32 - $10 | $16 >>> $10); + $17 = $9; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 6) { + if (($1 | 0) < 1) { + break label$1 + } + $12 = HEAP32[$0 + -4 >> 2]; + $15 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $18 = HEAP32[$0 + -16 >> 2]; + $8 = HEAP32[$0 + -20 >> 2]; + $7 = HEAP32[$2 >> 2]; + $23 = $7; + $24 = $7 >> 31; + $7 = HEAP32[$2 + 4 >> 2]; + $25 = $7; + $21 = $7 >> 31; + $7 = HEAP32[$2 + 8 >> 2]; + $22 = $7; + $20 = $7 >> 31; + $7 = HEAP32[$2 + 12 >> 2]; + $19 = $7; + $14 = $7 >> 31; + $2 = HEAP32[$2 + 16 >> 2]; + $13 = $2; + $10 = $2 >> 31; + $2 = 0; + while (1) { + $7 = $18; + $18 = $3; + $3 = $15; + $15 = $12; + $12 = $2 << 2; + $16 = $12 + $5 | 0; + $12 = HEAP32[$0 + $12 >> 2]; + $11 = __wasm_i64_mul($7, $7 >> 31, $19, $14); + $9 = i64toi32_i32$HIGH_BITS; + $8 = __wasm_i64_mul($8, $8 >> 31, $13, $10); + $11 = $8 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $9 | 0; + $6 = $11 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6; + $8 = __wasm_i64_mul($18, $18 >> 31, $22, $20); + $9 = $8 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $9 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6; + $8 = __wasm_i64_mul($3, $3 >> 31, $25, $21); + $9 = $8 + $9 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $9 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6; + $8 = __wasm_i64_mul($15, $15 >> 31, $23, $24); + $9 = $8 + $9 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $9 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6; + $11 = $4 & 31; + HEAP32[$16 >> 2] = $12 - (32 <= ($4 & 63) >>> 0 ? $6 >> $11 : ((1 << $11) - 1 & $6) << 32 - $11 | $9 >>> $11); + $8 = $7; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $8 = HEAP32[$0 + -4 >> 2]; + $15 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $18 = HEAP32[$0 + -16 >> 2]; + $7 = HEAP32[$0 + -20 >> 2]; + $9 = HEAP32[$0 + -24 >> 2]; + $12 = HEAP32[$2 >> 2]; + $27 = $12; + $28 = $12 >> 31; + $12 = HEAP32[$2 + 4 >> 2]; + $23 = $12; + $24 = $12 >> 31; + $12 = HEAP32[$2 + 8 >> 2]; + $25 = $12; + $21 = $12 >> 31; + $12 = HEAP32[$2 + 12 >> 2]; + $22 = $12; + $20 = $12 >> 31; + $12 = HEAP32[$2 + 16 >> 2]; + $19 = $12; + $14 = $12 >> 31; + $2 = HEAP32[$2 + 20 >> 2]; + $13 = $2; + $10 = $2 >> 31; + $2 = 0; + while (1) { + $12 = $7; + $7 = $18; + $18 = $3; + $3 = $15; + $15 = $8; + $8 = $2 << 2; + $16 = $8 + $5 | 0; + $8 = HEAP32[$0 + $8 >> 2]; + $6 = __wasm_i64_mul($12, $12 >> 31, $19, $14); + $11 = i64toi32_i32$HIGH_BITS; + $9 = __wasm_i64_mul($9, $9 >> 31, $13, $10); + $26 = $9 + $6 | 0; + $6 = i64toi32_i32$HIGH_BITS + $11 | 0; + $6 = $26 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6; + $9 = __wasm_i64_mul($7, $7 >> 31, $22, $20); + $11 = $9 + $26 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6; + $9 = __wasm_i64_mul($18, $18 >> 31, $25, $21); + $11 = $9 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6; + $9 = __wasm_i64_mul($3, $3 >> 31, $23, $24); + $11 = $9 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6; + $9 = __wasm_i64_mul($15, $15 >> 31, $27, $28); + $11 = $9 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6; + $17 = $4 & 31; + HEAP32[$16 >> 2] = $8 - (32 <= ($4 & 63) >>> 0 ? $6 >> $17 : ((1 << $17) - 1 & $6) << 32 - $17 | $11 >>> $17); + $9 = $12; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 3) { + if (($3 | 0) != 4) { + if (($1 | 0) < 1) { + break label$1 + } + $18 = HEAP32[$0 + -4 >> 2]; + $15 = HEAP32[$0 + -8 >> 2]; + $7 = HEAP32[$0 + -12 >> 2]; + $3 = HEAP32[$2 >> 2]; + $19 = $3; + $14 = $3 >> 31; + $3 = HEAP32[$2 + 4 >> 2]; + $13 = $3; + $10 = $3 >> 31; + $2 = HEAP32[$2 + 8 >> 2]; + $16 = $2; + $17 = $2 >> 31; + $2 = 0; + while (1) { + $3 = $15; + $15 = $18; + $18 = $2 << 2; + $11 = $18 + $5 | 0; + $18 = HEAP32[$0 + $18 >> 2]; + $9 = $18; + $8 = __wasm_i64_mul($3, $3 >> 31, $13, $10); + $12 = i64toi32_i32$HIGH_BITS; + $7 = __wasm_i64_mul($7, $7 >> 31, $16, $17); + $8 = $7 + $8 | 0; + $6 = i64toi32_i32$HIGH_BITS + $12 | 0; + $6 = $8 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6; + $7 = __wasm_i64_mul($15, $15 >> 31, $19, $14); + $12 = $7 + $8 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $12 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6; + $7 = $4; + $8 = $7 & 31; + HEAP32[$11 >> 2] = $9 - (32 <= ($7 & 63) >>> 0 ? $6 >> $8 : ((1 << $8) - 1 & $6) << 32 - $8 | $12 >>> $8); + $7 = $3; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $7 = HEAP32[$0 + -4 >> 2]; + $15 = HEAP32[$0 + -8 >> 2]; + $3 = HEAP32[$0 + -12 >> 2]; + $12 = HEAP32[$0 + -16 >> 2]; + $18 = HEAP32[$2 >> 2]; + $21 = $18; + $22 = $18 >> 31; + $18 = HEAP32[$2 + 4 >> 2]; + $20 = $18; + $19 = $18 >> 31; + $18 = HEAP32[$2 + 8 >> 2]; + $14 = $18; + $13 = $14 >> 31; + $2 = HEAP32[$2 + 12 >> 2]; + $10 = $2; + $16 = $2 >> 31; + $2 = 0; + while (1) { + $18 = $3; + $3 = $15; + $15 = $7; + $7 = $2 << 2; + $17 = $7 + $5 | 0; + $7 = HEAP32[$0 + $7 >> 2]; + $9 = __wasm_i64_mul($18, $18 >> 31, $14, $13); + $8 = i64toi32_i32$HIGH_BITS; + $12 = __wasm_i64_mul($12, $12 >> 31, $10, $16); + $9 = $12 + $9 | 0; + $6 = i64toi32_i32$HIGH_BITS + $8 | 0; + $6 = $9 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6; + $12 = __wasm_i64_mul($3, $3 >> 31, $20, $19); + $8 = $12 + $9 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $8 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6; + $12 = __wasm_i64_mul($15, $15 >> 31, $21, $22); + $8 = $12 + $8 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $8 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6; + $9 = $4 & 31; + HEAP32[$17 >> 2] = $7 - (32 <= ($4 & 63) >>> 0 ? $6 >> $9 : ((1 << $9) - 1 & $6) << 32 - $9 | $8 >>> $9); + $12 = $18; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 2) { + if (($1 | 0) < 1) { + break label$1 + } + $15 = HEAP32[$0 + -4 >> 2]; + $2 = HEAP32[$2 >> 2]; + $9 = $2; + $8 = $2 >> 31; + $2 = 0; + while (1) { + $3 = $2 << 2; + $6 = $3 + $5 | 0; + $18 = HEAP32[$0 + $3 >> 2]; + $15 = __wasm_i64_mul($15, $15 >> 31, $9, $8); + $7 = i64toi32_i32$HIGH_BITS; + $3 = $4; + $12 = $3 & 31; + HEAP32[$6 >> 2] = $18 - (32 <= ($3 & 63) >>> 0 ? $7 >> $12 : ((1 << $12) - 1 & $7) << 32 - $12 | $15 >>> $12); + $15 = $18; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $3 = HEAP32[$0 + -4 >> 2]; + $18 = HEAP32[$0 + -8 >> 2]; + $15 = HEAP32[$2 >> 2]; + $10 = $15; + $16 = $10 >> 31; + $2 = HEAP32[$2 + 4 >> 2]; + $17 = $2; + $11 = $2 >> 31; + $2 = 0; + while (1) { + $15 = $3; + $3 = $2 << 2; + $9 = $3 + $5 | 0; + $3 = HEAP32[$0 + $3 >> 2]; + $12 = __wasm_i64_mul($15, $15 >> 31, $10, $16); + $7 = i64toi32_i32$HIGH_BITS; + $18 = __wasm_i64_mul($18, $18 >> 31, $17, $11); + $12 = $18 + $12 | 0; + $6 = i64toi32_i32$HIGH_BITS + $7 | 0; + $6 = $12 >>> 0 < $18 >>> 0 ? $6 + 1 | 0 : $6; + $7 = $12; + $12 = $4 & 31; + HEAP32[$9 >> 2] = $3 - (32 <= ($4 & 63) >>> 0 ? $6 >> $12 : ((1 << $12) - 1 & $6) << 32 - $12 | $7 >>> $12); + $18 = $15; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__lpc_restore_signal($0, $1, $2, $3, $4, $5) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0; + label$1 : { + if ($3 >>> 0 >= 13) { + if (($1 | 0) < 1) { + break label$1 + } + $17 = $3 + -13 | 0; + while (1) { + $25 = 0; + $26 = 0; + $23 = 0; + $24 = 0; + $21 = 0; + $22 = 0; + $19 = 0; + $20 = 0; + $18 = 0; + $15 = 0; + $12 = 0; + $10 = 0; + $14 = 0; + $9 = 0; + $13 = 0; + $7 = 0; + $16 = 0; + $11 = 0; + $8 = 0; + $3 = 0; + label$4 : { + switch ($17 | 0) { + case 19: + $25 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -128 >> 2], HEAP32[$2 + 124 >> 2]); + case 18: + $26 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -124 >> 2], HEAP32[$2 + 120 >> 2]) + $25 | 0; + case 17: + $23 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -120 >> 2], HEAP32[$2 + 116 >> 2]) + $26 | 0; + case 16: + $24 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -116 >> 2], HEAP32[$2 + 112 >> 2]) + $23 | 0; + case 15: + $21 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -112 >> 2], HEAP32[$2 + 108 >> 2]) + $24 | 0; + case 14: + $22 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -108 >> 2], HEAP32[$2 + 104 >> 2]) + $21 | 0; + case 13: + $19 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -104 >> 2], HEAP32[$2 + 100 >> 2]) + $22 | 0; + case 12: + $20 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -100 >> 2], HEAP32[$2 + 96 >> 2]) + $19 | 0; + case 11: + $18 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -96 >> 2], HEAP32[$2 + 92 >> 2]) + $20 | 0; + case 10: + $15 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -92 >> 2], HEAP32[$2 + 88 >> 2]) + $18 | 0; + case 9: + $12 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -88 >> 2], HEAP32[$2 + 84 >> 2]) + $15 | 0; + case 8: + $10 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -84 >> 2], HEAP32[$2 + 80 >> 2]) + $12 | 0; + case 7: + $14 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -80 >> 2], HEAP32[$2 + 76 >> 2]) + $10 | 0; + case 6: + $9 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -76 >> 2], HEAP32[$2 + 72 >> 2]) + $14 | 0; + case 5: + $13 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -72 >> 2], HEAP32[$2 + 68 >> 2]) + $9 | 0; + case 4: + $7 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -68 >> 2], HEAP32[$2 + 64 >> 2]) + $13 | 0; + case 3: + $16 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -64 >> 2], HEAP32[$2 + 60 >> 2]) + $7 | 0; + case 2: + $11 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -60 >> 2], HEAP32[$2 + 56 >> 2]) + $16 | 0; + case 1: + $8 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -56 >> 2], HEAP32[$2 + 52 >> 2]) + $11 | 0; + case 0: + $3 = ($6 << 2) + $5 | 0; + $3 = ((((((((((((Math_imul(HEAP32[$3 + -52 >> 2], HEAP32[$2 + 48 >> 2]) + $8 | 0) + Math_imul(HEAP32[$3 + -48 >> 2], HEAP32[$2 + 44 >> 2]) | 0) + Math_imul(HEAP32[$3 + -44 >> 2], HEAP32[$2 + 40 >> 2]) | 0) + Math_imul(HEAP32[$3 + -40 >> 2], HEAP32[$2 + 36 >> 2]) | 0) + Math_imul(HEAP32[$3 + -36 >> 2], HEAP32[$2 + 32 >> 2]) | 0) + Math_imul(HEAP32[$3 + -32 >> 2], HEAP32[$2 + 28 >> 2]) | 0) + Math_imul(HEAP32[$3 + -28 >> 2], HEAP32[$2 + 24 >> 2]) | 0) + Math_imul(HEAP32[$3 + -24 >> 2], HEAP32[$2 + 20 >> 2]) | 0) + Math_imul(HEAP32[$3 + -20 >> 2], HEAP32[$2 + 16 >> 2]) | 0) + Math_imul(HEAP32[$3 + -16 >> 2], HEAP32[$2 + 12 >> 2]) | 0) + Math_imul(HEAP32[$3 + -12 >> 2], HEAP32[$2 + 8 >> 2]) | 0) + Math_imul(HEAP32[$3 + -8 >> 2], HEAP32[$2 + 4 >> 2]) | 0) + Math_imul(HEAP32[$3 + -4 >> 2], HEAP32[$2 >> 2]) | 0; + break; + default: + break label$4; + }; + } + $8 = $6 << 2; + HEAP32[$8 + $5 >> 2] = HEAP32[$0 + $8 >> 2] + ($3 >> $4); + $6 = $6 + 1 | 0; + if (($6 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 9) { + if ($3 >>> 0 >= 11) { + if (($3 | 0) != 12) { + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $8 = HEAP32[$5 + -12 >> 2]; + $11 = HEAP32[$5 + -16 >> 2]; + $16 = HEAP32[$5 + -20 >> 2]; + $7 = HEAP32[$5 + -24 >> 2]; + $13 = HEAP32[$5 + -28 >> 2]; + $9 = HEAP32[$5 + -32 >> 2]; + $14 = HEAP32[$5 + -36 >> 2]; + $10 = HEAP32[$5 + -40 >> 2]; + $12 = HEAP32[$5 + -44 >> 2]; + $27 = HEAP32[$2 >> 2]; + $28 = HEAP32[$2 + 4 >> 2]; + $25 = HEAP32[$2 + 8 >> 2]; + $26 = HEAP32[$2 + 12 >> 2]; + $23 = HEAP32[$2 + 16 >> 2]; + $24 = HEAP32[$2 + 20 >> 2]; + $21 = HEAP32[$2 + 24 >> 2]; + $22 = HEAP32[$2 + 28 >> 2]; + $19 = HEAP32[$2 + 32 >> 2]; + $20 = HEAP32[$2 + 36 >> 2]; + $18 = HEAP32[$2 + 40 >> 2]; + $2 = 0; + while (1) { + $17 = $10; + $12 = Math_imul($10, $20) + Math_imul($12, $18) | 0; + $10 = $14; + $12 = $12 + Math_imul($19, $10) | 0; + $14 = $9; + $12 = Math_imul($9, $22) + $12 | 0; + $9 = $13; + $12 = $12 + Math_imul($21, $9) | 0; + $13 = $7; + $12 = Math_imul($7, $24) + $12 | 0; + $7 = $16; + $12 = $12 + Math_imul($23, $7) | 0; + $16 = $11; + $12 = Math_imul($11, $26) + $12 | 0; + $11 = $8; + $15 = Math_imul($8, $25) + $12 | 0; + $8 = $3; + $12 = $2 << 2; + $15 = Math_imul($3, $28) + $15 | 0; + $3 = $6; + $6 = HEAP32[$12 + $0 >> 2] + ($15 + Math_imul($27, $3) >> $4) | 0; + HEAP32[$5 + $12 >> 2] = $6; + $12 = $17; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $8 = HEAP32[$5 + -12 >> 2]; + $11 = HEAP32[$5 + -16 >> 2]; + $16 = HEAP32[$5 + -20 >> 2]; + $7 = HEAP32[$5 + -24 >> 2]; + $13 = HEAP32[$5 + -28 >> 2]; + $9 = HEAP32[$5 + -32 >> 2]; + $14 = HEAP32[$5 + -36 >> 2]; + $10 = HEAP32[$5 + -40 >> 2]; + $12 = HEAP32[$5 + -44 >> 2]; + $15 = HEAP32[$5 + -48 >> 2]; + $29 = HEAP32[$2 >> 2]; + $30 = HEAP32[$2 + 4 >> 2]; + $27 = HEAP32[$2 + 8 >> 2]; + $28 = HEAP32[$2 + 12 >> 2]; + $25 = HEAP32[$2 + 16 >> 2]; + $26 = HEAP32[$2 + 20 >> 2]; + $23 = HEAP32[$2 + 24 >> 2]; + $24 = HEAP32[$2 + 28 >> 2]; + $21 = HEAP32[$2 + 32 >> 2]; + $22 = HEAP32[$2 + 36 >> 2]; + $19 = HEAP32[$2 + 40 >> 2]; + $20 = HEAP32[$2 + 44 >> 2]; + $2 = 0; + while (1) { + $17 = $12; + $15 = Math_imul($12, $19) + Math_imul($15, $20) | 0; + $12 = $10; + $15 = Math_imul($10, $22) + $15 | 0; + $10 = $14; + $15 = $15 + Math_imul($21, $10) | 0; + $14 = $9; + $15 = Math_imul($9, $24) + $15 | 0; + $9 = $13; + $15 = $15 + Math_imul($23, $9) | 0; + $13 = $7; + $15 = Math_imul($7, $26) + $15 | 0; + $7 = $16; + $15 = $15 + Math_imul($25, $7) | 0; + $16 = $11; + $15 = Math_imul($11, $28) + $15 | 0; + $11 = $8; + $18 = Math_imul($8, $27) + $15 | 0; + $8 = $3; + $15 = $2 << 2; + $18 = Math_imul($3, $30) + $18 | 0; + $3 = $6; + $6 = HEAP32[$15 + $0 >> 2] + ($18 + Math_imul($29, $3) >> $4) | 0; + HEAP32[$5 + $15 >> 2] = $6; + $15 = $17; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 10) { + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $8 = HEAP32[$5 + -12 >> 2]; + $11 = HEAP32[$5 + -16 >> 2]; + $16 = HEAP32[$5 + -20 >> 2]; + $7 = HEAP32[$5 + -24 >> 2]; + $13 = HEAP32[$5 + -28 >> 2]; + $9 = HEAP32[$5 + -32 >> 2]; + $14 = HEAP32[$5 + -36 >> 2]; + $23 = HEAP32[$2 >> 2]; + $24 = HEAP32[$2 + 4 >> 2]; + $21 = HEAP32[$2 + 8 >> 2]; + $22 = HEAP32[$2 + 12 >> 2]; + $19 = HEAP32[$2 + 16 >> 2]; + $20 = HEAP32[$2 + 20 >> 2]; + $18 = HEAP32[$2 + 24 >> 2]; + $15 = HEAP32[$2 + 28 >> 2]; + $17 = HEAP32[$2 + 32 >> 2]; + $2 = 0; + while (1) { + $10 = $9; + $14 = Math_imul($9, $15) + Math_imul($14, $17) | 0; + $9 = $13; + $14 = $14 + Math_imul($18, $9) | 0; + $13 = $7; + $14 = Math_imul($7, $20) + $14 | 0; + $7 = $16; + $14 = $14 + Math_imul($19, $7) | 0; + $16 = $11; + $14 = Math_imul($11, $22) + $14 | 0; + $11 = $8; + $12 = Math_imul($8, $21) + $14 | 0; + $8 = $3; + $14 = $2 << 2; + $12 = Math_imul($3, $24) + $12 | 0; + $3 = $6; + $6 = HEAP32[$14 + $0 >> 2] + ($12 + Math_imul($23, $3) >> $4) | 0; + HEAP32[$5 + $14 >> 2] = $6; + $14 = $10; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $8 = HEAP32[$5 + -12 >> 2]; + $11 = HEAP32[$5 + -16 >> 2]; + $16 = HEAP32[$5 + -20 >> 2]; + $7 = HEAP32[$5 + -24 >> 2]; + $13 = HEAP32[$5 + -28 >> 2]; + $9 = HEAP32[$5 + -32 >> 2]; + $14 = HEAP32[$5 + -36 >> 2]; + $10 = HEAP32[$5 + -40 >> 2]; + $25 = HEAP32[$2 >> 2]; + $26 = HEAP32[$2 + 4 >> 2]; + $23 = HEAP32[$2 + 8 >> 2]; + $24 = HEAP32[$2 + 12 >> 2]; + $21 = HEAP32[$2 + 16 >> 2]; + $22 = HEAP32[$2 + 20 >> 2]; + $19 = HEAP32[$2 + 24 >> 2]; + $20 = HEAP32[$2 + 28 >> 2]; + $18 = HEAP32[$2 + 32 >> 2]; + $15 = HEAP32[$2 + 36 >> 2]; + $2 = 0; + while (1) { + $12 = $14; + $10 = Math_imul($18, $12) + Math_imul($10, $15) | 0; + $14 = $9; + $10 = Math_imul($9, $20) + $10 | 0; + $9 = $13; + $10 = $10 + Math_imul($19, $9) | 0; + $13 = $7; + $10 = Math_imul($7, $22) + $10 | 0; + $7 = $16; + $10 = $10 + Math_imul($21, $7) | 0; + $16 = $11; + $10 = Math_imul($11, $24) + $10 | 0; + $11 = $8; + $17 = Math_imul($8, $23) + $10 | 0; + $8 = $3; + $10 = $2 << 2; + $17 = Math_imul($3, $26) + $17 | 0; + $3 = $6; + $6 = HEAP32[$10 + $0 >> 2] + ($17 + Math_imul($25, $3) >> $4) | 0; + HEAP32[$5 + $10 >> 2] = $6; + $10 = $12; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 5) { + if ($3 >>> 0 >= 7) { + if (($3 | 0) != 8) { + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $8 = HEAP32[$5 + -12 >> 2]; + $11 = HEAP32[$5 + -16 >> 2]; + $16 = HEAP32[$5 + -20 >> 2]; + $7 = HEAP32[$5 + -24 >> 2]; + $13 = HEAP32[$5 + -28 >> 2]; + $19 = HEAP32[$2 >> 2]; + $20 = HEAP32[$2 + 4 >> 2]; + $18 = HEAP32[$2 + 8 >> 2]; + $15 = HEAP32[$2 + 12 >> 2]; + $17 = HEAP32[$2 + 16 >> 2]; + $12 = HEAP32[$2 + 20 >> 2]; + $10 = HEAP32[$2 + 24 >> 2]; + $2 = 0; + while (1) { + $9 = $7; + $13 = Math_imul($7, $12) + Math_imul($10, $13) | 0; + $7 = $16; + $13 = $13 + Math_imul($17, $7) | 0; + $16 = $11; + $13 = Math_imul($11, $15) + $13 | 0; + $11 = $8; + $14 = Math_imul($8, $18) + $13 | 0; + $8 = $3; + $13 = $2 << 2; + $14 = Math_imul($3, $20) + $14 | 0; + $3 = $6; + $6 = HEAP32[$13 + $0 >> 2] + ($14 + Math_imul($19, $3) >> $4) | 0; + HEAP32[$5 + $13 >> 2] = $6; + $13 = $9; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $8 = HEAP32[$5 + -12 >> 2]; + $11 = HEAP32[$5 + -16 >> 2]; + $16 = HEAP32[$5 + -20 >> 2]; + $7 = HEAP32[$5 + -24 >> 2]; + $13 = HEAP32[$5 + -28 >> 2]; + $9 = HEAP32[$5 + -32 >> 2]; + $21 = HEAP32[$2 >> 2]; + $22 = HEAP32[$2 + 4 >> 2]; + $19 = HEAP32[$2 + 8 >> 2]; + $20 = HEAP32[$2 + 12 >> 2]; + $18 = HEAP32[$2 + 16 >> 2]; + $15 = HEAP32[$2 + 20 >> 2]; + $17 = HEAP32[$2 + 24 >> 2]; + $12 = HEAP32[$2 + 28 >> 2]; + $2 = 0; + while (1) { + $14 = $13; + $9 = Math_imul($17, $13) + Math_imul($9, $12) | 0; + $13 = $7; + $9 = Math_imul($7, $15) + $9 | 0; + $7 = $16; + $9 = $9 + Math_imul($18, $7) | 0; + $16 = $11; + $9 = Math_imul($11, $20) + $9 | 0; + $11 = $8; + $10 = Math_imul($8, $19) + $9 | 0; + $8 = $3; + $9 = $2 << 2; + $10 = Math_imul($3, $22) + $10 | 0; + $3 = $6; + $6 = HEAP32[$9 + $0 >> 2] + ($10 + Math_imul($21, $3) >> $4) | 0; + HEAP32[$5 + $9 >> 2] = $6; + $9 = $14; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 6) { + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $8 = HEAP32[$5 + -12 >> 2]; + $11 = HEAP32[$5 + -16 >> 2]; + $16 = HEAP32[$5 + -20 >> 2]; + $17 = HEAP32[$2 >> 2]; + $12 = HEAP32[$2 + 4 >> 2]; + $10 = HEAP32[$2 + 8 >> 2]; + $14 = HEAP32[$2 + 12 >> 2]; + $9 = HEAP32[$2 + 16 >> 2]; + $2 = 0; + while (1) { + $7 = $11; + $16 = Math_imul($14, $7) + Math_imul($9, $16) | 0; + $11 = $8; + $13 = Math_imul($8, $10) + $16 | 0; + $8 = $3; + $16 = $2 << 2; + $13 = Math_imul($3, $12) + $13 | 0; + $3 = $6; + $6 = HEAP32[$16 + $0 >> 2] + ($13 + Math_imul($17, $3) >> $4) | 0; + HEAP32[$5 + $16 >> 2] = $6; + $16 = $7; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $8 = HEAP32[$5 + -12 >> 2]; + $11 = HEAP32[$5 + -16 >> 2]; + $16 = HEAP32[$5 + -20 >> 2]; + $7 = HEAP32[$5 + -24 >> 2]; + $18 = HEAP32[$2 >> 2]; + $15 = HEAP32[$2 + 4 >> 2]; + $17 = HEAP32[$2 + 8 >> 2]; + $12 = HEAP32[$2 + 12 >> 2]; + $10 = HEAP32[$2 + 16 >> 2]; + $14 = HEAP32[$2 + 20 >> 2]; + $2 = 0; + while (1) { + $13 = $16; + $7 = Math_imul($10, $13) + Math_imul($7, $14) | 0; + $16 = $11; + $7 = Math_imul($11, $12) + $7 | 0; + $11 = $8; + $9 = Math_imul($8, $17) + $7 | 0; + $8 = $3; + $7 = $2 << 2; + $9 = Math_imul($3, $15) + $9 | 0; + $3 = $6; + $6 = HEAP32[$7 + $0 >> 2] + ($9 + Math_imul($18, $3) >> $4) | 0; + HEAP32[$5 + $7 >> 2] = $6; + $7 = $13; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 3) { + if (($3 | 0) != 4) { + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $8 = HEAP32[$5 + -12 >> 2]; + $9 = HEAP32[$2 >> 2]; + $13 = HEAP32[$2 + 4 >> 2]; + $7 = HEAP32[$2 + 8 >> 2]; + $2 = 0; + while (1) { + $11 = $3; + $16 = $2 << 2; + $8 = Math_imul($3, $13) + Math_imul($8, $7) | 0; + $3 = $6; + $6 = HEAP32[$16 + $0 >> 2] + ($8 + Math_imul($9, $3) >> $4) | 0; + HEAP32[$5 + $16 >> 2] = $6; + $8 = $11; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $8 = HEAP32[$5 + -12 >> 2]; + $11 = HEAP32[$5 + -16 >> 2]; + $10 = HEAP32[$2 >> 2]; + $14 = HEAP32[$2 + 4 >> 2]; + $9 = HEAP32[$2 + 8 >> 2]; + $13 = HEAP32[$2 + 12 >> 2]; + $2 = 0; + while (1) { + $16 = $8; + $7 = Math_imul($8, $9) + Math_imul($11, $13) | 0; + $8 = $3; + $11 = $2 << 2; + $7 = Math_imul($3, $14) + $7 | 0; + $3 = $6; + $6 = HEAP32[$11 + $0 >> 2] + ($7 + Math_imul($10, $3) >> $4) | 0; + HEAP32[$5 + $11 >> 2] = $6; + $11 = $16; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 2) { + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $8 = HEAP32[$2 >> 2]; + $2 = 0; + while (1) { + $3 = $2 << 2; + $6 = HEAP32[$3 + $0 >> 2] + (Math_imul($6, $8) >> $4) | 0; + HEAP32[$3 + $5 >> 2] = $6; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $6 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $7 = HEAP32[$2 >> 2]; + $16 = HEAP32[$2 + 4 >> 2]; + $2 = 0; + while (1) { + $8 = $6; + $11 = $2 << 2; + $6 = HEAP32[$11 + $0 >> 2] + (Math_imul($6, $7) + Math_imul($3, $16) >> $4) | 0; + HEAP32[$5 + $11 >> 2] = $6; + $3 = $8; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__lpc_restore_signal_wide($0, $1, $2, $3, $4, $5) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + label$1 : { + if ($3 >>> 0 >= 13) { + if (($1 | 0) < 1) { + break label$1 + } + $13 = $4; + $12 = $3 + -13 | 0; + while (1) { + $4 = 0; + $3 = 0; + label$4 : { + switch ($12 | 0) { + case 19: + $3 = HEAP32[(($9 << 2) + $5 | 0) + -128 >> 2]; + $4 = $3; + $7 = $3 >> 31; + $3 = HEAP32[$2 + 124 >> 2]; + $4 = __wasm_i64_mul($4, $7, $3, $3 >> 31); + $3 = i64toi32_i32$HIGH_BITS; + case 18: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -124 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 120 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 17: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -120 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 116 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 16: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -116 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 112 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 15: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -112 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 108 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 14: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -108 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 104 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 13: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -104 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 100 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 12: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -100 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 96 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 11: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -96 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 92 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 10: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -92 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 88 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 9: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -88 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 84 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 8: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -84 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 80 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 7: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -80 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 76 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 6: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -76 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 72 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 5: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -72 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 68 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 4: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -68 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 64 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 3: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -64 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 60 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 2: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -60 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 56 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 1: + $7 = HEAP32[(($9 << 2) + $5 | 0) + -56 >> 2]; + $6 = $7; + $8 = $7 >> 31; + $7 = HEAP32[$2 + 52 >> 2]; + $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $7; + $3 = $6; + case 0: + $7 = ($9 << 2) + $5 | 0; + $8 = HEAP32[$7 + -52 >> 2]; + $6 = $8; + $10 = $8 >> 31; + $8 = HEAP32[$2 + 48 >> 2]; + $8 = __wasm_i64_mul($6, $10, $8, $8 >> 31) + $4 | 0; + $6 = $3 + i64toi32_i32$HIGH_BITS | 0; + $6 = $8 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $3 = HEAP32[$7 + -48 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 44 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $4 + $8 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -44 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 40 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -40 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 36 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -36 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 32 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -32 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 28 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -28 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 24 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -24 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 20 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -20 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 16 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -16 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 12 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -12 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 8 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -8 >> 2]; + $4 = $3; + $10 = $3 >> 31; + $3 = HEAP32[$2 + 4 >> 2]; + $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = HEAP32[$7 + -4 >> 2]; + $4 = $3; + $7 = $3 >> 31; + $3 = HEAP32[$2 >> 2]; + $4 = __wasm_i64_mul($4, $7, $3, $3 >> 31); + $3 = $8 + $4 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6; + $4 = $3; + $3 = $6; + break; + default: + break label$4; + }; + } + $7 = $9 << 2; + $10 = $7 + $5 | 0; + $6 = HEAP32[$0 + $7 >> 2]; + $8 = $4; + $4 = $13; + $7 = $4 & 31; + HEAP32[$10 >> 2] = $6 + (32 <= ($4 & 63) >>> 0 ? $3 >> $7 : ((1 << $7) - 1 & $3) << 32 - $7 | $8 >>> $7); + $9 = $9 + 1 | 0; + if (($9 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 9) { + if ($3 >>> 0 >= 11) { + if (($3 | 0) != 12) { + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$5 + -12 >> 2]; + $7 = HEAP32[$5 + -16 >> 2]; + $8 = HEAP32[$5 + -20 >> 2]; + $12 = HEAP32[$5 + -24 >> 2]; + $10 = HEAP32[$5 + -28 >> 2]; + $11 = HEAP32[$5 + -32 >> 2]; + $14 = HEAP32[$5 + -36 >> 2]; + $16 = HEAP32[$5 + -40 >> 2]; + $15 = HEAP32[$5 + -44 >> 2]; + $6 = HEAP32[$2 >> 2]; + $17 = $6; + $25 = $6 >> 31; + $6 = HEAP32[$2 + 4 >> 2]; + $26 = $6; + $27 = $6 >> 31; + $6 = HEAP32[$2 + 8 >> 2]; + $24 = $6; + $29 = $6 >> 31; + $6 = HEAP32[$2 + 12 >> 2]; + $30 = $6; + $22 = $6 >> 31; + $6 = HEAP32[$2 + 16 >> 2]; + $31 = $6; + $32 = $6 >> 31; + $6 = HEAP32[$2 + 20 >> 2]; + $28 = $6; + $34 = $6 >> 31; + $6 = HEAP32[$2 + 24 >> 2]; + $35 = $6; + $21 = $6 >> 31; + $6 = HEAP32[$2 + 28 >> 2]; + $36 = $6; + $37 = $6 >> 31; + $6 = HEAP32[$2 + 32 >> 2]; + $33 = $6; + $39 = $6 >> 31; + $6 = HEAP32[$2 + 36 >> 2]; + $40 = $6; + $20 = $6 >> 31; + $2 = HEAP32[$2 + 40 >> 2]; + $41 = $2; + $42 = $2 >> 31; + $2 = 0; + while (1) { + $6 = $2 << 2; + $38 = $6 + $5 | 0; + $43 = HEAP32[$0 + $6 >> 2]; + $18 = $16; + $6 = __wasm_i64_mul($16, $16 >> 31, $40, $20); + $44 = i64toi32_i32$HIGH_BITS; + $16 = $14; + $19 = __wasm_i64_mul($15, $15 >> 31, $41, $42); + $15 = $19 + $6 | 0; + $6 = i64toi32_i32$HIGH_BITS + $44 | 0; + $6 = $15 >>> 0 < $19 >>> 0 ? $6 + 1 | 0 : $6; + $19 = $15; + $15 = __wasm_i64_mul($14, $14 >> 31, $33, $39); + $14 = $19 + $15 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6; + $15 = $14; + $14 = $11; + $19 = $15; + $15 = __wasm_i64_mul($11, $11 >> 31, $36, $37); + $11 = $19 + $15 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $11 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6; + $15 = $11; + $11 = $10; + $10 = $15; + $15 = __wasm_i64_mul($11, $11 >> 31, $35, $21); + $10 = $10 + $15 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6; + $15 = $10; + $10 = $12; + $19 = $15; + $15 = __wasm_i64_mul($12, $12 >> 31, $28, $34); + $12 = $19 + $15 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $12 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6; + $15 = $12; + $12 = $8; + $19 = $15; + $15 = __wasm_i64_mul($8, $8 >> 31, $31, $32); + $8 = $19 + $15 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $8 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6; + $15 = $8; + $8 = $7; + $19 = $15; + $15 = __wasm_i64_mul($7, $7 >> 31, $30, $22); + $7 = $19 + $15 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $7 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6; + $19 = $7; + $7 = $13; + $15 = __wasm_i64_mul($7, $7 >> 31, $24, $29); + $13 = $19 + $15 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6; + $15 = $13; + $13 = $3; + $23 = $38; + $19 = $15; + $15 = __wasm_i64_mul($3, $3 >> 31, $26, $27); + $3 = $19 + $15 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6; + $19 = $3; + $3 = $9; + $15 = __wasm_i64_mul($3, $3 >> 31, $17, $25); + $9 = $19 + $15 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $9 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6; + $38 = $9; + $9 = $4; + $15 = $9 & 31; + $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $15 : ((1 << $15) - 1 & $6) << 32 - $15 | $38 >>> $15) + $43 | 0; + HEAP32[$23 >> 2] = $9; + $15 = $18; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$5 + -12 >> 2]; + $7 = HEAP32[$5 + -16 >> 2]; + $8 = HEAP32[$5 + -20 >> 2]; + $12 = HEAP32[$5 + -24 >> 2]; + $10 = HEAP32[$5 + -28 >> 2]; + $11 = HEAP32[$5 + -32 >> 2]; + $14 = HEAP32[$5 + -36 >> 2]; + $16 = HEAP32[$5 + -40 >> 2]; + $15 = HEAP32[$5 + -44 >> 2]; + $6 = HEAP32[$5 + -48 >> 2]; + $18 = HEAP32[$2 >> 2]; + $25 = $18; + $26 = $18 >> 31; + $18 = HEAP32[$2 + 4 >> 2]; + $27 = $18; + $24 = $18 >> 31; + $18 = HEAP32[$2 + 8 >> 2]; + $29 = $18; + $30 = $18 >> 31; + $18 = HEAP32[$2 + 12 >> 2]; + $22 = $18; + $31 = $18 >> 31; + $18 = HEAP32[$2 + 16 >> 2]; + $32 = $18; + $28 = $18 >> 31; + $18 = HEAP32[$2 + 20 >> 2]; + $34 = $18; + $35 = $18 >> 31; + $18 = HEAP32[$2 + 24 >> 2]; + $21 = $18; + $36 = $18 >> 31; + $18 = HEAP32[$2 + 28 >> 2]; + $37 = $18; + $33 = $18 >> 31; + $18 = HEAP32[$2 + 32 >> 2]; + $39 = $18; + $40 = $18 >> 31; + $18 = HEAP32[$2 + 36 >> 2]; + $20 = $18; + $41 = $18 >> 31; + $18 = HEAP32[$2 + 40 >> 2]; + $42 = $18; + $38 = $18 >> 31; + $2 = HEAP32[$2 + 44 >> 2]; + $43 = $2; + $44 = $2 >> 31; + $2 = 0; + while (1) { + $18 = $2 << 2; + $19 = $18 + $5 | 0; + $46 = HEAP32[$0 + $18 >> 2]; + $18 = $15; + $17 = __wasm_i64_mul($15, $15 >> 31, $42, $38); + $23 = i64toi32_i32$HIGH_BITS; + $15 = $16; + $45 = __wasm_i64_mul($6, $6 >> 31, $43, $44); + $17 = $45 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $23 | 0; + $6 = $17 >>> 0 < $45 >>> 0 ? $6 + 1 | 0 : $6; + $23 = $17; + $17 = __wasm_i64_mul($16, $16 >> 31, $20, $41); + $16 = $23 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = $16; + $16 = $14; + $23 = $17; + $17 = __wasm_i64_mul($14, $14 >> 31, $39, $40); + $14 = $23 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $14 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = $14; + $14 = $11; + $23 = $17; + $17 = __wasm_i64_mul($11, $11 >> 31, $37, $33); + $11 = $23 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $11 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = $11; + $11 = $10; + $10 = $17; + $17 = __wasm_i64_mul($11, $11 >> 31, $21, $36); + $10 = $10 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = $10; + $10 = $12; + $23 = $17; + $17 = __wasm_i64_mul($12, $12 >> 31, $34, $35); + $12 = $23 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $12 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = $12; + $12 = $8; + $23 = $17; + $17 = __wasm_i64_mul($8, $8 >> 31, $32, $28); + $8 = $23 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $8 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = $8; + $8 = $7; + $23 = $17; + $17 = __wasm_i64_mul($7, $7 >> 31, $22, $31); + $7 = $23 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $7 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $23 = $7; + $7 = $13; + $17 = __wasm_i64_mul($7, $7 >> 31, $29, $30); + $13 = $23 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $17 = $13; + $13 = $3; + $23 = $19; + $19 = $17; + $17 = __wasm_i64_mul($3, $3 >> 31, $27, $24); + $3 = $19 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $19 = $3; + $3 = $9; + $17 = __wasm_i64_mul($3, $3 >> 31, $25, $26); + $9 = $19 + $17 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $9 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6; + $19 = $9; + $9 = $4; + $17 = $9 & 31; + $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $17 : ((1 << $17) - 1 & $6) << 32 - $17 | $19 >>> $17) + $46 | 0; + HEAP32[$23 >> 2] = $9; + $6 = $18; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 10) { + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$5 + -12 >> 2]; + $7 = HEAP32[$5 + -16 >> 2]; + $8 = HEAP32[$5 + -20 >> 2]; + $12 = HEAP32[$5 + -24 >> 2]; + $10 = HEAP32[$5 + -28 >> 2]; + $11 = HEAP32[$5 + -32 >> 2]; + $14 = HEAP32[$5 + -36 >> 2]; + $6 = HEAP32[$2 >> 2]; + $15 = $6; + $18 = $6 >> 31; + $6 = HEAP32[$2 + 4 >> 2]; + $17 = $6; + $25 = $6 >> 31; + $6 = HEAP32[$2 + 8 >> 2]; + $26 = $6; + $27 = $6 >> 31; + $6 = HEAP32[$2 + 12 >> 2]; + $24 = $6; + $29 = $6 >> 31; + $6 = HEAP32[$2 + 16 >> 2]; + $30 = $6; + $22 = $6 >> 31; + $6 = HEAP32[$2 + 20 >> 2]; + $31 = $6; + $32 = $6 >> 31; + $6 = HEAP32[$2 + 24 >> 2]; + $28 = $6; + $34 = $6 >> 31; + $6 = HEAP32[$2 + 28 >> 2]; + $35 = $6; + $21 = $6 >> 31; + $2 = HEAP32[$2 + 32 >> 2]; + $36 = $2; + $37 = $2 >> 31; + $2 = 0; + while (1) { + $6 = $2 << 2; + $33 = $6 + $5 | 0; + $39 = HEAP32[$0 + $6 >> 2]; + $16 = $11; + $6 = __wasm_i64_mul($11, $11 >> 31, $35, $21); + $40 = i64toi32_i32$HIGH_BITS; + $11 = $10; + $20 = __wasm_i64_mul($14, $14 >> 31, $36, $37); + $14 = $20 + $6 | 0; + $6 = i64toi32_i32$HIGH_BITS + $40 | 0; + $6 = $14 >>> 0 < $20 >>> 0 ? $6 + 1 | 0 : $6; + $10 = $14; + $14 = __wasm_i64_mul($11, $11 >> 31, $28, $34); + $10 = $10 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = $10; + $10 = $12; + $20 = $14; + $14 = __wasm_i64_mul($12, $12 >> 31, $31, $32); + $12 = $20 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $12 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = $12; + $12 = $8; + $20 = $14; + $14 = __wasm_i64_mul($8, $8 >> 31, $30, $22); + $8 = $20 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $8 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = $8; + $8 = $7; + $20 = $14; + $14 = __wasm_i64_mul($7, $7 >> 31, $24, $29); + $7 = $20 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $7 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $20 = $7; + $7 = $13; + $14 = __wasm_i64_mul($7, $7 >> 31, $26, $27); + $13 = $20 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $14 = $13; + $13 = $3; + $19 = $33; + $20 = $14; + $14 = __wasm_i64_mul($3, $3 >> 31, $17, $25); + $3 = $20 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $20 = $3; + $3 = $9; + $14 = __wasm_i64_mul($3, $3 >> 31, $15, $18); + $9 = $20 + $14 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $9 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6; + $33 = $9; + $9 = $4; + $14 = $9 & 31; + $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $14 : ((1 << $14) - 1 & $6) << 32 - $14 | $33 >>> $14) + $39 | 0; + HEAP32[$19 >> 2] = $9; + $14 = $16; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$5 + -12 >> 2]; + $7 = HEAP32[$5 + -16 >> 2]; + $8 = HEAP32[$5 + -20 >> 2]; + $12 = HEAP32[$5 + -24 >> 2]; + $10 = HEAP32[$5 + -28 >> 2]; + $11 = HEAP32[$5 + -32 >> 2]; + $14 = HEAP32[$5 + -36 >> 2]; + $16 = HEAP32[$5 + -40 >> 2]; + $6 = HEAP32[$2 >> 2]; + $18 = $6; + $17 = $6 >> 31; + $6 = HEAP32[$2 + 4 >> 2]; + $25 = $6; + $26 = $6 >> 31; + $6 = HEAP32[$2 + 8 >> 2]; + $27 = $6; + $24 = $6 >> 31; + $6 = HEAP32[$2 + 12 >> 2]; + $29 = $6; + $30 = $6 >> 31; + $6 = HEAP32[$2 + 16 >> 2]; + $22 = $6; + $31 = $6 >> 31; + $6 = HEAP32[$2 + 20 >> 2]; + $32 = $6; + $28 = $6 >> 31; + $6 = HEAP32[$2 + 24 >> 2]; + $34 = $6; + $35 = $6 >> 31; + $6 = HEAP32[$2 + 28 >> 2]; + $21 = $6; + $36 = $6 >> 31; + $6 = HEAP32[$2 + 32 >> 2]; + $37 = $6; + $33 = $6 >> 31; + $2 = HEAP32[$2 + 36 >> 2]; + $39 = $2; + $40 = $2 >> 31; + $2 = 0; + while (1) { + $6 = $2 << 2; + $20 = $6 + $5 | 0; + $41 = HEAP32[$0 + $6 >> 2]; + $15 = $14; + $6 = __wasm_i64_mul($14, $14 >> 31, $37, $33); + $42 = i64toi32_i32$HIGH_BITS; + $14 = $11; + $38 = __wasm_i64_mul($16, $16 >> 31, $39, $40); + $16 = $38 + $6 | 0; + $6 = i64toi32_i32$HIGH_BITS + $42 | 0; + $6 = $16 >>> 0 < $38 >>> 0 ? $6 + 1 | 0 : $6; + $19 = $16; + $16 = __wasm_i64_mul($11, $11 >> 31, $21, $36); + $11 = $19 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $11 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = $11; + $11 = $10; + $10 = $16; + $16 = __wasm_i64_mul($11, $11 >> 31, $34, $35); + $10 = $10 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = $10; + $10 = $12; + $19 = $16; + $16 = __wasm_i64_mul($12, $12 >> 31, $32, $28); + $12 = $19 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $12 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = $12; + $12 = $8; + $19 = $16; + $16 = __wasm_i64_mul($8, $8 >> 31, $22, $31); + $8 = $19 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $8 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = $8; + $8 = $7; + $19 = $16; + $16 = __wasm_i64_mul($7, $7 >> 31, $29, $30); + $7 = $19 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $7 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $19 = $7; + $7 = $13; + $16 = __wasm_i64_mul($7, $7 >> 31, $27, $24); + $13 = $19 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $16 = $13; + $13 = $3; + $19 = $20; + $20 = $16; + $16 = __wasm_i64_mul($3, $3 >> 31, $25, $26); + $3 = $20 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $20 = $3; + $3 = $9; + $16 = __wasm_i64_mul($3, $3 >> 31, $18, $17); + $9 = $20 + $16 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $9 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6; + $20 = $9; + $9 = $4; + $16 = $9 & 31; + $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $16 : ((1 << $16) - 1 & $6) << 32 - $16 | $20 >>> $16) + $41 | 0; + HEAP32[$19 >> 2] = $9; + $16 = $15; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 5) { + if ($3 >>> 0 >= 7) { + if (($3 | 0) != 8) { + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$5 + -12 >> 2]; + $7 = HEAP32[$5 + -16 >> 2]; + $8 = HEAP32[$5 + -20 >> 2]; + $12 = HEAP32[$5 + -24 >> 2]; + $10 = HEAP32[$5 + -28 >> 2]; + $11 = HEAP32[$2 >> 2]; + $14 = $11; + $16 = $11 >> 31; + $11 = HEAP32[$2 + 4 >> 2]; + $15 = $11; + $18 = $11 >> 31; + $11 = HEAP32[$2 + 8 >> 2]; + $17 = $11; + $25 = $11 >> 31; + $11 = HEAP32[$2 + 12 >> 2]; + $26 = $11; + $27 = $11 >> 31; + $11 = HEAP32[$2 + 16 >> 2]; + $24 = $11; + $29 = $11 >> 31; + $11 = HEAP32[$2 + 20 >> 2]; + $30 = $11; + $22 = $11 >> 31; + $2 = HEAP32[$2 + 24 >> 2]; + $31 = $2; + $32 = $2 >> 31; + $2 = 0; + while (1) { + $11 = $2 << 2; + $28 = $11 + $5 | 0; + $34 = HEAP32[$0 + $11 >> 2]; + $11 = $12; + $6 = __wasm_i64_mul($11, $11 >> 31, $30, $22); + $35 = i64toi32_i32$HIGH_BITS; + $12 = $8; + $21 = __wasm_i64_mul($10, $10 >> 31, $31, $32); + $10 = $21 + $6 | 0; + $6 = i64toi32_i32$HIGH_BITS + $35 | 0; + $6 = $10 >>> 0 < $21 >>> 0 ? $6 + 1 | 0 : $6; + $21 = $10; + $10 = __wasm_i64_mul($8, $8 >> 31, $24, $29); + $8 = $21 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $8 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = $8; + $8 = $7; + $21 = $10; + $10 = __wasm_i64_mul($7, $7 >> 31, $26, $27); + $7 = $21 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $7 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $21 = $7; + $7 = $13; + $10 = __wasm_i64_mul($7, $7 >> 31, $17, $25); + $13 = $21 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $10 = $13; + $13 = $3; + $20 = $28; + $21 = $10; + $10 = __wasm_i64_mul($3, $3 >> 31, $15, $18); + $3 = $21 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $21 = $3; + $3 = $9; + $10 = __wasm_i64_mul($3, $3 >> 31, $14, $16); + $9 = $21 + $10 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $9 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6; + $28 = $9; + $9 = $4; + $10 = $9 & 31; + $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $10 : ((1 << $10) - 1 & $6) << 32 - $10 | $28 >>> $10) + $34 | 0; + HEAP32[$20 >> 2] = $9; + $10 = $11; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$5 + -12 >> 2]; + $7 = HEAP32[$5 + -16 >> 2]; + $8 = HEAP32[$5 + -20 >> 2]; + $12 = HEAP32[$5 + -24 >> 2]; + $10 = HEAP32[$5 + -28 >> 2]; + $11 = HEAP32[$5 + -32 >> 2]; + $6 = HEAP32[$2 >> 2]; + $16 = $6; + $15 = $6 >> 31; + $6 = HEAP32[$2 + 4 >> 2]; + $18 = $6; + $17 = $6 >> 31; + $6 = HEAP32[$2 + 8 >> 2]; + $25 = $6; + $26 = $6 >> 31; + $6 = HEAP32[$2 + 12 >> 2]; + $27 = $6; + $24 = $6 >> 31; + $6 = HEAP32[$2 + 16 >> 2]; + $29 = $6; + $30 = $6 >> 31; + $6 = HEAP32[$2 + 20 >> 2]; + $22 = $6; + $31 = $6 >> 31; + $6 = HEAP32[$2 + 24 >> 2]; + $32 = $6; + $28 = $6 >> 31; + $2 = HEAP32[$2 + 28 >> 2]; + $34 = $2; + $35 = $2 >> 31; + $2 = 0; + while (1) { + $6 = $2 << 2; + $21 = $6 + $5 | 0; + $36 = HEAP32[$0 + $6 >> 2]; + $14 = $10; + $6 = __wasm_i64_mul($10, $10 >> 31, $32, $28); + $37 = i64toi32_i32$HIGH_BITS; + $10 = $12; + $33 = __wasm_i64_mul($11, $11 >> 31, $34, $35); + $11 = $33 + $6 | 0; + $6 = i64toi32_i32$HIGH_BITS + $37 | 0; + $6 = $11 >>> 0 < $33 >>> 0 ? $6 + 1 | 0 : $6; + $20 = $11; + $11 = __wasm_i64_mul($12, $12 >> 31, $22, $31); + $12 = $20 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $12 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $11 = $12; + $12 = $8; + $20 = $11; + $11 = __wasm_i64_mul($8, $8 >> 31, $29, $30); + $8 = $20 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $8 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $11 = $8; + $8 = $7; + $20 = $11; + $11 = __wasm_i64_mul($7, $7 >> 31, $27, $24); + $7 = $20 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $7 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $20 = $7; + $7 = $13; + $11 = __wasm_i64_mul($7, $7 >> 31, $25, $26); + $13 = $20 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $11 = $13; + $13 = $3; + $20 = $21; + $21 = $11; + $11 = __wasm_i64_mul($3, $3 >> 31, $18, $17); + $3 = $21 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $21 = $3; + $3 = $9; + $11 = __wasm_i64_mul($3, $3 >> 31, $16, $15); + $9 = $21 + $11 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $9 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6; + $21 = $9; + $9 = $4; + $11 = $9 & 31; + $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $11 : ((1 << $11) - 1 & $6) << 32 - $11 | $21 >>> $11) + $36 | 0; + HEAP32[$20 >> 2] = $9; + $11 = $14; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 6) { + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$5 + -12 >> 2]; + $7 = HEAP32[$5 + -16 >> 2]; + $8 = HEAP32[$5 + -20 >> 2]; + $12 = HEAP32[$2 >> 2]; + $10 = $12; + $11 = $12 >> 31; + $12 = HEAP32[$2 + 4 >> 2]; + $14 = $12; + $16 = $12 >> 31; + $12 = HEAP32[$2 + 8 >> 2]; + $15 = $12; + $18 = $12 >> 31; + $12 = HEAP32[$2 + 12 >> 2]; + $17 = $12; + $25 = $12 >> 31; + $2 = HEAP32[$2 + 16 >> 2]; + $26 = $2; + $27 = $2 >> 31; + $2 = 0; + while (1) { + $12 = $2 << 2; + $24 = $12 + $5 | 0; + $29 = HEAP32[$0 + $12 >> 2]; + $12 = $7; + $6 = __wasm_i64_mul($7, $7 >> 31, $17, $25); + $30 = i64toi32_i32$HIGH_BITS; + $7 = $13; + $22 = __wasm_i64_mul($8, $8 >> 31, $26, $27); + $8 = $22 + $6 | 0; + $6 = i64toi32_i32$HIGH_BITS + $30 | 0; + $6 = $8 >>> 0 < $22 >>> 0 ? $6 + 1 | 0 : $6; + $13 = $8; + $8 = __wasm_i64_mul($7, $7 >> 31, $15, $18); + $13 = $13 + $8 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $13; + $13 = $3; + $22 = $8; + $8 = __wasm_i64_mul($3, $3 >> 31, $14, $16); + $3 = $22 + $8 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = $9; + $9 = __wasm_i64_mul($3, $3 >> 31, $10, $11); + $8 = $8 + $9 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $8 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6; + $9 = $4 & 31; + $9 = (32 <= ($4 & 63) >>> 0 ? $6 >> $9 : ((1 << $9) - 1 & $6) << 32 - $9 | $8 >>> $9) + $29 | 0; + HEAP32[$24 >> 2] = $9; + $8 = $12; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$5 + -12 >> 2]; + $7 = HEAP32[$5 + -16 >> 2]; + $8 = HEAP32[$5 + -20 >> 2]; + $12 = HEAP32[$5 + -24 >> 2]; + $10 = HEAP32[$2 >> 2]; + $11 = $10; + $14 = $11 >> 31; + $10 = HEAP32[$2 + 4 >> 2]; + $16 = $10; + $15 = $10 >> 31; + $10 = HEAP32[$2 + 8 >> 2]; + $18 = $10; + $17 = $10 >> 31; + $10 = HEAP32[$2 + 12 >> 2]; + $25 = $10; + $26 = $10 >> 31; + $10 = HEAP32[$2 + 16 >> 2]; + $27 = $10; + $24 = $10 >> 31; + $2 = HEAP32[$2 + 20 >> 2]; + $29 = $2; + $30 = $2 >> 31; + $2 = 0; + while (1) { + $10 = $2 << 2; + $22 = $10 + $5 | 0; + $31 = HEAP32[$0 + $10 >> 2]; + $10 = $8; + $6 = __wasm_i64_mul($8, $8 >> 31, $27, $24); + $32 = i64toi32_i32$HIGH_BITS; + $8 = $7; + $28 = __wasm_i64_mul($12, $12 >> 31, $29, $30); + $12 = $28 + $6 | 0; + $6 = i64toi32_i32$HIGH_BITS + $32 | 0; + $6 = $12 >>> 0 < $28 >>> 0 ? $6 + 1 | 0 : $6; + $21 = $12; + $12 = __wasm_i64_mul($7, $7 >> 31, $25, $26); + $7 = $21 + $12 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $7 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6; + $21 = $7; + $7 = $13; + $12 = __wasm_i64_mul($7, $7 >> 31, $18, $17); + $13 = $21 + $12 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6; + $12 = $13; + $13 = $3; + $21 = $22; + $22 = $12; + $12 = __wasm_i64_mul($3, $3 >> 31, $16, $15); + $3 = $22 + $12 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6; + $12 = $3; + $3 = $9; + $9 = __wasm_i64_mul($3, $3 >> 31, $11, $14); + $12 = $12 + $9 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $12 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6; + $9 = $4 & 31; + $9 = (32 <= ($4 & 63) >>> 0 ? $6 >> $9 : ((1 << $9) - 1 & $6) << 32 - $9 | $12 >>> $9) + $31 | 0; + HEAP32[$21 >> 2] = $9; + $12 = $10; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if ($3 >>> 0 >= 3) { + if (($3 | 0) != 4) { + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$5 + -12 >> 2]; + $7 = HEAP32[$2 >> 2]; + $12 = $7; + $10 = $7 >> 31; + $7 = HEAP32[$2 + 4 >> 2]; + $11 = $7; + $14 = $7 >> 31; + $2 = HEAP32[$2 + 8 >> 2]; + $16 = $2; + $15 = $2 >> 31; + $2 = 0; + while (1) { + $7 = $2 << 2; + $8 = $7 + $5 | 0; + $18 = HEAP32[$0 + $7 >> 2]; + $7 = $3; + $3 = __wasm_i64_mul($7, $7 >> 31, $11, $14); + $6 = i64toi32_i32$HIGH_BITS; + $17 = $8; + $13 = __wasm_i64_mul($13, $13 >> 31, $16, $15); + $3 = $13 + $3 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6; + $8 = $3; + $3 = $9; + $9 = __wasm_i64_mul($3, $3 >> 31, $12, $10); + $13 = $8 + $9 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $13 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6; + $9 = $13; + $8 = $4 & 31; + $9 = (32 <= ($4 & 63) >>> 0 ? $6 >> $8 : ((1 << $8) - 1 & $6) << 32 - $8 | $9 >>> $8) + $18 | 0; + HEAP32[$17 >> 2] = $9; + $13 = $7; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$5 + -12 >> 2]; + $7 = HEAP32[$5 + -16 >> 2]; + $8 = HEAP32[$2 >> 2]; + $10 = $8; + $11 = $8 >> 31; + $8 = HEAP32[$2 + 4 >> 2]; + $14 = $8; + $16 = $8 >> 31; + $8 = HEAP32[$2 + 8 >> 2]; + $15 = $8; + $18 = $8 >> 31; + $2 = HEAP32[$2 + 12 >> 2]; + $17 = $2; + $25 = $2 >> 31; + $2 = 0; + while (1) { + $8 = $2 << 2; + $12 = $8 + $5 | 0; + $26 = HEAP32[$0 + $8 >> 2]; + $8 = $13; + $6 = __wasm_i64_mul($8, $8 >> 31, $15, $18); + $27 = i64toi32_i32$HIGH_BITS; + $13 = $3; + $22 = $12; + $24 = __wasm_i64_mul($7, $7 >> 31, $17, $25); + $7 = $24 + $6 | 0; + $6 = i64toi32_i32$HIGH_BITS + $27 | 0; + $6 = $7 >>> 0 < $24 >>> 0 ? $6 + 1 | 0 : $6; + $12 = $7; + $7 = __wasm_i64_mul($3, $3 >> 31, $14, $16); + $3 = $12 + $7 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6; + $7 = $3; + $3 = $9; + $9 = __wasm_i64_mul($3, $3 >> 31, $10, $11); + $7 = $7 + $9 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $7 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6; + $9 = $7; + $7 = $4; + $12 = $7 & 31; + $9 = (32 <= ($7 & 63) >>> 0 ? $6 >> $12 : ((1 << $12) - 1 & $6) << 32 - $12 | $9 >>> $12) + $26 | 0; + HEAP32[$22 >> 2] = $9; + $7 = $8; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($3 | 0) != 2) { + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $2 = HEAP32[$2 >> 2]; + $8 = $2; + $12 = $2 >> 31; + $2 = 0; + while (1) { + $3 = $2 << 2; + $10 = $3 + $5 | 0; + $6 = HEAP32[$0 + $3 >> 2]; + $9 = __wasm_i64_mul($9, $9 >> 31, $8, $12); + $7 = i64toi32_i32$HIGH_BITS; + $3 = $4; + $13 = $3 & 31; + $9 = $6 + (32 <= ($3 & 63) >>> 0 ? $7 >> $13 : ((1 << $13) - 1 & $7) << 32 - $13 | $9 >>> $13) | 0; + HEAP32[$10 >> 2] = $9; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (($1 | 0) < 1) { + break label$1 + } + $9 = HEAP32[$5 + -4 >> 2]; + $3 = HEAP32[$5 + -8 >> 2]; + $13 = HEAP32[$2 >> 2]; + $8 = $13; + $12 = $8 >> 31; + $2 = HEAP32[$2 + 4 >> 2]; + $10 = $2; + $11 = $2 >> 31; + $2 = 0; + while (1) { + $13 = $2 << 2; + $7 = $13 + $5 | 0; + $14 = HEAP32[$0 + $13 >> 2]; + $13 = $9; + $9 = __wasm_i64_mul($9, $9 >> 31, $8, $12); + $6 = i64toi32_i32$HIGH_BITS; + $15 = $7; + $7 = $9; + $9 = __wasm_i64_mul($3, $3 >> 31, $10, $11); + $3 = $7 + $9 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $6 = $3 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6; + $9 = $3; + $3 = $4; + $7 = $3 & 31; + $9 = (32 <= ($3 & 63) >>> 0 ? $6 >> $7 : ((1 << $7) - 1 & $6) << 32 - $7 | $9 >>> $7) + $14 | 0; + HEAP32[$15 >> 2] = $9; + $3 = $13; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__lpc_compute_expected_bits_per_residual_sample($0, $1) { + if (!!($0 > 0.0)) { + $0 = log(.5 / +($1 >>> 0) * $0) * .5 / .6931471805599453; + return $0 >= 0.0 ? $0 : 0.0; + } + return $0 < 0.0 ? 1.e+32 : 0.0; + } + + function FLAC__lpc_compute_best_order($0, $1, $2, $3) { + var $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, $10 = 0.0; + $5 = 1; + if ($1) { + $10 = .5 / +($2 >>> 0); + $7 = 4294967295.0; + while (1) { + $4 = HEAPF64[($6 << 3) + $0 >> 3]; + label$3 : { + if (!!($4 > 0.0)) { + $4 = log($10 * $4) * .5 / .6931471805599453; + $4 = $4 >= 0.0 ? $4 : 0.0; + break label$3; + } + $4 = $4 < 0.0 ? 1.e+32 : 0.0; + } + $4 = $4 * +($2 - $5 >>> 0) + +(Math_imul($3, $5) >>> 0); + $8 = $4 < $7; + $7 = $8 ? $4 : $7; + $9 = $8 ? $6 : $9; + $5 = $5 + 1 | 0; + $6 = $6 + 1 | 0; + if (($6 | 0) != ($1 | 0)) { + continue + } + break; + }; + $0 = $9 + 1 | 0; + } else { + $0 = 1 + } + return $0; + } + + function strlen($0) { + var $1 = 0, $2 = 0, $3 = 0; + label$1 : { + label$2 : { + $1 = $0; + if (!($1 & 3)) { + break label$2 + } + if (!HEAPU8[$0 | 0]) { + return 0 + } + while (1) { + $1 = $1 + 1 | 0; + if (!($1 & 3)) { + break label$2 + } + if (HEAPU8[$1 | 0]) { + continue + } + break; + }; + break label$1; + } + while (1) { + $2 = $1; + $1 = $1 + 4 | 0; + $3 = HEAP32[$2 >> 2]; + if (!(($3 ^ -1) & $3 + -16843009 & -2139062144)) { + continue + } + break; + }; + if (!($3 & 255)) { + return $2 - $0 | 0 + } + while (1) { + $3 = HEAPU8[$2 + 1 | 0]; + $1 = $2 + 1 | 0; + $2 = $1; + if ($3) { + continue + } + break; + }; + } + return $1 - $0 | 0; + } + + function __strchrnul($0, $1) { + var $2 = 0, $3 = 0; + label$1 : { + $3 = $1 & 255; + if ($3) { + if ($0 & 3) { + while (1) { + $2 = HEAPU8[$0 | 0]; + if (!$2 | ($2 | 0) == ($1 & 255)) { + break label$1 + } + $0 = $0 + 1 | 0; + if ($0 & 3) { + continue + } + break; + } + } + $2 = HEAP32[$0 >> 2]; + label$5 : { + if (($2 ^ -1) & $2 + -16843009 & -2139062144) { + break label$5 + } + $3 = Math_imul($3, 16843009); + while (1) { + $2 = $2 ^ $3; + if (($2 ^ -1) & $2 + -16843009 & -2139062144) { + break label$5 + } + $2 = HEAP32[$0 + 4 >> 2]; + $0 = $0 + 4 | 0; + if (!($2 + -16843009 & ($2 ^ -1) & -2139062144)) { + continue + } + break; + }; + } + while (1) { + $2 = $0; + $3 = HEAPU8[$2 | 0]; + if ($3) { + $0 = $2 + 1 | 0; + if (($3 | 0) != ($1 & 255)) { + continue + } + } + break; + }; + return $2; + } + return strlen($0) + $0 | 0; + } + return $0; + } + + function strchr($0, $1) { + $0 = __strchrnul($0, $1); + return HEAPU8[$0 | 0] == ($1 & 255) ? $0 : 0; + } + + function __stdio_write($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + $3 = global$0 - 32 | 0; + global$0 = $3; + $4 = HEAP32[$0 + 28 >> 2]; + HEAP32[$3 + 16 >> 2] = $4; + $5 = HEAP32[$0 + 20 >> 2]; + HEAP32[$3 + 28 >> 2] = $2; + HEAP32[$3 + 24 >> 2] = $1; + $1 = $5 - $4 | 0; + HEAP32[$3 + 20 >> 2] = $1; + $4 = $1 + $2 | 0; + $9 = 2; + $1 = $3 + 16 | 0; + label$1 : { + label$2 : { + label$3 : { + if (!__wasi_syscall_ret(__wasi_fd_write(HEAP32[$0 + 60 >> 2], $3 + 16 | 0, 2, $3 + 12 | 0) | 0)) { + while (1) { + $5 = HEAP32[$3 + 12 >> 2]; + if (($5 | 0) == ($4 | 0)) { + break label$3 + } + if (($5 | 0) <= -1) { + break label$2 + } + $6 = HEAP32[$1 + 4 >> 2]; + $7 = $5 >>> 0 > $6 >>> 0; + $8 = ($7 << 3) + $1 | 0; + $6 = $5 - ($7 ? $6 : 0) | 0; + HEAP32[$8 >> 2] = $6 + HEAP32[$8 >> 2]; + $8 = ($7 ? 12 : 4) + $1 | 0; + HEAP32[$8 >> 2] = HEAP32[$8 >> 2] - $6; + $4 = $4 - $5 | 0; + $1 = $7 ? $1 + 8 | 0 : $1; + $9 = $9 - $7 | 0; + if (!__wasi_syscall_ret(__wasi_fd_write(HEAP32[$0 + 60 >> 2], $1 | 0, $9 | 0, $3 + 12 | 0) | 0)) { + continue + } + break; + } + } + HEAP32[$3 + 12 >> 2] = -1; + if (($4 | 0) != -1) { + break label$2 + } + } + $1 = HEAP32[$0 + 44 >> 2]; + HEAP32[$0 + 28 >> 2] = $1; + HEAP32[$0 + 20 >> 2] = $1; + HEAP32[$0 + 16 >> 2] = $1 + HEAP32[$0 + 48 >> 2]; + $0 = $2; + break label$1; + } + HEAP32[$0 + 28 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + HEAP32[$0 >> 2] = HEAP32[$0 >> 2] | 32; + $0 = 0; + if (($9 | 0) == 2) { + break label$1 + } + $0 = $2 - HEAP32[$1 + 4 >> 2] | 0; + } + global$0 = $3 + 32 | 0; + return $0 | 0; + } + + function FLAC__memory_alloc_aligned_int32_array($0, $1, $2) { + var $3 = 0; + label$1 : { + if ($0 >>> 0 > 1073741823) { + break label$1 + } + $0 = dlmalloc($0 ? $0 << 2 : 1); + if (!$0) { + break label$1 + } + $3 = HEAP32[$1 >> 2]; + if ($3) { + dlfree($3) + } + HEAP32[$1 >> 2] = $0; + HEAP32[$2 >> 2] = $0; + $3 = 1; + } + return $3; + } + + function FLAC__memory_alloc_aligned_uint64_array($0, $1, $2) { + var $3 = 0; + label$1 : { + if ($0 >>> 0 > 536870911) { + break label$1 + } + $0 = dlmalloc($0 ? $0 << 3 : 1); + if (!$0) { + break label$1 + } + $3 = HEAP32[$1 >> 2]; + if ($3) { + dlfree($3) + } + HEAP32[$1 >> 2] = $0; + HEAP32[$2 >> 2] = $0; + $3 = 1; + } + return $3; + } + + function safe_malloc_mul_2op_p($0, $1) { + if (!($1 ? $0 : 0)) { + return dlmalloc(1) + } + __wasm_i64_mul($1, 0, $0, 0); + if (i64toi32_i32$HIGH_BITS) { + $0 = 0 + } else { + $0 = dlmalloc(Math_imul($0, $1)) + } + return $0; + } + + function FLAC__fixed_compute_best_predictor($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + var $3 = 0, $4 = Math_fround(0), $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + if ($1) { + $3 = HEAP32[$0 + -4 >> 2]; + $8 = HEAP32[$0 + -8 >> 2]; + $12 = $3 - $8 | 0; + $5 = HEAP32[$0 + -12 >> 2]; + $9 = $12 + ($5 - $8 | 0) | 0; + $17 = $9 + ((($5 << 1) - $8 | 0) - HEAP32[$0 + -16 >> 2] | 0) | 0; + while (1) { + $8 = HEAP32[($15 << 2) + $0 >> 2]; + $5 = $8 >> 31; + $14 = ($5 ^ $5 + $8) + $14 | 0; + $5 = $8 - $3 | 0; + $11 = $5 >> 31; + $13 = ($11 ^ $5 + $11) + $13 | 0; + $11 = $5 - $12 | 0; + $3 = $11 >> 31; + $10 = ($3 ^ $3 + $11) + $10 | 0; + $9 = $11 - $9 | 0; + $3 = $9 >> 31; + $6 = ($3 ^ $3 + $9) + $6 | 0; + $12 = $9 - $17 | 0; + $3 = $12 >> 31; + $7 = ($3 ^ $3 + $12) + $7 | 0; + $3 = $8; + $12 = $5; + $17 = $9; + $9 = $11; + $15 = $15 + 1 | 0; + if (($15 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + $0 = $13 >>> 0 < $10 >>> 0 ? $13 : $10; + $0 = $0 >>> 0 < $6 >>> 0 ? $0 : $6; + label$3 : { + if ($14 >>> 0 < ($0 >>> 0 < $7 >>> 0 ? $0 : $7) >>> 0) { + break label$3 + } + $16 = 1; + $0 = $10 >>> 0 < $6 >>> 0 ? $10 : $6; + if ($13 >>> 0 < ($0 >>> 0 < $7 >>> 0 ? $0 : $7) >>> 0) { + break label$3 + } + $0 = $6 >>> 0 < $7 >>> 0; + $16 = $10 >>> 0 < ($0 ? $6 : $7) >>> 0 ? 2 : $0 ? 3 : 4; + } + $0 = $2; + if ($14) { + $4 = Math_fround(log(+($14 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453) + } else { + $4 = Math_fround(0.0) + } + HEAPF32[$0 >> 2] = $4; + $0 = $2; + if ($13) { + $4 = Math_fround(log(+($13 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453) + } else { + $4 = Math_fround(0.0) + } + HEAPF32[$0 + 4 >> 2] = $4; + $0 = $2; + if ($10) { + $4 = Math_fround(log(+($10 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453) + } else { + $4 = Math_fround(0.0) + } + HEAPF32[$0 + 8 >> 2] = $4; + $0 = $2; + if ($6) { + $4 = Math_fround(log(+($6 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453) + } else { + $4 = Math_fround(0.0) + } + HEAPF32[$0 + 12 >> 2] = $4; + if (!$7) { + HEAPF32[$2 + 16 >> 2] = 0; + return $16 | 0; + } + (wasm2js_i32$0 = $2, wasm2js_f32$0 = Math_fround(log(+($7 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)), HEAPF32[wasm2js_i32$0 + 16 >> 2] = wasm2js_f32$0; + return $16 | 0; + } + + function FLAC__fixed_compute_best_predictor_wide($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = Math_fround(0), $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + label$1 : { + if (!$1) { + break label$1 + } + $5 = HEAP32[$0 + -4 >> 2]; + $8 = HEAP32[$0 + -8 >> 2]; + $6 = $5 - $8 | 0; + $9 = HEAP32[$0 + -12 >> 2]; + $14 = $6 + ($9 - $8 | 0) | 0; + $21 = $14 + ((($9 << 1) - $8 | 0) - HEAP32[$0 + -16 >> 2] | 0) | 0; + $9 = 0; + $8 = 0; + while (1) { + $3 = HEAP32[($20 << 2) + $0 >> 2]; + $4 = $3 >> 31; + $4 = $4 ^ $3 + $4; + $7 = $4 + $19 | 0; + if ($7 >>> 0 < $4 >>> 0) { + $18 = $18 + 1 | 0 + } + $19 = $7; + $4 = $3 - $5 | 0; + $7 = $4 >> 31; + $7 = $7 ^ $4 + $7; + $5 = $7 + $17 | 0; + if ($5 >>> 0 < $7 >>> 0) { + $15 = $15 + 1 | 0 + } + $17 = $5; + $7 = $4 - $6 | 0; + $5 = $7 >> 31; + $5 = $5 ^ $5 + $7; + $6 = $5 + $16 | 0; + if ($6 >>> 0 < $5 >>> 0) { + $10 = $10 + 1 | 0 + } + $16 = $6; + $14 = $7 - $14 | 0; + $5 = $14 >> 31; + $5 = $5 ^ $5 + $14; + $6 = $5 + $12 | 0; + if ($6 >>> 0 < $5 >>> 0) { + $8 = $8 + 1 | 0 + } + $12 = $6; + $6 = $14 - $21 | 0; + $5 = $6 >> 31; + $5 = $5 ^ $5 + $6; + $6 = $5 + $13 | 0; + if ($6 >>> 0 < $5 >>> 0) { + $9 = $9 + 1 | 0 + } + $13 = $6; + $5 = $3; + $6 = $4; + $21 = $14; + $14 = $7; + $20 = $20 + 1 | 0; + if (($20 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + $3 = ($10 | 0) == ($15 | 0) & $17 >>> 0 < $16 >>> 0 | $15 >>> 0 < $10 >>> 0; + $4 = $3 ? $17 : $16; + $0 = $4; + $3 = $3 ? $15 : $10; + $4 = ($8 | 0) == ($3 | 0) & $4 >>> 0 < $12 >>> 0 | $3 >>> 0 < $8 >>> 0; + $7 = $4 ? $0 : $12; + $3 = $4 ? $3 : $8; + $4 = ($9 | 0) == ($3 | 0) & $7 >>> 0 < $13 >>> 0 | $3 >>> 0 < $9 >>> 0; + $7 = $4 ? $7 : $13; + $3 = $4 ? $3 : $9; + $0 = 0; + label$4 : { + if (($3 | 0) == ($18 | 0) & $19 >>> 0 < $7 >>> 0 | $18 >>> 0 < $3 >>> 0) { + break label$4 + } + $3 = ($8 | 0) == ($10 | 0) & $16 >>> 0 < $12 >>> 0 | $10 >>> 0 < $8 >>> 0; + $4 = $3 ? $16 : $12; + $0 = $4; + $3 = $3 ? $10 : $8; + $4 = ($9 | 0) == ($3 | 0) & $4 >>> 0 < $13 >>> 0 | $3 >>> 0 < $9 >>> 0; + $7 = $4 ? $0 : $13; + $3 = $4 ? $3 : $9; + $0 = 1; + if (($3 | 0) == ($15 | 0) & $17 >>> 0 < $7 >>> 0 | $15 >>> 0 < $3 >>> 0) { + break label$4 + } + $0 = ($8 | 0) == ($9 | 0) & $12 >>> 0 < $13 >>> 0 | $8 >>> 0 < $9 >>> 0; + $3 = $0; + $4 = $3 ? $12 : $13; + $0 = $3 ? $8 : $9; + $0 = ($0 | 0) == ($10 | 0) & $16 >>> 0 < $4 >>> 0 | $10 >>> 0 < $0 >>> 0 ? 2 : $3 ? 3 : 4; + } + $6 = $2; + if ($18 | $19) { + $11 = Math_fround(log((+($19 >>> 0) + 4294967296.0 * +($18 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453) + } else { + $11 = Math_fround(0.0) + } + HEAPF32[$6 >> 2] = $11; + $6 = $2; + if ($15 | $17) { + $11 = Math_fround(log((+($17 >>> 0) + 4294967296.0 * +($15 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453) + } else { + $11 = Math_fround(0.0) + } + HEAPF32[$6 + 4 >> 2] = $11; + $6 = $2; + if ($10 | $16) { + $11 = Math_fround(log((+($16 >>> 0) + 4294967296.0 * +($10 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453) + } else { + $11 = Math_fround(0.0) + } + HEAPF32[$6 + 8 >> 2] = $11; + $6 = $2; + if ($8 | $12) { + $11 = Math_fround(log((+($12 >>> 0) + 4294967296.0 * +($8 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453) + } else { + $11 = Math_fround(0.0) + } + HEAPF32[$6 + 12 >> 2] = $11; + if (!($9 | $13)) { + HEAPF32[$2 + 16 >> 2] = 0; + return $0 | 0; + } + (wasm2js_i32$0 = $2, wasm2js_f32$0 = Math_fround(log((+($13 >>> 0) + 4294967296.0 * +($9 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)), HEAPF32[wasm2js_i32$0 + 16 >> 2] = wasm2js_f32$0; + return $0 | 0; + } + + function FLAC__fixed_compute_residual($0, $1, $2, $3) { + var $4 = 0, $5 = 0; + label$1 : { + label$2 : { + label$3 : { + switch ($2 | 0) { + case 4: + $2 = 0; + if (($1 | 0) <= 0) { + break label$2 + } + while (1) { + $5 = $2 << 2; + $4 = $5 + $0 | 0; + HEAP32[$3 + $5 >> 2] = (HEAP32[$4 + -16 >> 2] + (HEAP32[$4 >> 2] + Math_imul(HEAP32[$4 + -8 >> 2], 6) | 0) | 0) - (HEAP32[$4 + -12 >> 2] + HEAP32[$4 + -4 >> 2] << 2); + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$2; + case 3: + $2 = 0; + if (($1 | 0) <= 0) { + break label$2 + } + while (1) { + $5 = $2 << 2; + $4 = $5 + $0 | 0; + HEAP32[$3 + $5 >> 2] = (HEAP32[$4 >> 2] - HEAP32[$4 + -12 >> 2] | 0) + Math_imul(HEAP32[$4 + -8 >> 2] - HEAP32[$4 + -4 >> 2] | 0, 3); + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$2; + case 2: + $2 = 0; + if (($1 | 0) <= 0) { + break label$2 + } + while (1) { + $5 = $2 << 2; + $4 = $5 + $0 | 0; + HEAP32[$3 + $5 >> 2] = HEAP32[$4 + -8 >> 2] + (HEAP32[$4 >> 2] - (HEAP32[$4 + -4 >> 2] << 1) | 0); + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$2; + case 0: + break label$1; + case 1: + break label$3; + default: + break label$2; + }; + } + $2 = 0; + if (($1 | 0) <= 0) { + break label$2 + } + while (1) { + $5 = $2 << 2; + $4 = $5 + $0 | 0; + HEAP32[$3 + $5 >> 2] = HEAP32[$4 >> 2] - HEAP32[$4 + -4 >> 2]; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + return; + } + memcpy($3, $0, $1 << 2); + } + + function FLAC__fixed_restore_signal($0, $1, $2, $3) { + var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + label$1 : { + label$2 : { + label$3 : { + switch ($2 | 0) { + case 4: + if (($1 | 0) < 1) { + break label$2 + } + $5 = HEAP32[$3 + -12 >> 2]; + $6 = HEAP32[$3 + -4 >> 2]; + $2 = 0; + while (1) { + $8 = $2 << 2; + $7 = $8 + $3 | 0; + $4 = HEAP32[$7 + -8 >> 2]; + $6 = ((HEAP32[$0 + $8 >> 2] + Math_imul($4, -6) | 0) - HEAP32[$7 + -16 >> 2] | 0) + ($5 + $6 << 2) | 0; + HEAP32[$7 >> 2] = $6; + $5 = $4; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$2; + case 3: + if (($1 | 0) < 1) { + break label$2 + } + $4 = HEAP32[$3 + -12 >> 2]; + $5 = HEAP32[$3 + -4 >> 2]; + $2 = 0; + while (1) { + $6 = $2 << 2; + $7 = $6 + $3 | 0; + $8 = HEAP32[$0 + $6 >> 2] + $4 | 0; + $4 = HEAP32[$7 + -8 >> 2]; + $5 = $8 + Math_imul($5 - $4 | 0, 3) | 0; + HEAP32[$7 >> 2] = $5; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$2; + case 2: + if (($1 | 0) < 1) { + break label$2 + } + $4 = HEAP32[$3 + -4 >> 2]; + $2 = 0; + while (1) { + $5 = $2 << 2; + $6 = $5 + $3 | 0; + $4 = (HEAP32[$0 + $5 >> 2] + ($4 << 1) | 0) - HEAP32[$6 + -8 >> 2] | 0; + HEAP32[$6 >> 2] = $4; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$2; + case 0: + break label$1; + case 1: + break label$3; + default: + break label$2; + }; + } + if (($1 | 0) < 1) { + break label$2 + } + $4 = HEAP32[$3 + -4 >> 2]; + $2 = 0; + while (1) { + $5 = $2 << 2; + $4 = HEAP32[$5 + $0 >> 2] + $4 | 0; + HEAP32[$3 + $5 >> 2] = $4; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + return; + } + memcpy($3, $0, $1 << 2); + } + + function __toread($0) { + var $1 = 0, $2 = 0; + $1 = HEAPU8[$0 + 74 | 0]; + HEAP8[$0 + 74 | 0] = $1 + -1 | $1; + if (HEAPU32[$0 + 20 >> 2] > HEAPU32[$0 + 28 >> 2]) { + FUNCTION_TABLE[HEAP32[$0 + 36 >> 2]]($0, 0, 0) | 0 + } + HEAP32[$0 + 28 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + $1 = HEAP32[$0 >> 2]; + if ($1 & 4) { + HEAP32[$0 >> 2] = $1 | 32; + return -1; + } + $2 = HEAP32[$0 + 44 >> 2] + HEAP32[$0 + 48 >> 2] | 0; + HEAP32[$0 + 8 >> 2] = $2; + HEAP32[$0 + 4 >> 2] = $2; + return $1 << 27 >> 31; + } + + function FLAC__stream_decoder_new() { + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0; + $3 = dlcalloc(1, 8); + if ($3) { + $2 = dlcalloc(1, 504); + HEAP32[$3 >> 2] = $2; + if ($2) { + $0 = dlcalloc(1, 6160); + HEAP32[$3 + 4 >> 2] = $0; + if ($0) { + $1 = dlcalloc(1, 44); + HEAP32[$0 + 56 >> 2] = $1; + if ($1) { + HEAP32[$0 + 1128 >> 2] = 16; + $4 = dlmalloc(HEAP32[1364] << 1 & -16); + HEAP32[$0 + 1120 >> 2] = $4; + if ($4) { + HEAP32[$0 + 252 >> 2] = 0; + HEAP32[$0 + 220 >> 2] = 0; + HEAP32[$0 + 224 >> 2] = 0; + $1 = $0 + 3616 | 0; + HEAP32[$1 >> 2] = 0; + HEAP32[$1 + 4 >> 2] = 0; + $1 = $0 + 3608 | 0; + HEAP32[$1 >> 2] = 0; + HEAP32[$1 + 4 >> 2] = 0; + $1 = $0 + 3600 | 0; + HEAP32[$1 >> 2] = 0; + HEAP32[$1 + 4 >> 2] = 0; + $1 = $0 + 3592 | 0; + HEAP32[$1 >> 2] = 0; + HEAP32[$1 + 4 >> 2] = 0; + HEAP32[$0 + 60 >> 2] = 0; + HEAP32[$0 + 64 >> 2] = 0; + HEAP32[$0 + 68 >> 2] = 0; + HEAP32[$0 + 72 >> 2] = 0; + HEAP32[$0 + 76 >> 2] = 0; + HEAP32[$0 + 80 >> 2] = 0; + HEAP32[$0 + 84 >> 2] = 0; + HEAP32[$0 + 88 >> 2] = 0; + HEAP32[$0 + 92 >> 2] = 0; + HEAP32[$0 + 96 >> 2] = 0; + HEAP32[$0 + 100 >> 2] = 0; + HEAP32[$0 + 104 >> 2] = 0; + HEAP32[$0 + 108 >> 2] = 0; + HEAP32[$0 + 112 >> 2] = 0; + HEAP32[$0 + 116 >> 2] = 0; + HEAP32[$0 + 120 >> 2] = 0; + FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 124 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 136 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 148 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 160 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 172 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 184 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 196 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 208 | 0); + HEAP32[$0 + 48 >> 2] = 0; + HEAP32[$0 + 52 >> 2] = 0; + memset($0 + 608 | 0, 512); + HEAP32[$0 + 1124 >> 2] = 0; + HEAP32[$0 + 608 >> 2] = 1; + HEAP32[$0 + 32 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = 0; + HEAP32[$0 + 28 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 20 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + HEAP32[$2 + 28 >> 2] = 0; + FLAC__ogg_decoder_aspect_set_defaults($2 + 32 | 0); + HEAP32[$2 >> 2] = 9; + return $3 | 0; + } + FLAC__bitreader_delete($1); + } + dlfree($0); + } + dlfree($2); + } + dlfree($3); + } + return 0; + } + + function FLAC__stream_decoder_delete($0) { + $0 = $0 | 0; + var $1 = 0, $2 = 0; + if ($0) { + FLAC__stream_decoder_finish($0); + $1 = HEAP32[$0 + 4 >> 2]; + $2 = HEAP32[$1 + 1120 >> 2]; + if ($2) { + dlfree($2); + $1 = HEAP32[$0 + 4 >> 2]; + } + FLAC__bitreader_delete(HEAP32[$1 + 56 >> 2]); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 124 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 136 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 148 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 160 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 172 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 184 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 196 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 208 | 0); + dlfree(HEAP32[$0 + 4 >> 2]); + dlfree(HEAP32[$0 >> 2]); + dlfree($0); + } + } + + function FLAC__stream_decoder_finish($0) { + $0 = $0 | 0; + var $1 = 0, $2 = 0, $3 = 0; + $3 = 1; + if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9) { + $1 = HEAP32[$0 + 4 >> 2]; + FLAC__MD5Final($1 + 3732 | 0, $1 + 3636 | 0); + dlfree(HEAP32[HEAP32[$0 + 4 >> 2] + 452 >> 2]); + HEAP32[HEAP32[$0 + 4 >> 2] + 452 >> 2] = 0; + $1 = HEAP32[$0 + 4 >> 2]; + HEAP32[$1 + 252 >> 2] = 0; + FLAC__bitreader_free(HEAP32[$1 + 56 >> 2]); + $3 = $0 + 4 | 0; + $1 = HEAP32[$0 + 4 >> 2]; + $2 = HEAP32[$1 + 60 >> 2]; + if ($2) { + dlfree($2 + -16 | 0); + HEAP32[HEAP32[$3 >> 2] + 60 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 3592 >> 2]; + if ($2) { + dlfree($2); + HEAP32[HEAP32[$3 >> 2] + 92 >> 2] = 0; + HEAP32[HEAP32[$3 >> 2] + 3592 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 - -64 >> 2]; + if ($2) { + dlfree($2 + -16 | 0); + HEAP32[HEAP32[$3 >> 2] - -64 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 3596 >> 2]; + if ($2) { + dlfree($2); + HEAP32[HEAP32[$3 >> 2] + 96 >> 2] = 0; + HEAP32[HEAP32[$3 >> 2] + 3596 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 68 >> 2]; + if ($2) { + dlfree($2 + -16 | 0); + HEAP32[HEAP32[$3 >> 2] + 68 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 3600 >> 2]; + if ($2) { + dlfree($2); + HEAP32[HEAP32[$3 >> 2] + 100 >> 2] = 0; + HEAP32[HEAP32[$3 >> 2] + 3600 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 72 >> 2]; + if ($2) { + dlfree($2 + -16 | 0); + HEAP32[HEAP32[$3 >> 2] + 72 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 3604 >> 2]; + if ($2) { + dlfree($2); + HEAP32[HEAP32[$3 >> 2] + 104 >> 2] = 0; + HEAP32[HEAP32[$3 >> 2] + 3604 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 76 >> 2]; + if ($2) { + dlfree($2 + -16 | 0); + HEAP32[HEAP32[$3 >> 2] + 76 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 3608 >> 2]; + if ($2) { + dlfree($2); + HEAP32[HEAP32[$3 >> 2] + 108 >> 2] = 0; + HEAP32[HEAP32[$3 >> 2] + 3608 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 80 >> 2]; + if ($2) { + dlfree($2 + -16 | 0); + HEAP32[HEAP32[$3 >> 2] + 80 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 3612 >> 2]; + if ($2) { + dlfree($2); + HEAP32[HEAP32[$3 >> 2] + 112 >> 2] = 0; + HEAP32[HEAP32[$3 >> 2] + 3612 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 84 >> 2]; + if ($2) { + dlfree($2 + -16 | 0); + HEAP32[HEAP32[$3 >> 2] + 84 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 3616 >> 2]; + if ($2) { + dlfree($2); + HEAP32[HEAP32[$3 >> 2] + 116 >> 2] = 0; + HEAP32[HEAP32[$3 >> 2] + 3616 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 88 >> 2]; + if ($2) { + dlfree($2 + -16 | 0); + HEAP32[HEAP32[$3 >> 2] + 88 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + $2 = HEAP32[$1 + 3620 >> 2]; + if ($2) { + dlfree($2); + HEAP32[HEAP32[$3 >> 2] + 120 >> 2] = 0; + HEAP32[HEAP32[$3 >> 2] + 3620 >> 2] = 0; + $1 = HEAP32[$3 >> 2]; + } + HEAP32[$1 + 220 >> 2] = 0; + HEAP32[$1 + 224 >> 2] = 0; + if (HEAP32[$1 >> 2]) { + $1 = HEAP32[$0 >> 2] + 32 | 0; + ogg_sync_clear($1 + 368 | 0); + ogg_stream_clear($1 + 8 | 0); + $1 = HEAP32[$0 + 4 >> 2]; + } + $2 = HEAP32[$1 + 52 >> 2]; + if ($2) { + if (($2 | 0) != HEAP32[1887]) { + fclose($2); + $1 = HEAP32[$3 >> 2]; + } + HEAP32[$1 + 52 >> 2] = 0; + } + $3 = 1; + if (HEAP32[$1 + 3624 >> 2]) { + $3 = !memcmp($1 + 312 | 0, $1 + 3732 | 0, 16) + } + HEAP32[$1 + 48 >> 2] = 0; + HEAP32[$1 + 3632 >> 2] = 0; + memset($1 + 608 | 0, 512); + HEAP32[$1 + 32 >> 2] = 0; + HEAP32[$1 + 24 >> 2] = 0; + HEAP32[$1 + 28 >> 2] = 0; + HEAP32[$1 + 16 >> 2] = 0; + HEAP32[$1 + 20 >> 2] = 0; + HEAP32[$1 + 8 >> 2] = 0; + HEAP32[$1 + 12 >> 2] = 0; + HEAP32[$1 >> 2] = 0; + HEAP32[$1 + 4 >> 2] = 0; + $1 = HEAP32[$0 + 4 >> 2]; + HEAP32[$1 + 1124 >> 2] = 0; + HEAP32[$1 + 608 >> 2] = 1; + $1 = HEAP32[$0 >> 2]; + HEAP32[$1 + 28 >> 2] = 0; + FLAC__ogg_decoder_aspect_set_defaults($1 + 32 | 0); + HEAP32[HEAP32[$0 >> 2] >> 2] = 9; + } + return $3 | 0; + } + + function FLAC__stream_decoder_init_stream($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + $6 = $6 | 0; + $7 = $7 | 0; + $8 = $8 | 0; + $9 = $9 | 0; + return init_stream_internal_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, 0) | 0; + } + + function init_stream_internal_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) { + var $11 = 0, $12 = 0; + $11 = 5; + label$1 : { + $12 = HEAP32[$0 >> 2]; + label$2 : { + if (HEAP32[$12 >> 2] != 9) { + break label$2 + } + $11 = 2; + if (!$8 | (!$1 | !$6)) { + break label$2 + } + if ($2) { + if (!$5 | (!$3 | !$4)) { + break label$2 + } + } + $11 = HEAP32[$0 + 4 >> 2]; + HEAP32[$11 >> 2] = $10; + if ($10) { + if (!FLAC__ogg_decoder_aspect_init($12 + 32 | 0)) { + break label$1 + } + $11 = HEAP32[$0 + 4 >> 2]; + } + FLAC__cpu_info($11 + 3524 | 0); + $10 = HEAP32[$0 + 4 >> 2]; + HEAP32[$10 + 44 >> 2] = 5; + HEAP32[$10 + 40 >> 2] = 6; + HEAP32[$10 + 36 >> 2] = 5; + if (!FLAC__bitreader_init(HEAP32[$10 + 56 >> 2], $0)) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + return 3; + } + $10 = HEAP32[$0 + 4 >> 2]; + HEAP32[$10 + 48 >> 2] = $9; + HEAP32[$10 + 32 >> 2] = $8; + HEAP32[$10 + 28 >> 2] = $7; + HEAP32[$10 + 24 >> 2] = $6; + HEAP32[$10 + 20 >> 2] = $5; + HEAP32[$10 + 16 >> 2] = $4; + HEAP32[$10 + 12 >> 2] = $3; + HEAP32[$10 + 8 >> 2] = $2; + HEAP32[$10 + 4 >> 2] = $1; + HEAP32[$10 + 3520 >> 2] = 0; + HEAP32[$10 + 248 >> 2] = 0; + HEAP32[$10 + 240 >> 2] = 0; + HEAP32[$10 + 244 >> 2] = 0; + HEAP32[$10 + 228 >> 2] = 0; + HEAP32[$10 + 232 >> 2] = 0; + HEAP32[$10 + 3624 >> 2] = HEAP32[HEAP32[$0 >> 2] + 28 >> 2]; + HEAP32[$10 + 3628 >> 2] = 1; + HEAP32[$10 + 3632 >> 2] = 0; + $11 = FLAC__stream_decoder_reset($0) ? 0 : 3; + } + return $11; + } + HEAP32[HEAP32[$0 >> 2] + 4 >> 2] = 4; + return 4; + } + + function read_callback_($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + var $3 = 0, $4 = 0; + label$1 : { + $3 = HEAP32[$2 + 4 >> 2]; + if (HEAP32[$3 >> 2]) { + break label$1 + } + $4 = HEAP32[$3 + 20 >> 2]; + if (!$4) { + break label$1 + } + if (!FUNCTION_TABLE[$4]($2, HEAP32[$3 + 48 >> 2])) { + break label$1 + } + HEAP32[$1 >> 2] = 0; + HEAP32[HEAP32[$2 >> 2] >> 2] = 4; + return 0; + } + label$2 : { + label$3 : { + if (HEAP32[$1 >> 2]) { + $3 = HEAP32[$2 + 4 >> 2]; + if (!(!HEAP32[$3 + 3632 >> 2] | HEAPU32[$3 + 6152 >> 2] < 21)) { + HEAP32[HEAP32[$2 >> 2] >> 2] = 7; + break label$3; + } + label$6 : { + label$7 : { + label$8 : { + label$9 : { + if (HEAP32[$3 >> 2]) { + $4 = 0; + switch (FLAC__ogg_decoder_aspect_read_callback_wrapper(HEAP32[$2 >> 2] + 32 | 0, $0, $1, $2, HEAP32[$3 + 48 >> 2]) | 0) { + case 0: + case 2: + break label$7; + case 1: + break label$8; + default: + break label$9; + }; + } + $4 = FUNCTION_TABLE[HEAP32[$3 + 4 >> 2]]($2, $0, $1, HEAP32[$3 + 48 >> 2]) | 0; + if (($4 | 0) != 2) { + break label$7 + } + } + HEAP32[HEAP32[$2 >> 2] >> 2] = 7; + break label$3; + } + $0 = 1; + if (!HEAP32[$1 >> 2]) { + break label$6 + } + break label$2; + } + $0 = 1; + if (HEAP32[$1 >> 2]) { + break label$2 + } + if (($4 | 0) == 1) { + break label$6 + } + $1 = HEAP32[$2 + 4 >> 2]; + if (HEAP32[$1 >> 2]) { + break label$2 + } + $3 = HEAP32[$1 + 20 >> 2]; + if (!$3) { + break label$2 + } + if (!FUNCTION_TABLE[$3]($2, HEAP32[$1 + 48 >> 2])) { + break label$2 + } + } + HEAP32[HEAP32[$2 >> 2] >> 2] = 4; + break label$3; + } + HEAP32[HEAP32[$2 >> 2] >> 2] = 7; + } + $0 = 0; + } + return $0 | 0; + } + + function FLAC__stream_decoder_reset($0) { + $0 = $0 | 0; + var $1 = 0, $2 = 0, $3 = 0; + $1 = HEAP32[$0 + 4 >> 2]; + label$1 : { + if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9 ? !HEAP32[$1 + 3628 >> 2] : 0) { + break label$1 + } + HEAP32[$1 + 3624 >> 2] = 0; + HEAP32[$1 + 240 >> 2] = 0; + HEAP32[$1 + 244 >> 2] = 0; + if (HEAP32[$1 >> 2]) { + $1 = HEAP32[$0 >> 2] + 32 | 0; + ogg_stream_reset($1 + 8 | 0); + ogg_sync_reset($1 + 368 | 0); + HEAP32[$1 + 408 >> 2] = 0; + HEAP32[$1 + 412 >> 2] = 0; + $1 = HEAP32[$0 + 4 >> 2]; + } + $1 = HEAP32[$1 + 56 >> 2]; + HEAP32[$1 + 8 >> 2] = 0; + HEAP32[$1 + 12 >> 2] = 0; + HEAP32[$1 + 16 >> 2] = 0; + HEAP32[$1 + 20 >> 2] = 0; + $1 = 1; + $2 = HEAP32[$0 >> 2]; + if (!$1) { + HEAP32[$2 >> 2] = 8; + return 0; + } + HEAP32[$2 >> 2] = 2; + $1 = HEAP32[$0 + 4 >> 2]; + if (HEAP32[$1 >> 2]) { + FLAC__ogg_decoder_aspect_reset($2 + 32 | 0); + $1 = HEAP32[$0 + 4 >> 2]; + } + label$6 : { + if (!HEAP32[$1 + 3628 >> 2]) { + $2 = 0; + if (HEAP32[$1 + 52 >> 2] == HEAP32[1887]) { + break label$1 + } + $3 = HEAP32[$1 + 8 >> 2]; + if (!$3) { + break label$6 + } + if ((FUNCTION_TABLE[$3]($0, 0, 0, HEAP32[$1 + 48 >> 2]) | 0) == 1) { + break label$1 + } + $1 = HEAP32[$0 + 4 >> 2]; + break label$6; + } + HEAP32[$1 + 3628 >> 2] = 0; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 0; + HEAP32[$1 + 248 >> 2] = 0; + dlfree(HEAP32[$1 + 452 >> 2]); + HEAP32[HEAP32[$0 + 4 >> 2] + 452 >> 2] = 0; + $1 = HEAP32[$0 + 4 >> 2]; + HEAP32[$1 + 252 >> 2] = 0; + HEAP32[$1 + 3624 >> 2] = HEAP32[HEAP32[$0 >> 2] + 28 >> 2]; + HEAP32[$1 + 228 >> 2] = 0; + HEAP32[$1 + 232 >> 2] = 0; + FLAC__MD5Init($1 + 3636 | 0); + $0 = HEAP32[$0 + 4 >> 2]; + HEAP32[$0 + 6152 >> 2] = 0; + HEAP32[$0 + 6136 >> 2] = 0; + HEAP32[$0 + 6140 >> 2] = 0; + $2 = 1; + } + return $2 | 0; + } + + function FLAC__stream_decoder_init_ogg_stream($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + $6 = $6 | 0; + $7 = $7 | 0; + $8 = $8 | 0; + $9 = $9 | 0; + return init_stream_internal_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, 1) | 0; + } + + function FLAC__stream_decoder_set_ogg_serial_number($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 9) { + $0 = $0 + 32 | 0; + HEAP32[$0 + 4 >> 2] = $1; + HEAP32[$0 >> 2] = 0; + $0 = 1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_decoder_set_md5_checking($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 9) { + HEAP32[$0 + 28 >> 2] = $1; + $0 = 1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_decoder_set_metadata_respond($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + var $2 = 0; + label$1 : { + if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9 | $1 >>> 0 > 126) { + break label$1 + } + $2 = 1; + $0 = HEAP32[$0 + 4 >> 2]; + HEAP32[($0 + ($1 << 2) | 0) + 608 >> 2] = 1; + if (($1 | 0) != 2) { + break label$1 + } + HEAP32[$0 + 1124 >> 2] = 0; + } + return $2 | 0; + } + + function FLAC__stream_decoder_set_metadata_respond_application($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + var $2 = 0, $3 = 0, $4 = 0; + $2 = 0; + label$1 : { + if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9) { + break label$1 + } + $3 = HEAP32[$0 + 4 >> 2]; + $2 = 1; + if (HEAP32[$3 + 616 >> 2]) { + break label$1 + } + $2 = HEAP32[$3 + 1120 >> 2]; + label$2 : { + $4 = HEAP32[$3 + 1124 >> 2]; + label$3 : { + if (($4 | 0) != HEAP32[$3 + 1128 >> 2]) { + $3 = $2; + break label$3; + } + label$5 : { + if (!$4) { + $3 = dlrealloc($2, 0); + break label$5; + } + if ($4 + $4 >>> 0 >= $4 >>> 0) { + $3 = dlrealloc($2, $4 << 1); + if ($3) { + break label$5 + } + dlfree($2); + $3 = HEAP32[$0 + 4 >> 2]; + } + HEAP32[$3 + 1120 >> 2] = 0; + break label$2; + } + $2 = HEAP32[$0 + 4 >> 2]; + HEAP32[$2 + 1120 >> 2] = $3; + if (!$3) { + break label$2 + } + HEAP32[$2 + 1128 >> 2] = HEAP32[$2 + 1128 >> 2] << 1; + $4 = HEAP32[$2 + 1124 >> 2]; + } + $2 = $3; + $3 = HEAP32[1364] >>> 3 | 0; + memcpy($2 + Math_imul($3, $4) | 0, $1, $3); + $0 = HEAP32[$0 + 4 >> 2]; + HEAP32[$0 + 1124 >> 2] = HEAP32[$0 + 1124 >> 2] + 1; + return 1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $2 = 0; + } + return $2 | 0; + } + + function FLAC__stream_decoder_set_metadata_respond_all($0) { + $0 = $0 | 0; + var $1 = 0; + if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9) { + $1 = HEAP32[$0 + 4 >> 2]; + $0 = 0; + while (1) { + HEAP32[($1 + ($0 << 2) | 0) + 608 >> 2] = 1; + $0 = $0 + 1 | 0; + if (($0 | 0) != 128) { + continue + } + break; + }; + HEAP32[$1 + 1124 >> 2] = 0; + $0 = 1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_decoder_set_metadata_ignore($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + var $2 = 0; + label$1 : { + if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9 | $1 >>> 0 > 126) { + break label$1 + } + $0 = HEAP32[$0 + 4 >> 2]; + HEAP32[($0 + ($1 << 2) | 0) + 608 >> 2] = 0; + $2 = 1; + if (($1 | 0) != 2) { + break label$1 + } + HEAP32[$0 + 1124 >> 2] = 0; + } + return $2 | 0; + } + + function FLAC__stream_decoder_set_metadata_ignore_application($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + var $2 = 0, $3 = 0, $4 = 0; + if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9) { + $2 = HEAP32[$0 + 4 >> 2]; + if (!HEAP32[$2 + 616 >> 2]) { + return 1 + } + $3 = HEAP32[$2 + 1120 >> 2]; + label$3 : { + $4 = HEAP32[$2 + 1124 >> 2]; + label$4 : { + if (($4 | 0) != HEAP32[$2 + 1128 >> 2]) { + $2 = $3; + break label$4; + } + label$6 : { + if (!$4) { + $2 = dlrealloc($3, 0); + break label$6; + } + if ($4 + $4 >>> 0 >= $4 >>> 0) { + $2 = dlrealloc($3, $4 << 1); + if ($2) { + break label$6 + } + dlfree($3); + $2 = HEAP32[$0 + 4 >> 2]; + } + HEAP32[$2 + 1120 >> 2] = 0; + break label$3; + } + $3 = HEAP32[$0 + 4 >> 2]; + HEAP32[$3 + 1120 >> 2] = $2; + if (!$2) { + break label$3 + } + HEAP32[$3 + 1128 >> 2] = HEAP32[$3 + 1128 >> 2] << 1; + $4 = HEAP32[$3 + 1124 >> 2]; + } + $3 = $2; + $2 = HEAP32[1364] >>> 3 | 0; + memcpy($3 + Math_imul($2, $4) | 0, $1, $2); + $0 = HEAP32[$0 + 4 >> 2]; + HEAP32[$0 + 1124 >> 2] = HEAP32[$0 + 1124 >> 2] + 1; + return 1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + } + return 0; + } + + function FLAC__stream_decoder_set_metadata_ignore_all($0) { + $0 = $0 | 0; + if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9) { + memset(HEAP32[$0 + 4 >> 2] + 608 | 0, 512); + HEAP32[HEAP32[$0 + 4 >> 2] + 1124 >> 2] = 0; + $0 = 1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_decoder_get_state($0) { + $0 = $0 | 0; + return HEAP32[HEAP32[$0 >> 2] >> 2]; + } + + function FLAC__stream_decoder_get_md5_checking($0) { + $0 = $0 | 0; + return HEAP32[HEAP32[$0 >> 2] + 28 >> 2]; + } + + function FLAC__stream_decoder_process_single($0) { + $0 = $0 | 0; + var $1 = 0, $2 = 0, $3 = 0; + $1 = global$0 - 16 | 0; + global$0 = $1; + $2 = 1; + label$1 : { + while (1) { + label$3 : { + label$4 : { + switch (HEAP32[HEAP32[$0 >> 2] >> 2]) { + case 0: + if (find_metadata_($0)) { + continue + } + $2 = 0; + break label$3; + case 1: + $3 = (read_metadata_($0) | 0) != 0; + break label$1; + case 2: + if (frame_sync_($0)) { + continue + } + break label$3; + case 4: + case 7: + break label$3; + case 3: + break label$4; + default: + break label$1; + }; + } + if (!read_frame_($0, $1 + 12 | 0)) { + $2 = 0; + break label$3; + } + if (!HEAP32[$1 + 12 >> 2]) { + continue + } + } + break; + }; + $3 = $2; + } + global$0 = $1 + 16 | 0; + return $3 | 0; + } + + function find_metadata_($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + $2 = global$0 - 16 | 0; + global$0 = $2; + $5 = 1; + label$1 : { + while (1) { + $1 = 0; + label$3 : { + while (1) { + $6 = HEAP32[$0 + 4 >> 2]; + label$5 : { + if (HEAP32[$6 + 3520 >> 2]) { + $4 = HEAPU8[$6 + 3590 | 0]; + HEAP32[$2 + 8 >> 2] = $4; + HEAP32[$6 + 3520 >> 2] = 0; + break label$5; + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$6 + 56 >> 2], $2 + 8 | 0, 8)) { + $3 = 0; + break label$1; + } + $4 = HEAP32[$2 + 8 >> 2]; + } + if (HEAPU8[$3 + 5409 | 0] == ($4 | 0)) { + $3 = $3 + 1 | 0; + $1 = 1; + break label$3; + } + $3 = 0; + if (($1 | 0) == 3) { + break label$1 + } + if (HEAPU8[$1 + 7552 | 0] == ($4 | 0)) { + $1 = $1 + 1 | 0; + if (($1 | 0) != 3) { + continue + } + label$10 : { + label$11 : { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 24)) { + break label$11 + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) { + break label$11 + } + $4 = HEAP32[$2 + 12 >> 2]; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) { + break label$11 + } + $6 = HEAP32[$2 + 12 >> 2]; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) { + break label$11 + } + $7 = HEAP32[$2 + 12 >> 2]; + if (FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) { + break label$10 + } + } + break label$1; + } + if (FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], HEAP32[$2 + 12 >> 2] & 127 | ($7 << 7 & 16256 | ($6 & 127 | $4 << 7 & 16256) << 14))) { + continue + } + break label$1; + } + break; + }; + label$12 : { + if (($4 | 0) != 255) { + break label$12 + } + HEAP8[HEAP32[$0 + 4 >> 2] + 3588 | 0] = 255; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 8 | 0, 8)) { + break label$1 + } + $1 = HEAP32[$2 + 8 >> 2]; + if (($1 | 0) == 255) { + $1 = HEAP32[$0 + 4 >> 2]; + HEAP32[$1 + 3520 >> 2] = 1; + HEAP8[$1 + 3590 | 0] = 255; + break label$12; + } + if (($1 & -2) != 248) { + break label$12 + } + HEAP8[HEAP32[$0 + 4 >> 2] + 3589 | 0] = $1; + HEAP32[HEAP32[$0 >> 2] >> 2] = 3; + $3 = 1; + break label$1; + } + $1 = 0; + if (!$5) { + break label$3 + } + $5 = HEAP32[$0 + 4 >> 2]; + $1 = 0; + if (HEAP32[$5 + 3632 >> 2]) { + break label$3 + } + FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 0, HEAP32[$5 + 48 >> 2]); + $1 = 0; + } + $5 = $1; + if ($3 >>> 0 < 4) { + continue + } + break; + }; + $3 = 1; + HEAP32[HEAP32[$0 >> 2] >> 2] = 1; + } + global$0 = $2 + 16 | 0; + return $3; + } + + function read_metadata_($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0; + $7 = global$0 - 192 | 0; + global$0 = $7; + label$1 : { + label$2 : { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $7 + 184 | 0, HEAP32[1391])) { + break label$2 + } + $15 = HEAP32[$7 + 184 >> 2]; + $4 = $0 + 4 | 0; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 180 | 0, HEAP32[1392])) { + break label$1 + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 176 | 0, HEAP32[1393])) { + break label$1 + } + $6 = ($15 | 0) != 0; + label$3 : { + label$4 : { + label$5 : { + label$6 : { + label$7 : { + $2 = HEAP32[$7 + 180 >> 2]; + switch ($2 | 0) { + case 3: + break label$6; + case 0: + break label$7; + default: + break label$5; + }; + } + $3 = HEAP32[$7 + 176 >> 2]; + $2 = 0; + $1 = HEAP32[$4 >> 2]; + HEAP32[$1 + 256 >> 2] = 0; + HEAP32[$1 + 264 >> 2] = $3; + HEAP32[$1 + 260 >> 2] = $6; + $5 = HEAP32[$1 + 56 >> 2]; + $1 = HEAP32[1356]; + if (!FLAC__bitreader_read_raw_uint32($5, $7, $1)) { + break label$1 + } + HEAP32[HEAP32[$4 >> 2] + 272 >> 2] = HEAP32[$7 >> 2]; + $5 = HEAP32[1357]; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $5)) { + break label$1 + } + HEAP32[HEAP32[$4 >> 2] + 276 >> 2] = HEAP32[$7 >> 2]; + $6 = HEAP32[1358]; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $6)) { + break label$1 + } + HEAP32[HEAP32[$4 >> 2] + 280 >> 2] = HEAP32[$7 >> 2]; + $8 = HEAP32[1359]; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $8)) { + break label$1 + } + HEAP32[HEAP32[$4 >> 2] + 284 >> 2] = HEAP32[$7 >> 2]; + $9 = HEAP32[1360]; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $9)) { + break label$1 + } + HEAP32[HEAP32[$4 >> 2] + 288 >> 2] = HEAP32[$7 >> 2]; + $10 = HEAP32[1361]; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $10)) { + break label$1 + } + HEAP32[HEAP32[$4 >> 2] + 292 >> 2] = HEAP32[$7 >> 2] + 1; + $11 = HEAP32[1362]; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $11)) { + break label$1 + } + HEAP32[HEAP32[$4 >> 2] + 296 >> 2] = HEAP32[$7 >> 2] + 1; + $12 = HEAP32[$4 >> 2]; + $13 = HEAP32[$12 + 56 >> 2]; + $14 = $12 + 304 | 0; + $12 = HEAP32[1363]; + if (!FLAC__bitreader_read_raw_uint64($13, $14, $12)) { + break label$1 + } + $13 = HEAP32[$4 >> 2]; + if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$13 + 56 >> 2], $13 + 312 | 0, 16)) { + break label$1 + } + if (!FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3 - (($12 + ($11 + ($10 + ($9 + ($8 + ($6 + ($1 + $5 | 0) | 0) | 0) | 0) | 0) | 0) | 0) + 128 >>> 3 | 0) | 0)) { + break label$2 + } + $1 = HEAP32[$4 >> 2]; + HEAP32[$1 + 248 >> 2] = 1; + if (!memcmp($1 + 312 | 0, 7555, 16)) { + HEAP32[$1 + 3624 >> 2] = 0 + } + if (HEAP32[$1 + 3632 >> 2] | !HEAP32[$1 + 608 >> 2]) { + break label$4 + } + $2 = HEAP32[$1 + 28 >> 2]; + if (!$2) { + break label$4 + } + FUNCTION_TABLE[$2]($0, $1 + 256 | 0, HEAP32[$1 + 48 >> 2]); + break label$4; + } + $1 = HEAP32[$4 >> 2]; + HEAP32[$1 + 252 >> 2] = 0; + $5 = HEAP32[$7 + 176 >> 2]; + HEAP32[$1 + 448 >> 2] = ($5 >>> 0) / 18; + HEAP32[$1 + 440 >> 2] = $5; + HEAP32[$1 + 436 >> 2] = $6; + HEAP32[$1 + 432 >> 2] = 3; + $1 = HEAP32[$4 >> 2]; + $2 = HEAP32[$1 + 452 >> 2]; + $3 = HEAP32[$1 + 448 >> 2]; + label$9 : { + if ($3) { + __wasm_i64_mul($3, 0, 24, 0); + if (!i64toi32_i32$HIGH_BITS) { + $1 = dlrealloc($2, Math_imul($3, 24)); + if ($1) { + HEAP32[HEAP32[$4 >> 2] + 452 >> 2] = $1; + break label$9; + } + dlfree($2); + $1 = HEAP32[$4 >> 2]; + } + HEAP32[$1 + 452 >> 2] = 0; + break label$3; + } + $1 = dlrealloc($2, 0); + HEAP32[HEAP32[$4 >> 2] + 452 >> 2] = $1; + if (!$1) { + break label$3 + } + } + $2 = HEAP32[$4 >> 2]; + $1 = 0; + label$14 : { + if (!HEAP32[$2 + 448 >> 2]) { + break label$14 + } + $6 = HEAP32[1367]; + $8 = HEAP32[1366]; + $9 = HEAP32[1365]; + $3 = 0; + while (1) { + if (!FLAC__bitreader_read_raw_uint64(HEAP32[$2 + 56 >> 2], $7, $9)) { + break label$2 + } + $2 = HEAP32[$7 + 4 >> 2]; + $1 = Math_imul($3, 24); + $10 = HEAP32[$4 >> 2]; + $11 = $1 + HEAP32[$10 + 452 >> 2] | 0; + HEAP32[$11 >> 2] = HEAP32[$7 >> 2]; + HEAP32[$11 + 4 >> 2] = $2; + if (!FLAC__bitreader_read_raw_uint64(HEAP32[$10 + 56 >> 2], $7, $8)) { + break label$2 + } + $2 = HEAP32[$7 + 4 >> 2]; + $10 = HEAP32[$4 >> 2]; + $11 = $1 + HEAP32[$10 + 452 >> 2] | 0; + HEAP32[$11 + 8 >> 2] = HEAP32[$7 >> 2]; + HEAP32[$11 + 12 >> 2] = $2; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$10 + 56 >> 2], $7 + 188 | 0, $6)) { + break label$2 + } + $2 = HEAP32[$4 >> 2]; + HEAP32[($1 + HEAP32[$2 + 452 >> 2] | 0) + 16 >> 2] = HEAP32[$7 + 188 >> 2]; + $3 = $3 + 1 | 0; + $1 = HEAP32[$2 + 448 >> 2]; + if ($3 >>> 0 < $1 >>> 0) { + continue + } + break; + }; + $1 = Math_imul($1, -18); + } + $1 = $1 + $5 | 0; + if ($1) { + if (!FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[$2 + 56 >> 2], $1)) { + break label$2 + } + $2 = HEAP32[$4 >> 2]; + } + HEAP32[$2 + 252 >> 2] = 1; + if (HEAP32[$2 + 3632 >> 2] | !HEAP32[$2 + 620 >> 2]) { + break label$4 + } + $1 = HEAP32[$2 + 28 >> 2]; + if (!$1) { + break label$4 + } + FUNCTION_TABLE[$1]($0, $2 + 432 | 0, HEAP32[$2 + 48 >> 2]); + break label$4; + } + $3 = HEAP32[$4 >> 2]; + $8 = HEAP32[($3 + ($2 << 2) | 0) + 608 >> 2]; + $5 = HEAP32[$7 + 176 >> 2]; + $1 = memset($7, 176); + HEAP32[$1 + 8 >> 2] = $5; + HEAP32[$1 >> 2] = $2; + HEAP32[$1 + 4 >> 2] = $6; + $9 = !$8; + label$17 : { + if (($2 | 0) != 2) { + break label$17 + } + $10 = $1 + 16 | 0; + $6 = HEAP32[1364] >>> 3 | 0; + if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $10, $6)) { + break label$2 + } + if ($5 >>> 0 < $6 >>> 0) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $2 = 0; + break label$1; + } + $5 = $5 - $6 | 0; + $3 = HEAP32[$4 >> 2]; + $11 = HEAP32[$3 + 1124 >> 2]; + if (!$11) { + break label$17 + } + $12 = HEAP32[$3 + 1120 >> 2]; + $2 = 0; + while (1) { + if (memcmp($12 + Math_imul($2, $6) | 0, $10, $6)) { + $2 = $2 + 1 | 0; + if (($11 | 0) != ($2 | 0)) { + continue + } + break label$17; + } + break; + }; + $9 = ($8 | 0) != 0; + } + if ($9) { + if (!FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $5)) { + break label$2 + } + break label$4; + } + label$22 : { + label$23 : { + label$24 : { + label$25 : { + label$26 : { + label$27 : { + label$28 : { + switch (HEAP32[$1 + 180 >> 2]) { + case 1: + if (FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $5)) { + break label$26 + } + $6 = 0; + break label$22; + case 2: + if (!$5) { + break label$27 + } + $2 = dlmalloc($5); + HEAP32[$1 + 20 >> 2] = $2; + if (!$2) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $6 = 0; + break label$22; + } + if (FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $2, $5)) { + break label$26 + } + $6 = 0; + break label$22; + case 4: + label$35 : { + if ($5 >>> 0 < 8) { + break label$35 + } + $6 = 0; + if (!FLAC__bitreader_read_uint32_little_endian(HEAP32[$3 + 56 >> 2], $1 + 16 | 0)) { + break label$22 + } + $5 = $5 + -8 | 0; + $2 = HEAP32[$1 + 16 >> 2]; + label$36 : { + if ($2) { + if ($5 >>> 0 < $2 >>> 0) { + HEAP32[$1 + 16 >> 2] = 0; + HEAP32[$1 + 20 >> 2] = 0; + break label$35; + } + label$39 : { + label$40 : { + if (($2 | 0) == -1) { + HEAP32[$1 + 20 >> 2] = 0; + break label$40; + } + $3 = dlmalloc($2 + 1 | 0); + HEAP32[$1 + 20 >> 2] = $3; + if ($3) { + break label$39 + } + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + break label$22; + } + if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) { + break label$22 + } + $5 = $5 - $2 | 0; + HEAP8[HEAP32[$1 + 20 >> 2] + HEAP32[$1 + 16 >> 2] | 0] = 0; + break label$36; + } + HEAP32[$1 + 20 >> 2] = 0; + } + if (!FLAC__bitreader_read_uint32_little_endian(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 24 | 0)) { + break label$22 + } + $2 = HEAP32[$1 + 24 >> 2]; + if ($2 >>> 0 >= 100001) { + HEAP32[$1 + 24 >> 2] = 0; + break label$22; + } + if (!$2) { + break label$35 + } + $3 = safe_malloc_mul_2op_p($2, 8); + HEAP32[$1 + 28 >> 2] = $3; + if (!$3) { + break label$24 + } + if (!HEAP32[$1 + 24 >> 2]) { + break label$35 + } + HEAP32[$3 >> 2] = 0; + HEAP32[$3 + 4 >> 2] = 0; + $2 = 0; + label$43 : { + if ($5 >>> 0 < 4) { + break label$43 + } + while (1) { + if (!FLAC__bitreader_read_uint32_little_endian(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3)) { + break label$23 + } + $5 = $5 + -4 | 0; + $8 = HEAP32[$1 + 28 >> 2]; + $9 = $2 << 3; + $3 = $8 + $9 | 0; + $6 = HEAP32[$3 >> 2]; + label$45 : { + if ($6) { + if ($5 >>> 0 < $6 >>> 0) { + break label$43 + } + label$47 : { + label$48 : { + if (($6 | 0) == -1) { + HEAP32[($8 + ($2 << 3) | 0) + 4 >> 2] = 0; + break label$48; + } + $8 = dlmalloc($6 + 1 | 0); + HEAP32[$3 + 4 >> 2] = $8; + if ($8) { + break label$47 + } + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + break label$23; + } + $5 = $5 - $6 | 0; + memset($8, HEAP32[$3 >> 2]); + $6 = FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], HEAP32[$3 + 4 >> 2], HEAP32[$3 >> 2]); + $8 = $9 + HEAP32[$1 + 28 >> 2] | 0; + $3 = HEAP32[$8 + 4 >> 2]; + if (!$6) { + dlfree($3); + HEAP32[(HEAP32[$1 + 28 >> 2] + ($2 << 3) | 0) + 4 >> 2] = 0; + break label$43; + } + HEAP8[$3 + HEAP32[$8 >> 2] | 0] = 0; + break label$45; + } + HEAP32[$3 + 4 >> 2] = 0; + } + $2 = $2 + 1 | 0; + if ($2 >>> 0 >= HEAPU32[$1 + 24 >> 2]) { + break label$35 + } + $3 = HEAP32[$1 + 28 >> 2] + ($2 << 3) | 0; + HEAP32[$3 >> 2] = 0; + HEAP32[$3 + 4 >> 2] = 0; + if ($5 >>> 0 >= 4) { + continue + } + break; + }; + } + HEAP32[$1 + 24 >> 2] = $2; + } + if (!$5) { + break label$26 + } + if (!HEAP32[$1 + 24 >> 2]) { + $2 = $1 + 28 | 0; + dlfree(HEAP32[$2 >> 2]); + HEAP32[$2 >> 2] = 0; + } + if (FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $5)) { + break label$26 + } + $6 = 0; + break label$22; + case 5: + $6 = 0; + $2 = memset($1 + 16 | 0, 160); + if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $2, HEAP32[1378] >>> 3 | 0)) { + break label$22 + } + if (!FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 152 | 0, HEAP32[1379])) { + break label$22 + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1380])) { + break label$22 + } + HEAP32[$1 + 160 >> 2] = HEAP32[$1 + 188 >> 2] != 0; + if (!FLAC__bitreader_skip_bits_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], HEAP32[1381])) { + break label$22 + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1382])) { + break label$22 + } + $2 = HEAP32[$1 + 188 >> 2]; + HEAP32[$1 + 164 >> 2] = $2; + if (!$2) { + break label$26 + } + $2 = dlcalloc($2, 32); + HEAP32[$1 + 168 >> 2] = $2; + if (!$2) { + break label$25 + } + $9 = HEAP32[1371]; + if (!FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $2, $9)) { + break label$22 + } + $10 = HEAP32[1373] >>> 3 | 0; + $11 = HEAP32[1370]; + $12 = HEAP32[1369]; + $8 = HEAP32[1368]; + $13 = HEAP32[1377]; + $16 = HEAP32[1376]; + $17 = HEAP32[1375]; + $18 = HEAP32[1374]; + $19 = HEAP32[1372]; + $5 = 0; + while (1) { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $19)) { + break label$22 + } + $2 = ($5 << 5) + $2 | 0; + HEAP8[$2 + 8 | 0] = HEAP32[$1 + 188 >> 2]; + if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $2 + 9 | 0, $10)) { + break label$22 + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $18)) { + break label$22 + } + HEAP8[$2 + 22 | 0] = HEAPU8[$2 + 22 | 0] & 254 | HEAP8[$1 + 188 | 0] & 1; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $17)) { + break label$22 + } + $3 = $2 + 22 | 0; + HEAP8[$3 | 0] = HEAPU8[$1 + 188 | 0] << 1 & 2 | HEAPU8[$3 | 0] & 253; + if (!FLAC__bitreader_skip_bits_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $16)) { + break label$22 + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $13)) { + break label$22 + } + $3 = HEAP32[$1 + 188 >> 2]; + HEAP8[$2 + 23 | 0] = $3; + label$53 : { + $3 = $3 & 255; + if (!$3) { + break label$53 + } + $3 = dlcalloc($3, 16); + HEAP32[$2 + 24 >> 2] = $3; + label$54 : { + if ($3) { + $14 = $2 + 23 | 0; + if (!HEAPU8[$14 | 0]) { + break label$53 + } + if (!FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $8)) { + break label$22 + } + $20 = $2 + 24 | 0; + $2 = 0; + break label$54; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + break label$22; + } + while (1) { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $12)) { + break label$22 + } + HEAP8[(($2 << 4) + $3 | 0) + 8 | 0] = HEAP32[$1 + 188 >> 2]; + if (!FLAC__bitreader_skip_bits_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $11)) { + break label$22 + } + $2 = $2 + 1 | 0; + if ($2 >>> 0 >= HEAPU8[$14 | 0]) { + break label$53 + } + $3 = HEAP32[$20 >> 2]; + if (FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3 + ($2 << 4) | 0, $8)) { + continue + } + break; + }; + break label$22; + } + $5 = $5 + 1 | 0; + if ($5 >>> 0 >= HEAPU32[$1 + 164 >> 2]) { + break label$26 + } + $2 = HEAP32[$1 + 168 >> 2]; + if (FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $2 + ($5 << 5) | 0, $9)) { + continue + } + break; + }; + break label$22; + case 6: + label$57 : { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$3 + 56 >> 2], $1 + 188 | 0, HEAP32[1383])) { + break label$57 + } + HEAP32[$1 + 16 >> 2] = HEAP32[$1 + 188 >> 2]; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1384])) { + break label$57 + } + label$58 : { + $2 = HEAP32[$1 + 188 >> 2]; + label$59 : { + if (($2 | 0) == -1) { + HEAP32[$1 + 20 >> 2] = 0; + break label$59; + } + $3 = dlmalloc($2 + 1 | 0); + HEAP32[$1 + 20 >> 2] = $3; + if ($3) { + break label$58 + } + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $6 = 0; + break label$22; + } + if ($2) { + if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) { + break label$57 + } + $3 = HEAP32[$1 + 20 >> 2]; + $2 = HEAP32[$1 + 188 >> 2]; + } else { + $2 = 0 + } + HEAP8[$2 + $3 | 0] = 0; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1385])) { + break label$57 + } + label$63 : { + $2 = HEAP32[$1 + 188 >> 2]; + label$64 : { + if (($2 | 0) == -1) { + HEAP32[$1 + 24 >> 2] = 0; + break label$64; + } + $3 = dlmalloc($2 + 1 | 0); + HEAP32[$1 + 24 >> 2] = $3; + if ($3) { + break label$63 + } + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $6 = 0; + break label$22; + } + if ($2) { + if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) { + break label$57 + } + $3 = HEAP32[$1 + 24 >> 2]; + $2 = HEAP32[$1 + 188 >> 2]; + } else { + $2 = 0 + } + HEAP8[$2 + $3 | 0] = 0; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 28 | 0, HEAP32[1386])) { + break label$57 + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 32 | 0, HEAP32[1387])) { + break label$57 + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 36 | 0, HEAP32[1388])) { + break label$57 + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 40 | 0, HEAP32[1389])) { + break label$57 + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 44 | 0, HEAP32[1390])) { + break label$57 + } + $2 = HEAP32[$1 + 44 >> 2]; + $3 = dlmalloc($2 ? $2 : 1); + HEAP32[$1 + 48 >> 2] = $3; + if (!$3) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $6 = 0; + break label$22; + } + if (!$2) { + break label$26 + } + if (FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) { + break label$26 + } + } + $6 = 0; + break label$22; + case 0: + case 3: + break label$26; + default: + break label$28; + }; + } + label$69 : { + if ($5) { + $2 = dlmalloc($5); + HEAP32[$1 + 16 >> 2] = $2; + if ($2) { + break label$69 + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $6 = 0; + break label$22; + } + HEAP32[$1 + 16 >> 2] = 0; + break label$26; + } + if (FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $2, $5)) { + break label$26 + } + $6 = 0; + break label$22; + } + HEAP32[$1 + 20 >> 2] = 0; + } + $6 = 1; + $2 = HEAP32[$4 >> 2]; + if (HEAP32[$2 + 3632 >> 2]) { + break label$22 + } + $3 = HEAP32[$2 + 28 >> 2]; + if (!$3) { + break label$22 + } + FUNCTION_TABLE[$3]($0, $1, HEAP32[$2 + 48 >> 2]); + break label$22; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + break label$22; + } + HEAP32[$1 + 24 >> 2] = 0; + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + break label$22; + } + HEAP32[$1 + 24 >> 2] = $2; + $6 = 0; + } + label$71 : { + label$72 : { + switch (HEAP32[$1 + 180 >> 2] + -1 | 0) { + case 1: + $1 = HEAP32[$1 + 20 >> 2]; + if (!$1) { + break label$71 + } + dlfree($1); + break label$71; + case 3: + $2 = HEAP32[$1 + 20 >> 2]; + if ($2) { + dlfree($2) + } + $3 = HEAP32[$1 + 24 >> 2]; + if ($3) { + $2 = 0; + while (1) { + $5 = HEAP32[(HEAP32[$1 + 28 >> 2] + ($2 << 3) | 0) + 4 >> 2]; + if ($5) { + dlfree($5); + $3 = HEAP32[$1 + 24 >> 2]; + } + $2 = $2 + 1 | 0; + if ($2 >>> 0 < $3 >>> 0) { + continue + } + break; + }; + } + $1 = HEAP32[$1 + 28 >> 2]; + if (!$1) { + break label$71 + } + dlfree($1); + break label$71; + case 4: + $3 = HEAP32[$1 + 164 >> 2]; + if ($3) { + $2 = 0; + while (1) { + $5 = HEAP32[(HEAP32[$1 + 168 >> 2] + ($2 << 5) | 0) + 24 >> 2]; + if ($5) { + dlfree($5); + $3 = HEAP32[$1 + 164 >> 2]; + } + $2 = $2 + 1 | 0; + if ($2 >>> 0 < $3 >>> 0) { + continue + } + break; + }; + } + $1 = HEAP32[$1 + 168 >> 2]; + if (!$1) { + break label$71 + } + dlfree($1); + break label$71; + case 5: + $2 = HEAP32[$1 + 20 >> 2]; + if ($2) { + dlfree($2) + } + $2 = HEAP32[$1 + 24 >> 2]; + if ($2) { + dlfree($2) + } + $1 = HEAP32[$1 + 48 >> 2]; + if (!$1) { + break label$71 + } + dlfree($1); + break label$71; + case 0: + break label$71; + default: + break label$72; + }; + } + $1 = HEAP32[$1 + 16 >> 2]; + if (!$1) { + break label$71 + } + dlfree($1); + } + if (!$6) { + break label$2 + } + } + $2 = 1; + if (!$15) { + break label$1 + } + label$86 : { + label$87 : { + $3 = HEAP32[$4 >> 2]; + if (HEAP32[$3 >> 2]) { + break label$87 + } + $5 = HEAP32[$3 + 12 >> 2]; + if (!$5) { + break label$87 + } + $1 = $3 + 6136 | 0; + if (FUNCTION_TABLE[$5]($0, $1, HEAP32[$3 + 48 >> 2])) { + break label$87 + } + if (!FLAC__bitreader_is_consumed_byte_aligned(HEAP32[HEAP32[$4 >> 2] + 56 >> 2])) { + break label$87 + } + $3 = HEAP32[$1 >> 2]; + $4 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2]; + $4 = ((HEAP32[$4 + 8 >> 2] - HEAP32[$4 + 16 >> 2] << 5) + (HEAP32[$4 + 12 >> 2] << 3) | 0) - HEAP32[$4 + 20 >> 2] >>> 3 | 0; + $5 = HEAP32[$1 + 4 >> 2] - ($3 >>> 0 < $4 >>> 0) | 0; + HEAP32[$1 >> 2] = $3 - $4; + HEAP32[$1 + 4 >> 2] = $5; + break label$86; + } + $1 = HEAP32[$4 >> 2]; + HEAP32[$1 + 6136 >> 2] = 0; + HEAP32[$1 + 6140 >> 2] = 0; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + } + $2 = 0; + } + global$0 = $7 + 192 | 0; + return $2; + } + + function frame_sync_($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0; + $4 = global$0 - 16 | 0; + global$0 = $4; + label$1 : { + label$2 : { + label$3 : { + $2 = HEAP32[$0 + 4 >> 2]; + if (!HEAP32[$2 + 248 >> 2]) { + break label$3 + } + $3 = HEAP32[$2 + 308 >> 2]; + $1 = $3; + $5 = HEAP32[$2 + 304 >> 2]; + if (!($1 | $5)) { + break label$3 + } + $3 = HEAP32[$2 + 244 >> 2]; + if (($1 | 0) == ($3 | 0) & HEAPU32[$2 + 240 >> 2] < $5 >>> 0 | $3 >>> 0 < $1 >>> 0) { + break label$3 + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 4; + break label$2; + } + label$4 : { + if (FLAC__bitreader_is_consumed_byte_aligned(HEAP32[$2 + 56 >> 2])) { + break label$4 + } + $2 = HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2]; + if (FLAC__bitreader_read_raw_uint32($2, $4 + 12 | 0, FLAC__bitreader_bits_left_for_byte_alignment($2))) { + break label$4 + } + $1 = 0; + break label$1; + } + $2 = 0; + while (1) { + $3 = HEAP32[$0 + 4 >> 2]; + label$6 : { + if (HEAP32[$3 + 3520 >> 2]) { + $1 = HEAPU8[$3 + 3590 | 0]; + HEAP32[$4 + 12 >> 2] = $1; + HEAP32[$3 + 3520 >> 2] = 0; + break label$6; + } + $1 = 0; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$3 + 56 >> 2], $4 + 12 | 0, 8)) { + break label$1 + } + $1 = HEAP32[$4 + 12 >> 2]; + } + label$8 : { + if (($1 | 0) != 255) { + break label$8 + } + HEAP8[HEAP32[$0 + 4 >> 2] + 3588 | 0] = 255; + $1 = 0; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $4 + 12 | 0, 8)) { + break label$1 + } + $1 = HEAP32[$4 + 12 >> 2]; + if (($1 | 0) == 255) { + $1 = HEAP32[$0 + 4 >> 2]; + HEAP32[$1 + 3520 >> 2] = 1; + HEAP8[$1 + 3590 | 0] = 255; + break label$8; + } + if (($1 & -2) != 248) { + break label$8 + } + HEAP8[HEAP32[$0 + 4 >> 2] + 3589 | 0] = $1; + HEAP32[HEAP32[$0 >> 2] >> 2] = 3; + break label$2; + } + $1 = $2; + $2 = 1; + if ($1) { + continue + } + $1 = HEAP32[$0 + 4 >> 2]; + if (HEAP32[$1 + 3632 >> 2]) { + continue + } + FUNCTION_TABLE[HEAP32[$1 + 32 >> 2]]($0, 0, HEAP32[$1 + 48 >> 2]); + continue; + }; + } + $1 = 1; + } + global$0 = $4 + 16 | 0; + return $1; + } + + function read_frame_($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $7 = global$0 + -64 | 0; + global$0 = $7; + HEAP32[$1 >> 2] = 0; + $2 = HEAP32[$0 + 4 >> 2]; + $4 = HEAPU16[(HEAPU8[$2 + 3588 | 0] << 1) + 1280 >> 1]; + $5 = HEAP32[$2 + 56 >> 2]; + HEAP32[$5 + 24 >> 2] = HEAPU16[((HEAPU8[$2 + 3589 | 0] ^ $4 >>> 8) << 1) + 1280 >> 1] ^ $4 << 8 & 65280; + $2 = HEAP32[$5 + 20 >> 2]; + HEAP32[$5 + 28 >> 2] = HEAP32[$5 + 16 >> 2]; + HEAP32[$5 + 32 >> 2] = $2; + $5 = HEAP32[$0 + 4 >> 2]; + HEAP8[$7 + 32 | 0] = HEAPU8[$5 + 3588 | 0]; + $2 = HEAPU8[$5 + 3589 | 0]; + HEAP32[$7 + 12 >> 2] = 2; + HEAP8[$7 + 33 | 0] = $2; + label$1 : { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$5 + 56 >> 2], $7 + 28 | 0, 8)) { + break label$1 + } + $4 = $0 + 4 | 0; + label$2 : { + label$3 : { + label$4 : { + label$5 : { + $5 = HEAP32[$7 + 28 >> 2]; + if (($5 | 0) == 255) { + break label$5 + } + HEAP8[$7 + 34 | 0] = $5; + HEAP32[$7 + 12 >> 2] = 3; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 28 | 0, 8)) { + break label$3 + } + $5 = HEAP32[$7 + 28 >> 2]; + if (($5 | 0) == 255) { + break label$5 + } + $8 = $2 >>> 1 & 1; + $2 = HEAP32[$7 + 12 >> 2]; + HEAP8[$2 + ($7 + 32 | 0) | 0] = $5; + $5 = 1; + HEAP32[$7 + 12 >> 2] = $2 + 1; + $2 = HEAPU8[$7 + 34 | 0]; + $3 = $2 >>> 4 | 0; + HEAP32[$7 + 28 >> 2] = $3; + label$6 : { + label$7 : { + label$8 : { + label$9 : { + switch ($3 - 1 | 0) { + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + HEAP32[HEAP32[$4 >> 2] + 1136 >> 2] = 256 << $3 + -8; + break label$8; + case 1: + case 2: + case 3: + case 4: + HEAP32[HEAP32[$4 >> 2] + 1136 >> 2] = 576 << $3 + -2; + break label$8; + case 5: + case 6: + break label$7; + case 0: + break label$9; + default: + break label$6; + }; + } + HEAP32[HEAP32[$4 >> 2] + 1136 >> 2] = 192; + } + $3 = 0; + } + $5 = $8; + } + $6 = $2 & 15; + HEAP32[$7 + 28 >> 2] = $6; + label$12 : { + label$13 : { + label$14 : { + switch ($6 - 1 | 0) { + default: + $6 = 0; + $8 = HEAP32[$4 >> 2]; + if (HEAP32[$8 + 248 >> 2]) { + break label$13 + } + $5 = 1; + break label$12; + case 0: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 88200; + $6 = 0; + break label$12; + case 1: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 176400; + $6 = 0; + break label$12; + case 2: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 192e3; + $6 = 0; + break label$12; + case 3: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 8e3; + $6 = 0; + break label$12; + case 4: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 16e3; + $6 = 0; + break label$12; + case 5: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 22050; + $6 = 0; + break label$12; + case 6: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 24e3; + $6 = 0; + break label$12; + case 7: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 32e3; + $6 = 0; + break label$12; + case 8: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 44100; + $6 = 0; + break label$12; + case 9: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 48e3; + $6 = 0; + break label$12; + case 10: + HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 96e3; + $6 = 0; + break label$12; + case 11: + case 12: + case 13: + break label$12; + case 14: + break label$14; + }; + } + $5 = HEAP32[$4 >> 2]; + if (!HEAP32[$5 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2]) + } + $2 = HEAP32[$0 >> 2]; + HEAP32[$2 >> 2] = 2; + break label$4; + } + HEAP32[$8 + 1140 >> 2] = HEAP32[$8 + 288 >> 2]; + } + $10 = HEAPU8[$7 + 35 | 0]; + $9 = $10 >>> 4 | 0; + HEAP32[$7 + 28 >> 2] = $9; + label$28 : { + label$29 : { + if ($9 & 8) { + $2 = HEAP32[$4 >> 2]; + HEAP32[$2 + 1144 >> 2] = 2; + $8 = 1; + label$31 : { + switch ($9 & 7) { + case 1: + $8 = 2; + break label$29; + case 0: + break label$29; + case 2: + break label$31; + default: + break label$28; + }; + } + $8 = 3; + break label$29; + } + $2 = HEAP32[$4 >> 2]; + HEAP32[$2 + 1144 >> 2] = $9 + 1; + $8 = 0; + } + HEAP32[$2 + 1148 >> 2] = $8; + $8 = $5; + } + $9 = $10 >>> 1 & 7; + HEAP32[$7 + 28 >> 2] = $9; + $5 = 1; + label$33 : { + label$34 : { + label$35 : { + switch ($9 - 1 | 0) { + default: + if (!HEAP32[$2 + 248 >> 2]) { + break label$33 + } + HEAP32[$2 + 1152 >> 2] = HEAP32[$2 + 296 >> 2]; + break label$34; + case 0: + HEAP32[$2 + 1152 >> 2] = 8; + break label$34; + case 1: + HEAP32[$2 + 1152 >> 2] = 12; + break label$34; + case 3: + HEAP32[$2 + 1152 >> 2] = 16; + break label$34; + case 4: + HEAP32[$2 + 1152 >> 2] = 20; + break label$34; + case 2: + case 6: + break label$33; + case 5: + break label$35; + }; + } + HEAP32[$2 + 1152 >> 2] = 24; + } + $5 = $8; + } + label$41 : { + if (!(!HEAP32[$2 + 248 >> 2] | HEAP32[$2 + 272 >> 2] == HEAP32[$2 + 276 >> 2] ? !(HEAP8[$7 + 33 | 0] & 1) : 0)) { + if (!FLAC__bitreader_read_utf8_uint64(HEAP32[$2 + 56 >> 2], $7 + 16 | 0, $7 + 32 | 0, $7 + 12 | 0)) { + break label$3 + } + $8 = HEAP32[$7 + 20 >> 2]; + $2 = $8; + $9 = HEAP32[$7 + 16 >> 2]; + if (($9 | 0) == -1 & ($2 | 0) == -1) { + $8 = HEAPU8[(HEAP32[$7 + 12 >> 2] + $7 | 0) + 31 | 0]; + $5 = HEAP32[$4 >> 2]; + HEAP32[$5 + 3520 >> 2] = 1; + HEAP8[$5 + 3590 | 0] = $8; + if (!HEAP32[$5 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2]) + } + $2 = HEAP32[$0 >> 2]; + HEAP32[$2 >> 2] = 2; + break label$4; + } + $8 = HEAP32[$4 >> 2]; + $11 = $8 + 1160 | 0; + HEAP32[$11 >> 2] = $9; + HEAP32[$11 + 4 >> 2] = $2; + HEAP32[$8 + 1156 >> 2] = 1; + break label$41; + } + if (!FLAC__bitreader_read_utf8_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, $7 + 32 | 0, $7 + 12 | 0)) { + break label$3 + } + $8 = HEAP32[$7 + 28 >> 2]; + if (($8 | 0) == -1) { + $8 = HEAPU8[(HEAP32[$7 + 12 >> 2] + $7 | 0) + 31 | 0]; + $5 = HEAP32[$4 >> 2]; + HEAP32[$5 + 3520 >> 2] = 1; + HEAP8[$5 + 3590 | 0] = $8; + if (!HEAP32[$5 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2]) + } + $2 = HEAP32[$0 >> 2]; + HEAP32[$2 >> 2] = 2; + break label$4; + } + $2 = HEAP32[$4 >> 2]; + HEAP32[$2 + 1160 >> 2] = $8; + HEAP32[$2 + 1156 >> 2] = 0; + } + $2 = HEAP32[$4 >> 2]; + if ($3) { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) { + break label$3 + } + $2 = HEAP32[$7 + 12 >> 2]; + $8 = HEAP32[$7 + 28 >> 2]; + HEAP8[$2 + ($7 + 32 | 0) | 0] = $8; + HEAP32[$7 + 12 >> 2] = $2 + 1; + if (($3 | 0) == 7) { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 8 | 0, 8)) { + break label$3 + } + $8 = HEAP32[$7 + 12 >> 2]; + $2 = HEAP32[$7 + 8 >> 2]; + HEAP8[$8 + ($7 + 32 | 0) | 0] = $2; + HEAP32[$7 + 12 >> 2] = $8 + 1; + $8 = $2 | HEAP32[$7 + 28 >> 2] << 8; + HEAP32[$7 + 28 >> 2] = $8; + } + $2 = HEAP32[$4 >> 2]; + HEAP32[$2 + 1136 >> 2] = $8 + 1; + } + if ($6) { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) { + break label$3 + } + $8 = HEAP32[$7 + 12 >> 2]; + $2 = HEAP32[$7 + 28 >> 2]; + HEAP8[$8 + ($7 + 32 | 0) | 0] = $2; + HEAP32[$7 + 12 >> 2] = $8 + 1; + label$51 : { + if (($6 | 0) != 12) { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 8 | 0, 8)) { + break label$3 + } + $8 = HEAP32[$7 + 12 >> 2]; + $2 = HEAP32[$7 + 8 >> 2]; + HEAP8[$8 + ($7 + 32 | 0) | 0] = $2; + HEAP32[$7 + 12 >> 2] = $8 + 1; + $3 = $2 | HEAP32[$7 + 28 >> 2] << 8; + HEAP32[$7 + 28 >> 2] = $3; + if (($6 | 0) == 13) { + break label$51 + } + $3 = Math_imul($3, 10); + break label$51; + } + $3 = Math_imul($2, 1e3); + } + $2 = HEAP32[$4 >> 2]; + HEAP32[$2 + 1140 >> 2] = $3; + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) { + break label$3 + } + $8 = HEAPU8[$7 + 28 | 0]; + $3 = FLAC__crc8($7 + 32 | 0, HEAP32[$7 + 12 >> 2]); + $2 = HEAP32[$4 >> 2]; + if (($3 | 0) != ($8 | 0)) { + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 1, HEAP32[$2 + 48 >> 2]) + } + $2 = HEAP32[$0 >> 2]; + HEAP32[$2 >> 2] = 2; + break label$4; + } + HEAP32[$2 + 232 >> 2] = 0; + label$55 : { + label$56 : { + if (HEAP32[$2 + 1156 >> 2]) { + break label$56 + } + $3 = $2 + 1160 | 0; + $8 = HEAP32[$3 >> 2]; + HEAP32[$7 + 28 >> 2] = $8; + HEAP32[$2 + 1156 >> 2] = 1; + $6 = HEAP32[$2 + 228 >> 2]; + if ($6) { + (wasm2js_i32$0 = $3, wasm2js_i32$1 = __wasm_i64_mul($6, 0, $8, 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + HEAP32[$3 + 4 >> 2] = i64toi32_i32$HIGH_BITS; + break label$56; + } + if (HEAP32[$2 + 248 >> 2]) { + $3 = HEAP32[$2 + 272 >> 2]; + if (($3 | 0) != HEAP32[$2 + 276 >> 2]) { + break label$55 + } + $2 = $2 + 1160 | 0; + (wasm2js_i32$0 = $2, wasm2js_i32$1 = __wasm_i64_mul($3, 0, $8, 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + HEAP32[$2 + 4 >> 2] = i64toi32_i32$HIGH_BITS; + $8 = HEAP32[$4 >> 2]; + HEAP32[$8 + 232 >> 2] = HEAP32[$8 + 276 >> 2]; + break label$56; + } + if (!$8) { + $8 = $2 + 1160 | 0; + HEAP32[$8 >> 2] = 0; + HEAP32[$8 + 4 >> 2] = 0; + $8 = HEAP32[$4 >> 2]; + HEAP32[$8 + 232 >> 2] = HEAP32[$8 + 1136 >> 2]; + break label$56; + } + $3 = $2 + 1160 | 0; + (wasm2js_i32$0 = $3, wasm2js_i32$1 = __wasm_i64_mul(HEAP32[$2 + 1136 >> 2], 0, $8, 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + HEAP32[$3 + 4 >> 2] = i64toi32_i32$HIGH_BITS; + } + if (!($5 | $10 & 1)) { + $2 = HEAP32[$0 >> 2]; + break label$4; + } + $2 = HEAP32[$4 >> 2]; + } + label$61 : { + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]); + break label$61; + } + HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1; + } + $2 = HEAP32[$0 >> 2]; + HEAP32[$2 >> 2] = 2; + break label$4; + } + $5 = HEAP32[$4 >> 2]; + HEAP32[$5 + 3520 >> 2] = 1; + HEAP8[$5 + 3590 | 0] = 255; + if (!HEAP32[$5 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2]) + } + $2 = HEAP32[$0 >> 2]; + HEAP32[$2 >> 2] = 2; + } + $8 = 1; + if (HEAP32[$2 >> 2] == 2) { + break label$1 + } + $2 = HEAP32[$4 >> 2]; + $5 = HEAP32[$2 + 1144 >> 2]; + $6 = HEAP32[$2 + 1136 >> 2]; + if (!(HEAPU32[$2 + 224 >> 2] >= $5 >>> 0 ? HEAPU32[$2 + 220 >> 2] >= $6 >>> 0 : 0)) { + $3 = HEAP32[$2 + 60 >> 2]; + if ($3) { + dlfree($3 + -16 | 0); + HEAP32[HEAP32[$4 >> 2] + 60 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 3592 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$4 >> 2] + 92 >> 2] = 0; + HEAP32[HEAP32[$4 >> 2] + 3592 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 - -64 >> 2]; + if ($3) { + dlfree($3 + -16 | 0); + HEAP32[HEAP32[$4 >> 2] - -64 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 3596 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$4 >> 2] + 96 >> 2] = 0; + HEAP32[HEAP32[$4 >> 2] + 3596 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 68 >> 2]; + if ($3) { + dlfree($3 + -16 | 0); + HEAP32[HEAP32[$4 >> 2] + 68 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 3600 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$4 >> 2] + 100 >> 2] = 0; + HEAP32[HEAP32[$4 >> 2] + 3600 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 72 >> 2]; + if ($3) { + dlfree($3 + -16 | 0); + HEAP32[HEAP32[$4 >> 2] + 72 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 3604 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$4 >> 2] + 104 >> 2] = 0; + HEAP32[HEAP32[$4 >> 2] + 3604 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 76 >> 2]; + if ($3) { + dlfree($3 + -16 | 0); + HEAP32[HEAP32[$4 >> 2] + 76 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 3608 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$4 >> 2] + 108 >> 2] = 0; + HEAP32[HEAP32[$4 >> 2] + 3608 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 80 >> 2]; + if ($3) { + dlfree($3 + -16 | 0); + HEAP32[HEAP32[$4 >> 2] + 80 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 3612 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$4 >> 2] + 112 >> 2] = 0; + HEAP32[HEAP32[$4 >> 2] + 3612 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 84 >> 2]; + if ($3) { + dlfree($3 + -16 | 0); + HEAP32[HEAP32[$4 >> 2] + 84 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 3616 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$4 >> 2] + 116 >> 2] = 0; + HEAP32[HEAP32[$4 >> 2] + 3616 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $3 = HEAP32[$2 + 88 >> 2]; + if ($3) { + dlfree($3 + -16 | 0); + HEAP32[HEAP32[$4 >> 2] + 88 >> 2] = 0; + $2 = HEAP32[$4 >> 2]; + } + $2 = HEAP32[$2 + 3620 >> 2]; + if ($2) { + dlfree($2); + HEAP32[HEAP32[$4 >> 2] + 120 >> 2] = 0; + HEAP32[HEAP32[$4 >> 2] + 3620 >> 2] = 0; + } + label$97 : { + if (!$5) { + break label$97 + } + if ($6 >>> 0 > 4294967291) { + break label$2 + } + $2 = $6 + 4 | 0; + if (($2 & 1073741823) != ($2 | 0)) { + break label$2 + } + $9 = $2 << 2; + $3 = 0; + while (1) { + $2 = dlmalloc($9); + if (!$2) { + break label$2 + } + HEAP32[$2 >> 2] = 0; + HEAP32[$2 + 4 >> 2] = 0; + HEAP32[$2 + 8 >> 2] = 0; + HEAP32[$2 + 12 >> 2] = 0; + $10 = $3 << 2; + HEAP32[($10 + HEAP32[$4 >> 2] | 0) + 60 >> 2] = $2 + 16; + $2 = $10 + HEAP32[$4 >> 2] | 0; + if (FLAC__memory_alloc_aligned_int32_array($6, $2 + 3592 | 0, $2 + 92 | 0)) { + $3 = $3 + 1 | 0; + if (($5 | 0) == ($3 | 0)) { + break label$97 + } + continue; + } + break; + }; + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + break label$3; + } + $2 = HEAP32[$4 >> 2]; + HEAP32[$2 + 224 >> 2] = $5; + HEAP32[$2 + 220 >> 2] = $6; + $5 = HEAP32[$2 + 1144 >> 2]; + } + label$100 : { + if ($5) { + $17 = HEAP32[1412]; + $20 = -1 << $17 ^ -1; + $18 = HEAP32[1406]; + $19 = HEAP32[1405]; + $21 = HEAP32[1413]; + $5 = 0; + while (1) { + $3 = HEAP32[$2 + 1152 >> 2]; + label$103 : { + label$104 : { + switch (HEAP32[$2 + 1148 >> 2] + -1 | 0) { + case 0: + $3 = (($5 | 0) == 1) + $3 | 0; + break label$103; + case 1: + $3 = !$5 + $3 | 0; + break label$103; + case 2: + break label$104; + default: + break label$103; + }; + } + $3 = (($5 | 0) == 1) + $3 | 0; + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) { + break label$3 + } + $2 = HEAP32[$7 + 28 >> 2]; + HEAP32[$7 + 28 >> 2] = $2 & 254; + $13 = $2 & 1; + label$107 : { + if ($13) { + if (!FLAC__bitreader_read_unary_unsigned(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 32 | 0)) { + break label$3 + } + $2 = HEAP32[$4 >> 2]; + $6 = HEAP32[$7 + 32 >> 2] + 1 | 0; + HEAP32[($2 + Math_imul($5, 292) | 0) + 1464 >> 2] = $6; + if ($3 >>> 0 <= $6 >>> 0) { + break label$3 + } + $3 = $3 - $6 | 0; + break label$107; + } + $2 = HEAP32[$4 >> 2]; + HEAP32[($2 + Math_imul($5, 292) | 0) + 1464 >> 2] = 0; + } + $6 = HEAP32[$7 + 28 >> 2]; + label$109 : { + if ($6 & 128) { + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2]) + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$109; + } + label$112 : { + label$113 : { + label$114 : { + switch ($6 | 0) { + case 0: + $6 = HEAP32[(($5 << 2) + $2 | 0) + 60 >> 2]; + $9 = Math_imul($5, 292) + $2 | 0; + HEAP32[$9 + 1176 >> 2] = 0; + if (!FLAC__bitreader_read_raw_int32(HEAP32[$2 + 56 >> 2], $7 + 32 | 0, $3)) { + break label$3 + } + HEAP32[$9 + 1180 >> 2] = HEAP32[$7 + 32 >> 2]; + $2 = 0; + $3 = HEAP32[$4 >> 2]; + if (!HEAP32[$3 + 1136 >> 2]) { + break label$113 + } + while (1) { + HEAP32[$6 + ($2 << 2) >> 2] = HEAP32[$7 + 32 >> 2]; + $2 = $2 + 1 | 0; + if ($2 >>> 0 < HEAPU32[$3 + 1136 >> 2]) { + continue + } + break; + }; + break label$113; + case 2: + $6 = ($2 + 1136 | 0) + Math_imul($5, 292) | 0; + $9 = $6 + 44 | 0; + $10 = $5 << 2; + $11 = HEAP32[($10 + $2 | 0) + 92 >> 2]; + HEAP32[$9 >> 2] = $11; + HEAP32[$6 + 40 >> 2] = 1; + $6 = 0; + if (HEAP32[$2 + 1136 >> 2]) { + while (1) { + if (!FLAC__bitreader_read_raw_int32(HEAP32[$2 + 56 >> 2], $7 + 32 | 0, $3)) { + break label$3 + } + HEAP32[$11 + ($6 << 2) >> 2] = HEAP32[$7 + 32 >> 2]; + $6 = $6 + 1 | 0; + $2 = HEAP32[$4 >> 2]; + $12 = HEAP32[$2 + 1136 >> 2]; + if ($6 >>> 0 < $12 >>> 0) { + continue + } + break; + }; + $6 = $12 << 2; + } + memcpy(HEAP32[($2 + $10 | 0) + 60 >> 2], HEAP32[$9 >> 2], $6); + break label$113; + default: + break label$114; + }; + } + if ($6 >>> 0 <= 15) { + label$121 : { + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]); + break label$121; + } + HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$109; + } + if ($6 >>> 0 <= 24) { + $9 = Math_imul($5, 292) + $2 | 0; + HEAP32[$9 + 1176 >> 2] = 2; + $11 = $5 << 2; + $12 = HEAP32[($11 + $2 | 0) + 92 >> 2]; + $10 = $6 >>> 1 & 7; + HEAP32[$9 + 1192 >> 2] = $10; + HEAP32[$9 + 1212 >> 2] = $12; + $6 = HEAP32[$2 + 56 >> 2]; + if ($10) { + $12 = $9 + 1196 | 0; + $2 = 0; + while (1) { + if (!FLAC__bitreader_read_raw_int32($6, $7 + 32 | 0, $3)) { + break label$3 + } + HEAP32[$12 + ($2 << 2) >> 2] = HEAP32[$7 + 32 >> 2]; + $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2]; + $2 = $2 + 1 | 0; + if (($10 | 0) != ($2 | 0)) { + continue + } + break; + }; + } + if (!FLAC__bitreader_read_raw_uint32($6, $7 + 16 | 0, $19)) { + break label$3 + } + $6 = $9 + 1180 | 0; + $3 = HEAP32[$7 + 16 >> 2]; + HEAP32[$6 >> 2] = $3; + $2 = HEAP32[$4 >> 2]; + label$126 : { + label$127 : { + if ($3 >>> 0 <= 1) { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 16 | 0, $18)) { + break label$3 + } + $2 = HEAP32[$4 >> 2]; + $3 = HEAP32[$7 + 16 >> 2]; + if (HEAP32[$2 + 1136 >> 2] >>> $3 >>> 0 >= $10 >>> 0) { + break label$127 + } + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2]) + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$126; + } + label$130 : { + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]); + break label$130; + } + HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$126; + } + HEAP32[$9 + 1184 >> 2] = $3; + $2 = Math_imul($5, 12); + HEAP32[$9 + 1188 >> 2] = ($2 + HEAP32[$4 >> 2] | 0) + 124; + $6 = HEAP32[$6 >> 2]; + if ($6 >>> 0 < 2) { + $14 = $3; + $3 = HEAP32[$0 + 4 >> 2]; + if (!read_residual_partitioned_rice_($0, $10, $14, ($2 + $3 | 0) + 124 | 0, HEAP32[($3 + $11 | 0) + 92 >> 2], ($6 | 0) == 1)) { + break label$3 + } + } + $2 = $10 << 2; + memcpy(HEAP32[($11 + HEAP32[$4 >> 2] | 0) + 60 >> 2], $9 + 1196 | 0, $2); + $3 = HEAP32[$4 >> 2]; + $6 = $3 + $11 | 0; + FLAC__fixed_restore_signal(HEAP32[$6 + 92 >> 2], HEAP32[$3 + 1136 >> 2] - $10 | 0, $10, $2 + HEAP32[$6 + 60 >> 2] | 0); + } + if (HEAP32[HEAP32[$0 >> 2] >> 2] == 2) { + break label$109 + } + if ($13) { + break label$112 + } + break label$109; + } + if ($6 >>> 0 <= 63) { + label$134 : { + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]); + break label$134; + } + HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$109; + } + $9 = Math_imul($5, 292) + $2 | 0; + HEAP32[$9 + 1176 >> 2] = 3; + $11 = $5 << 2; + $15 = HEAP32[($11 + $2 | 0) + 92 >> 2]; + $12 = $6 >>> 1 & 31; + $10 = $12 + 1 | 0; + HEAP32[$9 + 1192 >> 2] = $10; + HEAP32[$9 + 1460 >> 2] = $15; + $6 = HEAP32[$2 + 56 >> 2]; + $2 = 0; + while (1) { + if (!FLAC__bitreader_read_raw_int32($6, $7 + 32 | 0, $3)) { + break label$3 + } + HEAP32[($9 + ($2 << 2) | 0) + 1332 >> 2] = HEAP32[$7 + 32 >> 2]; + $15 = ($2 | 0) != ($12 | 0); + $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2]; + $2 = $2 + 1 | 0; + if ($15) { + continue + } + break; + }; + if (!FLAC__bitreader_read_raw_uint32($6, $7 + 16 | 0, $17)) { + break label$3 + } + $2 = HEAP32[$7 + 16 >> 2]; + label$137 : { + if (($2 | 0) == ($20 | 0)) { + $2 = HEAP32[$4 >> 2]; + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2]) + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$137; + } + $16 = $9 + 1196 | 0; + HEAP32[$16 >> 2] = $2 + 1; + if (!FLAC__bitreader_read_raw_int32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 32 | 0, $21)) { + break label$3 + } + $2 = HEAP32[$7 + 32 >> 2]; + if (($2 | 0) <= -1) { + $2 = HEAP32[$4 >> 2]; + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2]) + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$137; + } + $15 = $9 + 1200 | 0; + HEAP32[$15 >> 2] = $2; + $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2]; + $2 = 0; + while (1) { + if (!FLAC__bitreader_read_raw_int32($6, $7 + 32 | 0, HEAP32[$16 >> 2])) { + break label$3 + } + HEAP32[($9 + ($2 << 2) | 0) + 1204 >> 2] = HEAP32[$7 + 32 >> 2]; + $14 = ($2 | 0) != ($12 | 0); + $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2]; + $2 = $2 + 1 | 0; + if ($14) { + continue + } + break; + }; + if (!FLAC__bitreader_read_raw_uint32($6, $7 + 16 | 0, $19)) { + break label$3 + } + $14 = $9 + 1180 | 0; + $6 = HEAP32[$7 + 16 >> 2]; + HEAP32[$14 >> 2] = $6; + $2 = HEAP32[$4 >> 2]; + label$143 : { + if ($6 >>> 0 <= 1) { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 16 | 0, $18)) { + break label$3 + } + $2 = HEAP32[$4 >> 2]; + $6 = HEAP32[$7 + 16 >> 2]; + if (HEAP32[$2 + 1136 >> 2] >>> $6 >>> 0 > $12 >>> 0) { + break label$143 + } + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2]) + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$137; + } + label$146 : { + if (!HEAP32[$2 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]); + break label$146; + } + HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$137; + } + HEAP32[$9 + 1184 >> 2] = $6; + $2 = Math_imul($5, 12); + HEAP32[$9 + 1188 >> 2] = ($2 + HEAP32[$4 >> 2] | 0) + 124; + $12 = HEAP32[$14 >> 2]; + if ($12 >>> 0 < 2) { + $14 = $6; + $6 = HEAP32[$0 + 4 >> 2]; + if (!read_residual_partitioned_rice_($0, $10, $14, ($2 + $6 | 0) + 124 | 0, HEAP32[($6 + $11 | 0) + 92 >> 2], ($12 | 0) == 1)) { + break label$3 + } + } + $6 = $10 << 2; + memcpy(HEAP32[(HEAP32[$4 >> 2] + $11 | 0) + 60 >> 2], $9 + 1332 | 0, $6); + label$149 : { + $12 = HEAP32[$16 >> 2]; + if ($12 + ((Math_clz32($10) ^ 31) + $3 | 0) >>> 0 <= 32) { + $2 = HEAP32[$4 >> 2]; + if ($3 >>> 0 > 16 | $12 >>> 0 > 16) { + break label$149 + } + $3 = $2 + $11 | 0; + FUNCTION_TABLE[HEAP32[$2 + 44 >> 2]](HEAP32[$3 + 92 >> 2], HEAP32[$2 + 1136 >> 2] - $10 | 0, $9 + 1204 | 0, $10, HEAP32[$15 >> 2], $6 + HEAP32[$3 + 60 >> 2] | 0); + break label$137; + } + $2 = HEAP32[$4 >> 2]; + $3 = $2 + $11 | 0; + FUNCTION_TABLE[HEAP32[$2 + 40 >> 2]](HEAP32[$3 + 92 >> 2], HEAP32[$2 + 1136 >> 2] - $10 | 0, $9 + 1204 | 0, $10, HEAP32[$15 >> 2], $6 + HEAP32[$3 + 60 >> 2] | 0); + break label$137; + } + $3 = $2 + $11 | 0; + FUNCTION_TABLE[HEAP32[$2 + 36 >> 2]](HEAP32[$3 + 92 >> 2], HEAP32[$2 + 1136 >> 2] - $10 | 0, $9 + 1204 | 0, $10, HEAP32[$15 >> 2], $6 + HEAP32[$3 + 60 >> 2] | 0); + } + if (!$13 | HEAP32[HEAP32[$0 >> 2] >> 2] == 2) { + break label$109 + } + break label$112; + } + if (!$13) { + break label$109 + } + } + $3 = HEAP32[$4 >> 2]; + $2 = HEAP32[($3 + Math_imul($5, 292) | 0) + 1464 >> 2]; + HEAP32[$7 + 28 >> 2] = $2; + if (!HEAP32[$3 + 1136 >> 2]) { + break label$109 + } + $6 = HEAP32[($3 + ($5 << 2) | 0) + 60 >> 2]; + HEAP32[$6 >> 2] = HEAP32[$6 >> 2] << $2; + $2 = 1; + if (HEAPU32[$3 + 1136 >> 2] < 2) { + break label$109 + } + while (1) { + $9 = $6 + ($2 << 2) | 0; + HEAP32[$9 >> 2] = HEAP32[$9 >> 2] << HEAP32[$7 + 28 >> 2]; + $2 = $2 + 1 | 0; + if ($2 >>> 0 < HEAPU32[$3 + 1136 >> 2]) { + continue + } + break; + }; + } + if (HEAP32[HEAP32[$0 >> 2] >> 2] == 2) { + break label$100 + } + $5 = $5 + 1 | 0; + $2 = HEAP32[$4 >> 2]; + if ($5 >>> 0 < HEAPU32[$2 + 1144 >> 2]) { + continue + } + break; + }; + } + label$152 : { + if (FLAC__bitreader_is_consumed_byte_aligned(HEAP32[$2 + 56 >> 2])) { + break label$152 + } + HEAP32[$7 + 32 >> 2] = 0; + $5 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2]; + if (!FLAC__bitreader_read_raw_uint32($5, $7 + 32 | 0, FLAC__bitreader_bits_left_for_byte_alignment($5))) { + break label$3 + } + if (!HEAP32[$7 + 32 >> 2]) { + break label$152 + } + $5 = HEAP32[$4 >> 2]; + if (!HEAP32[$5 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 0, HEAP32[$5 + 48 >> 2]) + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + } + if (HEAP32[HEAP32[$0 >> 2] >> 2] == 2) { + break label$1 + } + $5 = FLAC__bitreader_get_read_crc16(HEAP32[HEAP32[$4 >> 2] + 56 >> 2]); + $8 = 0; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 16 | 0, HEAP32[1404])) { + break label$1 + } + label$154 : { + if (($5 | 0) == HEAP32[$7 + 16 >> 2]) { + label$156 : { + label$157 : { + label$158 : { + $5 = HEAP32[$4 >> 2]; + switch (HEAP32[$5 + 1148 >> 2] + -1 | 0) { + case 2: + break label$156; + case 0: + break label$157; + case 1: + break label$158; + default: + break label$154; + }; + } + if (!HEAP32[$5 + 1136 >> 2]) { + break label$154 + } + $2 = HEAP32[$5 - -64 >> 2]; + $6 = HEAP32[$5 + 60 >> 2]; + $3 = 0; + while (1) { + $9 = $3 << 2; + $10 = $9 + $6 | 0; + HEAP32[$10 >> 2] = HEAP32[$10 >> 2] + HEAP32[$2 + $9 >> 2]; + $3 = $3 + 1 | 0; + if ($3 >>> 0 < HEAPU32[$5 + 1136 >> 2]) { + continue + } + break; + }; + break label$154; + } + if (!HEAP32[$5 + 1136 >> 2]) { + break label$154 + } + $2 = HEAP32[$5 - -64 >> 2]; + $6 = HEAP32[$5 + 60 >> 2]; + $3 = 0; + while (1) { + $9 = $3 << 2; + $10 = $9 + $2 | 0; + HEAP32[$10 >> 2] = HEAP32[$6 + $9 >> 2] - HEAP32[$10 >> 2]; + $3 = $3 + 1 | 0; + if ($3 >>> 0 < HEAPU32[$5 + 1136 >> 2]) { + continue + } + break; + }; + break label$154; + } + if (!HEAP32[$5 + 1136 >> 2]) { + break label$154 + } + $10 = HEAP32[$5 - -64 >> 2]; + $11 = HEAP32[$5 + 60 >> 2]; + $3 = 0; + while (1) { + $6 = $3 << 2; + $2 = $6 + $11 | 0; + $13 = $6 + $10 | 0; + $6 = HEAP32[$13 >> 2]; + $9 = $6 & 1 | HEAP32[$2 >> 2] << 1; + HEAP32[$2 >> 2] = $6 + $9 >> 1; + HEAP32[$13 >> 2] = $9 - $6 >> 1; + $3 = $3 + 1 | 0; + if ($3 >>> 0 < HEAPU32[$5 + 1136 >> 2]) { + continue + } + break; + }; + break label$154; + } + $5 = HEAP32[$4 >> 2]; + if (!HEAP32[$5 + 3632 >> 2]) { + FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 2, HEAP32[$5 + 48 >> 2]) + } + $2 = HEAP32[$4 >> 2]; + if (!HEAP32[$2 + 1144 >> 2]) { + break label$154 + } + $3 = 0; + while (1) { + memset(HEAP32[(($3 << 2) + $2 | 0) + 60 >> 2], HEAP32[$2 + 1136 >> 2] << 2); + $3 = $3 + 1 | 0; + $2 = HEAP32[$4 >> 2]; + if ($3 >>> 0 < HEAPU32[$2 + 1144 >> 2]) { + continue + } + break; + }; + } + HEAP32[$1 >> 2] = 1; + $2 = HEAP32[$4 >> 2]; + $1 = HEAP32[$2 + 232 >> 2]; + if ($1) { + HEAP32[$2 + 228 >> 2] = $1 + } + $1 = HEAP32[$0 >> 2]; + $6 = HEAP32[$2 + 1144 >> 2]; + HEAP32[$1 + 8 >> 2] = $6; + HEAP32[$1 + 12 >> 2] = HEAP32[$2 + 1148 >> 2]; + $13 = HEAP32[$2 + 1152 >> 2]; + HEAP32[$1 + 16 >> 2] = $13; + HEAP32[$1 + 20 >> 2] = HEAP32[$2 + 1140 >> 2]; + $5 = HEAP32[$2 + 1136 >> 2]; + HEAP32[$1 + 24 >> 2] = $5; + $1 = $2 + 1160 | 0; + $9 = HEAP32[$1 >> 2]; + $3 = HEAP32[$1 + 4 >> 2]; + $1 = $3; + $12 = $5 + $9 | 0; + if ($12 >>> 0 < $5 >>> 0) { + $1 = $1 + 1 | 0 + } + HEAP32[$2 + 240 >> 2] = $12; + HEAP32[$2 + 244 >> 2] = $1; + $10 = $2 + 60 | 0; + $11 = $2 + 1136 | 0; + label$165 : { + label$166 : { + label$167 : { + if (HEAP32[$2 + 3632 >> 2]) { + HEAP32[$2 + 6156 >> 2] = 1; + $13 = HEAP32[$2 + 6144 >> 2]; + $5 = HEAP32[$2 + 6148 >> 2]; + memcpy($2 + 3752 | 0, $11, 2384); + if (($3 | 0) == ($5 | 0) & $13 >>> 0 < $9 >>> 0 | $5 >>> 0 < $3 >>> 0 | (($1 | 0) == ($5 | 0) & $13 >>> 0 >= $12 >>> 0 | $5 >>> 0 > $1 >>> 0)) { + break label$165 + } + $3 = 0; + $1 = HEAP32[$4 >> 2]; + HEAP32[$1 + 3632 >> 2] = 0; + $5 = $13 - $9 | 0; + $4 = $5; + if ($4) { + if ($6) { + while (1) { + $9 = $3 << 2; + HEAP32[$9 + ($7 + 32 | 0) >> 2] = HEAP32[($2 + $9 | 0) + 60 >> 2] + ($4 << 2); + $3 = $3 + 1 | 0; + if (($6 | 0) != ($3 | 0)) { + continue + } + break; + } + } + HEAP32[$1 + 3752 >> 2] = HEAP32[$1 + 3752 >> 2] - $4; + $2 = $1 + 3776 | 0; + $4 = $2; + $3 = $2; + $1 = HEAP32[$2 + 4 >> 2]; + $2 = $5 + HEAP32[$2 >> 2] | 0; + if ($2 >>> 0 < $5 >>> 0) { + $1 = $1 + 1 | 0 + } + HEAP32[$3 >> 2] = $2; + HEAP32[$4 + 4 >> 2] = $1; + $1 = HEAP32[$0 + 4 >> 2]; + $1 = FUNCTION_TABLE[HEAP32[$1 + 24 >> 2]]($0, $1 + 3752 | 0, $7 + 32 | 0, HEAP32[$1 + 48 >> 2]) | 0; + break label$167; + } + $1 = FUNCTION_TABLE[HEAP32[$1 + 24 >> 2]]($0, $11, $10, HEAP32[$1 + 48 >> 2]) | 0; + break label$167; + } + label$172 : { + if (!HEAP32[$2 + 248 >> 2]) { + HEAP32[$2 + 3624 >> 2] = 0; + break label$172; + } + if (!HEAP32[$2 + 3624 >> 2]) { + break label$172 + } + if (!FLAC__MD5Accumulate($2 + 3636 | 0, $10, $6, $5, $13 + 7 >>> 3 | 0)) { + break label$166 + } + $2 = HEAP32[$4 >> 2]; + } + $1 = FUNCTION_TABLE[HEAP32[$2 + 24 >> 2]]($0, $11, $10, HEAP32[$2 + 48 >> 2]) | 0; + } + if (!$1) { + break label$165 + } + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 7; + break label$1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + } + $8 = 1; + break label$1; + } + $8 = 0; + break label$1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $8 = 0; + } + global$0 = $7 - -64 | 0; + return $8; + } + + function read_residual_partitioned_rice_($0, $1, $2, $3, $4, $5) { + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0; + $6 = global$0 - 16 | 0; + global$0 = $6; + $7 = HEAP32[HEAP32[$0 + 4 >> 2] + 1136 >> 2]; + $11 = HEAP32[($5 ? 5644 : 5640) >> 2]; + $12 = HEAP32[($5 ? 5632 : 5628) >> 2]; + label$1 : { + label$2 : { + if (FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($3, $2 >>> 0 > 6 ? $2 : 6)) { + $8 = $2 ? $7 >>> $2 | 0 : $7 - $1 | 0; + $13 = HEAP32[1409]; + if (!$2) { + break label$2 + } + $5 = 0; + while (1) { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $12)) { + $7 = 0; + break label$1; + } + $9 = $10 << 2; + HEAP32[$9 + HEAP32[$3 >> 2] >> 2] = HEAP32[$6 + 12 >> 2]; + label$6 : { + if (HEAPU32[$6 + 12 >> 2] < $11 >>> 0) { + $7 = 0; + HEAP32[$9 + HEAP32[$3 + 4 >> 2] >> 2] = 0; + $9 = $8 - ($10 ? 0 : $1) | 0; + if (!FLAC__bitreader_read_rice_signed_block(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], ($5 << 2) + $4 | 0, $9, HEAP32[$6 + 12 >> 2])) { + break label$1 + } + $5 = $5 + $9 | 0; + break label$6; + } + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $13)) { + $7 = 0; + break label$1; + } + HEAP32[$9 + HEAP32[$3 + 4 >> 2] >> 2] = HEAP32[$6 + 12 >> 2]; + $7 = $10 ? 0 : $1; + if ($7 >>> 0 >= $8 >>> 0) { + break label$6 + } + while (1) { + if (!FLAC__bitreader_read_raw_int32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 8 | 0, HEAP32[$6 + 12 >> 2])) { + $7 = 0; + break label$1; + } + HEAP32[($5 << 2) + $4 >> 2] = HEAP32[$6 + 8 >> 2]; + $5 = $5 + 1 | 0; + $7 = $7 + 1 | 0; + if (($8 | 0) != ($7 | 0)) { + continue + } + break; + }; + } + $7 = 1; + $10 = $10 + 1 | 0; + if (!($10 >>> $2)) { + continue + } + break; + }; + break label$1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $7 = 0; + break label$1; + } + $7 = 0; + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $12)) { + break label$1 + } + HEAP32[HEAP32[$3 >> 2] >> 2] = HEAP32[$6 + 12 >> 2]; + label$11 : { + if (HEAPU32[$6 + 12 >> 2] >= $11 >>> 0) { + if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $13)) { + break label$1 + } + HEAP32[HEAP32[$3 + 4 >> 2] >> 2] = HEAP32[$6 + 12 >> 2]; + if (!$8) { + break label$11 + } + $5 = 0; + while (1) { + if (!FLAC__bitreader_read_raw_int32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 8 | 0, HEAP32[$6 + 12 >> 2])) { + $7 = 0; + break label$1; + } + HEAP32[($5 << 2) + $4 >> 2] = HEAP32[$6 + 8 >> 2]; + $5 = $5 + 1 | 0; + $7 = $7 + 1 | 0; + if (($8 | 0) != ($7 | 0)) { + continue + } + break; + }; + break label$11; + } + HEAP32[HEAP32[$3 + 4 >> 2] >> 2] = 0; + if (!FLAC__bitreader_read_rice_signed_block(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $4, $8, HEAP32[$6 + 12 >> 2])) { + break label$1 + } + } + $7 = 1; + } + global$0 = $6 + 16 | 0; + return $7; + } + + function FLAC__stream_decoder_process_until_end_of_metadata($0) { + $0 = $0 | 0; + var $1 = 0, $2 = 0; + label$1 : { + label$2 : { + while (1) { + label$4 : { + $1 = 1; + label$5 : { + switch (HEAP32[HEAP32[$0 >> 2] >> 2]) { + case 0: + if (find_metadata_($0)) { + continue + } + break label$4; + case 2: + case 3: + case 4: + case 7: + break label$2; + case 1: + break label$5; + default: + break label$1; + }; + } + if (read_metadata_($0)) { + continue + } + } + break; + }; + $1 = 0; + } + $2 = $1; + } + return $2 | 0; + } + + function FLAC__stream_decoder_process_until_end_of_stream($0) { + $0 = $0 | 0; + var $1 = 0, $2 = 0, $3 = 0; + $1 = global$0 - 16 | 0; + global$0 = $1; + $2 = 1; + label$1 : { + label$2 : { + while (1) { + label$4 : { + label$5 : { + switch (HEAP32[HEAP32[$0 >> 2] >> 2]) { + case 0: + if (find_metadata_($0)) { + continue + } + break label$4; + case 1: + if (read_metadata_($0)) { + continue + } + break label$4; + case 2: + if (frame_sync_($0)) { + continue + } + break label$2; + case 4: + case 7: + break label$2; + case 3: + break label$5; + default: + break label$1; + }; + } + if (read_frame_($0, $1 + 12 | 0)) { + continue + } + } + break; + }; + $2 = 0; + } + $3 = $2; + } + global$0 = $1 + 16 | 0; + return $3 | 0; + } + + function read_callback_proxy_($0, $1, $2, $3) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $0 = FUNCTION_TABLE[HEAP32[HEAP32[$0 + 4 >> 2] + 4 >> 2]]($0, $1, $2, $3) | 0; + if ($0 >>> 0 <= 2) { + return HEAP32[($0 << 2) + 7572 >> 2] + } + return 5; + } + + function FLAC__bitwriter_free($0) { + var $1 = 0; + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + } + + function FLAC__bitwriter_init($0) { + var $1 = 0; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 8192; + HEAP32[$0 + 12 >> 2] = 0; + $1 = $0; + $0 = dlmalloc(32768); + HEAP32[$1 >> 2] = $0; + return ($0 | 0) != 0; + } + + function FLAC__bitwriter_clear($0) { + HEAP32[$0 + 12 >> 2] = 0; + HEAP32[$0 + 16 >> 2] = 0; + } + + function FLAC__bitwriter_get_write_crc16($0, $1) { + var $2 = 0, $3 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $2 = global$0 - 16 | 0; + global$0 = $2; + $3 = 0; + label$1 : { + if (!FLAC__bitwriter_get_buffer($0, $2 + 12 | 0, $2 + 8 | 0)) { + break label$1 + } + (wasm2js_i32$0 = $1, wasm2js_i32$1 = FLAC__crc16(HEAP32[$2 + 12 >> 2], HEAP32[$2 + 8 >> 2])), HEAP16[wasm2js_i32$0 >> 1] = wasm2js_i32$1; + $3 = 1; + } + global$0 = $2 + 16 | 0; + return $3; + } + + function FLAC__bitwriter_get_buffer($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + $5 = HEAP32[$0 + 16 >> 2]; + label$1 : { + if ($5 & 7) { + break label$1 + } + label$2 : { + if (!$5) { + $4 = HEAP32[$0 >> 2]; + $3 = 0; + break label$2; + } + $6 = HEAP32[$0 + 12 >> 2]; + label$4 : { + if (($6 | 0) != HEAP32[$0 + 8 >> 2]) { + break label$4 + } + $4 = $5 + 63 >>> 5 | 0; + $3 = $4 + $6 | 0; + if ($3 >>> 0 <= $6 >>> 0) { + break label$4 + } + $6 = 0; + $5 = HEAP32[$0 >> 2]; + $7 = $3; + $3 = $4 & 1023; + $3 = $7 + ($3 ? 1024 - $3 | 0 : 0) | 0; + label$5 : { + if ($3) { + if (($3 | 0) != ($3 & 1073741823)) { + break label$1 + } + $4 = dlrealloc($5, $3 << 2); + if ($4) { + break label$5 + } + dlfree($5); + return 0; + } + $4 = dlrealloc($5, 0); + if (!$4) { + break label$1 + } + } + HEAP32[$0 + 8 >> 2] = $3; + HEAP32[$0 >> 2] = $4; + $6 = HEAP32[$0 + 12 >> 2]; + $5 = HEAP32[$0 + 16 >> 2]; + } + $4 = HEAP32[$0 >> 2]; + $3 = HEAP32[$0 + 4 >> 2] << 32 - $5; + HEAP32[$4 + ($6 << 2) >> 2] = $3 << 24 | $3 << 8 & 16711680 | ($3 >>> 8 & 65280 | $3 >>> 24); + $3 = HEAP32[$0 + 16 >> 2] >>> 3 | 0; + } + HEAP32[$1 >> 2] = $4; + HEAP32[$2 >> 2] = $3 + (HEAP32[$0 + 12 >> 2] << 2); + $6 = 1; + } + return $6; + } + + function FLAC__bitwriter_get_write_crc8($0, $1) { + var $2 = 0, $3 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $2 = global$0 - 16 | 0; + global$0 = $2; + $3 = 0; + label$1 : { + if (!FLAC__bitwriter_get_buffer($0, $2 + 12 | 0, $2 + 8 | 0)) { + break label$1 + } + (wasm2js_i32$0 = $1, wasm2js_i32$1 = FLAC__crc8(HEAP32[$2 + 12 >> 2], HEAP32[$2 + 8 >> 2])), HEAP8[wasm2js_i32$0 | 0] = wasm2js_i32$1; + $3 = 1; + } + global$0 = $2 + 16 | 0; + return $3; + } + + function FLAC__bitwriter_write_zeroes($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0; + label$1 : { + label$2 : { + if (!$1) { + break label$2 + } + $2 = HEAP32[$0 + 8 >> 2]; + $3 = HEAP32[$0 + 12 >> 2]; + label$3 : { + if ($2 >>> 0 > $3 + $1 >>> 0) { + break label$3 + } + $4 = $3 + ((HEAP32[$0 + 16 >> 2] + $1 | 0) + 31 >>> 5 | 0) | 0; + if ($4 >>> 0 <= $2 >>> 0) { + break label$3 + } + $3 = 0; + $5 = HEAP32[$0 >> 2]; + $2 = $4 - $2 & 1023; + $2 = $4 + ($2 ? 1024 - $2 | 0 : 0) | 0; + label$4 : { + if ($2) { + if (($2 | 0) != ($2 & 1073741823)) { + break label$1 + } + $4 = dlrealloc($5, $2 << 2); + if ($4) { + break label$4 + } + dlfree($5); + return 0; + } + $4 = dlrealloc($5, 0); + if (!$4) { + break label$1 + } + } + HEAP32[$0 + 8 >> 2] = $2; + HEAP32[$0 >> 2] = $4; + } + $2 = HEAP32[$0 + 16 >> 2]; + if ($2) { + $4 = $2; + $2 = 32 - $2 | 0; + $3 = $2 >>> 0 < $1 >>> 0 ? $2 : $1; + $5 = $4 + $3 | 0; + HEAP32[$0 + 16 >> 2] = $5; + $2 = HEAP32[$0 + 4 >> 2] << $3; + HEAP32[$0 + 4 >> 2] = $2; + if (($5 | 0) != 32) { + break label$2 + } + $5 = HEAP32[$0 + 12 >> 2]; + HEAP32[$0 + 12 >> 2] = $5 + 1; + HEAP32[HEAP32[$0 >> 2] + ($5 << 2) >> 2] = $2 << 8 & 16711680 | $2 << 24 | ($2 >>> 8 & 65280 | $2 >>> 24); + HEAP32[$0 + 16 >> 2] = 0; + $1 = $1 - $3 | 0; + } + if ($1 >>> 0 >= 32) { + $2 = HEAP32[$0 >> 2]; + while (1) { + $3 = HEAP32[$0 + 12 >> 2]; + HEAP32[$0 + 12 >> 2] = $3 + 1; + HEAP32[$2 + ($3 << 2) >> 2] = 0; + $1 = $1 + -32 | 0; + if ($1 >>> 0 > 31) { + continue + } + break; + }; + } + if (!$1) { + break label$2 + } + HEAP32[$0 + 16 >> 2] = $1; + HEAP32[$0 + 4 >> 2] = 0; + } + $3 = 1; + } + return $3; + } + + function FLAC__bitwriter_write_raw_uint32($0, $1, $2) { + var $3 = 0; + label$1 : { + if ($2 >>> 0 <= 31) { + $3 = 0; + if ($1 >>> $2) { + break label$1 + } + } + $3 = FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, $2); + } + return $3; + } + + function FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + label$1 : { + if (!$0 | $2 >>> 0 > 32) { + break label$1 + } + $4 = HEAP32[$0 >> 2]; + if (!$4) { + break label$1 + } + $6 = 1; + if (!$2) { + break label$1 + } + $7 = HEAP32[$0 + 8 >> 2]; + $3 = HEAP32[$0 + 12 >> 2]; + label$2 : { + if ($7 >>> 0 > $3 + $2 >>> 0) { + $3 = $4; + break label$2; + } + $5 = $3 + ((HEAP32[$0 + 16 >> 2] + $2 | 0) + 31 >>> 5 | 0) | 0; + if ($5 >>> 0 <= $7 >>> 0) { + $3 = $4; + break label$2; + } + $6 = 0; + $3 = $5 - $7 & 1023; + $5 = $5 + ($3 ? 1024 - $3 | 0 : 0) | 0; + label$5 : { + if ($5) { + if (($5 | 0) != ($5 & 1073741823)) { + break label$1 + } + $3 = dlrealloc($4, $5 << 2); + if ($3) { + break label$5 + } + dlfree($4); + return 0; + } + $3 = dlrealloc($4, 0); + if (!$3) { + break label$1 + } + } + HEAP32[$0 + 8 >> 2] = $5; + HEAP32[$0 >> 2] = $3; + } + $4 = HEAP32[$0 + 16 >> 2]; + $5 = 32 - $4 | 0; + if ($5 >>> 0 > $2 >>> 0) { + HEAP32[$0 + 16 >> 2] = $2 + $4; + HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] << $2 | $1; + return 1; + } + if ($4) { + $4 = $2 - $5 | 0; + HEAP32[$0 + 16 >> 2] = $4; + $2 = HEAP32[$0 + 12 >> 2]; + HEAP32[$0 + 12 >> 2] = $2 + 1; + $3 = ($2 << 2) + $3 | 0; + $2 = HEAP32[$0 + 4 >> 2] << $5 | $1 >>> $4; + HEAP32[$3 >> 2] = $2 << 24 | $2 << 8 & 16711680 | ($2 >>> 8 & 65280 | $2 >>> 24); + HEAP32[$0 + 4 >> 2] = $1; + return 1; + } + $6 = 1; + $2 = $0; + $0 = HEAP32[$0 + 12 >> 2]; + HEAP32[$2 + 12 >> 2] = $0 + 1; + HEAP32[($0 << 2) + $3 >> 2] = $1 << 8 & 16711680 | $1 << 24 | ($1 >>> 8 & 65280 | $1 >>> 24); + } + return $6; + } + + function FLAC__bitwriter_write_raw_int32($0, $1, $2) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 >>> 0 < 32 ? -1 << $2 ^ -1 : -1) & $1, $2); + } + + function FLAC__bitwriter_write_raw_uint64($0, $1, $2, $3) { + var $4 = 0; + label$1 : { + if ($3 >>> 0 >= 33) { + $3 = $3 + -32 | 0; + if ($2 >>> $3 | 0 ? $3 >>> 0 <= 31 : 0) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $2, $3)) { + break label$1 + } + return (FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, 32) | 0) != 0; + } + if (($3 | 0) != 32) { + if ($1 >>> $3) { + break label$1 + } + } + $4 = FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, $3); + } + return $4; + } + + function FLAC__bitwriter_write_raw_uint32_little_endian($0, $1) { + var $2 = 0; + label$1 : { + if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 255, 8)) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 8 & 255, 8)) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 16 & 255, 8)) { + break label$1 + } + $2 = (FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 | 0, 8) | 0) != 0; + } + return $2; + } + + function FLAC__bitwriter_write_byte_block($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0, $6 = 0; + $3 = HEAP32[$0 + 8 >> 2]; + $4 = HEAP32[$0 + 12 >> 2]; + label$1 : { + label$2 : { + if ($3 >>> 0 > ($4 + ($2 >>> 2 | 0) | 0) + 1 >>> 0) { + break label$2 + } + $5 = $4 + ((HEAP32[$0 + 16 >> 2] + ($2 << 3) | 0) + 31 >>> 5 | 0) | 0; + if ($5 >>> 0 <= $3 >>> 0) { + break label$2 + } + $4 = 0; + $6 = HEAP32[$0 >> 2]; + $3 = $5 - $3 & 1023; + $3 = $5 + ($3 ? 1024 - $3 | 0 : 0) | 0; + label$3 : { + if ($3) { + if (($3 | 0) != ($3 & 1073741823)) { + break label$1 + } + $5 = dlrealloc($6, $3 << 2); + if ($5) { + break label$3 + } + dlfree($6); + return 0; + } + $5 = dlrealloc($6, 0); + if (!$5) { + break label$1 + } + } + HEAP32[$0 + 8 >> 2] = $3; + HEAP32[$0 >> 2] = $5; + } + $4 = 1; + if (!$2) { + break label$1 + } + $4 = 0; + label$5 : { + while (1) { + if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, HEAPU8[$1 + $4 | 0], 8)) { + break label$5 + } + $4 = $4 + 1 | 0; + if (($4 | 0) != ($2 | 0)) { + continue + } + break; + }; + return 1; + } + $4 = 0; + } + return $4; + } + + function FLAC__bitwriter_write_unary_unsigned($0, $1) { + if ($1 >>> 0 <= 31) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, 1, $1 + 1 | 0) + } + if (!FLAC__bitwriter_write_zeroes($0, $1)) { + return 0 + } + return (FLAC__bitwriter_write_raw_uint32_nocheck($0, 1, 1) | 0) != 0; + } + + function FLAC__bitwriter_write_rice_signed_block($0, $1, $2, $3) { + var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0; + $4 = 1; + label$1 : { + if (!$2) { + break label$1 + } + $10 = $3 + 1 | 0; + $11 = -1 << $3; + $12 = -1 >>> 31 - $3 | 0; + while (1) { + $6 = HEAP32[$1 >> 2]; + $9 = $6 << 1 ^ $6 >> 31; + $6 = $9 >>> $3 | 0; + $4 = $10 + $6 | 0; + label$3 : { + label$4 : { + $5 = HEAP32[$0 + 16 >> 2]; + if (!$5) { + break label$4 + } + $7 = $4 + $5 | 0; + if ($7 >>> 0 > 31) { + break label$4 + } + HEAP32[$0 + 16 >> 2] = $7; + HEAP32[$0 + 4 >> 2] = ($9 | $11) & $12 | HEAP32[$0 + 4 >> 2] << $4; + break label$3; + } + $8 = HEAP32[$0 + 8 >> 2]; + $7 = HEAP32[$0 + 12 >> 2]; + label$5 : { + if ($8 >>> 0 > ($7 + ($5 + $6 | 0) | 0) + 1 >>> 0) { + break label$5 + } + $4 = $7 + (($4 + $5 | 0) + 31 >>> 5 | 0) | 0; + if ($4 >>> 0 <= $8 >>> 0) { + break label$5 + } + $7 = HEAP32[$0 >> 2]; + $5 = $4 - $8 & 1023; + $5 = $4 + ($5 ? 1024 - $5 | 0 : 0) | 0; + label$6 : { + if ($5) { + $4 = 0; + if (($5 | 0) != ($5 & 1073741823)) { + break label$1 + } + $8 = dlrealloc($7, $5 << 2); + if ($8) { + break label$6 + } + dlfree($7); + return 0; + } + $8 = dlrealloc($7, 0); + $4 = 0; + if (!$8) { + break label$1 + } + } + HEAP32[$0 + 8 >> 2] = $5; + HEAP32[$0 >> 2] = $8; + } + label$8 : { + if (!$6) { + break label$8 + } + $4 = HEAP32[$0 + 16 >> 2]; + if ($4) { + $5 = HEAP32[$0 + 4 >> 2]; + $7 = 32 - $4 | 0; + if ($6 >>> 0 < $7 >>> 0) { + HEAP32[$0 + 16 >> 2] = $4 + $6; + HEAP32[$0 + 4 >> 2] = $5 << $6; + break label$8; + } + $4 = $5 << $7; + HEAP32[$0 + 4 >> 2] = $4; + $5 = HEAP32[$0 + 12 >> 2]; + HEAP32[$0 + 12 >> 2] = $5 + 1; + HEAP32[HEAP32[$0 >> 2] + ($5 << 2) >> 2] = $4 << 8 & 16711680 | $4 << 24 | ($4 >>> 8 & 65280 | $4 >>> 24); + HEAP32[$0 + 16 >> 2] = 0; + $6 = $6 - $7 | 0; + } + if ($6 >>> 0 >= 32) { + $4 = HEAP32[$0 >> 2]; + while (1) { + $5 = HEAP32[$0 + 12 >> 2]; + HEAP32[$0 + 12 >> 2] = $5 + 1; + HEAP32[$4 + ($5 << 2) >> 2] = 0; + $6 = $6 + -32 | 0; + if ($6 >>> 0 > 31) { + continue + } + break; + }; + } + if (!$6) { + break label$8 + } + HEAP32[$0 + 16 >> 2] = $6; + HEAP32[$0 + 4 >> 2] = 0; + } + $6 = ($9 | $11) & $12; + $4 = HEAP32[$0 + 4 >> 2]; + $7 = HEAP32[$0 + 16 >> 2]; + $5 = 32 - $7 | 0; + if ($10 >>> 0 < $5 >>> 0) { + HEAP32[$0 + 16 >> 2] = $7 + $10; + HEAP32[$0 + 4 >> 2] = $6 | $4 << $10; + break label$3; + } + $7 = $10 - $5 | 0; + HEAP32[$0 + 16 >> 2] = $7; + $9 = HEAP32[$0 + 12 >> 2]; + HEAP32[$0 + 12 >> 2] = $9 + 1; + $4 = $4 << $5 | $6 >>> $7; + HEAP32[HEAP32[$0 >> 2] + ($9 << 2) >> 2] = $4 << 24 | $4 << 8 & 16711680 | ($4 >>> 8 & 65280 | $4 >>> 24); + HEAP32[$0 + 4 >> 2] = $6; + } + $1 = $1 + 4 | 0; + $2 = $2 + -1 | 0; + if ($2) { + continue + } + break; + }; + $4 = 1; + } + return $4; + } + + function FLAC__bitwriter_write_utf8_uint32($0, $1) { + if (($1 | 0) >= 0) { + if ($1 >>> 0 <= 127) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, 8) + } + if ($1 >>> 0 <= 2047) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 | 192, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1 + } + if ($1 >>> 0 <= 65535) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 | 224, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1 + } + if ($1 >>> 0 <= 2097151) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 | 240, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1 + } + if ($1 >>> 0 <= 67108863) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 | 248, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1 + } + $0 = FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 30 | 252, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1; + } else { + $0 = 0 + } + return $0; + } + + function FLAC__bitwriter_write_utf8_uint64($0, $1, $2) { + if (($2 | 0) == 15 | $2 >>> 0 < 15) { + if (!$2 & $1 >>> 0 <= 127 | $2 >>> 0 < 0) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, 8) + } + if (!$2 & $1 >>> 0 <= 2047 | $2 >>> 0 < 0) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 63) << 26 | $1 >>> 6 | 192, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1 + } + if (!$2 & $1 >>> 0 <= 65535 | $2 >>> 0 < 0) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 4095) << 20 | $1 >>> 12 | 224, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1 + } + if (!$2 & $1 >>> 0 <= 2097151 | $2 >>> 0 < 0) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 262143) << 14 | $1 >>> 18 | 240, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1 + } + if (!$2 & $1 >>> 0 <= 67108863 | $2 >>> 0 < 0) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 16777215) << 8 | $1 >>> 24 | 248, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1 + } + if (!$2 & $1 >>> 0 <= 2147483647 | $2 >>> 0 < 0) { + return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 1073741823) << 2 | $1 >>> 30 | 252, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1 + } + $0 = FLAC__bitwriter_write_raw_uint32_nocheck($0, 254, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 1073741823) << 2 | $1 >>> 30 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1; + } else { + $0 = 0 + } + return $0; + } + + function FLAC__ogg_encoder_aspect_init($0) { + if (ogg_stream_init($0 + 8 | 0, HEAP32[$0 >> 2])) { + $0 = 0 + } else { + HEAP32[$0 + 392 >> 2] = 0; + HEAP32[$0 + 396 >> 2] = 0; + HEAP32[$0 + 384 >> 2] = 0; + HEAP32[$0 + 388 >> 2] = 1; + $0 = 1; + } + return $0; + } + + function FLAC__ogg_encoder_aspect_set_defaults($0) { + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + } + + function FLAC__ogg_encoder_aspect_write_callback_wrapper($0, $1, $2, $3, $4, $5, $6, $7, $8) { + var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0; + $9 = global$0 - 96 | 0; + global$0 = $9; + label$1 : { + label$2 : { + if (HEAP32[$0 + 384 >> 2]) { + HEAP32[$9 + 72 >> 2] = 0; + HEAP32[$9 + 76 >> 2] = 0; + $12 = $9 + 80 | 0; + $11 = $12; + HEAP32[$11 >> 2] = 0; + HEAP32[$11 + 4 >> 2] = 0; + HEAP32[$9 + 88 >> 2] = 0; + HEAP32[$9 + 92 >> 2] = 0; + HEAP32[$9 + 64 >> 2] = 0; + HEAP32[$9 + 68 >> 2] = 0; + $10 = HEAP32[$0 + 396 >> 2]; + $11 = $3; + $13 = HEAP32[$0 + 392 >> 2]; + $14 = $11 + $13 | 0; + if ($14 >>> 0 < $13 >>> 0) { + $10 = $10 + 1 | 0 + } + HEAP32[$12 >> 2] = $14; + HEAP32[$12 + 4 >> 2] = $10; + label$4 : { + label$5 : { + if (HEAP32[$0 + 388 >> 2]) { + if (($2 | 0) != 38) { + break label$4 + } + HEAP8[$9 | 0] = HEAPU8[7536]; + $2 = HEAP32[2721]; + $2 = HEAPU8[$2 | 0] | HEAPU8[$2 + 1 | 0] << 8 | (HEAPU8[$2 + 2 | 0] << 16 | HEAPU8[$2 + 3 | 0] << 24); + HEAP8[$9 + 5 | 0] = 1; + HEAP8[$9 + 6 | 0] = 0; + HEAP8[$9 + 1 | 0] = $2; + HEAP8[$9 + 2 | 0] = $2 >>> 8; + HEAP8[$9 + 3 | 0] = $2 >>> 16; + HEAP8[$9 + 4 | 0] = $2 >>> 24; + $10 = HEAP32[$0 + 4 >> 2]; + $2 = HEAPU8[5409] | HEAPU8[5410] << 8 | (HEAPU8[5411] << 16 | HEAPU8[5412] << 24); + HEAP8[$9 + 9 | 0] = $2; + HEAP8[$9 + 10 | 0] = $2 >>> 8; + HEAP8[$9 + 11 | 0] = $2 >>> 16; + HEAP8[$9 + 12 | 0] = $2 >>> 24; + HEAP8[$9 + 8 | 0] = $10; + HEAP8[$9 + 7 | 0] = $10 >>> 8; + $2 = HEAPU8[$1 + 34 | 0] | HEAPU8[$1 + 35 | 0] << 8 | (HEAPU8[$1 + 36 | 0] << 16 | HEAPU8[$1 + 37 | 0] << 24); + $10 = HEAPU8[$1 + 30 | 0] | HEAPU8[$1 + 31 | 0] << 8 | (HEAPU8[$1 + 32 | 0] << 16 | HEAPU8[$1 + 33 | 0] << 24); + HEAP8[$9 + 43 | 0] = $10; + HEAP8[$9 + 44 | 0] = $10 >>> 8; + HEAP8[$9 + 45 | 0] = $10 >>> 16; + HEAP8[$9 + 46 | 0] = $10 >>> 24; + HEAP8[$9 + 47 | 0] = $2; + HEAP8[$9 + 48 | 0] = $2 >>> 8; + HEAP8[$9 + 49 | 0] = $2 >>> 16; + HEAP8[$9 + 50 | 0] = $2 >>> 24; + $2 = HEAPU8[$1 + 28 | 0] | HEAPU8[$1 + 29 | 0] << 8 | (HEAPU8[$1 + 30 | 0] << 16 | HEAPU8[$1 + 31 | 0] << 24); + $10 = HEAPU8[$1 + 24 | 0] | HEAPU8[$1 + 25 | 0] << 8 | (HEAPU8[$1 + 26 | 0] << 16 | HEAPU8[$1 + 27 | 0] << 24); + HEAP8[$9 + 37 | 0] = $10; + HEAP8[$9 + 38 | 0] = $10 >>> 8; + HEAP8[$9 + 39 | 0] = $10 >>> 16; + HEAP8[$9 + 40 | 0] = $10 >>> 24; + HEAP8[$9 + 41 | 0] = $2; + HEAP8[$9 + 42 | 0] = $2 >>> 8; + HEAP8[$9 + 43 | 0] = $2 >>> 16; + HEAP8[$9 + 44 | 0] = $2 >>> 24; + $2 = HEAPU8[$1 + 20 | 0] | HEAPU8[$1 + 21 | 0] << 8 | (HEAPU8[$1 + 22 | 0] << 16 | HEAPU8[$1 + 23 | 0] << 24); + $10 = HEAPU8[$1 + 16 | 0] | HEAPU8[$1 + 17 | 0] << 8 | (HEAPU8[$1 + 18 | 0] << 16 | HEAPU8[$1 + 19 | 0] << 24); + HEAP8[$9 + 29 | 0] = $10; + HEAP8[$9 + 30 | 0] = $10 >>> 8; + HEAP8[$9 + 31 | 0] = $10 >>> 16; + HEAP8[$9 + 32 | 0] = $10 >>> 24; + HEAP8[$9 + 33 | 0] = $2; + HEAP8[$9 + 34 | 0] = $2 >>> 8; + HEAP8[$9 + 35 | 0] = $2 >>> 16; + HEAP8[$9 + 36 | 0] = $2 >>> 24; + $2 = HEAPU8[$1 + 12 | 0] | HEAPU8[$1 + 13 | 0] << 8 | (HEAPU8[$1 + 14 | 0] << 16 | HEAPU8[$1 + 15 | 0] << 24); + $10 = HEAPU8[$1 + 8 | 0] | HEAPU8[$1 + 9 | 0] << 8 | (HEAPU8[$1 + 10 | 0] << 16 | HEAPU8[$1 + 11 | 0] << 24); + HEAP8[$9 + 21 | 0] = $10; + HEAP8[$9 + 22 | 0] = $10 >>> 8; + HEAP8[$9 + 23 | 0] = $10 >>> 16; + HEAP8[$9 + 24 | 0] = $10 >>> 24; + HEAP8[$9 + 25 | 0] = $2; + HEAP8[$9 + 26 | 0] = $2 >>> 8; + HEAP8[$9 + 27 | 0] = $2 >>> 16; + HEAP8[$9 + 28 | 0] = $2 >>> 24; + $2 = HEAPU8[$1 + 4 | 0] | HEAPU8[$1 + 5 | 0] << 8 | (HEAPU8[$1 + 6 | 0] << 16 | HEAPU8[$1 + 7 | 0] << 24); + $1 = HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24); + HEAP8[$9 + 13 | 0] = $1; + HEAP8[$9 + 14 | 0] = $1 >>> 8; + HEAP8[$9 + 15 | 0] = $1 >>> 16; + HEAP8[$9 + 16 | 0] = $1 >>> 24; + HEAP8[$9 + 17 | 0] = $2; + HEAP8[$9 + 18 | 0] = $2 >>> 8; + HEAP8[$9 + 19 | 0] = $2 >>> 16; + HEAP8[$9 + 20 | 0] = $2 >>> 24; + HEAP32[$9 + 68 >> 2] = 51; + HEAP32[$9 + 72 >> 2] = 1; + HEAP32[$9 + 64 >> 2] = $9; + HEAP32[$0 + 388 >> 2] = 0; + break label$5; + } + HEAP32[$9 + 68 >> 2] = $2; + HEAP32[$9 + 64 >> 2] = $1; + } + if ($5) { + HEAP32[$9 + 76 >> 2] = 1 + } + $1 = $0 + 8 | 0; + if (ogg_stream_packetin($1, $9 - -64 | 0)) { + break label$4 + } + $2 = $0 + 368 | 0; + if (!$3) { + while (1) { + if (!ogg_stream_flush_i($1, $2, 1)) { + break label$2 + } + if (FUNCTION_TABLE[$6]($7, HEAP32[$0 + 368 >> 2], HEAP32[$0 + 372 >> 2], 0, $4, $8)) { + break label$4 + } + if (!FUNCTION_TABLE[$6]($7, HEAP32[$0 + 376 >> 2], HEAP32[$0 + 380 >> 2], 0, $4, $8)) { + continue + } + break label$4; + } + } + while (1) { + if (!ogg_stream_pageout($1, $2)) { + break label$2 + } + if (FUNCTION_TABLE[$6]($7, HEAP32[$0 + 368 >> 2], HEAP32[$0 + 372 >> 2], 0, $4, $8)) { + break label$4 + } + if (!FUNCTION_TABLE[$6]($7, HEAP32[$0 + 376 >> 2], HEAP32[$0 + 380 >> 2], 0, $4, $8)) { + continue + } + break; + }; + } + $6 = 1; + break label$1; + } + $6 = 1; + if ($3 | $4 | ($2 | 0) != 4 | (HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24)) != (HEAPU8[5409] | HEAPU8[5410] << 8 | (HEAPU8[5411] << 16 | HEAPU8[5412] << 24))) { + break label$1 + } + HEAP32[$0 + 384 >> 2] = 1; + $11 = $3; + } + $1 = $0; + $3 = $1; + $2 = HEAP32[$1 + 396 >> 2]; + $0 = $11 + HEAP32[$1 + 392 >> 2] | 0; + if ($0 >>> 0 < $11 >>> 0) { + $2 = $2 + 1 | 0 + } + HEAP32[$3 + 392 >> 2] = $0; + HEAP32[$1 + 396 >> 2] = $2; + $6 = 0; + } + global$0 = $9 + 96 | 0; + return $6; + } + + function simple_ogg_page__init($0) { + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + } + + function simple_ogg_page__clear($0) { + var $1 = 0; + $1 = HEAP32[$0 >> 2]; + if ($1) { + dlfree($1) + } + $1 = HEAP32[$0 + 8 >> 2]; + if ($1) { + dlfree($1) + } + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 0; + HEAP32[$0 + 12 >> 2] = 0; + } + + function simple_ogg_page__get_at($0, $1, $2, $3, $4, $5, $6) { + var $7 = 0, $8 = 0, $9 = 0; + $7 = global$0 - 16 | 0; + global$0 = $7; + label$1 : { + if (!$4) { + break label$1 + } + label$2 : { + switch (FUNCTION_TABLE[$4]($0, $1, $2, $6) | 0) { + case 1: + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + break label$1; + case 0: + break label$2; + default: + break label$1; + }; + } + $4 = dlmalloc(282); + HEAP32[$3 >> 2] = $4; + if (!$4) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + break label$1; + } + $8 = 27; + while (1) { + HEAP32[$7 + 12 >> 2] = $8; + $1 = 5; + label$6 : { + label$7 : { + switch (FUNCTION_TABLE[$5]($0, $4, $7 + 12 | 0, $6) | 0) { + case 1: + $1 = HEAP32[$7 + 12 >> 2]; + if ($1) { + break label$6 + } + $1 = 2; + default: + HEAP32[HEAP32[$0 >> 2] >> 2] = $1; + break label$1; + case 3: + break label$1; + case 0: + break label$7; + }; + } + $1 = HEAP32[$7 + 12 >> 2]; + } + $4 = $1 + $4 | 0; + $8 = $8 - $1 | 0; + if ($8) { + continue + } + break; + }; + $1 = HEAP32[$3 >> 2]; + HEAP32[$3 + 4 >> 2] = HEAPU8[$1 + 26 | 0] + 27; + label$10 : { + if (!(HEAP8[$1 + 5 | 0] & 1 | (HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24)) != 1399285583 | ((HEAPU8[$1 + 6 | 0] | HEAPU8[$1 + 7 | 0] << 8 | (HEAPU8[$1 + 8 | 0] << 16 | HEAPU8[$1 + 9 | 0] << 24)) != 0 | (HEAPU8[$1 + 10 | 0] | HEAPU8[$1 + 11 | 0] << 8 | (HEAPU8[$1 + 12 | 0] << 16 | HEAPU8[$1 + 13 | 0] << 24)) != 0))) { + $8 = HEAPU8[$1 + 26 | 0]; + if ($8) { + break label$10 + } + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$1; + } + $4 = $1 + 27 | 0; + while (1) { + HEAP32[$7 + 12 >> 2] = $8; + $1 = 5; + label$13 : { + label$14 : { + switch (FUNCTION_TABLE[$5]($0, $4, $7 + 12 | 0, $6) | 0) { + case 1: + $1 = HEAP32[$7 + 12 >> 2]; + if ($1) { + break label$13 + } + $1 = 2; + default: + HEAP32[HEAP32[$0 >> 2] >> 2] = $1; + break label$1; + case 3: + break label$1; + case 0: + break label$14; + }; + } + $1 = HEAP32[$7 + 12 >> 2]; + } + $4 = $1 + $4 | 0; + $8 = $8 - $1 | 0; + if ($8) { + continue + } + break; + }; + $4 = 0; + $1 = HEAP32[$3 >> 2]; + $2 = HEAPU8[$1 + 26 | 0]; + label$17 : { + if (($2 | 0) != 1) { + $2 = $2 + -1 | 0; + while (1) { + if (HEAPU8[($1 + $4 | 0) + 27 | 0] != 255) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + break label$17; + } + $4 = $4 + 1 | 0; + if ($4 >>> 0 < $2 >>> 0) { + continue + } + break; + }; + } + $4 = HEAPU8[($1 + $4 | 0) + 27 | 0] + Math_imul($4, 255) | 0; + HEAP32[$3 + 12 >> 2] = $4; + $8 = dlmalloc($4 ? $4 : 1); + HEAP32[$3 + 8 >> 2] = $8; + if (!$8) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + break label$17; + } + $2 = $7; + if ($4) { + while (1) { + HEAP32[$7 + 12 >> 2] = $4; + $1 = 5; + label$24 : { + label$25 : { + switch (FUNCTION_TABLE[$5]($0, $8, $7 + 12 | 0, $6) | 0) { + case 1: + $1 = HEAP32[$7 + 12 >> 2]; + if ($1) { + break label$24 + } + $1 = 2; + default: + HEAP32[HEAP32[$0 >> 2] >> 2] = $1; + break label$17; + case 3: + break label$17; + case 0: + break label$25; + }; + } + $1 = HEAP32[$7 + 12 >> 2]; + } + $8 = $1 + $8 | 0; + $4 = $4 - $1 | 0; + if ($4) { + continue + } + break; + }; + $1 = HEAP32[$3 >> 2]; + } + HEAP32[$2 + 12 >> 2] = HEAPU8[$1 + 22 | 0] | HEAPU8[$1 + 23 | 0] << 8 | (HEAPU8[$1 + 24 | 0] << 16 | HEAPU8[$1 + 25 | 0] << 24); + ogg_page_checksum_set($3); + $1 = HEAP32[$3 >> 2]; + if (HEAP32[$7 + 12 >> 2] == (HEAPU8[$1 + 22 | 0] | HEAPU8[$1 + 23 | 0] << 8 | (HEAPU8[$1 + 24 | 0] << 16 | HEAPU8[$1 + 25 | 0] << 24))) { + $9 = 1; + break label$1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + } + } + global$0 = $7 + 16 | 0; + return $9; + } + + function simple_ogg_page__set_at($0, $1, $2, $3, $4, $5, $6) { + folding_inner0 : { + label$1 : { + if (!$4) { + break label$1 + } + label$2 : { + switch (FUNCTION_TABLE[$4]($0, $1, $2, $6) | 0) { + case 1: + break folding_inner0; + case 0: + break label$2; + default: + break label$1; + }; + } + ogg_page_checksum_set($3); + if (FUNCTION_TABLE[$5]($0, HEAP32[$3 >> 2], HEAP32[$3 + 4 >> 2], 0, 0, $6)) { + break folding_inner0 + } + if (!FUNCTION_TABLE[$5]($0, HEAP32[$3 + 8 >> 2], HEAP32[$3 + 12 >> 2], 0, 0, $6)) { + return 1 + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + } + return 0; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + return 0; + } + + function __emscripten_stdout_close($0) { + $0 = $0 | 0; + return 0; + } + + function __emscripten_stdout_seek($0, $1, $2, $3) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + i64toi32_i32$HIGH_BITS = 0; + return 0; + } + + function strcmp($0, $1) { + var $2 = 0, $3 = 0; + $2 = HEAPU8[$0 | 0]; + $3 = HEAPU8[$1 | 0]; + label$1 : { + if (!$2 | ($2 | 0) != ($3 | 0)) { + break label$1 + } + while (1) { + $3 = HEAPU8[$1 + 1 | 0]; + $2 = HEAPU8[$0 + 1 | 0]; + if (!$2) { + break label$1 + } + $1 = $1 + 1 | 0; + $0 = $0 + 1 | 0; + if (($2 | 0) == ($3 | 0)) { + continue + } + break; + }; + } + return $2 - $3 | 0; + } + + function __cos($0, $1) { + var $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0; + $2 = $0 * $0; + $3 = $2 * .5; + $4 = 1.0 - $3; + $5 = 1.0 - $4 - $3; + $3 = $2 * $2; + return $4 + ($5 + ($2 * ($2 * ($2 * ($2 * 2.480158728947673e-05 + -.001388888888887411) + .0416666666666666) + $3 * $3 * ($2 * ($2 * -1.1359647557788195e-11 + 2.087572321298175e-09) + -2.7557314351390663e-07)) - $0 * $1)); + } + + function scalbn($0, $1) { + label$1 : { + if (($1 | 0) >= 1024) { + $0 = $0 * 8988465674311579538646525.0e283; + if (($1 | 0) < 2047) { + $1 = $1 + -1023 | 0; + break label$1; + } + $0 = $0 * 8988465674311579538646525.0e283; + $1 = (($1 | 0) < 3069 ? $1 : 3069) + -2046 | 0; + break label$1; + } + if (($1 | 0) > -1023) { + break label$1 + } + $0 = $0 * 2.2250738585072014e-308; + if (($1 | 0) > -2045) { + $1 = $1 + 1022 | 0; + break label$1; + } + $0 = $0 * 2.2250738585072014e-308; + $1 = (($1 | 0) > -3066 ? $1 : -3066) + 2044 | 0; + } + wasm2js_scratch_store_i32(0, 0); + wasm2js_scratch_store_i32(1, $1 + 1023 << 20); + return $0 * +wasm2js_scratch_load_f64(); + } + + function __rem_pio2_large($0, $1, $2, $3) { + var $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0; + $7 = global$0 - 560 | 0; + global$0 = $7; + $5 = ($2 + -3 | 0) / 24 | 0; + $16 = ($5 | 0) > 0 ? $5 : 0; + $10 = $2 + Math_imul($16, -24) | 0; + $12 = HEAP32[1901]; + $9 = $3 + -1 | 0; + if (($12 + $9 | 0) >= 0) { + $5 = $3 + $12 | 0; + $2 = $16 - $9 | 0; + while (1) { + HEAPF64[($7 + 320 | 0) + ($6 << 3) >> 3] = ($2 | 0) < 0 ? 0.0 : +HEAP32[($2 << 2) + 7616 >> 2]; + $2 = $2 + 1 | 0; + $6 = $6 + 1 | 0; + if (($5 | 0) != ($6 | 0)) { + continue + } + break; + }; + } + $13 = $10 + -24 | 0; + $5 = 0; + $6 = ($12 | 0) > 0 ? $12 : 0; + $11 = ($3 | 0) < 1; + while (1) { + label$6 : { + if ($11) { + $4 = 0.0; + break label$6; + } + $8 = $5 + $9 | 0; + $2 = 0; + $4 = 0.0; + while (1) { + $4 = $4 + HEAPF64[($2 << 3) + $0 >> 3] * HEAPF64[($7 + 320 | 0) + ($8 - $2 << 3) >> 3]; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + }; + } + HEAPF64[($5 << 3) + $7 >> 3] = $4; + $2 = ($5 | 0) == ($6 | 0); + $5 = $5 + 1 | 0; + if (!$2) { + continue + } + break; + }; + $20 = 47 - $10 | 0; + $17 = 48 - $10 | 0; + $21 = $10 + -25 | 0; + $5 = $12; + label$9 : { + while (1) { + $4 = HEAPF64[($5 << 3) + $7 >> 3]; + $2 = 0; + $6 = $5; + $9 = ($5 | 0) < 1; + if (!$9) { + while (1) { + $11 = ($7 + 480 | 0) + ($2 << 2) | 0; + $14 = $4; + $4 = $4 * 5.9604644775390625e-08; + label$14 : { + if (Math_abs($4) < 2147483648.0) { + $8 = ~~$4; + break label$14; + } + $8 = -2147483648; + } + $4 = +($8 | 0); + $14 = $14 + $4 * -16777216.0; + label$13 : { + if (Math_abs($14) < 2147483648.0) { + $8 = ~~$14; + break label$13; + } + $8 = -2147483648; + } + HEAP32[$11 >> 2] = $8; + $6 = $6 + -1 | 0; + $4 = HEAPF64[($6 << 3) + $7 >> 3] + $4; + $2 = $2 + 1 | 0; + if (($5 | 0) != ($2 | 0)) { + continue + } + break; + } + } + $4 = scalbn($4, $13); + $4 = $4 + Math_floor($4 * .125) * -8.0; + label$17 : { + if (Math_abs($4) < 2147483648.0) { + $11 = ~~$4; + break label$17; + } + $11 = -2147483648; + } + $4 = $4 - +($11 | 0); + label$19 : { + label$20 : { + label$21 : { + $18 = ($13 | 0) < 1; + label$22 : { + if (!$18) { + $6 = (($5 << 2) + $7 | 0) + 476 | 0; + $8 = HEAP32[$6 >> 2]; + $2 = $8 >> $17; + $15 = $6; + $6 = $8 - ($2 << $17) | 0; + HEAP32[$15 >> 2] = $6; + $11 = $2 + $11 | 0; + $8 = $6 >> $20; + break label$22; + } + if ($13) { + break label$21 + } + $8 = HEAP32[(($5 << 2) + $7 | 0) + 476 >> 2] >> 23; + } + if (($8 | 0) < 1) { + break label$19 + } + break label$20; + } + $8 = 2; + if (!!($4 >= .5)) { + break label$20 + } + $8 = 0; + break label$19; + } + $2 = 0; + $6 = 0; + if (!$9) { + while (1) { + $15 = ($7 + 480 | 0) + ($2 << 2) | 0; + $19 = HEAP32[$15 >> 2]; + $9 = 16777215; + label$26 : { + label$27 : { + if ($6) { + break label$27 + } + $9 = 16777216; + if ($19) { + break label$27 + } + $6 = 0; + break label$26; + } + HEAP32[$15 >> 2] = $9 - $19; + $6 = 1; + } + $2 = $2 + 1 | 0; + if (($5 | 0) != ($2 | 0)) { + continue + } + break; + } + } + label$28 : { + if ($18) { + break label$28 + } + label$29 : { + switch ($21 | 0) { + case 0: + $2 = (($5 << 2) + $7 | 0) + 476 | 0; + HEAP32[$2 >> 2] = HEAP32[$2 >> 2] & 8388607; + break label$28; + case 1: + break label$29; + default: + break label$28; + }; + } + $2 = (($5 << 2) + $7 | 0) + 476 | 0; + HEAP32[$2 >> 2] = HEAP32[$2 >> 2] & 4194303; + } + $11 = $11 + 1 | 0; + if (($8 | 0) != 2) { + break label$19 + } + $4 = 1.0 - $4; + $8 = 2; + if (!$6) { + break label$19 + } + $4 = $4 - scalbn(1.0, $13); + } + if ($4 == 0.0) { + $6 = 0; + label$32 : { + $2 = $5; + if (($2 | 0) <= ($12 | 0)) { + break label$32 + } + while (1) { + $2 = $2 + -1 | 0; + $6 = HEAP32[($7 + 480 | 0) + ($2 << 2) >> 2] | $6; + if (($2 | 0) > ($12 | 0)) { + continue + } + break; + }; + if (!$6) { + break label$32 + } + $10 = $13; + while (1) { + $10 = $10 + -24 | 0; + $5 = $5 + -1 | 0; + if (!HEAP32[($7 + 480 | 0) + ($5 << 2) >> 2]) { + continue + } + break; + }; + break label$9; + } + $2 = 1; + while (1) { + $6 = $2; + $2 = $2 + 1 | 0; + if (!HEAP32[($7 + 480 | 0) + ($12 - $6 << 2) >> 2]) { + continue + } + break; + }; + $6 = $5 + $6 | 0; + while (1) { + $9 = $3 + $5 | 0; + $5 = $5 + 1 | 0; + HEAPF64[($7 + 320 | 0) + ($9 << 3) >> 3] = HEAP32[($16 + $5 << 2) + 7616 >> 2]; + $2 = 0; + $4 = 0.0; + if (($3 | 0) >= 1) { + while (1) { + $4 = $4 + HEAPF64[($2 << 3) + $0 >> 3] * HEAPF64[($7 + 320 | 0) + ($9 - $2 << 3) >> 3]; + $2 = $2 + 1 | 0; + if (($3 | 0) != ($2 | 0)) { + continue + } + break; + } + } + HEAPF64[($5 << 3) + $7 >> 3] = $4; + if (($5 | 0) < ($6 | 0)) { + continue + } + break; + }; + $5 = $6; + continue; + } + break; + }; + $4 = scalbn($4, 0 - $13 | 0); + label$39 : { + if (!!($4 >= 16777216.0)) { + $3 = ($7 + 480 | 0) + ($5 << 2) | 0; + $14 = $4; + $4 = $4 * 5.9604644775390625e-08; + label$42 : { + if (Math_abs($4) < 2147483648.0) { + $2 = ~~$4; + break label$42; + } + $2 = -2147483648; + } + $4 = $14 + +($2 | 0) * -16777216.0; + label$41 : { + if (Math_abs($4) < 2147483648.0) { + $0 = ~~$4; + break label$41; + } + $0 = -2147483648; + } + HEAP32[$3 >> 2] = $0; + $5 = $5 + 1 | 0; + break label$39; + } + $2 = Math_abs($4) < 2147483648.0 ? ~~$4 : -2147483648; + $10 = $13; + } + HEAP32[($7 + 480 | 0) + ($5 << 2) >> 2] = $2; + } + $4 = scalbn(1.0, $10); + label$47 : { + if (($5 | 0) <= -1) { + break label$47 + } + $2 = $5; + while (1) { + HEAPF64[($2 << 3) + $7 >> 3] = $4 * +HEAP32[($7 + 480 | 0) + ($2 << 2) >> 2]; + $4 = $4 * 5.9604644775390625e-08; + $0 = ($2 | 0) > 0; + $2 = $2 + -1 | 0; + if ($0) { + continue + } + break; + }; + $9 = 0; + if (($5 | 0) < 0) { + break label$47 + } + $0 = ($12 | 0) > 0 ? $12 : 0; + $6 = $5; + while (1) { + $3 = $0 >>> 0 < $9 >>> 0 ? $0 : $9; + $10 = $5 - $6 | 0; + $2 = 0; + $4 = 0.0; + while (1) { + $4 = $4 + HEAPF64[($2 << 3) + 10384 >> 3] * HEAPF64[($2 + $6 << 3) + $7 >> 3]; + $13 = ($2 | 0) != ($3 | 0); + $2 = $2 + 1 | 0; + if ($13) { + continue + } + break; + }; + HEAPF64[($7 + 160 | 0) + ($10 << 3) >> 3] = $4; + $6 = $6 + -1 | 0; + $2 = ($5 | 0) != ($9 | 0); + $9 = $9 + 1 | 0; + if ($2) { + continue + } + break; + }; + } + $4 = 0.0; + if (($5 | 0) >= 0) { + $2 = $5; + while (1) { + $4 = $4 + HEAPF64[($7 + 160 | 0) + ($2 << 3) >> 3]; + $0 = ($2 | 0) > 0; + $2 = $2 + -1 | 0; + if ($0) { + continue + } + break; + }; + } + HEAPF64[$1 >> 3] = $8 ? -$4 : $4; + $4 = HEAPF64[$7 + 160 >> 3] - $4; + $2 = 1; + if (($5 | 0) >= 1) { + while (1) { + $4 = $4 + HEAPF64[($7 + 160 | 0) + ($2 << 3) >> 3]; + $0 = ($2 | 0) != ($5 | 0); + $2 = $2 + 1 | 0; + if ($0) { + continue + } + break; + } + } + HEAPF64[$1 + 8 >> 3] = $8 ? -$4 : $4; + global$0 = $7 + 560 | 0; + return $11 & 7; + } + + function __rem_pio2($0, $1) { + var $2 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, $10 = 0; + $6 = global$0 - 48 | 0; + global$0 = $6; + wasm2js_scratch_store_f64(+$0); + $5 = wasm2js_scratch_load_i32(1) | 0; + $3 = wasm2js_scratch_load_i32(0) | 0; + label$1 : { + label$2 : { + $4 = $5; + $5 = $4; + $7 = $4 & 2147483647; + label$3 : { + if ($7 >>> 0 <= 1074752122) { + if (($5 & 1048575) == 598523) { + break label$3 + } + if ($7 >>> 0 <= 1073928572) { + if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) { + $0 = $0 + -1.5707963267341256; + $2 = $0 + -6.077100506506192e-11; + HEAPF64[$1 >> 3] = $2; + HEAPF64[$1 + 8 >> 3] = $0 - $2 + -6.077100506506192e-11; + $3 = 1; + break label$1; + } + $0 = $0 + 1.5707963267341256; + $2 = $0 + 6.077100506506192e-11; + HEAPF64[$1 >> 3] = $2; + HEAPF64[$1 + 8 >> 3] = $0 - $2 + 6.077100506506192e-11; + $3 = -1; + break label$1; + } + if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) { + $0 = $0 + -3.1415926534682512; + $2 = $0 + -1.2154201013012384e-10; + HEAPF64[$1 >> 3] = $2; + HEAPF64[$1 + 8 >> 3] = $0 - $2 + -1.2154201013012384e-10; + $3 = 2; + break label$1; + } + $0 = $0 + 3.1415926534682512; + $2 = $0 + 1.2154201013012384e-10; + HEAPF64[$1 >> 3] = $2; + HEAPF64[$1 + 8 >> 3] = $0 - $2 + 1.2154201013012384e-10; + $3 = -2; + break label$1; + } + if ($7 >>> 0 <= 1075594811) { + if ($7 >>> 0 <= 1075183036) { + if (($7 | 0) == 1074977148) { + break label$3 + } + if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) { + $0 = $0 + -4.712388980202377; + $2 = $0 + -1.8231301519518578e-10; + HEAPF64[$1 >> 3] = $2; + HEAPF64[$1 + 8 >> 3] = $0 - $2 + -1.8231301519518578e-10; + $3 = 3; + break label$1; + } + $0 = $0 + 4.712388980202377; + $2 = $0 + 1.8231301519518578e-10; + HEAPF64[$1 >> 3] = $2; + HEAPF64[$1 + 8 >> 3] = $0 - $2 + 1.8231301519518578e-10; + $3 = -3; + break label$1; + } + if (($7 | 0) == 1075388923) { + break label$3 + } + if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) { + $0 = $0 + -6.2831853069365025; + $2 = $0 + -2.430840202602477e-10; + HEAPF64[$1 >> 3] = $2; + HEAPF64[$1 + 8 >> 3] = $0 - $2 + -2.430840202602477e-10; + $3 = 4; + break label$1; + } + $0 = $0 + 6.2831853069365025; + $2 = $0 + 2.430840202602477e-10; + HEAPF64[$1 >> 3] = $2; + HEAPF64[$1 + 8 >> 3] = $0 - $2 + 2.430840202602477e-10; + $3 = -4; + break label$1; + } + if ($7 >>> 0 > 1094263290) { + break label$2 + } + } + $9 = $0 * .6366197723675814 + 6755399441055744.0 + -6755399441055744.0; + $2 = $0 + $9 * -1.5707963267341256; + $8 = $9 * 6.077100506506192e-11; + $0 = $2 - $8; + HEAPF64[$1 >> 3] = $0; + wasm2js_scratch_store_f64(+$0); + $3 = wasm2js_scratch_load_i32(1) | 0; + wasm2js_scratch_load_i32(0) | 0; + $4 = $7 >>> 20 | 0; + $5 = ($4 - ($3 >>> 20 & 2047) | 0) < 17; + if (Math_abs($9) < 2147483648.0) { + $3 = ~~$9 + } else { + $3 = -2147483648 + } + label$14 : { + if ($5) { + break label$14 + } + $8 = $2; + $0 = $9 * 6.077100506303966e-11; + $2 = $2 - $0; + $8 = $9 * 2.0222662487959506e-21 - ($8 - $2 - $0); + $0 = $2 - $8; + HEAPF64[$1 >> 3] = $0; + $5 = $4; + wasm2js_scratch_store_f64(+$0); + $4 = wasm2js_scratch_load_i32(1) | 0; + wasm2js_scratch_load_i32(0) | 0; + if (($5 - ($4 >>> 20 & 2047) | 0) < 50) { + break label$14 + } + $8 = $2; + $0 = $9 * 2.0222662487111665e-21; + $2 = $2 - $0; + $8 = $9 * 8.4784276603689e-32 - ($8 - $2 - $0); + $0 = $2 - $8; + HEAPF64[$1 >> 3] = $0; + } + HEAPF64[$1 + 8 >> 3] = $2 - $0 - $8; + break label$1; + } + if ($7 >>> 0 >= 2146435072) { + $0 = $0 - $0; + HEAPF64[$1 >> 3] = $0; + HEAPF64[$1 + 8 >> 3] = $0; + $3 = 0; + break label$1; + } + wasm2js_scratch_store_i32(0, $3 | 0); + wasm2js_scratch_store_i32(1, $4 & 1048575 | 1096810496); + $0 = +wasm2js_scratch_load_f64(); + $3 = 0; + $5 = 1; + while (1) { + $10 = ($6 + 16 | 0) + ($3 << 3) | 0; + if (Math_abs($0) < 2147483648.0) { + $3 = ~~$0 + } else { + $3 = -2147483648 + } + $2 = +($3 | 0); + HEAPF64[$10 >> 3] = $2; + $0 = ($0 - $2) * 16777216.0; + $3 = 1; + $10 = $5 & 1; + $5 = 0; + if ($10) { + continue + } + break; + }; + HEAPF64[$6 + 32 >> 3] = $0; + label$20 : { + if ($0 != 0.0) { + $3 = 2; + break label$20; + } + $5 = 1; + while (1) { + $3 = $5; + $5 = $3 + -1 | 0; + if (HEAPF64[($6 + 16 | 0) + ($3 << 3) >> 3] == 0.0) { + continue + } + break; + }; + } + $3 = __rem_pio2_large($6 + 16 | 0, $6, ($7 >>> 20 | 0) + -1046 | 0, $3 + 1 | 0); + $0 = HEAPF64[$6 >> 3]; + if (($4 | 0) < -1 ? 1 : ($4 | 0) <= -1 ? 1 : 0) { + HEAPF64[$1 >> 3] = -$0; + HEAPF64[$1 + 8 >> 3] = -HEAPF64[$6 + 8 >> 3]; + $3 = 0 - $3 | 0; + break label$1; + } + HEAPF64[$1 >> 3] = $0; + $4 = HEAP32[$6 + 12 >> 2]; + HEAP32[$1 + 8 >> 2] = HEAP32[$6 + 8 >> 2]; + HEAP32[$1 + 12 >> 2] = $4; + } + global$0 = $6 + 48 | 0; + return $3; + } + + function __sin($0, $1) { + var $2 = 0.0, $3 = 0.0; + $2 = $0 * $0; + $3 = $0; + $0 = $2 * $0; + return $3 - ($2 * ($1 * .5 - $0 * ($2 * ($2 * $2) * ($2 * 1.58969099521155e-10 + -2.5050760253406863e-08) + ($2 * ($2 * 2.7557313707070068e-06 + -1.984126982985795e-04) + .00833333333332249))) - $1 + $0 * .16666666666666632); + } + + function cos($0) { + var $1 = 0, $2 = 0.0, $3 = 0; + $1 = global$0 - 16 | 0; + global$0 = $1; + wasm2js_scratch_store_f64(+$0); + $3 = wasm2js_scratch_load_i32(1) | 0; + wasm2js_scratch_load_i32(0) | 0; + $3 = $3 & 2147483647; + label$1 : { + if ($3 >>> 0 <= 1072243195) { + $2 = 1.0; + if ($3 >>> 0 < 1044816030) { + break label$1 + } + $2 = __cos($0, 0.0); + break label$1; + } + $2 = $0 - $0; + if ($3 >>> 0 >= 2146435072) { + break label$1 + } + label$3 : { + switch (__rem_pio2($0, $1) & 3) { + case 0: + $2 = __cos(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]); + break label$1; + case 1: + $2 = -__sin(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]); + break label$1; + case 2: + $2 = -__cos(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]); + break label$1; + default: + break label$3; + }; + } + $2 = __sin(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]); + } + $0 = $2; + global$0 = $1 + 16 | 0; + return $0; + } + + function exp($0) { + var $1 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0; + wasm2js_scratch_store_f64(+$0); + $3 = wasm2js_scratch_load_i32(1) | 0; + $7 = wasm2js_scratch_load_i32(0) | 0; + $5 = $3 >>> 31 | 0; + label$1 : { + label$2 : { + label$3 : { + label$4 : { + $6 = $0; + label$5 : { + label$6 : { + $1 = $3; + $3 = $1 & 2147483647; + label$7 : { + if ($3 >>> 0 >= 1082532651) { + $1 = $1 & 2147483647; + if (($1 | 0) == 2146435072 & $7 >>> 0 > 0 | $1 >>> 0 > 2146435072) { + return $0 + } + if (!!($0 > 709.782712893384)) { + return $0 * 8988465674311579538646525.0e283 + } + if (!($0 < -708.3964185322641)) { + break label$7 + } + if (!($0 < -745.1332191019411)) { + break label$7 + } + break label$2; + } + if ($3 >>> 0 < 1071001155) { + break label$4 + } + if ($3 >>> 0 < 1072734898) { + break label$6 + } + } + $0 = $0 * 1.4426950408889634 + HEAPF64[($5 << 3) + 10448 >> 3]; + if (Math_abs($0) < 2147483648.0) { + $1 = ~~$0; + break label$5; + } + $1 = -2147483648; + break label$5; + } + $1 = ($5 ^ 1) - $5 | 0; + } + $2 = +($1 | 0); + $0 = $6 + $2 * -.6931471803691238; + $4 = $2 * 1.9082149292705877e-10; + $2 = $0 - $4; + break label$3; + } + if ($3 >>> 0 <= 1043333120) { + break label$1 + } + $1 = 0; + $2 = $0; + } + $6 = $0; + $0 = $2 * $2; + $0 = $2 - $0 * ($0 * ($0 * ($0 * ($0 * 4.1381367970572385e-08 + -1.6533902205465252e-06) + 6.613756321437934e-05) + -2.7777777777015593e-03) + .16666666666666602); + $4 = $6 + ($2 * $0 / (2.0 - $0) - $4) + 1.0; + if (!$1) { + break label$2 + } + $4 = scalbn($4, $1); + } + return $4; + } + return $0 + 1.0; + } + + function FLAC__window_bartlett($0, $1) { + var $2 = 0, $3 = Math_fround(0), $4 = 0, $5 = Math_fround(0), $6 = 0, $7 = 0, $8 = 0; + $7 = $1 + -1 | 0; + label$1 : { + if ($1 & 1) { + $4 = ($7 | 0) / 2 | 0; + if (($1 | 0) >= 0) { + $8 = ($4 | 0) > 0 ? $4 : 0; + $6 = $8 + 1 | 0; + $5 = Math_fround($7 | 0); + while (1) { + $3 = Math_fround($2 | 0); + HEAPF32[($2 << 2) + $0 >> 2] = Math_fround($3 + $3) / $5; + $4 = ($2 | 0) == ($8 | 0); + $2 = $2 + 1 | 0; + if (!$4) { + continue + } + break; + }; + } + if (($6 | 0) >= ($1 | 0)) { + break label$1 + } + $5 = Math_fround($7 | 0); + while (1) { + $3 = Math_fround($6 | 0); + HEAPF32[($6 << 2) + $0 >> 2] = Math_fround(2.0) - Math_fround(Math_fround($3 + $3) / $5); + $6 = $6 + 1 | 0; + if (($6 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + $4 = ($1 | 0) / 2 | 0; + if (($1 | 0) >= 2) { + $5 = Math_fround($7 | 0); + while (1) { + $3 = Math_fround($2 | 0); + HEAPF32[($2 << 2) + $0 >> 2] = Math_fround($3 + $3) / $5; + $2 = $2 + 1 | 0; + if (($4 | 0) != ($2 | 0)) { + continue + } + break; + }; + $2 = $4; + } + if (($2 | 0) >= ($1 | 0)) { + break label$1 + } + $5 = Math_fround($7 | 0); + while (1) { + $3 = Math_fround($2 | 0); + HEAPF32[($2 << 2) + $0 >> 2] = Math_fround(2.0) - Math_fround(Math_fround($3 + $3) / $5); + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_bartlett_hann($0, $1) { + var $2 = 0, $3 = Math_fround(0), $4 = Math_fround(0), wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + if (($1 | 0) >= 1) { + $4 = Math_fround($1 + -1 | 0); + while (1) { + $3 = Math_fround(Math_fround($2 | 0) / $4); + (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(+Math_fround(Math_abs(Math_fround($3 + Math_fround(-.5)))) * -.47999998927116394 + .6200000047683716 + cos(+$3 * 6.283185307179586) * -.3799999952316284)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_blackman($0, $1) { + var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + if (($1 | 0) >= 1) { + $3 = +($1 + -1 | 0); + while (1) { + $4 = +($2 | 0); + (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .07999999821186066 + (cos($4 * 6.283185307179586 / $3) * -.5 + .41999998688697815))), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_blackman_harris_4term_92db_sidelobe($0, $1) { + var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + if (($1 | 0) >= 1) { + $3 = +($1 + -1 | 0); + while (1) { + $4 = +($2 | 0); + (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .14127999544143677 + (cos($4 * 6.283185307179586 / $3) * -.488290011882782 + .35874998569488525) + cos($4 * 18.84955592153876 / $3) * -.011680000461637974)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_connes($0, $1) { + var $2 = 0.0, $3 = 0, $4 = 0.0; + if (($1 | 0) >= 1) { + $4 = +($1 + -1 | 0) * .5; + while (1) { + $2 = (+($3 | 0) - $4) / $4; + $2 = 1.0 - $2 * $2; + HEAPF32[($3 << 2) + $0 >> 2] = $2 * $2; + $3 = $3 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_flattop($0, $1) { + var $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + if (($1 | 0) >= 1) { + $2 = +($1 + -1 | 0); + while (1) { + $4 = +($3 | 0); + $5 = cos($4 * 12.566370614359172 / $2); + $6 = cos($4 * 6.283185307179586 / $2); + $7 = cos($4 * 18.84955592153876 / $2); + (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 25.132741228718345 / $2) * 6.9473679177463055e-03 + ($5 * .27726316452026367 + ($6 * -.4166315793991089 + .21557894349098206) + $7 * -.08357894420623779))), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $3 = $3 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_gauss($0, $1, $2) { + var $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + if (($1 | 0) >= 1) { + $4 = +($1 + -1 | 0) * .5; + $6 = $4 * +$2; + while (1) { + $5 = (+($3 | 0) - $4) / $6; + (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(exp($5 * ($5 * -.5)))), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $3 = $3 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_hamming($0, $1) { + var $2 = 0, $3 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + if (($1 | 0) >= 1) { + $3 = +($1 + -1 | 0); + while (1) { + (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos(+($2 | 0) * 6.283185307179586 / $3) * -.46000000834465027 + .5400000214576721)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_hann($0, $1) { + var $2 = 0, $3 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + if (($1 | 0) >= 1) { + $3 = +($1 + -1 | 0); + while (1) { + (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($2 | 0) * 6.283185307179586 / $3) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_kaiser_bessel($0, $1) { + var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + if (($1 | 0) >= 1) { + $3 = +($1 + -1 | 0); + while (1) { + $4 = +($2 | 0); + (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .09799999743700027 + (cos($4 * 6.283185307179586 / $3) * -.49799999594688416 + .4020000100135803) + cos($4 * 18.84955592153876 / $3) * -1.0000000474974513e-03)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_nuttall($0, $1) { + var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + if (($1 | 0) >= 1) { + $3 = +($1 + -1 | 0); + while (1) { + $4 = +($2 | 0); + (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .13659949600696564 + (cos($4 * 6.283185307179586 / $3) * -.48917749524116516 + .36358189582824707) + cos($4 * 18.84955592153876 / $3) * -.010641099885106087)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_rectangle($0, $1) { + var $2 = 0; + if (($1 | 0) >= 1) { + while (1) { + HEAP32[($2 << 2) + $0 >> 2] = 1065353216; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + } + } + } + + function FLAC__window_triangle($0, $1) { + var $2 = 0, $3 = 0, $4 = Math_fround(0), $5 = 0, $6 = Math_fround(0), $7 = 0; + $3 = 1; + label$1 : { + if ($1 & 1) { + $2 = ($1 + 1 | 0) / 2 | 0; + if (($1 | 0) >= 1) { + $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0)); + $5 = ($2 | 0) > 1 ? $2 : 1; + $3 = $5 + 1 | 0; + $2 = 1; + while (1) { + $6 = Math_fround($2 | 0); + HEAPF32[(($2 << 2) + $0 | 0) + -4 >> 2] = Math_fround($6 + $6) / $4; + $7 = ($2 | 0) == ($5 | 0); + $2 = $2 + 1 | 0; + if (!$7) { + continue + } + break; + }; + } + if (($3 | 0) > ($1 | 0)) { + break label$1 + } + $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0)); + while (1) { + HEAPF32[(($3 << 2) + $0 | 0) + -4 >> 2] = Math_fround(($1 - $3 << 1) + 2 | 0) / $4; + $2 = ($1 | 0) == ($3 | 0); + $3 = $3 + 1 | 0; + if (!$2) { + continue + } + break; + }; + break label$1; + } + $2 = 1; + if (($1 | 0) >= 2) { + $5 = $1 >>> 1 | 0; + $2 = $5 + 1 | 0; + $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0)); + while (1) { + $6 = Math_fround($3 | 0); + HEAPF32[(($3 << 2) + $0 | 0) + -4 >> 2] = Math_fround($6 + $6) / $4; + $7 = ($3 | 0) == ($5 | 0); + $3 = $3 + 1 | 0; + if (!$7) { + continue + } + break; + }; + } + if (($2 | 0) > ($1 | 0)) { + break label$1 + } + $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0)); + while (1) { + HEAPF32[(($2 << 2) + $0 | 0) + -4 >> 2] = Math_fround(($1 - $2 << 1) + 2 | 0) / $4; + $3 = ($1 | 0) != ($2 | 0); + $2 = $2 + 1 | 0; + if ($3) { + continue + } + break; + }; + } + } + + function FLAC__window_tukey($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + label$1 : { + if (!!($2 <= Math_fround(0.0))) { + if (($1 | 0) < 1) { + break label$1 + } + while (1) { + HEAP32[($3 << 2) + $0 >> 2] = 1065353216; + $3 = $3 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + if (!!($2 >= Math_fround(1.0))) { + if (($1 | 0) < 1) { + break label$1 + } + $5 = +($1 + -1 | 0); + while (1) { + (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($3 | 0) * 6.283185307179586 / $5) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $3 = $3 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + break label$1; + } + $2 = Math_fround(Math_fround($2 * Math_fround(.5)) * Math_fround($1 | 0)); + label$6 : { + if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) { + $4 = ~~$2; + break label$6; + } + $4 = -2147483648; + } + if (($1 | 0) >= 1) { + while (1) { + HEAP32[($3 << 2) + $0 >> 2] = 1065353216; + $3 = $3 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + } + } + if (($4 | 0) < 2) { + break label$1 + } + $1 = $1 - $4 | 0; + $6 = $4 + -1 | 0; + $5 = +($6 | 0); + $3 = 0; + while (1) { + (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($3 | 0) * 3.141592653589793 / $5) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + (wasm2js_i32$0 = ($1 + $3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($3 + $6 | 0) * 3.141592653589793 / $5) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $3 = $3 + 1 | 0; + if (($4 | 0) != ($3 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_partial_tukey($0, $1, $2, $3, $4) { + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = Math_fround(0), $12 = 0.0, $13 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + while (1) { + $11 = $2; + $2 = Math_fround(.05000000074505806); + if ($11 <= Math_fround(0.0)) { + continue + } + $2 = Math_fround(.949999988079071); + if ($11 >= Math_fround(1.0)) { + continue + } + break; + }; + $2 = Math_fround($1 | 0); + $3 = Math_fround($2 * $3); + label$2 : { + if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) { + $6 = ~~$3; + break label$2; + } + $6 = -2147483648; + } + $3 = Math_fround($11 * Math_fround(.5)); + $2 = Math_fround($2 * $4); + label$5 : { + if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) { + $10 = ~~$2; + break label$5; + } + $10 = -2147483648; + } + $2 = Math_fround($3 * Math_fround($10 - $6 | 0)); + label$4 : { + if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) { + $7 = ~~$2; + break label$4; + } + $7 = -2147483648; + } + if (!(($6 | 0) < 1 | ($1 | 0) < 1)) { + $5 = $6 + -1 | 0; + $8 = $1 + -1 | 0; + $8 = $5 >>> 0 < $8 >>> 0 ? $5 : $8; + memset($0, ($8 << 2) + 4 | 0); + $5 = $8 + 1 | 0; + while (1) { + $13 = ($9 | 0) == ($8 | 0); + $9 = $9 + 1 | 0; + if (!$13) { + continue + } + break; + }; + } + $6 = $6 + $7 | 0; + label$10 : { + if (($5 | 0) >= ($6 | 0) | ($5 | 0) >= ($1 | 0)) { + break label$10 + } + $12 = +($7 | 0); + $9 = 1; + while (1) { + (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($9 | 0) * 3.141592653589793 / $12) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $5 = $5 + 1 | 0; + if (($5 | 0) >= ($6 | 0)) { + break label$10 + } + $9 = $9 + 1 | 0; + if (($5 | 0) < ($1 | 0)) { + continue + } + break; + }; + } + $6 = $10 - $7 | 0; + label$12 : { + if (($5 | 0) >= ($6 | 0) | ($5 | 0) >= ($1 | 0)) { + break label$12 + } + while (1) { + HEAP32[($5 << 2) + $0 >> 2] = 1065353216; + $5 = $5 + 1 | 0; + if (($5 | 0) >= ($6 | 0)) { + break label$12 + } + if (($5 | 0) < ($1 | 0)) { + continue + } + break; + }; + } + label$14 : { + if (($5 | 0) >= ($10 | 0) | ($5 | 0) >= ($1 | 0)) { + break label$14 + } + $12 = +($7 | 0); + while (1) { + (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($7 | 0) * 3.141592653589793 / $12) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $5 = $5 + 1 | 0; + if (($5 | 0) >= ($10 | 0)) { + break label$14 + } + $7 = $7 + -1 | 0; + if (($5 | 0) < ($1 | 0)) { + continue + } + break; + }; + } + if (($5 | 0) < ($1 | 0)) { + memset(($5 << 2) + $0 | 0, $1 - $5 << 2) + } + } + + function FLAC__window_punchout_tukey($0, $1, $2, $3, $4) { + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0.0, $12 = Math_fround(0), $13 = 0, $14 = Math_fround(0), wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0); + while (1) { + $12 = $2; + $2 = Math_fround(.05000000074505806); + if ($12 <= Math_fround(0.0)) { + continue + } + $2 = Math_fround(.949999988079071); + if ($12 >= Math_fround(1.0)) { + continue + } + break; + }; + $2 = Math_fround($12 * Math_fround(.5)); + $14 = $2; + $12 = Math_fround($1 | 0); + $3 = Math_fround($12 * $3); + label$3 : { + if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) { + $10 = ~~$3; + break label$3; + } + $10 = -2147483648; + } + $3 = Math_fround($14 * Math_fround($10 | 0)); + label$2 : { + if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) { + $6 = ~~$3; + break label$2; + } + $6 = -2147483648; + } + $8 = ($6 | 0) < 1; + $7 = $1; + $3 = Math_fround($12 * $4); + label$7 : { + if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) { + $9 = ~~$3; + break label$7; + } + $9 = -2147483648; + } + $2 = Math_fround($2 * Math_fround($7 - $9 | 0)); + label$6 : { + if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) { + $7 = ~~$2; + break label$6; + } + $7 = -2147483648; + } + if (!(($1 | 0) < 1 | $8)) { + $5 = $6 + -1 >>> 0 < $1 + -1 >>> 0 ? $6 : $1; + $11 = +($6 | 0); + $8 = 0; + $13 = 1; + while (1) { + (wasm2js_i32$0 = ($8 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($13 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $13 = $13 + 1 | 0; + $8 = $8 + 1 | 0; + if (($8 | 0) != ($5 | 0)) { + continue + } + break; + }; + } + $8 = $10 - $6 | 0; + label$12 : { + if (($5 | 0) >= ($8 | 0) | ($5 | 0) >= ($1 | 0)) { + break label$12 + } + while (1) { + HEAP32[($5 << 2) + $0 >> 2] = 1065353216; + $5 = $5 + 1 | 0; + if (($5 | 0) >= ($8 | 0)) { + break label$12 + } + if (($5 | 0) < ($1 | 0)) { + continue + } + break; + }; + } + label$14 : { + if (($5 | 0) >= ($10 | 0) | ($5 | 0) >= ($1 | 0)) { + break label$14 + } + $11 = +($6 | 0); + while (1) { + (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($6 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $5 = $5 + 1 | 0; + if (($5 | 0) >= ($10 | 0)) { + break label$14 + } + $6 = $6 + -1 | 0; + if (($5 | 0) < ($1 | 0)) { + continue + } + break; + }; + } + label$16 : { + if (($5 | 0) >= ($9 | 0) | ($5 | 0) >= ($1 | 0)) { + break label$16 + } + $6 = $5 ^ -1; + $10 = $6 + $9 | 0; + $6 = $1 + $6 | 0; + memset(($5 << 2) + $0 | 0, (($10 >>> 0 < $6 >>> 0 ? $10 : $6) << 2) + 4 | 0); + while (1) { + $5 = $5 + 1 | 0; + if (($5 | 0) >= ($9 | 0)) { + break label$16 + } + if (($5 | 0) < ($1 | 0)) { + continue + } + break; + }; + } + $9 = $7 + $9 | 0; + label$18 : { + if (($5 | 0) >= ($9 | 0) | ($5 | 0) >= ($1 | 0)) { + break label$18 + } + $11 = +($7 | 0); + $6 = 1; + while (1) { + (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($6 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $5 = $5 + 1 | 0; + if (($5 | 0) >= ($9 | 0)) { + break label$18 + } + $6 = $6 + 1 | 0; + if (($5 | 0) < ($1 | 0)) { + continue + } + break; + }; + } + $6 = $1 - $7 | 0; + label$20 : { + if (($5 | 0) >= ($6 | 0) | ($5 | 0) >= ($1 | 0)) { + break label$20 + } + while (1) { + HEAP32[($5 << 2) + $0 >> 2] = 1065353216; + $5 = $5 + 1 | 0; + if (($5 | 0) >= ($6 | 0)) { + break label$20 + } + if (($5 | 0) < ($1 | 0)) { + continue + } + break; + }; + } + if (($5 | 0) < ($1 | 0)) { + $11 = +($7 | 0); + while (1) { + (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($7 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0; + $7 = $7 + -1 | 0; + $5 = $5 + 1 | 0; + if (($5 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__window_welch($0, $1) { + var $2 = 0, $3 = 0.0, $4 = 0.0; + if (($1 | 0) >= 1) { + $3 = +($1 + -1 | 0) * .5; + while (1) { + $4 = (+($2 | 0) - $3) / $3; + HEAPF32[($2 << 2) + $0 >> 2] = 1.0 - $4 * $4; + $2 = $2 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + } + + function FLAC__add_metadata_block($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0; + $3 = strlen(HEAP32[2720]); + label$1 : { + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 4 >> 2], HEAP32[1391])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 >> 2], HEAP32[1392])) { + break label$1 + } + $2 = HEAP32[$0 + 8 >> 2]; + $2 = HEAP32[$0 >> 2] == 4 ? ($2 + $3 | 0) - HEAP32[$0 + 16 >> 2] | 0 : $2; + $4 = HEAP32[1393]; + if ($2 >>> $4) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, $2, $4)) { + break label$1 + } + label$3 : { + label$4 : { + label$5 : { + label$6 : { + label$7 : { + label$8 : { + label$9 : { + switch (HEAP32[$0 >> 2]) { + case 3: + if (!HEAP32[$0 + 16 >> 2]) { + break label$3 + } + $4 = HEAP32[1367]; + $6 = HEAP32[1366]; + $7 = HEAP32[1365]; + $2 = 0; + break label$8; + case 0: + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 16 >> 2], HEAP32[1356])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 20 >> 2], HEAP32[1357])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 24 >> 2], HEAP32[1358])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 28 >> 2], HEAP32[1359])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 32 >> 2], HEAP32[1360])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 36 >> 2] + -1 | 0, HEAP32[1361])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 40 >> 2] + -1 | 0, HEAP32[1362])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$0 + 48 >> 2], HEAP32[$0 + 52 >> 2], HEAP32[1363])) { + break label$1 + } + if (FLAC__bitwriter_write_byte_block($1, $0 + 56 | 0, 16)) { + break label$3 + } + break label$1; + case 1: + if (FLAC__bitwriter_write_zeroes($1, HEAP32[$0 + 8 >> 2] << 3)) { + break label$3 + } + break label$1; + case 6: + break label$5; + case 5: + break label$6; + case 4: + break label$7; + case 2: + break label$9; + default: + break label$4; + }; + } + $2 = HEAP32[1364] >>> 3 | 0; + if (!FLAC__bitwriter_write_byte_block($1, $0 + 16 | 0, $2)) { + break label$1 + } + if (FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 20 >> 2], HEAP32[$0 + 8 >> 2] - $2 | 0)) { + break label$3 + } + break label$1; + } + while (1) { + $3 = Math_imul($2, 24); + $5 = $3 + HEAP32[$0 + 20 >> 2] | 0; + if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$5 >> 2], HEAP32[$5 + 4 >> 2], $7)) { + break label$1 + } + $5 = $3 + HEAP32[$0 + 20 >> 2] | 0; + if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$5 + 8 >> 2], HEAP32[$5 + 12 >> 2], $6)) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[($3 + HEAP32[$0 + 20 >> 2] | 0) + 16 >> 2], $4)) { + break label$1 + } + $2 = $2 + 1 | 0; + if ($2 >>> 0 < HEAPU32[$0 + 16 >> 2]) { + continue + } + break; + }; + break label$3; + } + if (!FLAC__bitwriter_write_raw_uint32_little_endian($1, $3)) { + break label$1 + } + if (!FLAC__bitwriter_write_byte_block($1, HEAP32[2720], $3)) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32_little_endian($1, HEAP32[$0 + 24 >> 2])) { + break label$1 + } + if (!HEAP32[$0 + 24 >> 2]) { + break label$3 + } + $2 = 0; + while (1) { + $3 = $2 << 3; + if (!FLAC__bitwriter_write_raw_uint32_little_endian($1, HEAP32[$3 + HEAP32[$0 + 28 >> 2] >> 2])) { + break label$1 + } + $3 = $3 + HEAP32[$0 + 28 >> 2] | 0; + if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$3 + 4 >> 2], HEAP32[$3 >> 2])) { + break label$1 + } + $2 = $2 + 1 | 0; + if ($2 >>> 0 < HEAPU32[$0 + 24 >> 2]) { + continue + } + break; + }; + break label$3; + } + if (!FLAC__bitwriter_write_byte_block($1, $0 + 16 | 0, HEAP32[1378] >>> 3 | 0)) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$0 + 152 >> 2], HEAP32[$0 + 156 >> 2], HEAP32[1379])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 160 >> 2] != 0, HEAP32[1380])) { + break label$1 + } + if (!FLAC__bitwriter_write_zeroes($1, HEAP32[1381])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 164 >> 2], HEAP32[1382])) { + break label$1 + } + if (!HEAP32[$0 + 164 >> 2]) { + break label$3 + } + $6 = HEAP32[1373] >>> 3 | 0; + $7 = HEAP32[1370]; + $5 = HEAP32[1369]; + $9 = HEAP32[1368]; + $10 = HEAP32[1377]; + $11 = HEAP32[1376]; + $12 = HEAP32[1375]; + $13 = HEAP32[1374]; + $14 = HEAP32[1372]; + $15 = HEAP32[1371]; + $3 = 0; + while (1) { + $2 = HEAP32[$0 + 168 >> 2] + ($3 << 5) | 0; + if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$2 >> 2], HEAP32[$2 + 4 >> 2], $15)) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$2 + 8 | 0], $14)) { + break label$1 + } + if (!FLAC__bitwriter_write_byte_block($1, $2 + 9 | 0, $6)) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP8[$2 + 22 | 0] & 1, $13)) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$2 + 22 | 0] >>> 1 & 1, $12)) { + break label$1 + } + if (!FLAC__bitwriter_write_zeroes($1, $11)) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$2 + 23 | 0], $10)) { + break label$1 + } + label$16 : { + $8 = $2 + 23 | 0; + if (!HEAPU8[$8 | 0]) { + break label$16 + } + $16 = $2 + 24 | 0; + $2 = 0; + while (1) { + $4 = HEAP32[$16 >> 2] + ($2 << 4) | 0; + if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$4 >> 2], HEAP32[$4 + 4 >> 2], $9)) { + return 0 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$4 + 8 | 0], $5)) { + return 0 + } + if (FLAC__bitwriter_write_zeroes($1, $7)) { + $2 = $2 + 1 | 0; + if ($2 >>> 0 >= HEAPU8[$8 | 0]) { + break label$16 + } + continue; + } + break; + }; + return 0; + } + $3 = $3 + 1 | 0; + if ($3 >>> 0 < HEAPU32[$0 + 164 >> 2]) { + continue + } + break; + }; + break label$3; + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 16 >> 2], HEAP32[1383])) { + break label$1 + } + $2 = strlen(HEAP32[$0 + 20 >> 2]); + if (!FLAC__bitwriter_write_raw_uint32($1, $2, HEAP32[1384])) { + break label$1 + } + if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 20 >> 2], $2)) { + break label$1 + } + $2 = strlen(HEAP32[$0 + 24 >> 2]); + if (!FLAC__bitwriter_write_raw_uint32($1, $2, HEAP32[1385])) { + break label$1 + } + if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 24 >> 2], $2)) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 28 >> 2], HEAP32[1386])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 32 >> 2], HEAP32[1387])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 36 >> 2], HEAP32[1388])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 40 >> 2], HEAP32[1389])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 44 >> 2], HEAP32[1390])) { + break label$1 + } + if (FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 48 >> 2], HEAP32[$0 + 44 >> 2])) { + break label$3 + } + break label$1; + } + if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 16 >> 2], HEAP32[$0 + 8 >> 2])) { + break label$1 + } + } + $17 = 1; + } + return $17; + } + + function FLAC__frame_add_header($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + $5 = global$0 - 16 | 0; + global$0 = $5; + label$1 : { + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[1394], HEAP32[1395])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, 0, HEAP32[1396])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 20 >> 2] != 0, HEAP32[1397])) { + break label$1 + } + $8 = 16; + $9 = 1; + $3 = $1; + label$3 : { + label$4 : { + label$5 : { + label$6 : { + label$7 : { + label$8 : { + label$9 : { + label$10 : { + label$11 : { + $2 = HEAP32[$0 >> 2]; + if (($2 | 0) <= 2047) { + if (($2 | 0) <= 575) { + $4 = 1; + if (($2 | 0) == 192) { + break label$3 + } + if (($2 | 0) == 256) { + break label$8 + } + if (($2 | 0) != 512) { + break label$4 + } + $4 = 9; + break label$3; + } + if (($2 | 0) == 576) { + break label$11 + } + if (($2 | 0) == 1024) { + break label$7 + } + if (($2 | 0) != 1152) { + break label$4 + } + $4 = 3; + break label$3; + } + if (($2 | 0) <= 4607) { + if (($2 | 0) == 2048) { + break label$6 + } + if (($2 | 0) == 2304) { + break label$10 + } + if (($2 | 0) != 4096) { + break label$4 + } + $4 = 12; + break label$3; + } + if (($2 | 0) <= 16383) { + if (($2 | 0) == 4608) { + break label$9 + } + if (($2 | 0) != 8192) { + break label$4 + } + $4 = 13; + break label$3; + } + if (($2 | 0) == 16384) { + break label$5 + } + if (($2 | 0) != 32768) { + break label$4 + } + $4 = 15; + break label$3; + } + $4 = 2; + break label$3; + } + $4 = 4; + break label$3; + } + $4 = 5; + break label$3; + } + $4 = 8; + break label$3; + } + $4 = 10; + break label$3; + } + $4 = 11; + break label$3; + } + $4 = 14; + break label$3; + } + $2 = $2 >>> 0 < 257; + $8 = $2 ? 8 : 16; + $9 = 0; + $4 = $2 ? 6 : 7; + } + if (!FLAC__bitwriter_write_raw_uint32($3, $4, HEAP32[1398])) { + break label$1 + } + label$16 : { + label$17 : { + label$18 : { + label$19 : { + label$20 : { + label$21 : { + label$22 : { + label$23 : { + $2 = HEAP32[$0 + 4 >> 2]; + if (($2 | 0) <= 44099) { + if (($2 | 0) <= 22049) { + if (($2 | 0) == 8e3) { + break label$23 + } + if (($2 | 0) != 16e3) { + break label$17 + } + $3 = 5; + break label$16; + } + if (($2 | 0) == 22050) { + break label$22 + } + if (($2 | 0) == 24e3) { + break label$21 + } + if (($2 | 0) != 32e3) { + break label$17 + } + $3 = 8; + break label$16; + } + if (($2 | 0) <= 95999) { + if (($2 | 0) == 44100) { + break label$20 + } + if (($2 | 0) == 48e3) { + break label$19 + } + $3 = 1; + if (($2 | 0) == 88200) { + break label$16 + } + break label$17; + } + if (($2 | 0) == 96e3) { + break label$18 + } + if (($2 | 0) != 192e3) { + if (($2 | 0) != 176400) { + break label$17 + } + $3 = 2; + break label$16; + } + $3 = 3; + break label$16; + } + $3 = 4; + break label$16; + } + $3 = 6; + break label$16; + } + $3 = 7; + break label$16; + } + $3 = 9; + break label$16; + } + $3 = 10; + break label$16; + } + $3 = 11; + break label$16; + } + $6 = ($2 >>> 0) % 1e3 | 0; + if ($2 >>> 0 <= 255e3) { + $3 = 12; + $7 = 12; + if (!$6) { + break label$16 + } + } + if (!(($2 >>> 0) % 10)) { + $3 = 14; + $7 = 14; + break label$16; + } + $3 = $2 >>> 0 < 65536 ? 13 : 0; + $7 = $3; + } + $6 = 0; + if (!FLAC__bitwriter_write_raw_uint32($1, $3, HEAP32[1399])) { + break label$1 + } + label$30 : { + label$31 : { + switch (HEAP32[$0 + 12 >> 2]) { + case 0: + $3 = HEAP32[$0 + 8 >> 2] + -1 | 0; + break label$30; + case 1: + $3 = 8; + break label$30; + case 2: + $3 = 9; + break label$30; + case 3: + break label$31; + default: + break label$30; + }; + } + $3 = 10; + } + if (!FLAC__bitwriter_write_raw_uint32($1, $3, HEAP32[1400])) { + break label$1 + } + $3 = $1; + $2 = __wasm_rotl_i32(HEAP32[$0 + 16 >> 2] + -8 | 0, 30); + if ($2 >>> 0 <= 4) { + $2 = HEAP32[($2 << 2) + 10464 >> 2] + } else { + $2 = 0 + } + if (!FLAC__bitwriter_write_raw_uint32($3, $2, HEAP32[1401])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_uint32($1, 0, HEAP32[1402])) { + break label$1 + } + label$37 : { + if (!HEAP32[$0 + 20 >> 2]) { + if (FLAC__bitwriter_write_utf8_uint32($1, HEAP32[$0 + 24 >> 2])) { + break label$37 + } + break label$1; + } + if (!FLAC__bitwriter_write_utf8_uint64($1, HEAP32[$0 + 24 >> 2], HEAP32[$0 + 28 >> 2])) { + break label$1 + } + } + if (!$9) { + if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 >> 2] + -1 | 0, $8)) { + break label$1 + } + } + label$40 : { + label$41 : { + switch ($7 + -12 | 0) { + case 0: + if (FLAC__bitwriter_write_raw_uint32($1, HEAPU32[$0 + 4 >> 2] / 1e3 | 0, 8)) { + break label$40 + } + break label$1; + case 1: + if (FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 4 >> 2], 16)) { + break label$40 + } + break label$1; + case 2: + break label$41; + default: + break label$40; + }; + } + if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU32[$0 + 4 >> 2] / 10 | 0, 16)) { + break label$1 + } + } + if (!FLAC__bitwriter_get_write_crc8($1, $5 + 15 | 0)) { + break label$1 + } + $6 = (FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$5 + 15 | 0], HEAP32[1403]) | 0) != 0; + } + global$0 = $5 + 16 | 0; + return $6; + } + + function FLAC__subframe_add_constant($0, $1, $2, $3) { + var $4 = 0; + label$1 : { + if (!FLAC__bitwriter_write_raw_uint32($3, HEAP32[1417] | ($2 | 0) != 0, HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) { + break label$1 + } + if ($2) { + if (!FLAC__bitwriter_write_unary_unsigned($3, $2 + -1 | 0)) { + break label$1 + } + } + $4 = (FLAC__bitwriter_write_raw_int32($3, HEAP32[$0 >> 2], $1) | 0) != 0; + } + return $4; + } + + function FLAC__subframe_add_fixed($0, $1, $2, $3, $4) { + var $5 = 0; + label$1 : { + if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[1419] | ($3 | 0) != 0 | HEAP32[$0 + 12 >> 2] << 1, HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) { + break label$1 + } + if ($3) { + if (!FLAC__bitwriter_write_unary_unsigned($4, $3 + -1 | 0)) { + break label$1 + } + } + label$3 : { + if (!HEAP32[$0 + 12 >> 2]) { + break label$3 + } + $3 = 0; + while (1) { + if (FLAC__bitwriter_write_raw_int32($4, HEAP32[(($3 << 2) + $0 | 0) + 16 >> 2], $2)) { + $3 = $3 + 1 | 0; + if ($3 >>> 0 < HEAPU32[$0 + 12 >> 2]) { + continue + } + break label$3; + } + break; + }; + return 0; + } + if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 >> 2], HEAP32[1405])) { + break label$1 + } + label$6 : { + if (HEAPU32[$0 >> 2] > 1) { + break label$6 + } + if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 + 4 >> 2], HEAP32[1406])) { + break label$1 + } + $2 = HEAP32[$0 >> 2]; + if ($2 >>> 0 > 1) { + break label$6 + } + $3 = $1; + $1 = HEAP32[$0 + 8 >> 2]; + if (!add_residual_partitioned_rice_($4, HEAP32[$0 + 32 >> 2], $3, HEAP32[$0 + 12 >> 2], HEAP32[$1 >> 2], HEAP32[$1 + 4 >> 2], HEAP32[$0 + 4 >> 2], ($2 | 0) == 1)) { + break label$1 + } + } + $5 = 1; + } + return $5; + } + + function add_residual_partitioned_rice_($0, $1, $2, $3, $4, $5, $6, $7) { + var $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; + $12 = HEAP32[($7 ? 5644 : 5640) >> 2]; + $9 = HEAP32[($7 ? 5632 : 5628) >> 2]; + label$1 : { + label$2 : { + if (!$6) { + if (!HEAP32[$5 >> 2]) { + if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$4 >> 2], $9)) { + break label$2 + } + if (!FLAC__bitwriter_write_rice_signed_block($0, $1, $2, HEAP32[$4 >> 2])) { + break label$2 + } + break label$1; + } + if (!FLAC__bitwriter_write_raw_uint32($0, $12, $9)) { + break label$2 + } + if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$5 >> 2], HEAP32[1409])) { + break label$2 + } + if (!$2) { + break label$1 + } + $7 = 0; + while (1) { + if (FLAC__bitwriter_write_raw_int32($0, HEAP32[($7 << 2) + $1 >> 2], HEAP32[$5 >> 2])) { + $7 = $7 + 1 | 0; + if (($7 | 0) != ($2 | 0)) { + continue + } + break label$1; + } + break; + }; + return 0; + } + $15 = $2 + $3 >>> $6 | 0; + $16 = HEAP32[1409]; + $2 = 0; + while (1) { + $7 = $2; + $13 = $15 - ($10 ? 0 : $3) | 0; + $2 = $7 + $13 | 0; + $14 = $10 << 2; + $8 = $14 + $5 | 0; + label$8 : { + if (!HEAP32[$8 >> 2]) { + $11 = 0; + $8 = $4 + $14 | 0; + if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$8 >> 2], $9)) { + break label$2 + } + if (FLAC__bitwriter_write_rice_signed_block($0, ($7 << 2) + $1 | 0, $13, HEAP32[$8 >> 2])) { + break label$8 + } + break label$2; + } + $11 = 0; + if (!FLAC__bitwriter_write_raw_uint32($0, $12, $9)) { + break label$2 + } + if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$8 >> 2], $16)) { + break label$2 + } + if ($7 >>> 0 >= $2 >>> 0) { + break label$8 + } + while (1) { + if (!FLAC__bitwriter_write_raw_int32($0, HEAP32[($7 << 2) + $1 >> 2], HEAP32[$8 >> 2])) { + break label$2 + } + $7 = $7 + 1 | 0; + if (($7 | 0) != ($2 | 0)) { + continue + } + break; + }; + } + $11 = 1; + $10 = $10 + 1 | 0; + if (!($10 >>> $6)) { + continue + } + break; + }; + } + return $11; + } + return 1; + } + + function FLAC__subframe_add_lpc($0, $1, $2, $3, $4) { + var $5 = 0; + label$1 : { + if (!FLAC__bitwriter_write_raw_uint32($4, (HEAP32[$0 + 12 >> 2] << 1) + -2 | (HEAP32[1420] | ($3 | 0) != 0), HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) { + break label$1 + } + if ($3) { + if (!FLAC__bitwriter_write_unary_unsigned($4, $3 + -1 | 0)) { + break label$1 + } + } + label$3 : { + if (!HEAP32[$0 + 12 >> 2]) { + break label$3 + } + $3 = 0; + while (1) { + if (FLAC__bitwriter_write_raw_int32($4, HEAP32[(($3 << 2) + $0 | 0) + 152 >> 2], $2)) { + $3 = $3 + 1 | 0; + if ($3 >>> 0 < HEAPU32[$0 + 12 >> 2]) { + continue + } + break label$3; + } + break; + }; + return 0; + } + if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 + 16 >> 2] + -1 | 0, HEAP32[1412])) { + break label$1 + } + if (!FLAC__bitwriter_write_raw_int32($4, HEAP32[$0 + 20 >> 2], HEAP32[1413])) { + break label$1 + } + label$6 : { + if (!HEAP32[$0 + 12 >> 2]) { + break label$6 + } + $3 = 0; + while (1) { + if (FLAC__bitwriter_write_raw_int32($4, HEAP32[(($3 << 2) + $0 | 0) + 24 >> 2], HEAP32[$0 + 16 >> 2])) { + $3 = $3 + 1 | 0; + if ($3 >>> 0 < HEAPU32[$0 + 12 >> 2]) { + continue + } + break label$6; + } + break; + }; + return 0; + } + if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 >> 2], HEAP32[1405])) { + break label$1 + } + label$9 : { + if (HEAPU32[$0 >> 2] > 1) { + break label$9 + } + if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 + 4 >> 2], HEAP32[1406])) { + break label$1 + } + $2 = HEAP32[$0 >> 2]; + if ($2 >>> 0 > 1) { + break label$9 + } + $3 = $1; + $1 = HEAP32[$0 + 8 >> 2]; + if (!add_residual_partitioned_rice_($4, HEAP32[$0 + 280 >> 2], $3, HEAP32[$0 + 12 >> 2], HEAP32[$1 >> 2], HEAP32[$1 + 4 >> 2], HEAP32[$0 + 4 >> 2], ($2 | 0) == 1)) { + break label$1 + } + } + $5 = 1; + } + return $5; + } + + function FLAC__subframe_add_verbatim($0, $1, $2, $3, $4) { + $0 = HEAP32[$0 >> 2]; + label$1 : { + if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[1418] | ($3 | 0) != 0, HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) { + break label$1 + } + if ($3) { + if (!FLAC__bitwriter_write_unary_unsigned($4, $3 + -1 | 0)) { + break label$1 + } + } + if (!$1) { + return 1 + } + $3 = 0; + label$4 : { + while (1) { + if (!FLAC__bitwriter_write_raw_int32($4, HEAP32[$0 + ($3 << 2) >> 2], $2)) { + break label$4 + } + $3 = $3 + 1 | 0; + if (($3 | 0) != ($1 | 0)) { + continue + } + break; + }; + return 1; + } + } + return 0; + } + + function strncmp($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0; + if (!$2) { + return 0 + } + $3 = HEAPU8[$0 | 0]; + label$2 : { + if (!$3) { + break label$2 + } + while (1) { + label$4 : { + $4 = HEAPU8[$1 | 0]; + if (($4 | 0) != ($3 | 0)) { + break label$4 + } + $2 = $2 + -1 | 0; + if (!$2 | !$4) { + break label$4 + } + $1 = $1 + 1 | 0; + $3 = HEAPU8[$0 + 1 | 0]; + $0 = $0 + 1 | 0; + if ($3) { + continue + } + break label$2; + } + break; + }; + $5 = $3; + } + return ($5 & 255) - HEAPU8[$1 | 0] | 0; + } + + function __uflow($0) { + var $1 = 0, $2 = 0; + $1 = global$0 - 16 | 0; + global$0 = $1; + $2 = -1; + label$1 : { + if (__toread($0)) { + break label$1 + } + if ((FUNCTION_TABLE[HEAP32[$0 + 32 >> 2]]($0, $1 + 15 | 0, 1) | 0) != 1) { + break label$1 + } + $2 = HEAPU8[$1 + 15 | 0]; + } + global$0 = $1 + 16 | 0; + return $2; + } + + function __shlim($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0; + HEAP32[$0 + 112 >> 2] = 0; + HEAP32[$0 + 116 >> 2] = 0; + $3 = HEAP32[$0 + 8 >> 2]; + $4 = HEAP32[$0 + 4 >> 2]; + $1 = $3 - $4 | 0; + $2 = $1 >> 31; + HEAP32[$0 + 120 >> 2] = $1; + HEAP32[$0 + 124 >> 2] = $2; + if (!((($2 | 0) < 0 ? 1 : ($2 | 0) <= 0 ? ($1 >>> 0 > 0 ? 0 : 1) : 0) | 1)) { + HEAP32[$0 + 104 >> 2] = $4; + return; + } + HEAP32[$0 + 104 >> 2] = $3; + } + + function __shgetc($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + $2 = HEAP32[$0 + 116 >> 2]; + $3 = $2; + label$1 : { + $5 = HEAP32[$0 + 112 >> 2]; + label$2 : { + if ($2 | $5) { + $2 = HEAP32[$0 + 124 >> 2]; + if (($2 | 0) > ($3 | 0) ? 1 : ($2 | 0) >= ($3 | 0) ? (HEAPU32[$0 + 120 >> 2] < $5 >>> 0 ? 0 : 1) : 0) { + break label$2 + } + } + $5 = __uflow($0); + if (($5 | 0) > -1) { + break label$1 + } + } + HEAP32[$0 + 104 >> 2] = 0; + return -1; + } + $2 = HEAP32[$0 + 8 >> 2]; + $3 = HEAP32[$0 + 116 >> 2]; + $4 = $3; + label$4 : { + label$5 : { + $1 = HEAP32[$0 + 112 >> 2]; + if (!($3 | $1)) { + break label$5 + } + $3 = (HEAP32[$0 + 124 >> 2] ^ -1) + $4 | 0; + $4 = HEAP32[$0 + 120 >> 2] ^ -1; + $1 = $4 + $1 | 0; + if ($1 >>> 0 < $4 >>> 0) { + $3 = $3 + 1 | 0 + } + $4 = $1; + $1 = HEAP32[$0 + 4 >> 2]; + $6 = $2 - $1 | 0; + $7 = $4 >>> 0 < $6 >>> 0 ? 0 : 1; + $6 = $6 >> 31; + if (($3 | 0) > ($6 | 0) ? 1 : ($3 | 0) >= ($6 | 0) ? $7 : 0) { + break label$5 + } + HEAP32[$0 + 104 >> 2] = $4 + $1; + break label$4; + } + HEAP32[$0 + 104 >> 2] = $2; + } + label$6 : { + if (!$2) { + $2 = HEAP32[$0 + 4 >> 2]; + break label$6; + } + $3 = $0; + $1 = $2; + $2 = HEAP32[$0 + 4 >> 2]; + $1 = ($1 - $2 | 0) + 1 | 0; + $4 = $1 + HEAP32[$0 + 120 >> 2] | 0; + $0 = HEAP32[$0 + 124 >> 2] + ($1 >> 31) | 0; + HEAP32[$3 + 120 >> 2] = $4; + HEAP32[$3 + 124 >> 2] = $4 >>> 0 < $1 >>> 0 ? $0 + 1 | 0 : $0; + } + $0 = $2 + -1 | 0; + if (HEAPU8[$0 | 0] != ($5 | 0)) { + HEAP8[$0 | 0] = $5 + } + return $5; + } + + function __extendsftf2($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + $4 = global$0 - 16 | 0; + global$0 = $4; + $5 = (wasm2js_scratch_store_f32($1), wasm2js_scratch_load_i32(0)); + $2 = $5 & 2147483647; + label$1 : { + if ($2 + -8388608 >>> 0 <= 2130706431) { + $3 = $2; + $2 = $2 >>> 7 | 0; + $3 = $3 << 25; + $2 = $2 + 1065353216 | 0; + $6 = $3; + $2 = $3 >>> 0 < 0 ? $2 + 1 | 0 : $2; + break label$1; + } + if ($2 >>> 0 >= 2139095040) { + $2 = $5; + $3 = $2 >>> 7 | 0; + $6 = $2 << 25; + $2 = $3 | 2147418112; + break label$1; + } + if (!$2) { + $2 = 0; + break label$1; + } + $3 = $2; + $2 = Math_clz32($2); + __ashlti3($4, $3, 0, 0, 0, $2 + 81 | 0); + $7 = HEAP32[$4 >> 2]; + $8 = HEAP32[$4 + 4 >> 2]; + $6 = HEAP32[$4 + 8 >> 2]; + $2 = HEAP32[$4 + 12 >> 2] ^ 65536 | 16265 - $2 << 16; + } + HEAP32[$0 >> 2] = $7; + HEAP32[$0 + 4 >> 2] = $8; + HEAP32[$0 + 8 >> 2] = $6; + HEAP32[$0 + 12 >> 2] = $5 & -2147483648 | $2; + global$0 = $4 + 16 | 0; + } + + function __floatsitf($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + $3 = global$0 - 16 | 0; + global$0 = $3; + $6 = $0; + $7 = $0; + label$1 : { + if (!$1) { + $1 = 0; + $5 = 0; + break label$1; + } + $2 = $1 >> 31; + $4 = $2 + $1 ^ $2; + $2 = Math_clz32($4); + __ashlti3($3, $4, 0, 0, 0, $2 + 81 | 0); + $2 = (HEAP32[$3 + 12 >> 2] ^ 65536) + (16414 - $2 << 16) | 0; + $4 = 0 + HEAP32[$3 + 8 >> 2] | 0; + if ($4 >>> 0 < $5 >>> 0) { + $2 = $2 + 1 | 0 + } + $1 = $1 & -2147483648 | $2; + $2 = HEAP32[$3 + 4 >> 2]; + $5 = HEAP32[$3 >> 2]; + } + HEAP32[$7 >> 2] = $5; + HEAP32[$6 + 4 >> 2] = $2; + HEAP32[$0 + 8 >> 2] = $4; + HEAP32[$0 + 12 >> 2] = $1; + global$0 = $3 + 16 | 0; + } + + function __multf3($0, $1, $2, $3, $4, $5, $6, $7, $8) { + var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; + $13 = global$0 - 96 | 0; + global$0 = $13; + $15 = $2; + $10 = $6; + $19 = ($10 & 131071) << 15 | $5 >>> 17; + $9 = $8 & 65535; + $21 = $9; + $17 = $7; + $10 = $7; + $24 = $10 << 15 | $6 >>> 17; + $14 = ($4 ^ $8) & -2147483648; + $10 = $4 & 65535; + $12 = $10; + $16 = $3; + $27 = $10; + $10 = $9; + $25 = ($10 & 131071) << 15 | $7 >>> 17; + $37 = $8 >>> 16 & 32767; + $38 = $4 >>> 16 & 32767; + label$1 : { + label$2 : { + if ($38 + -1 >>> 0 <= 32765) { + $20 = 0; + if ($37 + -1 >>> 0 < 32766) { + break label$2 + } + } + $11 = $4 & 2147483647; + $9 = $11; + $10 = $3; + if (!(!$3 & ($9 | 0) == 2147418112 ? !($1 | $2) : ($9 | 0) == 2147418112 & $3 >>> 0 < 0 | $9 >>> 0 < 2147418112)) { + $22 = $3; + $14 = $4 | 32768; + break label$1; + } + $11 = $8 & 2147483647; + $4 = $11; + $3 = $7; + if (!(!$3 & ($4 | 0) == 2147418112 ? !($5 | $6) : ($4 | 0) == 2147418112 & $3 >>> 0 < 0 | $4 >>> 0 < 2147418112)) { + $22 = $7; + $14 = $8 | 32768; + $1 = $5; + $2 = $6; + break label$1; + } + if (!($1 | $10 | ($9 ^ 2147418112 | $2))) { + if (!($3 | $5 | ($4 | $6))) { + $14 = 2147450880; + $1 = 0; + $2 = 0; + break label$1; + } + $14 = $14 | 2147418112; + $1 = 0; + $2 = 0; + break label$1; + } + if (!($3 | $5 | ($4 ^ 2147418112 | $6))) { + $3 = $1 | $10; + $4 = $2 | $9; + $1 = 0; + $2 = 0; + if (!($3 | $4)) { + $14 = 2147450880; + break label$1; + } + $14 = $14 | 2147418112; + break label$1; + } + if (!($1 | $10 | ($2 | $9))) { + $1 = 0; + $2 = 0; + break label$1; + } + if (!($3 | $5 | ($4 | $6))) { + $1 = 0; + $2 = 0; + break label$1; + } + $3 = 0; + if (($9 | 0) == 65535 | $9 >>> 0 < 65535) { + $9 = $1; + $8 = $2; + $3 = !($12 | $16); + $7 = $3 << 6; + $10 = Math_clz32($3 ? $1 : $16) + 32 | 0; + $1 = Math_clz32($3 ? $2 : $12); + $1 = $7 + (($1 | 0) == 32 ? $10 : $1) | 0; + __ashlti3($13 + 80 | 0, $9, $8, $16, $12, $1 + -15 | 0); + $16 = HEAP32[$13 + 88 >> 2]; + $15 = HEAP32[$13 + 84 >> 2]; + $27 = HEAP32[$13 + 92 >> 2]; + $3 = 16 - $1 | 0; + $1 = HEAP32[$13 + 80 >> 2]; + } + $20 = $3; + if ($4 >>> 0 > 65535) { + break label$2 + } + $2 = !($17 | $21); + $4 = $2 << 6; + $7 = Math_clz32($2 ? $5 : $17) + 32 | 0; + $2 = Math_clz32($2 ? $6 : $21); + $2 = $4 + (($2 | 0) == 32 ? $7 : $2) | 0; + $8 = $2; + __ashlti3($13 - -64 | 0, $5, $6, $17, $21, $2 + -15 | 0); + $5 = HEAP32[$13 + 76 >> 2]; + $2 = $5; + $7 = HEAP32[$13 + 72 >> 2]; + $4 = $7; + $4 = $4 << 15; + $10 = HEAP32[$13 + 68 >> 2]; + $24 = $10 >>> 17 | $4; + $4 = $10; + $5 = HEAP32[$13 + 64 >> 2]; + $19 = ($4 & 131071) << 15 | $5 >>> 17; + $25 = ($2 & 131071) << 15 | $7 >>> 17; + $20 = ($3 - $8 | 0) + 16 | 0; + } + $3 = $19; + $17 = 0; + $8 = __wasm_i64_mul($3, 0, $1, $17); + $2 = i64toi32_i32$HIGH_BITS; + $26 = $2; + $23 = $5 << 15 & -32768; + $5 = __wasm_i64_mul($23, 0, $15, 0); + $4 = $5 + $8 | 0; + $11 = i64toi32_i32$HIGH_BITS + $2 | 0; + $11 = $4 >>> 0 < $5 >>> 0 ? $11 + 1 | 0 : $11; + $2 = $4; + $5 = 0; + $6 = __wasm_i64_mul($23, $28, $1, $17); + $4 = $5 + $6 | 0; + $9 = i64toi32_i32$HIGH_BITS + $2 | 0; + $9 = $4 >>> 0 < $6 >>> 0 ? $9 + 1 | 0 : $9; + $19 = $4; + $6 = $9; + $32 = ($2 | 0) == ($9 | 0) & $4 >>> 0 < $5 >>> 0 | $9 >>> 0 < $2 >>> 0; + $41 = __wasm_i64_mul($3, $39, $15, $40); + $33 = i64toi32_i32$HIGH_BITS; + $29 = $16; + $5 = __wasm_i64_mul($23, $28, $16, 0); + $4 = $5 + $41 | 0; + $12 = i64toi32_i32$HIGH_BITS + $33 | 0; + $12 = $4 >>> 0 < $5 >>> 0 ? $12 + 1 | 0 : $12; + $42 = $4; + $7 = __wasm_i64_mul($24, 0, $1, $17); + $4 = $4 + $7 | 0; + $5 = i64toi32_i32$HIGH_BITS + $12 | 0; + $34 = $4; + $5 = $4 >>> 0 < $7 >>> 0 ? $5 + 1 | 0 : $5; + $21 = $5; + $7 = $5; + $5 = ($11 | 0) == ($26 | 0) & $2 >>> 0 < $8 >>> 0 | $11 >>> 0 < $26 >>> 0; + $4 = $11; + $2 = $4 + $34 | 0; + $9 = $5 + $7 | 0; + $26 = $2; + $9 = $2 >>> 0 < $4 >>> 0 ? $9 + 1 | 0 : $9; + $4 = $9; + $7 = $2; + $44 = __wasm_i64_mul($3, $39, $16, $43); + $35 = i64toi32_i32$HIGH_BITS; + $2 = $23; + $30 = $27 | 65536; + $23 = $18; + $5 = __wasm_i64_mul($2, $28, $30, $18); + $2 = $5 + $44 | 0; + $9 = i64toi32_i32$HIGH_BITS + $35 | 0; + $9 = $2 >>> 0 < $5 >>> 0 ? $9 + 1 | 0 : $9; + $45 = $2; + $10 = __wasm_i64_mul($15, $40, $24, $46); + $2 = $2 + $10 | 0; + $18 = $9; + $5 = $9 + i64toi32_i32$HIGH_BITS | 0; + $5 = $2 >>> 0 < $10 >>> 0 ? $5 + 1 | 0 : $5; + $36 = $2; + $31 = $25 & 2147483647 | -2147483648; + $2 = __wasm_i64_mul($31, 0, $1, $17); + $1 = $36 + $2 | 0; + $17 = $5; + $10 = $5 + i64toi32_i32$HIGH_BITS | 0; + $28 = $1; + $2 = $1 >>> 0 < $2 >>> 0 ? $10 + 1 | 0 : $10; + $9 = $4 + $1 | 0; + $5 = 0; + $1 = $5 + $7 | 0; + if ($1 >>> 0 < $5 >>> 0) { + $9 = $9 + 1 | 0 + } + $27 = $1; + $25 = $9; + $5 = $9; + $7 = $1 + $32 | 0; + if ($7 >>> 0 < $1 >>> 0) { + $5 = $5 + 1 | 0 + } + $8 = $5; + $16 = ($20 + ($37 + $38 | 0) | 0) + -16383 | 0; + $5 = __wasm_i64_mul($29, $43, $24, $46); + $1 = i64toi32_i32$HIGH_BITS; + $11 = 0; + $10 = __wasm_i64_mul($3, $39, $30, $23); + $3 = $10 + $5 | 0; + $9 = i64toi32_i32$HIGH_BITS + $1 | 0; + $9 = $3 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9; + $20 = $3; + $10 = $3; + $3 = $9; + $9 = ($1 | 0) == ($3 | 0) & $10 >>> 0 < $5 >>> 0 | $3 >>> 0 < $1 >>> 0; + $5 = __wasm_i64_mul($31, $47, $15, $40); + $1 = $5 + $10 | 0; + $10 = i64toi32_i32$HIGH_BITS + $3 | 0; + $10 = $1 >>> 0 < $5 >>> 0 ? $10 + 1 | 0 : $10; + $15 = $1; + $5 = $1; + $1 = $10; + $3 = ($3 | 0) == ($1 | 0) & $5 >>> 0 < $20 >>> 0 | $1 >>> 0 < $3 >>> 0; + $5 = $9 + $3 | 0; + if ($5 >>> 0 < $3 >>> 0) { + $11 = 1 + } + $10 = $5; + $3 = $1; + $5 = $11; + $32 = $10; + $9 = 0; + $10 = ($12 | 0) == ($21 | 0) & $34 >>> 0 < $42 >>> 0 | $21 >>> 0 < $12 >>> 0; + $12 = $10 + (($12 | 0) == ($33 | 0) & $42 >>> 0 < $41 >>> 0 | $12 >>> 0 < $33 >>> 0) | 0; + if ($12 >>> 0 < $10 >>> 0) { + $9 = 1 + } + $11 = $12; + $12 = $12 + $15 | 0; + $10 = $3 + $9 | 0; + $20 = $12; + $9 = $12; + $10 = $9 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10; + $3 = $10; + $1 = ($1 | 0) == ($3 | 0) & $9 >>> 0 < $15 >>> 0 | $3 >>> 0 < $1 >>> 0; + $10 = $32 + $1 | 0; + if ($10 >>> 0 < $1 >>> 0) { + $5 = $5 + 1 | 0 + } + $1 = $10; + $10 = __wasm_i64_mul($31, $47, $30, $23); + $1 = $1 + $10 | 0; + $9 = i64toi32_i32$HIGH_BITS + $5 | 0; + $9 = $1 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9; + $11 = $1; + $12 = __wasm_i64_mul($31, $47, $29, $43); + $5 = i64toi32_i32$HIGH_BITS; + $15 = __wasm_i64_mul($24, $46, $30, $23); + $1 = $15 + $12 | 0; + $10 = i64toi32_i32$HIGH_BITS + $5 | 0; + $10 = $1 >>> 0 < $15 >>> 0 ? $10 + 1 | 0 : $10; + $15 = $1; + $1 = $10; + $10 = ($5 | 0) == ($1 | 0) & $15 >>> 0 < $12 >>> 0 | $1 >>> 0 < $5 >>> 0; + $5 = $1 + $11 | 0; + $11 = $9 + $10 | 0; + $10 = $5 >>> 0 < $1 >>> 0 ? $11 + 1 | 0 : $11; + $29 = $5; + $9 = $3 + $15 | 0; + $11 = 0; + $1 = $11 + $20 | 0; + if ($1 >>> 0 < $11 >>> 0) { + $9 = $9 + 1 | 0 + } + $12 = $1; + $5 = $1; + $1 = $9; + $3 = ($3 | 0) == ($1 | 0) & $5 >>> 0 < $20 >>> 0 | $1 >>> 0 < $3 >>> 0; + $5 = $29 + $3 | 0; + if ($5 >>> 0 < $3 >>> 0) { + $10 = $10 + 1 | 0 + } + $15 = $5; + $11 = $1; + $9 = 0; + $5 = ($18 | 0) == ($17 | 0) & $36 >>> 0 < $45 >>> 0 | $17 >>> 0 < $18 >>> 0; + $18 = $5 + (($18 | 0) == ($35 | 0) & $45 >>> 0 < $44 >>> 0 | $18 >>> 0 < $35 >>> 0) | 0; + if ($18 >>> 0 < $5 >>> 0) { + $9 = 1 + } + $5 = $18 + (($2 | 0) == ($17 | 0) & $28 >>> 0 < $36 >>> 0 | $2 >>> 0 < $17 >>> 0) | 0; + $3 = $2; + $2 = $3 + $12 | 0; + $11 = $5 + $11 | 0; + $11 = $2 >>> 0 < $3 >>> 0 ? $11 + 1 | 0 : $11; + $18 = $2; + $3 = $2; + $2 = $11; + $1 = ($1 | 0) == ($2 | 0) & $3 >>> 0 < $12 >>> 0 | $2 >>> 0 < $1 >>> 0; + $3 = $1 + $15 | 0; + if ($3 >>> 0 < $1 >>> 0) { + $10 = $10 + 1 | 0 + } + $1 = $2; + $9 = $10; + $10 = $3; + $5 = 0; + $3 = ($4 | 0) == ($25 | 0) & $27 >>> 0 < $26 >>> 0 | $25 >>> 0 < $4 >>> 0; + $4 = $3 + (($4 | 0) == ($21 | 0) & $26 >>> 0 < $34 >>> 0 | $4 >>> 0 < $21 >>> 0) | 0; + if ($4 >>> 0 < $3 >>> 0) { + $5 = 1 + } + $3 = $4 + $18 | 0; + $11 = $1 + $5 | 0; + $11 = $3 >>> 0 < $4 >>> 0 ? $11 + 1 | 0 : $11; + $1 = $3; + $4 = $11; + $1 = ($2 | 0) == ($4 | 0) & $1 >>> 0 < $18 >>> 0 | $4 >>> 0 < $2 >>> 0; + $2 = $10 + $1 | 0; + if ($2 >>> 0 < $1 >>> 0) { + $9 = $9 + 1 | 0 + } + $1 = $2; + $2 = $9; + label$13 : { + if ($2 & 65536) { + $16 = $16 + 1 | 0; + break label$13; + } + $12 = $6 >>> 31 | 0; + $9 = $2 << 1 | $1 >>> 31; + $1 = $1 << 1 | $4 >>> 31; + $2 = $9; + $9 = $4 << 1 | $3 >>> 31; + $3 = $3 << 1 | $8 >>> 31; + $4 = $9; + $10 = $19; + $9 = $6 << 1 | $10 >>> 31; + $19 = $10 << 1; + $6 = $9; + $10 = $8 << 1 | $7 >>> 31; + $7 = $7 << 1 | $12; + $8 = $10; + } + if (($16 | 0) >= 32767) { + $14 = $14 | 2147418112; + $1 = 0; + $2 = 0; + break label$1; + } + label$16 : { + if (($16 | 0) <= 0) { + $5 = 1 - $16 | 0; + if ($5 >>> 0 <= 127) { + $10 = $16 + 127 | 0; + __ashlti3($13 + 48 | 0, $19, $6, $7, $8, $10); + __ashlti3($13 + 32 | 0, $3, $4, $1, $2, $10); + __lshrti3($13 + 16 | 0, $19, $6, $7, $8, $5); + __lshrti3($13, $3, $4, $1, $2, $5); + $19 = (HEAP32[$13 + 48 >> 2] | HEAP32[$13 + 56 >> 2]) != 0 | (HEAP32[$13 + 52 >> 2] | HEAP32[$13 + 60 >> 2]) != 0 | (HEAP32[$13 + 32 >> 2] | HEAP32[$13 + 16 >> 2]); + $6 = HEAP32[$13 + 36 >> 2] | HEAP32[$13 + 20 >> 2]; + $7 = HEAP32[$13 + 40 >> 2] | HEAP32[$13 + 24 >> 2]; + $8 = HEAP32[$13 + 44 >> 2] | HEAP32[$13 + 28 >> 2]; + $3 = HEAP32[$13 >> 2]; + $4 = HEAP32[$13 + 4 >> 2]; + $2 = HEAP32[$13 + 12 >> 2]; + $1 = HEAP32[$13 + 8 >> 2]; + break label$16; + } + $1 = 0; + $2 = 0; + break label$1; + } + $2 = $2 & 65535 | $16 << 16; + } + $22 = $1 | $22; + $14 = $2 | $14; + if (!(!$7 & ($8 | 0) == -2147483648 ? !($6 | $19) : ($8 | 0) > -1 ? 1 : 0)) { + $11 = $14; + $12 = $4; + $1 = $3 + 1 | 0; + if ($1 >>> 0 < 1) { + $12 = $12 + 1 | 0 + } + $2 = $12; + $3 = ($4 | 0) == ($2 | 0) & $1 >>> 0 < $3 >>> 0 | $2 >>> 0 < $4 >>> 0; + $4 = $3 + $22 | 0; + if ($4 >>> 0 < $3 >>> 0) { + $11 = $11 + 1 | 0 + } + $22 = $4; + $14 = $11; + break label$1; + } + if ($7 | $19 | ($8 ^ -2147483648 | $6)) { + $1 = $3; + $2 = $4; + break label$1; + } + $12 = $14; + $9 = $4; + $1 = $3 & 1; + $2 = $1 + $3 | 0; + if ($2 >>> 0 < $1 >>> 0) { + $9 = $9 + 1 | 0 + } + $1 = $2; + $2 = $9; + $3 = ($4 | 0) == ($2 | 0) & $1 >>> 0 < $3 >>> 0 | $2 >>> 0 < $4 >>> 0; + $4 = $3 + $22 | 0; + if ($4 >>> 0 < $3 >>> 0) { + $12 = $12 + 1 | 0 + } + $22 = $4; + $14 = $12; + } + HEAP32[$0 >> 2] = $1; + HEAP32[$0 + 4 >> 2] = $2; + HEAP32[$0 + 8 >> 2] = $22; + HEAP32[$0 + 12 >> 2] = $14; + global$0 = $13 + 96 | 0; + } + + function __addtf3($0, $1, $2, $3, $4, $5, $6, $7, $8) { + var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; + $11 = global$0 - 112 | 0; + global$0 = $11; + $12 = $7; + $14 = $8 & 2147483647; + $10 = $2 + -1 | 0; + $9 = $1 + -1 | 0; + if (($9 | 0) != -1) { + $10 = $10 + 1 | 0 + } + $13 = $9; + $17 = ($9 | 0) == -1 & ($10 | 0) == -1; + $15 = $4 & 2147483647; + $9 = $15; + $16 = $3; + $10 = ($2 | 0) == ($10 | 0) & $13 >>> 0 < $1 >>> 0 | $10 >>> 0 < $2 >>> 0; + $13 = $3 + $10 | 0; + if ($13 >>> 0 < $10 >>> 0) { + $9 = $9 + 1 | 0 + } + $13 = $13 + -1 | 0; + $10 = $9 + -1 | 0; + $9 = $13; + label$1 : { + label$2 : { + $10 = ($9 | 0) != -1 ? $10 + 1 | 0 : $10; + if (!(($9 | 0) == -1 & ($10 | 0) == 2147418111 ? $17 : $10 >>> 0 > 2147418111)) { + $10 = $6 + -1 | 0; + $9 = $5 + -1 | 0; + if (($9 | 0) != -1) { + $10 = $10 + 1 | 0 + } + $13 = $9; + $17 = ($9 | 0) != -1 | ($10 | 0) != -1; + $9 = $14; + $10 = ($6 | 0) == ($10 | 0) & $13 >>> 0 < $5 >>> 0 | $10 >>> 0 < $6 >>> 0; + $13 = $10 + $12 | 0; + if ($13 >>> 0 < $10 >>> 0) { + $9 = $9 + 1 | 0 + } + $10 = $13 + -1 | 0; + $9 = $9 + -1 | 0; + $9 = ($10 | 0) != -1 ? $9 + 1 | 0 : $9; + if (($10 | 0) == -1 & ($9 | 0) == 2147418111 ? $17 : ($9 | 0) == 2147418111 & ($10 | 0) != -1 | $9 >>> 0 < 2147418111) { + break label$2 + } + } + if (!(!$16 & ($15 | 0) == 2147418112 ? !($1 | $2) : ($15 | 0) == 2147418112 & $16 >>> 0 < 0 | $15 >>> 0 < 2147418112)) { + $7 = $3; + $8 = $4 | 32768; + $5 = $1; + $6 = $2; + break label$1; + } + if (!(!$12 & ($14 | 0) == 2147418112 ? !($5 | $6) : ($14 | 0) == 2147418112 & $12 >>> 0 < 0 | $14 >>> 0 < 2147418112)) { + $8 = $8 | 32768; + break label$1; + } + if (!($1 | $16 | ($15 ^ 2147418112 | $2))) { + $9 = $3; + $3 = !($1 ^ $5 | $3 ^ $7 | ($2 ^ $6 | $4 ^ $8 ^ -2147483648)); + $7 = $3 ? 0 : $9; + $8 = $3 ? 2147450880 : $4; + $5 = $3 ? 0 : $1; + $6 = $3 ? 0 : $2; + break label$1; + } + if (!($5 | $12 | ($14 ^ 2147418112 | $6))) { + break label$1 + } + if (!($1 | $16 | ($2 | $15))) { + if ($5 | $12 | ($6 | $14)) { + break label$1 + } + $5 = $1 & $5; + $6 = $2 & $6; + $7 = $3 & $7; + $8 = $4 & $8; + break label$1; + } + if ($5 | $12 | ($6 | $14)) { + break label$2 + } + $5 = $1; + $6 = $2; + $7 = $3; + $8 = $4; + break label$1; + } + $10 = ($12 | 0) == ($16 | 0) & ($14 | 0) == ($15 | 0) ? ($2 | 0) == ($6 | 0) & $5 >>> 0 > $1 >>> 0 | $6 >>> 0 > $2 >>> 0 : ($14 | 0) == ($15 | 0) & $12 >>> 0 > $16 >>> 0 | $14 >>> 0 > $15 >>> 0; + $9 = $10; + $15 = $9 ? $5 : $1; + $14 = $9 ? $6 : $2; + $12 = $9 ? $8 : $4; + $16 = $12; + $13 = $9 ? $7 : $3; + $9 = $12 & 65535; + $4 = $10 ? $4 : $8; + $18 = $4; + $3 = $10 ? $3 : $7; + $17 = $4 >>> 16 & 32767; + $12 = $12 >>> 16 & 32767; + if (!$12) { + $4 = !($9 | $13); + $7 = $4 << 6; + $8 = Math_clz32($4 ? $15 : $13) + 32 | 0; + $4 = Math_clz32($4 ? $14 : $9); + $4 = $7 + (($4 | 0) == 32 ? $8 : $4) | 0; + __ashlti3($11 + 96 | 0, $15, $14, $13, $9, $4 + -15 | 0); + $13 = HEAP32[$11 + 104 >> 2]; + $15 = HEAP32[$11 + 96 >> 2]; + $14 = HEAP32[$11 + 100 >> 2]; + $12 = 16 - $4 | 0; + $9 = HEAP32[$11 + 108 >> 2]; + } + $5 = $10 ? $1 : $5; + $6 = $10 ? $2 : $6; + $1 = $3; + $2 = $18 & 65535; + if ($17) { + $1 = $2 + } else { + $7 = $1; + $3 = !($1 | $2); + $4 = $3 << 6; + $8 = Math_clz32($3 ? $5 : $1) + 32 | 0; + $1 = Math_clz32($3 ? $6 : $2); + $1 = $4 + (($1 | 0) == 32 ? $8 : $1) | 0; + __ashlti3($11 + 80 | 0, $5, $6, $7, $2, $1 + -15 | 0); + $17 = 16 - $1 | 0; + $5 = HEAP32[$11 + 80 >> 2]; + $6 = HEAP32[$11 + 84 >> 2]; + $3 = HEAP32[$11 + 88 >> 2]; + $1 = HEAP32[$11 + 92 >> 2]; + } + $2 = $3; + $10 = $1 << 3 | $2 >>> 29; + $7 = $2 << 3 | $6 >>> 29; + $8 = $10 | 524288; + $1 = $13; + $3 = $9 << 3 | $1 >>> 29; + $4 = $1 << 3 | $14 >>> 29; + $13 = $3; + $10 = $16 ^ $18; + $1 = $5; + $9 = $6 << 3 | $1 >>> 29; + $1 = $1 << 3; + $2 = $9; + $5 = $12 - $17 | 0; + $3 = $1; + label$11 : { + if (!$5) { + break label$11 + } + if ($5 >>> 0 > 127) { + $7 = 0; + $8 = 0; + $9 = 0; + $3 = 1; + break label$11; + } + __ashlti3($11 - -64 | 0, $1, $2, $7, $8, 128 - $5 | 0); + __lshrti3($11 + 48 | 0, $1, $2, $7, $8, $5); + $7 = HEAP32[$11 + 56 >> 2]; + $8 = HEAP32[$11 + 60 >> 2]; + $9 = HEAP32[$11 + 52 >> 2]; + $3 = HEAP32[$11 + 48 >> 2] | ((HEAP32[$11 + 64 >> 2] | HEAP32[$11 + 72 >> 2]) != 0 | (HEAP32[$11 + 68 >> 2] | HEAP32[$11 + 76 >> 2]) != 0); + } + $6 = $9; + $13 = $13 | 524288; + $1 = $15; + $9 = $14 << 3 | $1 >>> 29; + $2 = $1 << 3; + label$13 : { + if (($10 | 0) < -1 ? 1 : ($10 | 0) <= -1 ? 1 : 0) { + $14 = $3; + $1 = $2 - $3 | 0; + $15 = $4 - $7 | 0; + $3 = ($6 | 0) == ($9 | 0) & $2 >>> 0 < $3 >>> 0 | $9 >>> 0 < $6 >>> 0; + $5 = $15 - $3 | 0; + $2 = $9 - (($2 >>> 0 < $14 >>> 0) + $6 | 0) | 0; + $6 = ($13 - (($4 >>> 0 < $7 >>> 0) + $8 | 0) | 0) - ($15 >>> 0 < $3 >>> 0) | 0; + if (!($1 | $5 | ($2 | $6))) { + $5 = 0; + $6 = 0; + $7 = 0; + $8 = 0; + break label$1; + } + if ($6 >>> 0 > 524287) { + break label$13 + } + $7 = $1; + $3 = !($5 | $6); + $4 = $3 << 6; + $8 = Math_clz32($3 ? $1 : $5) + 32 | 0; + $1 = Math_clz32($3 ? $2 : $6); + $1 = $4 + (($1 | 0) == 32 ? $8 : $1) | 0; + $1 = $1 + -12 | 0; + __ashlti3($11 + 32 | 0, $7, $2, $5, $6, $1); + $12 = $12 - $1 | 0; + $5 = HEAP32[$11 + 40 >> 2]; + $6 = HEAP32[$11 + 44 >> 2]; + $1 = HEAP32[$11 + 32 >> 2]; + $2 = HEAP32[$11 + 36 >> 2]; + break label$13; + } + $10 = $6 + $9 | 0; + $1 = $3; + $2 = $1 + $2 | 0; + if ($2 >>> 0 < $1 >>> 0) { + $10 = $10 + 1 | 0 + } + $1 = $2; + $2 = $10; + $6 = ($6 | 0) == ($2 | 0) & $1 >>> 0 < $3 >>> 0 | $2 >>> 0 < $6 >>> 0; + $10 = $8 + $13 | 0; + $3 = $4 + $7 | 0; + if ($3 >>> 0 < $4 >>> 0) { + $10 = $10 + 1 | 0 + } + $5 = $3; + $4 = $6 + $3 | 0; + $3 = $10; + $3 = $4 >>> 0 < $5 >>> 0 ? $3 + 1 | 0 : $3; + $5 = $4; + $6 = $3; + if (!($3 & 1048576)) { + break label$13 + } + $1 = $1 & 1 | (($2 & 1) << 31 | $1 >>> 1); + $2 = $5 << 31 | $2 >>> 1; + $12 = $12 + 1 | 0; + $5 = ($6 & 1) << 31 | $5 >>> 1; + $6 = $6 >>> 1 | 0; + } + $7 = 0; + $9 = $16 & -2147483648; + if (($12 | 0) >= 32767) { + $8 = $9 | 2147418112; + $5 = 0; + $6 = 0; + break label$1; + } + $4 = 0; + label$17 : { + if (($12 | 0) > 0) { + $4 = $12; + break label$17; + } + __ashlti3($11 + 16 | 0, $1, $2, $5, $6, $12 + 127 | 0); + __lshrti3($11, $1, $2, $5, $6, 1 - $12 | 0); + $1 = HEAP32[$11 >> 2] | ((HEAP32[$11 + 16 >> 2] | HEAP32[$11 + 24 >> 2]) != 0 | (HEAP32[$11 + 20 >> 2] | HEAP32[$11 + 28 >> 2]) != 0); + $2 = HEAP32[$11 + 4 >> 2]; + $5 = HEAP32[$11 + 8 >> 2]; + $6 = HEAP32[$11 + 12 >> 2]; + } + $7 = $7 | (($6 & 7) << 29 | $5 >>> 3); + $4 = $9 | $6 >>> 3 & 65535 | $4 << 16; + $9 = $5 << 29; + $3 = 0; + $5 = $9; + $6 = ($2 & 7) << 29 | $1 >>> 3 | $3; + $9 = $4; + $3 = $2 >>> 3 | $5; + $10 = $3; + $4 = $1 & 7; + $1 = $4 >>> 0 > 4; + $2 = $1 + $6 | 0; + if ($2 >>> 0 < $1 >>> 0) { + $10 = $10 + 1 | 0 + } + $1 = $2; + $2 = $10; + $3 = ($3 | 0) == ($2 | 0) & $1 >>> 0 < $6 >>> 0 | $2 >>> 0 < $3 >>> 0; + $5 = $3 + $7 | 0; + if ($5 >>> 0 < $3 >>> 0) { + $9 = $9 + 1 | 0 + } + $4 = ($4 | 0) == 4; + $3 = $4 ? $1 & 1 : 0; + $8 = $9; + $7 = $5; + $4 = 0; + $9 = $2 + $4 | 0; + $2 = $1 + $3 | 0; + if ($2 >>> 0 < $1 >>> 0) { + $9 = $9 + 1 | 0 + } + $5 = $2; + $1 = $2; + $6 = $9; + $1 = ($4 | 0) == ($9 | 0) & $1 >>> 0 < $3 >>> 0 | $9 >>> 0 < $4 >>> 0; + $2 = $7 + $1 | 0; + if ($2 >>> 0 < $1 >>> 0) { + $8 = $8 + 1 | 0 + } + $7 = $2; + } + HEAP32[$0 >> 2] = $5; + HEAP32[$0 + 4 >> 2] = $6; + HEAP32[$0 + 8 >> 2] = $7; + HEAP32[$0 + 12 >> 2] = $8; + global$0 = $11 + 112 | 0; + } + + function __extenddftf2($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + $5 = global$0 - 16 | 0; + global$0 = $5; + wasm2js_scratch_store_f64(+$1); + $8 = wasm2js_scratch_load_i32(1) | 0; + $6 = wasm2js_scratch_load_i32(0) | 0; + $7 = $8 & 2147483647; + $2 = $7; + $4 = $2 + -1048576 | 0; + $3 = $6; + if ($3 >>> 0 < 0) { + $4 = $4 + 1 | 0 + } + label$1 : { + if (($4 | 0) == 2145386495 | $4 >>> 0 < 2145386495) { + $7 = $3 << 28; + $4 = ($2 & 15) << 28 | $3 >>> 4; + $2 = ($2 >>> 4 | 0) + 1006632960 | 0; + $3 = $4; + $2 = $3 >>> 0 < 0 ? $2 + 1 | 0 : $2; + break label$1; + } + if (($2 | 0) == 2146435072 & $3 >>> 0 >= 0 | $2 >>> 0 > 2146435072) { + $7 = $6 << 28; + $4 = $6; + $2 = $8; + $6 = $2 >>> 4 | 0; + $3 = ($2 & 15) << 28 | $4 >>> 4; + $2 = $6 | 2147418112; + break label$1; + } + if (!($2 | $3)) { + $7 = 0; + $3 = 0; + $2 = 0; + break label$1; + } + $4 = $2; + $2 = ($2 | 0) == 1 & $3 >>> 0 < 0 | $2 >>> 0 < 1 ? Math_clz32($6) + 32 | 0 : Math_clz32($2); + __ashlti3($5, $3, $4, 0, 0, $2 + 49 | 0); + $9 = HEAP32[$5 >> 2]; + $7 = HEAP32[$5 + 4 >> 2]; + $3 = HEAP32[$5 + 8 >> 2]; + $2 = HEAP32[$5 + 12 >> 2] ^ 65536 | 15372 - $2 << 16; + } + HEAP32[$0 >> 2] = $9; + HEAP32[$0 + 4 >> 2] = $7; + HEAP32[$0 + 8 >> 2] = $3; + HEAP32[$0 + 12 >> 2] = $8 & -2147483648 | $2; + global$0 = $5 + 16 | 0; + } + + function __letf2($0, $1, $2, $3, $4, $5, $6, $7) { + var $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0; + $9 = 1; + $8 = $3 & 2147483647; + $12 = $8; + $10 = $2; + label$1 : { + if (!$2 & ($8 | 0) == 2147418112 ? $0 | $1 : ($8 | 0) == 2147418112 & $2 >>> 0 > 0 | $8 >>> 0 > 2147418112) { + break label$1 + } + $11 = $7 & 2147483647; + $13 = $11; + $8 = $6; + if (!$6 & ($11 | 0) == 2147418112 ? $4 | $5 : ($11 | 0) == 2147418112 & $6 >>> 0 > 0 | $11 >>> 0 > 2147418112) { + break label$1 + } + if (!($0 | $4 | ($8 | $10) | ($1 | $5 | ($12 | $13)))) { + return 0 + } + $10 = $3 & $7; + if (($10 | 0) > 0 ? 1 : ($10 | 0) >= 0 ? (($2 & $6) >>> 0 < 0 ? 0 : 1) : 0) { + $9 = -1; + if (($2 | 0) == ($6 | 0) & ($3 | 0) == ($7 | 0) ? ($1 | 0) == ($5 | 0) & $0 >>> 0 < $4 >>> 0 | $1 >>> 0 < $5 >>> 0 : ($3 | 0) < ($7 | 0) ? 1 : ($3 | 0) <= ($7 | 0) ? ($2 >>> 0 >= $6 >>> 0 ? 0 : 1) : 0) { + break label$1 + } + return ($0 ^ $4 | $2 ^ $6) != 0 | ($1 ^ $5 | $3 ^ $7) != 0; + } + $9 = -1; + if (($2 | 0) == ($6 | 0) & ($3 | 0) == ($7 | 0) ? ($1 | 0) == ($5 | 0) & $0 >>> 0 > $4 >>> 0 | $1 >>> 0 > $5 >>> 0 : ($3 | 0) > ($7 | 0) ? 1 : ($3 | 0) >= ($7 | 0) ? ($2 >>> 0 <= $6 >>> 0 ? 0 : 1) : 0) { + break label$1 + } + $9 = ($0 ^ $4 | $2 ^ $6) != 0 | ($1 ^ $5 | $3 ^ $7) != 0; + } + return $9; + } + + function __getf2($0, $1, $2, $3, $4) { + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + $7 = -1; + $5 = $3 & 2147483647; + $8 = $5; + $6 = $2; + label$1 : { + if (!$2 & ($5 | 0) == 2147418112 ? $0 | $1 : ($5 | 0) == 2147418112 & $2 >>> 0 > 0 | $5 >>> 0 > 2147418112) { + break label$1 + } + $5 = $4 & 2147483647; + $9 = $5; + if (($5 | 0) == 2147418112 ? 0 : $5 >>> 0 > 2147418112) { + break label$1 + } + if (!($0 | $6 | ($1 | ($8 | $9)))) { + return 0 + } + $6 = $3 & $4; + if (($6 | 0) > 0 ? 1 : ($6 | 0) >= 0 ? 1 : 0) { + if (!$2 & ($3 | 0) == ($4 | 0) ? !$1 & $0 >>> 0 < 0 | $1 >>> 0 < 0 : ($3 | 0) < ($4 | 0) ? 1 : ($3 | 0) <= ($4 | 0) ? ($2 >>> 0 >= 0 ? 0 : 1) : 0) { + break label$1 + } + return ($0 | $2) != 0 | ($1 | $3 ^ $4) != 0; + } + if (!$2 & ($3 | 0) == ($4 | 0) ? !$1 & $0 >>> 0 > 0 | $1 >>> 0 > 0 : ($3 | 0) > ($4 | 0) ? 1 : ($3 | 0) >= ($4 | 0) ? ($2 >>> 0 <= 0 ? 0 : 1) : 0) { + break label$1 + } + $7 = ($0 | $2) != 0 | ($1 | $3 ^ $4) != 0; + } + return $7; + } + + function copysignl($0, $1, $2, $3, $4, $5, $6, $7, $8) { + HEAP32[$0 >> 2] = $1; + HEAP32[$0 + 4 >> 2] = $2; + HEAP32[$0 + 8 >> 2] = $3; + HEAP32[$0 + 12 >> 2] = $4 & 65535 | ($8 >>> 16 & 32768 | $4 >>> 16 & 32767) << 16; + } + + function __floatunsitf($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + $2 = global$0 - 16 | 0; + global$0 = $2; + $6 = $0; + $7 = $0; + label$1 : { + if (!$1) { + $1 = 0; + $3 = 0; + break label$1; + } + $3 = $1; + $1 = Math_clz32($1) ^ 31; + __ashlti3($2, $3, 0, 0, 0, 112 - $1 | 0); + $1 = (HEAP32[$2 + 12 >> 2] ^ 65536) + ($1 + 16383 << 16) | 0; + $4 = 0 + HEAP32[$2 + 8 >> 2] | 0; + if ($4 >>> 0 < $5 >>> 0) { + $1 = $1 + 1 | 0 + } + $5 = HEAP32[$2 + 4 >> 2]; + $3 = HEAP32[$2 >> 2]; + } + HEAP32[$7 >> 2] = $3; + HEAP32[$6 + 4 >> 2] = $5; + HEAP32[$0 + 8 >> 2] = $4; + HEAP32[$0 + 12 >> 2] = $1; + global$0 = $2 + 16 | 0; + } + + function __subtf3($0, $1, $2, $3, $4, $5, $6, $7, $8) { + var $9 = 0; + $9 = global$0 - 16 | 0; + global$0 = $9; + __addtf3($9, $1, $2, $3, $4, $5, $6, $7, $8 ^ -2147483648); + $1 = HEAP32[$9 + 4 >> 2]; + HEAP32[$0 >> 2] = HEAP32[$9 >> 2]; + HEAP32[$0 + 4 >> 2] = $1; + $1 = HEAP32[$9 + 12 >> 2]; + HEAP32[$0 + 8 >> 2] = HEAP32[$9 + 8 >> 2]; + HEAP32[$0 + 12 >> 2] = $1; + global$0 = $9 + 16 | 0; + } + + function scalbnl($0, $1, $2, $3, $4, $5) { + var $6 = 0; + $6 = global$0 - 80 | 0; + global$0 = $6; + label$1 : { + if (($5 | 0) >= 16384) { + __multf3($6 + 32 | 0, $1, $2, $3, $4, 0, 0, 0, 2147352576); + $3 = HEAP32[$6 + 40 >> 2]; + $4 = HEAP32[$6 + 44 >> 2]; + $1 = HEAP32[$6 + 32 >> 2]; + $2 = HEAP32[$6 + 36 >> 2]; + if (($5 | 0) < 32767) { + $5 = $5 + -16383 | 0; + break label$1; + } + __multf3($6 + 16 | 0, $1, $2, $3, $4, 0, 0, 0, 2147352576); + $5 = (($5 | 0) < 49149 ? $5 : 49149) + -32766 | 0; + $3 = HEAP32[$6 + 24 >> 2]; + $4 = HEAP32[$6 + 28 >> 2]; + $1 = HEAP32[$6 + 16 >> 2]; + $2 = HEAP32[$6 + 20 >> 2]; + break label$1; + } + if (($5 | 0) > -16383) { + break label$1 + } + __multf3($6 - -64 | 0, $1, $2, $3, $4, 0, 0, 0, 65536); + $3 = HEAP32[$6 + 72 >> 2]; + $4 = HEAP32[$6 + 76 >> 2]; + $1 = HEAP32[$6 + 64 >> 2]; + $2 = HEAP32[$6 + 68 >> 2]; + if (($5 | 0) > -32765) { + $5 = $5 + 16382 | 0; + break label$1; + } + __multf3($6 + 48 | 0, $1, $2, $3, $4, 0, 0, 0, 65536); + $5 = (($5 | 0) > -49146 ? $5 : -49146) + 32764 | 0; + $3 = HEAP32[$6 + 56 >> 2]; + $4 = HEAP32[$6 + 60 >> 2]; + $1 = HEAP32[$6 + 48 >> 2]; + $2 = HEAP32[$6 + 52 >> 2]; + } + __multf3($6, $1, $2, $3, $4, 0, 0, 0, $5 + 16383 << 16); + $1 = HEAP32[$6 + 12 >> 2]; + HEAP32[$0 + 8 >> 2] = HEAP32[$6 + 8 >> 2]; + HEAP32[$0 + 12 >> 2] = $1; + $1 = HEAP32[$6 + 4 >> 2]; + HEAP32[$0 >> 2] = HEAP32[$6 >> 2]; + HEAP32[$0 + 4 >> 2] = $1; + global$0 = $6 + 80 | 0; + } + + function __multi3($0, $1, $2, $3, $4) { + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0; + $5 = __wasm_i64_mul($1, $2, 0, 0); + $6 = i64toi32_i32$HIGH_BITS; + $7 = __wasm_i64_mul(0, 0, $3, $4); + $5 = $5 + $7 | 0; + $6 = i64toi32_i32$HIGH_BITS + $6 | 0; + $9 = __wasm_i64_mul($4, 0, $2, 0); + $8 = $5 + $9 | 0; + $5 = i64toi32_i32$HIGH_BITS + ($5 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6) | 0; + $6 = __wasm_i64_mul($3, 0, $1, 0); + $10 = i64toi32_i32$HIGH_BITS; + $7 = __wasm_i64_mul($2, 0, $3, 0); + $3 = $10 + $7 | 0; + $2 = $8 >>> 0 < $9 >>> 0 ? $5 + 1 | 0 : $5; + $5 = i64toi32_i32$HIGH_BITS; + $5 = $3 >>> 0 < $7 >>> 0 ? $5 + 1 | 0 : $5; + $8 = $5 + $8 | 0; + if ($8 >>> 0 < $5 >>> 0) { + $2 = $2 + 1 | 0 + } + $1 = __wasm_i64_mul($1, 0, $4, 0) + $3 | 0; + $4 = i64toi32_i32$HIGH_BITS; + $3 = $1 >>> 0 < $3 >>> 0 ? $4 + 1 | 0 : $4; + $4 = $8 + $3 | 0; + if ($4 >>> 0 < $3 >>> 0) { + $2 = $2 + 1 | 0 + } + HEAP32[$0 + 8 >> 2] = $4; + HEAP32[$0 + 12 >> 2] = $2; + HEAP32[$0 >> 2] = $6; + HEAP32[$0 + 4 >> 2] = $1; + } + + function __divtf3($0, $1, $2, $3, $4, $5, $6, $7, $8) { + var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0; + $13 = global$0 - 192 | 0; + global$0 = $13; + $29 = $7; + $32 = $8 & 65535; + $16 = $3; + $14 = $4 & 65535; + $28 = ($4 ^ $8) & -2147483648; + $17 = $8 >>> 16 & 32767; + label$1 : { + $19 = $4 >>> 16 & 32767; + label$2 : { + label$3 : { + if ($19 + -1 >>> 0 <= 32765) { + if ($17 + -1 >>> 0 < 32766) { + break label$3 + } + } + $10 = $4 & 2147483647; + $11 = $10; + $9 = $3; + if (!(!$9 & ($10 | 0) == 2147418112 ? !($1 | $2) : ($10 | 0) == 2147418112 & $9 >>> 0 < 0 | $10 >>> 0 < 2147418112)) { + $33 = $3; + $28 = $4 | 32768; + break label$2; + } + $10 = $8 & 2147483647; + $4 = $10; + $3 = $7; + if (!(!$3 & ($10 | 0) == 2147418112 ? !($5 | $6) : ($10 | 0) == 2147418112 & $3 >>> 0 < 0 | $10 >>> 0 < 2147418112)) { + $33 = $7; + $28 = $8 | 32768; + $1 = $5; + $2 = $6; + break label$2; + } + if (!($1 | $9 | ($11 ^ 2147418112 | $2))) { + if (!($3 | $5 | ($4 ^ 2147418112 | $6))) { + $1 = 0; + $2 = 0; + $28 = 2147450880; + break label$2; + } + $28 = $28 | 2147418112; + $1 = 0; + $2 = 0; + break label$2; + } + if (!($3 | $5 | ($4 ^ 2147418112 | $6))) { + $1 = 0; + $2 = 0; + break label$2; + } + if (!($1 | $9 | ($2 | $11))) { + break label$1 + } + if (!($3 | $5 | ($4 | $6))) { + $28 = $28 | 2147418112; + $1 = 0; + $2 = 0; + break label$2; + } + $10 = 0; + if (($11 | 0) == 65535 | $11 >>> 0 < 65535) { + $8 = $1; + $3 = !($14 | $16); + $7 = $3 << 6; + $9 = Math_clz32($3 ? $1 : $16) + 32 | 0; + $1 = Math_clz32($3 ? $2 : $14); + $1 = $7 + (($1 | 0) == 32 ? $9 : $1) | 0; + __ashlti3($13 + 176 | 0, $8, $2, $16, $14, $1 + -15 | 0); + $10 = 16 - $1 | 0; + $16 = HEAP32[$13 + 184 >> 2]; + $14 = HEAP32[$13 + 188 >> 2]; + $2 = HEAP32[$13 + 180 >> 2]; + $1 = HEAP32[$13 + 176 >> 2]; + } + if ($4 >>> 0 > 65535) { + break label$3 + } + $3 = !($29 | $32); + $4 = $3 << 6; + $7 = Math_clz32($3 ? $5 : $29) + 32 | 0; + $3 = Math_clz32($3 ? $6 : $32); + $3 = $4 + (($3 | 0) == 32 ? $7 : $3) | 0; + __ashlti3($13 + 160 | 0, $5, $6, $29, $32, $3 + -15 | 0); + $10 = ($3 + $10 | 0) + -16 | 0; + $29 = HEAP32[$13 + 168 >> 2]; + $32 = HEAP32[$13 + 172 >> 2]; + $5 = HEAP32[$13 + 160 >> 2]; + $6 = HEAP32[$13 + 164 >> 2]; + } + $4 = $32 | 65536; + $31 = $4; + $38 = $29; + $3 = $29; + $12 = $4 << 15 | $3 >>> 17; + $3 = $3 << 15 | $6 >>> 17; + $7 = -102865788 - $3 | 0; + $4 = $12; + $9 = $4; + $8 = 1963258675 - ($9 + (4192101508 < $3 >>> 0) | 0) | 0; + __multi3($13 + 144 | 0, $3, $9, $7, $8); + $9 = HEAP32[$13 + 152 >> 2]; + __multi3($13 + 128 | 0, 0 - $9 | 0, 0 - (HEAP32[$13 + 156 >> 2] + (0 < $9 >>> 0) | 0) | 0, $7, $8); + $7 = HEAP32[$13 + 136 >> 2]; + $8 = $7 << 1 | HEAP32[$13 + 132 >> 2] >>> 31; + $7 = HEAP32[$13 + 140 >> 2] << 1 | $7 >>> 31; + __multi3($13 + 112 | 0, $8, $7, $3, $4); + $9 = $7; + $7 = HEAP32[$13 + 120 >> 2]; + __multi3($13 + 96 | 0, $8, $9, 0 - $7 | 0, 0 - (HEAP32[$13 + 124 >> 2] + (0 < $7 >>> 0) | 0) | 0); + $7 = HEAP32[$13 + 104 >> 2]; + $11 = HEAP32[$13 + 108 >> 2] << 1 | $7 >>> 31; + $8 = $7 << 1 | HEAP32[$13 + 100 >> 2] >>> 31; + __multi3($13 + 80 | 0, $8, $11, $3, $4); + $7 = HEAP32[$13 + 88 >> 2]; + __multi3($13 - -64 | 0, $8, $11, 0 - $7 | 0, 0 - (HEAP32[$13 + 92 >> 2] + (0 < $7 >>> 0) | 0) | 0); + $7 = HEAP32[$13 + 72 >> 2]; + $8 = $7 << 1 | HEAP32[$13 + 68 >> 2] >>> 31; + $7 = HEAP32[$13 + 76 >> 2] << 1 | $7 >>> 31; + __multi3($13 + 48 | 0, $8, $7, $3, $4); + $9 = $7; + $7 = HEAP32[$13 + 56 >> 2]; + __multi3($13 + 32 | 0, $8, $9, 0 - $7 | 0, 0 - (HEAP32[$13 + 60 >> 2] + (0 < $7 >>> 0) | 0) | 0); + $7 = HEAP32[$13 + 40 >> 2]; + $11 = HEAP32[$13 + 44 >> 2] << 1 | $7 >>> 31; + $8 = $7 << 1 | HEAP32[$13 + 36 >> 2] >>> 31; + __multi3($13 + 16 | 0, $8, $11, $3, $4); + $7 = HEAP32[$13 + 24 >> 2]; + __multi3($13, $8, $11, 0 - $7 | 0, 0 - (HEAP32[$13 + 28 >> 2] + (0 < $7 >>> 0) | 0) | 0); + $34 = ($19 - $17 | 0) + $10 | 0; + $7 = HEAP32[$13 + 8 >> 2]; + $9 = HEAP32[$13 + 12 >> 2] << 1 | $7 >>> 31; + $8 = $7 << 1; + $10 = $9 + -1 | 0; + $8 = (HEAP32[$13 + 4 >> 2] >>> 31 | $8) + -1 | 0; + if (($8 | 0) != -1) { + $10 = $10 + 1 | 0 + } + $7 = $8; + $9 = 0; + $21 = $9; + $20 = $4; + $11 = 0; + $12 = __wasm_i64_mul($7, $9, $4, $11); + $4 = i64toi32_i32$HIGH_BITS; + $19 = $4; + $22 = $10; + $17 = 0; + $9 = $3; + $7 = __wasm_i64_mul($10, $17, $9, 0); + $3 = $7 + $12 | 0; + $10 = i64toi32_i32$HIGH_BITS + $4 | 0; + $10 = $3 >>> 0 < $7 >>> 0 ? $10 + 1 | 0 : $10; + $7 = $3; + $3 = $10; + $15 = __wasm_i64_mul($8, $21, $9, $15); + $4 = 0 + $15 | 0; + $10 = $7; + $9 = $10 + i64toi32_i32$HIGH_BITS | 0; + $9 = $4 >>> 0 < $15 >>> 0 ? $9 + 1 | 0 : $9; + $15 = $4; + $4 = $9; + $9 = ($10 | 0) == ($9 | 0) & $15 >>> 0 < $23 >>> 0 | $9 >>> 0 < $10 >>> 0; + $10 = ($3 | 0) == ($19 | 0) & $10 >>> 0 < $12 >>> 0 | $3 >>> 0 < $19 >>> 0; + $7 = $3; + $3 = __wasm_i64_mul($22, $17, $20, $11) + $3 | 0; + $11 = $10 + i64toi32_i32$HIGH_BITS | 0; + $11 = $3 >>> 0 < $7 >>> 0 ? $11 + 1 | 0 : $11; + $7 = $3; + $3 = $9 + $3 | 0; + $9 = $11; + $26 = $3; + $7 = $3 >>> 0 < $7 >>> 0 ? $9 + 1 | 0 : $9; + $3 = $6; + $24 = ($3 & 131071) << 15 | $5 >>> 17; + $20 = __wasm_i64_mul($8, $21, $24, 0); + $3 = i64toi32_i32$HIGH_BITS; + $23 = $3; + $10 = $5; + $18 = $10 << 15 & -32768; + $11 = __wasm_i64_mul($22, $17, $18, 0); + $9 = $11 + $20 | 0; + $10 = i64toi32_i32$HIGH_BITS + $3 | 0; + $10 = $9 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10; + $3 = $10; + $25 = __wasm_i64_mul($8, $21, $18, $25); + $18 = 0 + $25 | 0; + $10 = $9 + i64toi32_i32$HIGH_BITS | 0; + $10 = $18 >>> 0 < $25 >>> 0 ? $10 + 1 | 0 : $10; + $10 = ($9 | 0) == ($10 | 0) & $18 >>> 0 < $30 >>> 0 | $10 >>> 0 < $9 >>> 0; + $9 = ($3 | 0) == ($23 | 0) & $9 >>> 0 < $20 >>> 0 | $3 >>> 0 < $23 >>> 0; + $12 = $3; + $3 = __wasm_i64_mul($22, $17, $24, $27) + $3 | 0; + $11 = $9 + i64toi32_i32$HIGH_BITS | 0; + $11 = $3 >>> 0 < $12 >>> 0 ? $11 + 1 | 0 : $11; + $9 = $3; + $3 = $10 + $9 | 0; + $12 = $3 >>> 0 < $9 >>> 0 ? $11 + 1 | 0 : $11; + $10 = $3; + $3 = $15 + $3 | 0; + $9 = $12 + $4 | 0; + $9 = $3 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9; + $19 = $3; + $10 = $7; + $20 = $9; + $3 = ($4 | 0) == ($9 | 0) & $3 >>> 0 < $15 >>> 0 | $9 >>> 0 < $4 >>> 0; + $4 = $3 + $26 | 0; + if ($4 >>> 0 < $3 >>> 0) { + $10 = $10 + 1 | 0 + } + $9 = $10; + $3 = ($19 | 0) != 0 | ($20 | 0) != 0; + $4 = $4 + $3 | 0; + if ($4 >>> 0 < $3 >>> 0) { + $9 = $9 + 1 | 0 + } + $10 = $4; + $4 = 0 - $10 | 0; + $15 = 0; + $7 = __wasm_i64_mul($4, $15, $8, $21); + $3 = i64toi32_i32$HIGH_BITS; + $23 = $3; + $18 = __wasm_i64_mul($22, $17, $4, $15); + $4 = i64toi32_i32$HIGH_BITS; + $26 = $4; + $24 = 0 - ((0 < $10 >>> 0) + $9 | 0) | 0; + $9 = 0; + $15 = __wasm_i64_mul($8, $21, $24, $9); + $12 = $15 + $18 | 0; + $10 = i64toi32_i32$HIGH_BITS + $4 | 0; + $10 = $12 >>> 0 < $15 >>> 0 ? $10 + 1 | 0 : $10; + $4 = $12; + $15 = 0 + $7 | 0; + $11 = $3 + $4 | 0; + $11 = $15 >>> 0 < $27 >>> 0 ? $11 + 1 | 0 : $11; + $12 = $15; + $3 = $11; + $11 = ($23 | 0) == ($3 | 0) & $12 >>> 0 < $7 >>> 0 | $3 >>> 0 < $23 >>> 0; + $12 = ($10 | 0) == ($26 | 0) & $4 >>> 0 < $18 >>> 0 | $10 >>> 0 < $26 >>> 0; + $4 = __wasm_i64_mul($22, $17, $24, $9) + $10 | 0; + $9 = $12 + i64toi32_i32$HIGH_BITS | 0; + $9 = $4 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9; + $7 = $4; + $4 = $11 + $4 | 0; + if ($4 >>> 0 < $7 >>> 0) { + $9 = $9 + 1 | 0 + } + $24 = $4; + $7 = $9; + $4 = 0 - $19 | 0; + $27 = 0 - ((0 < $19 >>> 0) + $20 | 0) | 0; + $19 = 0; + $26 = __wasm_i64_mul($27, $19, $8, $21); + $18 = i64toi32_i32$HIGH_BITS; + $20 = $4; + $25 = 0; + $9 = __wasm_i64_mul($4, $25, $22, $17); + $4 = $9 + $26 | 0; + $10 = i64toi32_i32$HIGH_BITS + $18 | 0; + $11 = $4; + $4 = $4 >>> 0 < $9 >>> 0 ? $10 + 1 | 0 : $10; + $20 = __wasm_i64_mul($8, $21, $20, $25); + $8 = 0 + $20 | 0; + $9 = $11; + $10 = $9 + i64toi32_i32$HIGH_BITS | 0; + $10 = $8 >>> 0 < $20 >>> 0 ? $10 + 1 | 0 : $10; + $10 = ($9 | 0) == ($10 | 0) & $8 >>> 0 < $30 >>> 0 | $10 >>> 0 < $9 >>> 0; + $9 = ($4 | 0) == ($18 | 0) & $9 >>> 0 < $26 >>> 0 | $4 >>> 0 < $18 >>> 0; + $8 = $4; + $4 = __wasm_i64_mul($27, $19, $22, $17) + $4 | 0; + $12 = $9 + i64toi32_i32$HIGH_BITS | 0; + $12 = $4 >>> 0 < $8 >>> 0 ? $12 + 1 | 0 : $12; + $8 = $4; + $4 = $10 + $4 | 0; + $9 = $12; + $9 = $4 >>> 0 < $8 >>> 0 ? $9 + 1 | 0 : $9; + $8 = $4; + $4 = $15 + $4 | 0; + $9 = $9 + $3 | 0; + $9 = $4 >>> 0 < $8 >>> 0 ? $9 + 1 | 0 : $9; + $8 = $4; + $10 = $7; + $4 = $9; + $3 = ($3 | 0) == ($9 | 0) & $8 >>> 0 < $15 >>> 0 | $9 >>> 0 < $3 >>> 0; + $7 = $3 + $24 | 0; + if ($7 >>> 0 < $3 >>> 0) { + $10 = $10 + 1 | 0 + } + $3 = $7; + $9 = $10; + $12 = $3; + $11 = $4 + -1 | 0; + $3 = $8 + -2 | 0; + if ($3 >>> 0 < 4294967294) { + $11 = $11 + 1 | 0 + } + $7 = $3; + $10 = $3; + $3 = $11; + $4 = ($4 | 0) == ($3 | 0) & $10 >>> 0 < $8 >>> 0 | $3 >>> 0 < $4 >>> 0; + $8 = $12 + $4 | 0; + if ($8 >>> 0 < $4 >>> 0) { + $9 = $9 + 1 | 0 + } + $4 = $8 + -1 | 0; + $10 = $9 + -1 | 0; + $10 = ($4 | 0) != -1 ? $10 + 1 | 0 : $10; + $8 = 0; + $22 = $8; + $17 = $4; + $9 = $16; + $18 = $9 << 2 | $2 >>> 30; + $24 = 0; + $12 = __wasm_i64_mul($4, $8, $18, $24); + $8 = i64toi32_i32$HIGH_BITS; + $15 = $8; + $11 = $8; + $8 = $2; + $27 = ($8 & 1073741823) << 2 | $1 >>> 30; + $25 = $10; + $8 = 0; + $9 = __wasm_i64_mul($27, 0, $10, $8); + $4 = $9 + $12 | 0; + $11 = i64toi32_i32$HIGH_BITS + $11 | 0; + $11 = $4 >>> 0 < $9 >>> 0 ? $11 + 1 | 0 : $11; + $9 = $4; + $20 = $11; + $23 = ($15 | 0) == ($11 | 0) & $9 >>> 0 < $12 >>> 0 | $11 >>> 0 < $15 >>> 0; + $12 = $11; + $11 = 0; + $15 = $11; + $10 = 0; + $26 = $3; + $30 = (($14 & 1073741823) << 2 | $16 >>> 30) & -262145 | 262144; + $4 = __wasm_i64_mul($3, $11, $30, 0); + $3 = $4 + $9 | 0; + $12 = i64toi32_i32$HIGH_BITS + $12 | 0; + $12 = $3 >>> 0 < $4 >>> 0 ? $12 + 1 | 0 : $12; + $16 = $3; + $4 = $12; + $3 = ($20 | 0) == ($4 | 0) & $3 >>> 0 < $9 >>> 0 | $4 >>> 0 < $20 >>> 0; + $9 = $3 + $23 | 0; + if ($9 >>> 0 < $3 >>> 0) { + $10 = 1 + } + $11 = __wasm_i64_mul($25, $8, $30, $35); + $3 = $11 + $9 | 0; + $9 = i64toi32_i32$HIGH_BITS + $10 | 0; + $10 = $3 >>> 0 < $11 >>> 0 ? $9 + 1 | 0 : $9; + $11 = __wasm_i64_mul($17, $22, $30, $35); + $9 = i64toi32_i32$HIGH_BITS; + $2 = $3; + $14 = __wasm_i64_mul($18, $24, $25, $8); + $3 = $14 + $11 | 0; + $12 = i64toi32_i32$HIGH_BITS + $9 | 0; + $12 = $3 >>> 0 < $14 >>> 0 ? $12 + 1 | 0 : $12; + $14 = $3; + $3 = $12; + $12 = ($9 | 0) == ($3 | 0) & $14 >>> 0 < $11 >>> 0 | $3 >>> 0 < $9 >>> 0; + $11 = $2 + $3 | 0; + $10 = $10 + $12 | 0; + $9 = $11; + $12 = $9 >>> 0 < $3 >>> 0 ? $10 + 1 | 0 : $10; + $2 = $9; + $11 = $4 + $14 | 0; + $10 = 0; + $3 = $10 + $16 | 0; + if ($3 >>> 0 < $10 >>> 0) { + $11 = $11 + 1 | 0 + } + $14 = $3; + $9 = $3; + $3 = $11; + $4 = ($4 | 0) == ($3 | 0) & $9 >>> 0 < $16 >>> 0 | $3 >>> 0 < $4 >>> 0; + $9 = $2 + $4 | 0; + if ($9 >>> 0 < $4 >>> 0) { + $12 = $12 + 1 | 0 + } + $39 = $9; + $4 = $14; + $10 = $3; + $16 = __wasm_i64_mul($27, $19, $26, $15); + $11 = i64toi32_i32$HIGH_BITS; + $20 = $7; + $23 = __wasm_i64_mul($7, 0, $18, $24); + $7 = $23 + $16 | 0; + $9 = i64toi32_i32$HIGH_BITS + $11 | 0; + $9 = $7 >>> 0 < $23 >>> 0 ? $9 + 1 | 0 : $9; + $21 = $7; + $7 = $9; + $16 = ($11 | 0) == ($9 | 0) & $21 >>> 0 < $16 >>> 0 | $9 >>> 0 < $11 >>> 0; + $11 = $9; + $40 = $4; + $9 = 0; + $41 = $16; + $36 = $1 << 2 & -4; + $2 = 0; + $16 = __wasm_i64_mul($17, $22, $36, $2); + $4 = $16 + $21 | 0; + $11 = i64toi32_i32$HIGH_BITS + $11 | 0; + $11 = $4 >>> 0 < $16 >>> 0 ? $11 + 1 | 0 : $11; + $23 = $4; + $16 = $4; + $4 = $11; + $7 = ($7 | 0) == ($4 | 0) & $16 >>> 0 < $21 >>> 0 | $4 >>> 0 < $7 >>> 0; + $11 = $41 + $7 | 0; + if ($11 >>> 0 < $7 >>> 0) { + $9 = 1 + } + $7 = $40 + $11 | 0; + $10 = $9 + $10 | 0; + $10 = $7 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10; + $16 = $7; + $11 = $12; + $7 = $10; + $3 = ($3 | 0) == ($10 | 0) & $16 >>> 0 < $14 >>> 0 | $10 >>> 0 < $3 >>> 0; + $9 = $3 + $39 | 0; + if ($9 >>> 0 < $3 >>> 0) { + $11 = $11 + 1 | 0 + } + $40 = $9; + $14 = $16; + $21 = $7; + $39 = __wasm_i64_mul($25, $8, $36, $2); + $25 = i64toi32_i32$HIGH_BITS; + $8 = __wasm_i64_mul($30, $35, $20, $37); + $3 = $8 + $39 | 0; + $12 = i64toi32_i32$HIGH_BITS + $25 | 0; + $12 = $3 >>> 0 < $8 >>> 0 ? $12 + 1 | 0 : $12; + $30 = $3; + $9 = __wasm_i64_mul($18, $24, $26, $15); + $3 = $3 + $9 | 0; + $8 = $12; + $10 = $8 + i64toi32_i32$HIGH_BITS | 0; + $10 = $3 >>> 0 < $9 >>> 0 ? $10 + 1 | 0 : $10; + $18 = $3; + $12 = __wasm_i64_mul($17, $22, $27, $19); + $3 = $3 + $12 | 0; + $9 = i64toi32_i32$HIGH_BITS + $10 | 0; + $17 = $3; + $9 = $3 >>> 0 < $12 >>> 0 ? $9 + 1 | 0 : $9; + $22 = 0; + $12 = $11; + $3 = $9; + $9 = ($9 | 0) == ($10 | 0) & $17 >>> 0 < $18 >>> 0 | $9 >>> 0 < $10 >>> 0; + $11 = ($8 | 0) == ($25 | 0) & $30 >>> 0 < $39 >>> 0 | $8 >>> 0 < $25 >>> 0; + $8 = ($8 | 0) == ($10 | 0) & $18 >>> 0 < $30 >>> 0 | $10 >>> 0 < $8 >>> 0; + $10 = $11 + $8 | 0; + $10 >>> 0 < $8 >>> 0; + $8 = $9 + $10 | 0; + $10 = $8; + $9 = $3 | 0; + $8 = $9 + $14 | 0; + $10 = ($10 | $22) + $21 | 0; + $10 = $8 >>> 0 < $9 >>> 0 ? $10 + 1 | 0 : $10; + $21 = $8; + $14 = $10; + $7 = ($7 | 0) == ($10 | 0) & $8 >>> 0 < $16 >>> 0 | $10 >>> 0 < $7 >>> 0; + $8 = $7 + $40 | 0; + if ($8 >>> 0 < $7 >>> 0) { + $12 = $12 + 1 | 0 + } + $24 = $8; + $8 = $12; + $12 = $21; + $16 = $14; + $22 = $23; + $26 = __wasm_i64_mul($26, $15, $36, $2); + $15 = i64toi32_i32$HIGH_BITS; + $9 = __wasm_i64_mul($27, $19, $20, $37); + $7 = $9 + $26 | 0; + $11 = i64toi32_i32$HIGH_BITS + $15 | 0; + $11 = $7 >>> 0 < $9 >>> 0 ? $11 + 1 | 0 : $11; + $10 = $11; + $19 = $10; + $11 = 0; + $9 = ($10 | 0) == ($15 | 0) & $7 >>> 0 < $26 >>> 0 | $10 >>> 0 < $15 >>> 0; + $7 = $10 + $22 | 0; + $10 = ($9 | $11) + $4 | 0; + $10 = $7 >>> 0 < $19 >>> 0 ? $10 + 1 | 0 : $10; + $19 = $7; + $9 = $7; + $7 = $10; + $9 = ($4 | 0) == ($10 | 0) & $9 >>> 0 < $22 >>> 0 | $10 >>> 0 < $4 >>> 0; + $23 = $12; + $4 = $9; + $9 = $10 + $17 | 0; + $12 = 0; + $3 = $12 + $19 | 0; + if ($3 >>> 0 < $12 >>> 0) { + $9 = $9 + 1 | 0 + } + $3 = ($7 | 0) == ($9 | 0) & $3 >>> 0 < $19 >>> 0 | $9 >>> 0 < $7 >>> 0; + $4 = $4 + $3 | 0; + if ($4 >>> 0 < $3 >>> 0) { + $11 = 1 + } + $3 = $23 + $4 | 0; + $12 = $11 + $16 | 0; + $7 = $3; + $9 = $8; + $12 = $3 >>> 0 < $4 >>> 0 ? $12 + 1 | 0 : $12; + $8 = $12; + $3 = ($14 | 0) == ($8 | 0) & $3 >>> 0 < $21 >>> 0 | $8 >>> 0 < $14 >>> 0; + $4 = $3 + $24 | 0; + if ($4 >>> 0 < $3 >>> 0) { + $9 = $9 + 1 | 0 + } + $3 = $4; + $4 = $9; + label$12 : { + if (($9 | 0) == 131071 | $9 >>> 0 < 131071) { + $22 = 0; + $14 = $5; + $18 = 0; + $10 = __wasm_i64_mul($7, $22, $14, $18); + $11 = i64toi32_i32$HIGH_BITS; + $9 = $1 << 17; + $1 = 0; + $2 = ($10 | 0) != 0 | ($11 | 0) != 0; + $16 = $1 - $2 | 0; + $30 = $9 - ($1 >>> 0 < $2 >>> 0) | 0; + $19 = 0 - $10 | 0; + $15 = 0 - ((0 < $10 >>> 0) + $11 | 0) | 0; + $2 = 0; + $24 = __wasm_i64_mul($8, $2, $14, $18); + $1 = i64toi32_i32$HIGH_BITS; + $27 = $1; + $17 = 0; + $10 = __wasm_i64_mul($7, $22, $6, $17); + $9 = $10 + $24 | 0; + $11 = i64toi32_i32$HIGH_BITS + $1 | 0; + $11 = $9 >>> 0 < $10 >>> 0 ? $11 + 1 | 0 : $11; + $1 = $9; + $10 = $9; + $20 = 0; + $9 = $20; + $23 = $10; + $9 = ($10 | 0) == ($15 | 0) & $19 >>> 0 < $9 >>> 0 | $15 >>> 0 < $10 >>> 0; + $21 = $16 - $9 | 0; + $30 = $30 - ($16 >>> 0 < $9 >>> 0) | 0; + $9 = __wasm_i64_mul($3, 0, $14, $18); + $10 = i64toi32_i32$HIGH_BITS; + $14 = __wasm_i64_mul($7, $22, $29, 0); + $9 = $14 + $9 | 0; + $12 = i64toi32_i32$HIGH_BITS + $10 | 0; + $12 = $9 >>> 0 < $14 >>> 0 ? $12 + 1 | 0 : $12; + $14 = __wasm_i64_mul($8, $2, $6, $17); + $9 = $14 + $9 | 0; + $10 = i64toi32_i32$HIGH_BITS + $12 | 0; + $10 = $9 >>> 0 < $14 >>> 0 ? $10 + 1 | 0 : $10; + $12 = $10; + $10 = ($11 | 0) == ($27 | 0) & $1 >>> 0 < $24 >>> 0 | $11 >>> 0 < $27 >>> 0; + $1 = $11 + $9 | 0; + $10 = $10 + $12 | 0; + $10 = $1 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10; + $11 = $1; + $1 = $10; + $9 = __wasm_i64_mul($7, $8, $31, 0); + $14 = i64toi32_i32$HIGH_BITS; + $16 = $11; + $11 = __wasm_i64_mul($5, $6, $4, 0); + $10 = $11 + $9 | 0; + $9 = i64toi32_i32$HIGH_BITS + $14 | 0; + $9 = $10 >>> 0 < $11 >>> 0 ? $9 + 1 | 0 : $9; + $12 = __wasm_i64_mul($3, $4, $6, $17); + $11 = $12 + $10 | 0; + $9 = __wasm_i64_mul($8, $2, $29, $32); + $2 = $9 + $11 | 0; + $9 = $2; + $10 = 0; + $2 = $16 + $10 | 0; + $9 = $1 + $9 | 0; + $1 = $2; + $16 = $21 - $1 | 0; + $2 = $30 - (($21 >>> 0 < $1 >>> 0) + ($1 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9) | 0) | 0; + $34 = $34 + -1 | 0; + $29 = $19 - $20 | 0; + $1 = $15 - (($19 >>> 0 < $20 >>> 0) + $23 | 0) | 0; + break label$12; + } + $17 = $8 >>> 1 | 0; + $11 = 0; + $12 = $1 << 16; + $10 = $3 << 31; + $7 = ($8 & 1) << 31 | $7 >>> 1; + $8 = $8 >>> 1 | $10; + $27 = 0; + $25 = 0; + $1 = __wasm_i64_mul($7, $27, $5, $25); + $9 = i64toi32_i32$HIGH_BITS; + $10 = $9; + $9 = ($1 | 0) != 0 | ($9 | 0) != 0; + $14 = $2 - $9 | 0; + $37 = $12 - ($2 >>> 0 < $9 >>> 0) | 0; + $21 = 0 - $1 | 0; + $22 = 0 - ((0 < $1 >>> 0) + $10 | 0) | 0; + $12 = $22; + $15 = 0; + $20 = __wasm_i64_mul($7, $27, $6, $15); + $1 = i64toi32_i32$HIGH_BITS; + $35 = $1; + $23 = $17 | $3 << 31; + $36 = $4 << 31 | $3 >>> 1 | $11; + $10 = $23; + $17 = __wasm_i64_mul($10, 0, $5, $25); + $2 = $17 + $20 | 0; + $9 = i64toi32_i32$HIGH_BITS + $1 | 0; + $9 = $2 >>> 0 < $17 >>> 0 ? $9 + 1 | 0 : $9; + $1 = $9; + $9 = $2; + $26 = $9; + $18 = 0; + $9 = ($9 | 0) == ($12 | 0) & $21 >>> 0 < $18 >>> 0 | $12 >>> 0 < $9 >>> 0; + $24 = $14 - $9 | 0; + $37 = $37 - ($14 >>> 0 < $9 >>> 0) | 0; + $10 = __wasm_i64_mul($6, $15, $10, $11); + $11 = i64toi32_i32$HIGH_BITS; + $9 = $4; + $12 = $9 >>> 1 | 0; + $17 = ($9 & 1) << 31 | $3 >>> 1; + $14 = $12; + $12 = __wasm_i64_mul($17, 0, $5, $25); + $9 = $12 + $10 | 0; + $10 = i64toi32_i32$HIGH_BITS + $11 | 0; + $10 = $9 >>> 0 < $12 >>> 0 ? $10 + 1 | 0 : $10; + $12 = __wasm_i64_mul($7, $27, $29, 0); + $11 = $12 + $9 | 0; + $9 = i64toi32_i32$HIGH_BITS + $10 | 0; + $10 = $11; + $11 = $10 >>> 0 < $12 >>> 0 ? $9 + 1 | 0 : $9; + $9 = ($1 | 0) == ($35 | 0) & $2 >>> 0 < $20 >>> 0 | $1 >>> 0 < $35 >>> 0; + $2 = $1; + $1 = $1 + $10 | 0; + $11 = $9 + $11 | 0; + $9 = $1; + $1 = $9 >>> 0 < $2 >>> 0 ? $11 + 1 | 0 : $11; + $2 = __wasm_i64_mul($7, $8, $31, 0); + $10 = i64toi32_i32$HIGH_BITS; + $11 = $9; + $3 = __wasm_i64_mul($5, $6, $4 >>> 1 | 0, 0); + $2 = $3 + $2 | 0; + $9 = i64toi32_i32$HIGH_BITS + $10 | 0; + $9 = $2 >>> 0 < $3 >>> 0 ? $9 + 1 | 0 : $9; + $3 = __wasm_i64_mul($6, $15, $17, $14); + $2 = $3 + $2 | 0; + $9 = i64toi32_i32$HIGH_BITS + $9 | 0; + $3 = __wasm_i64_mul($23, $36, $29, $32); + $2 = $3 + $2 | 0; + $9 = $2; + $3 = 0; + $2 = $11 + $3 | 0; + $10 = $1 + $9 | 0; + $1 = $2; + $16 = $24 - $1 | 0; + $2 = $37 - (($24 >>> 0 < $1 >>> 0) + ($1 >>> 0 < $3 >>> 0 ? $10 + 1 | 0 : $10) | 0) | 0; + $3 = $17; + $4 = $14; + $29 = $21 - $18 | 0; + $1 = $22 - (($21 >>> 0 < $18 >>> 0) + $26 | 0) | 0; + } + if (($34 | 0) >= 16384) { + $28 = $28 | 2147418112; + $1 = 0; + $2 = 0; + break label$2; + } + $11 = $34 + 16383 | 0; + if (($34 | 0) <= -16383) { + label$16 : { + if ($11) { + break label$16 + } + $11 = $8; + $14 = $29; + $12 = $1 << 1 | $14 >>> 31; + $9 = $14 << 1; + $6 = ($6 | 0) == ($12 | 0) & $9 >>> 0 > $5 >>> 0 | $12 >>> 0 > $6 >>> 0; + $9 = $4 & 65535; + $5 = $16; + $12 = $2 << 1 | $5 >>> 31; + $2 = $5 << 1 | $1 >>> 31; + $4 = $2; + $1 = $12; + $1 = ($4 | 0) == ($38 | 0) & ($1 | 0) == ($31 | 0) ? $6 : ($31 | 0) == ($1 | 0) & $4 >>> 0 > $38 >>> 0 | $1 >>> 0 > $31 >>> 0; + $2 = $1 + $7 | 0; + if ($2 >>> 0 < $1 >>> 0) { + $11 = $11 + 1 | 0 + } + $1 = $2; + $4 = $1; + $2 = $11; + $4 = $3 + (($8 | 0) == ($11 | 0) & $4 >>> 0 < $7 >>> 0 | $11 >>> 0 < $8 >>> 0) | 0; + if ($4 >>> 0 < $3 >>> 0) { + $9 = $9 + 1 | 0 + } + $3 = $9; + if (!($9 & 65536)) { + break label$16 + } + $33 = $4 | $33; + $28 = $3 | $28; + break label$2; + } + $1 = 0; + $2 = 0; + break label$2; + } + $10 = $8; + $4 = $4 & 65535; + $14 = $29; + $9 = $1 << 1 | $14 >>> 31; + $14 = $14 << 1; + $6 = ($6 | 0) == ($9 | 0) & $14 >>> 0 >= $5 >>> 0 | $9 >>> 0 > $6 >>> 0; + $5 = $16; + $9 = $2 << 1 | $5 >>> 31; + $2 = $5 << 1 | $1 >>> 31; + $1 = ($2 | 0) == ($38 | 0) & ($9 | 0) == ($31 | 0) ? $6 : ($31 | 0) == ($9 | 0) & $2 >>> 0 >= $38 >>> 0 | $9 >>> 0 > $31 >>> 0; + $2 = $1 + $7 | 0; + if ($2 >>> 0 < $1 >>> 0) { + $10 = $10 + 1 | 0 + } + $1 = $2; + $2 = $10; + $5 = $3; + $3 = (($8 | 0) == ($10 | 0) & $1 >>> 0 < $7 >>> 0 | $10 >>> 0 < $8 >>> 0) + $3 | 0; + $10 = $11 << 16 | $4; + $33 = $3 | $33; + $28 = $28 | ($3 >>> 0 < $5 >>> 0 ? $10 + 1 | 0 : $10); + } + HEAP32[$0 >> 2] = $1; + HEAP32[$0 + 4 >> 2] = $2; + HEAP32[$0 + 8 >> 2] = $33; + HEAP32[$0 + 12 >> 2] = $28; + global$0 = $13 + 192 | 0; + return; + } + HEAP32[$0 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + $1 = !($3 | $5 | ($4 | $6)); + HEAP32[$0 + 8 >> 2] = $1 ? 0 : $33; + HEAP32[$0 + 12 >> 2] = $1 ? 2147450880 : $28; + global$0 = $13 + 192 | 0; + } + + function __fpclassifyl($0, $1, $2, $3) { + var $4 = 0, $5 = 0; + $5 = $3 & 65535; + $3 = $3 >>> 16 & 32767; + label$1 : { + if (($3 | 0) != 32767) { + $4 = 4; + if ($3) { + break label$1 + } + return $0 | $2 | ($1 | $5) ? 3 : 2; + } + $4 = !($0 | $2 | ($1 | $5)); + } + return $4; + } + + function fmodl($0, $1, $2, $3, $4, $5, $6, $7, $8) { + var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0; + $9 = global$0 - 128 | 0; + global$0 = $9; + label$1 : { + label$2 : { + label$3 : { + if (!__letf2($5, $6, $7, $8, 0, 0, 0, 0)) { + break label$3 + } + $10 = __fpclassifyl($5, $6, $7, $8); + $19 = $4 >>> 16 | 0; + $14 = $19 & 32767; + if (($14 | 0) == 32767) { + break label$3 + } + if ($10) { + break label$2 + } + } + __multf3($9 + 16 | 0, $1, $2, $3, $4, $5, $6, $7, $8); + $4 = HEAP32[$9 + 16 >> 2]; + $3 = HEAP32[$9 + 20 >> 2]; + $2 = HEAP32[$9 + 24 >> 2]; + $1 = HEAP32[$9 + 28 >> 2]; + __divtf3($9, $4, $3, $2, $1, $4, $3, $2, $1); + $3 = HEAP32[$9 + 8 >> 2]; + $4 = HEAP32[$9 + 12 >> 2]; + $7 = HEAP32[$9 >> 2]; + $8 = HEAP32[$9 + 4 >> 2]; + break label$1; + } + $11 = $4 & 65535 | $14 << 16; + $12 = $11; + $13 = $3; + $15 = $7; + $18 = $8 >>> 16 & 32767; + $10 = $8 & 65535 | $18 << 16; + if ((__letf2($1, $2, $13, $12, $5, $6, $7, $10) | 0) <= 0) { + if (__letf2($1, $2, $13, $12, $5, $6, $15, $10)) { + $7 = $1; + $8 = $2; + break label$1; + } + __multf3($9 + 112 | 0, $1, $2, $3, $4, 0, 0, 0, 0); + $3 = HEAP32[$9 + 120 >> 2]; + $4 = HEAP32[$9 + 124 >> 2]; + $7 = HEAP32[$9 + 112 >> 2]; + $8 = HEAP32[$9 + 116 >> 2]; + break label$1; + } + if ($14) { + $8 = $2; + $7 = $1; + } else { + __multf3($9 + 96 | 0, $1, $2, $13, $12, 0, 0, 0, 1081540608); + $7 = HEAP32[$9 + 108 >> 2]; + $12 = $7; + $13 = HEAP32[$9 + 104 >> 2]; + $14 = ($7 >>> 16 | 0) + -120 | 0; + $8 = HEAP32[$9 + 100 >> 2]; + $7 = HEAP32[$9 + 96 >> 2]; + } + if (!$18) { + __multf3($9 + 80 | 0, $5, $6, $15, $10, 0, 0, 0, 1081540608); + $5 = HEAP32[$9 + 92 >> 2]; + $10 = $5; + $15 = HEAP32[$9 + 88 >> 2]; + $18 = ($10 >>> 16 | 0) + -120 | 0; + $6 = HEAP32[$9 + 84 >> 2]; + $5 = HEAP32[$9 + 80 >> 2]; + } + $21 = $15; + $11 = $15; + $15 = $13 - $11 | 0; + $12 = $12 & 65535 | 65536; + $20 = $10 & 65535 | 65536; + $10 = ($6 | 0) == ($8 | 0) & $7 >>> 0 < $5 >>> 0 | $8 >>> 0 < $6 >>> 0; + $11 = ($12 - ($20 + ($13 >>> 0 < $11 >>> 0) | 0) | 0) - ($15 >>> 0 < $10 >>> 0) | 0; + $17 = $15 - $10 | 0; + $16 = ($11 | 0) > -1 ? 1 : 0; + $15 = $7 - $5 | 0; + $10 = $8 - (($7 >>> 0 < $5 >>> 0) + $6 | 0) | 0; + if (($14 | 0) > ($18 | 0)) { + while (1) { + label$11 : { + if ($16 & 1) { + if (!($15 | $17 | ($10 | $11))) { + __multf3($9 + 32 | 0, $1, $2, $3, $4, 0, 0, 0, 0); + $3 = HEAP32[$9 + 40 >> 2]; + $4 = HEAP32[$9 + 44 >> 2]; + $7 = HEAP32[$9 + 32 >> 2]; + $8 = HEAP32[$9 + 36 >> 2]; + break label$1; + } + $7 = $17; + $16 = $11 << 1 | $7 >>> 31; + $17 = $7 << 1; + $11 = $16; + $16 = 0; + $7 = $10 >>> 31 | 0; + break label$11; + } + $11 = 0; + $10 = $8; + $17 = $8 >>> 31 | 0; + $15 = $7; + $7 = $13; + $16 = $12 << 1 | $7 >>> 31; + $7 = $7 << 1; + } + $13 = $7 | $17; + $8 = $13; + $7 = $21; + $17 = $8 - $7 | 0; + $12 = $11 | $16; + $11 = $12 - (($8 >>> 0 < $7 >>> 0) + $20 | 0) | 0; + $7 = $15; + $16 = $10 << 1 | $7 >>> 31; + $7 = $7 << 1; + $8 = $16; + $10 = ($6 | 0) == ($8 | 0) & $7 >>> 0 < $5 >>> 0 | $8 >>> 0 < $6 >>> 0; + $11 = $11 - ($17 >>> 0 < $10 >>> 0) | 0; + $17 = $17 - $10 | 0; + $16 = ($11 | 0) > -1 ? 1 : 0; + $15 = $7 - $5 | 0; + $10 = $8 - (($7 >>> 0 < $5 >>> 0) + $6 | 0) | 0; + $14 = $14 + -1 | 0; + if (($14 | 0) > ($18 | 0)) { + continue + } + break; + }; + $14 = $18; + } + label$14 : { + if (!$16) { + break label$14 + } + $7 = $15; + $13 = $17; + $8 = $10; + $12 = $11; + if ($7 | $13 | ($8 | $12)) { + break label$14 + } + __multf3($9 + 48 | 0, $1, $2, $3, $4, 0, 0, 0, 0); + $3 = HEAP32[$9 + 56 >> 2]; + $4 = HEAP32[$9 + 60 >> 2]; + $7 = HEAP32[$9 + 48 >> 2]; + $8 = HEAP32[$9 + 52 >> 2]; + break label$1; + } + if (($12 | 0) == 65535 | $12 >>> 0 < 65535) { + while (1) { + $3 = $8 >>> 31 | 0; + $1 = 0; + $14 = $14 + -1 | 0; + $11 = $8 << 1 | $7 >>> 31; + $7 = $7 << 1; + $8 = $11; + $2 = $13; + $16 = $12 << 1 | $2 >>> 31; + $13 = $2 << 1 | $3; + $1 = $1 | $16; + $12 = $1; + if (($1 | 0) == 65536 & $13 >>> 0 < 0 | $1 >>> 0 < 65536) { + continue + } + break; + } + } + $1 = $19 & 32768; + if (($14 | 0) <= 0) { + __multf3($9 - -64 | 0, $7, $8, $13, $12 & 65535 | ($1 | $14 + 120) << 16, 0, 0, 0, 1065811968); + $3 = HEAP32[$9 + 72 >> 2]; + $4 = HEAP32[$9 + 76 >> 2]; + $7 = HEAP32[$9 + 64 >> 2]; + $8 = HEAP32[$9 + 68 >> 2]; + break label$1; + } + $3 = $13; + $4 = $12 & 65535 | ($1 | $14) << 16; + } + HEAP32[$0 >> 2] = $7; + HEAP32[$0 + 4 >> 2] = $8; + HEAP32[$0 + 8 >> 2] = $3; + HEAP32[$0 + 12 >> 2] = $4; + global$0 = $9 + 128 | 0; + } + + function __floatscan($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0; + $5 = global$0 - 48 | 0; + global$0 = $5; + $4 = $1 + 4 | 0; + $7 = HEAP32[2644]; + $10 = HEAP32[2641]; + while (1) { + $2 = HEAP32[$1 + 4 >> 2]; + label$4 : { + if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$4 >> 2] = $2 + 1; + $2 = HEAPU8[$2 | 0]; + break label$4; + } + $2 = __shgetc($1); + } + if (($2 | 0) == 32 | $2 + -9 >>> 0 < 5) { + continue + } + break; + }; + $6 = 1; + label$6 : { + label$7 : { + switch ($2 + -43 | 0) { + case 0: + case 2: + break label$7; + default: + break label$6; + }; + } + $6 = ($2 | 0) == 45 ? -1 : 1; + $2 = HEAP32[$1 + 4 >> 2]; + if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$4 >> 2] = $2 + 1; + $2 = HEAPU8[$2 | 0]; + break label$6; + } + $2 = __shgetc($1); + } + label$1 : { + label$9 : { + label$10 : { + while (1) { + if (HEAP8[$3 + 10484 | 0] == ($2 | 32)) { + label$13 : { + if ($3 >>> 0 > 6) { + break label$13 + } + $2 = HEAP32[$1 + 4 >> 2]; + if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$4 >> 2] = $2 + 1; + $2 = HEAPU8[$2 | 0]; + break label$13; + } + $2 = __shgetc($1); + } + $3 = $3 + 1 | 0; + if (($3 | 0) != 8) { + continue + } + break label$10; + } + break; + }; + if (($3 | 0) != 3) { + if (($3 | 0) == 8) { + break label$10 + } + if ($3 >>> 0 < 4) { + break label$9 + } + if (($3 | 0) == 8) { + break label$10 + } + } + $1 = HEAP32[$1 + 104 >> 2]; + if ($1) { + HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1 + } + if ($3 >>> 0 < 4) { + break label$10 + } + while (1) { + if ($1) { + HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1 + } + $3 = $3 + -1 | 0; + if ($3 >>> 0 > 3) { + continue + } + break; + }; + } + __extendsftf2($5, Math_fround(Math_fround($6 | 0) * Math_fround(infinity))); + $6 = HEAP32[$5 + 8 >> 2]; + $2 = HEAP32[$5 + 12 >> 2]; + $8 = HEAP32[$5 >> 2]; + $9 = HEAP32[$5 + 4 >> 2]; + break label$1; + } + label$19 : { + label$20 : { + label$21 : { + if ($3) { + break label$21 + } + $3 = 0; + while (1) { + if (HEAP8[$3 + 10493 | 0] != ($2 | 32)) { + break label$21 + } + label$23 : { + if ($3 >>> 0 > 1) { + break label$23 + } + $2 = HEAP32[$1 + 4 >> 2]; + if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$4 >> 2] = $2 + 1; + $2 = HEAPU8[$2 | 0]; + break label$23; + } + $2 = __shgetc($1); + } + $3 = $3 + 1 | 0; + if (($3 | 0) != 3) { + continue + } + break; + }; + break label$20; + } + label$25 : { + switch ($3 | 0) { + case 0: + label$27 : { + if (($2 | 0) != 48) { + break label$27 + } + $3 = HEAP32[$1 + 4 >> 2]; + label$28 : { + if ($3 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$4 >> 2] = $3 + 1; + $3 = HEAPU8[$3 | 0]; + break label$28; + } + $3 = __shgetc($1); + } + if (($3 & -33) == 88) { + hexfloat($5 + 16 | 0, $1, $10, $7, $6); + $6 = HEAP32[$5 + 24 >> 2]; + $2 = HEAP32[$5 + 28 >> 2]; + $8 = HEAP32[$5 + 16 >> 2]; + $9 = HEAP32[$5 + 20 >> 2]; + break label$1; + } + if (!HEAP32[$1 + 104 >> 2]) { + break label$27 + } + HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1; + } + decfloat($5 + 32 | 0, $1, $2, $10, $7, $6); + $6 = HEAP32[$5 + 40 >> 2]; + $2 = HEAP32[$5 + 44 >> 2]; + $8 = HEAP32[$5 + 32 >> 2]; + $9 = HEAP32[$5 + 36 >> 2]; + break label$1; + case 3: + break label$20; + default: + break label$25; + }; + } + if (HEAP32[$1 + 104 >> 2]) { + HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1 + } + break label$19; + } + label$32 : { + $3 = HEAP32[$1 + 4 >> 2]; + label$33 : { + if ($3 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$4 >> 2] = $3 + 1; + $2 = HEAPU8[$3 | 0]; + break label$33; + } + $2 = __shgetc($1); + } + if (($2 | 0) == 40) { + $3 = 1; + break label$32; + } + $6 = 0; + $2 = 2147450880; + if (!HEAP32[$1 + 104 >> 2]) { + break label$1 + } + HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1; + break label$1; + } + while (1) { + $2 = HEAP32[$1 + 4 >> 2]; + label$37 : { + if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$4 >> 2] = $2 + 1; + $7 = HEAPU8[$2 | 0]; + break label$37; + } + $7 = __shgetc($1); + } + if (!($7 + -97 >>> 0 >= 26 ? !($7 + -48 >>> 0 < 10 | $7 + -65 >>> 0 < 26 | ($7 | 0) == 95) : 0)) { + $3 = $3 + 1 | 0; + continue; + } + break; + }; + $6 = 0; + $2 = 2147450880; + if (($7 | 0) == 41) { + break label$1 + } + $1 = HEAP32[$1 + 104 >> 2]; + if ($1) { + HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1 + } + if (!$3) { + break label$1 + } + while (1) { + $3 = $3 + -1 | 0; + if ($1) { + HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1 + } + if ($3) { + continue + } + break; + }; + break label$1; + } + HEAP32[2896] = 28; + __shlim($1); + $6 = 0; + $2 = 0; + } + HEAP32[$0 >> 2] = $8; + HEAP32[$0 + 4 >> 2] = $9; + HEAP32[$0 + 8 >> 2] = $6; + HEAP32[$0 + 12 >> 2] = $2; + global$0 = $5 + 48 | 0; + } + + function hexfloat($0, $1, $2, $3, $4) { + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; + $5 = global$0 - 432 | 0; + global$0 = $5; + $6 = HEAP32[$1 + 4 >> 2]; + label$1 : { + if ($6 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$1 + 4 >> 2] = $6 + 1; + $7 = HEAPU8[$6 | 0]; + break label$1; + } + $7 = __shgetc($1); + } + label$3 : { + label$4 : { + while (1) { + if (($7 | 0) != 48) { + label$6 : { + if (($7 | 0) != 46) { + break label$3 + } + $6 = HEAP32[$1 + 4 >> 2]; + if ($6 >>> 0 >= HEAPU32[$1 + 104 >> 2]) { + break label$6 + } + HEAP32[$1 + 4 >> 2] = $6 + 1; + $7 = HEAPU8[$6 | 0]; + break label$4; + } + } else { + $6 = HEAP32[$1 + 4 >> 2]; + if ($6 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$1 + 4 >> 2] = $6 + 1; + $7 = HEAPU8[$6 | 0]; + } else { + $7 = __shgetc($1) + } + $21 = 1; + continue; + } + break; + }; + $7 = __shgetc($1); + } + $20 = 1; + if (($7 | 0) != 48) { + break label$3 + } + while (1) { + $6 = HEAP32[$1 + 4 >> 2]; + label$10 : { + if ($6 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$1 + 4 >> 2] = $6 + 1; + $7 = HEAPU8[$6 | 0]; + break label$10; + } + $7 = __shgetc($1); + } + $13 = $13 + -1 | 0; + $17 = $17 + -1 | 0; + if (($17 | 0) != -1) { + $13 = $13 + 1 | 0 + } + if (($7 | 0) == 48) { + continue + } + break; + }; + $21 = 1; + } + $12 = 1073676288; + $6 = 0; + while (1) { + label$13 : { + $22 = $7 | 32; + label$14 : { + label$15 : { + $23 = $7 + -48 | 0; + if ($23 >>> 0 < 10) { + break label$15 + } + if ($22 + -97 >>> 0 > 5 ? ($7 | 0) != 46 : 0) { + break label$13 + } + if (($7 | 0) != 46) { + break label$15 + } + if ($20) { + break label$13 + } + $20 = 1; + $17 = $9; + $13 = $6; + break label$14; + } + $7 = ($7 | 0) > 57 ? $22 + -87 | 0 : $23; + label$16 : { + if (($6 | 0) < 0 ? 1 : ($6 | 0) <= 0 ? ($9 >>> 0 > 7 ? 0 : 1) : 0) { + $14 = $7 + ($14 << 4) | 0; + break label$16; + } + if (($6 | 0) < 0 ? 1 : ($6 | 0) <= 0 ? ($9 >>> 0 > 28 ? 0 : 1) : 0) { + __floatsitf($5 + 48 | 0, $7); + __multf3($5 + 32 | 0, $18, $19, $8, $12, 0, 0, 0, 1073414144); + $18 = HEAP32[$5 + 32 >> 2]; + $19 = HEAP32[$5 + 36 >> 2]; + $8 = HEAP32[$5 + 40 >> 2]; + $12 = HEAP32[$5 + 44 >> 2]; + __multf3($5 + 16 | 0, $18, $19, $8, $12, HEAP32[$5 + 48 >> 2], HEAP32[$5 + 52 >> 2], HEAP32[$5 + 56 >> 2], HEAP32[$5 + 60 >> 2]); + __addtf3($5, $10, $11, $15, $16, HEAP32[$5 + 16 >> 2], HEAP32[$5 + 20 >> 2], HEAP32[$5 + 24 >> 2], HEAP32[$5 + 28 >> 2]); + $15 = HEAP32[$5 + 8 >> 2]; + $16 = HEAP32[$5 + 12 >> 2]; + $10 = HEAP32[$5 >> 2]; + $11 = HEAP32[$5 + 4 >> 2]; + break label$16; + } + if (!$7 | $24) { + break label$16 + } + __multf3($5 + 80 | 0, $18, $19, $8, $12, 0, 0, 0, 1073610752); + __addtf3($5 - -64 | 0, $10, $11, $15, $16, HEAP32[$5 + 80 >> 2], HEAP32[$5 + 84 >> 2], HEAP32[$5 + 88 >> 2], HEAP32[$5 + 92 >> 2]); + $15 = HEAP32[$5 + 72 >> 2]; + $16 = HEAP32[$5 + 76 >> 2]; + $24 = 1; + $10 = HEAP32[$5 + 64 >> 2]; + $11 = HEAP32[$5 + 68 >> 2]; + } + $9 = $9 + 1 | 0; + if ($9 >>> 0 < 1) { + $6 = $6 + 1 | 0 + } + $21 = 1; + } + $7 = HEAP32[$1 + 4 >> 2]; + if ($7 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$1 + 4 >> 2] = $7 + 1; + $7 = HEAPU8[$7 | 0]; + } else { + $7 = __shgetc($1) + } + continue; + } + break; + }; + label$20 : { + label$21 : { + if (!$21) { + if (!HEAP32[$1 + 104 >> 2]) { + break label$21 + } + $2 = HEAP32[$1 + 4 >> 2]; + HEAP32[$1 + 4 >> 2] = $2 + -1; + HEAP32[$1 + 4 >> 2] = $2 + -2; + if (!$20) { + break label$21 + } + HEAP32[$1 + 4 >> 2] = $2 + -3; + break label$21; + } + if (($6 | 0) < 0 ? 1 : ($6 | 0) <= 0 ? ($9 >>> 0 > 7 ? 0 : 1) : 0) { + $8 = $9; + $12 = $6; + while (1) { + $14 = $14 << 4; + $8 = $8 + 1 | 0; + if ($8 >>> 0 < 1) { + $12 = $12 + 1 | 0 + } + if (($8 | 0) != 8 | $12) { + continue + } + break; + }; + } + label$27 : { + if (($7 & -33) == 80) { + $8 = scanexp($1); + $7 = i64toi32_i32$HIGH_BITS; + $12 = $7; + if ($8 | ($7 | 0) != -2147483648) { + break label$27 + } + $8 = 0; + $12 = 0; + if (!HEAP32[$1 + 104 >> 2]) { + break label$27 + } + HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1; + break label$27; + } + $8 = 0; + $12 = 0; + if (!HEAP32[$1 + 104 >> 2]) { + break label$27 + } + HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1; + } + if (!$14) { + __extenddftf2($5 + 112 | 0, +($4 | 0) * 0.0); + $10 = HEAP32[$5 + 112 >> 2]; + $11 = HEAP32[$5 + 116 >> 2]; + $2 = HEAP32[$5 + 120 >> 2]; + $1 = HEAP32[$5 + 124 >> 2]; + break label$20; + } + $1 = $20 ? $17 : $9; + $6 = ($20 ? $13 : $6) << 2 | $1 >>> 30; + $1 = $8 + ($1 << 2) | 0; + $13 = $1 + -32 | 0; + $9 = $13; + $6 = $6 + $12 | 0; + $1 = ($1 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6) + -1 | 0; + $6 = $9 >>> 0 < 4294967264 ? $1 + 1 | 0 : $1; + if (($6 | 0) > 0 ? 1 : ($6 | 0) >= 0 ? ($9 >>> 0 <= 0 - $3 >>> 0 ? 0 : 1) : 0) { + HEAP32[2896] = 68; + __floatsitf($5 + 160 | 0, $4); + __multf3($5 + 144 | 0, HEAP32[$5 + 160 >> 2], HEAP32[$5 + 164 >> 2], HEAP32[$5 + 168 >> 2], HEAP32[$5 + 172 >> 2], -1, -1, -1, 2147418111); + __multf3($5 + 128 | 0, HEAP32[$5 + 144 >> 2], HEAP32[$5 + 148 >> 2], HEAP32[$5 + 152 >> 2], HEAP32[$5 + 156 >> 2], -1, -1, -1, 2147418111); + $10 = HEAP32[$5 + 128 >> 2]; + $11 = HEAP32[$5 + 132 >> 2]; + $2 = HEAP32[$5 + 136 >> 2]; + $1 = HEAP32[$5 + 140 >> 2]; + break label$20; + } + $1 = $3 + -226 | 0; + $7 = $9 >>> 0 < $1 >>> 0 ? 0 : 1; + $1 = $1 >> 31; + if (($6 | 0) > ($1 | 0) ? 1 : ($6 | 0) >= ($1 | 0) ? $7 : 0) { + if (($14 | 0) > -1) { + while (1) { + __addtf3($5 + 416 | 0, $10, $11, $15, $16, 0, 0, 0, -1073807360); + $1 = __getf2($10, $11, $15, $16, 1073610752); + $8 = ($1 | 0) < 0; + __addtf3($5 + 400 | 0, $10, $11, $15, $16, $8 ? $10 : HEAP32[$5 + 416 >> 2], $8 ? $11 : HEAP32[$5 + 420 >> 2], $8 ? $15 : HEAP32[$5 + 424 >> 2], $8 ? $16 : HEAP32[$5 + 428 >> 2]); + $6 = $6 + -1 | 0; + $9 = $9 + -1 | 0; + if (($9 | 0) != -1) { + $6 = $6 + 1 | 0 + } + $15 = HEAP32[$5 + 408 >> 2]; + $16 = HEAP32[$5 + 412 >> 2]; + $10 = HEAP32[$5 + 400 >> 2]; + $11 = HEAP32[$5 + 404 >> 2]; + $14 = $14 << 1 | ($1 | 0) > -1; + if (($14 | 0) > -1) { + continue + } + break; + } + } + $1 = ($9 - $3 | 0) + 32 | 0; + $8 = $1; + $7 = $2; + $12 = $1 >>> 0 >= $2 >>> 0 ? 0 : 1; + $2 = $6 - (($3 >> 31) + ($9 >>> 0 < $3 >>> 0) | 0) | 0; + $1 = $1 >>> 0 < 32 ? $2 + 1 | 0 : $2; + $1 = (($1 | 0) < 0 ? 1 : ($1 | 0) <= 0 ? $12 : 0) ? (($8 | 0) > 0 ? $8 : 0) : $7; + label$35 : { + if (($1 | 0) >= 113) { + __floatsitf($5 + 384 | 0, $4); + $17 = HEAP32[$5 + 392 >> 2]; + $13 = HEAP32[$5 + 396 >> 2]; + $18 = HEAP32[$5 + 384 >> 2]; + $19 = HEAP32[$5 + 388 >> 2]; + $6 = 0; + $4 = 0; + $3 = 0; + $2 = 0; + break label$35; + } + __extenddftf2($5 + 352 | 0, scalbn(1.0, 144 - $1 | 0)); + __floatsitf($5 + 336 | 0, $4); + $18 = HEAP32[$5 + 336 >> 2]; + $19 = HEAP32[$5 + 340 >> 2]; + $17 = HEAP32[$5 + 344 >> 2]; + $13 = HEAP32[$5 + 348 >> 2]; + copysignl($5 + 368 | 0, HEAP32[$5 + 352 >> 2], HEAP32[$5 + 356 >> 2], HEAP32[$5 + 360 >> 2], HEAP32[$5 + 364 >> 2], $18, $19, $17, $13); + $6 = HEAP32[$5 + 376 >> 2]; + $4 = HEAP32[$5 + 380 >> 2]; + $3 = HEAP32[$5 + 372 >> 2]; + $2 = HEAP32[$5 + 368 >> 2]; + } + $1 = !($14 & 1) & ((__letf2($10, $11, $15, $16, 0, 0, 0, 0) | 0) != 0 & ($1 | 0) < 32); + __floatunsitf($5 + 320 | 0, $1 + $14 | 0); + __multf3($5 + 304 | 0, $18, $19, $17, $13, HEAP32[$5 + 320 >> 2], HEAP32[$5 + 324 >> 2], HEAP32[$5 + 328 >> 2], HEAP32[$5 + 332 >> 2]); + __addtf3($5 + 272 | 0, HEAP32[$5 + 304 >> 2], HEAP32[$5 + 308 >> 2], HEAP32[$5 + 312 >> 2], HEAP32[$5 + 316 >> 2], $2, $3, $6, $4); + __multf3($5 + 288 | 0, $1 ? 0 : $10, $1 ? 0 : $11, $1 ? 0 : $15, $1 ? 0 : $16, $18, $19, $17, $13); + __addtf3($5 + 256 | 0, HEAP32[$5 + 288 >> 2], HEAP32[$5 + 292 >> 2], HEAP32[$5 + 296 >> 2], HEAP32[$5 + 300 >> 2], HEAP32[$5 + 272 >> 2], HEAP32[$5 + 276 >> 2], HEAP32[$5 + 280 >> 2], HEAP32[$5 + 284 >> 2]); + __subtf3($5 + 240 | 0, HEAP32[$5 + 256 >> 2], HEAP32[$5 + 260 >> 2], HEAP32[$5 + 264 >> 2], HEAP32[$5 + 268 >> 2], $2, $3, $6, $4); + $1 = HEAP32[$5 + 240 >> 2]; + $2 = HEAP32[$5 + 244 >> 2]; + $3 = HEAP32[$5 + 248 >> 2]; + $4 = HEAP32[$5 + 252 >> 2]; + if (!__letf2($1, $2, $3, $4, 0, 0, 0, 0)) { + HEAP32[2896] = 68 + } + scalbnl($5 + 224 | 0, $1, $2, $3, $4, $9); + $10 = HEAP32[$5 + 224 >> 2]; + $11 = HEAP32[$5 + 228 >> 2]; + $2 = HEAP32[$5 + 232 >> 2]; + $1 = HEAP32[$5 + 236 >> 2]; + break label$20; + } + HEAP32[2896] = 68; + __floatsitf($5 + 208 | 0, $4); + __multf3($5 + 192 | 0, HEAP32[$5 + 208 >> 2], HEAP32[$5 + 212 >> 2], HEAP32[$5 + 216 >> 2], HEAP32[$5 + 220 >> 2], 0, 0, 0, 65536); + __multf3($5 + 176 | 0, HEAP32[$5 + 192 >> 2], HEAP32[$5 + 196 >> 2], HEAP32[$5 + 200 >> 2], HEAP32[$5 + 204 >> 2], 0, 0, 0, 65536); + $10 = HEAP32[$5 + 176 >> 2]; + $11 = HEAP32[$5 + 180 >> 2]; + $2 = HEAP32[$5 + 184 >> 2]; + $1 = HEAP32[$5 + 188 >> 2]; + break label$20; + } + __extenddftf2($5 + 96 | 0, +($4 | 0) * 0.0); + $10 = HEAP32[$5 + 96 >> 2]; + $11 = HEAP32[$5 + 100 >> 2]; + $2 = HEAP32[$5 + 104 >> 2]; + $1 = HEAP32[$5 + 108 >> 2]; + } + HEAP32[$0 >> 2] = $10; + HEAP32[$0 + 4 >> 2] = $11; + HEAP32[$0 + 8 >> 2] = $2; + HEAP32[$0 + 12 >> 2] = $1; + global$0 = $5 + 432 | 0; + } + + function decfloat($0, $1, $2, $3, $4, $5) { + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; + $6 = global$0 - 8976 | 0; + global$0 = $6; + $22 = $3 + $4 | 0; + $25 = 0 - $22 | 0; + label$1 : { + label$2 : { + while (1) { + if (($2 | 0) != 48) { + label$4 : { + if (($2 | 0) != 46) { + break label$1 + } + $2 = HEAP32[$1 + 4 >> 2]; + if ($2 >>> 0 >= HEAPU32[$1 + 104 >> 2]) { + break label$4 + } + HEAP32[$1 + 4 >> 2] = $2 + 1; + $2 = HEAPU8[$2 | 0]; + break label$2; + } + } else { + $2 = HEAP32[$1 + 4 >> 2]; + if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + $9 = 1; + HEAP32[$1 + 4 >> 2] = $2 + 1; + $2 = HEAPU8[$2 | 0]; + } else { + $9 = 1; + $2 = __shgetc($1); + } + continue; + } + break; + }; + $2 = __shgetc($1); + } + $14 = 1; + if (($2 | 0) != 48) { + break label$1 + } + while (1) { + $2 = HEAP32[$1 + 4 >> 2]; + label$8 : { + if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$1 + 4 >> 2] = $2 + 1; + $2 = HEAPU8[$2 | 0]; + break label$8; + } + $2 = __shgetc($1); + } + $7 = $7 + -1 | 0; + $8 = $8 + -1 | 0; + if (($8 | 0) != -1) { + $7 = $7 + 1 | 0 + } + if (($2 | 0) == 48) { + continue + } + break; + }; + $9 = 1; + } + HEAP32[$6 + 784 >> 2] = 0; + label$10 : { + label$11 : { + $12 = ($2 | 0) == 46; + $13 = $2 + -48 | 0; + label$13 : { + label$14 : { + label$15 : { + if ($12 | $13 >>> 0 <= 9) { + while (1) { + label$19 : { + if ($12 & 1) { + if (!$14) { + $8 = $10; + $7 = $11; + $14 = 1; + break label$19; + } + $9 = !$9; + break label$15; + } + $10 = $10 + 1 | 0; + if ($10 >>> 0 < 1) { + $11 = $11 + 1 | 0 + } + if (($15 | 0) <= 2044) { + $20 = ($2 | 0) == 48 ? $20 : $10; + $9 = ($6 + 784 | 0) + ($15 << 2) | 0; + HEAP32[$9 >> 2] = $17 ? (Math_imul(HEAP32[$9 >> 2], 10) + $2 | 0) + -48 | 0 : $13; + $9 = 1; + $13 = $17 + 1 | 0; + $2 = ($13 | 0) == 9; + $17 = $2 ? 0 : $13; + $15 = $2 + $15 | 0; + break label$19; + } + if (($2 | 0) == 48) { + break label$19 + } + HEAP32[$6 + 8960 >> 2] = HEAP32[$6 + 8960 >> 2] | 1; + $20 = 18396; + } + $2 = HEAP32[$1 + 4 >> 2]; + label$25 : { + if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) { + HEAP32[$1 + 4 >> 2] = $2 + 1; + $2 = HEAPU8[$2 | 0]; + break label$25; + } + $2 = __shgetc($1); + } + $12 = ($2 | 0) == 46; + $13 = $2 + -48 | 0; + if ($12 | $13 >>> 0 < 10) { + continue + } + break; + } + } + $8 = $14 ? $8 : $10; + $7 = $14 ? $7 : $11; + if (!(!$9 | ($2 & -33) != 69)) { + $12 = scanexp($1); + $2 = i64toi32_i32$HIGH_BITS; + $16 = $2; + label$28 : { + if ($12 | ($2 | 0) != -2147483648) { + break label$28 + } + $12 = 0; + $16 = 0; + if (!HEAP32[$1 + 104 >> 2]) { + break label$28 + } + HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1; + } + if (!$9) { + break label$13 + } + $7 = $7 + $16 | 0; + $8 = $8 + $12 | 0; + if ($8 >>> 0 < $12 >>> 0) { + $7 = $7 + 1 | 0 + } + break label$11; + } + $9 = !$9; + if (($2 | 0) < 0) { + break label$14 + } + } + if (!HEAP32[$1 + 104 >> 2]) { + break label$14 + } + HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1; + } + if (!$9) { + break label$11 + } + } + HEAP32[2896] = 28; + $10 = 0; + $11 = 0; + __shlim($1); + $2 = 0; + $1 = 0; + break label$10; + } + $1 = HEAP32[$6 + 784 >> 2]; + if (!$1) { + __extenddftf2($6, +($5 | 0) * 0.0); + $10 = HEAP32[$6 >> 2]; + $11 = HEAP32[$6 + 4 >> 2]; + $2 = HEAP32[$6 + 8 >> 2]; + $1 = HEAP32[$6 + 12 >> 2]; + break label$10; + } + if (!(($8 | 0) != ($10 | 0) | ($7 | 0) != ($11 | 0) | (($11 | 0) > 0 ? 1 : ($11 | 0) >= 0 ? ($10 >>> 0 <= 9 ? 0 : 1) : 0) | ($1 >>> $3 | 0 ? ($3 | 0) <= 30 : 0))) { + __floatsitf($6 + 48 | 0, $5); + __floatunsitf($6 + 32 | 0, $1); + __multf3($6 + 16 | 0, HEAP32[$6 + 48 >> 2], HEAP32[$6 + 52 >> 2], HEAP32[$6 + 56 >> 2], HEAP32[$6 + 60 >> 2], HEAP32[$6 + 32 >> 2], HEAP32[$6 + 36 >> 2], HEAP32[$6 + 40 >> 2], HEAP32[$6 + 44 >> 2]); + $10 = HEAP32[$6 + 16 >> 2]; + $11 = HEAP32[$6 + 20 >> 2]; + $2 = HEAP32[$6 + 24 >> 2]; + $1 = HEAP32[$6 + 28 >> 2]; + break label$10; + } + if (($7 | 0) > 0 ? 1 : ($7 | 0) >= 0 ? ($8 >>> 0 <= ($4 | 0) / -2 >>> 0 ? 0 : 1) : 0) { + HEAP32[2896] = 68; + __floatsitf($6 + 96 | 0, $5); + __multf3($6 + 80 | 0, HEAP32[$6 + 96 >> 2], HEAP32[$6 + 100 >> 2], HEAP32[$6 + 104 >> 2], HEAP32[$6 + 108 >> 2], -1, -1, -1, 2147418111); + __multf3($6 - -64 | 0, HEAP32[$6 + 80 >> 2], HEAP32[$6 + 84 >> 2], HEAP32[$6 + 88 >> 2], HEAP32[$6 + 92 >> 2], -1, -1, -1, 2147418111); + $10 = HEAP32[$6 + 64 >> 2]; + $11 = HEAP32[$6 + 68 >> 2]; + $2 = HEAP32[$6 + 72 >> 2]; + $1 = HEAP32[$6 + 76 >> 2]; + break label$10; + } + $1 = $4 + -226 | 0; + $2 = $8 >>> 0 >= $1 >>> 0 ? 0 : 1; + $1 = $1 >> 31; + if (($7 | 0) < ($1 | 0) ? 1 : ($7 | 0) <= ($1 | 0) ? $2 : 0) { + HEAP32[2896] = 68; + __floatsitf($6 + 144 | 0, $5); + __multf3($6 + 128 | 0, HEAP32[$6 + 144 >> 2], HEAP32[$6 + 148 >> 2], HEAP32[$6 + 152 >> 2], HEAP32[$6 + 156 >> 2], 0, 0, 0, 65536); + __multf3($6 + 112 | 0, HEAP32[$6 + 128 >> 2], HEAP32[$6 + 132 >> 2], HEAP32[$6 + 136 >> 2], HEAP32[$6 + 140 >> 2], 0, 0, 0, 65536); + $10 = HEAP32[$6 + 112 >> 2]; + $11 = HEAP32[$6 + 116 >> 2]; + $2 = HEAP32[$6 + 120 >> 2]; + $1 = HEAP32[$6 + 124 >> 2]; + break label$10; + } + if ($17) { + if (($17 | 0) <= 8) { + $2 = ($6 + 784 | 0) + ($15 << 2) | 0; + $1 = HEAP32[$2 >> 2]; + while (1) { + $1 = Math_imul($1, 10); + $17 = $17 + 1 | 0; + if (($17 | 0) != 9) { + continue + } + break; + }; + HEAP32[$2 >> 2] = $1; + } + $15 = $15 + 1 | 0; + } + label$36 : { + $14 = $8; + if (($20 | 0) > ($8 | 0) | ($20 | 0) >= 9 | ($8 | 0) > 17) { + break label$36 + } + if (($14 | 0) == 9) { + __floatsitf($6 + 192 | 0, $5); + __floatunsitf($6 + 176 | 0, HEAP32[$6 + 784 >> 2]); + __multf3($6 + 160 | 0, HEAP32[$6 + 192 >> 2], HEAP32[$6 + 196 >> 2], HEAP32[$6 + 200 >> 2], HEAP32[$6 + 204 >> 2], HEAP32[$6 + 176 >> 2], HEAP32[$6 + 180 >> 2], HEAP32[$6 + 184 >> 2], HEAP32[$6 + 188 >> 2]); + $10 = HEAP32[$6 + 160 >> 2]; + $11 = HEAP32[$6 + 164 >> 2]; + $2 = HEAP32[$6 + 168 >> 2]; + $1 = HEAP32[$6 + 172 >> 2]; + break label$10; + } + if (($14 | 0) <= 8) { + __floatsitf($6 + 272 | 0, $5); + __floatunsitf($6 + 256 | 0, HEAP32[$6 + 784 >> 2]); + __multf3($6 + 240 | 0, HEAP32[$6 + 272 >> 2], HEAP32[$6 + 276 >> 2], HEAP32[$6 + 280 >> 2], HEAP32[$6 + 284 >> 2], HEAP32[$6 + 256 >> 2], HEAP32[$6 + 260 >> 2], HEAP32[$6 + 264 >> 2], HEAP32[$6 + 268 >> 2]); + __floatsitf($6 + 224 | 0, HEAP32[(0 - $14 << 2) + 10560 >> 2]); + __divtf3($6 + 208 | 0, HEAP32[$6 + 240 >> 2], HEAP32[$6 + 244 >> 2], HEAP32[$6 + 248 >> 2], HEAP32[$6 + 252 >> 2], HEAP32[$6 + 224 >> 2], HEAP32[$6 + 228 >> 2], HEAP32[$6 + 232 >> 2], HEAP32[$6 + 236 >> 2]); + $10 = HEAP32[$6 + 208 >> 2]; + $11 = HEAP32[$6 + 212 >> 2]; + $2 = HEAP32[$6 + 216 >> 2]; + $1 = HEAP32[$6 + 220 >> 2]; + break label$10; + } + $1 = (Math_imul($14, -3) + $3 | 0) + 27 | 0; + $2 = HEAP32[$6 + 784 >> 2]; + if ($2 >>> $1 | 0 ? ($1 | 0) <= 30 : 0) { + break label$36 + } + __floatsitf($6 + 352 | 0, $5); + __floatunsitf($6 + 336 | 0, $2); + __multf3($6 + 320 | 0, HEAP32[$6 + 352 >> 2], HEAP32[$6 + 356 >> 2], HEAP32[$6 + 360 >> 2], HEAP32[$6 + 364 >> 2], HEAP32[$6 + 336 >> 2], HEAP32[$6 + 340 >> 2], HEAP32[$6 + 344 >> 2], HEAP32[$6 + 348 >> 2]); + __floatsitf($6 + 304 | 0, HEAP32[($14 << 2) + 10488 >> 2]); + __multf3($6 + 288 | 0, HEAP32[$6 + 320 >> 2], HEAP32[$6 + 324 >> 2], HEAP32[$6 + 328 >> 2], HEAP32[$6 + 332 >> 2], HEAP32[$6 + 304 >> 2], HEAP32[$6 + 308 >> 2], HEAP32[$6 + 312 >> 2], HEAP32[$6 + 316 >> 2]); + $10 = HEAP32[$6 + 288 >> 2]; + $11 = HEAP32[$6 + 292 >> 2]; + $2 = HEAP32[$6 + 296 >> 2]; + $1 = HEAP32[$6 + 300 >> 2]; + break label$10; + } + while (1) { + $2 = $15; + $15 = $2 + -1 | 0; + if (!HEAP32[($6 + 784 | 0) + ($15 << 2) >> 2]) { + continue + } + break; + }; + $17 = 0; + $1 = ($14 | 0) % 9 | 0; + label$40 : { + if (!$1) { + $9 = 0; + break label$40; + } + $13 = ($14 | 0) > -1 ? $1 : $1 + 9 | 0; + label$42 : { + if (!$2) { + $9 = 0; + $2 = 0; + break label$42; + } + $8 = HEAP32[(0 - $13 << 2) + 10560 >> 2]; + $10 = 1e9 / ($8 | 0) | 0; + $12 = 0; + $1 = 0; + $9 = 0; + while (1) { + $11 = ($6 + 784 | 0) + ($1 << 2) | 0; + $15 = HEAP32[$11 >> 2]; + $16 = ($15 >>> 0) / ($8 >>> 0) | 0; + $7 = $12 + $16 | 0; + HEAP32[$11 >> 2] = $7; + $7 = !$7 & ($1 | 0) == ($9 | 0); + $9 = $7 ? $9 + 1 & 2047 : $9; + $14 = $7 ? $14 + -9 | 0 : $14; + $12 = Math_imul($10, $15 - Math_imul($8, $16) | 0); + $1 = $1 + 1 | 0; + if (($2 | 0) != ($1 | 0)) { + continue + } + break; + }; + if (!$12) { + break label$42 + } + HEAP32[($6 + 784 | 0) + ($2 << 2) >> 2] = $12; + $2 = $2 + 1 | 0; + } + $14 = ($14 - $13 | 0) + 9 | 0; + } + while (1) { + $11 = ($6 + 784 | 0) + ($9 << 2) | 0; + label$46 : { + while (1) { + if (($14 | 0) != 36 | HEAPU32[$11 >> 2] >= 10384593 ? ($14 | 0) >= 36 : 0) { + break label$46 + } + $15 = $2 + 2047 | 0; + $12 = 0; + $13 = $2; + while (1) { + $2 = $13; + $10 = $15 & 2047; + $13 = ($6 + 784 | 0) + ($10 << 2) | 0; + $1 = HEAP32[$13 >> 2]; + $7 = $1 >>> 3 | 0; + $1 = $1 << 29; + $8 = $1 + $12 | 0; + if ($8 >>> 0 < $1 >>> 0) { + $7 = $7 + 1 | 0 + } + $1 = 0; + if (!(!$7 & $8 >>> 0 < 1000000001 | $7 >>> 0 < 0)) { + $1 = __wasm_i64_udiv($8, $7, 1e9); + $8 = $8 - __wasm_i64_mul($1, i64toi32_i32$HIGH_BITS, 1e9, 0) | 0; + } + $12 = $1; + HEAP32[$13 >> 2] = $8; + $13 = ($10 | 0) != ($2 + -1 & 2047) ? $2 : ($9 | 0) == ($10 | 0) ? $2 : $8 ? $2 : $10; + $15 = $10 + -1 | 0; + if (($9 | 0) != ($10 | 0)) { + continue + } + break; + }; + $17 = $17 + -29 | 0; + if (!$12) { + continue + } + break; + }; + $9 = $9 + -1 & 2047; + if (($13 | 0) == ($9 | 0)) { + $1 = ($6 + 784 | 0) + (($13 + 2046 & 2047) << 2) | 0; + $2 = $13 + -1 & 2047; + HEAP32[$1 >> 2] = HEAP32[$1 >> 2] | HEAP32[($6 + 784 | 0) + ($2 << 2) >> 2]; + } + $14 = $14 + 9 | 0; + HEAP32[($6 + 784 | 0) + ($9 << 2) >> 2] = $12; + continue; + } + break; + }; + label$52 : { + label$53 : while (1) { + $8 = $2 + 1 & 2047; + $10 = ($6 + 784 | 0) + (($2 + -1 & 2047) << 2) | 0; + while (1) { + $7 = ($14 | 0) > 45 ? 9 : 1; + label$55 : { + while (1) { + $13 = $9; + $1 = 0; + label$57 : { + while (1) { + label$59 : { + $9 = $1 + $13 & 2047; + if (($9 | 0) == ($2 | 0)) { + break label$59 + } + $9 = HEAP32[($6 + 784 | 0) + ($9 << 2) >> 2]; + $11 = HEAP32[($1 << 2) + 10512 >> 2]; + if ($9 >>> 0 < $11 >>> 0) { + break label$59 + } + if ($9 >>> 0 > $11 >>> 0) { + break label$57 + } + $1 = $1 + 1 | 0; + if (($1 | 0) != 4) { + continue + } + } + break; + }; + if (($14 | 0) != 36) { + break label$57 + } + $8 = 0; + $7 = 0; + $1 = 0; + $10 = 0; + $11 = 0; + while (1) { + $9 = $1 + $13 & 2047; + if (($9 | 0) == ($2 | 0)) { + $2 = $2 + 1 & 2047; + HEAP32[(($2 << 2) + $6 | 0) + 780 >> 2] = 0; + } + __multf3($6 + 768 | 0, $8, $7, $10, $11, 0, 0, 1342177280, 1075633366); + __floatunsitf($6 + 752 | 0, HEAP32[($6 + 784 | 0) + ($9 << 2) >> 2]); + __addtf3($6 + 736 | 0, HEAP32[$6 + 768 >> 2], HEAP32[$6 + 772 >> 2], HEAP32[$6 + 776 >> 2], HEAP32[$6 + 780 >> 2], HEAP32[$6 + 752 >> 2], HEAP32[$6 + 756 >> 2], HEAP32[$6 + 760 >> 2], HEAP32[$6 + 764 >> 2]); + $10 = HEAP32[$6 + 744 >> 2]; + $11 = HEAP32[$6 + 748 >> 2]; + $8 = HEAP32[$6 + 736 >> 2]; + $7 = HEAP32[$6 + 740 >> 2]; + $1 = $1 + 1 | 0; + if (($1 | 0) != 4) { + continue + } + break; + }; + __floatsitf($6 + 720 | 0, $5); + __multf3($6 + 704 | 0, $8, $7, $10, $11, HEAP32[$6 + 720 >> 2], HEAP32[$6 + 724 >> 2], HEAP32[$6 + 728 >> 2], HEAP32[$6 + 732 >> 2]); + $10 = HEAP32[$6 + 712 >> 2]; + $11 = HEAP32[$6 + 716 >> 2]; + $8 = 0; + $7 = 0; + $12 = HEAP32[$6 + 704 >> 2]; + $16 = HEAP32[$6 + 708 >> 2]; + $23 = $17 + 113 | 0; + $4 = $23 - $4 | 0; + $20 = ($4 | 0) < ($3 | 0); + $1 = $20 ? (($4 | 0) > 0 ? $4 : 0) : $3; + if (($1 | 0) <= 112) { + break label$55 + } + $14 = 0; + $15 = 0; + $9 = 0; + $3 = 0; + break label$52; + } + $17 = $7 + $17 | 0; + $9 = $2; + if (($2 | 0) == ($13 | 0)) { + continue + } + break; + }; + $11 = 1e9 >>> $7 | 0; + $12 = -1 << $7 ^ -1; + $1 = 0; + $9 = $13; + while (1) { + $15 = ($6 + 784 | 0) + ($13 << 2) | 0; + $16 = HEAP32[$15 >> 2]; + $1 = $1 + ($16 >>> $7 | 0) | 0; + HEAP32[$15 >> 2] = $1; + $1 = !$1 & ($9 | 0) == ($13 | 0); + $9 = $1 ? $9 + 1 & 2047 : $9; + $14 = $1 ? $14 + -9 | 0 : $14; + $1 = Math_imul($11, $12 & $16); + $13 = $13 + 1 & 2047; + if (($13 | 0) != ($2 | 0)) { + continue + } + break; + }; + if (!$1) { + continue + } + if (($8 | 0) != ($9 | 0)) { + HEAP32[($6 + 784 | 0) + ($2 << 2) >> 2] = $1; + $2 = $8; + continue label$53; + } + HEAP32[$10 >> 2] = HEAP32[$10 >> 2] | 1; + $9 = $8; + continue; + } + break; + }; + break; + }; + __extenddftf2($6 + 656 | 0, scalbn(1.0, 225 - $1 | 0)); + copysignl($6 + 688 | 0, HEAP32[$6 + 656 >> 2], HEAP32[$6 + 660 >> 2], HEAP32[$6 + 664 >> 2], HEAP32[$6 + 668 >> 2], $12, $16, $10, $11); + $9 = HEAP32[$6 + 696 >> 2]; + $3 = HEAP32[$6 + 700 >> 2]; + $14 = HEAP32[$6 + 688 >> 2]; + $15 = HEAP32[$6 + 692 >> 2]; + __extenddftf2($6 + 640 | 0, scalbn(1.0, 113 - $1 | 0)); + fmodl($6 + 672 | 0, $12, $16, $10, $11, HEAP32[$6 + 640 >> 2], HEAP32[$6 + 644 >> 2], HEAP32[$6 + 648 >> 2], HEAP32[$6 + 652 >> 2]); + $8 = HEAP32[$6 + 672 >> 2]; + $7 = HEAP32[$6 + 676 >> 2]; + $18 = HEAP32[$6 + 680 >> 2]; + $19 = HEAP32[$6 + 684 >> 2]; + __subtf3($6 + 624 | 0, $12, $16, $10, $11, $8, $7, $18, $19); + __addtf3($6 + 608 | 0, $14, $15, $9, $3, HEAP32[$6 + 624 >> 2], HEAP32[$6 + 628 >> 2], HEAP32[$6 + 632 >> 2], HEAP32[$6 + 636 >> 2]); + $10 = HEAP32[$6 + 616 >> 2]; + $11 = HEAP32[$6 + 620 >> 2]; + $12 = HEAP32[$6 + 608 >> 2]; + $16 = HEAP32[$6 + 612 >> 2]; + } + $21 = $13 + 4 & 2047; + label$64 : { + if (($21 | 0) == ($2 | 0)) { + break label$64 + } + $21 = HEAP32[($6 + 784 | 0) + ($21 << 2) >> 2]; + label$65 : { + if ($21 >>> 0 <= 499999999) { + if (($13 + 5 & 2047) == ($2 | 0) ? !$21 : 0) { + break label$65 + } + __extenddftf2($6 + 496 | 0, +($5 | 0) * .25); + __addtf3($6 + 480 | 0, $8, $7, $18, $19, HEAP32[$6 + 496 >> 2], HEAP32[$6 + 500 >> 2], HEAP32[$6 + 504 >> 2], HEAP32[$6 + 508 >> 2]); + $18 = HEAP32[$6 + 488 >> 2]; + $19 = HEAP32[$6 + 492 >> 2]; + $8 = HEAP32[$6 + 480 >> 2]; + $7 = HEAP32[$6 + 484 >> 2]; + break label$65; + } + if (($21 | 0) != 5e8) { + __extenddftf2($6 + 592 | 0, +($5 | 0) * .75); + __addtf3($6 + 576 | 0, $8, $7, $18, $19, HEAP32[$6 + 592 >> 2], HEAP32[$6 + 596 >> 2], HEAP32[$6 + 600 >> 2], HEAP32[$6 + 604 >> 2]); + $18 = HEAP32[$6 + 584 >> 2]; + $19 = HEAP32[$6 + 588 >> 2]; + $8 = HEAP32[$6 + 576 >> 2]; + $7 = HEAP32[$6 + 580 >> 2]; + break label$65; + } + $24 = +($5 | 0); + if (($13 + 5 & 2047) == ($2 | 0)) { + __extenddftf2($6 + 528 | 0, $24 * .5); + __addtf3($6 + 512 | 0, $8, $7, $18, $19, HEAP32[$6 + 528 >> 2], HEAP32[$6 + 532 >> 2], HEAP32[$6 + 536 >> 2], HEAP32[$6 + 540 >> 2]); + $18 = HEAP32[$6 + 520 >> 2]; + $19 = HEAP32[$6 + 524 >> 2]; + $8 = HEAP32[$6 + 512 >> 2]; + $7 = HEAP32[$6 + 516 >> 2]; + break label$65; + } + __extenddftf2($6 + 560 | 0, $24 * .75); + __addtf3($6 + 544 | 0, $8, $7, $18, $19, HEAP32[$6 + 560 >> 2], HEAP32[$6 + 564 >> 2], HEAP32[$6 + 568 >> 2], HEAP32[$6 + 572 >> 2]); + $18 = HEAP32[$6 + 552 >> 2]; + $19 = HEAP32[$6 + 556 >> 2]; + $8 = HEAP32[$6 + 544 >> 2]; + $7 = HEAP32[$6 + 548 >> 2]; + } + if (($1 | 0) > 111) { + break label$64 + } + fmodl($6 + 464 | 0, $8, $7, $18, $19, 0, 0, 0, 1073676288); + if (__letf2(HEAP32[$6 + 464 >> 2], HEAP32[$6 + 468 >> 2], HEAP32[$6 + 472 >> 2], HEAP32[$6 + 476 >> 2], 0, 0, 0, 0)) { + break label$64 + } + __addtf3($6 + 448 | 0, $8, $7, $18, $19, 0, 0, 0, 1073676288); + $18 = HEAP32[$6 + 456 >> 2]; + $19 = HEAP32[$6 + 460 >> 2]; + $8 = HEAP32[$6 + 448 >> 2]; + $7 = HEAP32[$6 + 452 >> 2]; + } + __addtf3($6 + 432 | 0, $12, $16, $10, $11, $8, $7, $18, $19); + __subtf3($6 + 416 | 0, HEAP32[$6 + 432 >> 2], HEAP32[$6 + 436 >> 2], HEAP32[$6 + 440 >> 2], HEAP32[$6 + 444 >> 2], $14, $15, $9, $3); + $10 = HEAP32[$6 + 424 >> 2]; + $11 = HEAP32[$6 + 428 >> 2]; + $12 = HEAP32[$6 + 416 >> 2]; + $16 = HEAP32[$6 + 420 >> 2]; + label$69 : { + if (($23 & 2147483647) <= (-2 - $22 | 0)) { + break label$69 + } + $2 = $6 + 400 | 0; + HEAP32[$2 + 8 >> 2] = $10; + HEAP32[$2 + 12 >> 2] = $11 & 2147483647; + HEAP32[$2 >> 2] = $12; + HEAP32[$2 + 4 >> 2] = $16; + __multf3($6 + 384 | 0, $12, $16, $10, $11, 0, 0, 0, 1073610752); + $3 = __getf2(HEAP32[$6 + 400 >> 2], HEAP32[$6 + 404 >> 2], HEAP32[$6 + 408 >> 2], HEAP32[$6 + 412 >> 2], 1081081856); + $2 = ($3 | 0) < 0; + $10 = $2 ? $10 : HEAP32[$6 + 392 >> 2]; + $11 = $2 ? $11 : HEAP32[$6 + 396 >> 2]; + $12 = $2 ? $12 : HEAP32[$6 + 384 >> 2]; + $16 = $2 ? $16 : HEAP32[$6 + 388 >> 2]; + $17 = (($3 | 0) > -1) + $17 | 0; + if (wasm2js_i32$0 = !($20 & ($2 | ($1 | 0) != ($4 | 0)) & (__letf2($8, $7, $18, $19, 0, 0, 0, 0) | 0) != 0), wasm2js_i32$1 = 0, wasm2js_i32$2 = ($17 + 110 | 0) <= ($25 | 0), wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) { + break label$69 + } + HEAP32[2896] = 68; + } + scalbnl($6 + 368 | 0, $12, $16, $10, $11, $17); + $10 = HEAP32[$6 + 368 >> 2]; + $11 = HEAP32[$6 + 372 >> 2]; + $2 = HEAP32[$6 + 376 >> 2]; + $1 = HEAP32[$6 + 380 >> 2]; + } + HEAP32[$0 >> 2] = $10; + HEAP32[$0 + 4 >> 2] = $11; + HEAP32[$0 + 8 >> 2] = $2; + HEAP32[$0 + 12 >> 2] = $1; + global$0 = $6 + 8976 | 0; + } + + function scanexp($0) { + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0; + label$1 : { + label$2 : { + label$3 : { + $3 = HEAP32[$0 + 4 >> 2]; + label$4 : { + if ($3 >>> 0 < HEAPU32[$0 + 104 >> 2]) { + HEAP32[$0 + 4 >> 2] = $3 + 1; + $2 = HEAPU8[$3 | 0]; + break label$4; + } + $2 = __shgetc($0); + } + switch ($2 + -43 | 0) { + case 0: + case 2: + break label$2; + default: + break label$3; + }; + } + $1 = $2 + -48 | 0; + break label$1; + } + $5 = ($2 | 0) == 45; + $3 = HEAP32[$0 + 4 >> 2]; + label$6 : { + if ($3 >>> 0 < HEAPU32[$0 + 104 >> 2]) { + HEAP32[$0 + 4 >> 2] = $3 + 1; + $2 = HEAPU8[$3 | 0]; + break label$6; + } + $2 = __shgetc($0); + } + $1 = $2 + -48 | 0; + if (!($1 >>> 0 < 10 | !HEAP32[$0 + 104 >> 2])) { + HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + -1 + } + } + label$9 : { + if ($1 >>> 0 < 10) { + $1 = 0; + while (1) { + $1 = Math_imul($1, 10) + $2 | 0; + $3 = HEAP32[$0 + 4 >> 2]; + label$12 : { + if ($3 >>> 0 < HEAPU32[$0 + 104 >> 2]) { + HEAP32[$0 + 4 >> 2] = $3 + 1; + $2 = HEAPU8[$3 | 0]; + break label$12; + } + $2 = __shgetc($0); + } + $4 = $2 + -48 | 0; + $1 = $1 + -48 | 0; + if (($1 | 0) < 214748364 ? $4 >>> 0 <= 9 : 0) { + continue + } + break; + }; + $3 = $1; + $1 = $1 >> 31; + label$14 : { + if ($4 >>> 0 >= 10) { + break label$14 + } + while (1) { + $1 = __wasm_i64_mul($3, $1, 10, 0); + $3 = $1 + $2 | 0; + $2 = i64toi32_i32$HIGH_BITS; + $4 = $3 >>> 0 < $1 >>> 0 ? $2 + 1 | 0 : $2; + $1 = HEAP32[$0 + 4 >> 2]; + label$16 : { + if ($1 >>> 0 < HEAPU32[$0 + 104 >> 2]) { + HEAP32[$0 + 4 >> 2] = $1 + 1; + $2 = HEAPU8[$1 | 0]; + break label$16; + } + $2 = __shgetc($0); + } + $1 = $4 + -1 | 0; + $3 = $3 + -48 | 0; + if ($3 >>> 0 < 4294967248) { + $1 = $1 + 1 | 0 + } + $4 = $2 + -48 | 0; + if ($4 >>> 0 > 9) { + break label$14 + } + if (($1 | 0) < 21474836 ? 1 : ($1 | 0) <= 21474836 ? ($3 >>> 0 >= 2061584302 ? 0 : 1) : 0) { + continue + } + break; + }; + } + if ($4 >>> 0 < 10) { + while (1) { + $2 = HEAP32[$0 + 4 >> 2]; + label$20 : { + if ($2 >>> 0 < HEAPU32[$0 + 104 >> 2]) { + HEAP32[$0 + 4 >> 2] = $2 + 1; + $2 = HEAPU8[$2 | 0]; + break label$20; + } + $2 = __shgetc($0); + } + if ($2 + -48 >>> 0 < 10) { + continue + } + break; + } + } + if (HEAP32[$0 + 104 >> 2]) { + HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + -1 + } + $0 = $3; + $3 = $5 ? 0 - $0 | 0 : $0; + $1 = $5 ? 0 - ($1 + (0 < $0 >>> 0) | 0) | 0 : $1; + break label$9; + } + $3 = 0; + $1 = -2147483648; + if (!HEAP32[$0 + 104 >> 2]) { + break label$9 + } + HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + -1; + i64toi32_i32$HIGH_BITS = -2147483648; + return 0; + } + i64toi32_i32$HIGH_BITS = $1; + return $3; + } + + function strtox($0, $1) { + var $2 = 0, $3 = 0, $4 = 0; + $2 = global$0 - 160 | 0; + global$0 = $2; + memset($2 + 16 | 0, 144); + HEAP32[$2 + 92 >> 2] = -1; + HEAP32[$2 + 60 >> 2] = $1; + HEAP32[$2 + 24 >> 2] = -1; + HEAP32[$2 + 20 >> 2] = $1; + __shlim($2 + 16 | 0); + __floatscan($2, $2 + 16 | 0); + $1 = HEAP32[$2 + 8 >> 2]; + $3 = HEAP32[$2 + 12 >> 2]; + $4 = HEAP32[$2 + 4 >> 2]; + HEAP32[$0 >> 2] = HEAP32[$2 >> 2]; + HEAP32[$0 + 4 >> 2] = $4; + HEAP32[$0 + 8 >> 2] = $1; + HEAP32[$0 + 12 >> 2] = $3; + global$0 = $2 + 160 | 0; + } + + function strtod($0) { + var $1 = 0, $2 = 0.0; + $1 = global$0 - 16 | 0; + global$0 = $1; + strtox($1, $0); + $2 = __trunctfdf2(HEAP32[$1 >> 2], HEAP32[$1 + 4 >> 2], HEAP32[$1 + 8 >> 2], HEAP32[$1 + 12 >> 2]); + global$0 = $1 + 16 | 0; + return $2; + } + + function FLAC__stream_encoder_new() { + var $0 = 0, $1 = 0, $2 = 0, $3 = 0; + $1 = dlcalloc(1, 8); + if (!$1) { + return 0 + } + $0 = dlcalloc(1, 1032); + HEAP32[$1 >> 2] = $0; + label$2 : { + if (!$0) { + break label$2 + } + $3 = dlcalloc(1, 11856); + HEAP32[$1 + 4 >> 2] = $3; + if (!$3) { + dlfree($0); + break label$2; + } + $0 = dlcalloc(1, 20); + $3 = HEAP32[$1 + 4 >> 2]; + HEAP32[$3 + 6856 >> 2] = $0; + if (!$0) { + dlfree($3); + dlfree(HEAP32[$1 >> 2]); + break label$2; + } + HEAP32[$3 + 7296 >> 2] = 0; + $0 = HEAP32[$1 >> 2]; + HEAP32[$0 + 44 >> 2] = 13; + HEAP32[$0 + 48 >> 2] = 1056964608; + HEAP32[$0 + 36 >> 2] = 0; + HEAP32[$0 + 40 >> 2] = 1; + HEAP32[$0 + 28 >> 2] = 16; + HEAP32[$0 + 32 >> 2] = 44100; + HEAP32[$0 + 20 >> 2] = 0; + HEAP32[$0 + 24 >> 2] = 2; + HEAP32[$0 + 12 >> 2] = 1; + HEAP32[$0 + 16 >> 2] = 0; + HEAP32[$0 + 4 >> 2] = 0; + HEAP32[$0 + 8 >> 2] = 1; + $0 = HEAP32[$1 >> 2]; + HEAP32[$0 + 592 >> 2] = 0; + HEAP32[$0 + 596 >> 2] = 0; + HEAP32[$0 + 556 >> 2] = 0; + HEAP32[$0 + 560 >> 2] = 0; + HEAP32[$0 + 564 >> 2] = 0; + HEAP32[$0 + 568 >> 2] = 0; + HEAP32[$0 + 572 >> 2] = 0; + HEAP32[$0 + 576 >> 2] = 0; + HEAP32[$0 + 580 >> 2] = 0; + HEAP32[$0 + 584 >> 2] = 0; + HEAP32[$0 + 600 >> 2] = 0; + HEAP32[$0 + 604 >> 2] = 0; + $3 = HEAP32[$1 + 4 >> 2]; + $2 = $3; + HEAP32[$2 + 7248 >> 2] = 0; + HEAP32[$2 + 7252 >> 2] = 0; + HEAP32[$2 + 7048 >> 2] = 0; + $2 = $2 + 7256 | 0; + HEAP32[$2 >> 2] = 0; + HEAP32[$2 + 4 >> 2] = 0; + $2 = $3 + 7264 | 0; + HEAP32[$2 >> 2] = 0; + HEAP32[$2 + 4 >> 2] = 0; + $2 = $3 + 7272 | 0; + HEAP32[$2 >> 2] = 0; + HEAP32[$2 + 4 >> 2] = 0; + $2 = $3 + 7280 | 0; + HEAP32[$2 >> 2] = 0; + HEAP32[$2 + 4 >> 2] = 0; + HEAP32[$3 + 7288 >> 2] = 0; + FLAC__ogg_encoder_aspect_set_defaults($0 + 632 | 0); + $0 = HEAP32[$1 >> 2]; + label$5 : { + if (HEAP32[$0 >> 2] != 1) { + break label$5 + } + HEAP32[$0 + 16 >> 2] = 1; + HEAP32[$0 + 20 >> 2] = 0; + FLAC__stream_encoder_set_apodization($1, 10777); + $0 = HEAP32[$1 >> 2]; + if (HEAP32[$0 >> 2] != 1) { + break label$5 + } + HEAP32[$0 + 576 >> 2] = 0; + HEAP32[$0 + 580 >> 2] = 5; + HEAP32[$0 + 564 >> 2] = 0; + HEAP32[$0 + 568 >> 2] = 0; + HEAP32[$0 + 556 >> 2] = 8; + HEAP32[$0 + 560 >> 2] = 0; + } + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 11848 >> 2] = 0; + HEAP32[$0 + 6176 >> 2] = $0 + 336; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6180 >> 2] = $0 + 628; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6184 >> 2] = $0 + 920; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6188 >> 2] = $0 + 1212; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6192 >> 2] = $0 + 1504; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6196 >> 2] = $0 + 1796; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6200 >> 2] = $0 + 2088; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6204 >> 2] = $0 + 2380; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6208 >> 2] = $0 + 2672; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6212 >> 2] = $0 + 2964; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6216 >> 2] = $0 + 3256; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6220 >> 2] = $0 + 3548; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6224 >> 2] = $0 + 3840; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6228 >> 2] = $0 + 4132; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6232 >> 2] = $0 + 4424; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6236 >> 2] = $0 + 4716; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6240 >> 2] = $0 + 5008; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6244 >> 2] = $0 + 5300; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6248 >> 2] = $0 + 5592; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6252 >> 2] = $0 + 5884; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6640 >> 2] = $0 + 6256; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6644 >> 2] = $0 + 6268; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6648 >> 2] = $0 + 6280; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6652 >> 2] = $0 + 6292; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6656 >> 2] = $0 + 6304; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6660 >> 2] = $0 + 6316; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6664 >> 2] = $0 + 6328; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6668 >> 2] = $0 + 6340; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6672 >> 2] = $0 + 6352; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6676 >> 2] = $0 + 6364; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6680 >> 2] = $0 + 6376; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6684 >> 2] = $0 + 6388; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6688 >> 2] = $0 + 6400; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6692 >> 2] = $0 + 6412; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6696 >> 2] = $0 + 6424; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6700 >> 2] = $0 + 6436; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6704 >> 2] = $0 + 6448; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6708 >> 2] = $0 + 6460; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6712 >> 2] = $0 + 6472; + $0 = HEAP32[$1 + 4 >> 2]; + HEAP32[$0 + 6716 >> 2] = $0 + 6484; + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6256 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6268 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6280 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6292 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6304 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6316 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6328 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6340 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6352 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6364 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6376 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6388 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6400 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6412 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6424 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6436 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6448 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6460 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6472 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6484 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 11724 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 11736 | 0); + HEAP32[HEAP32[$1 >> 2] >> 2] = 1; + return $1 | 0; + } + dlfree($1); + return 0; + } + + function FLAC__stream_encoder_set_apodization($0, $1) { + var $2 = 0, $3 = 0, $4 = 0, $5 = Math_fround(0), $6 = Math_fround(0), $7 = 0, $8 = 0.0, $9 = Math_fround(0), $10 = 0, $11 = 0; + $2 = HEAP32[$0 >> 2]; + label$1 : { + if (HEAP32[$2 >> 2] != 1) { + break label$1 + } + HEAP32[$2 + 40 >> 2] = 0; + while (1) { + label$3 : { + label$4 : { + label$5 : { + label$6 : { + label$7 : { + label$8 : { + label$9 : { + label$10 : { + label$11 : { + label$12 : { + label$13 : { + label$14 : { + label$15 : { + label$16 : { + $10 = strchr($1, 59); + label$17 : { + if ($10) { + $4 = $10 - $1 | 0; + break label$17; + } + $4 = strlen($1); + } + $11 = ($4 | 0) != 8; + if (!$11) { + if (strncmp(10584, $1, 8)) { + break label$16 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 0; + break label$3; + } + label$20 : { + switch ($4 + -6 | 0) { + case 1: + break label$13; + case 0: + break label$14; + case 20: + break label$15; + case 7: + break label$20; + default: + break label$12; + }; + } + $7 = 1; + if (strncmp(10593, $1, 13)) { + break label$11 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 1; + break label$3; + } + $7 = 0; + if (strncmp(10607, $1, 8)) { + break label$11 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 2; + break label$3; + } + $7 = 0; + if (strncmp(10616, $1, 26)) { + break label$11 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 3; + break label$3; + } + if (strncmp(10643, $1, 6)) { + break label$3 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 4; + break label$3; + } + if (strncmp(10650, $1, 7)) { + break label$10 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 5; + break label$3; + } + $7 = 0; + if ($4 >>> 0 < 8) { + break label$9 + } + } + if (strncmp(10658, $1, 6)) { + break label$8 + } + $6 = Math_fround(strtod($1 + 6 | 0)); + if ($6 > Math_fround(0.0) ^ 1 | $6 <= Math_fround(.5) ^ 1) { + break label$3 + } + $1 = HEAP32[$0 >> 2]; + HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 48 >> 2] = $6; + $1 = HEAP32[$0 >> 2]; + $4 = HEAP32[$1 + 40 >> 2]; + HEAP32[$1 + 40 >> 2] = $4 + 1; + HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 6; + break label$3; + } + if (strncmp(10665, $1, 7)) { + break label$7 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 7; + break label$3; + } + label$21 : { + switch ($4 + -4 | 0) { + case 0: + break label$21; + case 1: + break label$5; + default: + break label$3; + }; + } + if (strncmp(10673, $1, 4)) { + break label$3 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 8; + break label$3; + } + if (!$7) { + break label$6 + } + if (strncmp(10678, $1, 13)) { + break label$6 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 9; + break label$3; + } + if (strncmp(10692, $1, 7)) { + break label$3 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 10; + break label$3; + } + label$22 : { + if (($4 | 0) != 9) { + break label$22 + } + if (strncmp(10700, $1, 9)) { + break label$22 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 11; + break label$3; + } + if (!$11) { + if (!strncmp(10710, $1, 8)) { + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 12; + break label$3; + } + if (strncmp(10719, $1, 6)) { + break label$3 + } + break label$4; + } + if (!strncmp(10719, $1, 6)) { + break label$4 + } + if ($4 >>> 0 < 16) { + break label$3 + } + if (!strncmp(10726, $1, 14)) { + $8 = strtod($1 + 14 | 0); + label$26 : { + if (Math_abs($8) < 2147483648.0) { + $4 = ~~$8; + break label$26; + } + $4 = -2147483648; + } + $3 = strchr($1, 47); + $5 = Math_fround(.10000000149011612); + label$28 : { + if (!$3) { + break label$28 + } + $2 = $3 + 1 | 0; + $5 = Math_fround(.9900000095367432); + if (!(Math_fround(strtod($2)) < Math_fround(.9900000095367432))) { + break label$28 + } + $5 = Math_fround(strtod($2)); + } + $1 = strchr($3 ? $3 + 1 | 0 : $1, 47); + $6 = Math_fround(.20000000298023224); + label$30 : { + if (!$1) { + break label$30 + } + $6 = Math_fround(strtod($1 + 1 | 0)); + } + $1 = HEAP32[$0 >> 2]; + $2 = HEAP32[$1 + 40 >> 2]; + if (($4 | 0) <= 1) { + HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6; + $1 = HEAP32[$0 >> 2]; + $4 = HEAP32[$1 + 40 >> 2]; + HEAP32[$1 + 40 >> 2] = $4 + 1; + HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 13; + break label$3; + } + if ($2 + $4 >>> 0 > 31) { + break label$3 + } + $9 = Math_fround(Math_fround(Math_fround(1.0) / Math_fround(Math_fround(1.0) - $5)) + Math_fround(-1.0)); + $5 = Math_fround($9 + Math_fround($4 | 0)); + $3 = 0; + while (1) { + HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6; + $1 = HEAP32[$0 >> 2]; + HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 52 >> 2] = Math_fround($3 | 0) / $5; + $1 = HEAP32[$0 >> 2]; + $3 = $3 + 1 | 0; + HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 56 >> 2] = Math_fround($9 + Math_fround($3 | 0)) / $5; + $1 = HEAP32[$0 >> 2]; + $7 = HEAP32[$1 + 40 >> 2]; + $2 = $7 + 1 | 0; + HEAP32[$1 + 40 >> 2] = $2; + HEAP32[(($7 << 4) + $1 | 0) + 44 >> 2] = 14; + if (($3 | 0) != ($4 | 0)) { + continue + } + break; + }; + break label$3; + } + if ($4 >>> 0 < 17) { + break label$3 + } + if (strncmp(10741, $1, 15)) { + break label$3 + } + $8 = strtod($1 + 15 | 0); + label$33 : { + if (Math_abs($8) < 2147483648.0) { + $4 = ~~$8; + break label$33; + } + $4 = -2147483648; + } + $6 = Math_fround(.20000000298023224); + $3 = strchr($1, 47); + $5 = Math_fround(.20000000298023224); + label$35 : { + if (!$3) { + break label$35 + } + $2 = $3 + 1 | 0; + $5 = Math_fround(.9900000095367432); + if (!(Math_fround(strtod($2)) < Math_fround(.9900000095367432))) { + break label$35 + } + $5 = Math_fround(strtod($2)); + } + $1 = strchr($3 ? $3 + 1 | 0 : $1, 47); + if ($1) { + $6 = Math_fround(strtod($1 + 1 | 0)) + } + $1 = HEAP32[$0 >> 2]; + $2 = HEAP32[$1 + 40 >> 2]; + if (($4 | 0) <= 1) { + HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6; + $1 = HEAP32[$0 >> 2]; + $4 = HEAP32[$1 + 40 >> 2]; + HEAP32[$1 + 40 >> 2] = $4 + 1; + HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 13; + break label$3; + } + if ($2 + $4 >>> 0 > 31) { + break label$3 + } + $9 = Math_fround(Math_fround(Math_fround(1.0) / Math_fround(Math_fround(1.0) - $5)) + Math_fround(-1.0)); + $5 = Math_fround($9 + Math_fround($4 | 0)); + $3 = 0; + while (1) { + HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6; + $1 = HEAP32[$0 >> 2]; + HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 52 >> 2] = Math_fround($3 | 0) / $5; + $1 = HEAP32[$0 >> 2]; + $3 = $3 + 1 | 0; + HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 56 >> 2] = Math_fround($9 + Math_fround($3 | 0)) / $5; + $1 = HEAP32[$0 >> 2]; + $7 = HEAP32[$1 + 40 >> 2]; + $2 = $7 + 1 | 0; + HEAP32[$1 + 40 >> 2] = $2; + HEAP32[(($7 << 4) + $1 | 0) + 44 >> 2] = 15; + if (($3 | 0) != ($4 | 0)) { + continue + } + break; + }; + break label$3; + } + if (strncmp(10757, $1, 5)) { + break label$3 + } + HEAP32[$2 + 40 >> 2] = $3 + 1; + HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 16; + break label$3; + } + $6 = Math_fround(strtod($1 + 6 | 0)); + if ($6 >= Math_fround(0.0) ^ 1 | $6 <= Math_fround(1.0) ^ 1) { + break label$3 + } + $1 = HEAP32[$0 >> 2]; + HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 48 >> 2] = $6; + $1 = HEAP32[$0 >> 2]; + $4 = HEAP32[$1 + 40 >> 2]; + HEAP32[$1 + 40 >> 2] = $4 + 1; + HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 13; + } + $2 = HEAP32[$0 >> 2]; + $3 = HEAP32[$2 + 40 >> 2]; + if ($10) { + $1 = $10 + 1 | 0; + if (($3 | 0) != 32) { + continue + } + } + break; + }; + $4 = 1; + if ($3) { + break label$1 + } + HEAP32[$2 + 40 >> 2] = 1; + HEAP32[$2 + 44 >> 2] = 13; + HEAP32[$2 + 48 >> 2] = 1056964608; + } + return $4; + } + + function FLAC__stream_encoder_delete($0) { + $0 = $0 | 0; + var $1 = 0, $2 = 0; + if ($0) { + HEAP32[HEAP32[$0 + 4 >> 2] + 11848 >> 2] = 1; + FLAC__stream_encoder_finish($0); + $1 = HEAP32[$0 + 4 >> 2]; + $2 = HEAP32[$1 + 11752 >> 2]; + if ($2) { + FLAC__stream_decoder_delete($2); + $1 = HEAP32[$0 + 4 >> 2]; + } + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear($1 + 6256 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6268 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6280 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6292 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6304 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6316 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6328 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6340 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6352 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6364 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6376 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6388 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6400 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6412 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6424 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6436 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6448 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6460 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6472 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6484 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 11724 | 0); + FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 11736 | 0); + FLAC__bitreader_delete(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]); + dlfree(HEAP32[$0 + 4 >> 2]); + dlfree(HEAP32[$0 >> 2]); + dlfree($0); + } + } + + function FLAC__stream_encoder_finish($0) { + $0 = $0 | 0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; + $7 = global$0 - 32 | 0; + global$0 = $7; + label$1 : { + if (!$0) { + break label$1 + } + label$3 : { + label$4 : { + $5 = HEAP32[$0 >> 2]; + $1 = HEAP32[$5 >> 2]; + switch ($1 | 0) { + case 1: + break label$1; + case 0: + break label$4; + default: + break label$3; + }; + } + $2 = HEAP32[$0 + 4 >> 2]; + if (HEAP32[$2 + 11848 >> 2]) { + break label$3 + } + $2 = HEAP32[$2 + 7052 >> 2]; + if (!$2) { + break label$3 + } + $3 = HEAP32[$5 + 36 >> 2]; + HEAP32[$5 + 36 >> 2] = $2; + $3 = !process_frame_($0, ($2 | 0) != ($3 | 0), 1); + $5 = HEAP32[$0 >> 2]; + } + if (HEAP32[$5 + 12 >> 2]) { + $2 = HEAP32[$0 + 4 >> 2]; + FLAC__MD5Final($2 + 6928 | 0, $2 + 7060 | 0); + } + $5 = $0 + 4 | 0; + $1 = HEAP32[$0 + 4 >> 2]; + label$6 : { + if (HEAP32[$1 + 11848 >> 2]) { + $2 = $3; + break label$6; + } + $4 = HEAP32[$0 >> 2]; + label$8 : { + if (HEAP32[$4 >> 2]) { + break label$8 + } + $11 = HEAP32[$1 + 7268 >> 2]; + if ($11) { + label$10 : { + if (HEAP32[$1 + 7260 >> 2]) { + $13 = HEAP32[$1 + 6900 >> 2]; + $12 = HEAP32[$1 + 6896 >> 2]; + $2 = $1 + 6920 | 0; + $8 = HEAP32[$2 >> 2]; + $9 = HEAP32[$2 + 4 >> 2]; + if ((FUNCTION_TABLE[$11]($0, 0, 0, HEAP32[$1 + 7288 >> 2]) | 0) == 2) { + break label$10 + } + simple_ogg_page__init($7); + $2 = HEAP32[$0 >> 2]; + $4 = HEAP32[$2 + 608 >> 2]; + $6 = HEAP32[$2 + 612 >> 2]; + $2 = HEAP32[$0 + 4 >> 2]; + label$12 : { + if (!simple_ogg_page__get_at($0, $4, $6, $7, HEAP32[$2 + 7268 >> 2], HEAP32[$2 + 7264 >> 2], HEAP32[$2 + 7288 >> 2])) { + break label$12 + } + $11 = HEAP32[1357] + HEAP32[1356] | 0; + $14 = HEAP32[1362] + (HEAP32[1361] + (HEAP32[1360] + (HEAP32[1359] + ($11 + HEAP32[1358] | 0) | 0) | 0) | 0) | 0; + $2 = $14 + HEAP32[1363] >>> 3 | 0; + if ($2 + 33 >>> 0 > HEAPU32[$7 + 12 >> 2]) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + simple_ogg_page__clear($7); + break label$10; + } + $4 = $1 + 6936 | 0; + $10 = HEAPU8[$4 + 4 | 0] | HEAPU8[$4 + 5 | 0] << 8 | (HEAPU8[$4 + 6 | 0] << 16 | HEAPU8[$4 + 7 | 0] << 24); + $2 = $2 + HEAP32[$7 + 8 >> 2] | 0; + $4 = HEAPU8[$4 | 0] | HEAPU8[$4 + 1 | 0] << 8 | (HEAPU8[$4 + 2 | 0] << 16 | HEAPU8[$4 + 3 | 0] << 24); + HEAP8[$2 + 25 | 0] = $4; + HEAP8[$2 + 26 | 0] = $4 >>> 8; + HEAP8[$2 + 27 | 0] = $4 >>> 16; + HEAP8[$2 + 28 | 0] = $4 >>> 24; + HEAP8[$2 + 29 | 0] = $10; + HEAP8[$2 + 30 | 0] = $10 >>> 8; + HEAP8[$2 + 31 | 0] = $10 >>> 16; + HEAP8[$2 + 32 | 0] = $10 >>> 24; + $1 = $1 + 6928 | 0; + $4 = HEAPU8[$1 + 4 | 0] | HEAPU8[$1 + 5 | 0] << 8 | (HEAPU8[$1 + 6 | 0] << 16 | HEAPU8[$1 + 7 | 0] << 24); + $1 = HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24); + HEAP8[$2 + 17 | 0] = $1; + HEAP8[$2 + 18 | 0] = $1 >>> 8; + HEAP8[$2 + 19 | 0] = $1 >>> 16; + HEAP8[$2 + 20 | 0] = $1 >>> 24; + HEAP8[$2 + 21 | 0] = $4; + HEAP8[$2 + 22 | 0] = $4 >>> 8; + HEAP8[$2 + 23 | 0] = $4 >>> 16; + HEAP8[$2 + 24 | 0] = $4 >>> 24; + $2 = $14 + -4 >>> 3 | 0; + if ($2 + 22 >>> 0 > HEAPU32[$7 + 12 >> 2]) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + simple_ogg_page__clear($7); + break label$10; + } + $2 = $2 + HEAP32[$7 + 8 >> 2] | 0; + HEAP8[$2 + 21 | 0] = $8; + HEAP8[$2 + 20 | 0] = ($9 & 255) << 24 | $8 >>> 8; + HEAP8[$2 + 19 | 0] = ($9 & 65535) << 16 | $8 >>> 16; + HEAP8[$2 + 18 | 0] = ($9 & 16777215) << 8 | $8 >>> 24; + $2 = $2 + 17 | 0; + HEAP8[$2 | 0] = HEAPU8[$2 | 0] & 240 | $9 & 15; + $2 = $11 >>> 3 | 0; + if ($2 + 23 >>> 0 > HEAPU32[$7 + 12 >> 2]) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + simple_ogg_page__clear($7); + break label$10; + } + $2 = $2 + HEAP32[$7 + 8 >> 2] | 0; + HEAP8[$2 + 22 | 0] = $13; + HEAP8[$2 + 21 | 0] = $13 >>> 8; + HEAP8[$2 + 20 | 0] = $13 >>> 16; + HEAP8[$2 + 19 | 0] = $12; + HEAP8[$2 + 18 | 0] = $12 >>> 8; + HEAP8[$2 + 17 | 0] = $12 >>> 16; + $2 = HEAP32[$0 >> 2]; + $4 = HEAP32[$2 + 608 >> 2]; + $1 = HEAP32[$2 + 612 >> 2]; + $2 = HEAP32[$0 + 4 >> 2]; + $2 = simple_ogg_page__set_at($0, $4, $1, $7, HEAP32[$2 + 7268 >> 2], HEAP32[$2 + 7276 >> 2], HEAP32[$2 + 7288 >> 2]); + simple_ogg_page__clear($7); + if (!$2) { + break label$10 + } + $2 = HEAP32[HEAP32[$5 >> 2] + 7048 >> 2]; + if (!$2 | !HEAP32[$2 >> 2]) { + break label$10 + } + $1 = HEAP32[$0 >> 2]; + if (!(HEAP32[$1 + 616 >> 2] | HEAP32[$1 + 620 >> 2])) { + break label$10 + } + FLAC__format_seektable_sort($2); + simple_ogg_page__init($7); + $2 = HEAP32[$0 >> 2]; + $4 = HEAP32[$2 + 616 >> 2]; + $1 = HEAP32[$2 + 620 >> 2]; + $2 = HEAP32[$0 + 4 >> 2]; + if (!simple_ogg_page__get_at($0, $4, $1, $7, HEAP32[$2 + 7268 >> 2], HEAP32[$2 + 7264 >> 2], HEAP32[$2 + 7288 >> 2])) { + break label$12 + } + $6 = HEAP32[$5 >> 2]; + $2 = HEAP32[$6 + 7048 >> 2]; + $1 = HEAP32[$2 >> 2]; + if (HEAP32[$7 + 12 >> 2] != (Math_imul($1, 18) + 4 | 0)) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + simple_ogg_page__clear($7); + break label$10; + } + if ($1) { + $1 = HEAP32[$7 + 8 >> 2] + 4 | 0; + $4 = 0; + while (1) { + $8 = HEAP32[$2 + 4 >> 2] + Math_imul($4, 24) | 0; + $9 = HEAP32[$8 >> 2]; + $2 = HEAP32[$8 + 4 >> 2]; + $10 = HEAP32[$8 + 8 >> 2]; + $6 = HEAP32[$8 + 12 >> 2]; + $8 = HEAP32[$8 + 16 >> 2]; + HEAP8[$1 + 17 | 0] = $8; + HEAP8[$1 + 15 | 0] = $10; + HEAP8[$1 + 7 | 0] = $9; + HEAP8[$1 + 16 | 0] = $8 >>> 8; + HEAP8[$1 + 14 | 0] = ($6 & 255) << 24 | $10 >>> 8; + HEAP8[$1 + 13 | 0] = ($6 & 65535) << 16 | $10 >>> 16; + HEAP8[$1 + 12 | 0] = ($6 & 16777215) << 8 | $10 >>> 24; + HEAP8[$1 + 11 | 0] = $6; + HEAP8[$1 + 10 | 0] = $6 >>> 8; + HEAP8[$1 + 9 | 0] = $6 >>> 16; + HEAP8[$1 + 8 | 0] = $6 >>> 24; + HEAP8[$1 + 6 | 0] = ($2 & 255) << 24 | $9 >>> 8; + HEAP8[$1 + 5 | 0] = ($2 & 65535) << 16 | $9 >>> 16; + HEAP8[$1 + 4 | 0] = ($2 & 16777215) << 8 | $9 >>> 24; + HEAP8[$1 + 3 | 0] = $2; + HEAP8[$1 + 2 | 0] = $2 >>> 8; + HEAP8[$1 + 1 | 0] = $2 >>> 16; + HEAP8[$1 | 0] = $2 >>> 24; + $1 = $1 + 18 | 0; + $4 = $4 + 1 | 0; + $6 = HEAP32[$5 >> 2]; + $2 = HEAP32[$6 + 7048 >> 2]; + if ($4 >>> 0 < HEAPU32[$2 >> 2]) { + continue + } + break; + }; + } + $2 = HEAP32[$0 >> 2]; + simple_ogg_page__set_at($0, HEAP32[$2 + 616 >> 2], HEAP32[$2 + 620 >> 2], $7, HEAP32[$6 + 7268 >> 2], HEAP32[$6 + 7276 >> 2], HEAP32[$6 + 7288 >> 2]); + } + simple_ogg_page__clear($7); + break label$10; + } + $13 = HEAP32[$1 + 6912 >> 2]; + $8 = HEAP32[$1 + 6900 >> 2]; + $9 = HEAP32[$1 + 6896 >> 2]; + $6 = $1 + 6920 | 0; + $2 = HEAP32[$6 >> 2]; + $6 = HEAP32[$6 + 4 >> 2]; + label$19 : { + label$20 : { + $16 = $0; + $10 = HEAP32[$4 + 612 >> 2]; + $12 = HEAP32[1357] + HEAP32[1356] | 0; + $14 = HEAP32[1362] + (HEAP32[1361] + (HEAP32[1360] + (HEAP32[1359] + ($12 + HEAP32[1358] | 0) | 0) | 0) | 0) | 0; + $15 = ($14 + HEAP32[1363] >>> 3 | 0) + 4 | 0; + $4 = $15 + HEAP32[$4 + 608 >> 2] | 0; + if ($4 >>> 0 < $15 >>> 0) { + $10 = $10 + 1 | 0 + } + switch (FUNCTION_TABLE[$11]($16, $4, $10, HEAP32[$1 + 7288 >> 2]) | 0) { + case 0: + break label$19; + case 1: + break label$20; + default: + break label$10; + }; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + break label$10; + } + $4 = $1 + 6928 | 0; + $1 = HEAP32[$0 + 4 >> 2]; + if (FUNCTION_TABLE[HEAP32[$1 + 7276 >> 2]]($0, $4, 16, 0, 0, HEAP32[$1 + 7288 >> 2])) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + break label$10; + } + HEAP8[$7 + 4 | 0] = $2; + HEAP8[$7 + 3 | 0] = ($6 & 255) << 24 | $2 >>> 8; + HEAP8[$7 + 2 | 0] = ($6 & 65535) << 16 | $2 >>> 16; + HEAP8[$7 + 1 | 0] = ($6 & 16777215) << 8 | $2 >>> 24; + HEAP8[$7 | 0] = ($6 & 15 | $13 << 4) + 240; + label$22 : { + label$23 : { + $2 = ($14 + -4 >>> 3 | 0) + 4 | 0; + $1 = HEAP32[$0 >> 2]; + $4 = $2 + HEAP32[$1 + 608 >> 2] | 0; + $1 = HEAP32[$1 + 612 >> 2]; + $1 = $4 >>> 0 < $2 >>> 0 ? $1 + 1 | 0 : $1; + $2 = HEAP32[$0 + 4 >> 2]; + switch (FUNCTION_TABLE[HEAP32[$2 + 7268 >> 2]]($0, $4, $1, HEAP32[$2 + 7288 >> 2]) | 0) { + case 0: + break label$22; + case 1: + break label$23; + default: + break label$10; + }; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + break label$10; + } + $2 = HEAP32[$0 + 4 >> 2]; + if (FUNCTION_TABLE[HEAP32[$2 + 7276 >> 2]]($0, $7, 5, 0, 0, HEAP32[$2 + 7288 >> 2])) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + break label$10; + } + HEAP8[$7 + 5 | 0] = $8; + HEAP8[$7 + 4 | 0] = $8 >>> 8; + HEAP8[$7 + 3 | 0] = $8 >>> 16; + HEAP8[$7 + 2 | 0] = $9; + HEAP8[$7 + 1 | 0] = $9 >>> 8; + HEAP8[$7 | 0] = $9 >>> 16; + label$25 : { + label$26 : { + $2 = ($12 >>> 3 | 0) + 4 | 0; + $1 = HEAP32[$0 >> 2]; + $4 = $2 + HEAP32[$1 + 608 >> 2] | 0; + $1 = HEAP32[$1 + 612 >> 2]; + $1 = $4 >>> 0 < $2 >>> 0 ? $1 + 1 | 0 : $1; + $2 = HEAP32[$0 + 4 >> 2]; + switch (FUNCTION_TABLE[HEAP32[$2 + 7268 >> 2]]($0, $4, $1, HEAP32[$2 + 7288 >> 2]) | 0) { + case 0: + break label$25; + case 1: + break label$26; + default: + break label$10; + }; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + break label$10; + } + $2 = HEAP32[$0 + 4 >> 2]; + if (FUNCTION_TABLE[HEAP32[$2 + 7276 >> 2]]($0, $7, 6, 0, 0, HEAP32[$2 + 7288 >> 2])) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + break label$10; + } + $2 = HEAP32[HEAP32[$5 >> 2] + 7048 >> 2]; + if (!$2 | !HEAP32[$2 >> 2]) { + break label$10 + } + $1 = HEAP32[$0 >> 2]; + if (!(HEAP32[$1 + 616 >> 2] | HEAP32[$1 + 620 >> 2])) { + break label$10 + } + FLAC__format_seektable_sort($2); + label$28 : { + label$29 : { + label$30 : { + $2 = HEAP32[$0 >> 2]; + $1 = HEAP32[$2 + 616 >> 2] + 4 | 0; + $2 = HEAP32[$2 + 620 >> 2]; + $4 = $1 >>> 0 < 4 ? $2 + 1 | 0 : $2; + $2 = HEAP32[$0 + 4 >> 2]; + switch (FUNCTION_TABLE[HEAP32[$2 + 7268 >> 2]]($0, $1, $4, HEAP32[$2 + 7288 >> 2]) | 0) { + case 1: + break label$29; + case 0: + break label$30; + default: + break label$10; + }; + } + $4 = HEAP32[$5 >> 2]; + $1 = HEAP32[$4 + 7048 >> 2]; + if (!HEAP32[$1 >> 2]) { + break label$10 + } + $6 = 0; + break label$28; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + break label$10; + } + while (1) { + label$32 : { + $9 = Math_imul($6, 24); + $8 = $9 + HEAP32[$1 + 4 >> 2] | 0; + $2 = HEAP32[$8 + 4 >> 2]; + $8 = HEAP32[$8 >> 2]; + $10 = $8 << 24 | $8 << 8 & 16711680; + HEAP32[$7 >> 2] = (($2 & 255) << 24 | $8 >>> 8) & -16777216 | (($2 & 16777215) << 8 | $8 >>> 24) & 16711680 | ($2 >>> 8 & 65280 | $2 >>> 24); + HEAP32[$7 + 4 >> 2] = ($2 << 24 | $8 >>> 8) & 65280 | ($2 << 8 | $8 >>> 24) & 255 | $10; + $8 = $9 + HEAP32[$1 + 4 >> 2] | 0; + $2 = HEAP32[$8 + 12 >> 2]; + $8 = HEAP32[$8 + 8 >> 2]; + $10 = $8 << 24 | $8 << 8 & 16711680; + HEAP32[$7 + 8 >> 2] = (($2 & 255) << 24 | $8 >>> 8) & -16777216 | (($2 & 16777215) << 8 | $8 >>> 24) & 16711680 | ($2 >>> 8 & 65280 | $2 >>> 24); + HEAP32[$7 + 12 >> 2] = ($2 << 24 | $8 >>> 8) & 65280 | ($2 << 8 | $8 >>> 24) & 255 | $10; + $2 = HEAPU16[($9 + HEAP32[$1 + 4 >> 2] | 0) + 16 >> 1]; + HEAP16[$7 + 16 >> 1] = ($2 << 24 | $2 << 8 & 16711680) >>> 16; + if (FUNCTION_TABLE[HEAP32[$4 + 7276 >> 2]]($0, $7, 18, 0, 0, HEAP32[$4 + 7288 >> 2])) { + break label$32 + } + $6 = $6 + 1 | 0; + $4 = HEAP32[$5 >> 2]; + $1 = HEAP32[$4 + 7048 >> 2]; + if ($6 >>> 0 < HEAPU32[$1 >> 2]) { + continue + } + break label$10; + } + break; + }; + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + } + $1 = HEAP32[$0 + 4 >> 2]; + $4 = HEAP32[$0 >> 2]; + $3 = HEAP32[$4 >> 2] ? 1 : $3; + } + $2 = HEAP32[$1 + 7280 >> 2]; + if (!$2) { + break label$8 + } + FUNCTION_TABLE[$2]($0, $1 + 6872 | 0, HEAP32[$1 + 7288 >> 2]); + $4 = HEAP32[$0 >> 2]; + } + if (!HEAP32[$4 + 4 >> 2]) { + $2 = $3; + break label$6; + } + $2 = HEAP32[HEAP32[$5 >> 2] + 11752 >> 2]; + if (!$2) { + $2 = $3; + break label$6; + } + if (FLAC__stream_decoder_finish($2)) { + $2 = $3; + break label$6; + } + $2 = 1; + if ($3) { + break label$6 + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 4; + } + $1 = HEAP32[$5 >> 2]; + $3 = HEAP32[$1 + 7296 >> 2]; + if ($3) { + if (($3 | 0) != HEAP32[1896]) { + fclose($3); + $1 = HEAP32[$5 >> 2]; + } + HEAP32[$1 + 7296 >> 2] = 0; + } + if (HEAP32[$1 + 7260 >> 2]) { + ogg_stream_clear(HEAP32[$0 >> 2] + 640 | 0) + } + $1 = HEAP32[$0 >> 2]; + $3 = HEAP32[$1 + 600 >> 2]; + if ($3) { + dlfree($3); + $1 = HEAP32[$0 >> 2]; + HEAP32[$1 + 600 >> 2] = 0; + HEAP32[$1 + 604 >> 2] = 0; + } + if (HEAP32[$1 + 24 >> 2]) { + $3 = 0; + while (1) { + $4 = HEAP32[$5 >> 2]; + $1 = $3 << 2; + $6 = HEAP32[($4 + $1 | 0) + 7328 >> 2]; + if ($6) { + dlfree($6); + HEAP32[($1 + HEAP32[$5 >> 2] | 0) + 7328 >> 2] = 0; + $4 = HEAP32[$5 >> 2]; + } + $4 = HEAP32[($4 + $1 | 0) + 7368 >> 2]; + if ($4) { + dlfree($4); + HEAP32[($1 + HEAP32[$5 >> 2] | 0) + 7368 >> 2] = 0; + } + $3 = $3 + 1 | 0; + if ($3 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) { + continue + } + break; + }; + } + $1 = HEAP32[$5 >> 2]; + $3 = HEAP32[$1 + 7360 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$5 >> 2] + 7360 >> 2] = 0; + $1 = HEAP32[$5 >> 2]; + } + $3 = HEAP32[$1 + 7400 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$5 >> 2] + 7400 >> 2] = 0; + $1 = HEAP32[$5 >> 2]; + } + $3 = HEAP32[$1 + 7364 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$5 >> 2] + 7364 >> 2] = 0; + $1 = HEAP32[$5 >> 2]; + } + $3 = HEAP32[$1 + 7404 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$5 >> 2] + 7404 >> 2] = 0; + $1 = HEAP32[$5 >> 2]; + } + $4 = HEAP32[$0 >> 2]; + if (HEAP32[$4 + 40 >> 2]) { + $3 = 0; + while (1) { + $6 = $3 << 2; + $8 = HEAP32[($6 + $1 | 0) + 7408 >> 2]; + if ($8) { + dlfree($8); + HEAP32[($6 + HEAP32[$0 + 4 >> 2] | 0) + 7408 >> 2] = 0; + $4 = HEAP32[$0 >> 2]; + $1 = HEAP32[$0 + 4 >> 2]; + } + $3 = $3 + 1 | 0; + if ($3 >>> 0 < HEAPU32[$4 + 40 >> 2]) { + continue + } + break; + }; + } + $3 = HEAP32[$1 + 7536 >> 2]; + if ($3) { + dlfree($3); + $1 = HEAP32[$0 + 4 >> 2]; + HEAP32[$1 + 7536 >> 2] = 0; + $4 = HEAP32[$0 >> 2]; + } + if (HEAP32[$4 + 24 >> 2]) { + $4 = 0; + while (1) { + $3 = $4 << 3; + $6 = HEAP32[($3 + $1 | 0) + 7540 >> 2]; + if ($6) { + dlfree($6); + HEAP32[($3 + HEAP32[$5 >> 2] | 0) + 7540 >> 2] = 0; + $1 = HEAP32[$5 >> 2]; + } + $6 = HEAP32[($1 + $3 | 0) + 7544 >> 2]; + if ($6) { + dlfree($6); + HEAP32[($3 + HEAP32[$5 >> 2] | 0) + 7544 >> 2] = 0; + $1 = HEAP32[$5 >> 2]; + } + $4 = $4 + 1 | 0; + if ($4 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) { + continue + } + break; + }; + } + $3 = HEAP32[$1 + 7604 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$5 >> 2] + 7604 >> 2] = 0; + $1 = HEAP32[$5 >> 2]; + } + $3 = HEAP32[$1 + 7608 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$5 >> 2] + 7608 >> 2] = 0; + $1 = HEAP32[$5 >> 2]; + } + $3 = HEAP32[$1 + 7612 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$5 >> 2] + 7612 >> 2] = 0; + $1 = HEAP32[$5 >> 2]; + } + $3 = HEAP32[$1 + 7616 >> 2]; + if ($3) { + dlfree($3); + HEAP32[HEAP32[$5 >> 2] + 7616 >> 2] = 0; + $1 = HEAP32[$5 >> 2]; + } + $3 = HEAP32[$1 + 7620 >> 2]; + if ($3) { + dlfree($3); + $1 = HEAP32[$5 >> 2]; + HEAP32[$1 + 7620 >> 2] = 0; + } + $3 = HEAP32[$1 + 7624 >> 2]; + if ($3) { + dlfree($3); + $1 = HEAP32[$5 >> 2]; + HEAP32[$1 + 7624 >> 2] = 0; + } + $3 = HEAP32[$0 >> 2]; + if (!(!HEAP32[$3 + 4 >> 2] | !HEAP32[$3 + 24 >> 2])) { + $5 = 0; + while (1) { + $4 = $5 << 2; + $6 = HEAP32[($4 + $1 | 0) + 11764 >> 2]; + if ($6) { + dlfree($6); + HEAP32[($4 + HEAP32[$0 + 4 >> 2] | 0) + 11764 >> 2] = 0; + $1 = HEAP32[$0 + 4 >> 2]; + $3 = HEAP32[$0 >> 2]; + } + $5 = $5 + 1 | 0; + if ($5 >>> 0 < HEAPU32[$3 + 24 >> 2]) { + continue + } + break; + }; + } + FLAC__bitwriter_free(HEAP32[$1 + 6856 >> 2]); + $3 = HEAP32[$0 >> 2]; + HEAP32[$3 + 44 >> 2] = 13; + HEAP32[$3 + 48 >> 2] = 1056964608; + HEAP32[$3 + 36 >> 2] = 0; + HEAP32[$3 + 40 >> 2] = 1; + HEAP32[$3 + 28 >> 2] = 16; + HEAP32[$3 + 32 >> 2] = 44100; + HEAP32[$3 + 20 >> 2] = 0; + HEAP32[$3 + 24 >> 2] = 2; + HEAP32[$3 + 12 >> 2] = 1; + HEAP32[$3 + 16 >> 2] = 0; + HEAP32[$3 + 4 >> 2] = 0; + HEAP32[$3 + 8 >> 2] = 1; + $3 = HEAP32[$0 >> 2]; + HEAP32[$3 + 592 >> 2] = 0; + HEAP32[$3 + 596 >> 2] = 0; + HEAP32[$3 + 556 >> 2] = 0; + HEAP32[$3 + 560 >> 2] = 0; + HEAP32[$3 + 564 >> 2] = 0; + HEAP32[$3 + 568 >> 2] = 0; + HEAP32[$3 + 572 >> 2] = 0; + HEAP32[$3 + 576 >> 2] = 0; + HEAP32[$3 + 580 >> 2] = 0; + HEAP32[$3 + 584 >> 2] = 0; + HEAP32[$3 + 600 >> 2] = 0; + HEAP32[$3 + 604 >> 2] = 0; + $1 = HEAP32[$0 + 4 >> 2]; + HEAP32[$1 + 7248 >> 2] = 0; + HEAP32[$1 + 7252 >> 2] = 0; + HEAP32[$1 + 7048 >> 2] = 0; + $5 = $1 + 7256 | 0; + HEAP32[$5 >> 2] = 0; + HEAP32[$5 + 4 >> 2] = 0; + $5 = $1 + 7264 | 0; + HEAP32[$5 >> 2] = 0; + HEAP32[$5 + 4 >> 2] = 0; + $5 = $1 + 7272 | 0; + HEAP32[$5 >> 2] = 0; + HEAP32[$5 + 4 >> 2] = 0; + $5 = $1 + 7280 | 0; + HEAP32[$5 >> 2] = 0; + HEAP32[$5 + 4 >> 2] = 0; + HEAP32[$1 + 7288 >> 2] = 0; + FLAC__ogg_encoder_aspect_set_defaults($3 + 632 | 0); + $1 = HEAP32[$0 >> 2]; + label$74 : { + if (HEAP32[$1 >> 2] != 1) { + break label$74 + } + HEAP32[$1 + 16 >> 2] = 1; + HEAP32[$1 + 20 >> 2] = 0; + FLAC__stream_encoder_set_apodization($0, 10777); + $1 = HEAP32[$0 >> 2]; + if (HEAP32[$1 >> 2] != 1) { + break label$74 + } + HEAP32[$1 + 576 >> 2] = 0; + HEAP32[$1 + 580 >> 2] = 5; + HEAP32[$1 + 564 >> 2] = 0; + HEAP32[$1 + 568 >> 2] = 0; + HEAP32[$1 + 556 >> 2] = 8; + HEAP32[$1 + 560 >> 2] = 0; + } + if (!$2) { + HEAP32[$1 >> 2] = 1 + } + $1 = !$2; + } + global$0 = $7 + 32 | 0; + return $1 | 0; + } + + function process_frame_($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0; + $8 = global$0 - 48 | 0; + global$0 = $8; + label$1 : { + label$2 : { + $4 = HEAP32[$0 >> 2]; + if (!HEAP32[$4 + 12 >> 2]) { + break label$2 + } + $3 = HEAP32[$0 + 4 >> 2]; + $3 = FLAC__MD5Accumulate($3 + 7060 | 0, $3 + 4 | 0, HEAP32[$4 + 24 >> 2], HEAP32[$4 + 36 >> 2], HEAP32[$4 + 28 >> 2] + 7 >>> 3 | 0); + $4 = HEAP32[$0 >> 2]; + if ($3) { + break label$2 + } + HEAP32[$4 >> 2] = 8; + $1 = 0; + break label$1; + } + $3 = HEAP32[$4 + 576 >> 2]; + if ($1) { + $12 = 0 + } else { + $1 = FLAC__format_get_max_rice_partition_order_from_blocksize(HEAP32[$4 + 36 >> 2]); + $4 = HEAP32[$0 >> 2]; + $5 = HEAP32[$4 + 580 >> 2]; + $12 = $1 >>> 0 < $5 >>> 0 ? $1 : $5; + } + $7 = HEAP32[$4 + 36 >> 2]; + HEAP32[$8 + 8 >> 2] = $7; + HEAP32[$8 + 12 >> 2] = HEAP32[$4 + 32 >> 2]; + $1 = HEAP32[$4 + 24 >> 2]; + HEAP32[$8 + 20 >> 2] = 0; + HEAP32[$8 + 16 >> 2] = $1; + $1 = HEAP32[$4 + 28 >> 2]; + HEAP32[$8 + 28 >> 2] = 0; + HEAP32[$8 + 24 >> 2] = $1; + $5 = HEAP32[$0 + 4 >> 2]; + HEAP32[$8 + 32 >> 2] = HEAP32[$5 + 7056 >> 2]; + $14 = $3 >>> 0 < $12 >>> 0 ? $3 : $12; + label$5 : { + label$6 : { + label$7 : { + label$8 : { + label$9 : { + label$10 : { + label$11 : { + if (!HEAP32[$4 + 16 >> 2]) { + $10 = 1; + break label$11; + } + if (!HEAP32[$4 + 20 >> 2] | !HEAP32[$5 + 6864 >> 2]) { + break label$11 + } + $10 = 1; + $13 = 1; + if (HEAP32[$5 + 6868 >> 2]) { + break label$10 + } + } + label$13 : { + if (!HEAP32[$4 + 24 >> 2]) { + $3 = 0; + break label$13; + } + while (1) { + $13 = ($6 << 2) + $5 | 0; + $3 = 0; + $11 = 0; + label$16 : { + if (!$7) { + break label$16 + } + $15 = HEAP32[$13 + 4 >> 2]; + $1 = 0; + while (1) { + label$18 : { + $3 = HEAP32[$15 + ($1 << 2) >> 2] | $3; + $9 = $3 & 1; + $1 = $1 + 1 | 0; + if ($1 >>> 0 >= $7 >>> 0) { + break label$18 + } + if (!$9) { + continue + } + } + break; + }; + $1 = 0; + $11 = 0; + if (!$3) { + break label$16 + } + $11 = 0; + if ($9) { + break label$16 + } + while (1) { + $1 = $1 + 1 | 0; + $9 = $3 & 2; + $3 = $3 >> 1; + if (!$9) { + continue + } + break; + }; + $9 = 0; + $11 = 0; + if (!$1) { + break label$16 + } + while (1) { + $3 = $15 + ($9 << 2) | 0; + HEAP32[$3 >> 2] = HEAP32[$3 >> 2] >> $1; + $9 = $9 + 1 | 0; + if (($9 | 0) != ($7 | 0)) { + continue + } + break; + }; + $11 = $1; + } + $1 = $11; + $7 = Math_imul($6, 584) + $5 | 0; + $3 = HEAP32[$4 + 28 >> 2]; + $1 = $1 >>> 0 > $3 >>> 0 ? $3 : $1; + HEAP32[$7 + 624 >> 2] = $1; + HEAP32[$7 + 916 >> 2] = $1; + HEAP32[$13 + 216 >> 2] = $3 - $1; + $6 = $6 + 1 | 0; + $3 = HEAP32[$4 + 24 >> 2]; + if ($6 >>> 0 >= $3 >>> 0) { + break label$13 + } + $7 = HEAP32[$4 + 36 >> 2]; + continue; + }; + } + $1 = 1; + if ($10) { + break label$9 + } + $7 = HEAP32[$4 + 36 >> 2]; + $13 = 0; + } + $9 = HEAP32[$5 + 36 >> 2]; + $3 = 0; + $6 = 0; + label$21 : { + if (!$7) { + break label$21 + } + $1 = 0; + while (1) { + label$23 : { + $1 = HEAP32[($6 << 2) + $9 >> 2] | $1; + $10 = $1 & 1; + $6 = $6 + 1 | 0; + if ($6 >>> 0 >= $7 >>> 0) { + break label$23 + } + if (!$10) { + continue + } + } + break; + }; + $6 = 0; + if ($10 | !$1) { + break label$21 + } + while (1) { + $6 = $6 + 1 | 0; + $10 = $1 & 2; + $1 = $1 >> 1; + if (!$10) { + continue + } + break; + }; + $1 = 0; + if (!$6) { + $6 = 0; + break label$21; + } + while (1) { + $10 = ($1 << 2) + $9 | 0; + HEAP32[$10 >> 2] = HEAP32[$10 >> 2] >> $6; + $1 = $1 + 1 | 0; + if (($7 | 0) != ($1 | 0)) { + continue + } + break; + }; + } + $1 = HEAP32[$4 + 28 >> 2]; + $6 = $6 >>> 0 > $1 >>> 0 ? $1 : $6; + HEAP32[$5 + 5296 >> 2] = $6; + HEAP32[$5 + 5588 >> 2] = $6; + HEAP32[$5 + 248 >> 2] = $1 - $6; + $6 = HEAP32[$4 + 36 >> 2]; + label$27 : { + if (!$6) { + break label$27 + } + $7 = HEAP32[$5 + 40 >> 2]; + $1 = 0; + while (1) { + label$29 : { + $3 = HEAP32[$7 + ($1 << 2) >> 2] | $3; + $10 = $3 & 1; + $1 = $1 + 1 | 0; + if ($1 >>> 0 >= $6 >>> 0) { + break label$29 + } + if (!$10) { + continue + } + } + break; + }; + $1 = 0; + if (!$3) { + $3 = 0; + break label$27; + } + if ($10) { + $3 = 0; + break label$27; + } + while (1) { + $1 = $1 + 1 | 0; + $10 = $3 & 2; + $3 = $3 >> 1; + if (!$10) { + continue + } + break; + }; + $3 = 0; + if (!$1) { + break label$27 + } + while (1) { + $10 = $7 + ($3 << 2) | 0; + HEAP32[$10 >> 2] = HEAP32[$10 >> 2] >> $1; + $3 = $3 + 1 | 0; + if (($6 | 0) != ($3 | 0)) { + continue + } + break; + }; + $3 = $1; + } + $1 = HEAP32[$4 + 28 >> 2]; + $3 = $3 >>> 0 > $1 >>> 0 ? $1 : $3; + HEAP32[$5 + 5880 >> 2] = $3; + HEAP32[$5 + 6172 >> 2] = $3; + HEAP32[$5 + 252 >> 2] = ($1 - $3 | 0) + 1; + if ($13) { + break label$8 + } + $3 = HEAP32[$4 + 24 >> 2]; + $1 = 0; + } + $4 = $1; + if ($3) { + $3 = 0; + while (1) { + $1 = ($3 << 2) + $5 | 0; + $5 = ($3 << 3) + $5 | 0; + process_subframe_($0, $14, $12, $8 + 8 | 0, HEAP32[$1 + 216 >> 2], HEAP32[$1 + 4 >> 2], $5 + 6176 | 0, $5 + 6640 | 0, $5 + 256 | 0, $1 + 6768 | 0, $1 + 6808 | 0); + $5 = HEAP32[$0 + 4 >> 2]; + $3 = $3 + 1 | 0; + if ($3 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) { + continue + } + break; + }; + } + if ($4) { + break label$7 + } + $9 = HEAP32[$5 + 36 >> 2]; + } + process_subframe_($0, $14, $12, $8 + 8 | 0, HEAP32[$5 + 248 >> 2], $9, $5 + 6240 | 0, $5 + 6704 | 0, $5 + 320 | 0, $5 + 6800 | 0, $5 + 6840 | 0); + $1 = HEAP32[$0 + 4 >> 2]; + process_subframe_($0, $14, $12, $8 + 8 | 0, HEAP32[$1 + 252 >> 2], HEAP32[$1 + 40 >> 2], $1 + 6248 | 0, $1 + 6712 | 0, $1 + 328 | 0, $1 + 6804 | 0, $1 + 6844 | 0); + $11 = $8; + $1 = HEAP32[$0 + 4 >> 2]; + label$36 : { + if (!(!HEAP32[HEAP32[$0 >> 2] + 20 >> 2] | !HEAP32[$1 + 6864 >> 2])) { + $3 = HEAP32[$1 + 6868 >> 2] ? 3 : 0; + break label$36; + } + $3 = HEAP32[$1 + 6844 >> 2]; + $5 = HEAP32[$1 + 6808 >> 2]; + $4 = $3 + $5 | 0; + $6 = HEAP32[$1 + 6812 >> 2]; + $5 = $5 + $6 | 0; + $7 = $4 >>> 0 < $5 >>> 0; + $6 = $3 + $6 | 0; + $5 = $7 ? $4 : $5; + $4 = $6 >>> 0 < $5 >>> 0; + $3 = $3 + HEAP32[$1 + 6840 >> 2] >>> 0 < ($4 ? $6 : $5) >>> 0 ? 3 : $4 ? 2 : $7; + } + HEAP32[$11 + 20 >> 2] = $3; + if (!FLAC__frame_add_header($8 + 8 | 0, HEAP32[$1 + 6856 >> 2])) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 7; + $1 = 0; + break label$1; + } + $5 = $0; + $6 = HEAP32[$8 + 8 >> 2]; + label$39 : { + label$40 : { + switch ($3 | 0) { + default: + $3 = HEAP32[$0 + 4 >> 2]; + $7 = 0; + $1 = 0; + $4 = 0; + $9 = 0; + break label$39; + case 0: + $3 = HEAP32[$0 + 4 >> 2]; + $4 = $3 + 336 | 0; + $1 = $4 + Math_imul(HEAP32[$3 + 6768 >> 2], 292) | 0; + $7 = ($4 + Math_imul(HEAP32[$3 + 6772 >> 2], 292) | 0) + 584 | 0; + $4 = HEAP32[$3 + 216 >> 2]; + $9 = HEAP32[$3 + 220 >> 2]; + break label$39; + case 1: + $3 = HEAP32[$0 + 4 >> 2]; + $1 = ($3 + Math_imul(HEAP32[$3 + 6768 >> 2], 292) | 0) + 336 | 0; + $7 = (Math_imul(HEAP32[$3 + 6804 >> 2], 292) + $3 | 0) + 5592 | 0; + $4 = HEAP32[$3 + 216 >> 2]; + $9 = HEAP32[$3 + 252 >> 2]; + break label$39; + case 2: + $3 = HEAP32[$0 + 4 >> 2]; + $7 = ($3 + Math_imul(HEAP32[$3 + 6772 >> 2], 292) | 0) + 920 | 0; + $1 = (Math_imul(HEAP32[$3 + 6804 >> 2], 292) + $3 | 0) + 5592 | 0; + $4 = HEAP32[$3 + 252 >> 2]; + $9 = HEAP32[$3 + 220 >> 2]; + break label$39; + case 3: + break label$40; + }; + } + $3 = HEAP32[$0 + 4 >> 2]; + $4 = $3 + 5008 | 0; + $1 = $4 + Math_imul(HEAP32[$3 + 6800 >> 2], 292) | 0; + $7 = ($4 + Math_imul(HEAP32[$3 + 6804 >> 2], 292) | 0) + 584 | 0; + $4 = HEAP32[$3 + 248 >> 2]; + $9 = HEAP32[$3 + 252 >> 2]; + } + if (!add_subframe_($5, $6, $4, $1, HEAP32[$3 + 6856 >> 2])) { + break label$6 + } + if (!add_subframe_($0, HEAP32[$8 + 8 >> 2], $9, $7, HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2])) { + break label$6 + } + $1 = HEAP32[$0 >> 2]; + break label$5; + } + $3 = FLAC__frame_add_header($8 + 8 | 0, HEAP32[$5 + 6856 >> 2]); + $1 = HEAP32[$0 >> 2]; + if ($3) { + if (!HEAP32[$1 + 24 >> 2]) { + break label$5 + } + $3 = 0; + while (1) { + $1 = HEAP32[$0 + 4 >> 2]; + $5 = $1 + ($3 << 2) | 0; + if (!add_subframe_($0, HEAP32[$8 + 8 >> 2], HEAP32[$5 + 216 >> 2], (($1 + Math_imul($3, 584) | 0) + Math_imul(HEAP32[$5 + 6768 >> 2], 292) | 0) + 336 | 0, HEAP32[$1 + 6856 >> 2])) { + break label$6 + } + $3 = $3 + 1 | 0; + $1 = HEAP32[$0 >> 2]; + if ($3 >>> 0 < HEAPU32[$1 + 24 >> 2]) { + continue + } + break; + }; + break label$5; + } + HEAP32[$1 >> 2] = 7; + } + $1 = 0; + break label$1; + } + if (HEAP32[$1 + 20 >> 2]) { + $1 = HEAP32[$0 + 4 >> 2]; + $3 = HEAP32[$1 + 6864 >> 2] + 1 | 0; + HEAP32[$1 + 6864 >> 2] = $3 >>> 0 < HEAPU32[$1 + 6860 >> 2] ? $3 : 0; + } + $1 = HEAP32[$0 + 4 >> 2]; + HEAP32[$1 + 6868 >> 2] = HEAP32[$8 + 20 >> 2]; + $1 = HEAP32[$1 + 6856 >> 2]; + $3 = HEAP32[$1 + 16 >> 2] & 7; + $11 = 1; + __inlined_func$FLAC__bitwriter_zero_pad_to_byte_boundary : { + if (!$3) { + break __inlined_func$FLAC__bitwriter_zero_pad_to_byte_boundary + } + $11 = FLAC__bitwriter_write_zeroes($1, 8 - $3 | 0); + } + if (!$11) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $1 = 0; + break label$1; + } + label$49 : { + if (FLAC__bitwriter_get_write_crc16(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2], $8 + 8 | 0)) { + if (FLAC__bitwriter_write_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2], HEAPU16[$8 + 8 >> 1], HEAP32[1404])) { + break label$49 + } + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 8; + $1 = 0; + break label$1; + } + $1 = 0; + if (!write_bitbuffer_($0, HEAP32[HEAP32[$0 >> 2] + 36 >> 2], $2)) { + break label$1 + } + $1 = HEAP32[$0 + 4 >> 2]; + HEAP32[$1 + 7052 >> 2] = 0; + HEAP32[$1 + 7056 >> 2] = HEAP32[$1 + 7056 >> 2] + 1; + $2 = $1 + 6920 | 0; + $3 = $2; + $11 = $3; + $1 = HEAP32[$3 + 4 >> 2]; + $0 = HEAP32[HEAP32[$0 >> 2] + 36 >> 2]; + $2 = $0 + HEAP32[$3 >> 2] | 0; + if ($2 >>> 0 < $0 >>> 0) { + $1 = $1 + 1 | 0 + } + HEAP32[$11 >> 2] = $2; + HEAP32[$3 + 4 >> 2] = $1; + $1 = 1; + } + $0 = $1; + global$0 = $8 + 48 | 0; + return $0; + } + + function FLAC__stream_encoder_init_stream($0, $1, $2, $3, $4, $5) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + return init_stream_internal__1($0, 0, $1, $2, $3, $4, $5, 0) | 0; + } + + function init_stream_internal__1($0, $1, $2, $3, $4, $5, $6, $7) { + var $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0; + $15 = global$0 - 176 | 0; + global$0 = $15; + $9 = 13; + $8 = HEAP32[$0 >> 2]; + label$1 : { + if (HEAP32[$8 >> 2] != 1) { + break label$1 + } + $9 = 3; + if (!$2 | ($4 ? 0 : $3)) { + break label$1 + } + $9 = 4; + $11 = HEAP32[$8 + 24 >> 2]; + if ($11 + -1 >>> 0 > 7) { + break label$1 + } + label$2 : { + label$3 : { + if (($11 | 0) != 2) { + HEAP32[$8 + 16 >> 2] = 0; + break label$3; + } + if (HEAP32[$8 + 16 >> 2]) { + break label$2 + } + } + HEAP32[$8 + 20 >> 2] = 0; + } + $11 = HEAP32[$8 + 28 >> 2]; + if ($11 >>> 0 >= 32) { + HEAP32[$8 + 16 >> 2] = 0; + $9 = 5; + break label$1; + } + $9 = 5; + if ($11 + -4 >>> 0 > 20) { + break label$1 + } + if (HEAP32[$8 + 32 >> 2] + -1 >>> 0 >= 655350) { + $9 = 6; + break label$1; + } + $8 = HEAP32[$0 >> 2]; + $10 = HEAP32[$8 + 36 >> 2]; + label$7 : { + if (!$10) { + $10 = HEAP32[$8 + 556 >> 2] ? 4096 : 1152; + HEAP32[$8 + 36 >> 2] = $10; + break label$7; + } + $9 = 7; + if ($10 + -16 >>> 0 > 65519) { + break label$1 + } + } + $9 = 8; + $11 = HEAP32[$8 + 556 >> 2]; + if ($11 >>> 0 > 32) { + break label$1 + } + $9 = 10; + if ($10 >>> 0 < $11 >>> 0) { + break label$1 + } + $11 = HEAP32[$8 + 560 >> 2]; + label$9 : { + if (!$11) { + $13 = $8; + $11 = HEAP32[$8 + 28 >> 2]; + label$11 : { + if ($11 >>> 0 <= 15) { + $11 = $11 >>> 0 > 5 ? ($11 >>> 1 | 0) + 2 | 0 : 5; + break label$11; + } + if (($11 | 0) == 16) { + $11 = 7; + if ($10 >>> 0 < 193) { + break label$11 + } + $11 = 8; + if ($10 >>> 0 < 385) { + break label$11 + } + $11 = 9; + if ($10 >>> 0 < 577) { + break label$11 + } + $11 = 10; + if ($10 >>> 0 < 1153) { + break label$11 + } + $11 = 11; + if ($10 >>> 0 < 2305) { + break label$11 + } + $11 = $10 >>> 0 < 4609 ? 12 : 13; + break label$11; + } + $11 = 13; + if ($10 >>> 0 < 385) { + break label$11 + } + $11 = $10 >>> 0 < 1153 ? 14 : 15; + } + HEAP32[$13 + 560 >> 2] = $11; + break label$9; + } + $9 = 9; + if ($11 + -5 >>> 0 > 10) { + break label$1 + } + } + label$14 : { + if (!HEAP32[$8 + 8 >> 2]) { + $10 = HEAP32[$8 + 580 >> 2]; + break label$14; + } + $9 = 11; + if (!(($10 >>> 0 < 4609 | HEAPU32[$8 + 32 >> 2] > 48e3) & $10 >>> 0 < 16385)) { + break label$1 + } + if (!FLAC__format_sample_rate_is_subset(HEAP32[HEAP32[$0 >> 2] + 32 >> 2])) { + break label$1 + } + $8 = HEAP32[$0 >> 2]; + if (__wasm_rotl_i32(HEAP32[$8 + 28 >> 2] + -8 | 0, 30) >>> 0 > 4) { + break label$1 + } + $10 = HEAP32[$8 + 580 >> 2]; + if ($10 >>> 0 > 8) { + break label$1 + } + if (HEAPU32[$8 + 32 >> 2] > 48e3) { + break label$14 + } + if (HEAPU32[$8 + 36 >> 2] > 4608 | HEAPU32[$8 + 556 >> 2] > 12) { + break label$1 + } + } + $11 = 1 << HEAP32[1406]; + if ($10 >>> 0 >= $11 >>> 0) { + $10 = $11 + -1 | 0; + HEAP32[$8 + 580 >> 2] = $10; + } + if (HEAPU32[$8 + 576 >> 2] >= $10 >>> 0) { + HEAP32[$8 + 576 >> 2] = $10 + } + label$18 : { + if (!$7) { + break label$18 + } + $10 = HEAP32[$8 + 600 >> 2]; + if (!$10) { + break label$18 + } + $13 = HEAP32[$8 + 604 >> 2]; + if ($13 >>> 0 < 2) { + break label$18 + } + $9 = 1; + while (1) { + $11 = HEAP32[($9 << 2) + $10 >> 2]; + if (!(!$11 | HEAP32[$11 >> 2] != 4)) { + while (1) { + $8 = ($9 << 2) + $10 | 0; + $9 = $9 + -1 | 0; + HEAP32[$8 >> 2] = HEAP32[($9 << 2) + $10 >> 2]; + $10 = HEAP32[HEAP32[$0 >> 2] + 600 >> 2]; + if ($9) { + continue + } + break; + }; + HEAP32[$10 >> 2] = $11; + $8 = HEAP32[$0 >> 2]; + break label$18; + } + $9 = $9 + 1 | 0; + if (($13 | 0) != ($9 | 0)) { + continue + } + break; + }; + } + $13 = HEAP32[$8 + 604 >> 2]; + label$22 : { + label$23 : { + $10 = HEAP32[$8 + 600 >> 2]; + if ($10) { + $11 = 0; + if (!$13) { + break label$22 + } + while (1) { + $8 = HEAP32[($11 << 2) + $10 >> 2]; + if (!(!$8 | HEAP32[$8 >> 2] != 3)) { + HEAP32[HEAP32[$0 + 4 >> 2] + 7048 >> 2] = $8 + 16; + break label$23; + } + $11 = $11 + 1 | 0; + if (($13 | 0) != ($11 | 0)) { + continue + } + break; + }; + break label$23; + } + $9 = 12; + if ($13) { + break label$1 + } + $11 = 0; + break label$22; + } + $8 = 0; + $13 = 0; + $11 = 0; + while (1) { + $9 = 12; + label$28 : { + label$29 : { + label$30 : { + label$31 : { + label$32 : { + $10 = HEAP32[($14 << 2) + $10 >> 2]; + switch (HEAP32[$10 >> 2]) { + case 0: + break label$1; + case 6: + break label$29; + case 5: + break label$30; + case 4: + break label$31; + case 3: + break label$32; + default: + break label$28; + }; + } + if ($18) { + break label$1 + } + $18 = 1; + $11 = $13; + $12 = $8; + if (FLAC__format_seektable_is_legal($10 + 16 | 0)) { + break label$28 + } + break label$1; + } + $11 = 1; + $12 = $8; + if (!$13) { + break label$28 + } + break label$1; + } + $11 = $13; + $12 = $8; + if (FLAC__format_cuesheet_is_legal($10 + 16 | 0, HEAP32[$10 + 160 >> 2])) { + break label$28 + } + break label$1; + } + $17 = $10 + 16 | 0; + if (!FLAC__format_picture_is_legal($17)) { + break label$1 + } + $11 = $13; + $12 = $8; + label$33 : { + switch (HEAP32[$17 >> 2] + -1 | 0) { + case 0: + if ($19) { + break label$1 + } + $12 = HEAP32[$10 + 20 >> 2]; + if (strcmp($12, 10763)) { + if (strcmp($12, 10773)) { + break label$1 + } + } + if (HEAP32[$10 + 28 >> 2] != 32) { + break label$1 + } + $19 = 1; + $11 = $13; + $12 = $8; + if (HEAP32[$10 + 32 >> 2] == 32) { + break label$28 + } + break label$1; + case 1: + break label$33; + default: + break label$28; + }; + } + $12 = 1; + if ($8) { + break label$1 + } + } + $14 = $14 + 1 | 0; + $8 = HEAP32[$0 >> 2]; + if ($14 >>> 0 >= HEAPU32[$8 + 604 >> 2]) { + break label$22 + } + $10 = HEAP32[$8 + 600 >> 2]; + $8 = $12; + $13 = $11; + continue; + }; + } + $10 = 0; + $14 = HEAP32[$0 + 4 >> 2]; + HEAP32[$14 >> 2] = 0; + if (HEAP32[$8 + 24 >> 2]) { + while (1) { + $8 = $10 << 2; + HEAP32[($8 + $14 | 0) + 4 >> 2] = 0; + HEAP32[($8 + HEAP32[$0 + 4 >> 2] | 0) + 7328 >> 2] = 0; + HEAP32[($8 + HEAP32[$0 + 4 >> 2] | 0) + 44 >> 2] = 0; + HEAP32[($8 + HEAP32[$0 + 4 >> 2] | 0) + 7368 >> 2] = 0; + $14 = HEAP32[$0 + 4 >> 2]; + $10 = $10 + 1 | 0; + if ($10 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) { + continue + } + break; + } + } + $8 = 0; + HEAP32[$14 + 36 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 7360 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 76 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 7400 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 40 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 7364 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 80 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 7404 >> 2] = 0; + $9 = HEAP32[$0 + 4 >> 2]; + $10 = HEAP32[$0 >> 2]; + if (HEAP32[$10 + 40 >> 2]) { + while (1) { + $12 = $8 << 2; + HEAP32[($12 + $9 | 0) + 84 >> 2] = 0; + HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 7408 >> 2] = 0; + $9 = HEAP32[$0 + 4 >> 2]; + $8 = $8 + 1 | 0; + $10 = HEAP32[$0 >> 2]; + if ($8 >>> 0 < HEAPU32[$10 + 40 >> 2]) { + continue + } + break; + } + } + $8 = 0; + HEAP32[$9 + 7536 >> 2] = 0; + HEAP32[$9 + 212 >> 2] = 0; + if (HEAP32[$10 + 24 >> 2]) { + while (1) { + $12 = $8 << 3; + HEAP32[($12 + $9 | 0) + 256 >> 2] = 0; + HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 7540 >> 2] = 0; + HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 260 >> 2] = 0; + HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 7544 >> 2] = 0; + $9 = HEAP32[$0 + 4 >> 2]; + HEAP32[($9 + ($8 << 2) | 0) + 6768 >> 2] = 0; + $8 = $8 + 1 | 0; + if ($8 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) { + continue + } + break; + } + } + HEAP32[$9 + 320 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 7604 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 324 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 7608 >> 2] = 0; + $8 = HEAP32[$0 + 4 >> 2]; + HEAP32[$8 + 6800 >> 2] = 0; + HEAP32[$8 + 328 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 7612 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 332 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 7616 >> 2] = 0; + $8 = HEAP32[$0 + 4 >> 2]; + HEAP32[$8 + 7620 >> 2] = 0; + HEAP32[$8 + 7624 >> 2] = 0; + HEAP32[$8 + 6848 >> 2] = 0; + HEAP32[$8 + 6852 >> 2] = 0; + HEAP32[$8 + 6804 >> 2] = 0; + $12 = HEAP32[$0 >> 2]; + $13 = HEAP32[$12 + 36 >> 2]; + $12 = HEAP32[$12 + 32 >> 2]; + HEAP32[$8 + 7052 >> 2] = 0; + HEAP32[$8 + 7056 >> 2] = 0; + HEAP32[$8 + 6864 >> 2] = 0; + $9 = $8; + $16 = +($12 >>> 0) * .4 / +($13 >>> 0) + .5; + label$42 : { + if ($16 < 4294967296.0 & $16 >= 0.0) { + $12 = ~~$16 >>> 0; + break label$42; + } + $12 = 0; + } + HEAP32[$9 + 6860 >> 2] = $12 ? $12 : 1; + FLAC__cpu_info($8 + 7156 | 0); + $9 = HEAP32[$0 + 4 >> 2]; + HEAP32[$9 + 7244 >> 2] = 12; + HEAP32[$9 + 7240 >> 2] = 13; + HEAP32[$9 + 7236 >> 2] = 12; + HEAP32[$9 + 7228 >> 2] = 14; + HEAP32[$9 + 7224 >> 2] = 15; + HEAP32[$9 + 7220 >> 2] = 16; + HEAP32[$9 + 7232 >> 2] = 17; + $10 = HEAP32[$0 >> 2]; + HEAP32[$10 >> 2] = 0; + HEAP32[$9 + 7260 >> 2] = $7; + label$44 : { + label$45 : { + label$46 : { + if ($7) { + if (!FLAC__ogg_encoder_aspect_init($10 + 632 | 0)) { + break label$46 + } + $10 = HEAP32[$0 >> 2]; + $9 = HEAP32[$0 + 4 >> 2]; + } + $8 = $0 + 4 | 0; + HEAP32[$9 + 7276 >> 2] = $2; + HEAP32[$9 + 7264 >> 2] = $1; + HEAP32[$9 + 7288 >> 2] = $6; + HEAP32[$9 + 7280 >> 2] = $5; + HEAP32[$9 + 7272 >> 2] = $4; + HEAP32[$9 + 7268 >> 2] = $3; + $1 = HEAP32[$10 + 36 >> 2]; + if (HEAPU32[$9 >> 2] < $1 >>> 0) { + $3 = $1 + 5 | 0; + label$49 : { + label$50 : { + label$51 : { + if (HEAP32[$10 + 24 >> 2]) { + $2 = 0; + while (1) { + $5 = $2 << 2; + $4 = $5 + HEAP32[$8 >> 2] | 0; + $6 = FLAC__memory_alloc_aligned_int32_array($3, $4 + 7328 | 0, $4 + 4 | 0); + $4 = HEAP32[($5 + HEAP32[$8 >> 2] | 0) + 4 >> 2]; + HEAP32[$4 >> 2] = 0; + HEAP32[$4 + 4 >> 2] = 0; + HEAP32[$4 + 8 >> 2] = 0; + HEAP32[$4 + 12 >> 2] = 0; + $4 = ($5 + HEAP32[$8 >> 2] | 0) + 4 | 0; + HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + 16; + if (!$6) { + break label$51 + } + $2 = $2 + 1 | 0; + if ($2 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) { + continue + } + break; + }; + } + $2 = HEAP32[$8 >> 2]; + $4 = FLAC__memory_alloc_aligned_int32_array($3, $2 + 7360 | 0, $2 + 36 | 0); + $2 = HEAP32[HEAP32[$8 >> 2] + 36 >> 2]; + HEAP32[$2 >> 2] = 0; + HEAP32[$2 + 4 >> 2] = 0; + HEAP32[$2 + 8 >> 2] = 0; + HEAP32[$2 + 12 >> 2] = 0; + $2 = HEAP32[$8 >> 2]; + HEAP32[$2 + 36 >> 2] = HEAP32[$2 + 36 >> 2] + 16; + if ($4) { + $2 = HEAP32[$8 >> 2]; + $3 = FLAC__memory_alloc_aligned_int32_array($3, $2 + 7364 | 0, $2 + 40 | 0); + $2 = HEAP32[HEAP32[$8 >> 2] + 40 >> 2]; + HEAP32[$2 >> 2] = 0; + HEAP32[$2 + 4 >> 2] = 0; + HEAP32[$2 + 8 >> 2] = 0; + HEAP32[$2 + 12 >> 2] = 0; + $2 = HEAP32[$8 >> 2] + 40 | 0; + HEAP32[$2 >> 2] = HEAP32[$2 >> 2] + 16; + $2 = ($3 | 0) != 0; + } else { + $2 = ($4 | 0) != 0 + } + if (!$2) { + break label$51 + } + $3 = HEAP32[$0 >> 2]; + if (HEAP32[$3 + 556 >> 2]) { + $2 = HEAP32[$8 >> 2]; + if (HEAP32[$3 + 40 >> 2]) { + $9 = 0; + while (1) { + $2 = ($9 << 2) + $2 | 0; + if (!FLAC__memory_alloc_aligned_int32_array($1, $2 + 7408 | 0, $2 + 84 | 0)) { + break label$51 + } + $2 = HEAP32[$0 + 4 >> 2]; + $9 = $9 + 1 | 0; + if ($9 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 40 >> 2]) { + continue + } + break; + }; + } + if (!FLAC__memory_alloc_aligned_int32_array($1, $2 + 7536 | 0, $2 + 212 | 0)) { + break label$51 + } + } + $6 = 0; + $10 = 1; + $5 = 0; + while (1) { + if ($5 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) { + $9 = 0; + $2 = 1; + $3 = 0; + while (1) { + if ($9 & 1) { + break label$51 + } + $3 = (HEAP32[$8 >> 2] + ($5 << 3) | 0) + ($3 << 2) | 0; + $4 = FLAC__memory_alloc_aligned_int32_array($1, $3 + 7540 | 0, $3 + 256 | 0); + $7 = $2 & ($4 | 0) != 0; + $9 = !$4; + $3 = 1; + $2 = 0; + if ($7) { + continue + } + break; + }; + $5 = $5 + 1 | 0; + if ($4) { + continue + } + break label$51; + } + break; + }; + $7 = 1; + while (1) { + $9 = 0; + $2 = 1; + $3 = 0; + if (!$7) { + break label$51 + } + while (1) { + if ($9 & 1) { + break label$51 + } + $3 = (HEAP32[$8 >> 2] + ($6 << 3) | 0) + ($3 << 2) | 0; + $4 = FLAC__memory_alloc_aligned_int32_array($1, $3 + 7604 | 0, $3 + 320 | 0); + $5 = $2 & ($4 | 0) != 0; + $9 = !$4; + $3 = 1; + $2 = 0; + if ($5) { + continue + } + break; + }; + $7 = ($4 | 0) != 0; + $2 = $10 & $7; + $6 = 1; + $10 = 0; + if ($2) { + continue + } + break; + }; + if (!$4) { + break label$51 + } + $3 = $1 << 1; + $2 = HEAP32[$0 + 4 >> 2]; + $2 = FLAC__memory_alloc_aligned_uint64_array($3, $2 + 7620 | 0, $2 + 6848 | 0); + $9 = HEAP32[$0 >> 2]; + $4 = HEAP32[$9 + 572 >> 2]; + if (!$4 | !$2) { + break label$50 + } + $2 = HEAP32[$8 >> 2]; + if (FLAC__memory_alloc_aligned_int32_array($3, $2 + 7624 | 0, $2 + 6852 | 0)) { + break label$49 + } + } + $9 = HEAP32[$0 >> 2]; + break label$44; + } + if ($4 | !$2) { + break label$44 + } + } + $9 = HEAP32[$8 >> 2]; + label$64 : { + if (($1 | 0) == HEAP32[$9 >> 2]) { + break label$64 + } + $2 = HEAP32[$0 >> 2]; + if (!HEAP32[$2 + 556 >> 2] | !HEAP32[$2 + 40 >> 2]) { + break label$64 + } + $9 = 0; + while (1) { + label$66 : { + label$67 : { + label$68 : { + label$69 : { + label$70 : { + label$71 : { + label$72 : { + label$73 : { + label$74 : { + label$75 : { + label$76 : { + label$77 : { + label$78 : { + label$79 : { + label$80 : { + label$81 : { + label$82 : { + label$83 : { + label$84 : { + $2 = ($9 << 4) + $2 | 0; + switch (HEAP32[$2 + 44 >> 2]) { + case 16: + break label$68; + case 15: + break label$69; + case 14: + break label$70; + case 13: + break label$71; + case 12: + break label$72; + case 11: + break label$73; + case 10: + break label$74; + case 9: + break label$75; + case 8: + break label$76; + case 7: + break label$77; + case 6: + break label$78; + case 5: + break label$79; + case 4: + break label$80; + case 3: + break label$81; + case 2: + break label$82; + case 1: + break label$83; + case 0: + break label$84; + default: + break label$67; + }; + } + FLAC__window_bartlett(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_bartlett_hann(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_blackman(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_blackman_harris_4term_92db_sidelobe(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_connes(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_flattop(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_gauss(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2]); + break label$66; + } + FLAC__window_hamming(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_hann(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_kaiser_bessel(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_nuttall(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_rectangle(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_triangle(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_tukey(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2]); + break label$66; + } + FLAC__window_partial_tukey(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2], HEAPF32[$2 + 52 >> 2], HEAPF32[$2 + 56 >> 2]); + break label$66; + } + FLAC__window_punchout_tukey(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2], HEAPF32[$2 + 52 >> 2], HEAPF32[$2 + 56 >> 2]); + break label$66; + } + FLAC__window_welch(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + break label$66; + } + FLAC__window_hann(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1); + } + $9 = $9 + 1 | 0; + $2 = HEAP32[$0 >> 2]; + if ($9 >>> 0 < HEAPU32[$2 + 40 >> 2]) { + continue + } + break; + }; + $9 = HEAP32[$8 >> 2]; + } + HEAP32[$9 >> 2] = $1; + } + $1 = FLAC__bitwriter_init(HEAP32[$9 + 6856 >> 2]); + $3 = HEAP32[$0 >> 2]; + if (!$1) { + HEAP32[$3 >> 2] = 8; + $9 = 1; + break label$1; + } + if (HEAP32[$3 + 4 >> 2]) { + $9 = 1; + $2 = HEAP32[$8 >> 2]; + $1 = HEAP32[$3 + 36 >> 2] + 1 | 0; + HEAP32[$2 + 11796 >> 2] = $1; + label$87 : { + if (!HEAP32[$3 + 24 >> 2]) { + break label$87 + } + $1 = safe_malloc_mul_2op_p(4, $1); + HEAP32[HEAP32[$0 + 4 >> 2] + 11764 >> 2] = $1; + $3 = HEAP32[$0 >> 2]; + if ($1) { + while (1) { + $2 = HEAP32[$8 >> 2]; + if ($9 >>> 0 >= HEAPU32[$3 + 24 >> 2]) { + break label$87 + } + $1 = safe_malloc_mul_2op_p(4, HEAP32[$2 + 11796 >> 2]); + HEAP32[(HEAP32[$0 + 4 >> 2] + ($9 << 2) | 0) + 11764 >> 2] = $1; + $9 = $9 + 1 | 0; + $3 = HEAP32[$0 >> 2]; + if ($1) { + continue + } + break; + } + } + HEAP32[$3 >> 2] = 8; + $9 = 1; + break label$1; + } + HEAP32[$2 + 11800 >> 2] = 0; + label$90 : { + $2 = HEAP32[$2 + 11752 >> 2]; + if ($2) { + break label$90 + } + $2 = FLAC__stream_decoder_new(); + HEAP32[HEAP32[$8 >> 2] + 11752 >> 2] = $2; + if ($2) { + break label$90 + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 3; + $9 = 1; + break label$1; + } + $1 = FLAC__stream_decoder_init_stream($2, 18, 0, 0, 0, 0, 19, 20, 21, $0); + $3 = HEAP32[$0 >> 2]; + if ($1) { + break label$45 + } + $2 = !HEAP32[$3 + 4 >> 2]; + } else { + $2 = 1 + } + $1 = HEAP32[$8 >> 2]; + HEAP32[$1 + 7312 >> 2] = 0; + HEAP32[$1 + 7316 >> 2] = 0; + HEAP32[$1 + 7292 >> 2] = 0; + $4 = $1 + 11816 | 0; + HEAP32[$4 >> 2] = 0; + HEAP32[$4 + 4 >> 2] = 0; + $4 = $1 + 11824 | 0; + HEAP32[$4 >> 2] = 0; + HEAP32[$4 + 4 >> 2] = 0; + $4 = $1 + 11832 | 0; + HEAP32[$4 >> 2] = 0; + HEAP32[$4 + 4 >> 2] = 0; + HEAP32[$1 + 11840 >> 2] = 0; + HEAP32[$3 + 624 >> 2] = 0; + HEAP32[$3 + 628 >> 2] = 0; + HEAP32[$3 + 616 >> 2] = 0; + HEAP32[$3 + 620 >> 2] = 0; + HEAP32[$3 + 608 >> 2] = 0; + HEAP32[$3 + 612 >> 2] = 0; + if (!$2) { + HEAP32[$1 + 11756 >> 2] = 0 + } + if (!FLAC__bitwriter_write_raw_uint32(HEAP32[$1 + 6856 >> 2], HEAP32[1354], HEAP32[1355])) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 7; + $9 = 1; + break label$1; + } + $9 = 1; + if (!write_bitbuffer_($0, 0, 0)) { + break label$1 + } + $1 = HEAP32[$0 + 4 >> 2]; + $2 = HEAP32[$0 >> 2]; + if (HEAP32[$2 + 4 >> 2]) { + HEAP32[$1 + 11756 >> 2] = 1 + } + HEAP32[$1 + 6872 >> 2] = 0; + HEAP32[$1 + 6876 >> 2] = 0; + HEAP32[$1 + 6880 >> 2] = 34; + HEAP32[$1 + 6888 >> 2] = HEAP32[$2 + 36 >> 2]; + HEAP32[HEAP32[$0 + 4 >> 2] + 6892 >> 2] = HEAP32[HEAP32[$0 >> 2] + 36 >> 2]; + HEAP32[HEAP32[$0 + 4 >> 2] + 6896 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 6900 >> 2] = 0; + HEAP32[HEAP32[$0 + 4 >> 2] + 6904 >> 2] = HEAP32[HEAP32[$0 >> 2] + 32 >> 2]; + HEAP32[HEAP32[$0 + 4 >> 2] + 6908 >> 2] = HEAP32[HEAP32[$0 >> 2] + 24 >> 2]; + HEAP32[HEAP32[$0 + 4 >> 2] + 6912 >> 2] = HEAP32[HEAP32[$0 >> 2] + 28 >> 2]; + $1 = HEAP32[$0 >> 2]; + $2 = HEAP32[$1 + 596 >> 2]; + $3 = HEAP32[$0 + 4 >> 2] + 6920 | 0; + HEAP32[$3 >> 2] = HEAP32[$1 + 592 >> 2]; + HEAP32[$3 + 4 >> 2] = $2; + $1 = HEAP32[$0 + 4 >> 2]; + $2 = $1 + 6936 | 0; + HEAP32[$2 >> 2] = 0; + HEAP32[$2 + 4 >> 2] = 0; + $1 = $1 + 6928 | 0; + HEAP32[$1 >> 2] = 0; + HEAP32[$1 + 4 >> 2] = 0; + if (HEAP32[HEAP32[$0 >> 2] + 12 >> 2]) { + FLAC__MD5Init(HEAP32[$8 >> 2] + 7060 | 0) + } + $1 = HEAP32[$8 >> 2]; + if (!FLAC__add_metadata_block($1 + 6872 | 0, HEAP32[$1 + 6856 >> 2])) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 7; + break label$1; + } + if (!write_bitbuffer_($0, 0, 0)) { + break label$1 + } + HEAP32[HEAP32[$8 >> 2] + 6896 >> 2] = -1 << HEAP32[1358] ^ -1; + $1 = HEAP32[$8 >> 2] + 6920 | 0; + HEAP32[$1 >> 2] = 0; + HEAP32[$1 + 4 >> 2] = 0; + if (!$11) { + HEAP32[$15 >> 2] = 4; + $2 = HEAP32[HEAP32[$0 >> 2] + 604 >> 2]; + $1 = $15; + HEAP32[$1 + 24 >> 2] = 0; + HEAP32[$1 + 28 >> 2] = 0; + HEAP32[$1 + 16 >> 2] = 0; + HEAP32[$1 + 20 >> 2] = 0; + HEAP32[$1 + 8 >> 2] = 8; + HEAP32[$1 + 4 >> 2] = !$2; + if (!FLAC__add_metadata_block($1, HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2])) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 7; + break label$1; + } + if (!write_bitbuffer_($0, 0, 0)) { + break label$1 + } + } + label$98 : { + $3 = HEAP32[$0 >> 2]; + $4 = HEAP32[$3 + 604 >> 2]; + if (!$4) { + break label$98 + } + $2 = 0; + while (1) { + $1 = HEAP32[HEAP32[$3 + 600 >> 2] + ($2 << 2) >> 2]; + HEAP32[$1 + 4 >> 2] = ($4 + -1 | 0) == ($2 | 0); + if (!FLAC__add_metadata_block($1, HEAP32[HEAP32[$8 >> 2] + 6856 >> 2])) { + HEAP32[HEAP32[$0 >> 2] >> 2] = 7; + break label$1; + } + if (write_bitbuffer_($0, 0, 0)) { + $2 = $2 + 1 | 0; + $3 = HEAP32[$0 >> 2]; + $4 = HEAP32[$3 + 604 >> 2]; + if ($2 >>> 0 >= $4 >>> 0) { + break label$98 + } + continue; + } + break; + }; + break label$1; + } + label$102 : { + $1 = HEAP32[$8 >> 2]; + $2 = HEAP32[$1 + 7272 >> 2]; + if (!$2) { + break label$102 + } + $1 = FUNCTION_TABLE[$2]($0, $3 + 624 | 0, HEAP32[$1 + 7288 >> 2]) | 0; + $3 = HEAP32[$0 >> 2]; + if (($1 | 0) != 1) { + break label$102 + } + HEAP32[$3 >> 2] = 5; + break label$1; + } + $9 = 0; + if (!HEAP32[$3 + 4 >> 2]) { + break label$1 + } + HEAP32[HEAP32[$8 >> 2] + 11756 >> 2] = 2; + break label$1; + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 2; + $9 = 1; + break label$1; + } + HEAP32[$3 >> 2] = 3; + $9 = 1; + break label$1; + } + HEAP32[$9 >> 2] = 8; + $9 = 1; + } + global$0 = $15 + 176 | 0; + return $9; + } + + function precompute_partition_info_sums_($0, $1, $2, $3, $4, $5, $6) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + $6 = $6 | 0; + var $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0; + $11 = 1 << $5; + $14 = $11 >>> 0 > 1 ? $11 : 1; + $8 = 0 - $3 | 0; + $12 = $2 + $3 >>> $5 | 0; + $9 = $12 - $3 | 0; + label$1 : { + if ($6 + 4 >>> 0 < (Math_clz32($12) ^ -32) + 33 >>> 0) { + $6 = 0; + while (1) { + $3 = 0; + $8 = $8 + $12 | 0; + if ($7 >>> 0 < $8 >>> 0) { + while (1) { + $2 = HEAP32[($7 << 2) + $0 >> 2]; + $10 = $2 >> 31; + $3 = ($10 ^ $2 + $10) + $3 | 0; + $7 = $7 + 1 | 0; + if ($7 >>> 0 < $8 >>> 0) { + continue + } + break; + }; + $7 = $9; + } + $2 = ($6 << 3) + $1 | 0; + HEAP32[$2 >> 2] = $3; + HEAP32[$2 + 4 >> 2] = 0; + $9 = $9 + $12 | 0; + $6 = $6 + 1 | 0; + if (($14 | 0) != ($6 | 0)) { + continue + } + break; + }; + break label$1; + } + $2 = 0; + while (1) { + $13 = 0; + $3 = 0; + $8 = $8 + $12 | 0; + if ($7 >>> 0 < $8 >>> 0) { + while (1) { + $6 = HEAP32[($7 << 2) + $0 >> 2]; + $10 = $6 >> 31; + $10 = $10 ^ $6 + $10; + $6 = $10 + $13 | 0; + if ($6 >>> 0 < $10 >>> 0) { + $3 = $3 + 1 | 0 + } + $13 = $6; + $7 = $7 + 1 | 0; + if ($7 >>> 0 < $8 >>> 0) { + continue + } + break; + }; + $7 = $9; + } + $6 = ($2 << 3) + $1 | 0; + HEAP32[$6 >> 2] = $13; + HEAP32[$6 + 4 >> 2] = $3; + $9 = $9 + $12 | 0; + $2 = $2 + 1 | 0; + if (($14 | 0) != ($2 | 0)) { + continue + } + break; + }; + } + if (($5 | 0) > ($4 | 0)) { + $7 = 0; + $0 = $11; + while (1) { + $5 = $5 + -1 | 0; + $8 = 0; + $0 = $0 >>> 1 | 0; + if ($0) { + while (1) { + $3 = ($7 << 3) + $1 | 0; + $2 = HEAP32[$3 + 8 >> 2]; + $9 = HEAP32[$3 + 12 >> 2] + HEAP32[$3 + 4 >> 2] | 0; + $3 = HEAP32[$3 >> 2]; + $2 = $3 + $2 | 0; + if ($2 >>> 0 < $3 >>> 0) { + $9 = $9 + 1 | 0 + } + $6 = ($11 << 3) + $1 | 0; + HEAP32[$6 >> 2] = $2; + HEAP32[$6 + 4 >> 2] = $9; + $7 = $7 + 2 | 0; + $11 = $11 + 1 | 0; + $8 = $8 + 1 | 0; + if (($8 | 0) != ($0 | 0)) { + continue + } + break; + } + } + if (($5 | 0) > ($4 | 0)) { + continue + } + break; + }; + } + } + + function verify_read_callback_($0, $1, $2, $3) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + var $4 = 0, $5 = 0; + $5 = HEAP32[$3 + 4 >> 2]; + if (HEAP32[$5 + 11760 >> 2]) { + HEAP32[$2 >> 2] = 4; + $0 = HEAPU8[5409] | HEAPU8[5410] << 8 | (HEAPU8[5411] << 16 | HEAPU8[5412] << 24); + HEAP8[$1 | 0] = $0; + HEAP8[$1 + 1 | 0] = $0 >>> 8; + HEAP8[$1 + 2 | 0] = $0 >>> 16; + HEAP8[$1 + 3 | 0] = $0 >>> 24; + HEAP32[HEAP32[$3 + 4 >> 2] + 11760 >> 2] = 0; + return 0; + } + $0 = HEAP32[$5 + 11812 >> 2]; + if (!$0) { + return 2 + } + $4 = HEAP32[$2 >> 2]; + if ($0 >>> 0 < $4 >>> 0) { + HEAP32[$2 >> 2] = $0; + $4 = $0; + } + memcpy($1, HEAP32[$5 + 11804 >> 2], $4); + $0 = HEAP32[$3 + 4 >> 2]; + $1 = $0 + 11804 | 0; + $3 = $1; + $4 = HEAP32[$1 >> 2]; + $1 = HEAP32[$2 >> 2]; + HEAP32[$3 >> 2] = $4 + $1; + $0 = $0 + 11812 | 0; + HEAP32[$0 >> 2] = HEAP32[$0 >> 2] - $1; + return 0; + } + + function verify_write_callback_($0, $1, $2, $3) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $7 = HEAP32[$1 >> 2]; + $5 = HEAP32[$3 + 4 >> 2]; + $0 = HEAP32[$1 + 8 >> 2]; + if ($0) { + $4 = $7 << 2; + while (1) { + $8 = $6 << 2; + $9 = HEAP32[$8 + $2 >> 2]; + $10 = HEAP32[($5 + $8 | 0) + 11764 >> 2]; + if (memcmp($9, $10, $4)) { + $4 = 0; + label$4 : { + if ($7) { + $0 = 0; + while (1) { + $2 = $0 << 2; + $8 = HEAP32[$2 + $9 >> 2]; + $2 = HEAP32[$2 + $10 >> 2]; + if (($8 | 0) != ($2 | 0)) { + $4 = $0; + break label$4; + } + $0 = $0 + 1 | 0; + if (($7 | 0) != ($0 | 0)) { + continue + } + break; + }; + } + $2 = 0; + $8 = 0; + } + $9 = HEAP32[$1 + 28 >> 2]; + $0 = $4; + $11 = $0 + HEAP32[$1 + 24 >> 2] | 0; + if ($11 >>> 0 < $0 >>> 0) { + $9 = $9 + 1 | 0 + } + $10 = $5 + 11816 | 0; + HEAP32[$10 >> 2] = $11; + HEAP32[$10 + 4 >> 2] = $9; + $0 = HEAP32[$1 + 28 >> 2]; + $1 = HEAP32[$1 + 24 >> 2]; + HEAP32[$5 + 11840 >> 2] = $8; + HEAP32[$5 + 11836 >> 2] = $2; + HEAP32[$5 + 11832 >> 2] = $4; + HEAP32[$5 + 11828 >> 2] = $6; + (wasm2js_i32$0 = $5 + 11824 | 0, wasm2js_i32$1 = __wasm_i64_udiv($1, $0, $7)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + HEAP32[HEAP32[$3 >> 2] >> 2] = 4; + return 1; + } + $6 = $6 + 1 | 0; + if (($0 | 0) != ($6 | 0)) { + continue + } + break; + }; + $2 = $5 + 11800 | 0; + $1 = HEAP32[$2 >> 2] - $7 | 0; + HEAP32[$2 >> 2] = $1; + label$8 : { + if (!$0) { + break label$8 + } + $2 = HEAP32[$5 + 11764 >> 2]; + $4 = $2; + $2 = $7 << 2; + memmove($4, $4 + $2 | 0, $1 << 2); + $6 = 1; + if (($0 | 0) == 1) { + break label$8 + } + while (1) { + $1 = HEAP32[$3 + 4 >> 2]; + $4 = HEAP32[($1 + ($6 << 2) | 0) + 11764 >> 2]; + memmove($4, $2 + $4 | 0, HEAP32[$1 + 11800 >> 2] << 2); + $6 = $6 + 1 | 0; + if (($0 | 0) != ($6 | 0)) { + continue + } + break; + }; + } + return 0; + } + $0 = $5 + 11800 | 0; + HEAP32[$0 >> 2] = HEAP32[$0 >> 2] - $7; + return 0; + } + + function verify_metadata_callback_($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + } + + function verify_error_callback_($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + HEAP32[HEAP32[$2 >> 2] >> 2] = 3; + } + + function write_bitbuffer_($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; + $5 = global$0 - 16 | 0; + global$0 = $5; + $4 = FLAC__bitwriter_get_buffer(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2], $5 + 4 | 0, $5); + $3 = HEAP32[$0 >> 2]; + label$1 : { + label$2 : { + if (!$4) { + HEAP32[$3 >> 2] = 8; + break label$2; + } + label$4 : { + if (!HEAP32[$3 + 4 >> 2]) { + break label$4 + } + $3 = HEAP32[$0 + 4 >> 2]; + HEAP32[$3 + 11804 >> 2] = HEAP32[$5 + 4 >> 2]; + HEAP32[$3 + 11812 >> 2] = HEAP32[$5 >> 2]; + if (!HEAP32[$3 + 11756 >> 2]) { + HEAP32[$3 + 11760 >> 2] = 1; + break label$4; + } + if (FLAC__stream_decoder_process_single(HEAP32[$3 + 11752 >> 2])) { + break label$4 + } + FLAC__bitwriter_clear(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]); + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 4) { + break label$1 + } + HEAP32[$0 >> 2] = 3; + break label$1; + } + $12 = HEAP32[$5 >> 2]; + $14 = HEAP32[$5 + 4 >> 2]; + HEAP32[$5 + 8 >> 2] = 0; + HEAP32[$5 + 12 >> 2] = 0; + label$6 : { + label$7 : { + $3 = HEAP32[$0 + 4 >> 2]; + $4 = HEAP32[$3 + 7272 >> 2]; + if (!$4) { + break label$7 + } + if ((FUNCTION_TABLE[$4]($0, $5 + 8 | 0, HEAP32[$3 + 7288 >> 2]) | 0) != 1) { + break label$7 + } + break label$6; + } + label$8 : { + if ($1) { + break label$8 + } + label$9 : { + switch (HEAPU8[$14 | 0] & 127) { + case 0: + $3 = HEAP32[$5 + 12 >> 2]; + $4 = HEAP32[$0 >> 2]; + HEAP32[$4 + 608 >> 2] = HEAP32[$5 + 8 >> 2]; + HEAP32[$4 + 612 >> 2] = $3; + break label$8; + case 3: + break label$9; + default: + break label$8; + }; + } + $3 = HEAP32[$0 >> 2]; + if (HEAP32[$3 + 616 >> 2] | HEAP32[$3 + 620 >> 2]) { + break label$8 + } + $4 = HEAP32[$5 + 12 >> 2]; + HEAP32[$3 + 616 >> 2] = HEAP32[$5 + 8 >> 2]; + HEAP32[$3 + 620 >> 2] = $4; + } + $6 = HEAP32[$0 + 4 >> 2]; + $7 = HEAP32[$6 + 7048 >> 2]; + label$11 : { + if (!$7) { + break label$11 + } + $8 = HEAP32[$0 >> 2]; + $4 = $8; + $3 = HEAP32[$4 + 628 >> 2]; + $15 = HEAP32[$4 + 624 >> 2]; + if (!($3 | $15)) { + break label$11 + } + $16 = HEAP32[$7 >> 2]; + if (!$16) { + break label$11 + } + $10 = HEAP32[$6 + 7292 >> 2]; + if ($10 >>> 0 >= $16 >>> 0) { + break label$11 + } + $13 = HEAP32[$6 + 7316 >> 2]; + $4 = $13; + $17 = HEAP32[$6 + 7312 >> 2]; + $18 = HEAP32[$8 + 36 >> 2]; + $8 = $18; + $9 = $17 + $8 | 0; + if ($9 >>> 0 < $8 >>> 0) { + $4 = $4 + 1 | 0 + } + $4 = $4 + -1 | 0; + $11 = $4 + 1 | 0; + $8 = $4; + $4 = $9 + -1 | 0; + $8 = ($4 | 0) != -1 ? $11 : $8; + $19 = HEAP32[$7 + 4 >> 2]; + while (1) { + $7 = $19 + Math_imul($10, 24) | 0; + $11 = HEAP32[$7 >> 2]; + $9 = HEAP32[$7 + 4 >> 2]; + if (($8 | 0) == ($9 | 0) & $11 >>> 0 > $4 >>> 0 | $9 >>> 0 > $8 >>> 0) { + break label$11 + } + if (($9 | 0) == ($13 | 0) & $11 >>> 0 >= $17 >>> 0 | $9 >>> 0 > $13 >>> 0) { + HEAP32[$7 >> 2] = $17; + HEAP32[$7 + 4 >> 2] = $13; + $9 = HEAP32[$5 + 8 >> 2]; + $11 = HEAP32[$5 + 12 >> 2]; + HEAP32[$7 + 16 >> 2] = $18; + HEAP32[$7 + 8 >> 2] = $9 - $15; + HEAP32[$7 + 12 >> 2] = $11 - ($3 + ($9 >>> 0 < $15 >>> 0) | 0); + } + $10 = $10 + 1 | 0; + HEAP32[$6 + 7292 >> 2] = $10; + if (($10 | 0) != ($16 | 0)) { + continue + } + break; + }; + } + label$14 : { + if (HEAP32[$6 + 7260 >> 2]) { + $2 = FLAC__ogg_encoder_aspect_write_callback_wrapper(HEAP32[$0 >> 2] + 632 | 0, $14, $12, $1, HEAP32[$6 + 7056 >> 2], $2, HEAP32[$6 + 7276 >> 2], $0, HEAP32[$6 + 7288 >> 2]); + break label$14; + } + $2 = FUNCTION_TABLE[HEAP32[$6 + 7276 >> 2]]($0, $14, $12, $1, HEAP32[$6 + 7056 >> 2], HEAP32[$6 + 7288 >> 2]) | 0; + } + if (!$2) { + $2 = HEAP32[$0 + 4 >> 2]; + $3 = $2; + $8 = $3; + $4 = HEAP32[$3 + 7308 >> 2]; + $6 = $12 + HEAP32[$3 + 7304 >> 2] | 0; + if ($6 >>> 0 < $12 >>> 0) { + $4 = $4 + 1 | 0 + } + HEAP32[$8 + 7304 >> 2] = $6; + HEAP32[$3 + 7308 >> 2] = $4; + $3 = HEAP32[$2 + 7316 >> 2]; + $4 = HEAP32[$2 + 7312 >> 2] + $1 | 0; + if ($4 >>> 0 < $1 >>> 0) { + $3 = $3 + 1 | 0 + } + HEAP32[$2 + 7312 >> 2] = $4; + HEAP32[$2 + 7316 >> 2] = $3; + $10 = 1; + $4 = $2; + $3 = HEAP32[$2 + 7320 >> 2]; + $2 = HEAP32[$2 + 7056 >> 2] + 1 | 0; + HEAP32[$4 + 7320 >> 2] = $3 >>> 0 > $2 >>> 0 ? $3 : $2; + FLAC__bitwriter_clear(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]); + if (!$1) { + break label$1 + } + $1 = HEAP32[$0 + 4 >> 2] + 6896 | 0; + $2 = HEAP32[$1 >> 2]; + $4 = $1; + $1 = HEAP32[$5 >> 2]; + HEAP32[$4 >> 2] = $1 >>> 0 < $2 >>> 0 ? $1 : $2; + $2 = HEAP32[$0 + 4 >> 2] + 6900 | 0; + $0 = HEAP32[$2 >> 2]; + HEAP32[$2 >> 2] = $1 >>> 0 > $0 >>> 0 ? $1 : $0; + break label$1; + } + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + FLAC__bitwriter_clear(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]); + HEAP32[HEAP32[$0 >> 2] >> 2] = 5; + } + $10 = 0; + } + global$0 = $5 + 16 | 0; + return $10; + } + + function FLAC__stream_encoder_init_ogg_stream($0, $1, $2, $3, $4, $5, $6) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + $6 = $6 | 0; + return init_stream_internal__1($0, $1, $2, $3, $4, $5, $6, 1) | 0; + } + + function process_subframe_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) { + var $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = Math_fround(0), $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = Math_fround(0), $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0; + $14 = global$0 - 576 | 0; + global$0 = $14; + $25 = HEAP32[(HEAPU32[HEAP32[$0 >> 2] + 28 >> 2] > 16 ? 5644 : 5640) >> 2]; + $12 = HEAP32[$3 >> 2]; + label$1 : { + label$2 : { + if (HEAP32[HEAP32[$0 + 4 >> 2] + 7256 >> 2]) { + $11 = -1; + if ($12 >>> 0 > 3) { + break label$2 + } + } + $16 = HEAP32[$6 >> 2]; + HEAP32[$16 + 4 >> 2] = $5; + HEAP32[$16 >> 2] = 1; + $11 = HEAP32[$16 + 288 >> 2] + (HEAP32[1416] + (HEAP32[1415] + (HEAP32[1414] + Math_imul($4, $12) | 0) | 0) | 0) | 0; + $12 = HEAP32[$3 >> 2]; + if ($12 >>> 0 < 4) { + break label$1 + } + } + $13 = HEAP32[$0 + 4 >> 2]; + $16 = $12 + -4 | 0; + label$4 : { + if (((Math_clz32($16 | 1) ^ 31) + $4 | 0) + 4 >>> 0 <= 32) { + $13 = FUNCTION_TABLE[HEAP32[$13 + 7224 >> 2]]($5 + 16 | 0, $16, $14 + 416 | 0) | 0; + break label$4; + } + $13 = FUNCTION_TABLE[HEAP32[$13 + 7228 >> 2]]($5 + 16 | 0, $16, $14 + 416 | 0) | 0; + } + label$6 : { + label$7 : { + label$8 : { + label$9 : { + $15 = HEAP32[$0 + 4 >> 2]; + if (HEAP32[$15 + 7248 >> 2] | HEAPF32[$14 + 420 >> 2] != Math_fround(0.0)) { + break label$9 + } + $12 = 1; + $17 = HEAP32[$5 >> 2]; + $16 = HEAP32[$3 >> 2]; + if ($16 >>> 0 <= 1) { + break label$8 + } + while (1) { + if (($17 | 0) != HEAP32[($12 << 2) + $5 >> 2]) { + break label$9 + } + $12 = $12 + 1 | 0; + if ($12 >>> 0 < $16 >>> 0) { + continue + } + break; + }; + break label$8; + } + $12 = HEAP32[$0 >> 2]; + if (!HEAP32[$15 + 7252 >> 2]) { + $16 = $11; + break label$7; + } + $16 = -1; + if (($11 | 0) != -1) { + $16 = $11; + break label$6; + } + if (!HEAP32[$12 + 556 >> 2]) { + break label$7 + } + $16 = $11; + break label$6; + } + $0 = HEAP32[$6 + 4 >> 2]; + HEAP32[$0 + 4 >> 2] = $17; + HEAP32[$0 >> 2] = 0; + $0 = HEAP32[$0 + 288 >> 2] + (HEAP32[1416] + (HEAP32[1415] + (HEAP32[1414] + $4 | 0) | 0) | 0) | 0; + $19 = $0 >>> 0 < $11 >>> 0; + $11 = $19 ? $0 : $11; + break label$1; + } + $11 = HEAP32[$12 + 568 >> 2]; + $18 = $11 ? 0 : $13; + $13 = $11 ? 4 : $13; + $11 = HEAP32[$3 >> 2]; + $29 = $13 >>> 0 < $11 >>> 0 ? $13 : $11 + -1 | 0; + if ($18 >>> 0 > $29 >>> 0) { + break label$6 + } + $32 = $25 + -1 | 0; + $33 = HEAP32[1416]; + $30 = HEAP32[1415]; + $34 = HEAP32[1414]; + $42 = Math_fround($4 >>> 0); + while (1) { + $12 = $18 << 2; + $35 = HEAPF32[$12 + ($14 + 416 | 0) >> 2]; + if (!($35 >= $42)) { + $31 = !$19; + $17 = $31 << 2; + $36 = HEAP32[$17 + $7 >> 2]; + $21 = HEAP32[$6 + $17 >> 2]; + $23 = HEAP32[HEAP32[$0 >> 2] + 572 >> 2]; + $11 = HEAP32[$0 + 4 >> 2]; + $13 = HEAP32[$11 + 6852 >> 2]; + $15 = HEAP32[$11 + 6848 >> 2]; + $11 = $5 + $12 | 0; + $12 = HEAP32[$3 >> 2] - $18 | 0; + $17 = HEAP32[$8 + $17 >> 2]; + FLAC__fixed_compute_residual($11, $12, $18, $17); + HEAP32[$21 + 36 >> 2] = $17; + HEAP32[$21 + 12 >> 2] = $36; + HEAP32[$21 >> 2] = 2; + HEAP32[$21 + 4 >> 2] = 0; + $37 = $35 > Math_fround(0.0); + $26 = HEAP32[$0 + 4 >> 2]; + $22 = $18; + $27 = +$35 + .5; + label$15 : { + if ($27 < 4294967296.0 & $27 >= 0.0) { + $11 = ~~$27 >>> 0; + break label$15; + } + $11 = 0; + } + $11 = $37 ? $11 + 1 | 0 : 1; + $15 = find_best_partition_order_($26, $17, $15, $13, $12, $22, $11 >>> 0 < $25 >>> 0 ? $11 : $32, $25, $1, $2, $4, $23, $21 + 4 | 0); + HEAP32[$21 + 16 >> 2] = $18; + if ($18) { + $13 = $21 + 20 | 0; + $11 = 0; + while (1) { + $12 = $11 << 2; + HEAP32[$12 + $13 >> 2] = HEAP32[$5 + $12 >> 2]; + $11 = $11 + 1 | 0; + if (($18 | 0) != ($11 | 0)) { + continue + } + break; + }; + } + $11 = HEAP32[$21 + 288 >> 2] + ($33 + ($30 + ($34 + ($15 + Math_imul($4, $18) | 0) | 0) | 0) | 0) | 0; + $12 = $11 >>> 0 < $16 >>> 0; + $19 = $12 ? $31 : $19; + $16 = $12 ? $11 : $16; + } + $18 = $18 + 1 | 0; + if ($18 >>> 0 <= $29 >>> 0) { + continue + } + break; + }; + $12 = HEAP32[$0 >> 2]; + } + $13 = HEAP32[$12 + 556 >> 2]; + if (!$13) { + $11 = $16; + break label$1; + } + $11 = HEAP32[$3 >> 2]; + $13 = $13 >>> 0 < $11 >>> 0 ? $13 : $11 + -1 | 0; + HEAP32[$14 + 12 >> 2] = $13; + if (!$13) { + $11 = $16; + break label$1; + } + if (!HEAP32[$12 + 40 >> 2]) { + $11 = $16; + break label$1; + } + $40 = 33 - $4 | 0; + $43 = $25 + -1 | 0; + $44 = HEAP32[1413]; + $45 = HEAP32[1412]; + $46 = HEAP32[1416]; + $21 = HEAP32[1415]; + $47 = HEAP32[1414]; + $27 = +($4 >>> 0); + $29 = $4 >>> 0 < 18; + $32 = $4 >>> 0 > 16; + $33 = $4 >>> 0 > 17; + while (1) { + $12 = HEAP32[$0 + 4 >> 2]; + FLAC__lpc_window_data($5, HEAP32[($12 + ($38 << 2) | 0) + 84 >> 2], HEAP32[$12 + 212 >> 2], $11); + $11 = HEAP32[$0 + 4 >> 2]; + FUNCTION_TABLE[HEAP32[$11 + 7232 >> 2]](HEAP32[$11 + 212 >> 2], HEAP32[$3 >> 2], HEAP32[$14 + 12 >> 2] + 1 | 0, $14 + 272 | 0); + label$23 : { + if (HEAPF32[$14 + 272 >> 2] == Math_fround(0.0)) { + break label$23 + } + FLAC__lpc_compute_lp_coefficients($14 + 272 | 0, $14 + 12 | 0, HEAP32[$0 + 4 >> 2] + 7628 | 0, $14 + 16 | 0); + $15 = 1; + $12 = HEAP32[$14 + 12 >> 2]; + $17 = HEAP32[$0 >> 2]; + if (!HEAP32[$17 + 568 >> 2]) { + $11 = $14; + $12 = FLAC__lpc_compute_best_order($11 + 16 | 0, $12, HEAP32[$3 >> 2], (HEAP32[$17 + 564 >> 2] ? 5 : HEAP32[$17 + 560 >> 2]) + $4 | 0); + HEAP32[$11 + 12 >> 2] = $12; + $15 = $12; + } + $11 = HEAP32[$3 >> 2]; + if ($12 >>> 0 >= $11 >>> 0) { + $12 = $11 + -1 | 0; + HEAP32[$14 + 12 >> 2] = $12; + } + if ($15 >>> 0 > $12 >>> 0) { + break label$23 + } + while (1) { + label$29 : { + $30 = $15 + -1 | 0; + $24 = FLAC__lpc_compute_expected_bits_per_residual_sample(HEAPF64[($14 + 16 | 0) + ($30 << 3) >> 3], $11 - $15 | 0); + if ($24 >= $27) { + break label$29 + } + $11 = $24 > 0.0; + $24 = $24 + .5; + label$30 : { + if ($24 < 4294967296.0 & $24 >= 0.0) { + $13 = ~~$24 >>> 0; + break label$30; + } + $13 = 0; + } + $13 = $11 ? $13 + 1 | 0 : 1; + $11 = $13 >>> 0 < $25 >>> 0; + $12 = HEAP32[$0 >> 2]; + label$32 : { + if (HEAP32[$12 + 564 >> 2]) { + $22 = 5; + $26 = 15; + if ($33) { + break label$32 + } + $17 = (Math_clz32($15) ^ -32) + $40 | 0; + if ($17 >>> 0 > 14) { + break label$32 + } + $26 = $17 >>> 0 > 5 ? $17 : 5; + break label$32; + } + $26 = HEAP32[$12 + 560 >> 2]; + $22 = $26; + } + $34 = $11 ? $13 : $43; + $39 = ($15 << 2) + $5 | 0; + $11 = Math_clz32($15); + $31 = $11 ^ 31; + $41 = ($11 ^ -32) + $40 | 0; + while (1) { + $23 = HEAP32[$3 >> 2]; + $13 = !$19; + $11 = $13 << 2; + $37 = HEAP32[$11 + $7 >> 2]; + $20 = HEAP32[$6 + $11 >> 2]; + $28 = HEAP32[$8 + $11 >> 2]; + $36 = HEAP32[$12 + 572 >> 2]; + $12 = HEAP32[$0 + 4 >> 2]; + $18 = HEAP32[$12 + 6852 >> 2]; + $17 = HEAP32[$12 + 6848 >> 2]; + $11 = 0; + $48 = $19; + $19 = ($12 + ($30 << 7) | 0) + 7628 | 0; + $12 = $29 ? ($41 >>> 0 > $22 >>> 0 ? $22 : $41) : $22; + if (!FLAC__lpc_quantize_coefficients($19, $15, $12, $14 + 448 | 0, $14 + 444 | 0)) { + $23 = $23 - $15 | 0; + $19 = $4 + $12 | 0; + label$37 : { + if ($19 + $31 >>> 0 <= 32) { + $11 = HEAP32[$0 + 4 >> 2]; + if (!($12 >>> 0 > 16 | $32)) { + FUNCTION_TABLE[HEAP32[$11 + 7244 >> 2]]($39, $23, $14 + 448 | 0, $15, HEAP32[$14 + 444 >> 2], $28); + break label$37; + } + FUNCTION_TABLE[HEAP32[$11 + 7236 >> 2]]($39, $23, $14 + 448 | 0, $15, HEAP32[$14 + 444 >> 2], $28); + break label$37; + } + FUNCTION_TABLE[HEAP32[HEAP32[$0 + 4 >> 2] + 7240 >> 2]]($39, $23, $14 + 448 | 0, $15, HEAP32[$14 + 444 >> 2], $28); + } + HEAP32[$20 >> 2] = 3; + HEAP32[$20 + 4 >> 2] = 0; + HEAP32[$20 + 284 >> 2] = $28; + HEAP32[$20 + 12 >> 2] = $37; + $18 = find_best_partition_order_(HEAP32[$0 + 4 >> 2], $28, $17, $18, $23, $15, $34, $25, $1, $2, $4, $36, $20 + 4 | 0); + HEAP32[$20 + 20 >> 2] = $12; + HEAP32[$20 + 16 >> 2] = $15; + HEAP32[$20 + 24 >> 2] = HEAP32[$14 + 444 >> 2]; + memcpy($20 + 28 | 0, $14 + 448 | 0, 128); + $11 = 0; + if ($15) { + while (1) { + $17 = $11 << 2; + HEAP32[($17 + $20 | 0) + 156 >> 2] = HEAP32[$5 + $17 >> 2]; + $11 = $11 + 1 | 0; + if (($15 | 0) != ($11 | 0)) { + continue + } + break; + } + } + $11 = ((HEAP32[$20 + 288 >> 2] + (((($18 + Math_imul($15, $19) | 0) + $47 | 0) + $21 | 0) + $46 | 0) | 0) + $45 | 0) + $44 | 0; + } + $12 = ($11 | 0) != 0 & $11 >>> 0 < $16 >>> 0; + $19 = $12 ? $13 : $48; + $16 = $12 ? $11 : $16; + $22 = $22 + 1 | 0; + if ($22 >>> 0 > $26 >>> 0) { + break label$29 + } + $12 = HEAP32[$0 >> 2]; + continue; + }; + } + $15 = $15 + 1 | 0; + if ($15 >>> 0 > HEAPU32[$14 + 12 >> 2]) { + break label$23 + } + $11 = HEAP32[$3 >> 2]; + continue; + }; + } + $38 = $38 + 1 | 0; + if ($38 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 40 >> 2]) { + $11 = HEAP32[$3 >> 2]; + continue; + } + break; + }; + $11 = $16; + } + if (($11 | 0) == -1) { + $0 = HEAP32[$3 >> 2]; + $1 = HEAP32[($19 << 2) + $6 >> 2]; + HEAP32[$1 + 4 >> 2] = $5; + HEAP32[$1 >> 2] = 1; + $11 = HEAP32[$1 + 288 >> 2] + (HEAP32[1416] + (HEAP32[1415] + (HEAP32[1414] + Math_imul($0, $4) | 0) | 0) | 0) | 0; + } + HEAP32[$9 >> 2] = $19; + HEAP32[$10 >> 2] = $11; + global$0 = $14 + 576 | 0; + } + + function add_subframe_($0, $1, $2, $3, $4) { + var $5 = 0; + $5 = 1; + label$1 : { + label$2 : { + label$3 : { + switch (HEAP32[$3 >> 2]) { + case 0: + if (FLAC__subframe_add_constant($3 + 4 | 0, $2, HEAP32[$3 + 288 >> 2], $4)) { + break label$1 + } + break label$2; + case 2: + if (FLAC__subframe_add_fixed($3 + 4 | 0, $1 - HEAP32[$3 + 16 >> 2] | 0, $2, HEAP32[$3 + 288 >> 2], $4)) { + break label$1 + } + break label$2; + case 3: + if (FLAC__subframe_add_lpc($3 + 4 | 0, $1 - HEAP32[$3 + 16 >> 2] | 0, $2, HEAP32[$3 + 288 >> 2], $4)) { + break label$1 + } + break label$2; + case 1: + break label$3; + default: + break label$1; + }; + } + if (FLAC__subframe_add_verbatim($3 + 4 | 0, $1, $2, HEAP32[$3 + 288 >> 2], $4)) { + break label$1 + } + } + HEAP32[HEAP32[$0 >> 2] >> 2] = 7; + $5 = 0; + } + return $5; + } + + function FLAC__stream_encoder_set_ogg_serial_number($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 1) { + HEAP32[$0 + 632 >> 2] = $1; + $0 = 1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_encoder_set_verify($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 1) { + HEAP32[$0 + 4 >> 2] = $1; + $0 = 1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_encoder_set_channels($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 1) { + HEAP32[$0 + 24 >> 2] = $1; + $0 = 1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_encoder_set_bits_per_sample($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 1) { + HEAP32[$0 + 28 >> 2] = $1; + $0 = 1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_encoder_set_sample_rate($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 1) { + HEAP32[$0 + 32 >> 2] = $1; + $0 = 1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_encoder_set_compression_level($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + var $2 = 0, $3 = 0, $4 = 0; + $3 = HEAP32[$0 >> 2]; + if (HEAP32[$3 >> 2] == 1) { + $2 = Math_imul($1 >>> 0 < 8 ? $1 : 8, 44); + $1 = $2 + 11184 | 0; + $4 = HEAP32[$1 + 4 >> 2]; + HEAP32[$3 + 16 >> 2] = HEAP32[$1 >> 2]; + HEAP32[$3 + 20 >> 2] = $4; + $3 = FLAC__stream_encoder_set_apodization($0, HEAP32[$1 + 40 >> 2]); + $1 = 0; + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 1) { + $1 = $2 + 11184 | 0; + $2 = HEAP32[$1 + 32 >> 2]; + HEAP32[$0 + 576 >> 2] = HEAP32[$1 + 28 >> 2]; + HEAP32[$0 + 580 >> 2] = $2; + HEAP32[$0 + 568 >> 2] = HEAP32[$1 + 24 >> 2]; + HEAP32[$0 + 564 >> 2] = HEAP32[$1 + 16 >> 2]; + $2 = HEAP32[$1 + 12 >> 2]; + HEAP32[$0 + 556 >> 2] = HEAP32[$1 + 8 >> 2]; + HEAP32[$0 + 560 >> 2] = $2; + $1 = $3 & 1; + $0 = 1; + } else { + $0 = 0 + } + $0 = $0 & $1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_encoder_set_blocksize($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 1) { + HEAP32[$0 + 36 >> 2] = $1; + $0 = 1; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_encoder_set_total_samples_estimate($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + $0 = HEAP32[$0 >> 2]; + if (HEAP32[$0 >> 2] == 1) { + $6 = $2; + $7 = $0; + $8 = $1; + $4 = HEAP32[1363]; + $3 = $4 & 31; + if (32 <= ($4 & 63) >>> 0) { + $4 = -1 << $3; + $3 = 0; + } else { + $4 = (1 << $3) - 1 & -1 >>> 32 - $3 | -1 << $3; + $3 = -1 << $3; + } + $5 = $3 ^ -1; + $3 = $4 ^ -1; + $1 = ($2 | 0) == ($3 | 0) & $5 >>> 0 > $1 >>> 0 | $3 >>> 0 > $2 >>> 0; + HEAP32[$7 + 592 >> 2] = $1 ? $8 : $5; + HEAP32[$0 + 596 >> 2] = $1 ? $6 : $3; + $0 = 1; + } else { + $0 = 0 + } + return $0; + } + + function FLAC__stream_encoder_set_metadata($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + var $3 = 0, $4 = 0; + $3 = HEAP32[$0 >> 2]; + if (HEAP32[$3 >> 2] == 1) { + $4 = HEAP32[$3 + 600 >> 2]; + if ($4) { + dlfree($4); + $3 = HEAP32[$0 >> 2]; + HEAP32[$3 + 600 >> 2] = 0; + HEAP32[$3 + 604 >> 2] = 0; + } + $2 = $1 ? $2 : 0; + if ($2) { + $3 = safe_malloc_mul_2op_p(4, $2); + if (!$3) { + return 0 + } + $1 = memcpy($3, $1, $2 << 2); + $3 = HEAP32[$0 >> 2]; + HEAP32[$3 + 604 >> 2] = $2; + HEAP32[$3 + 600 >> 2] = $1; + } + $0 = $3 + 632 | 0; + if ($2 >>> HEAP32[1886]) { + $0 = 0 + } else { + HEAP32[$0 + 4 >> 2] = $2; + $0 = 1; + } + $0 = ($0 | 0) != 0; + } else { + $0 = 0 + } + return $0 | 0; + } + + function FLAC__stream_encoder_get_verify_decoder_state($0) { + $0 = $0 | 0; + if (!HEAP32[HEAP32[$0 >> 2] + 4 >> 2]) { + return 9 + } + return FLAC__stream_decoder_get_state(HEAP32[HEAP32[$0 + 4 >> 2] + 11752 >> 2]) | 0; + } + + function FLAC__stream_encoder_get_verify($0) { + $0 = $0 | 0; + return HEAP32[HEAP32[$0 >> 2] + 4 >> 2]; + } + + function FLAC__stream_encoder_process($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; + $5 = HEAP32[$0 >> 2]; + $11 = HEAP32[$5 + 36 >> 2]; + $16 = $11 + 1 | 0; + $4 = HEAP32[$0 + 4 >> 2]; + $10 = HEAP32[$5 + 24 >> 2]; + $13 = $11 << 2; + label$1 : { + while (1) { + $3 = $16 - HEAP32[$4 + 7052 >> 2] | 0; + $6 = $2 - $7 | 0; + $6 = $3 >>> 0 < $6 >>> 0 ? $3 : $6; + if (HEAP32[$5 + 4 >> 2]) { + if ($10) { + $5 = $6 << 2; + $3 = 0; + while (1) { + $8 = $3 << 2; + memcpy(HEAP32[($8 + $4 | 0) + 11764 >> 2] + (HEAP32[$4 + 11800 >> 2] << 2) | 0, HEAP32[$1 + $8 >> 2] + ($7 << 2) | 0, $5); + $3 = $3 + 1 | 0; + if (($10 | 0) != ($3 | 0)) { + continue + } + break; + }; + } + $4 = $4 + 11800 | 0; + HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + $6; + } + if ($10) { + $5 = $6 << 2; + $4 = 0; + $3 = 0; + while (1) { + $8 = $3 << 2; + $12 = HEAP32[$8 + $1 >> 2]; + if (!$12) { + break label$1 + } + $9 = $8; + $8 = HEAP32[$0 + 4 >> 2]; + memcpy(HEAP32[($9 + $8 | 0) + 4 >> 2] + (HEAP32[$8 + 7052 >> 2] << 2) | 0, $12 + ($7 << 2) | 0, $5); + $3 = $3 + 1 | 0; + if (($10 | 0) != ($3 | 0)) { + continue + } + break; + }; + } + $5 = HEAP32[$0 >> 2]; + label$8 : { + if (HEAP32[$5 + 16 >> 2]) { + $4 = HEAP32[$0 + 4 >> 2]; + if ($7 >>> 0 >= $2 >>> 0) { + break label$8 + } + $3 = HEAP32[$4 + 7052 >> 2]; + if ($3 >>> 0 > $11 >>> 0) { + break label$8 + } + $8 = HEAP32[$4 + 40 >> 2]; + $12 = HEAP32[$4 + 36 >> 2]; + $17 = HEAP32[$1 + 4 >> 2]; + $18 = HEAP32[$1 >> 2]; + while (1) { + $14 = $3 << 2; + $9 = $7 << 2; + $15 = $9 + $18 | 0; + $9 = $9 + $17 | 0; + HEAP32[$14 + $8 >> 2] = HEAP32[$15 >> 2] - HEAP32[$9 >> 2]; + HEAP32[$12 + $14 >> 2] = HEAP32[$9 >> 2] + HEAP32[$15 >> 2] >> 1; + $7 = $7 + 1 | 0; + if ($7 >>> 0 >= $2 >>> 0) { + break label$8 + } + $3 = $3 + 1 | 0; + if ($3 >>> 0 <= $11 >>> 0) { + continue + } + break; + }; + break label$8; + } + $7 = $7 + $6 | 0; + $4 = HEAP32[$0 + 4 >> 2]; + } + $3 = HEAP32[$4 + 7052 >> 2] + $6 | 0; + HEAP32[$4 + 7052 >> 2] = $3; + if ($3 >>> 0 > $11 >>> 0) { + $4 = 0; + if (!process_frame_($0, 0, 0)) { + break label$1 + } + if ($10) { + $4 = HEAP32[$0 + 4 >> 2]; + $3 = 0; + while (1) { + $6 = HEAP32[($4 + ($3 << 2) | 0) + 4 >> 2]; + HEAP32[$6 >> 2] = HEAP32[$6 + $13 >> 2]; + $3 = $3 + 1 | 0; + if (($10 | 0) != ($3 | 0)) { + continue + } + break; + }; + } + $4 = HEAP32[$0 + 4 >> 2]; + $5 = HEAP32[$0 >> 2]; + if (HEAP32[$5 + 16 >> 2]) { + $3 = HEAP32[$4 + 36 >> 2]; + HEAP32[$3 >> 2] = HEAP32[$3 + $13 >> 2]; + $3 = HEAP32[$4 + 40 >> 2]; + HEAP32[$3 >> 2] = HEAP32[$3 + $13 >> 2]; + } + HEAP32[$4 + 7052 >> 2] = 1; + } + if ($7 >>> 0 < $2 >>> 0) { + continue + } + break; + }; + $4 = 1; + } + return $4 | 0; + } + + function FLAC__stream_encoder_process_interleaved($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; + $3 = HEAP32[$0 >> 2]; + $9 = HEAP32[$3 + 36 >> 2]; + $16 = $9 + 1 | 0; + label$1 : { + label$2 : { + $10 = HEAP32[$3 + 24 >> 2]; + if (!(!HEAP32[$3 + 16 >> 2] | ($10 | 0) != 2)) { + while (1) { + $4 = HEAP32[$0 + 4 >> 2]; + if (HEAP32[$3 + 4 >> 2]) { + $3 = HEAP32[$4 + 11800 >> 2]; + $5 = $16 - HEAP32[$4 + 7052 >> 2] | 0; + $6 = $2 - $7 | 0; + $8 = $5 >>> 0 < $6 >>> 0 ? $5 : $6; + label$6 : { + if (!$8) { + break label$6 + } + if (!$10) { + $3 = $3 + $8 | 0; + break label$6; + } + $5 = $7 << 1; + $11 = HEAP32[$4 + 11768 >> 2]; + $15 = HEAP32[$4 + 11764 >> 2]; + $6 = 0; + while (1) { + $13 = $3 << 2; + $14 = $5 << 2; + HEAP32[$13 + $15 >> 2] = HEAP32[$14 + $1 >> 2]; + HEAP32[$11 + $13 >> 2] = HEAP32[($14 | 4) + $1 >> 2]; + $3 = $3 + 1 | 0; + $5 = $5 + 2 | 0; + $6 = $6 + 1 | 0; + if (($8 | 0) != ($6 | 0)) { + continue + } + break; + }; + } + HEAP32[$4 + 11800 >> 2] = $3; + } + $5 = $7 >>> 0 < $2 >>> 0; + $3 = HEAP32[$4 + 7052 >> 2]; + label$9 : { + if ($3 >>> 0 > $9 >>> 0 | $7 >>> 0 >= $2 >>> 0) { + break label$9 + } + $11 = HEAP32[$4 + 40 >> 2]; + $15 = HEAP32[$4 + 8 >> 2]; + $13 = HEAP32[$4 + 36 >> 2]; + $14 = HEAP32[$4 + 4 >> 2]; + while (1) { + $5 = $3 << 2; + $8 = ($12 << 2) + $1 | 0; + $6 = HEAP32[$8 >> 2]; + HEAP32[$5 + $14 >> 2] = $6; + $8 = HEAP32[$8 + 4 >> 2]; + HEAP32[$5 + $15 >> 2] = $8; + HEAP32[$5 + $11 >> 2] = $6 - $8; + HEAP32[$5 + $13 >> 2] = $6 + $8 >> 1; + $3 = $3 + 1 | 0; + $12 = $12 + 2 | 0; + $7 = $7 + 1 | 0; + $5 = $7 >>> 0 < $2 >>> 0; + if ($7 >>> 0 >= $2 >>> 0) { + break label$9 + } + if ($3 >>> 0 <= $9 >>> 0) { + continue + } + break; + }; + } + HEAP32[$4 + 7052 >> 2] = $3; + if ($3 >>> 0 > $9 >>> 0) { + $3 = 0; + if (!process_frame_($0, 0, 0)) { + break label$1 + } + $3 = HEAP32[$0 + 4 >> 2]; + $6 = HEAP32[$3 + 4 >> 2]; + $4 = $6; + $6 = $9 << 2; + HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2]; + $4 = HEAP32[$3 + 8 >> 2]; + HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2]; + $4 = HEAP32[$3 + 36 >> 2]; + HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2]; + $4 = HEAP32[$3 + 40 >> 2]; + HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2]; + HEAP32[$3 + 7052 >> 2] = 1; + } + if (!$5) { + break label$2 + } + $3 = HEAP32[$0 >> 2]; + continue; + } + } + while (1) { + $7 = HEAP32[$0 + 4 >> 2]; + if (HEAP32[$3 + 4 >> 2]) { + $6 = HEAP32[$7 + 11800 >> 2]; + $3 = $16 - HEAP32[$7 + 7052 >> 2] | 0; + $5 = $2 - $4 | 0; + $8 = $3 >>> 0 < $5 >>> 0 ? $3 : $5; + label$14 : { + if (!$8) { + break label$14 + } + if (!$10) { + $6 = $6 + $8 | 0; + break label$14; + } + $5 = Math_imul($4, $10); + $11 = 0; + while (1) { + $3 = 0; + while (1) { + HEAP32[HEAP32[($7 + ($3 << 2) | 0) + 11764 >> 2] + ($6 << 2) >> 2] = HEAP32[($5 << 2) + $1 >> 2]; + $5 = $5 + 1 | 0; + $3 = $3 + 1 | 0; + if (($10 | 0) != ($3 | 0)) { + continue + } + break; + }; + $6 = $6 + 1 | 0; + $11 = $11 + 1 | 0; + if (($8 | 0) != ($11 | 0)) { + continue + } + break; + }; + } + HEAP32[$7 + 11800 >> 2] = $6; + } + $6 = $4 >>> 0 < $2 >>> 0; + $5 = HEAP32[$7 + 7052 >> 2]; + label$18 : { + if ($5 >>> 0 > $9 >>> 0 | $4 >>> 0 >= $2 >>> 0) { + break label$18 + } + if ($10) { + while (1) { + $3 = 0; + while (1) { + HEAP32[HEAP32[($7 + ($3 << 2) | 0) + 4 >> 2] + ($5 << 2) >> 2] = HEAP32[($12 << 2) + $1 >> 2]; + $12 = $12 + 1 | 0; + $3 = $3 + 1 | 0; + if (($10 | 0) != ($3 | 0)) { + continue + } + break; + }; + $5 = $5 + 1 | 0; + $4 = $4 + 1 | 0; + $6 = $4 >>> 0 < $2 >>> 0; + if ($4 >>> 0 >= $2 >>> 0) { + break label$18 + } + if ($5 >>> 0 <= $9 >>> 0) { + continue + } + break label$18; + } + } + while (1) { + $5 = $5 + 1 | 0; + $4 = $4 + 1 | 0; + $6 = $4 >>> 0 < $2 >>> 0; + if ($4 >>> 0 >= $2 >>> 0) { + break label$18 + } + if ($5 >>> 0 <= $9 >>> 0) { + continue + } + break; + }; + } + HEAP32[$7 + 7052 >> 2] = $5; + if ($5 >>> 0 > $9 >>> 0) { + $3 = 0; + if (!process_frame_($0, 0, 0)) { + break label$1 + } + $5 = HEAP32[$0 + 4 >> 2]; + if ($10) { + $3 = 0; + while (1) { + $7 = HEAP32[($5 + ($3 << 2) | 0) + 4 >> 2]; + HEAP32[$7 >> 2] = HEAP32[$7 + ($9 << 2) >> 2]; + $3 = $3 + 1 | 0; + if (($10 | 0) != ($3 | 0)) { + continue + } + break; + }; + } + HEAP32[$5 + 7052 >> 2] = 1; + } + if (!$6) { + break label$2 + } + $3 = HEAP32[$0 >> 2]; + continue; + }; + } + $3 = 1; + } + return $3 | 0; + } + + function find_best_partition_order_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) { + var $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0; + $26 = $4 + $5 | 0; + $14 = FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_and_predictor_order($9, $26, $5); + $22 = $14 >>> 0 > $8 >>> 0 ? $8 : $14; + FUNCTION_TABLE[HEAP32[$0 + 7220 >> 2]]($1, $2, $4, $5, $22, $14, $10); + label$1 : { + if (!$11) { + break label$1 + } + $10 = 0; + $8 = 0; + if (($14 | 0) >= 0) { + $8 = 1 << $14; + $20 = $8 >>> 0 > 1 ? $8 : 1; + $16 = $26 >>> $14 | 0; + while (1) { + $17 = 0; + $9 = $13; + $18 = 0; + $27 = ($15 << 2) + $3 | 0; + label$4 : { + label$5 : { + $23 = $15 ? 0 : $5; + $19 = $16 - $23 | 0; + if (!$19) { + break label$5 + } + while (1) { + $21 = $17; + $17 = HEAP32[($9 << 2) + $1 >> 2]; + $17 = $21 | $17 >> 31 ^ $17; + $9 = $9 + 1 | 0; + $18 = $18 + 1 | 0; + if (($19 | 0) != ($18 | 0)) { + continue + } + break; + }; + $13 = ($13 + $16 | 0) - $23 | 0; + if (!$17) { + break label$5 + } + $9 = (Math_clz32($17) ^ 31) + 2 | 0; + break label$4; + } + $9 = 1; + } + HEAP32[$27 >> 2] = $9; + $15 = $15 + 1 | 0; + if (($20 | 0) != ($15 | 0)) { + continue + } + break; + }; + } + if (($14 | 0) <= ($22 | 0)) { + break label$1 + } + $1 = $14; + while (1) { + $1 = $1 + -1 | 0; + $9 = 0; + while (1) { + $13 = ($10 << 2) + $3 | 0; + $15 = HEAP32[$13 >> 2]; + $13 = HEAP32[$13 + 4 >> 2]; + HEAP32[($8 << 2) + $3 >> 2] = $15 >>> 0 > $13 >>> 0 ? $15 : $13; + $8 = $8 + 1 | 0; + $10 = $10 + 2 | 0; + $9 = $9 + 1 | 0; + if (!($9 >>> $1)) { + continue + } + break; + }; + if (($1 | 0) > ($22 | 0)) { + continue + } + break; + }; + } + label$9 : { + if (($14 | 0) < ($22 | 0)) { + HEAP32[$12 + 4 >> 2] = 0; + $2 = 6; + break label$9; + } + $28 = HEAP32[1407]; + $40 = $28 + (Math_imul($6 + 1 | 0, $4) - ($4 >>> 1 | 0) | 0) | 0; + $35 = $7 + -1 | 0; + $36 = HEAP32[1409] + HEAP32[1408] | 0; + $23 = HEAP32[1406] + HEAP32[1405] | 0; + $27 = $6 + -1 | 0; + while (1) { + label$12 : { + $20 = $14; + $37 = !$29; + $1 = Math_imul($37, 12) + $0 | 0; + $8 = $1 + 11724 | 0; + FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($8, $14 >>> 0 > 6 ? $14 : 6); + $38 = ($30 << 2) + $3 | 0; + $25 = ($30 << 3) + $2 | 0; + $39 = HEAP32[$1 + 11728 >> 2]; + $31 = HEAP32[$8 >> 2]; + label$13 : { + if ($14) { + $32 = $26 >>> $20 | 0; + if ($32 >>> 0 <= $5 >>> 0) { + break label$12 + } + $18 = 0; + $33 = 0; + $21 = $23; + if (!$11) { + while (1) { + $17 = $32 - ($18 ? 0 : $5) | 0; + $1 = $25 + ($18 << 3) | 0; + $13 = HEAP32[$1 + 4 >> 2]; + $16 = HEAP32[$1 >> 2]; + label$17 : { + if (!$13 & $16 >>> 0 >= 268435457 | $13 >>> 0 > 0) { + $1 = $17; + $10 = 0; + $8 = 0; + label$19 : { + if (($13 | 0) == 16777216 & $16 >>> 0 > 0 | $13 >>> 0 > 16777216) { + $14 = $1; + $9 = 0; + break label$19; + } + $14 = $1; + $9 = 0; + $15 = $1 >>> 25 | 0; + $19 = $1 << 7; + if (($13 | 0) == ($15 | 0) & $19 >>> 0 >= $16 >>> 0 | $15 >>> 0 > $13 >>> 0) { + break label$19 + } + while (1) { + $8 = $8 + 8 | 0; + $15 = $10 << 15 | $1 >>> 17; + $19 = $1 << 15; + $9 = $10 << 8 | $1 >>> 24; + $14 = $1 << 8; + $1 = $14; + $10 = $9; + if (($13 | 0) == ($15 | 0) & $19 >>> 0 < $16 >>> 0 | $15 >>> 0 < $13 >>> 0) { + continue + } + break; + }; + } + if (($9 | 0) == ($13 | 0) & $14 >>> 0 >= $16 >>> 0 | $9 >>> 0 > $13 >>> 0) { + break label$17 + } + while (1) { + $8 = $8 + 1 | 0; + $1 = $14; + $15 = $9 << 1 | $1 >>> 31; + $14 = $1 << 1; + $1 = $14; + $9 = $15; + if (($13 | 0) == ($9 | 0) & $1 >>> 0 < $16 >>> 0 | $9 >>> 0 < $13 >>> 0) { + continue + } + break; + }; + break label$17; + } + $8 = 0; + $10 = $17; + $1 = $16; + if ($10 << 3 >>> 0 < $1 >>> 0) { + while (1) { + $8 = $8 + 4 | 0; + $9 = $10 << 7; + $10 = $10 << 4; + if ($9 >>> 0 < $1 >>> 0) { + continue + } + break; + } + } + if ($10 >>> 0 >= $1 >>> 0) { + break label$17 + } + while (1) { + $8 = $8 + 1 | 0; + $10 = $10 << 1; + if ($10 >>> 0 < $1 >>> 0) { + continue + } + break; + }; + } + $8 = $8 >>> 0 < $7 >>> 0 ? $8 : $35; + $10 = $8 + -1 | 0; + $1 = $10 & 31; + $1 = (($28 - ($17 >>> 1 | 0) | 0) + Math_imul($17, $8 + 1 | 0) | 0) + ($8 ? (32 <= ($10 & 63) >>> 0 ? $13 >>> $1 | 0 : ((1 << $1) - 1 & $13) << 32 - $1 | $16 >>> $1) : $16 << 1) | 0; + $33 = ($1 | 0) == -1 ? $33 : $8; + HEAP32[$31 + ($18 << 2) >> 2] = $33; + $21 = $1 + $21 | 0; + $18 = $18 + 1 | 0; + if (!($18 >>> $20)) { + continue + } + break label$13; + } + } + while (1) { + $17 = $32 - ($18 ? 0 : $5) | 0; + $1 = $25 + ($18 << 3) | 0; + $13 = HEAP32[$1 + 4 >> 2]; + $16 = HEAP32[$1 >> 2]; + label$27 : { + label$28 : { + if (!$13 & $16 >>> 0 >= 268435457 | $13 >>> 0 > 0) { + $1 = $17; + $10 = 0; + $8 = 0; + if (($13 | 0) == 16777216 & $16 >>> 0 > 0 | $13 >>> 0 > 16777216) { + break label$28 + } + $14 = $1; + $9 = 0; + $15 = $1 >>> 25 | 0; + $19 = $1 << 7; + if (($13 | 0) == ($15 | 0) & $19 >>> 0 >= $16 >>> 0 | $15 >>> 0 > $13 >>> 0) { + break label$28 + } + while (1) { + $8 = $8 + 8 | 0; + $1 = $9; + $10 = $14; + $15 = $1 << 15 | $10 >>> 17; + $19 = $10 << 15; + $9 = $1 << 8; + $1 = $10; + $9 = $9 | $1 >>> 24; + $1 = $1 << 8; + $14 = $1; + $10 = $9; + if (($13 | 0) == ($15 | 0) & $19 >>> 0 < $16 >>> 0 | $15 >>> 0 < $13 >>> 0) { + continue + } + break; + }; + break label$28; + } + $8 = 0; + $10 = $17; + $1 = $16; + if ($10 << 3 >>> 0 < $1 >>> 0) { + while (1) { + $8 = $8 + 4 | 0; + $9 = $10 << 7; + $10 = $10 << 4; + if ($9 >>> 0 < $1 >>> 0) { + continue + } + break; + } + } + if ($10 >>> 0 >= $1 >>> 0) { + break label$27 + } + while (1) { + $8 = $8 + 1 | 0; + $10 = $10 << 1; + if ($10 >>> 0 < $1 >>> 0) { + continue + } + break; + }; + break label$27; + } + if (($10 | 0) == ($13 | 0) & $1 >>> 0 >= $16 >>> 0 | $10 >>> 0 > $13 >>> 0) { + break label$27 + } + while (1) { + $8 = $8 + 1 | 0; + $15 = $10 << 1 | $1 >>> 31; + $1 = $1 << 1; + $10 = $15; + if (($13 | 0) == ($10 | 0) & $1 >>> 0 < $16 >>> 0 | $10 >>> 0 < $13 >>> 0) { + continue + } + break; + }; + } + $9 = $18 << 2; + $1 = HEAP32[$9 + $38 >> 2]; + $19 = $1; + $10 = Math_imul($1, $17) + $36 | 0; + $8 = $8 >>> 0 < $7 >>> 0 ? $8 : $35; + $15 = $8 + -1 | 0; + $1 = $15 & 31; + $14 = (($28 - ($17 >>> 1 | 0) | 0) + Math_imul($17, $8 + 1 | 0) | 0) + ($8 ? (32 <= ($15 & 63) >>> 0 ? $13 >>> $1 | 0 : ((1 << $1) - 1 & $13) << 32 - $1 | $16 >>> $1) : $16 << 1) | 0; + $1 = $10 >>> 0 > $14 >>> 0; + HEAP32[$9 + $39 >> 2] = $1 ? 0 : $19; + HEAP32[$9 + $31 >> 2] = $1 ? $8 : 0; + $21 = ($1 ? $14 : $10) + $21 | 0; + $18 = $18 + 1 | 0; + if (!($18 >>> $20)) { + continue + } + break; + }; + break label$13; + } + $9 = HEAP32[$25 + 4 >> 2]; + $1 = $27; + $8 = $1 & 31; + $10 = HEAP32[$25 >> 2]; + $8 = ($6 ? (32 <= ($1 & 63) >>> 0 ? $9 >>> $8 | 0 : ((1 << $8) - 1 & $9) << 32 - $8 | $10 >>> $8) : $10 << 1) + $40 | 0; + $10 = ($8 | 0) == -1 ? 0 : $6; + if ($11) { + $9 = HEAP32[$38 >> 2]; + $14 = Math_imul($9, $4) + $36 | 0; + $1 = $14 >>> 0 > $8 >>> 0; + HEAP32[$39 >> 2] = $1 ? 0 : $9; + $10 = $1 ? $10 : 0; + $8 = $1 ? $8 : $14; + } + HEAP32[$31 >> 2] = $10; + $21 = $8 + $23 | 0; + } + $1 = $34 + -1 >>> 0 < $21 >>> 0; + $24 = $1 ? $24 : $20; + $29 = $1 ? $29 : $37; + $34 = $1 ? $34 : $21; + $14 = $20 + -1 | 0; + $30 = (1 << $20) + $30 | 0; + if (($20 | 0) > ($22 | 0)) { + continue + } + } + break; + }; + HEAP32[$12 + 4 >> 2] = $24; + $2 = $24 >>> 0 > 6 ? $24 : 6; + } + $1 = HEAP32[$12 + 8 >> 2]; + FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($1, $2); + $2 = Math_imul($29, 12) + $0 | 0; + $0 = 1 << $24; + $3 = $0 << 2; + memcpy(HEAP32[$1 >> 2], HEAP32[$2 + 11724 >> 2], $3); + if ($11) { + memcpy(HEAP32[$1 + 4 >> 2], HEAP32[$2 + 11728 >> 2], $3) + } + $0 = $0 >>> 0 > 1 ? $0 : 1; + $2 = HEAP32[1410]; + $1 = HEAP32[$1 >> 2]; + $8 = 0; + label$37 : { + while (1) { + if (HEAPU32[$1 + ($8 << 2) >> 2] < $2 >>> 0) { + $8 = $8 + 1 | 0; + if (($0 | 0) != ($8 | 0)) { + continue + } + break label$37; + } + break; + }; + HEAP32[$12 >> 2] = 1; + } + return $34; + } + + function stackSave() { + return global$0 | 0; + } + + function stackRestore($0) { + $0 = $0 | 0; + global$0 = $0; + } + + function stackAlloc($0) { + $0 = $0 | 0; + $0 = global$0 - $0 & -16; + global$0 = $0; + return $0 | 0; + } + + function __growWasmMemory($0) { + $0 = $0 | 0; + return __wasm_memory_grow($0 | 0) | 0; + } + + function dynCall_iii($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + return FUNCTION_TABLE[$0]($1, $2) | 0; + } + + function dynCall_ii($0, $1) { + $0 = $0 | 0; + $1 = $1 | 0; + return FUNCTION_TABLE[$0]($1) | 0; + } + + function dynCall_iiii($0, $1, $2, $3) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + return FUNCTION_TABLE[$0]($1, $2, $3) | 0; + } + + function dynCall_viiiiii($0, $1, $2, $3, $4, $5, $6) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + $6 = $6 | 0; + FUNCTION_TABLE[$0]($1, $2, $3, $4, $5, $6); + } + + function dynCall_iiiii($0, $1, $2, $3, $4) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + return FUNCTION_TABLE[$0]($1, $2, $3, $4) | 0; + } + + function dynCall_viiiiiii($0, $1, $2, $3, $4, $5, $6, $7) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $5 = $5 | 0; + $6 = $6 | 0; + $7 = $7 | 0; + FUNCTION_TABLE[$0]($1, $2, $3, $4, $5, $6, $7); + } + + function dynCall_viiii($0, $1, $2, $3, $4) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + FUNCTION_TABLE[$0]($1, $2, $3, $4); + } + + function dynCall_viii($0, $1, $2, $3) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + FUNCTION_TABLE[$0]($1, $2, $3); + } + + function legalstub$FLAC__stream_encoder_set_total_samples_estimate($0, $1, $2) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + return FLAC__stream_encoder_set_total_samples_estimate($0, $1, $2) | 0; + } + + function legalstub$dynCall_jiji($0, $1, $2, $3, $4) { + $0 = $0 | 0; + $1 = $1 | 0; + $2 = $2 | 0; + $3 = $3 | 0; + $4 = $4 | 0; + $0 = FUNCTION_TABLE[$0]($1, $2, $3, $4) | 0; + setTempRet0(i64toi32_i32$HIGH_BITS | 0); + return $0 | 0; + } + + function _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE($0, $1, $2, $3) { + var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + $4 = $2 >>> 16 | 0; + $5 = $0 >>> 16 | 0; + $9 = Math_imul($4, $5); + $6 = $2 & 65535; + $7 = $0 & 65535; + $8 = Math_imul($6, $7); + $5 = ($8 >>> 16 | 0) + Math_imul($5, $6) | 0; + $4 = ($5 & 65535) + Math_imul($4, $7) | 0; + $0 = (Math_imul($1, $2) + $9 | 0) + Math_imul($0, $3) + ($5 >>> 16) + ($4 >>> 16) | 0; + $1 = $8 & 65535 | $4 << 16; + i64toi32_i32$HIGH_BITS = $0; + return $1; + } + + function _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E($0, $1, $2) { + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0; + label$1 : { + label$2 : { + label$3 : { + label$4 : { + label$5 : { + label$6 : { + label$7 : { + label$9 : { + label$11 : { + $3 = $1; + if ($3) { + $4 = $2; + if (!$4) { + break label$11 + } + break label$9; + } + $1 = $0; + $0 = ($0 >>> 0) / ($2 >>> 0) | 0; + __wasm_intrinsics_temp_i64 = $1 - Math_imul($0, $2) | 0; + __wasm_intrinsics_temp_i64$hi = 0; + i64toi32_i32$HIGH_BITS = 0; + return $0; + } + if (!$0) { + break label$7 + } + break label$6; + } + $6 = $4 + -1 | 0; + if (!($6 & $4)) { + break label$5 + } + $6 = (Math_clz32($4) + 33 | 0) - Math_clz32($3) | 0; + $7 = 0 - $6 | 0; + break label$3; + } + __wasm_intrinsics_temp_i64 = 0; + $0 = ($3 >>> 0) / 0 | 0; + __wasm_intrinsics_temp_i64$hi = $3 - Math_imul($0, 0) | 0; + i64toi32_i32$HIGH_BITS = 0; + return $0; + } + $3 = 32 - Math_clz32($3) | 0; + if ($3 >>> 0 < 31) { + break label$4 + } + break label$2; + } + __wasm_intrinsics_temp_i64 = $0 & $6; + __wasm_intrinsics_temp_i64$hi = 0; + if (($4 | 0) == 1) { + break label$1 + } + $3 = __wasm_ctz_i32($4); + $2 = $3 & 31; + if (32 <= ($3 & 63) >>> 0) { + $4 = 0; + $0 = $1 >>> $2 | 0; + } else { + $4 = $1 >>> $2 | 0; + $0 = ((1 << $2) - 1 & $1) << 32 - $2 | $0 >>> $2; + } + i64toi32_i32$HIGH_BITS = $4; + return $0; + } + $6 = $3 + 1 | 0; + $7 = 63 - $3 | 0; + } + $3 = $1; + $4 = $6 & 63; + $5 = $4 & 31; + if (32 <= $4 >>> 0) { + $4 = 0; + $5 = $3 >>> $5 | 0; + } else { + $4 = $3 >>> $5 | 0; + $5 = ((1 << $5) - 1 & $3) << 32 - $5 | $0 >>> $5; + } + $7 = $7 & 63; + $3 = $7 & 31; + if (32 <= $7 >>> 0) { + $1 = $0 << $3; + $0 = 0; + } else { + $1 = (1 << $3) - 1 & $0 >>> 32 - $3 | $1 << $3; + $0 = $0 << $3; + } + if ($6) { + $7 = -1; + $3 = $2 + -1 | 0; + if (($3 | 0) != -1) { + $7 = 0 + } + while (1) { + $8 = $5 << 1 | $1 >>> 31; + $9 = $8; + $4 = $4 << 1 | $5 >>> 31; + $8 = $7 - ($4 + ($3 >>> 0 < $8 >>> 0) | 0) >> 31; + $10 = $2 & $8; + $5 = $9 - $10 | 0; + $4 = $4 - ($9 >>> 0 < $10 >>> 0) | 0; + $1 = $1 << 1 | $0 >>> 31; + $0 = $11 | $0 << 1; + $8 = $8 & 1; + $11 = $8; + $6 = $6 + -1 | 0; + if ($6) { + continue + } + break; + }; + } + __wasm_intrinsics_temp_i64 = $5; + __wasm_intrinsics_temp_i64$hi = $4; + i64toi32_i32$HIGH_BITS = $1 << 1 | $0 >>> 31; + return $8 | $0 << 1; + } + __wasm_intrinsics_temp_i64 = $0; + __wasm_intrinsics_temp_i64$hi = $1; + $0 = 0; + $1 = 0; + } + i64toi32_i32$HIGH_BITS = $1; + return $0; + } + + function __wasm_ctz_i32($0) { + if ($0) { + return 31 - Math_clz32($0 + -1 ^ $0) | 0 + } + return 32; + } + + function __wasm_i64_mul($0, $1, $2, $3) { + $0 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE($0, $1, $2, $3); + return $0; + } + + function __wasm_i64_udiv($0, $1, $2) { + return _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E($0, $1, $2); + } + + function __wasm_i64_urem($0, $1) { + _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E($0, $1, 588); + i64toi32_i32$HIGH_BITS = __wasm_intrinsics_temp_i64$hi; + return __wasm_intrinsics_temp_i64; + } + + function __wasm_rotl_i32($0, $1) { + var $2 = 0, $3 = 0; + $2 = $1 & 31; + $3 = (-1 >>> $2 & $0) << $2; + $2 = $0; + $0 = 0 - $1 & 31; + return $3 | ($2 & -1 << $0) >>> $0; + } + + // EMSCRIPTEN_END_FUNCS +; + FUNCTION_TABLE[1] = seekpoint_compare_; + FUNCTION_TABLE[2] = __stdio_close; + FUNCTION_TABLE[3] = __stdio_read; + FUNCTION_TABLE[4] = __stdio_seek; + FUNCTION_TABLE[5] = FLAC__lpc_restore_signal; + FUNCTION_TABLE[6] = FLAC__lpc_restore_signal_wide; + FUNCTION_TABLE[7] = read_callback_; + FUNCTION_TABLE[8] = read_callback_proxy_; + FUNCTION_TABLE[9] = __emscripten_stdout_close; + FUNCTION_TABLE[10] = __stdio_write; + FUNCTION_TABLE[11] = __emscripten_stdout_seek; + FUNCTION_TABLE[12] = FLAC__lpc_compute_residual_from_qlp_coefficients; + FUNCTION_TABLE[13] = FLAC__lpc_compute_residual_from_qlp_coefficients_wide; + FUNCTION_TABLE[14] = FLAC__fixed_compute_best_predictor_wide; + FUNCTION_TABLE[15] = FLAC__fixed_compute_best_predictor; + FUNCTION_TABLE[16] = precompute_partition_info_sums_; + FUNCTION_TABLE[17] = FLAC__lpc_compute_autocorrelation; + FUNCTION_TABLE[18] = verify_read_callback_; + FUNCTION_TABLE[19] = verify_write_callback_; + FUNCTION_TABLE[20] = verify_metadata_callback_; + FUNCTION_TABLE[21] = verify_error_callback_; + function __wasm_memory_size() { + return buffer.byteLength / 65536 | 0; + } + + function __wasm_memory_grow(pagesToAdd) { + pagesToAdd = pagesToAdd | 0; + var oldPages = __wasm_memory_size() | 0; + var newPages = oldPages + pagesToAdd | 0; + if ((oldPages < newPages) && (newPages < 65536)) { + var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536)); + var newHEAP8 = new global.Int8Array(newBuffer); + newHEAP8.set(HEAP8); + HEAP8 = newHEAP8; + HEAP8 = new global.Int8Array(newBuffer); + HEAP16 = new global.Int16Array(newBuffer); + HEAP32 = new global.Int32Array(newBuffer); + HEAPU8 = new global.Uint8Array(newBuffer); + HEAPU16 = new global.Uint16Array(newBuffer); + HEAPU32 = new global.Uint32Array(newBuffer); + HEAPF32 = new global.Float32Array(newBuffer); + HEAPF64 = new global.Float64Array(newBuffer); + buffer = newBuffer; + memory.buffer = newBuffer; + } + return oldPages; + } + + return { + "__wasm_call_ctors": __wasm_call_ctors, + "FLAC__stream_decoder_new": FLAC__stream_decoder_new, + "FLAC__stream_decoder_delete": FLAC__stream_decoder_delete, + "FLAC__stream_decoder_finish": FLAC__stream_decoder_finish, + "FLAC__stream_decoder_init_stream": FLAC__stream_decoder_init_stream, + "FLAC__stream_decoder_reset": FLAC__stream_decoder_reset, + "FLAC__stream_decoder_init_ogg_stream": FLAC__stream_decoder_init_ogg_stream, + "FLAC__stream_decoder_set_ogg_serial_number": FLAC__stream_decoder_set_ogg_serial_number, + "FLAC__stream_decoder_set_md5_checking": FLAC__stream_decoder_set_md5_checking, + "FLAC__stream_decoder_set_metadata_respond": FLAC__stream_decoder_set_metadata_respond, + "FLAC__stream_decoder_set_metadata_respond_application": FLAC__stream_decoder_set_metadata_respond_application, + "FLAC__stream_decoder_set_metadata_respond_all": FLAC__stream_decoder_set_metadata_respond_all, + "FLAC__stream_decoder_set_metadata_ignore": FLAC__stream_decoder_set_metadata_ignore, + "FLAC__stream_decoder_set_metadata_ignore_application": FLAC__stream_decoder_set_metadata_ignore_application, + "FLAC__stream_decoder_set_metadata_ignore_all": FLAC__stream_decoder_set_metadata_ignore_all, + "FLAC__stream_decoder_get_state": FLAC__stream_decoder_get_state, + "FLAC__stream_decoder_get_md5_checking": FLAC__stream_decoder_get_md5_checking, + "FLAC__stream_decoder_process_single": FLAC__stream_decoder_process_single, + "FLAC__stream_decoder_process_until_end_of_metadata": FLAC__stream_decoder_process_until_end_of_metadata, + "FLAC__stream_decoder_process_until_end_of_stream": FLAC__stream_decoder_process_until_end_of_stream, + "FLAC__stream_encoder_new": FLAC__stream_encoder_new, + "FLAC__stream_encoder_delete": FLAC__stream_encoder_delete, + "FLAC__stream_encoder_finish": FLAC__stream_encoder_finish, + "FLAC__stream_encoder_init_stream": FLAC__stream_encoder_init_stream, + "FLAC__stream_encoder_init_ogg_stream": FLAC__stream_encoder_init_ogg_stream, + "FLAC__stream_encoder_set_ogg_serial_number": FLAC__stream_encoder_set_ogg_serial_number, + "FLAC__stream_encoder_set_verify": FLAC__stream_encoder_set_verify, + "FLAC__stream_encoder_set_channels": FLAC__stream_encoder_set_channels, + "FLAC__stream_encoder_set_bits_per_sample": FLAC__stream_encoder_set_bits_per_sample, + "FLAC__stream_encoder_set_sample_rate": FLAC__stream_encoder_set_sample_rate, + "FLAC__stream_encoder_set_compression_level": FLAC__stream_encoder_set_compression_level, + "FLAC__stream_encoder_set_blocksize": FLAC__stream_encoder_set_blocksize, + "FLAC__stream_encoder_set_total_samples_estimate": legalstub$FLAC__stream_encoder_set_total_samples_estimate, + "FLAC__stream_encoder_set_metadata": FLAC__stream_encoder_set_metadata, + "FLAC__stream_encoder_get_state": FLAC__stream_decoder_get_state, + "FLAC__stream_encoder_get_verify_decoder_state": FLAC__stream_encoder_get_verify_decoder_state, + "FLAC__stream_encoder_get_verify": FLAC__stream_encoder_get_verify, + "FLAC__stream_encoder_process": FLAC__stream_encoder_process, + "FLAC__stream_encoder_process_interleaved": FLAC__stream_encoder_process_interleaved, + "__errno_location": __errno_location, + "stackSave": stackSave, + "stackRestore": stackRestore, + "stackAlloc": stackAlloc, + "malloc": dlmalloc, + "free": dlfree, + "__growWasmMemory": __growWasmMemory, + "dynCall_iii": dynCall_iii, + "dynCall_ii": dynCall_ii, + "dynCall_iiii": dynCall_iiii, + "dynCall_jiji": legalstub$dynCall_jiji, + "dynCall_viiiiii": dynCall_viiiiii, + "dynCall_iiiii": dynCall_iiiii, + "dynCall_viiiiiii": dynCall_viiiiiii, + "dynCall_viiii": dynCall_viiii, + "dynCall_viii": dynCall_viii + }; +} + +var bufferView = new Uint8Array(wasmMemory.buffer); +for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i) { + base64ReverseLookup[48+i] = 52+i; // '0-9' + base64ReverseLookup[65+i] = i; // 'A-Z' + base64ReverseLookup[97+i] = 26+i; // 'a-z' + } + base64ReverseLookup[43] = 62; // '+' + base64ReverseLookup[47] = 63; // '/' + /** @noinline Inlining this function would mean expanding the base64 string 4x times in the source code, which Closure seems to be happy to do. */ + function base64DecodeToExistingUint8Array(uint8Array, offset, b64) { + var b1, b2, i = 0, j = offset, bLength = b64.length, end = offset + (bLength*3>>2) - (b64[bLength-2] == '=') - (b64[bLength-1] == '='); + for (; i < bLength; i += 4) { + b1 = base64ReverseLookup[b64.charCodeAt(i+1)]; + b2 = base64ReverseLookup[b64.charCodeAt(i+2)]; + uint8Array[j++] = base64ReverseLookup[b64.charCodeAt(i)] << 2 | b1 >> 4; + if (j < end) uint8Array[j++] = b1 << 4 | b2 >> 2; + if (j < end) uint8Array[j++] = b2 << 6 | base64ReverseLookup[b64.charCodeAt(i+3)]; + } + } + base64DecodeToExistingUint8Array(bufferView, 1025, "Bw4JHBsSFTg/NjEkIyotcHd+eWxrYmVIT0ZBVFNaXeDn7un8+/L12N/W0cTDys2Ql56ZjIuChaivpqG0s7q9x8DJztvc1dL/+PH24+Tt6rewub6rrKWij4iBhpOUnZonICkuOzw1Mh8YERYDBA0KV1BZXktMRUJvaGFmc3R9eomOh4CVkpucsba/uK2qo6T5/vfw5eLr7MHGz8jd2tPUaW5nYHVye3xRVl9YTUpDRBkeFxAFAgsMISYvKD06MzROSUBHUlVcW3ZxeH9qbWRjPjkwNyIlLCsGAQgPGh0UE66poKeytby7lpGYn4qNhIPe2dDXwsXMy+bh6O/6/fTzAAAFgA+ACgAbgB4AFAARgDOANgA8ADmAKAAtgCeAIgBjgGYAbABpgHgAfYB3gHIAUABVgF+AWgBLgE4ARABBgMOAxgDMAMmA2ADdgNeA0gDwAPWA/4D6AOuA7gDkAOGAoAClgK+AqgC7gL4AtACxgJOAlgCcAJmAiACNgIeAggCDgYYBjAGJgZgBnYGXgZIBsAG1gb+BugGrga4BpAGhgeAB5YHvgeoB+4H+AfQB8YHTgdYB3AHZgcgBzYHHgcIBQAFFgU+BSgFbgV4BVAFRgXOBdgF8AXmBaAFtgWeBYgEjgSYBLAEpgTgBPYE3gTIBEAEVgR+BGgELgQ4BBAEBgQODBgMMAwmDGAMdgxeDEgMwAzWDP4M6AyuDLgMkAyGDYANlg2+DagN7g34DdANxg1ODVgNcA1mDSANNg0eDQgPAA8WDz4PKA9uD3gPUA9GD84P2A/wD+YPoA+2D54PiA6ODpgOsA6mDuAO9g7eDsgOQA5WDn4OaA4uDjgOEA4GDgAKFgo+CigKbgp4ClAKRgrOCtgK8ArmCqAKtgqeCogLjguYC7ALpgvgC/YL3gvIC0ALVgt+C2gLLgs4CxALBgkOCRgJMAkmCWAJdgleCUgJwAnWCf4J6AmuCbgJkAmGCIAIlgi+CKgI7gj4CNAIxghOCFgIcAhmCCAINggeCAgIAAAOGA4wACgOYAB4AFAOSA7AANgA8A7oAKAOuA6QAIgPgAGYAbAPqAHgD/gP0AHIAUAPWA9wAWgPIAE4ARAPCA0AAxgDMA0oA2ANeA1QA0gDwA3YDfAD6A2gA7gDkA2IAoAMmAywAqgM4AL4AtAMyAxAAlgCcAxoAiAMOAwQAggaABQYFDAaKBRgGngaUBRIFMAa2BrwFOgaoBS4FJAaiBWAG5gbsBWoG+AV+BXQG8gbQBVYFXAbaBUgGzgbEBUIFwAZGBkwFygZYBd4F1AZSBnAF9gX8BnoF6AZuBmQF4gYgBaYFrAYqBbgGPgY0BbIFkAYWBhwFmgYIBY4FhAYCCYAKBgoMCYoKGAmeCZQKEgowCbYJvAo6CagKLgokCaIKYAnmCewKagn4Cn4KdAnyCdAKVgpcCdoKSAnOCcQKQgrACUYJTArKCVgK3grUCVIJcAr2CvwJegroCW4JZAriCSAKpgqsCSoKuAk+CTQKsgqQCRYJHAqaCQgKjgqECQIPAAyGDIwPCgyYDx4PFAySDLAPNg88DLoPKAyuDKQPIgzgD2YPbAzqD3gM/gz0D3IPUAzWDNwPWgzID04PRAzCDEAPxg/MDEoP2AxeDFQP0g/wDHYMfA/6DGgP7g/kDGIPoAwmDCwPqgw4D74PtAwyDBAPlg+cDBoPiAwODAQPggAAF4ArgDwAU4BEAHgAb4CjgLQAiACfgPAA54DbgMwAQ4FUAWgBf4EQAQeBO4EsAeAB94HLgdwBs4GkAZgBj4GDgpQCqAK/gtACx4L7guwCIAI3gguCHAJzgmQCWAJPgsAD14Prg/wDk4OEA7gDr4Njg3QDSANfgzADJ4MbgwwDA4UUBSgFP4VQBUeFe4VsBaAFt4WLhZwF84XkBdgFz4VABFeEa4R8BBOEBAQ4BC+E44T0BMgE34SwBKeEm4SMBIAHl4erh7wH04fEB/gH74cjhzQHCAcfh3AHZ4dbh0wHw4bUBugG/4aQBoeGu4asBmAGd4ZLhlwGM4YkBhgGD4YDihQKKAo/ilAKR4p7imwKoAq3iouKnArziuQK2ArPikALV4tri3wLE4sECzgLL4vji/QLyAvfi7ALp4ubi4wLgAiXiKuIvAjTiMQI+AjviCOINAgICB+IcAhniFuITAjDidQJ6An/iZAJh4m7iawJYAl3iUuJXAkziSQJGAkPiQAPF48rjzwPU49ED3gPb4+jj7QPiA+fj/AP54/bj8wPQ45UDmgOf44QDgeOO44sDuAO947LjtwOs46kDpgOj46DjZQNqA2/jdANx437jewNIA03jQuNHA1zjWQNWA1PjcAM14zrjPwMk4yEDLgMr4xjjHQMSAxfjDAMJ4wbjAwMAAADlAOoADwD0ABEAHgD7AMgALQAiAMcAPADZANYAMwGQAXUBegGfAWQBgQGOAWsBWAG9AbIBVwGsAUkBRgGjAyADxQPKAy8D1AMxAz4D2wPoAw0DAgPnAxwD+QP2AxMCsAJVAloCvwJEAqECrgJLAngCnQKSAncCjAJpAmYCgwdgB4UHigdvB5QHcQd+B5sHqAdNB0IHpwdcB7kHtgdTBvAGFQYaBv8GBAbhBu4GCwY4Bt0G0gY3BswGKQYmBsMEQASlBKoETwS0BFEEXgS7BIgEbQRiBIcEfASZBJYEcwXQBTUFOgXfBSQFwQXOBSsFGAX9BfIFFwXsBQkFBgXjD+APBQ8KD+8PFA/xD/4PGw8oD80Pwg8nD9wPOQ82D9MOcA6VDpoOfw6EDmEObg6LDrgOXQ5SDrcOTA6pDqYOQwzADCUMKgzPDDQM0QzeDDsMCAztDOIMBwz8DBkMFgzzDVANtQ26DV8NpA1BDU4Nqw2YDX0Ncg2XDWwNiQ2GDWMIgAhlCGoIjwh0CJEIngh7CEgIrQiiCEcIvAhZCFYIswkQCfUJ+gkfCeQJAQkOCesJ2Ak9CTIJ1wksCckJxgkjC6ALRQtKC68LVAuxC74LWwtoC40LggtnC5wLeQt2C5MKMArVCtoKPwrECiEKLgrLCvgKHQoSCvcKDArpCuYKAwAAHuA84CIAOOBmAEQAWuBw4O4AzADS4MgAluC04KoAoOH+AdwBwuHYAYbhpOG6AZABDuEs4TIBKOF2AVQBSuFA494D/APi4/gDpuOE45oDsAMu4wzjEgMI41YDdANq42ACPuIc4gICGOJGAmQCeuJQ4s4C7ALy4ugCtuKU4ooCgOeeB7wHoue4B+bnxOfaB/AHbudM51IHSOcWBzQHKucgBn7mXOZCBljmBgYkBjrmEOaOBqwGsuaoBvbm1ObKBsAEXuR85GIEeOQmBAQEGuQw5K4EjASS5IgE1uT05OoE4OW+BZwFguWYBcbl5OX6BdAFTuVs5XIFaOU2BRQFCuUA7x4PPA8i7zgPZu9E71oPcA/u78zv0g/I75YPtA+q76AO/u7c7sIO2O6GDqQOuu6Q7g4OLA4y7igOdu5U7koOQAze7Pzs4gz47KYMhAya7LDsLgwMDBLsCAxW7HTsagxg7T4NHA0C7RgNRu1k7XoNUA3O7ezt8g3o7bYNlA2K7YAInui86KIIuOjmCMQI2ujw6G4ITAhS6EgIFug06CoIIOl+CVwJQulYCQbpJOk6CRAJjums6bIJqOn2CdQJyunA614LfAti63gLJusE6xoLMAuu64zrkguI69YL9Avq6+AKvuqc6oIKmOrGCuQK+urQ6k4KbApy6mgKNuoU6goKAAAA/gDcACIBuAFGAWQBmgJQAq4CjAJyA+gDFgM0A8oEoAReBHwEggUYBeYFxAU6BvAGDgYsBtIHSAe2B5QHaghgCJ4IvAhCCdgJJgkECfoKMArOCuwKEguIC3YLVAuqDMAMPgwcDOINeA2GDaQNWg6QDm4OTA6yDygP1g/0DwoR4BEeETwRwhBYEKYQhBB6E7ATThNsE5ISCBL2EtQSKhVAFb4VnBViFPgUBhQkFNoXEBfuF8wXMhaoFlYWdBaKGYAZfhlcGaIYOBjGGOQYGhvQGy4bDBvyGmgalhq0GkodIB3eHfwdAhyYHGYcRBy6H3Afjh+sH1IeyB42HhQe6iLgIh4iPCLCI1gjpiOEI3ogsCBOIGwgkiEIIfYh1CEqJkAmviacJmIn+CcGJyQn2iQQJO4kzCQyJaglViV0JYoqgCp+Klwqois4K8Yr5CsaKNAoLigMKPIpaCmWKbQpSi4gLt4u/C4CL5gvZi9EL7oscCyOLKwsUi3ILTYtFC3qMwAz/jPcMyIyuDJGMmQymjFQMa4xjDFyMOgwFjA0MMo3oDdeN3w3gjYYNuY2xDY6NfA1DjUsNdI0SDS2NJQ0ajtgO547vDtCOtg6JjoEOvo5MDnOOew5EjiIOHY4VDiqP8A/Pj8cP+I+eD6GPqQ+Wj2QPW49TD2yPCg81jz0PAoAAATgSOCMANDhFAFYAZzh4OIkAmgCrOLwAzTjeOO8A8DkRAQIBMzkkAVU5Rjl3AWgBmTmKObsBrDndAc4B/zngOiECMgIDOhQCZTp2OkcCWAKpOro6iwKcOu0C/gLPOtADMTsiOxMDBDt1A2YDVztIO7kDqgObO4wD/TvuO98DwDxBBFIEYzx0BAU8FjwnBDgEyTzaPOsE/DyNBJ4ErzywBVE9Qj1zBWQ9FQUGBTc9KD3ZBcoF+z3sBZ09jj2/BaAGYT5yPkMGVD4lBjYGBz4YPukG+gbLPtwGrT6+Po8GkD9xB2IHUz9EBzU/Jj8XBwgH+T/qP9sHzD+9B64Hnz+AMIEIkgijMLQIxTDWMOcI+AgJMBowKwg8ME0IXghvMHAJkTGCMbMJpDHVCcYJ9zHoMRkJCgk7MSwJXTFOMX8JYAqhMrIygwqUMuUK9grHMtgyKQo6CgsyHAptMn4yTwpQM7ELoguTM4QL9TPmM9cLyAs5MyozGwsMM30LbgtfM0AMwTTSNOMM9DSFDJYMpzS4NEkMWgxrNHwMDTQeNC8MMDXRDcIN8zXkDZU1hjW3DagNWTVKNXsNbDUdDQ4NPzUgNuEO8g7DNtQOpTa2NocOmA5pNno2Sw5cNi0OPg4PNhAP8TfiN9MPxDe1D6YPlzeIN3kPag9bN0wPPTcuNx8PAAAAYQDCAKMBhAHlAUYBJwMIA2kDygOrAowC7QJOAi8GWAY5BpoG+wfcB70HHgd/BVAFMQWSBfME1AS1BBYEdwz4DJkMOgxbDXwNHQ2+Dd8P8A+RDzIPUw50DhUOtg7XCqAKwQpiCgMLJAtFC+YLhwmoCckJagkLCCwITQjuCI8JuBnZGXoZGxg8GF0Y/hifGrAa0RpyGhMbNBtVG/Yblx/gH4EfIh9DHmQeBR6mHscc6ByJHCocSx1sHQ0drh3PFUAVIRWCFeMUxBSlFAYUZxZIFikWihbrF8wXrRcOF28TGBN5E9oTuxKcEv0SXhI/EBAQcRDSELMRlBH1EVYRNxM4M1kz+jObMrwy3TJ+Mh8wMDBRMPIwkzG0MdUxdjEXNWA1ATWiNcM05DSFNCY0RzZoNgk2qjbLN+w3jTcuN08/wD+hPwI/Yz5EPiU+hj7nPMg8qTwKPGs9TD0tPY497zmYOfk5Wjk7OBw4fTjeOL86kDrxOlI6MzsUO3U71ju3OoAq4SpCKiMrBCtlK8YrpymIKekpSikrKAwobSjOKK8s2Cy5LBosey1cLT0tni3/L9AvsS8SL3MuVC41LpYu9yZ4JhkmuibbJ/wnnSc+J18lcCURJbIl0yT0JJUkNiRXICAgQSDiIIMhpCHFIWYhByMoI0kj6iOLIqwizSJuIg8nJlZmVyZW5jZSBsaWJGTEFDIDEuMy4zIDIwMTkwODA0AGZMYUMAAABDYUxmIAAAABAAAAAQAAAAGAAAABgAAAAUAAAAAwAAAAUAAAAkAAAAIAAAAEAAAABAAAAAEAAAAEAAAAAIAAAAGAAAAEAAAAAIAAAAYAAAAAEAAAABAAAAbgAAAAgAAAAABAAAQAAAAAEAAAAXCAAACAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAAQAAAAcAAAAYAAAA/j8AAA4AAAABAAAAAQAAAAQAAAAEAAAABAAAAAMAAAABAAAACAAAABAAAAACAAAABAAAAAQAAAAFAAAABQAAAA8AAAAfAAAABAAAAAUAAAABAAAABgAAAAEAAAAAAAAAAgAAABAAAABAAAAAQ0QtREEgY3VlIHNoZWV0IG11c3QgaGF2ZSBhIGxlYWQtaW4gbGVuZ3RoIG9mIGF0IGxlYXN0IDIgc2Vjb25kcwBDRC1EQSBjdWUgc2hlZXQgbGVhZC1pbiBsZW5ndGggbXVzdCBiZSBldmVubHkgZGl2aXNpYmxlIGJ5IDU4OCBzYW1wbGVzAGN1ZSBzaGVldCBtdXN0IGhhdmUgYXQgbGVhc3Qgb25lIHRyYWNrICh0aGUgbGVhZC1vdXQpAENELURBIGN1ZSBzaGVldCBtdXN0IGhhdmUgYSBsZWFkLW91dCB0cmFjayBudW1iZXIgMTcwICgweEFBKQBjdWUgc2hlZXQgbWF5IG5vdCBoYXZlIGEgdHJhY2sgbnVtYmVyIDAAQ0QtREEgY3VlIHNoZWV0IHRyYWNrIG51bWJlciBtdXN0IGJlIDEtOTkgb3IgMTcwAENELURBIGN1ZSBzaGVldCBsZWFkLW91dCBvZmZzZXQgbXVzdCBiZSBldmVubHkgZGl2aXNpYmxlIGJ5IDU4OCBzYW1wbGVzAENELURBIGN1ZSBzaGVldCB0cmFjayBvZmZzZXQgbXVzdCBiZSBldmVubHkgZGl2aXNpYmxlIGJ5IDU4OCBzYW1wbGVzAGN1ZSBzaGVldCB0cmFjayBtdXN0IGhhdmUgYXQgbGVhc3Qgb25lIGluZGV4IHBvaW50AGN1ZSBzaGVldCB0cmFjaydzIGZpcnN0IGluZGV4IG51bWJlciBtdXN0IGJlIDAgb3IgMQBDRC1EQSBjdWUgc2hlZXQgdHJhY2sgaW5kZXggb2Zmc2V0IG11c3QgYmUgZXZlbmx5IGRpdmlzaWJsZSBieSA1ODggc2FtcGxlcwBjdWUgc2hlZXQgdHJhY2sgaW5kZXggbnVtYmVycyBtdXN0IGluY3JlYXNlIGJ5IDEATUlNRSB0eXBlIHN0cmluZyBtdXN0IGNvbnRhaW4gb25seSBwcmludGFibGUgQVNDSUkgY2hhcmFjdGVycyAoMHgyMC0weDdlKQBkZXNjcmlwdGlvbiBzdHJpbmcgbXVzdCBiZSB2YWxpZCBVVEYtOA=="); +base64DecodeToExistingUint8Array(bufferView, 6516, "tx3BBG47ggnZJkMN3HYEE2trxReyTYYaBVBHHrjtCCYP8Mki1taKL2HLSytkmww104bNMQqgjjy9vU84cNsRTMfG0Ege4JNFqf1SQaytFV8bsNRbwpaXVnWLVlLINhlqfyvYbqYNm2MREFpnFEAdeaNd3H16e59wzWZedOC2I5hXq+Kcjo2hkTmQYJU8wCeLi93mj1L7pYLl5mSGWFsrvu9G6ro2YKm3gX1os4QtL60zMO6p6hatpF0LbKCQbTLUJ3Dz0P5WsN1JS3HZTBs2x/sG98MiILTOlT11yiiAOvKfnfv2Rru4+/Gmef/09j7hQ+v/5ZrNvOgt0H3sd3CGNMBtRzAZSwQ9rlbFOasGgiccG0MjxT0ALnIgwSrPnY4SeIBPFqGmDBsWu80fE+uKAaT2SwV90AgIys3JDAerl3iwtlZ8aZAVcd6N1HXb3ZNrbMBSb7XmEWIC+9Bmv0afXghbXlrRfR1XZmDcU2Mwm03ULVpJDQsZRLoW2ECXxqWsINtkqPn9J6VO4OahS7Chv/ytYLsliyO2kpbisi8rrYqYNmyOQRAvg/YN7ofzXamZREBonZ1mK5Aqe+qU5x204FAAdeSJJjbpPjv37TtrsPOMdnH3VVAy+uJN8/5f8LzG6O19wjHLPs+G1v/Lg4a41TSbedHtvTrcWqD72O7gDGlZ/c1tgNuOYDfGT2Qylgh6hYvJflytinPrsEt3Vg0ET+EQxUs4NoZGjytHQop7AFw9ZsFY5ECCVVNdQ1GeOx0lKSbcIfAAnyxHHV4oQk0ZNvVQ2DIsdps/m2taOybWFQORy9QHSO2XCv/wVg76oBEQTb3QFJSbkxkjhlIdDlYv8blL7vVgba3413Bs/NIgK+JlPermvBup6wsGaO+2uyfXAabm09iApd5vnWTaas0jxN3Q4sAE9qHNs+tgyX6NPr3JkP+5ELa8tKerfbCi+zquFeb7qszAuKd73XmjxmA2m3F995+oW7SSH0Z1lhoWMoitC/OMdC2wgcMwcYWZkIpdLo1LWferCFRAtslQReaOTvL7T0or3QxHnMDNQyF9gnuWYEN/T0YAcvhbwXb9C4ZoShZHbJMwBGEkLcVl6UubEV5WWhWHcBkYMG3YHDU9nwKCIF4GWwYdC+wb3A9RppM35rtSMz+dET6IgNA6jdCXJDrNViDj6xUtVPbUKXkmqcXOO2jBFx0rzKAA6silUK3WEk1s0strL998du7bwcuh43bWYOev8CPqGO3i7h29pfCqoGT0c4Yn+cSb5v0J/biJvuB5jWfGOoDQ2/uE1Yu8mmKWfZ67sD6TDK3/l7EQsK8GDXGr3ysypmg286JtZrS82nt1uANdNrW0QPexf0ZMQUMAAAAQAAAAiCoAAElEMw=="); +base64DecodeToExistingUint8Array(bufferView, 7576, "AQAAAAUAAAAYKw=="); +base64DecodeToExistingUint8Array(bufferView, 7600, "AwAAAAQAAAAEAAAABgAAAIP5ogBETm4A/CkVANFXJwDdNPUAYtvAADyZlQBBkEMAY1H+ALveqwC3YcUAOm4kANJNQgBJBuAACeouAByS0QDrHf4AKbEcAOg+pwD1NYIARLsuAJzphAC0JnAAQX5fANaROQBTgzkAnPQ5AItfhAAo+b0A+B87AN7/lwAPmAUAES/vAApaiwBtH20Az342AAnLJwBGT7cAnmY/AC3qXwC6J3UA5evHAD178QD3OQcAklKKAPtr6gAfsV8ACF2NADADVgB7/EYA8KtrACC8zwA29JoA46kdAF5hkQAIG+YAhZllAKAUXwCNQGgAgNj/ACdzTQAGBjEAylYVAMmocwB74mAAa4zAABnERwDNZ8MACejcAFmDKgCLdsQAphyWAESv3QAZV9EApT4FAAUH/wAzfj8AwjLoAJhP3gC7fTIAJj3DAB5r7wCf+F4ANR86AH/yygDxhx0AfJAhAGokfADVbvoAMC13ABU7QwC1FMYAwxmdAK3EwgAsTUEADABdAIZ9RgDjcS0Am8aaADNiAAC00nwAtKeXADdV1QDXPvYAoxAYAE12/ABknSoAcNerAGN8+AB6sFcAFxXnAMBJVgA71tkAp4Q4ACQjywDWincAWlQjAAAfuQDxChsAGc7fAJ8x/wBmHmoAmVdhAKz7RwB+f9gAImW3ADLoiQDmv2AA78TNAGw2CQBdP9QAFt7XAFg73gDem5IA0iIoACiG6ADiWE0AxsoyAAjjFgDgfcsAF8BQAPMdpwAY4FsALhM0AIMSYgCDSAEA9Y5bAK2wfwAe6fIASEpDABBn0wCq3dgArl9CAGphzgAKKKQA05m0AAam8gBcd38Ao8KDAGE8iACKc3gAr4xaAG/XvQAtpmMA9L/LAI2B7wAmwWcAVcpFAMrZNgAoqNIAwmGNABLJdwAEJhQAEkabAMRZxADIxUQATbKRAAAX8wDUQ60AKUnlAP3VEAAAvvwAHpTMAHDO7gATPvUA7PGAALPnwwDH+CgAkwWUAMFxPgAuCbMAC0XzAIgSnACrIHsALrWfAEeSwgB7Mi8ADFVtAHKnkABr5x8AMcuWAHkWSgBBeeIA9N+JAOiUlwDi5oQAmTGXAIjtawBfXzYAu/0OAEiatABnpGwAcXJCAI1dMgCfFbgAvOUJAI0xJQD3dDkAMAUcAA0MAQBLCGgALO5YAEeqkAB05wIAvdYkAPd9pgBuSHIAnxbvAI6UpgC0kfYA0VNRAM8K8gAgmDMA9Ut+ALJjaADdPl8AQF0DAIWJfwBVUikAN2TAAG3YEAAySDIAW0x1AE5x1ABFVG4ACwnBACr1aQAUZtUAJwedAF0EUAC0O9sA6nbFAIf5FwBJa30AHSe6AJZpKQDGzKwArRRUAJDiagCI2YkALHJQAASkvgB3B5QA8zBwAAD8JwDqcagAZsJJAGTgPQCX3YMAoz+XAEOU/QANhowAMUHeAJI5nQDdcIwAF7fnAAjfOwAVNysAXICgAFqAkwAQEZIAD+jYAGyArwDb/0sAOJAPAFkYdgBipRUAYcu7AMeJuQAQQL0A0vIEAEl1JwDrtvYA2yK7AAoUqgCJJi8AZIN2AAk7MwAOlBoAUTqqAB2jwgCv7a4AXCYSAG3CTQAtepwAwFaXAAM/gwAJ8PYAK0CMAG0xmQA5tAcADCAVANjDWwD1ksQAxq1LAE7KpQCnN80A5qk2AKuSlADdQmgAGWPeAHaM7wBoi1IA/Ns3AK6hqwDfFTEAAK6hAAz72gBkTWYA7QW3ACllMABXVr8AR/86AGr5uQB1vvMAKJPfAKuAMABmjPYABMsVAPoiBgDZ5B0APbOkAFcbjwA2zQkATkLpABO+pAAzI7UA8KoaAE9lqADSwaUACz8PAFt4zQAj+XYAe4sEAIkXcgDGplMAb27iAO/rAACbSlgAxNq3AKpmugB2z88A0QIdALHxLQCMmcEAw613AIZI2gD3XaAAxoD0AKzwLwDd7JoAP1y8ANDebQCQxx8AKtu2AKMlOgAAr5oArVOTALZXBAApLbQAS4B+ANoHpwB2qg4Ae1mhABYSKgDcty0A+uX9AInb/gCJvv0A5HZsAAap/AA+gHAAhW4VAP2H/wAoPgcAYWczACoYhgBNveoAs+evAI9tbgCVZzkAMb9bAITXSAAw3xYAxy1DACVhNQDJcM4AMMu4AL9s/QCkAKIABWzkAFrdoAAhb0cAYhLSALlchABwYUkAa1bgAJlSAQBQVTcAHtW3ADPxxAATbl8AXTDkAIUuqQAdssMAoTI2AAi3pADqsdQAFvchAI9p5AAn/3cADAOAAI1ALQBPzaAAIKWZALOi0wAvXQoAtPlCABHaywB9vtAAm9vBAKsXvQDKooEACGpcAC5VFwAnAFUAfxTwAOEHhgAUC2QAlkGNAIe+3gDa/SoAayW2AHuJNAAF8/4Aub+eAGhqTwBKKqgAT8RaAC34vADXWpgA9MeVAA1NjQAgOqYApFdfABQ/sQCAOJUAzCABAHHdhgDJ3rYAv2D1AE1lEQABB2sAjLCsALLA0ABRVUgAHvsOAJVywwCjBjsAwEA1AAbcewDgRcwATin6ANbKyADo80EAfGTeAJtk2ADZvjEApJfDAHdY1ABp48UA8NoTALo6PABGGEYAVXVfANK99QBuksYArC5dAA5E7QAcPkIAYcSHACn96QDn1vMAInzKAG+RNQAI4MUA/9eNAG5q4gCw/cYAkwjBAHxddABrrbIAzW6dAD5yewDGEWoA98+pAClz3wC1yboAtwBRAOKyDQB0uiQA5X1gAHTYigANFSwAgRgMAH5mlAABKRYAn3p2AP39vgBWRe8A2X42AOzZEwCLurkAxJf8ADGoJwDxbsMAlMU2ANioVgC0qLUAz8wOABKJLQBvVzQALFaJAJnO4wDWILkAa16qAD4qnAARX8wA/QtKAOH0+wCOO20A4oYsAOnUhAD8tKkA7+7RAC41yQAvOWEAOCFEABvZyACB/AoA+0pqAC8c2ABTtIQATpmMAFQizAAqVdwAwMbWAAsZlgAacLgAaZVkACZaYAA/Uu4AfxEPAPS1EQD8y/UANLwtADS87gDoXcwA3V5gAGeOmwCSM+8AyRe4AGFYmwDhV7wAUYPGANg+EADdcUgALRzdAK8YoQAhLEYAWfPXANl6mACeVMAAT4b6AFYG/ADlea4AiSI2ADitIgBnk9wAVeiqAIImOADK55sAUQ2kAJkzsQCp1w4AaQVIAGWy8AB/iKcAiEyXAPnRNgAhkrMAe4JKAJjPIQBAn9wA3EdVAOF0OgBn60IA/p3fAF7UXwB7Z6QAuqx6AFX2ogAriCMAQbpVAFluCAAhKoYAOUeDAInj5gDlntQASftAAP9W6QAcD8oAxVmKAJT6KwDTwcUAD8XPANtargBHxYYAhUNiACGGOwAseZQAEGGHACpMewCALBoAQ78SAIgmkAB4PIkAqMTkAOXbewDEOsIAJvTqAPdnigANkr8AZaMrAD2TsQC9fAsApFHcACfdYwBp4d0AmpQZAKgplQBozigACe20AESfIABOmMoAcIJjAH58IwAPuTIAp/WOABRW5wAh8QgAtZ0qAG9+TQClGVEAtfmrAILf1gCW3WEAFjYCAMQ6nwCDoqEAcu1tADmNegCCuKkAazJcAEYnWwAANO0A0gB3APz0VQABWU0A4HGA"); +base64DecodeToExistingUint8Array(bufferView, 10387, "QPsh+T8AAAAALUR0PgAAAICYRvg8AAAAYFHMeDsAAACAgxvwOQAAAEAgJXo4AAAAgCKC4zYAAAAAHfNpNQAAAAAAAOA/AAAAAAAA4L8BAAAAAgAAAAQAAAAFAAAABgAAAGluZmluaXR5AG5hbg=="); +base64DecodeToExistingUint8Array(bufferView, 10512, "0XSeAFedvSqAcFIP//8+JwoAAABkAAAA6AMAABAnAACghgEAQEIPAICWmAAA4fUFGAAAADUAAABxAAAAa////877//+Sv///YmFydGxldHQAYmFydGxldHRfaGFubgBibGFja21hbgBibGFja21hbl9oYXJyaXNfNHRlcm1fOTJkYgBjb25uZXMAZmxhdHRvcABnYXVzcygAaGFtbWluZwBoYW5uAGthaXNlcl9iZXNzZWwAbnV0dGFsbAByZWN0YW5nbGUAdHJpYW5nbGUAdHVrZXkoAHBhcnRpYWxfdHVrZXkoAHB1bmNob3V0X3R1a2V5KAB3ZWxjaABpbWFnZS9wbmcALS0+AHR1a2V5KDVlLTEpAHR1a2V5KDVlLTEpO3BhcnRpYWxfdHVrZXkoMikAdHVrZXkoNWUtMSk7cGFydGlhbF90dWtleSgyKTtwdW5jaG91dF90dWtleSgzKQ=="); +base64DecodeToExistingUint8Array(bufferView, 10881, "FQAAcR0AAAk="); +base64DecodeToExistingUint8Array(bufferView, 10900, "Ag=="); +base64DecodeToExistingUint8Array(bufferView, 10920, "AwAAAAAAAAAEAAAASC8AAAAE"); +base64DecodeToExistingUint8Array(bufferView, 10964, "/////w=="); +base64DecodeToExistingUint8Array(bufferView, 11032, "BQ=="); +base64DecodeToExistingUint8Array(bufferView, 11044, "CQ=="); +base64DecodeToExistingUint8Array(bufferView, 11068, "CgAAAAsAAABYMwAAAAQ="); +base64DecodeToExistingUint8Array(bufferView, 11092, "AQ=="); +base64DecodeToExistingUint8Array(bufferView, 11107, "Cv////8="); +base64DecodeToExistingUint8Array(bufferView, 11176, "GCs="); +base64DecodeToExistingUint8Array(bufferView, 11216, "AwAAAAAAAAAZKgAAAQAAAAE="); +base64DecodeToExistingUint8Array(bufferView, 11260, "AwAAAAAAAAAZKgAAAQ=="); +base64DecodeToExistingUint8Array(bufferView, 11304, "AwAAAAAAAAAZKg=="); +base64DecodeToExistingUint8Array(bufferView, 11324, "Bg=="); +base64DecodeToExistingUint8Array(bufferView, 11348, "BAAAAAAAAAAZKgAAAQAAAAEAAAAI"); +base64DecodeToExistingUint8Array(bufferView, 11392, "BAAAAAAAAAAZKgAAAQAAAAAAAAAI"); +base64DecodeToExistingUint8Array(bufferView, 11436, "BQAAAAAAAAAZKgAAAQAAAAAAAAAI"); +base64DecodeToExistingUint8Array(bufferView, 11480, "BgAAAAAAAAAlKgAAAQAAAAAAAAAM"); +base64DecodeToExistingUint8Array(bufferView, 11524, "BgAAAAAAAAAlKgAAAQAAAAAAAAAM"); +base64DecodeToExistingUint8Array(bufferView, 11568, "BgAAAAAAAABCKg=="); +return asmFunc({ + 'Int8Array': Int8Array, + 'Int16Array': Int16Array, + 'Int32Array': Int32Array, + 'Uint8Array': Uint8Array, + 'Uint16Array': Uint16Array, + 'Uint32Array': Uint32Array, + 'Float32Array': Float32Array, + 'Float64Array': Float64Array, + 'NaN': NaN, + 'Infinity': Infinity, + 'Math': Math + }, + asmLibraryArg, + wasmMemory.buffer +) + +} +)(asmLibraryArg, wasmMemory, wasmTable); + }, + + instantiate: /** @suppress{checkTypes} */ function(binary, info) { + return { + then: function(ok) { + ok({ + 'instance': new WebAssembly.Instance(new WebAssembly.Module(binary)) + }); + } + }; + }, + + RuntimeError: Error +}; + +// We don't need to actually download a wasm binary, mark it as present but empty. +wasmBinary = []; + + + +if (typeof WebAssembly !== 'object') { + abort('no native wasm support detected'); +} + + + + +// In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking. +// In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties) + +/** @param {number} ptr + @param {number} value + @param {string} type + @param {number|boolean=} noSafe */ +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': HEAP8[((ptr)>>0)]=value; break; + case 'i8': HEAP8[((ptr)>>0)]=value; break; + case 'i16': HEAP16[((ptr)>>1)]=value; break; + case 'i32': HEAP32[((ptr)>>2)]=value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)]=value; break; + case 'double': HEAPF64[((ptr)>>3)]=value; break; + default: abort('invalid type for setValue: ' + type); + } +} + +/** @param {number} ptr + @param {string} type + @param {number|boolean=} noSafe */ +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + default: abort('invalid type for getValue: ' + type); + } + return null; +} + + + + + + +// Wasm globals + +var wasmMemory; + +// In fastcomp asm.js, we don't need a wasm Table at all. +// In the wasm backend, we polyfill the WebAssembly object, +// so this creates a (non-native-wasm) table for us. +var wasmTable = new WebAssembly.Table({ + 'initial': 22, + 'maximum': 22 + 5, + 'element': 'anyfunc' +}); + + +//======================================== +// Runtime essentials +//======================================== + +// whether we are quitting the application. no code should run after this. +// set in exit() and abort() +var ABORT = false; + +// set by exit() and abort(). Passed to 'onExit' handler. +// NOTE: This is also used as the process return code code in shell environments +// but only when noExitRuntime is false. +var EXITSTATUS = 0; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) +function getCFunc(ident) { + var func = Module['_' + ident]; // closure exported function + assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); + return func; +} + +// C calling interface. +/** @param {string|null=} returnType + @param {Array=} argTypes + @param {Arguments|Array=} args + @param {Object=} opts */ +function ccall(ident, returnType, argTypes, args, opts) { + // For fast lookup of conversion functions + var toC = { + 'string': function(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { // null string + // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' + var len = (str.length << 2) + 1; + ret = stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + }, + 'array': function(arr) { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + } + }; + + function convertReturnValue(ret) { + if (returnType === 'string') return UTF8ToString(ret); + if (returnType === 'boolean') return Boolean(ret); + return ret; + } + + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + + ret = convertReturnValue(ret); + if (stack !== 0) stackRestore(stack); + return ret; +} + +/** @param {string=} returnType + @param {Array=} argTypes + @param {Object=} opts */ +function cwrap(ident, returnType, argTypes, opts) { + argTypes = argTypes || []; + // When the function takes numbers and returns a number, we can just return + // the original function + var numericArgs = argTypes.every(function(type){ return type === 'number'}); + var numericRet = returnType !== 'string'; + if (numericRet && numericArgs && !opts) { + return getCFunc(ident); + } + return function() { + return ccall(ident, returnType, argTypes, arguments, opts); + } +} + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_DYNAMIC = 2; // Cannot be freed except through sbrk +var ALLOC_NONE = 3; // Do not allocate + +// allocate(): This is for internal use. You can use it yourself as well, but the interface +// is a little tricky (see docs right below). The reason is that it is optimized +// for multiple syntaxes to save space in generated code. So you should +// normally not use allocate(), and instead allocate memory using _malloc(), +// initialize it with setValue(), and so forth. +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block. This only matters if there +// is initial data - if @slab is a number, then this does not matter at all and is +// ignored. +// @allocator: How to allocate memory, see ALLOC_* +/** @type {function((TypedArray|Array|number), string, number, number=)} */ +function allocate(slab, types, allocator, ptr) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret; + if (allocator == ALLOC_NONE) { + ret = ptr; + } else { + ret = [_malloc, + stackAlloc, + dynamicAlloc][allocator](Math.max(size, singleType ? 1 : types.length)); + } + + if (zeroinit) { + var stop; + ptr = ret; + assert((ret & 3) == 0); + stop = ret + (size & ~3); + for (; ptr < stop; ptr += 4) { + HEAP32[((ptr)>>2)]=0; + } + stop = ret + size; + while (ptr < stop) { + HEAP8[((ptr++)>>0)]=0; + } + return ret; + } + + if (singleType === 'i8') { + if (slab.subarray || slab.slice) { + HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; + } + + var i = 0, type, typeSize, previousType; + while (i < size) { + var curr = slab[i]; + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret+i, curr, type); + + // no need to look up size unless type changes, so cache it + if (previousType !== type) { + typeSize = getNativeTypeSize(type); + previousType = type; + } + i += typeSize; + } + + return ret; +} + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!runtimeInitialized) return dynamicAlloc(size); + return _malloc(size); +} + + + + +// runtime_strings.js: Strings related runtime functions that are part of both MINIMAL_RUNTIME and regular runtime. + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; + +/** + * @param {number} idx + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ArrayToString(heap, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + // (As a tiny code save trick, compare endPtr against endIdx using a negation, so that undefined means Infinity) + while (heap[endPtr] && !(endPtr >= endIdx)) ++endPtr; + + if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) { + return UTF8Decoder.decode(heap.subarray(idx, endPtr)); + } else { + var str = ''; + // If building with TextDecoder, we have already computed the string length above, so test loop end condition against that + while (idx < endPtr) { + // For UTF8 byte structure, see: + // http://en.wikipedia.org/wiki/UTF-8#Description + // https://www.ietf.org/rfc/rfc2279.txt + // https://tools.ietf.org/html/rfc3629 + var u0 = heap[idx++]; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + var u1 = heap[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + var u2 = heap[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heap[idx++] & 63); + } + + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + } + return str; +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns a +// copy of that string as a Javascript String object. +// maxBytesToRead: an optional length that specifies the maximum number of bytes to read. You can omit +// this parameter to scan the string until the first \0 byte. If maxBytesToRead is +// passed, and the string at [ptr, ptr+maxBytesToReadr[ contains a null byte in the +// middle, then the string will cut short at that byte index (i.e. maxBytesToRead will +// not produce a string of exact length [ptr, ptr+maxBytesToRead[) +// N.B. mixing frequent uses of UTF8ToString() with and without maxBytesToRead may +// throw JS JIT optimizations off, so it is worth to consider consistently using one +// style or the other. +/** + * @param {number} ptr + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; +} + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// heap: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. +// This count should include the null terminator, +// i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) { + var u1 = str.charCodeAt(++i); + u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); + } + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + heap[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + heap[outIdx++] = 0xC0 | (u >> 6); + heap[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + heap[outIdx++] = 0xE0 | (u >> 12); + heap[outIdx++] = 0x80 | ((u >> 6) & 63); + heap[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 3 >= endIdx) break; + heap[outIdx++] = 0xF0 | (u >> 18); + heap[outIdx++] = 0x80 | ((u >> 12) & 63); + heap[outIdx++] = 0x80 | ((u >> 6) & 63); + heap[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + heap[outIdx] = 0; + return outIdx - startIdx; +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) ++len; + else if (u <= 0x7FF) len += 2; + else if (u <= 0xFFFF) len += 3; + else len += 4; + } + return len; +} + + + + + +// runtime_strings_extra.js: Strings related runtime functions that are available only in regular runtime. + +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAPU8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; + +function UTF16ToString(ptr, maxBytesToRead) { + var endPtr = ptr; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + var idx = endPtr >> 1; + var maxIdx = idx + maxBytesToRead / 2; + // If maxBytesToRead is not passed explicitly, it will be undefined, and this + // will always evaluate to true. This saves on code size. + while (!(idx >= maxIdx) && HEAPU16[idx]) ++idx; + endPtr = idx << 1; + + if (endPtr - ptr > 32 && UTF16Decoder) { + return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); + } else { + var i = 0; + + var str = ''; + while (1) { + var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; + if (codeUnit == 0 || i == maxBytesToRead / 2) return str; + ++i; + // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. + str += String.fromCharCode(codeUnit); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; + } + // Null-terminate the pointer to the HEAP. + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} + +function UTF32ToString(ptr, maxBytesToRead) { + var i = 0; + + var str = ''; + // If maxBytesToRead is not passed explicitly, it will be undefined, and this + // will always evaluate to true. This saves on code size. + while (!(i >= maxBytesToRead / 4)) { + var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; + if (utf32 == 0) break; + ++i; + // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + if (utf32 >= 0x10000) { + var ch = utf32 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } else { + str += String.fromCharCode(utf32); + } + } + return str; +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); + } + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + // Null-terminate the pointer to the HEAP. + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} + +// Allocate heap space for a JS string, and write it there. +// It is the responsibility of the caller to free() that memory. +function allocateUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Allocate stack space for a JS string, and write it there. +function allocateUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Deprecated: This function should not be called because it is unsafe and does not provide +// a maximum length limit of how many bytes it is allowed to write. Prefer calling the +// function stringToUTF8Array() instead, which takes in a maximum length that can be used +// to be secure from out of bounds writes. +/** @deprecated + @param {boolean=} dontAddNull */ +function writeStringToMemory(string, buffer, dontAddNull) { + warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); + + var /** @type {number} */ lastChar, /** @type {number} */ end; + if (dontAddNull) { + // stringToUTF8Array always appends null. If we don't want to do that, remember the + // character that existed at the location where the null will be placed, and restore + // that after the write (below). + end = buffer + lengthBytesUTF8(string); + lastChar = HEAP8[end]; + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. +} + +function writeArrayToMemory(array, buffer) { + HEAP8.set(array, buffer); +} + +/** @param {boolean=} dontAddNull */ +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); + } + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; +} + + + +// Memory management + +var PAGE_SIZE = 16384; +var WASM_PAGE_SIZE = 65536; +var ASMJS_PAGE_SIZE = 16777216; + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - (x % multiple); + } + return x; +} + +var HEAP, +/** @type {ArrayBuffer} */ + buffer, +/** @type {Int8Array} */ + HEAP8, +/** @type {Uint8Array} */ + HEAPU8, +/** @type {Int16Array} */ + HEAP16, +/** @type {Uint16Array} */ + HEAPU16, +/** @type {Int32Array} */ + HEAP32, +/** @type {Uint32Array} */ + HEAPU32, +/** @type {Float32Array} */ + HEAPF32, +/** @type {Float64Array} */ + HEAPF64; + +function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module['HEAP8'] = HEAP8 = new Int8Array(buf); + Module['HEAP16'] = HEAP16 = new Int16Array(buf); + Module['HEAP32'] = HEAP32 = new Int32Array(buf); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buf); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buf); +} + +var STATIC_BASE = 1024, + STACK_BASE = 5257216, + STACKTOP = STACK_BASE, + STACK_MAX = 14336, + DYNAMIC_BASE = 5257216, + DYNAMICTOP_PTR = 14176; + + + +var TOTAL_STACK = 5242880; + +var INITIAL_INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216; + + + + + + + + + +// In non-standalone/normal mode, we create the memory here. + + + +// Create the main memory. (Note: this isn't used in STANDALONE_WASM mode since the wasm +// memory is created in the wasm, not in JS.) + + if (Module['wasmMemory']) { + wasmMemory = Module['wasmMemory']; + } else + { + wasmMemory = new WebAssembly.Memory({ + 'initial': INITIAL_INITIAL_MEMORY / WASM_PAGE_SIZE + , + 'maximum': 2147483648 / WASM_PAGE_SIZE + }); + } + + +if (wasmMemory) { + buffer = wasmMemory.buffer; +} + +// If the user provides an incorrect length, just use that length instead rather than providing the user to +// specifically provide the memory length with Module['INITIAL_MEMORY']. +INITIAL_INITIAL_MEMORY = buffer.byteLength; +updateGlobalBufferAndViews(buffer); + +HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE; + + + + + + + + + + + + + + +function callRuntimeCallbacks(callbacks) { + while(callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(Module); // Pass the module as the first argument. + continue; + } + var func = callback.func; + if (typeof func === 'number') { + if (callback.arg === undefined) { + Module['dynCall_v'](func); + } else { + Module['dynCall_vi'](func, callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the main() is called + +var runtimeInitialized = false; +var runtimeExited = false; + + +function preRun() { + + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPRERUN__); +} + +function initRuntime() { + runtimeInitialized = true; + if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); +TTY.init(); + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + FS.ignorePermissions = false; + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + runtimeExited = true; +} + +function postRun() { + + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +/** @param {number|boolean=} ignore */ +function unSign(value, bits, ignore) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; +} +/** @param {number|boolean=} ignore */ +function reSign(value, bits, ignore) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 + : Math.pow(2, bits-1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + + + + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32 + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc + + +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_fround = Math.fround; +var Math_round = Math.round; +var Math_min = Math.min; +var Math_max = Math.max; +var Math_clz32 = Math.clz32; +var Math_trunc = Math.trunc; + + + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// Module.preRun (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled + +function getUniqueRunDependency(id) { + return id; +} + +function addRunDependency(id) { + runDependencies++; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + +} + +function removeRunDependency(id) { + runDependencies--; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +Module["preloadedImages"] = {}; // maps url to image data +Module["preloadedAudios"] = {}; // maps url to audio data + +/** @param {string|number=} what */ +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + what += ''; + out(what); + err(what); + + ABORT = true; + EXITSTATUS = 1; + + what = 'abort(' + what + '). Build with -s ASSERTIONS=1 for more info.'; + + // Throw a wasm runtime error, because a JS error might be seen as a foreign + // exception, which means we'd run destructors on it. We need the error to + // simply make the program stop. + throw new WebAssembly.RuntimeError(what); +} + + +var memoryInitializer = null; + + + + + + + + + + + + +function hasPrefix(str, prefix) { + return String.prototype.startsWith ? + str.startsWith(prefix) : + str.indexOf(prefix) === 0; +} + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + return hasPrefix(filename, dataURIPrefix); +} + +var fileURIPrefix = "file://"; + +// Indicates whether filename is delivered via file protocol (as opposed to http/https) +function isFileURI(filename) { + return hasPrefix(filename, fileURIPrefix); +} + + + + +var wasmBinaryFile = 'libflac.wasm'; +if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); +} + +function getBinary() { + try { + if (wasmBinary) { + return new Uint8Array(wasmBinary); + } + + var binary = tryParseAsDataURI(wasmBinaryFile); + if (binary) { + return binary; + } + if (readBinary) { + return readBinary(wasmBinaryFile); + } else { + throw "both async and sync fetching of the wasm failed"; + } + } + catch (err) { + abort(err); + } +} + +function getBinaryPromise() { + // If we don't have the binary yet, and have the Fetch api, use that; + // in some environments, like Electron's render process, Fetch api may be present, but have a different context than expected, let's only use it on the Web + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === 'function' + // Let's not use fetch to get objects over file:// as it's most likely Cordova which doesn't support fetch for file:// + && !isFileURI(wasmBinaryFile) + ) { + return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + if (!response['ok']) { + throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + } + return response['arrayBuffer'](); + }).catch(function () { + return getBinary(); + }); + } + // Otherwise, getBinary should be able to get it synchronously + return new Promise(function(resolve, reject) { + resolve(getBinary()); + }); +} + + + +// Create the wasm instance. +// Receives the wasm imports, returns the exports. +function createWasm() { + // prepare imports + var info = { + 'env': asmLibraryArg, + 'wasi_snapshot_preview1': asmLibraryArg + }; + // Load the wasm module and create an instance of using native support in the JS engine. + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup + /** @param {WebAssembly.Module=} module*/ + function receiveInstance(instance, module) { + var exports = instance.exports; + Module['asm'] = exports; + removeRunDependency('wasm-instantiate'); + } + // we can't run yet (except in a pthread, where we have a custom sync instantiator) + addRunDependency('wasm-instantiate'); + + + function receiveInstantiatedSource(output) { + // 'output' is a WebAssemblyInstantiatedSource object which has both the module and instance. + // receiveInstance() will swap in the exports (to Module.asm) so they can be called + // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line. + // When the regression is fixed, can restore the above USE_PTHREADS-enabled path. + receiveInstance(output['instance']); + } + + + function instantiateArrayBuffer(receiver) { + return getBinaryPromise().then(function(binary) { + return WebAssembly.instantiate(binary, info); + }).then(receiver, function(reason) { + err('failed to asynchronously prepare wasm: ' + reason); + + + abort(reason); + }); + } + + // Prefer streaming instantiation if available. + function instantiateAsync() { + if (!wasmBinary && + typeof WebAssembly.instantiateStreaming === 'function' && + !isDataURI(wasmBinaryFile) && + // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously. + !isFileURI(wasmBinaryFile) && + typeof fetch === 'function') { + fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function (response) { + var result = WebAssembly.instantiateStreaming(response, info); + return result.then(receiveInstantiatedSource, function(reason) { + // We expect the most common failure cause to be a bad MIME type for the binary, + // in which case falling back to ArrayBuffer instantiation should work. + err('wasm streaming compile failed: ' + reason); + err('falling back to ArrayBuffer instantiation'); + return instantiateArrayBuffer(receiveInstantiatedSource); + }); + }); + } else { + return instantiateArrayBuffer(receiveInstantiatedSource); + } + } + // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback + // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel + // to any other async startup actions they are performing. + if (Module['instantiateWasm']) { + try { + var exports = Module['instantiateWasm'](info, receiveInstance); + return exports; + } catch(e) { + err('Module.instantiateWasm callback failed with error: ' + e); + return false; + } + } + + instantiateAsync(); + return {}; // no exports yet; we'll fill them in later +} + + +// Globals used by JS i64 conversions +var tempDouble; +var tempI64; + +// === Body === + +var ASM_CONSTS = { + +}; + + + + +// STATICTOP = STATIC_BASE + 13312; +/* global initializers */ __ATINIT__.push({ func: function() { ___wasm_call_ctors() } }); + + + + +/* no memory initializer */ +// {{PRE_LIBRARY}} + + + function demangle(func) { + return func; + } + + function demangleAll(text) { + var regex = + /\b_Z[\w\d_]+/g; + return text.replace(regex, + function(x) { + var y = demangle(x); + return x === y ? x : (y + ' [' + x + ']'); + }); + } + + function jsStackTrace() { + var err = new Error(); + if (!err.stack) { + // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, + // so try that as a special-case. + try { + throw new Error(); + } catch(e) { + err = e; + } + if (!err.stack) { + return '(no stack trace available)'; + } + } + return err.stack.toString(); + } + + function stackTrace() { + var js = jsStackTrace(); + if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); + return demangleAll(js); + } + + function _emscripten_get_sbrk_ptr() { + return 14176; + } + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.copyWithin(dest, src, src + num); + } + + + function _emscripten_get_heap_size() { + return HEAPU8.length; + } + + function emscripten_realloc_buffer(size) { + try { + // round size grow request up to wasm page size (fixed 64KB per spec) + wasmMemory.grow((size - buffer.byteLength + 65535) >>> 16); // .grow() takes a delta compared to the previous size + updateGlobalBufferAndViews(wasmMemory.buffer); + return 1 /*success*/; + } catch(e) { + } + }function _emscripten_resize_heap(requestedSize) { + requestedSize = requestedSize >>> 0; + var oldSize = _emscripten_get_heap_size(); + // With pthreads, races can happen (another thread might increase the size in between), so return a failure, and let the caller retry. + + + var PAGE_MULTIPLE = 65536; + + // Memory resize rules: + // 1. When resizing, always produce a resized heap that is at least 16MB (to avoid tiny heap sizes receiving lots of repeated resizes at startup) + // 2. Always increase heap size to at least the requested size, rounded up to next page multiple. + // 3a. If MEMORY_GROWTH_LINEAR_STEP == -1, excessively resize the heap geometrically: increase the heap size according to + // MEMORY_GROWTH_GEOMETRIC_STEP factor (default +20%), + // At most overreserve by MEMORY_GROWTH_GEOMETRIC_CAP bytes (default 96MB). + // 3b. If MEMORY_GROWTH_LINEAR_STEP != -1, excessively resize the heap linearly: increase the heap size by at least MEMORY_GROWTH_LINEAR_STEP bytes. + // 4. Max size for the heap is capped at 2048MB-PAGE_MULTIPLE, or by MAXIMUM_MEMORY, or by ASAN limit, depending on which is smallest + // 5. If we were unable to allocate as much memory, it may be due to over-eager decision to excessively reserve due to (3) above. + // Hence if an allocation fails, cut down on the amount of excess growth, in an attempt to succeed to perform a smaller allocation. + + // A limit was set for how much we can grow. We should not exceed that + // (the wasm binary specifies it, so if we tried, we'd fail anyhow). + var maxHeapSize = 2147483648; + if (requestedSize > maxHeapSize) { + return false; + } + + var minHeapSize = 16777216; + + // Loop through potential heap size increases. If we attempt a too eager reservation that fails, cut down on the + // attempted size and reserve a smaller bump instead. (max 3 times, chosen somewhat arbitrarily) + for(var cutDown = 1; cutDown <= 4; cutDown *= 2) { + var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); // ensure geometric growth + // but limit overreserving (default to capping at +96MB overgrowth at most) + overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296 ); + + + var newSize = Math.min(maxHeapSize, alignUp(Math.max(minHeapSize, requestedSize, overGrownHeapSize), PAGE_MULTIPLE)); + + var replacement = emscripten_realloc_buffer(newSize); + if (replacement) { + + return true; + } + } + return false; + } + + + + var PATH={splitPath:function(filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + },normalizeArray:function(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up; up--) { + parts.unshift('..'); + } + } + return parts; + },normalize:function(path) { + var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.substr(-1) === '/'; + // Normalize the path + path = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), !isAbsolute).join('/'); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + return (isAbsolute ? '/' : '') + path; + },dirname:function(path) { + var result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + },basename:function(path) { + // EMSCRIPTEN return '/'' for '/', not an empty string + if (path === '/') return '/'; + var lastSlash = path.lastIndexOf('/'); + if (lastSlash === -1) return path; + return path.substr(lastSlash+1); + },extname:function(path) { + return PATH.splitPath(path)[3]; + },join:function() { + var paths = Array.prototype.slice.call(arguments, 0); + return PATH.normalize(paths.join('/')); + },join2:function(l, r) { + return PATH.normalize(l + '/' + r); + }}; + + + function setErrNo(value) { + HEAP32[((___errno_location())>>2)]=value; + return value; + } + + var PATH_FS={resolve:function() { + var resolvedPath = '', + resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : FS.cwd(); + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + return ''; // an invalid portion invalidates the whole thing + } + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; + },relative:function(from, to) { + from = PATH_FS.resolve(from).substr(1); + to = PATH_FS.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); + }}; + + var TTY={ttys:[],init:function () { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // currently, FS.init does not distinguish if process.stdin is a file or TTY + // // device, it always assumes it's a TTY device. because of this, we're forcing + // // process.stdin to UTF8 encoding to at least make stdin reading compatible + // // with text files until FS.init can be refactored. + // process['stdin']['setEncoding']('utf8'); + // } + },shutdown:function() { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? + // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation + // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? + // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle + // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call + // process['stdin']['pause'](); + // } + },register:function(dev, ops) { + TTY.ttys[dev] = { input: [], output: [], ops: ops }; + FS.registerDevice(dev, TTY.stream_ops); + },stream_ops:{open:function(stream) { + var tty = TTY.ttys[stream.node.rdev]; + if (!tty) { + throw new FS.ErrnoError(43); + } + stream.tty = tty; + stream.seekable = false; + },close:function(stream) { + // flush any pending line data + stream.tty.ops.flush(stream.tty); + },flush:function(stream) { + stream.tty.ops.flush(stream.tty); + },read:function(stream, buffer, offset, length, pos /* ignored */) { + if (!stream.tty || !stream.tty.ops.get_char) { + throw new FS.ErrnoError(60); + } + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = stream.tty.ops.get_char(stream.tty); + } catch (e) { + throw new FS.ErrnoError(29); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset+i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + },write:function(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.put_char) { + throw new FS.ErrnoError(60); + } + try { + for (var i = 0; i < length; i++) { + stream.tty.ops.put_char(stream.tty, buffer[offset+i]); + } + } catch (e) { + throw new FS.ErrnoError(29); + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + }},default_tty_ops:{get_char:function(tty) { + if (!tty.input.length) { + var result = null; + if (ENVIRONMENT_IS_NODE) { + // we will read data by chunks of BUFSIZE + var BUFSIZE = 256; + var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE); + var bytesRead = 0; + + try { + bytesRead = nodeFS.readSync(process.stdin.fd, buf, 0, BUFSIZE, null); + } catch(e) { + // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes, + // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0. + if (e.toString().indexOf('EOF') != -1) bytesRead = 0; + else throw e; + } + + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString('utf-8'); + } else { + result = null; + } + } else + if (typeof window != 'undefined' && + typeof window.prompt == 'function') { + // Browser. + result = window.prompt('Input: '); // returns null on cancel + if (result !== null) { + result += '\n'; + } + } else if (typeof readline == 'function') { + // Command line. + result = readline(); + if (result !== null) { + result += '\n'; + } + } + if (!result) { + return null; + } + tty.input = intArrayFromString(result, true); + } + return tty.input.shift(); + },put_char:function(tty, val) { + if (val === null || val === 10) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. + } + },flush:function(tty) { + if (tty.output && tty.output.length > 0) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }},default_tty1_ops:{put_char:function(tty, val) { + if (val === null || val === 10) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + },flush:function(tty) { + if (tty.output && tty.output.length > 0) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }}}; + + var MEMFS={ops_table:null,mount:function(mount) { + return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); + },createNode:function(parent, name, mode, dev) { + if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { + // no supported + throw new FS.ErrnoError(63); + } + if (!MEMFS.ops_table) { + MEMFS.ops_table = { + dir: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + lookup: MEMFS.node_ops.lookup, + mknod: MEMFS.node_ops.mknod, + rename: MEMFS.node_ops.rename, + unlink: MEMFS.node_ops.unlink, + rmdir: MEMFS.node_ops.rmdir, + readdir: MEMFS.node_ops.readdir, + symlink: MEMFS.node_ops.symlink + }, + stream: { + llseek: MEMFS.stream_ops.llseek + } + }, + file: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: { + llseek: MEMFS.stream_ops.llseek, + read: MEMFS.stream_ops.read, + write: MEMFS.stream_ops.write, + allocate: MEMFS.stream_ops.allocate, + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync + } + }, + link: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + readlink: MEMFS.node_ops.readlink + }, + stream: {} + }, + chrdev: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: FS.chrdev_stream_ops + } + }; + } + var node = FS.createNode(parent, name, mode, dev); + if (FS.isDir(node.mode)) { + node.node_ops = MEMFS.ops_table.dir.node; + node.stream_ops = MEMFS.ops_table.dir.stream; + node.contents = {}; + } else if (FS.isFile(node.mode)) { + node.node_ops = MEMFS.ops_table.file.node; + node.stream_ops = MEMFS.ops_table.file.stream; + node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity. + // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred + // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size + // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. + node.contents = null; + } else if (FS.isLink(node.mode)) { + node.node_ops = MEMFS.ops_table.link.node; + node.stream_ops = MEMFS.ops_table.link.stream; + } else if (FS.isChrdev(node.mode)) { + node.node_ops = MEMFS.ops_table.chrdev.node; + node.stream_ops = MEMFS.ops_table.chrdev.stream; + } + node.timestamp = Date.now(); + // add the new node to the parent + if (parent) { + parent.contents[name] = node; + } + return node; + },getFileDataAsRegularArray:function(node) { + if (node.contents && node.contents.subarray) { + var arr = []; + for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]); + return arr; // Returns a copy of the original data. + } + return node.contents; // No-op, the file contents are already in a JS array. Return as-is. + },getFileDataAsTypedArray:function(node) { + if (!node.contents) return new Uint8Array(0); + if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. + return new Uint8Array(node.contents); + },expandFileStorage:function(node, newCapacity) { + var prevCapacity = node.contents ? node.contents.length : 0; + if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. + // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. + // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to + // avoid overshooting the allocation cap by a very large margin. + var CAPACITY_DOUBLING_MAX = 1024 * 1024; + newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) >>> 0); + if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. + var oldContents = node.contents; + node.contents = new Uint8Array(newCapacity); // Allocate new storage. + if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. + return; + },resizeFileStorage:function(node, newSize) { + if (node.usedBytes == newSize) return; + if (newSize == 0) { + node.contents = null; // Fully decommit when requesting a resize to zero. + node.usedBytes = 0; + return; + } + if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. + var oldContents = node.contents; + node.contents = new Uint8Array(newSize); // Allocate new storage. + if (oldContents) { + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. + } + node.usedBytes = newSize; + return; + } + // Backing with a JS array. + if (!node.contents) node.contents = []; + if (node.contents.length > newSize) node.contents.length = newSize; + else while (node.contents.length < newSize) node.contents.push(0); + node.usedBytes = newSize; + },node_ops:{getattr:function(node) { + var attr = {}; + // device numbers reuse inode numbers. + attr.dev = FS.isChrdev(node.mode) ? node.id : 1; + attr.ino = node.id; + attr.mode = node.mode; + attr.nlink = 1; + attr.uid = 0; + attr.gid = 0; + attr.rdev = node.rdev; + if (FS.isDir(node.mode)) { + attr.size = 4096; + } else if (FS.isFile(node.mode)) { + attr.size = node.usedBytes; + } else if (FS.isLink(node.mode)) { + attr.size = node.link.length; + } else { + attr.size = 0; + } + attr.atime = new Date(node.timestamp); + attr.mtime = new Date(node.timestamp); + attr.ctime = new Date(node.timestamp); + // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), + // but this is not required by the standard. + attr.blksize = 4096; + attr.blocks = Math.ceil(attr.size / attr.blksize); + return attr; + },setattr:function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + if (attr.size !== undefined) { + MEMFS.resizeFileStorage(node, attr.size); + } + },lookup:function(parent, name) { + throw FS.genericErrors[44]; + },mknod:function(parent, name, mode, dev) { + return MEMFS.createNode(parent, name, mode, dev); + },rename:function(old_node, new_dir, new_name) { + // if we're overwriting a directory at new_name, make sure it's empty. + if (FS.isDir(old_node.mode)) { + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + } + if (new_node) { + for (var i in new_node.contents) { + throw new FS.ErrnoError(55); + } + } + } + // do the internal rewiring + delete old_node.parent.contents[old_node.name]; + old_node.name = new_name; + new_dir.contents[new_name] = old_node; + old_node.parent = new_dir; + },unlink:function(parent, name) { + delete parent.contents[name]; + },rmdir:function(parent, name) { + var node = FS.lookupNode(parent, name); + for (var i in node.contents) { + throw new FS.ErrnoError(55); + } + delete parent.contents[name]; + },readdir:function(node) { + var entries = ['.', '..']; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + },symlink:function(parent, newname, oldpath) { + var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); + node.link = oldpath; + return node; + },readlink:function(node) { + if (!FS.isLink(node.mode)) { + throw new FS.ErrnoError(28); + } + return node.link; + }},stream_ops:{read:function(stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= stream.node.usedBytes) return 0; + var size = Math.min(stream.node.usedBytes - position, length); + if (size > 8 && contents.subarray) { // non-trivial, and typed array + buffer.set(contents.subarray(position, position + size), offset); + } else { + for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; + } + return size; + },write:function(stream, buffer, offset, length, position, canOwn) { + // If the buffer is located in main memory (HEAP), and if + // memory can grow, we can't hold on to references of the + // memory buffer, as they may get invalidated. That means we + // need to do copy its contents. + if (buffer.buffer === HEAP8.buffer) { + canOwn = false; + } + + if (!length) return 0; + var node = stream.node; + node.timestamp = Date.now(); + + if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? + if (canOwn) { + node.contents = buffer.subarray(offset, offset + length); + node.usedBytes = length; + return length; + } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data. + node.contents = buffer.slice(offset, offset + length); + node.usedBytes = length; + return length; + } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? + node.contents.set(buffer.subarray(offset, offset + length), position); + return length; + } + } + + // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. + MEMFS.expandFileStorage(node, position+length); + if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. + else { + for (var i = 0; i < length; i++) { + node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. + } + } + node.usedBytes = Math.max(node.usedBytes, position + length); + return length; + },llseek:function(stream, offset, whence) { + var position = offset; + if (whence === 1) { + position += stream.position; + } else if (whence === 2) { + if (FS.isFile(stream.node.mode)) { + position += stream.node.usedBytes; + } + } + if (position < 0) { + throw new FS.ErrnoError(28); + } + return position; + },allocate:function(stream, offset, length) { + MEMFS.expandFileStorage(stream.node, offset + length); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); + },mmap:function(stream, address, length, position, prot, flags) { + // We don't currently support location hints for the address of the mapping + assert(address === 0); + + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + var ptr; + var allocated; + var contents = stream.node.contents; + // Only make a new copy when MAP_PRIVATE is specified. + if (!(flags & 2) && contents.buffer === buffer) { + // We can't emulate MAP_SHARED when the file is not backed by the buffer + // we're mapping to (e.g. the HEAP buffer). + allocated = false; + ptr = contents.byteOffset; + } else { + // Try to avoid unnecessary slices. + if (position > 0 || position + length < contents.length) { + if (contents.subarray) { + contents = contents.subarray(position, position + length); + } else { + contents = Array.prototype.slice.call(contents, position, position + length); + } + } + allocated = true; + ptr = _malloc(length); + if (!ptr) { + throw new FS.ErrnoError(48); + } + HEAP8.set(contents, ptr); + } + return { ptr: ptr, allocated: allocated }; + },msync:function(stream, buffer, offset, length, mmapFlags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + if (mmapFlags & 2) { + // MAP_PRIVATE calls need not to be synced back to underlying fs + return 0; + } + + var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + // should we check if bytesWritten and length are the same? + return 0; + }}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e) { + if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); + return setErrNo(e.errno); + },lookupPath:function(path, opts) { + path = PATH_FS.resolve(FS.cwd(), path); + opts = opts || {}; + + if (!path) return { path: '', node: null }; + + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + for (var key in defaults) { + if (opts[key] === undefined) { + opts[key] = defaults[key]; + } + } + + if (opts.recurse_count > 8) { // max recursive lookup of 8 + throw new FS.ErrnoError(32); + } + + // split the path + var parts = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), false); + + // start at the root + var current = FS.root; + var current_path = '/'; + + for (var i = 0; i < parts.length; i++) { + var islast = (i === parts.length-1); + if (islast && opts.parent) { + // stop resolving + break; + } + + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); + + // jump to the mount's root node if this is a mountpoint + if (FS.isMountpoint(current)) { + if (!islast || (islast && opts.follow_mount)) { + current = current.mounted.root; + } + } + + // by default, lookupPath will not follow a symlink if it is the final path component. + // setting opts.follow = true will override this behavior. + if (!islast || opts.follow) { + var count = 0; + while (FS.isLink(current.mode)) { + var link = FS.readlink(current_path); + current_path = PATH_FS.resolve(PATH.dirname(current_path), link); + + var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); + current = lookup.node; + + if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). + throw new FS.ErrnoError(32); + } + } + } + } + + return { path: current_path, node: current }; + },getPath:function(node) { + var path; + while (true) { + if (FS.isRoot(node)) { + var mount = node.mount.mountpoint; + if (!path) return mount; + return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path; + } + path = path ? node.name + '/' + path : node.name; + node = node.parent; + } + },hashName:function(parentid, name) { + var hash = 0; + + + for (var i = 0; i < name.length; i++) { + hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; + } + return ((parentid + hash) >>> 0) % FS.nameTable.length; + },hashAddNode:function(node) { + var hash = FS.hashName(node.parent.id, node.name); + node.name_next = FS.nameTable[hash]; + FS.nameTable[hash] = node; + },hashRemoveNode:function(node) { + var hash = FS.hashName(node.parent.id, node.name); + if (FS.nameTable[hash] === node) { + FS.nameTable[hash] = node.name_next; + } else { + var current = FS.nameTable[hash]; + while (current) { + if (current.name_next === node) { + current.name_next = node.name_next; + break; + } + current = current.name_next; + } + } + },lookupNode:function(parent, name) { + var errCode = FS.mayLookup(parent); + if (errCode) { + throw new FS.ErrnoError(errCode, parent); + } + var hash = FS.hashName(parent.id, name); + for (var node = FS.nameTable[hash]; node; node = node.name_next) { + var nodeName = node.name; + if (node.parent.id === parent.id && nodeName === name) { + return node; + } + } + // if we failed to find it in the cache, call into the VFS + return FS.lookup(parent, name); + },createNode:function(parent, name, mode, rdev) { + var node = new FS.FSNode(parent, name, mode, rdev); + + FS.hashAddNode(node); + + return node; + },destroyNode:function(node) { + FS.hashRemoveNode(node); + },isRoot:function(node) { + return node === node.parent; + },isMountpoint:function(node) { + return !!node.mounted; + },isFile:function(mode) { + return (mode & 61440) === 32768; + },isDir:function(mode) { + return (mode & 61440) === 16384; + },isLink:function(mode) { + return (mode & 61440) === 40960; + },isChrdev:function(mode) { + return (mode & 61440) === 8192; + },isBlkdev:function(mode) { + return (mode & 61440) === 24576; + },isFIFO:function(mode) { + return (mode & 61440) === 4096; + },isSocket:function(mode) { + return (mode & 49152) === 49152; + },flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str) { + var flags = FS.flagModes[str]; + if (typeof flags === 'undefined') { + throw new Error('Unknown file open mode: ' + str); + } + return flags; + },flagsToPermissionString:function(flag) { + var perms = ['r', 'w', 'rw'][flag & 3]; + if ((flag & 512)) { + perms += 'w'; + } + return perms; + },nodePermissions:function(node, perms) { + if (FS.ignorePermissions) { + return 0; + } + // return 0 if any user, group or owner bits are set. + if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { + return 2; + } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { + return 2; + } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { + return 2; + } + return 0; + },mayLookup:function(dir) { + var errCode = FS.nodePermissions(dir, 'x'); + if (errCode) return errCode; + if (!dir.node_ops.lookup) return 2; + return 0; + },mayCreate:function(dir, name) { + try { + var node = FS.lookupNode(dir, name); + return 20; + } catch (e) { + } + return FS.nodePermissions(dir, 'wx'); + },mayDelete:function(dir, name, isdir) { + var node; + try { + node = FS.lookupNode(dir, name); + } catch (e) { + return e.errno; + } + var errCode = FS.nodePermissions(dir, 'wx'); + if (errCode) { + return errCode; + } + if (isdir) { + if (!FS.isDir(node.mode)) { + return 54; + } + if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { + return 10; + } + } else { + if (FS.isDir(node.mode)) { + return 31; + } + } + return 0; + },mayOpen:function(node, flags) { + if (!node) { + return 44; + } + if (FS.isLink(node.mode)) { + return 32; + } else if (FS.isDir(node.mode)) { + if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write + (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only) + return 31; + } + } + return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); + },MAX_OPEN_FDS:4096,nextfd:function(fd_start, fd_end) { + fd_start = fd_start || 0; + fd_end = fd_end || FS.MAX_OPEN_FDS; + for (var fd = fd_start; fd <= fd_end; fd++) { + if (!FS.streams[fd]) { + return fd; + } + } + throw new FS.ErrnoError(33); + },getStream:function(fd) { + return FS.streams[fd]; + },createStream:function(stream, fd_start, fd_end) { + if (!FS.FSStream) { + FS.FSStream = /** @constructor */ function(){}; + FS.FSStream.prototype = { + object: { + get: function() { return this.node; }, + set: function(val) { this.node = val; } + }, + isRead: { + get: function() { return (this.flags & 2097155) !== 1; } + }, + isWrite: { + get: function() { return (this.flags & 2097155) !== 0; } + }, + isAppend: { + get: function() { return (this.flags & 1024); } + } + }; + } + // clone it, so we can return an instance of FSStream + var newStream = new FS.FSStream(); + for (var p in stream) { + newStream[p] = stream[p]; + } + stream = newStream; + var fd = FS.nextfd(fd_start, fd_end); + stream.fd = fd; + FS.streams[fd] = stream; + return stream; + },closeStream:function(fd) { + FS.streams[fd] = null; + },chrdev_stream_ops:{open:function(stream) { + var device = FS.getDevice(stream.node.rdev); + // override node's stream ops with the device's + stream.stream_ops = device.stream_ops; + // forward the open call + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + },llseek:function() { + throw new FS.ErrnoError(70); + }},major:function(dev) { + return ((dev) >> 8); + },minor:function(dev) { + return ((dev) & 0xff); + },makedev:function(ma, mi) { + return ((ma) << 8 | (mi)); + },registerDevice:function(dev, ops) { + FS.devices[dev] = { stream_ops: ops }; + },getDevice:function(dev) { + return FS.devices[dev]; + },getMounts:function(mount) { + var mounts = []; + var check = [mount]; + + while (check.length) { + var m = check.pop(); + + mounts.push(m); + + check.push.apply(check, m.mounts); + } + + return mounts; + },syncfs:function(populate, callback) { + if (typeof(populate) === 'function') { + callback = populate; + populate = false; + } + + FS.syncFSRequests++; + + if (FS.syncFSRequests > 1) { + err('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work'); + } + + var mounts = FS.getMounts(FS.root.mount); + var completed = 0; + + function doCallback(errCode) { + FS.syncFSRequests--; + return callback(errCode); + } + + function done(errCode) { + if (errCode) { + if (!done.errored) { + done.errored = true; + return doCallback(errCode); + } + return; + } + if (++completed >= mounts.length) { + doCallback(null); + } + }; + + // sync all mounts + mounts.forEach(function (mount) { + if (!mount.type.syncfs) { + return done(null); + } + mount.type.syncfs(mount, populate, done); + }); + },mount:function(type, opts, mountpoint) { + var root = mountpoint === '/'; + var pseudo = !mountpoint; + var node; + + if (root && FS.root) { + throw new FS.ErrnoError(10); + } else if (!root && !pseudo) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + mountpoint = lookup.path; // use the absolute path + node = lookup.node; + + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + + if (!FS.isDir(node.mode)) { + throw new FS.ErrnoError(54); + } + } + + var mount = { + type: type, + opts: opts, + mountpoint: mountpoint, + mounts: [] + }; + + // create a root node for the fs + var mountRoot = type.mount(mount); + mountRoot.mount = mount; + mount.root = mountRoot; + + if (root) { + FS.root = mountRoot; + } else if (node) { + // set as a mountpoint + node.mounted = mount; + + // add the new mount to the current mount's children + if (node.mount) { + node.mount.mounts.push(mount); + } + } + + return mountRoot; + },unmount:function (mountpoint) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + if (!FS.isMountpoint(lookup.node)) { + throw new FS.ErrnoError(28); + } + + // destroy the nodes for this mount, and all its child mounts + var node = lookup.node; + var mount = node.mounted; + var mounts = FS.getMounts(mount); + + Object.keys(FS.nameTable).forEach(function (hash) { + var current = FS.nameTable[hash]; + + while (current) { + var next = current.name_next; + + if (mounts.indexOf(current.mount) !== -1) { + FS.destroyNode(current); + } + + current = next; + } + }); + + // no longer a mountpoint + node.mounted = null; + + // remove this mount from the child mounts + var idx = node.mount.mounts.indexOf(mount); + node.mount.mounts.splice(idx, 1); + },lookup:function(parent, name) { + return parent.node_ops.lookup(parent, name); + },mknod:function(path, mode, dev) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + if (!name || name === '.' || name === '..') { + throw new FS.ErrnoError(28); + } + var errCode = FS.mayCreate(parent, name); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.mknod) { + throw new FS.ErrnoError(63); + } + return parent.node_ops.mknod(parent, name, mode, dev); + },create:function(path, mode) { + mode = mode !== undefined ? mode : 438 /* 0666 */; + mode &= 4095; + mode |= 32768; + return FS.mknod(path, mode, 0); + },mkdir:function(path, mode) { + mode = mode !== undefined ? mode : 511 /* 0777 */; + mode &= 511 | 512; + mode |= 16384; + return FS.mknod(path, mode, 0); + },mkdirTree:function(path, mode) { + var dirs = path.split('/'); + var d = ''; + for (var i = 0; i < dirs.length; ++i) { + if (!dirs[i]) continue; + d += '/' + dirs[i]; + try { + FS.mkdir(d, mode); + } catch(e) { + if (e.errno != 20) throw e; + } + } + },mkdev:function(path, mode, dev) { + if (typeof(dev) === 'undefined') { + dev = mode; + mode = 438 /* 0666 */; + } + mode |= 8192; + return FS.mknod(path, mode, dev); + },symlink:function(oldpath, newpath) { + if (!PATH_FS.resolve(oldpath)) { + throw new FS.ErrnoError(44); + } + var lookup = FS.lookupPath(newpath, { parent: true }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(44); + } + var newname = PATH.basename(newpath); + var errCode = FS.mayCreate(parent, newname); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.symlink) { + throw new FS.ErrnoError(63); + } + return parent.node_ops.symlink(parent, newname, oldpath); + },rename:function(old_path, new_path) { + var old_dirname = PATH.dirname(old_path); + var new_dirname = PATH.dirname(new_path); + var old_name = PATH.basename(old_path); + var new_name = PATH.basename(new_path); + // parents must exist + var lookup, old_dir, new_dir; + try { + lookup = FS.lookupPath(old_path, { parent: true }); + old_dir = lookup.node; + lookup = FS.lookupPath(new_path, { parent: true }); + new_dir = lookup.node; + } catch (e) { + throw new FS.ErrnoError(10); + } + if (!old_dir || !new_dir) throw new FS.ErrnoError(44); + // need to be part of the same mount + if (old_dir.mount !== new_dir.mount) { + throw new FS.ErrnoError(75); + } + // source must exist + var old_node = FS.lookupNode(old_dir, old_name); + // old path should not be an ancestor of the new path + var relative = PATH_FS.relative(old_path, new_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(28); + } + // new path should not be an ancestor of the old path + relative = PATH_FS.relative(new_path, old_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(55); + } + // see if the new path already exists + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + // not fatal + } + // early out if nothing needs to change + if (old_node === new_node) { + return; + } + // we'll need to delete the old entry + var isdir = FS.isDir(old_node.mode); + var errCode = FS.mayDelete(old_dir, old_name, isdir); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + // need delete permissions if we'll be overwriting. + // need create permissions if new doesn't already exist. + errCode = new_node ? + FS.mayDelete(new_dir, new_name, isdir) : + FS.mayCreate(new_dir, new_name); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!old_dir.node_ops.rename) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { + throw new FS.ErrnoError(10); + } + // if we are going to change the parent, check write permissions + if (new_dir !== old_dir) { + errCode = FS.nodePermissions(old_dir, 'w'); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + } + try { + if (FS.trackingDelegate['willMovePath']) { + FS.trackingDelegate['willMovePath'](old_path, new_path); + } + } catch(e) { + err("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); + } + // remove the node from the lookup hash + FS.hashRemoveNode(old_node); + // do the underlying fs rename + try { + old_dir.node_ops.rename(old_node, new_dir, new_name); + } catch (e) { + throw e; + } finally { + // add the node back to the hash (in case node_ops.rename + // changed its name) + FS.hashAddNode(old_node); + } + try { + if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path); + } catch(e) { + err("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); + } + },rmdir:function(path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var errCode = FS.mayDelete(parent, name, true); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.rmdir) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch(e) { + err("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); + } + parent.node_ops.rmdir(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch(e) { + err("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); + } + },readdir:function(path) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + if (!node.node_ops.readdir) { + throw new FS.ErrnoError(54); + } + return node.node_ops.readdir(node); + },unlink:function(path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var errCode = FS.mayDelete(parent, name, false); + if (errCode) { + // According to POSIX, we should map EISDIR to EPERM, but + // we instead do what Linux does (and we must, as we use + // the musl linux libc). + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.unlink) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch(e) { + err("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); + } + parent.node_ops.unlink(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch(e) { + err("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); + } + },readlink:function(path) { + var lookup = FS.lookupPath(path); + var link = lookup.node; + if (!link) { + throw new FS.ErrnoError(44); + } + if (!link.node_ops.readlink) { + throw new FS.ErrnoError(28); + } + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); + },stat:function(path, dontFollow) { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + var node = lookup.node; + if (!node) { + throw new FS.ErrnoError(44); + } + if (!node.node_ops.getattr) { + throw new FS.ErrnoError(63); + } + return node.node_ops.getattr(node); + },lstat:function(path) { + return FS.stat(path, true); + },chmod:function(path, mode, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + node.node_ops.setattr(node, { + mode: (mode & 4095) | (node.mode & ~4095), + timestamp: Date.now() + }); + },lchmod:function(path, mode) { + FS.chmod(path, mode, true); + },fchmod:function(fd, mode) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + FS.chmod(stream.node, mode); + },chown:function(path, uid, gid, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + node.node_ops.setattr(node, { + timestamp: Date.now() + // we ignore the uid / gid for now + }); + },lchown:function(path, uid, gid) { + FS.chown(path, uid, gid, true); + },fchown:function(fd, uid, gid) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + FS.chown(stream.node, uid, gid); + },truncate:function(path, len) { + if (len < 0) { + throw new FS.ErrnoError(28); + } + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + if (FS.isDir(node.mode)) { + throw new FS.ErrnoError(31); + } + if (!FS.isFile(node.mode)) { + throw new FS.ErrnoError(28); + } + var errCode = FS.nodePermissions(node, 'w'); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + node.node_ops.setattr(node, { + size: len, + timestamp: Date.now() + }); + },ftruncate:function(fd, len) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(28); + } + FS.truncate(stream.node, len); + },utime:function(path, atime, mtime) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + node.node_ops.setattr(node, { + timestamp: Math.max(atime, mtime) + }); + },open:function(path, flags, mode, fd_start, fd_end) { + if (path === "") { + throw new FS.ErrnoError(44); + } + flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; + mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; + if ((flags & 64)) { + mode = (mode & 4095) | 32768; + } else { + mode = 0; + } + var node; + if (typeof path === 'object') { + node = path; + } else { + path = PATH.normalize(path); + try { + var lookup = FS.lookupPath(path, { + follow: !(flags & 131072) + }); + node = lookup.node; + } catch (e) { + // ignore + } + } + // perhaps we need to create the node + var created = false; + if ((flags & 64)) { + if (node) { + // if O_CREAT and O_EXCL are set, error out if the node already exists + if ((flags & 128)) { + throw new FS.ErrnoError(20); + } + } else { + // node doesn't exist, try to create it + node = FS.mknod(path, mode, 0); + created = true; + } + } + if (!node) { + throw new FS.ErrnoError(44); + } + // can't truncate a device + if (FS.isChrdev(node.mode)) { + flags &= ~512; + } + // if asked only for a directory, then this must be one + if ((flags & 65536) && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(54); + } + // check permissions, if this is not a file we just created now (it is ok to + // create and write to a file with read-only permissions; it is read-only + // for later use) + if (!created) { + var errCode = FS.mayOpen(node, flags); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + } + // do truncation if necessary + if ((flags & 512)) { + FS.truncate(node, 0); + } + // we've already handled these, don't pass down to the underlying vfs + flags &= ~(128 | 512 | 131072); + + // register the stream with the filesystem + var stream = FS.createStream({ + node: node, + path: FS.getPath(node), // we want the absolute path to the node + flags: flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + // used by the file family libc calls (fopen, fwrite, ferror, etc.) + ungotten: [], + error: false + }, fd_start, fd_end); + // call the new stream's open function + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + if (Module['logReadFiles'] && !(flags & 1)) { + if (!FS.readFiles) FS.readFiles = {}; + if (!(path in FS.readFiles)) { + FS.readFiles[path] = 1; + err("FS.trackingDelegate error on read file: " + path); + } + } + try { + if (FS.trackingDelegate['onOpenFile']) { + var trackingFlags = 0; + if ((flags & 2097155) !== 1) { + trackingFlags |= FS.tracking.openFlags.READ; + } + if ((flags & 2097155) !== 0) { + trackingFlags |= FS.tracking.openFlags.WRITE; + } + FS.trackingDelegate['onOpenFile'](path, trackingFlags); + } + } catch(e) { + err("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message); + } + return stream; + },close:function(stream) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (stream.getdents) stream.getdents = null; // free readdir state + try { + if (stream.stream_ops.close) { + stream.stream_ops.close(stream); + } + } catch (e) { + throw e; + } finally { + FS.closeStream(stream.fd); + } + stream.fd = null; + },isClosed:function(stream) { + return stream.fd === null; + },llseek:function(stream, offset, whence) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (!stream.seekable || !stream.stream_ops.llseek) { + throw new FS.ErrnoError(70); + } + if (whence != 0 && whence != 1 && whence != 2) { + throw new FS.ErrnoError(28); + } + stream.position = stream.stream_ops.llseek(stream, offset, whence); + stream.ungotten = []; + return stream.position; + },read:function(stream, buffer, offset, length, position) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(8); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31); + } + if (!stream.stream_ops.read) { + throw new FS.ErrnoError(28); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(70); + } + var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); + if (!seeking) stream.position += bytesRead; + return bytesRead; + },write:function(stream, buffer, offset, length, position, canOwn) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31); + } + if (!stream.stream_ops.write) { + throw new FS.ErrnoError(28); + } + if (stream.seekable && stream.flags & 1024) { + // seek to the end before writing in append mode + FS.llseek(stream, 0, 2); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(70); + } + var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); + if (!seeking) stream.position += bytesWritten; + try { + if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path); + } catch(e) { + err("FS.trackingDelegate['onWriteToFile']('"+stream.path+"') threw an exception: " + e.message); + } + return bytesWritten; + },allocate:function(stream, offset, length) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (offset < 0 || length <= 0) { + throw new FS.ErrnoError(28); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8); + } + if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + if (!stream.stream_ops.allocate) { + throw new FS.ErrnoError(138); + } + stream.stream_ops.allocate(stream, offset, length); + },mmap:function(stream, address, length, position, prot, flags) { + // User requests writing to file (prot & PROT_WRITE != 0). + // Checking if we have permissions to write to the file unless + // MAP_PRIVATE flag is set. According to POSIX spec it is possible + // to write to file opened in read-only mode with MAP_PRIVATE flag, + // as all modifications will be visible only in the memory of + // the current process. + if ((prot & 2) !== 0 + && (flags & 2) === 0 + && (stream.flags & 2097155) !== 2) { + throw new FS.ErrnoError(2); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(2); + } + if (!stream.stream_ops.mmap) { + throw new FS.ErrnoError(43); + } + return stream.stream_ops.mmap(stream, address, length, position, prot, flags); + },msync:function(stream, buffer, offset, length, mmapFlags) { + if (!stream || !stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + },munmap:function(stream) { + return 0; + },ioctl:function(stream, cmd, arg) { + if (!stream.stream_ops.ioctl) { + throw new FS.ErrnoError(59); + } + return stream.stream_ops.ioctl(stream, cmd, arg); + },readFile:function(path, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'r'; + opts.encoding = opts.encoding || 'binary'; + if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { + throw new Error('Invalid encoding type "' + opts.encoding + '"'); + } + var ret; + var stream = FS.open(path, opts.flags); + var stat = FS.stat(path); + var length = stat.size; + var buf = new Uint8Array(length); + FS.read(stream, buf, 0, length, 0); + if (opts.encoding === 'utf8') { + ret = UTF8ArrayToString(buf, 0); + } else if (opts.encoding === 'binary') { + ret = buf; + } + FS.close(stream); + return ret; + },writeFile:function(path, data, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'w'; + var stream = FS.open(path, opts.flags, opts.mode); + if (typeof data === 'string') { + var buf = new Uint8Array(lengthBytesUTF8(data)+1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); + } else if (ArrayBuffer.isView(data)) { + FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); + } else { + throw new Error('Unsupported data type'); + } + FS.close(stream); + },cwd:function() { + return FS.currentPath; + },chdir:function(path) { + var lookup = FS.lookupPath(path, { follow: true }); + if (lookup.node === null) { + throw new FS.ErrnoError(44); + } + if (!FS.isDir(lookup.node.mode)) { + throw new FS.ErrnoError(54); + } + var errCode = FS.nodePermissions(lookup.node, 'x'); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + FS.currentPath = lookup.path; + },createDefaultDirectories:function() { + FS.mkdir('/tmp'); + FS.mkdir('/home'); + FS.mkdir('/home/web_user'); + },createDefaultDevices:function() { + // create /dev + FS.mkdir('/dev'); + // setup /dev/null + FS.registerDevice(FS.makedev(1, 3), { + read: function() { return 0; }, + write: function(stream, buffer, offset, length, pos) { return length; } + }); + FS.mkdev('/dev/null', FS.makedev(1, 3)); + // setup /dev/tty and /dev/tty1 + // stderr needs to print output using Module['printErr'] + // so we register a second tty just for it. + TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); + TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); + FS.mkdev('/dev/tty', FS.makedev(5, 0)); + FS.mkdev('/dev/tty1', FS.makedev(6, 0)); + // setup /dev/[u]random + var random_device; + if (typeof crypto === 'object' && typeof crypto['getRandomValues'] === 'function') { + // for modern web browsers + var randomBuffer = new Uint8Array(1); + random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; + } else + if (ENVIRONMENT_IS_NODE) { + // for nodejs with or without crypto support included + try { + var crypto_module = require('crypto'); + // nodejs has crypto support + random_device = function() { return crypto_module['randomBytes'](1)[0]; }; + } catch (e) { + // nodejs doesn't have crypto support + } + } else + {} + if (!random_device) { + // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096 + random_device = function() { abort("random_device"); }; + } + FS.createDevice('/dev', 'random', random_device); + FS.createDevice('/dev', 'urandom', random_device); + // we're not going to emulate the actual shm device, + // just create the tmp dirs that reside in it commonly + FS.mkdir('/dev/shm'); + FS.mkdir('/dev/shm/tmp'); + },createSpecialDirectories:function() { + // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) + FS.mkdir('/proc'); + FS.mkdir('/proc/self'); + FS.mkdir('/proc/self/fd'); + FS.mount({ + mount: function() { + var node = FS.createNode('/proc/self', 'fd', 16384 | 511 /* 0777 */, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(8); + var ret = { + parent: null, + mount: { mountpoint: 'fake' }, + node_ops: { readlink: function() { return stream.path } } + }; + ret.parent = ret; // make it look like a simple root node + return ret; + } + }; + return node; + } + }, {}, '/proc/self/fd'); + },createStandardStreams:function() { + // TODO deprecate the old functionality of a single + // input / output callback and that utilizes FS.createDevice + // and instead require a unique set of stream ops + + // by default, we symlink the standard streams to the + // default tty devices. however, if the standard streams + // have been overwritten we create a unique device for + // them instead. + if (Module['stdin']) { + FS.createDevice('/dev', 'stdin', Module['stdin']); + } else { + FS.symlink('/dev/tty', '/dev/stdin'); + } + if (Module['stdout']) { + FS.createDevice('/dev', 'stdout', null, Module['stdout']); + } else { + FS.symlink('/dev/tty', '/dev/stdout'); + } + if (Module['stderr']) { + FS.createDevice('/dev', 'stderr', null, Module['stderr']); + } else { + FS.symlink('/dev/tty1', '/dev/stderr'); + } + + // open default streams for the stdin, stdout and stderr devices + var stdin = FS.open('/dev/stdin', 'r'); + var stdout = FS.open('/dev/stdout', 'w'); + var stderr = FS.open('/dev/stderr', 'w'); + },ensureErrnoError:function() { + if (FS.ErrnoError) return; + FS.ErrnoError = /** @this{Object} */ function ErrnoError(errno, node) { + this.node = node; + this.setErrno = /** @this{Object} */ function(errno) { + this.errno = errno; + }; + this.setErrno(errno); + this.message = 'FS error'; + + }; + FS.ErrnoError.prototype = new Error(); + FS.ErrnoError.prototype.constructor = FS.ErrnoError; + // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) + [44].forEach(function(code) { + FS.genericErrors[code] = new FS.ErrnoError(code); + FS.genericErrors[code].stack = ''; + }); + },staticInit:function() { + FS.ensureErrnoError(); + + FS.nameTable = new Array(4096); + + FS.mount(MEMFS, {}, '/'); + + FS.createDefaultDirectories(); + FS.createDefaultDevices(); + FS.createSpecialDirectories(); + + FS.filesystems = { + 'MEMFS': MEMFS, + }; + },init:function(input, output, error) { + FS.init.initialized = true; + + FS.ensureErrnoError(); + + // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here + Module['stdin'] = input || Module['stdin']; + Module['stdout'] = output || Module['stdout']; + Module['stderr'] = error || Module['stderr']; + + FS.createStandardStreams(); + },quit:function() { + FS.init.initialized = false; + // force-flush all streams, so we get musl std streams printed out + var fflush = Module['_fflush']; + if (fflush) fflush(0); + // close all of our streams + for (var i = 0; i < FS.streams.length; i++) { + var stream = FS.streams[i]; + if (!stream) { + continue; + } + FS.close(stream); + } + },getMode:function(canRead, canWrite) { + var mode = 0; + if (canRead) mode |= 292 | 73; + if (canWrite) mode |= 146; + return mode; + },joinPath:function(parts, forceRelative) { + var path = PATH.join.apply(null, parts); + if (forceRelative && path[0] == '/') path = path.substr(1); + return path; + },absolutePath:function(relative, base) { + return PATH_FS.resolve(base, relative); + },standardizePath:function(path) { + return PATH.normalize(path); + },findObject:function(path, dontResolveLastLink) { + var ret = FS.analyzePath(path, dontResolveLastLink); + if (ret.exists) { + return ret.object; + } else { + setErrNo(ret.error); + return null; + } + },analyzePath:function(path, dontResolveLastLink) { + // operate from within the context of the symlink's target + try { + var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + path = lookup.path; + } catch (e) { + } + var ret = { + isRoot: false, exists: false, error: 0, name: null, path: null, object: null, + parentExists: false, parentPath: null, parentObject: null + }; + try { + var lookup = FS.lookupPath(path, { parent: true }); + ret.parentExists = true; + ret.parentPath = lookup.path; + ret.parentObject = lookup.node; + ret.name = PATH.basename(path); + lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + ret.exists = true; + ret.path = lookup.path; + ret.object = lookup.node; + ret.name = lookup.node.name; + ret.isRoot = lookup.path === '/'; + } catch (e) { + ret.error = e.errno; + }; + return ret; + },createFolder:function(parent, name, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.mkdir(path, mode); + },createPath:function(parent, path, canRead, canWrite) { + parent = typeof parent === 'string' ? parent : FS.getPath(parent); + var parts = path.split('/').reverse(); + while (parts.length) { + var part = parts.pop(); + if (!part) continue; + var current = PATH.join2(parent, part); + try { + FS.mkdir(current); + } catch (e) { + // ignore EEXIST + } + parent = current; + } + return current; + },createFile:function(parent, name, properties, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.create(path, mode); + },createDataFile:function(parent, name, data, canRead, canWrite, canOwn) { + var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; + var mode = FS.getMode(canRead, canWrite); + var node = FS.create(path, mode); + if (data) { + if (typeof data === 'string') { + var arr = new Array(data.length); + for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); + data = arr; + } + // make sure we can write to the file + FS.chmod(node, mode | 146); + var stream = FS.open(node, 'w'); + FS.write(stream, data, 0, data.length, 0, canOwn); + FS.close(stream); + FS.chmod(node, mode); + } + return node; + },createDevice:function(parent, name, input, output) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(!!input, !!output); + if (!FS.createDevice.major) FS.createDevice.major = 64; + var dev = FS.makedev(FS.createDevice.major++, 0); + // Create a fake device that a set of stream ops to emulate + // the old behavior. + FS.registerDevice(dev, { + open: function(stream) { + stream.seekable = false; + }, + close: function(stream) { + // flush any pending line data + if (output && output.buffer && output.buffer.length) { + output(10); + } + }, + read: function(stream, buffer, offset, length, pos /* ignored */) { + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = input(); + } catch (e) { + throw new FS.ErrnoError(29); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset+i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: function(stream, buffer, offset, length, pos) { + for (var i = 0; i < length; i++) { + try { + output(buffer[offset+i]); + } catch (e) { + throw new FS.ErrnoError(29); + } + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }); + return FS.mkdev(path, mode, dev); + },createLink:function(parent, name, target, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + return FS.symlink(target, path); + },forceLoadFile:function(obj) { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; + var success = true; + if (typeof XMLHttpRequest !== 'undefined') { + throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); + } else if (read_) { + // Command-line. + try { + // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as + // read() will try to parse UTF8. + obj.contents = intArrayFromString(read_(obj.url), true); + obj.usedBytes = obj.contents.length; + } catch (e) { + success = false; + } + } else { + throw new Error('Cannot load without read() or XMLHttpRequest.'); + } + if (!success) setErrNo(29); + return success; + },createLazyFile:function(parent, name, url, canRead, canWrite) { + // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. + /** @constructor */ + function LazyUint8Array() { + this.lengthKnown = false; + this.chunks = []; // Loaded chunks. Index is the chunk number + } + LazyUint8Array.prototype.get = /** @this{Object} */ function LazyUint8Array_get(idx) { + if (idx > this.length-1 || idx < 0) { + return undefined; + } + var chunkOffset = idx % this.chunkSize; + var chunkNum = (idx / this.chunkSize)|0; + return this.getter(chunkNum)[chunkOffset]; + }; + LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { + this.getter = getter; + }; + LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { + // Find length + var xhr = new XMLHttpRequest(); + xhr.open('HEAD', url, false); + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + var datalength = Number(xhr.getResponseHeader("Content-length")); + var header; + var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; + var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; + + var chunkSize = 1024*1024; // Chunk size in bytes + + if (!hasByteServing) chunkSize = datalength; + + // Function to get a range from the remote URL. + var doXHR = (function(from, to) { + if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); + if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); + + // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); + + // Some hints to the browser that we want binary data. + if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; + if (xhr.overrideMimeType) { + xhr.overrideMimeType('text/plain; charset=x-user-defined'); + } + + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + if (xhr.response !== undefined) { + return new Uint8Array(/** @type{Array} */(xhr.response || [])); + } else { + return intArrayFromString(xhr.responseText || '', true); + } + }); + var lazyArray = this; + lazyArray.setDataGetter(function(chunkNum) { + var start = chunkNum * chunkSize; + var end = (chunkNum+1) * chunkSize - 1; // including this byte + end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block + if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { + lazyArray.chunks[chunkNum] = doXHR(start, end); + } + if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); + return lazyArray.chunks[chunkNum]; + }); + + if (usesGzip || !datalength) { + // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length + chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file + datalength = this.getter(0).length; + chunkSize = datalength; + out("LazyFiles on gzip forces download of the whole file when length is accessed"); + } + + this._length = datalength; + this._chunkSize = chunkSize; + this.lengthKnown = true; + }; + if (typeof XMLHttpRequest !== 'undefined') { + if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; + var lazyArray = new LazyUint8Array(); + Object.defineProperties(lazyArray, { + length: { + get: /** @this{Object} */ function() { + if(!this.lengthKnown) { + this.cacheLength(); + } + return this._length; + } + }, + chunkSize: { + get: /** @this{Object} */ function() { + if(!this.lengthKnown) { + this.cacheLength(); + } + return this._chunkSize; + } + } + }); + + var properties = { isDevice: false, contents: lazyArray }; + } else { + var properties = { isDevice: false, url: url }; + } + + var node = FS.createFile(parent, name, properties, canRead, canWrite); + // This is a total hack, but I want to get this lazy file code out of the + // core of MEMFS. If we want to keep this lazy file concept I feel it should + // be its own thin LAZYFS proxying calls to MEMFS. + if (properties.contents) { + node.contents = properties.contents; + } else if (properties.url) { + node.contents = null; + node.url = properties.url; + } + // Add a function that defers querying the file size until it is asked the first time. + Object.defineProperties(node, { + usedBytes: { + get: /** @this {FSNode} */ function() { return this.contents.length; } + } + }); + // override each stream op with one that tries to force load the lazy file first + var stream_ops = {}; + var keys = Object.keys(node.stream_ops); + keys.forEach(function(key) { + var fn = node.stream_ops[key]; + stream_ops[key] = function forceLoadLazyFile() { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(29); + } + return fn.apply(null, arguments); + }; + }); + // use a custom read function + stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(29); + } + var contents = stream.node.contents; + if (position >= contents.length) + return 0; + var size = Math.min(contents.length - position, length); + if (contents.slice) { // normal array + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents[position + i]; + } + } else { + for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR + buffer[offset + i] = contents.get(position + i); + } + } + return size; + }; + node.stream_ops = stream_ops; + return node; + },createPreloadedFile:function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { + Browser.init(); // XXX perhaps this method should move onto Browser? + // TODO we should allow people to just pass in a complete filename instead + // of parent and name being that we just join them anyways + var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname + function processData(byteArray) { + function finish(byteArray) { + if (preFinish) preFinish(); + if (!dontCreateFile) { + FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); + } + if (onload) onload(); + removeRunDependency(dep); + } + var handled = false; + Module['preloadPlugins'].forEach(function(plugin) { + if (handled) return; + if (plugin['canHandle'](fullname)) { + plugin['handle'](byteArray, fullname, finish, function() { + if (onerror) onerror(); + removeRunDependency(dep); + }); + handled = true; + } + }); + if (!handled) finish(byteArray); + } + addRunDependency(dep); + if (typeof url == 'string') { + Browser.asyncLoad(url, function(byteArray) { + processData(byteArray); + }, onerror); + } else { + processData(url); + } + },indexedDB:function() { + return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + },DB_NAME:function() { + return 'EM_FS_' + window.location.pathname; + },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(paths, onload, onerror) { + onload = onload || function(){}; + onerror = onerror || function(){}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { + out('creating db'); + var db = openRequest.result; + db.createObjectStore(FS.DB_STORE_NAME); + }; + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var putRequest = files.put(FS.analyzePath(path).object.contents, path); + putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; + putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + },loadFilesFromDB:function(paths, onload, onerror) { + onload = onload || function(){}; + onerror = onerror || function(){}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = onerror; // no database to load from + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + try { + var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); + } catch(e) { + onerror(e); + return; + } + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var getRequest = files.get(path); + getRequest.onsuccess = function getRequest_onsuccess() { + if (FS.analyzePath(path).exists) { + FS.unlink(path); + } + FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); + ok++; + if (ok + fail == total) finish(); + }; + getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + }};var SYSCALLS={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(dirfd, path) { + if (path[0] !== '/') { + // relative path + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = FS.getStream(dirfd); + if (!dirstream) throw new FS.ErrnoError(8); + dir = dirstream.path; + } + path = PATH.join2(dir, path); + } + return path; + },doStat:function(func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + // an error occurred while trying to look up the path; we should just report ENOTDIR + return -54; + } + throw e; + } + HEAP32[((buf)>>2)]=stat.dev; + HEAP32[(((buf)+(4))>>2)]=0; + HEAP32[(((buf)+(8))>>2)]=stat.ino; + HEAP32[(((buf)+(12))>>2)]=stat.mode; + HEAP32[(((buf)+(16))>>2)]=stat.nlink; + HEAP32[(((buf)+(20))>>2)]=stat.uid; + HEAP32[(((buf)+(24))>>2)]=stat.gid; + HEAP32[(((buf)+(28))>>2)]=stat.rdev; + HEAP32[(((buf)+(32))>>2)]=0; + (tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(40))>>2)]=tempI64[0],HEAP32[(((buf)+(44))>>2)]=tempI64[1]); + HEAP32[(((buf)+(48))>>2)]=4096; + HEAP32[(((buf)+(52))>>2)]=stat.blocks; + HEAP32[(((buf)+(56))>>2)]=(stat.atime.getTime() / 1000)|0; + HEAP32[(((buf)+(60))>>2)]=0; + HEAP32[(((buf)+(64))>>2)]=(stat.mtime.getTime() / 1000)|0; + HEAP32[(((buf)+(68))>>2)]=0; + HEAP32[(((buf)+(72))>>2)]=(stat.ctime.getTime() / 1000)|0; + HEAP32[(((buf)+(76))>>2)]=0; + (tempI64 = [stat.ino>>>0,(tempDouble=stat.ino,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(80))>>2)]=tempI64[0],HEAP32[(((buf)+(84))>>2)]=tempI64[1]); + return 0; + },doMsync:function(addr, stream, len, flags, offset) { + var buffer = HEAPU8.slice(addr, addr + len); + FS.msync(stream, buffer, offset, len, flags); + },doMkdir:function(path, mode) { + // remove a trailing slash, if one - /a/b/ has basename of '', but + // we want to create b in the context of this function + path = PATH.normalize(path); + if (path[path.length-1] === '/') path = path.substr(0, path.length-1); + FS.mkdir(path, mode, 0); + return 0; + },doMknod:function(path, mode, dev) { + // we don't want this in the JS API as it uses mknod to create all nodes. + switch (mode & 61440) { + case 32768: + case 8192: + case 24576: + case 4096: + case 49152: + break; + default: return -28; + } + FS.mknod(path, mode, dev); + return 0; + },doReadlink:function(path, buf, bufsize) { + if (bufsize <= 0) return -28; + var ret = FS.readlink(path); + + var len = Math.min(bufsize, lengthBytesUTF8(ret)); + var endChar = HEAP8[buf+len]; + stringToUTF8(ret, buf, bufsize+1); + // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!) + // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write. + HEAP8[buf+len] = endChar; + + return len; + },doAccess:function(path, amode) { + if (amode & ~7) { + // need a valid mode + return -28; + } + var node; + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + if (!node) { + return -44; + } + var perms = ''; + if (amode & 4) perms += 'r'; + if (amode & 2) perms += 'w'; + if (amode & 1) perms += 'x'; + if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { + return -2; + } + return 0; + },doDup:function(path, flags, suggestFD) { + var suggest = FS.getStream(suggestFD); + if (suggest) FS.close(suggest); + return FS.open(path, flags, 0, suggestFD, suggestFD).fd; + },doReadv:function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.read(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; // nothing more to read + } + return ret; + },doWritev:function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.write(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + } + return ret; + },varargs:undefined,get:function() { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function(ptr) { + var ret = UTF8ToString(ptr); + return ret; + },getStreamFromFD:function(fd) { + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(8); + return stream; + },get64:function(low, high) { + return low; + }};function _fd_close(fd) {try { + + var stream = SYSCALLS.getStreamFromFD(fd); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return e.errno; + } + } + + function _fd_read(fd, iov, iovcnt, pnum) {try { + + var stream = SYSCALLS.getStreamFromFD(fd); + var num = SYSCALLS.doReadv(stream, iov, iovcnt); + HEAP32[((pnum)>>2)]=num + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return e.errno; + } + } + + function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {try { + + + var stream = SYSCALLS.getStreamFromFD(fd); + var HIGH_OFFSET = 0x100000000; // 2^32 + // use an unsigned operator on low and shift high by 32-bits + var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0); + + var DOUBLE_LIMIT = 0x20000000000000; // 2^53 + // we also check for equality since DOUBLE_LIMIT + 1 == DOUBLE_LIMIT + if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) { + return -61; + } + + FS.llseek(stream, offset, whence); + (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((newOffset)>>2)]=tempI64[0],HEAP32[(((newOffset)+(4))>>2)]=tempI64[1]); + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return e.errno; + } + } + + function _fd_write(fd, iov, iovcnt, pnum) {try { + + var stream = SYSCALLS.getStreamFromFD(fd); + var num = SYSCALLS.doWritev(stream, iov, iovcnt); + HEAP32[((pnum)>>2)]=num + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return e.errno; + } + } + + + function _round(d) { + d = +d; + return d >= +0 ? +Math_floor(d + +0.5) : +Math_ceil(d - +0.5); + } + + function _setTempRet0($i) { + setTempRet0(($i) | 0); + } +var FSNode = /** @constructor */ function(parent, name, mode, rdev) { + if (!parent) { + parent = this; // root node sets parent to itself + } + this.parent = parent; + this.mount = parent.mount; + this.mounted = null; + this.id = FS.nextInode++; + this.name = name; + this.mode = mode; + this.node_ops = {}; + this.stream_ops = {}; + this.rdev = rdev; + }; + var readMode = 292/*292*/ | 73/*73*/; + var writeMode = 146/*146*/; + Object.defineProperties(FSNode.prototype, { + read: { + get: /** @this{FSNode} */function() { + return (this.mode & readMode) === readMode; + }, + set: /** @this{FSNode} */function(val) { + val ? this.mode |= readMode : this.mode &= ~readMode; + } + }, + write: { + get: /** @this{FSNode} */function() { + return (this.mode & writeMode) === writeMode; + }, + set: /** @this{FSNode} */function(val) { + val ? this.mode |= writeMode : this.mode &= ~writeMode; + } + }, + isFolder: { + get: /** @this{FSNode} */function() { + return FS.isDir(this.mode); + } + }, + isDevice: { + get: /** @this{FSNode} */function() { + return FS.isChrdev(this.mode); + } + } + }); + FS.FSNode = FSNode; + FS.staticInit();; +var ASSERTIONS = false; + + + +/** @type {function(string, boolean=, number=)} */ +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + if (ASSERTIONS) { + assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); + } + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} + + +// Copied from https://github.com/strophe/strophejs/blob/e06d027/src/polyfills.js#L149 + +// This code was written by Tyler Akins and has been placed in the +// public domain. It would be nice if you left this header intact. +// Base64 code from Tyler Akins -- http://rumkin.com + +/** + * Decodes a base64 string. + * @param {string} input The string to decode. + */ +var decodeBase64 = typeof atob === 'function' ? atob : function (input) { + var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + var output = ''; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + // remove all characters that are not A-Z, a-z, 0-9, +, /, or = + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); + do { + enc1 = keyStr.indexOf(input.charAt(i++)); + enc2 = keyStr.indexOf(input.charAt(i++)); + enc3 = keyStr.indexOf(input.charAt(i++)); + enc4 = keyStr.indexOf(input.charAt(i++)); + + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + + output = output + String.fromCharCode(chr1); + + if (enc3 !== 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 !== 64) { + output = output + String.fromCharCode(chr3); + } + } while (i < input.length); + return output; +}; + +// Converts a string of base64 into a byte array. +// Throws error on invalid input. +function intArrayFromBase64(s) { + if (typeof ENVIRONMENT_IS_NODE === 'boolean' && ENVIRONMENT_IS_NODE) { + var buf; + try { + // TODO: Update Node.js externs, Closure does not recognize the following Buffer.from() + /**@suppress{checkTypes}*/ + buf = Buffer.from(s, 'base64'); + } catch (_) { + buf = new Buffer(s, 'base64'); + } + return new Uint8Array(buf['buffer'], buf['byteOffset'], buf['byteLength']); + } + + try { + var decoded = decodeBase64(s); + var bytes = new Uint8Array(decoded.length); + for (var i = 0 ; i < decoded.length ; ++i) { + bytes[i] = decoded.charCodeAt(i); + } + return bytes; + } catch (_) { + throw new Error('Converting base64 string to bytes failed.'); + } +} + +// If filename is a base64 data URI, parses and returns data (Buffer on node, +// Uint8Array otherwise). If filename is not a base64 data URI, returns undefined. +function tryParseAsDataURI(filename) { + if (!isDataURI(filename)) { + return; + } + + return intArrayFromBase64(filename.slice(dataURIPrefix.length)); +} + + +// ASM_LIBRARY EXTERN PRIMITIVES: Math_floor,Math_ceil + +var asmGlobalArg = {}; +var asmLibraryArg = { "emscripten_get_sbrk_ptr": _emscripten_get_sbrk_ptr, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "fd_close": _fd_close, "fd_read": _fd_read, "fd_seek": _fd_seek, "fd_write": _fd_write, "getTempRet0": getTempRet0, "memory": wasmMemory, "round": _round, "setTempRet0": setTempRet0, "table": wasmTable }; +var asm = createWasm(); +/** @type {function(...*):?} */ +var ___wasm_call_ctors = Module["___wasm_call_ctors"] = function() { + return (___wasm_call_ctors = Module["___wasm_call_ctors"] = Module["asm"]["__wasm_call_ctors"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_new = Module["_FLAC__stream_decoder_new"] = function() { + return (_FLAC__stream_decoder_new = Module["_FLAC__stream_decoder_new"] = Module["asm"]["FLAC__stream_decoder_new"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_delete = Module["_FLAC__stream_decoder_delete"] = function() { + return (_FLAC__stream_decoder_delete = Module["_FLAC__stream_decoder_delete"] = Module["asm"]["FLAC__stream_decoder_delete"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_finish = Module["_FLAC__stream_decoder_finish"] = function() { + return (_FLAC__stream_decoder_finish = Module["_FLAC__stream_decoder_finish"] = Module["asm"]["FLAC__stream_decoder_finish"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_init_stream = Module["_FLAC__stream_decoder_init_stream"] = function() { + return (_FLAC__stream_decoder_init_stream = Module["_FLAC__stream_decoder_init_stream"] = Module["asm"]["FLAC__stream_decoder_init_stream"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_reset = Module["_FLAC__stream_decoder_reset"] = function() { + return (_FLAC__stream_decoder_reset = Module["_FLAC__stream_decoder_reset"] = Module["asm"]["FLAC__stream_decoder_reset"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_init_ogg_stream = Module["_FLAC__stream_decoder_init_ogg_stream"] = function() { + return (_FLAC__stream_decoder_init_ogg_stream = Module["_FLAC__stream_decoder_init_ogg_stream"] = Module["asm"]["FLAC__stream_decoder_init_ogg_stream"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_set_ogg_serial_number = Module["_FLAC__stream_decoder_set_ogg_serial_number"] = function() { + return (_FLAC__stream_decoder_set_ogg_serial_number = Module["_FLAC__stream_decoder_set_ogg_serial_number"] = Module["asm"]["FLAC__stream_decoder_set_ogg_serial_number"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_set_md5_checking = Module["_FLAC__stream_decoder_set_md5_checking"] = function() { + return (_FLAC__stream_decoder_set_md5_checking = Module["_FLAC__stream_decoder_set_md5_checking"] = Module["asm"]["FLAC__stream_decoder_set_md5_checking"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_set_metadata_respond = Module["_FLAC__stream_decoder_set_metadata_respond"] = function() { + return (_FLAC__stream_decoder_set_metadata_respond = Module["_FLAC__stream_decoder_set_metadata_respond"] = Module["asm"]["FLAC__stream_decoder_set_metadata_respond"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_set_metadata_respond_application = Module["_FLAC__stream_decoder_set_metadata_respond_application"] = function() { + return (_FLAC__stream_decoder_set_metadata_respond_application = Module["_FLAC__stream_decoder_set_metadata_respond_application"] = Module["asm"]["FLAC__stream_decoder_set_metadata_respond_application"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_set_metadata_respond_all = Module["_FLAC__stream_decoder_set_metadata_respond_all"] = function() { + return (_FLAC__stream_decoder_set_metadata_respond_all = Module["_FLAC__stream_decoder_set_metadata_respond_all"] = Module["asm"]["FLAC__stream_decoder_set_metadata_respond_all"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_set_metadata_ignore = Module["_FLAC__stream_decoder_set_metadata_ignore"] = function() { + return (_FLAC__stream_decoder_set_metadata_ignore = Module["_FLAC__stream_decoder_set_metadata_ignore"] = Module["asm"]["FLAC__stream_decoder_set_metadata_ignore"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_set_metadata_ignore_application = Module["_FLAC__stream_decoder_set_metadata_ignore_application"] = function() { + return (_FLAC__stream_decoder_set_metadata_ignore_application = Module["_FLAC__stream_decoder_set_metadata_ignore_application"] = Module["asm"]["FLAC__stream_decoder_set_metadata_ignore_application"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_set_metadata_ignore_all = Module["_FLAC__stream_decoder_set_metadata_ignore_all"] = function() { + return (_FLAC__stream_decoder_set_metadata_ignore_all = Module["_FLAC__stream_decoder_set_metadata_ignore_all"] = Module["asm"]["FLAC__stream_decoder_set_metadata_ignore_all"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_get_state = Module["_FLAC__stream_decoder_get_state"] = function() { + return (_FLAC__stream_decoder_get_state = Module["_FLAC__stream_decoder_get_state"] = Module["asm"]["FLAC__stream_decoder_get_state"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_get_md5_checking = Module["_FLAC__stream_decoder_get_md5_checking"] = function() { + return (_FLAC__stream_decoder_get_md5_checking = Module["_FLAC__stream_decoder_get_md5_checking"] = Module["asm"]["FLAC__stream_decoder_get_md5_checking"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_process_single = Module["_FLAC__stream_decoder_process_single"] = function() { + return (_FLAC__stream_decoder_process_single = Module["_FLAC__stream_decoder_process_single"] = Module["asm"]["FLAC__stream_decoder_process_single"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_process_until_end_of_metadata = Module["_FLAC__stream_decoder_process_until_end_of_metadata"] = function() { + return (_FLAC__stream_decoder_process_until_end_of_metadata = Module["_FLAC__stream_decoder_process_until_end_of_metadata"] = Module["asm"]["FLAC__stream_decoder_process_until_end_of_metadata"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_decoder_process_until_end_of_stream = Module["_FLAC__stream_decoder_process_until_end_of_stream"] = function() { + return (_FLAC__stream_decoder_process_until_end_of_stream = Module["_FLAC__stream_decoder_process_until_end_of_stream"] = Module["asm"]["FLAC__stream_decoder_process_until_end_of_stream"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_new = Module["_FLAC__stream_encoder_new"] = function() { + return (_FLAC__stream_encoder_new = Module["_FLAC__stream_encoder_new"] = Module["asm"]["FLAC__stream_encoder_new"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_delete = Module["_FLAC__stream_encoder_delete"] = function() { + return (_FLAC__stream_encoder_delete = Module["_FLAC__stream_encoder_delete"] = Module["asm"]["FLAC__stream_encoder_delete"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_finish = Module["_FLAC__stream_encoder_finish"] = function() { + return (_FLAC__stream_encoder_finish = Module["_FLAC__stream_encoder_finish"] = Module["asm"]["FLAC__stream_encoder_finish"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_init_stream = Module["_FLAC__stream_encoder_init_stream"] = function() { + return (_FLAC__stream_encoder_init_stream = Module["_FLAC__stream_encoder_init_stream"] = Module["asm"]["FLAC__stream_encoder_init_stream"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_init_ogg_stream = Module["_FLAC__stream_encoder_init_ogg_stream"] = function() { + return (_FLAC__stream_encoder_init_ogg_stream = Module["_FLAC__stream_encoder_init_ogg_stream"] = Module["asm"]["FLAC__stream_encoder_init_ogg_stream"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_set_ogg_serial_number = Module["_FLAC__stream_encoder_set_ogg_serial_number"] = function() { + return (_FLAC__stream_encoder_set_ogg_serial_number = Module["_FLAC__stream_encoder_set_ogg_serial_number"] = Module["asm"]["FLAC__stream_encoder_set_ogg_serial_number"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_set_verify = Module["_FLAC__stream_encoder_set_verify"] = function() { + return (_FLAC__stream_encoder_set_verify = Module["_FLAC__stream_encoder_set_verify"] = Module["asm"]["FLAC__stream_encoder_set_verify"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_set_channels = Module["_FLAC__stream_encoder_set_channels"] = function() { + return (_FLAC__stream_encoder_set_channels = Module["_FLAC__stream_encoder_set_channels"] = Module["asm"]["FLAC__stream_encoder_set_channels"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_set_bits_per_sample = Module["_FLAC__stream_encoder_set_bits_per_sample"] = function() { + return (_FLAC__stream_encoder_set_bits_per_sample = Module["_FLAC__stream_encoder_set_bits_per_sample"] = Module["asm"]["FLAC__stream_encoder_set_bits_per_sample"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_set_sample_rate = Module["_FLAC__stream_encoder_set_sample_rate"] = function() { + return (_FLAC__stream_encoder_set_sample_rate = Module["_FLAC__stream_encoder_set_sample_rate"] = Module["asm"]["FLAC__stream_encoder_set_sample_rate"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_set_compression_level = Module["_FLAC__stream_encoder_set_compression_level"] = function() { + return (_FLAC__stream_encoder_set_compression_level = Module["_FLAC__stream_encoder_set_compression_level"] = Module["asm"]["FLAC__stream_encoder_set_compression_level"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_set_blocksize = Module["_FLAC__stream_encoder_set_blocksize"] = function() { + return (_FLAC__stream_encoder_set_blocksize = Module["_FLAC__stream_encoder_set_blocksize"] = Module["asm"]["FLAC__stream_encoder_set_blocksize"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_set_total_samples_estimate = Module["_FLAC__stream_encoder_set_total_samples_estimate"] = function() { + return (_FLAC__stream_encoder_set_total_samples_estimate = Module["_FLAC__stream_encoder_set_total_samples_estimate"] = Module["asm"]["FLAC__stream_encoder_set_total_samples_estimate"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_set_metadata = Module["_FLAC__stream_encoder_set_metadata"] = function() { + return (_FLAC__stream_encoder_set_metadata = Module["_FLAC__stream_encoder_set_metadata"] = Module["asm"]["FLAC__stream_encoder_set_metadata"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_get_state = Module["_FLAC__stream_encoder_get_state"] = function() { + return (_FLAC__stream_encoder_get_state = Module["_FLAC__stream_encoder_get_state"] = Module["asm"]["FLAC__stream_encoder_get_state"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_get_verify_decoder_state = Module["_FLAC__stream_encoder_get_verify_decoder_state"] = function() { + return (_FLAC__stream_encoder_get_verify_decoder_state = Module["_FLAC__stream_encoder_get_verify_decoder_state"] = Module["asm"]["FLAC__stream_encoder_get_verify_decoder_state"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_get_verify = Module["_FLAC__stream_encoder_get_verify"] = function() { + return (_FLAC__stream_encoder_get_verify = Module["_FLAC__stream_encoder_get_verify"] = Module["asm"]["FLAC__stream_encoder_get_verify"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_process = Module["_FLAC__stream_encoder_process"] = function() { + return (_FLAC__stream_encoder_process = Module["_FLAC__stream_encoder_process"] = Module["asm"]["FLAC__stream_encoder_process"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _FLAC__stream_encoder_process_interleaved = Module["_FLAC__stream_encoder_process_interleaved"] = function() { + return (_FLAC__stream_encoder_process_interleaved = Module["_FLAC__stream_encoder_process_interleaved"] = Module["asm"]["FLAC__stream_encoder_process_interleaved"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var ___errno_location = Module["___errno_location"] = function() { + return (___errno_location = Module["___errno_location"] = Module["asm"]["__errno_location"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var stackSave = Module["stackSave"] = function() { + return (stackSave = Module["stackSave"] = Module["asm"]["stackSave"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var stackRestore = Module["stackRestore"] = function() { + return (stackRestore = Module["stackRestore"] = Module["asm"]["stackRestore"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var stackAlloc = Module["stackAlloc"] = function() { + return (stackAlloc = Module["stackAlloc"] = Module["asm"]["stackAlloc"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _malloc = Module["_malloc"] = function() { + return (_malloc = Module["_malloc"] = Module["asm"]["malloc"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var _free = Module["_free"] = function() { + return (_free = Module["_free"] = Module["asm"]["free"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var __growWasmMemory = Module["__growWasmMemory"] = function() { + return (__growWasmMemory = Module["__growWasmMemory"] = Module["asm"]["__growWasmMemory"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_iii = Module["dynCall_iii"] = function() { + return (dynCall_iii = Module["dynCall_iii"] = Module["asm"]["dynCall_iii"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_ii = Module["dynCall_ii"] = function() { + return (dynCall_ii = Module["dynCall_ii"] = Module["asm"]["dynCall_ii"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_iiii = Module["dynCall_iiii"] = function() { + return (dynCall_iiii = Module["dynCall_iiii"] = Module["asm"]["dynCall_iiii"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_jiji = Module["dynCall_jiji"] = function() { + return (dynCall_jiji = Module["dynCall_jiji"] = Module["asm"]["dynCall_jiji"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_viiiiii = Module["dynCall_viiiiii"] = function() { + return (dynCall_viiiiii = Module["dynCall_viiiiii"] = Module["asm"]["dynCall_viiiiii"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_iiiii = Module["dynCall_iiiii"] = function() { + return (dynCall_iiiii = Module["dynCall_iiiii"] = Module["asm"]["dynCall_iiiii"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = function() { + return (dynCall_viiiiiii = Module["dynCall_viiiiiii"] = Module["asm"]["dynCall_viiiiiii"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_viiii = Module["dynCall_viiii"] = function() { + return (dynCall_viiii = Module["dynCall_viiii"] = Module["asm"]["dynCall_viiii"]).apply(null, arguments); +}; + +/** @type {function(...*):?} */ +var dynCall_viii = Module["dynCall_viii"] = function() { + return (dynCall_viii = Module["dynCall_viii"] = Module["asm"]["dynCall_viii"]).apply(null, arguments); +}; + + + + + +// === Auto-generated postamble setup entry stuff === + + + + +Module["ccall"] = ccall; +Module["cwrap"] = cwrap; +Module["setValue"] = setValue; +Module["getValue"] = getValue; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +var calledRun; + +/** + * @constructor + * @this {ExitStatus} + */ +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +} + +var calledMain = false; + + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +}; + + + + + +/** @type {function(Array=)} */ +function run(args) { + args = args || arguments_; + + if (runDependencies > 0) { + return; + } + + + preRun(); + + if (runDependencies > 0) return; // a preRun added a dependency, run will be called later + + function doRun() { + // run may have just been called through dependencies being fulfilled just in this very frame, + // or while the async setStatus time below was happening + if (calledRun) return; + calledRun = true; + Module['calledRun'] = true; + + if (ABORT) return; + + initRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else + { + doRun(); + } +} +Module['run'] = run; + + +/** @param {boolean|number=} implicit */ +function exit(status, implicit) { + + // if this is just main exit-ing implicitly, and the status is 0, then we + // don't need to do anything here and can just leave. if the status is + // non-zero, though, then we need to report it. + // (we may have warned about this earlier, if a situation justifies doing so) + if (implicit && noExitRuntime && status === 0) { + return; + } + + if (noExitRuntime) { + } else { + + ABORT = true; + EXITSTATUS = status; + + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } + + quit_(status, new ExitStatus(status)); +} + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + + + noExitRuntime = true; + +run(); + + + + + + +// {{MODULE_ADDITIONS}} + + + +//libflac function wrappers + +/** + * HELPER read/extract stream info meta-data from frame header / meta-data + * @param {POINTER} p_streaminfo + * @returns StreamInfo + */ +function _readStreamInfo(p_streaminfo){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_STREAMINFO (0) + + /* + typedef struct { + unsigned min_blocksize, max_blocksize; + unsigned min_framesize, max_framesize; + unsigned sample_rate; + unsigned channels; + unsigned bits_per_sample; + FLAC__uint64 total_samples; + FLAC__byte md5sum[16]; + } FLAC__StreamMetadata_StreamInfo; + */ + + var min_blocksize = Module.getValue(p_streaminfo,'i32');//4 bytes + var max_blocksize = Module.getValue(p_streaminfo+4,'i32');//4 bytes + + var min_framesize = Module.getValue(p_streaminfo+8,'i32');//4 bytes + var max_framesize = Module.getValue(p_streaminfo+12,'i32');//4 bytes + + var sample_rate = Module.getValue(p_streaminfo+16,'i32');//4 bytes + var channels = Module.getValue(p_streaminfo+20,'i32');//4 bytes + + var bits_per_sample = Module.getValue(p_streaminfo+24,'i32');//4 bytes + + //FIXME should be at p_streaminfo+28, but seems to be at p_streaminfo+32 + var total_samples = Module.getValue(p_streaminfo+32,'i64');//8 bytes + + var md5sum = _readMd5(p_streaminfo+40);//16 bytes + + return { + min_blocksize: min_blocksize, + max_blocksize: max_blocksize, + min_framesize: min_framesize, + max_framesize: max_framesize, + sampleRate: sample_rate, + channels: channels, + bitsPerSample: bits_per_sample, + total_samples: total_samples, + md5sum: md5sum + }; +} + +/** + * read MD5 checksum + * @param {POINTER} p_md5 + * @returns {String} as HEX string representation + */ +function _readMd5(p_md5){ + + var sb = [], v, str; + for(var i=0, len = 16; i < len; ++i){ + v = Module.getValue(p_md5+i,'i8');//1 byte + if(v < 0) v = 256 + v;//<- "convert" to uint8, if necessary + str = v.toString(16); + if(str.length < 2) str = '0' + str;//<- add padding, if necessary + sb.push(str); + } + return sb.join(''); +} + +/** + * HELPER: read frame data + * + * @param {POINTER} p_frame + * @param {CodingOptions} [enc_opt] + * @returns FrameHeader + */ +function _readFrameHdr(p_frame, enc_opt){ + + /* + typedef struct { + unsigned blocksize; + unsigned sample_rate; + unsigned channels; + FLAC__ChannelAssignment channel_assignment; + unsigned bits_per_sample; + FLAC__FrameNumberType number_type; + union { + FLAC__uint32 frame_number; + FLAC__uint64 sample_number; + } number; + FLAC__uint8 crc; + } FLAC__FrameHeader; + */ + + var blocksize = Module.getValue(p_frame,'i32');//4 bytes + var sample_rate = Module.getValue(p_frame+4,'i32');//4 bytes + var channels = Module.getValue(p_frame+8,'i32');//4 bytes + + // 0: FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT independent channels + // 1: FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE left+side stereo + // 2: FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE right+side stereo + // 3: FLAC__CHANNEL_ASSIGNMENT_MID_SIDE mid+side stereo + var channel_assignment = Module.getValue(p_frame+12,'i32');//4 bytes + + var bits_per_sample = Module.getValue(p_frame+16,'i32'); + + // 0: FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER number contains the frame number + // 1: FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER number contains the sample number of first sample in frame + var number_type = Module.getValue(p_frame+20,'i32'); + + // union {} number: The frame number or sample number of first sample in frame; use the number_type value to determine which to use. + var frame_number = Module.getValue(p_frame+24,'i32'); + var sample_number = Module.getValue(p_frame+24,'i64'); + + var number = number_type === 0? frame_number : sample_number; + var numberType = number_type === 0? 'frames' : 'samples'; + + var crc = Module.getValue(p_frame+36,'i8'); + + var subframes; + if(enc_opt && enc_opt.analyseSubframes){ + var subOffset = {offset: 40}; + subframes = []; + for(var i=0; i < channels; ++i){ + subframes.push(_readSubFrameHdr(p_frame, subOffset, blocksize, enc_opt)); + } + //TODO read footer + // console.log(' footer crc ', Module.getValue(p_frame + subOffset.offset,'i16')); + } + + return { + blocksize: blocksize, + sampleRate: sample_rate, + channels: channels, + channelAssignment: channel_assignment, + bitsPerSample: bits_per_sample, + number: number, + numberType: numberType, + crc: crc, + subframes: subframes + }; +} + + +function _readSubFrameHdr(p_subframe, subOffset, block_size, enc_opt){ + /* + FLAC__SubframeType type + union { + FLAC__Subframe_Constant constant + FLAC__Subframe_Fixed fixed + FLAC__Subframe_LPC lpc + FLAC__Subframe_Verbatim verbatim + } data + unsigned wasted_bits + */ + + var type = Module.getValue(p_subframe + subOffset.offset, 'i32'); + subOffset.offset += 4; + + var data; + switch(type){ + case 0: //FLAC__SUBFRAME_TYPE_CONSTANT + data = {value: Module.getValue(p_subframe + subOffset.offset, 'i32')}; + subOffset.offset += 284;//4; + break; + case 1: //FLAC__SUBFRAME_TYPE_VERBATIM + data = Module.getValue(p_subframe + subOffset.offset, 'i32'); + subOffset.offset += 284;//4; + break; + case 2: //FLAC__SUBFRAME_TYPE_FIXED + data = _readSubFrameHdrFixedData(p_subframe, subOffset, block_size, false, enc_opt); + break; + case 3: //FLAC__SUBFRAME_TYPE_LPC + data = _readSubFrameHdrFixedData(p_subframe, subOffset, block_size, true, enc_opt); + break; + } + + var offset = subOffset.offset; + var wasted_bits = Module.getValue(p_subframe + offset, 'i32'); + subOffset.offset += 4; + + return { + type: type,//['CONSTANT', 'VERBATIM', 'FIXED', 'LPC'][type], + data: data, + wastedBits: wasted_bits + } +} + +function _readSubFrameHdrFixedData(p_subframe_data, subOffset, block_size, is_lpc, enc_opt){ + + var offset = subOffset.offset; + + var data = {order: -1, contents: {parameters: [], rawBits: []}}; + //FLAC__Subframe_Fixed: + // FLAC__EntropyCodingMethod entropy_coding_method + // unsigned order + // FLAC__int32 warmup [FLAC__MAX_FIXED_ORDER] + // const FLAC__int32 * residual + + //FLAC__EntropyCodingMethod: + // FLAC__EntropyCodingMethodType type + // union { + // FLAC__EntropyCodingMethod_PartitionedRice partitioned_rice + // } data + + //FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE 0 Residual is coded by partitioning into contexts, each with it's own 4-bit Rice parameter. + //FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2 1 Residual is coded by partitioning into contexts, each with it's own 5-bit Rice parameter. + var entropyType = Module.getValue(p_subframe_data, 'i32'); + offset += 4; + + //FLAC__EntropyCodingMethod_PartitionedRice: + // unsigned order + var entropyOrder = Module.getValue(p_subframe_data + offset, 'i32'); + data.order = entropyOrder; + offset += 4; + + //FLAC__EntropyCodingMethod_PartitionedRice: + // FLAC__EntropyCodingMethod_PartitionedRiceContents * contents + var partitions = 1 << entropyOrder, params = data.contents.parameters, raws = data.contents.rawBits; + //FLAC__EntropyCodingMethod_PartitionedRiceContents + // unsigned * parameters + // unsigned * raw_bits + // unsigned capacity_by_order + var ppart = Module.getValue(p_subframe_data + offset, 'i32'); + var pparams = Module.getValue(ppart, 'i32'); + var praw = Module.getValue(ppart + 4, 'i32'); + data.contents.capacityByOrder = Module.getValue(ppart + 8, 'i32'); + for(var i=0; i < partitions; ++i){ + params.push(Module.getValue(pparams + (i*4), 'i32')); + raws.push(Module.getValue(praw + (i*4), 'i32')); + } + offset += 4; + + //FLAC__Subframe_Fixed: + // unsigned order + var order = Module.getValue(p_subframe_data + offset, 'i32'); + offset += 4; + + var warmup = [], res; + + if(is_lpc){ + //FLAC__Subframe_LPC + + // unsigned qlp_coeff_precision + var qlp_coeff_precision = Module.getValue(p_subframe_data + offset, 'i32'); + offset += 4; + // int quantization_level + var quantization_level = Module.getValue(p_subframe_data + offset, 'i32'); + offset += 4; + + //FLAC__Subframe_LPC : + // FLAC__int32 qlp_coeff [FLAC__MAX_LPC_ORDER] + var qlp_coeff = []; + for(var i=0; i < order; ++i){ + qlp_coeff.push(Module.getValue(p_subframe_data + offset, 'i32')); + offset += 4; + } + data.qlp_coeff = qlp_coeff; + data.qlp_coeff_precision = qlp_coeff_precision; + data.quantization_level = quantization_level; + + //FLAC__Subframe_LPC: + // FLAC__int32 warmup [FLAC__MAX_LPC_ORDER] + offset = subOffset.offset + 152; + offset = _readSubFrameHdrWarmup(p_subframe_data, offset, warmup, order); + + //FLAC__Subframe_LPC: + // const FLAC__int32 * residual + if(enc_opt && enc_opt.analyseResiduals){ + offset = subOffset.offset + 280; + res = _readSubFrameHdrResidual(p_subframe_data + offset, block_size, order); + } + + } else { + + //FLAC__Subframe_Fixed: + // FLAC__int32 warmup [FLAC__MAX_FIXED_ORDER] + offset = _readSubFrameHdrWarmup(p_subframe_data, offset, warmup, order); + + //FLAC__Subframe_Fixed: + // const FLAC__int32 * residual + offset = subOffset.offset + 32; + if(enc_opt && enc_opt.analyseResiduals){ + res = _readSubFrameHdrResidual(p_subframe_data + offset, block_size, order); + } + } + + subOffset.offset += 284; + return { + partition: { + type: entropyType, + data: data + }, + order: order, + warmup: warmup, + residual: res + } +} + + +function _readSubFrameHdrWarmup(p_subframe_data, offset, warmup, order){ + + // FLAC__int32 warmup [FLAC__MAX_FIXED_ORDER | FLAC__MAX_LPC_ORDER] + for(var i=0; i < order; ++i){ + warmup.push(Module.getValue(p_subframe_data + offset, 'i32')); + offset += 4; + } + return offset; +} + + +function _readSubFrameHdrResidual(p_subframe_data_res, block_size, order){ + // const FLAC__int32 * residual + var pres = Module.getValue(p_subframe_data_res, 'i32'); + var res = [];//Module.getValue(pres, 'i32'); + //TODO read residual all values(?) + // -> "The residual signal, length == (blocksize minus order) samples. + for(var i=0, size = block_size - order; i < size; ++i){ + res.push(Module.getValue(pres + (i*4), 'i32')); + } + return res; +} + +function _readConstChar(ptr, length, sb){ + sb.splice(0); + var ch; + for(var i=0; i < length; ++i){ + ch = Module.getValue(ptr + i,'i8'); + if(ch === 0){ + break; + } + sb.push(String.fromCodePoint(ch)); + } + return sb.join(''); +} + +function _readNullTerminatedChar(ptr, sb){ + sb.splice(0); + var ch = 1, i = 0; + while(ch > 0){ + ch = Module.getValue(ptr + i++, 'i8'); + if(ch === 0){ + break; + } + sb.push(String.fromCodePoint(ch)); + } + return sb.join(''); +} + + +/** + * HELPER read/extract padding metadata meta-data from meta-data block + * @param {POINTER} p_padding_metadata + * @returns PaddingMetadata + */ +function _readPaddingMetadata(p_padding_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_PADDING (1) + + //FLAC__StreamMetadata_Padding: + // int dummy + return { + dummy: Module.getValue(p_padding_metadata,'i32') + } +} + +/** + * HELPER read/extract application metadata meta-data from meta-data block + * @param {POINTER} p_application_metadata + * @returns ApplicationMetadata + */ +function _readApplicationMetadata(p_application_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_APPLICATION (2) + + //FLAC__StreamMetadata_Application: + // FLAC__byte id [4] + // FLAC__byte * data + return { + id : Module.getValue(p_application_metadata,'i32'), + data: Module.getValue(p_application_metadata + 4,'i32')//TODO should read (binary) data? + } +} + + +/** + * HELPER read/extract seek table metadata meta-data from meta-data block + * @param {POINTER} p_seek_table_metadata + * @returns SeekTableMetadata + */ +function _readSeekTableMetadata(p_seek_table_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_SEEKTABLE (3) + + //FLAC__StreamMetadata_SeekTable: + // unsigned num_points + // FLAC__StreamMetadata_SeekPoint * points + + var num_points = Module.getValue(p_seek_table_metadata,'i32'); + + var ptrPoints = Module.getValue(p_seek_table_metadata + 4,'i32'); + var points = []; + for(var i=0; i < num_points; ++i){ + + //FLAC__StreamMetadata_SeekPoint: + // FLAC__uint64 sample_number + // FLAC__uint64 stream_offset + // unsigned frame_samples + + points.push({ + sample_number: Module.getValue(ptrPoints + (i * 24),'i64'), + stream_offset: Module.getValue(ptrPoints + (i * 24) + 8,'i64'), + frame_samples: Module.getValue(ptrPoints + (i * 24) + 16,'i32') + }); + } + + return { + num_points: num_points, + points: points + } +} + +/** + * HELPER read/extract vorbis comment meta-data from meta-data block + * @param {POINTER} p_vorbiscomment + * @returns VorbisComment + */ +function _readVorbisComment(p_vorbiscomment){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_VORBIS_COMMENT (4) + + // FLAC__StreamMetadata_VorbisComment + // FLAC__StreamMetadata_VorbisComment_Entry vendor_string: + // FLAC__uint32 length + // FLAC__byte * entry + var length = Module.getValue(p_vorbiscomment,'i32'); + var entry = Module.getValue(p_vorbiscomment + 4,'i32'); + + var sb = []; + var strEntry = _readConstChar(entry, length, sb); + + // FLAC__uint32 num_comments + var num_comments = Module.getValue(p_vorbiscomment + 8,'i32'); + + // FLAC__StreamMetadata_VorbisComment_Entry * comments + var comments = [], clen, centry; + var pc = Module.getValue(p_vorbiscomment + 12, 'i32') + for(var i=0; i < num_comments; ++i){ + + // FLAC__StreamMetadata_VorbisComment_Entry + // FLAC__uint32 length + // FLAC__byte * entry + + clen = Module.getValue(pc + (i*8), 'i32'); + if(clen === 0){ + continue; + } + + centry = Module.getValue(pc + (i*8) + 4, 'i32'); + comments.push(_readConstChar(centry, clen, sb)); + } + + return { + vendor_string: strEntry, + num_comments: num_comments, + comments: comments + } +} + +/** + * HELPER read/extract cue sheet meta-data from meta-data block + * @param {POINTER} p_cue_sheet + * @returns CueSheetMetadata + */ +function _readCueSheetMetadata(p_cue_sheet){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_CUESHEET (5) + + // char media_catalog_number [129] + // FLAC__uint64 lead_in + // FLAC__bool is_cd + // unsigned num_tracks + // FLAC__StreamMetadata_CueSheet_Track * tracks + + var sb = []; + var media_catalog_number = _readConstChar(p_cue_sheet, 129, sb); + + var lead_in = Module.getValue(p_cue_sheet + 136,'i64'); + + var is_cd = Module.getValue(p_cue_sheet + 144,'i8'); + var num_tracks = Module.getValue(p_cue_sheet + 148,'i32'); + + var ptrTrack = Module.getValue(p_cue_sheet + 152,'i32'); + var tracks = [], trackOffset = ptrTrack; + if(ptrTrack !== 0){ + + for(var i=0; i < num_tracks; ++i){ + + var tr = _readCueSheetMetadata_track(trackOffset, sb); + tracks.push(tr); + trackOffset += 32; + } + } + + return { + media_catalog_number: media_catalog_number, + lead_in: lead_in, + is_cd: is_cd, + num_tracks: num_tracks, + tracks: tracks + } +} + +/** + * helper read track data for cue-sheet metadata + * @param {POINTER} p_cue_sheet_track pointer to the track data + * @param {string[]} sb "string buffer" temporary buffer for reading string (may be reset) + * @return {CueSheetTrack} + */ +function _readCueSheetMetadata_track(p_cue_sheet_track, sb){ + + // FLAC__StreamMetadata_CueSheet_Track: + // FLAC__uint64 offset + // FLAC__byte number + // char isrc [13] + // unsigned type:1 + // unsigned pre_emphasis:1 + // FLAC__byte num_indices + // FLAC__StreamMetadata_CueSheet_Index * indices + + var typePremph = Module.getValue(p_cue_sheet_track + 22,'i8'); + var num_indices = Module.getValue(p_cue_sheet_track + 23,'i8'); + + var indices = []; + var track = { + offset: Module.getValue(p_cue_sheet_track,'i64'), + number: Module.getValue(p_cue_sheet_track + 8,'i8') &255, + isrc: _readConstChar(p_cue_sheet_track + 9, 13, sb), + type: typePremph & 1? 'NON_AUDIO' : 'AUDIO', + pre_emphasis: !!(typePremph & 2), + num_indices: num_indices, + indices: indices + } + + var idx; + if(num_indices > 0){ + idx = Module.getValue(p_cue_sheet_track + 24,'i32'); + + //FLAC__StreamMetadata_CueSheet_Index: + // FLAC__uint64 offset + // FLAC__byte number + + for(var i=0; i < num_indices; ++i){ + indices.push({ + offset: Module.getValue(idx + (i*16),'i64'), + number: Module.getValue(idx + (i*16) + 8,'i8') + }); + } + } + + return track; +} + +/** + * HELPER read/extract picture meta-data from meta-data block + * @param {POINTER} p_picture_metadata + * @returns PictureMetadata + */ +function _readPictureMetadata(p_picture_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_PICTURE (6) + + // FLAC__StreamMetadata_Picture_Type type + // char * mime_type + // FLAC__byte * description + // FLAC__uint32 width + // FLAC__uint32 height + // FLAC__uint32 depth + // FLAC__uint32 colors + // FLAC__uint32 data_length + // FLAC__byte * data + + var type = Module.getValue(p_picture_metadata,'i32'); + + var mime = Module.getValue(p_picture_metadata + 4,'i32'); + + var sb = []; + var mime_type = _readNullTerminatedChar(mime, sb); + + var desc = Module.getValue(p_picture_metadata + 8,'i32'); + var description = _readNullTerminatedChar(desc, sb); + + var width = Module.getValue(p_picture_metadata + 12,'i32'); + var height = Module.getValue(p_picture_metadata + 16,'i32'); + var depth = Module.getValue(p_picture_metadata + 20,'i32'); + var colors = Module.getValue(p_picture_metadata + 24,'i32'); + var data_length = Module.getValue(p_picture_metadata + 28,'i32'); + + var data = Module.getValue(p_picture_metadata + 32,'i32'); + + var buffer = Uint8Array.from(Module.HEAPU8.subarray(data, data + data_length)); + + return { + type: type, + mime_type: mime_type, + description: description, + width: width, + height: height, + depth: depth, + colors: colors, + data_length: data_length, + data: buffer + } +} + +/** + * HELPER workaround / fix for returned write-buffer when decoding FLAC + * + * @param {number} heapOffset + * the offset for the data on HEAPU8 + * @param {Uint8Array} newBuffer + * the target buffer into which the data should be written -- with the correct (block) size + * @param {boolean} applyFix + * whether or not to apply the data repair heuristics + * (handling duplicated/triplicated values in raw data) + */ +function __fix_write_buffer(heapOffset, newBuffer, applyFix){ + + var dv = new DataView(newBuffer.buffer); + var targetSize = newBuffer.length; + + var increase = !applyFix? 1 : 2;//<- for FIX/workaround, NOTE: e.g. if 24-bit padding occurres, there is no fix/increase needed (more details comment below) + var buffer = HEAPU8.subarray(heapOffset, heapOffset + targetSize * increase); + + // FIXME for some reason, the bytes values 0 (min) and 255 (max) get "triplicated", + // or inserted "doubled" which should be ignored, i.e. + // x x x -> x + // x x -> + // where x is 0 or 255 + // -> HACK for now: remove/"over-read" 2 of the values, for each of these triplets/doublications + var jump, isPrint; + for(var i=0, j=0, size = buffer.length; i < size && j < targetSize; ++i, ++j){ + + if(i === size-1 && j < targetSize - 1){ + //increase heap-view, in order to read more (valid) data into the target buffer + buffer = HEAPU8.subarray(heapOffset, size + targetSize); + size = buffer.length; + } + + // NOTE if e.g. 24-bit padding occurres, there does not seem to be no duplication/triplication of 255 or 0, so must not try to fix! + if(applyFix && (buffer[i] === 0 || buffer[i] === 255)){ + + jump = 0; + isPrint = true; + + if(i + 1 < size && buffer[i] === buffer[i+1]){ + + ++jump; + + if(i + 2 < size){ + if(buffer[i] === buffer[i+2]){ + ++jump; + } else { + //if only 2 occurrences: ignore value + isPrint = false; + } + } + }//else: if single value: do print (an do not jump) + + + if(isPrint){ + dv.setUint8(j, buffer[i]); + if(jump === 2 && i + 3 < size && buffer[i] === buffer[i+3]){ + //special case for reducing triples in case the following value is also the same + // (ie. something like: x x x |+ x) + // -> then: do write the value one more time, and jump one further ahead + // i.e. if value occurs 4 times in a row, write 2 values + ++jump; + dv.setUint8(++j, buffer[i]); + } + } else { + --j; + } + + i += jump;//<- apply jump, if there were value duplications + + } else { + dv.setUint8(j, buffer[i]); + } + + } +} + + +// FLAC__STREAM_DECODER_READ_STATUS_CONTINUE The read was OK and decoding can continue. +// FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM The read was attempted while at the end of the stream. Note that the client must only return this value when the read callback was called when already at the end of the stream. Otherwise, if the read itself moves to the end of the stream, the client should still return the data and FLAC__STREAM_DECODER_READ_STATUS_CONTINUE, and then on the next read callback it should return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM with a byte count of 0. +// FLAC__STREAM_DECODER_READ_STATUS_ABORT An unrecoverable error occurred. The decoder will return from the process call. +var FLAC__STREAM_DECODER_READ_STATUS_CONTINUE = 0; +var FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM = 1; +var FLAC__STREAM_DECODER_READ_STATUS_ABORT = 2; + +// FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE The write was OK and decoding can continue. +// FLAC__STREAM_DECODER_WRITE_STATUS_ABORT An unrecoverable error occurred. The decoder will return from the process call. +var FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE = 0; +var FLAC__STREAM_DECODER_WRITE_STATUS_ABORT = 1; + +/** + * @interface FLAC__StreamDecoderInitStatus + * @memberOf Flac + * + * @property {"FLAC__STREAM_DECODER_INIT_STATUS_OK"} 0 Initialization was successful. + * @property {"FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER"} 1 The library was not compiled with support for the given container format. + * @property {"FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS"} 2 A required callback was not supplied. + * @property {"FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR"} 3 An error occurred allocating memory. + * @property {"FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE"} 4 fopen() failed in FLAC__stream_decoder_init_file() or FLAC__stream_decoder_init_ogg_file(). + * @property {"FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED"} 5 FLAC__stream_decoder_init_*() was called when the decoder was already initialized, usually because FLAC__stream_decoder_finish() was not called. + */ +var FLAC__STREAM_DECODER_INIT_STATUS_OK = 0; +var FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER = 1; +var FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS = 2; +var FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR = 3; +var FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE = 4; +var FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED = 5; + +/** + * @interface FLAC__StreamEncoderInitStatus + * @memberOf Flac + * + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_OK"} 0 Initialization was successful. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR"} 1 General failure to set up encoder; call FLAC__stream_encoder_get_state() for cause. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER"} 2 The library was not compiled with support for the given container format. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS"} 3 A required callback was not supplied. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS"} 4 The encoder has an invalid setting for number of channels. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE"} 5 The encoder has an invalid setting for bits-per-sample. FLAC supports 4-32 bps but the reference encoder currently supports only up to 24 bps. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE"} 6 The encoder has an invalid setting for the input sample rate. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE"} 7 The encoder has an invalid setting for the block size. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER"} 8 The encoder has an invalid setting for the maximum LPC order. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION"} 9 The encoder has an invalid setting for the precision of the quantized linear predictor coefficients. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER"} 10 The specified block size is less than the maximum LPC order. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE"} 11 The encoder is bound to the Subset but other settings violate it. + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA"} 12 The metadata input to the encoder is invalid, in one of the following ways: + * FLAC__stream_encoder_set_metadata() was called with a null pointer but a block count > 0 + * One of the metadata blocks contains an undefined type + * It contains an illegal CUESHEET as checked by FLAC__format_cuesheet_is_legal() + * It contains an illegal SEEKTABLE as checked by FLAC__format_seektable_is_legal() + * It contains more than one SEEKTABLE block or more than one VORBIS_COMMENT block + * @property {"FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED"} 13 FLAC__stream_encoder_init_*() was called when the encoder was already initialized, usually because FLAC__stream_encoder_finish() was not called. + */ +var FLAC__STREAM_ENCODER_INIT_STATUS_OK = 0; +var FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR = 1; +var FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER = 2; +var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS = 3; +var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS = 4; +var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE = 5; +var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE = 6; +var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE = 7; +var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER = 8; +var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION = 9; +var FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER = 10; +var FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE = 11; +var FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA = 12; +var FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED = 13; + +//FLAC__STREAM_ENCODER_WRITE_STATUS_OK The write was OK and encoding can continue. +//FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR An unrecoverable error occurred. The encoder will return from the process call +var FLAC__STREAM_ENCODER_WRITE_STATUS_OK = 0; +var FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR = 1; + + +/** + * Map for encoder/decoder callback functions + * + *
[ID] -> {function_type: FUNCTION}
+ * + * type: {[id: number]: {[callback_type: string]: function}} + * @private + */ +var coders = {}; + +/** + * Get a registered callback for the encoder / decoder instance + * + * @param {Number} p_coder + * the encoder/decoder pointer (ID) + * @param {String} func_type + * the callback type, one of + * "write" | "read" | "error" | "metadata" + * @returns {Function} the callback (or VOID if there is no callback registered) + * @private + */ +function getCallback(p_coder, func_type){ + if(coders[p_coder]){ + return coders[p_coder][func_type]; + } +} + +/** + * Register a callback for an encoder / decoder instance (will / should be deleted, when finish()/delete()) + * + * @param {Number} p_coder + * the encoder/decoder pointer (ID) + * @param {String} func_type + * the callback type, one of + * "write" | "read" | "error" | "metadata" + * @param {Function} callback + * the callback function + * @private + */ +function setCallback(p_coder, func_type, callback){ + if(!coders[p_coder]){ + coders[p_coder] = {}; + } + coders[p_coder][func_type] = callback; +} + +/** + * Get coding options for the encoder / decoder instance: + * returns FALSY when not set. + * + * @param {Number} p_coder + * the encoder/decoder pointer (ID) + * @returns {CodingOptions} the coding options + * @private + * @memberOf Flac + */ +function _getOptions(p_coder){ + if(coders[p_coder]){ + return coders[p_coder]["options"]; + } +} + +/** + * Set coding options for an encoder / decoder instance (will / should be deleted, when finish()/delete()) + * + * @param {Number} p_coder + * the encoder/decoder pointer (ID) + * @param {CodingOptions} options + * the coding options + * @private + * @memberOf Flac + */ +function _setOptions(p_coder, options){ + if(!coders[p_coder]){ + coders[p_coder] = {}; + } + coders[p_coder]["options"] = options; +} + +//(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data) +// -> FLAC__StreamEncoderWriteStatus +var enc_write_fn_ptr = addFunction(function(p_encoder, buffer, bytes, samples, current_frame, p_client_data){ + var retdata = new Uint8Array(bytes); + retdata.set(HEAPU8.subarray(buffer, buffer + bytes)); + var write_callback_fn = getCallback(p_encoder, 'write'); + try{ + write_callback_fn(retdata, bytes, samples, current_frame, p_client_data); + } catch(err) { + console.error(err); + return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR; + } + return FLAC__STREAM_ENCODER_WRITE_STATUS_OK; +}, 'iiiiiii'); + +//(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data) +// -> FLAC__StreamDecoderReadStatus +var dec_read_fn_ptr = addFunction(function(p_decoder, buffer, bytes, p_client_data){ + //FLAC__StreamDecoderReadCallback, see https://xiph.org/flac/api/group__flac__stream__decoder.html#ga7a5f593b9bc2d163884348b48c4285fd + + var len = Module.getValue(bytes, 'i32'); + + if(len === 0){ + return FLAC__STREAM_DECODER_READ_STATUS_ABORT; + } + + var read_callback_fn = getCallback(p_decoder, 'read'); + + //callback must return object with: {buffer: TypedArray, readDataLength: number, error: boolean} + var readResult = read_callback_fn(len, p_client_data); + //in case of END_OF_STREAM or an error, readResult.readDataLength must be returned with 0 + + var readLen = readResult.readDataLength; + Module.setValue(bytes, readLen, 'i32'); + + if(readResult.error){ + return FLAC__STREAM_DECODER_READ_STATUS_ABORT; + } + + if(readLen === 0){ + return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM; + } + + var readBuf = readResult.buffer; + + var dataHeap = new Uint8Array(Module.HEAPU8.buffer, buffer, readLen); + dataHeap.set(new Uint8Array(readBuf)); + + return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; +}, 'iiiii'); + +//(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *client_data) +// -> FLAC__StreamDecoderWriteStatus +var dec_write_fn_ptr = addFunction(function(p_decoder, p_frame, p_buffer, p_client_data){ + + // var dec = Module.getValue(p_decoder,'i32'); + // var clientData = Module.getValue(p_client_data,'i32'); + + var dec_opts = _getOptions(p_decoder); + var frameInfo = _readFrameHdr(p_frame, dec_opts); + +// console.log(frameInfo);//DEBUG + + var channels = frameInfo.channels; + var block_size = frameInfo.blocksize * (frameInfo.bitsPerSample / 8); + + //whether or not to apply data fixing heuristics (e.g. not needed for 24-bit samples) + var isFix = frameInfo.bitsPerSample !== 24; + + //take padding bits into account for calculating buffer size + // -> seems to be done for uneven byte sizes, i.e. 1 (8 bits) and 3 (24 bits) + var padding = (frameInfo.bitsPerSample / 8)%2; + if(padding > 0){ + block_size += frameInfo.blocksize * padding; + } + + var data = [];//<- array for the data of each channel + var bufferOffset, _buffer; + + for(var i=0; i < channels; ++i){ + + bufferOffset = Module.getValue(p_buffer + (i*4),'i32'); + + _buffer = new Uint8Array(block_size); + //FIXME HACK for "strange" data (see helper function __fix_write_buffer) + __fix_write_buffer(bufferOffset, _buffer, isFix); + + data.push(_buffer.subarray(0, block_size)); + } + + var write_callback_fn = getCallback(p_decoder, 'write'); + var res = write_callback_fn(data, frameInfo);//, clientData); + + // FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE The write was OK and decoding can continue. + // FLAC__STREAM_DECODER_WRITE_STATUS_ABORT An unrecoverable error occurred. The decoder will return from the process call. + + return res !== false? FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE : FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; +}, 'iiiii'); + +/** + * Decoding error codes. + * + *
+ * If the error code is not known, value FLAC__STREAM_DECODER_ERROR__UNKNOWN__ is used. + * + * @property {"FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC"} 0 An error in the stream caused the decoder to lose synchronization. + * @property {"FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER"} 1 The decoder encountered a corrupted frame header. + * @property {"FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH"} 2 The frame's data did not match the CRC in the footer. + * @property {"FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM"} 3 The decoder encountered reserved fields in use in the stream. + * + * + * @interface FLAC__StreamDecoderErrorStatus + * @memberOf Flac + */ +var DecoderErrorCode = { + 0: 'FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC', + 1: 'FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER', + 2: 'FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH', + 3: 'FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM' +} + +//(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data) +// -> void +var dec_error_fn_ptr = addFunction(function(p_decoder, err, p_client_data){ + + //err: + var msg = DecoderErrorCode[err] || 'FLAC__STREAM_DECODER_ERROR__UNKNOWN__';//<- this should never happen; + + var error_callback_fn = getCallback(p_decoder, 'error'); + error_callback_fn(err, msg, p_client_data); +}, 'viii'); + +//(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data) -> void +//(const FLAC__StreamEncoder *encoder, const FLAC__StreamMetadata *metadata, void *client_data) -> void +var metadata_fn_ptr = addFunction(function(p_coder, p_metadata, p_client_data){ + /* + typedef struct { + FLAC__MetadataType type; + FLAC__bool is_last; + unsigned length; + union { + FLAC__StreamMetadata_StreamInfo stream_info; + FLAC__StreamMetadata_Padding padding; + FLAC__StreamMetadata_Application application; + FLAC__StreamMetadata_SeekTable seek_table; + FLAC__StreamMetadata_VorbisComment vorbis_comment; + FLAC__StreamMetadata_CueSheet cue_sheet; + FLAC__StreamMetadata_Picture picture; + FLAC__StreamMetadata_Unknown unknown; + } data; + } FLAC__StreamMetadata; + */ + + /* + FLAC__METADATA_TYPE_STREAMINFO STREAMINFO block + FLAC__METADATA_TYPE_PADDING PADDING block + FLAC__METADATA_TYPE_APPLICATION APPLICATION block + FLAC__METADATA_TYPE_SEEKTABLE SEEKTABLE block + FLAC__METADATA_TYPE_VORBIS_COMMENT VORBISCOMMENT block (a.k.a. FLAC tags) + FLAC__METADATA_TYPE_CUESHEET CUESHEET block + FLAC__METADATA_TYPE_PICTURE PICTURE block + FLAC__METADATA_TYPE_UNDEFINED marker to denote beginning of undefined type range; this number will increase as new metadata types are added + FLAC__MAX_METADATA_TYPE No type will ever be greater than this. There is not enough room in the protocol block. + */ + + var type = Module.getValue(p_metadata,'i32');//4 bytes + var is_last = Module.getValue(p_metadata+4,'i32');//4 bytes + var length = Module.getValue(p_metadata+8,'i64');//8 bytes + + var meta_data = { + type: type, + isLast: is_last, + length: length, + data: void(0) + }; + + var metadata_callback_fn = getCallback(p_coder, 'metadata'); + if(type === 0){// === FLAC__METADATA_TYPE_STREAMINFO + + meta_data.data = _readStreamInfo(p_metadata+16); + metadata_callback_fn(meta_data.data, meta_data); + + } else { + + var data; + switch(type){ + case 1: //FLAC__METADATA_TYPE_PADDING + data = _readPaddingMetadata(p_metadata+16); + break; + case 2: //FLAC__METADATA_TYPE_APPLICATION + data = readApplicationMetadata(p_metadata+16); + break; + case 3: //FLAC__METADATA_TYPE_SEEKTABLE + data = _readSeekTableMetadata(p_metadata+16); + break; + + case 4: //FLAC__METADATA_TYPE_VORBIS_COMMENT + data = _readVorbisComment(p_metadata+16); + break; + + case 5: //FLAC__METADATA_TYPE_CUESHEET + data = _readCueSheetMetadata(p_metadata+16); + break; + + case 6: //FLAC__METADATA_TYPE_PICTURE + data = _readPictureMetadata(p_metadata+16); + break; + default: { //NOTE this should not happen, and the raw data is very likely not correct! + var cod_opts = _getOptions(p_coder); + if(cod_opts && cod_opts.enableRawMetadata){ + var buffer = Uint8Array.from(HEAPU8.subarray(p_metadata+16, p_metadata+16+length)); + meta_data.raw = buffer; + } + } + + } + + meta_data.data = data; + metadata_callback_fn(void(0), meta_data); + } + +}, 'viii'); + + +////////////// helper fields and functions for event handling +// see exported on()/off() functions +var listeners = {}; +var persistedEvents = []; +var add_event_listener = function (eventName, listener){ + var list = listeners[eventName]; + if(!list){ + list = [listener]; + listeners[eventName] = list; + } else { + list.push(listener); + } + check_and_trigger_persisted_event(eventName, listener); +}; +var check_and_trigger_persisted_event = function(eventName, listener){ + var activated; + for(var i=persistedEvents.length-1; i >= 0; --i){ + activated = persistedEvents[i]; + if(activated && activated.event === eventName){ + listener.apply(null, activated.args); + break; + } + } +}; +var remove_event_listener = function (eventName, listener){ + var list = listeners[eventName]; + if(list){ + for(var i=list.length-1; i >= 0; --i){ + if(list[i] === listener){ + list.splice(i, 1); + } + } + } +}; +/** + * HELPER: fire an event + * @param {string} eventName + * the event name + * @param {any[]} [args] OPITIONAL + * the arguments when triggering the listeners + * @param {boolean} [isPersist] OPTIONAL (positinal argument!) + * if TRUE, handlers for this event that will be registered after this will get triggered immediately + * (i.e. event is "persistent": once triggered it stays "active") + * + */ +var do_fire_event = function (eventName, args, isPersist){ + if(_exported['on'+eventName]){ + _exported['on'+eventName].apply(null, args); + } + var list = listeners[eventName]; + if(list){ + for(var i=0, size=list.length; i < size; ++i){ + list[i].apply(null, args) + } + } + if(isPersist){ + persistedEvents.push({event: eventName, args: args}); + } +} + +///////////////////////////////////// export / public: ///////////////////////////////////////////// +/** + * The Flac module that provides functionality + * for encoding WAV/PCM audio to Flac and decoding Flac to PCM. + * + *

+ *

+ * NOTE most functions are named analogous to the original C library functions, + * so that its documentation may be used for further reading. + *

+ * + * @see https://xiph.org/flac/api/group__flac__stream__encoder.html + * @see https://xiph.org/flac/api/group__flac__stream__decoder.html + * + * @class Flac + * @namespace Flac + */ +var _exported = { + _module: Module,//internal: reference to Flac module + _clear_enc_cb: function(enc_ptr){//internal function: remove reference to encoder instance and its callbacks + delete coders[enc_ptr]; + }, + _clear_dec_cb: function(dec_ptr){//internal function: remove reference to decoder instance and its callbacks + delete coders[dec_ptr]; + }, + /** + * Additional options for encoding or decoding + * @interface CodingOptions + * @memberOf Flac + * @property {boolean} [analyseSubframes] for decoding: include subframes metadata in write-callback metadata, DEFAULT: false + * @property {boolean} [analyseResiduals] for decoding: include residual data in subframes metadata in write-callback metadata, NOTE {@link #analyseSubframes} muste also be enabled, DEFAULT: false + * @property {boolean} [enableRawMetadata] DEBUG option for decoding: enable receiving raw metadata for unknown metadata types in second argument in the metadata-callback, DEFAULT: false + * + * @see Flac#setOptions + * @see Flac~metadata_callback_fn + * @see Flac#FLAC__stream_decoder_set_metadata_respond_all + */ + /** + * FLAC raw metadata + * + * @interface MetadataBlock + * @memberOf Flac + * @property {Flac.FLAC__MetadataType} type the type of the metadata + * @property {boolean} isLast if it is the last block of metadata + * @property {number} length the length of the metadata block (bytes) + * @property {Flac.StreamMetadata | Flac.PaddingMetadata | Flac.ApplicationMetadata | Flac.SeekTableMetadata | Flac.CueSheetMetadata | Flac.PictureMetadata} [data] the metadata (omitted for unknown metadata types) + * @property {Uint8Array} [raw] raw metadata (for debugging: enable via {@link Flac#setOptions}) + */ + /** + * FLAC padding metadata block + * + * @interface PaddingMetadata + * @memberOf Flac + * @property {number} dummy Conceptually this is an empty struct since we don't store the padding bytes. Empty structs are not allowed by some C compilers, hence the dummy. + * + * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_PADDING + */ + /** + * FLAC application metadata block + * + * NOTE the application meta data type is not really supported, i.e. the + * (binary) data is only a pointer to the memory heap. + * + * @interface ApplicationMetadata + * @memberOf Flac + * @property {number} id the application ID + * @property {number} data (pointer) + * + * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_APPLICATION + * @see application block format specification + */ + /** + * FLAC seek table metadata block + * + *

+ * From the format specification: + * + * The seek points must be sorted by ascending sample number. + * + * Each seek point's sample number must be the first sample of the target frame. + * + * Each seek point's sample number must be unique within the table + * + * Existence of a SEEKTABLE block implies a correct setting of total_samples in the stream_info block. + * + * Behavior is undefined when more than one SEEKTABLE block is present in a stream. + * + * @interface SeekTableMetadata + * @memberOf Flac + * @property {number} num_points the number of seek points + * @property {Flac.SeekPoint[]} points the seek points + * + * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_SEEKTABLE + */ + /** + * FLAC seek point data + * + * @interface SeekPoint + * @memberOf Flac + * @property {number} sample_number The sample number of the target frame. NOTE -1 for a placeholder point. + * @property {number} stream_offset The offset, in bytes, of the target frame with respect to beginning of the first frame. + * @property {number} frame_samples The number of samples in the target frame. + * + * @see Flac.SeekTableMetadata + */ + /** + * FLAC vorbis comment metadata block + * + * @interface VorbisCommentMetadata + * @memberOf Flac + * @property {string} vendor_string the vendor string + * @property {number} num_comments the number of comments + * @property {string[]} comments the comments + * + * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_VORBIS_COMMENT + */ + /** + * FLAC cue sheet metadata block + * + * @interface CueSheetMetadata + * @memberOf Flac + * @property {string} media_catalog_number Media catalog number, in ASCII printable characters 0x20-0x7e. In general, the media catalog number may be 0 to 128 bytes long. + * @property {number} lead_in The number of lead-in samples. + * @property {boolean} is_cd true if CUESHEET corresponds to a Compact Disc, else false. + * @property {number} num_tracks The number of tracks. + * @property {Flac.CueSheetTrack[]} tracks the tracks + * + * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_CUESHEET + */ + /** + * FLAC cue sheet track data + * + * @interface CueSheetTrack + * @memberOf Flac + * @property {number} offset Track offset in samples, relative to the beginning of the FLAC audio stream. + * @property {number} number The track number. + * @property {string} isrc Track ISRC. This is a 12-digit alphanumeric code. + * @property {"AUDIO" | "NON_AUDIO"} type The track type: audio or non-audio. + * @property {boolean} pre_emphasis The pre-emphasis flag + * @property {number} num_indices The number of track index points. + * @property {Flac.CueSheetTracIndex} indices The track index points. + * + * @see Flac.CueSheetMetadata + */ + /** + * FLAC track index data for cue sheet metadata + * + * @interface CueSheetTracIndex + * @memberOf Flac + * @property {number} offset Offset in samples, relative to the track offset, of the index point. + * @property {number} number The index point number. + * + * @see Flac.CueSheetTrack + */ + /** + * FLAC picture metadata block + * + * @interface PictureMetadata + * @memberOf Flac + * @property {Flac.FLAC__StreamMetadata_Picture_Type} type The kind of picture stored. + * @property {string} mime_type Picture data's MIME type, in ASCII printable characters 0x20-0x7e, NUL terminated. For best compatibility with players, use picture data of MIME type image/jpeg or image/png. A MIME type of '–>' is also allowed, in which case the picture data should be a complete URL. + * @property {string} description Picture's description. + * @property {number} width Picture's width in pixels. + * @property {number} height Picture's height in pixels. + * @property {number} depth Picture's color depth in bits-per-pixel. + * @property {number} colors For indexed palettes (like GIF), picture's number of colors (the number of palette entries), or 0 for non-indexed (i.e. 2^depth). + * @property {number} data_length Length of binary picture data in bytes. + * @property {Uint8Array} data Binary picture data. + */ + /** + * An enumeration of the PICTURE types (see FLAC__StreamMetadataPicture and id3 v2.4 APIC tag). + * + * @interface FLAC__StreamMetadata_Picture_Type + * @memberOf Flac + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_OTHER"} 0 Other + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON_STANDARD"} 1 32x32 pixels 'file icon' (PNG only) + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON"} 2 Other file icon + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER"} 3 Cover (front) + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_BACK_COVER"} 4 Cover (back) + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_LEAFLET_PAGE"} 5 Leaflet page + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_MEDIA"} 6 Media (e.g. label side of CD) + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_LEAD_ARTIST"} 7 Lead artist/lead performer/soloist + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_ARTIST"} 8 Artist/performer + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_CONDUCTOR"} 9 Conductor + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_BAND"} 10 Band/Orchestra + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_COMPOSER"} 11 Composer + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_LYRICIST"} 12 Lyricist/text writer + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_RECORDING_LOCATION"} 13 Recording Location + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_RECORDING"} 14 During recording + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_PERFORMANCE"} 15 During performance + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_VIDEO_SCREEN_CAPTURE"} 16 Movie/video screen capture + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_FISH"} 17 A bright coloured fish + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_ILLUSTRATION"} 18 Illustration + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_BAND_LOGOTYPE"} 19 Band/artist logotype + * @property {"FLAC__STREAM_METADATA_PICTURE_TYPE_PUBLISHER_LOGOTYPE"} 20 Publisher/Studio logotype + * + * @see Flac.PictureMetadata + */ + + /** + * An enumeration of the available metadata block types. + * + * @interface FLAC__MetadataType + * @memberOf Flac + * + * @property {"FLAC__METADATA_TYPE_STREAMINFO"}  0 STREAMINFO block + * @property {"FLAC__METADATA_TYPE_PADDING"}  1 PADDING block + * @property {"FLAC__METADATA_TYPE_APPLICATION"}  2 APPLICATION block + * @property {"FLAC__METADATA_TYPE_SEEKTABLE"}  3 SEEKTABLE block + * @property {"FLAC__METADATA_TYPE_VORBIS_COMMENT"}  4 VORBISCOMMENT block (a.k.a. FLAC tags) + * @property {"FLAC__METADATA_TYPE_CUESHEET"}  5 CUESHEET block + * @property {"FLAC__METADATA_TYPE_PICTURE"}  6 PICTURE block + * @property {"FLAC__METADATA_TYPE_UNDEFINED"}  7 marker to denote beginning of undefined type range; this number will increase as new metadata types are added + * @property {"FLAC__MAX_METADATA_TYPE"}  126 No type will ever be greater than this. There is not enough room in the protocol block. + * + * @see Flac.MetadataBlock + * @see FLAC format documentation + */ + /** + * @function + * @public + * @memberOf Flac# + * @copydoc Flac._setOptions + */ + setOptions: _setOptions, + /** + * @function + * @public + * @memberOf Flac# + * @copydoc Flac._getOptions + */ + getOptions: _getOptions, + /** + * Returns if Flac has been initialized / is ready to be used. + * + * @returns {boolean} true, if Flac is ready to be used + * + * @memberOf Flac# + * @function + * @see #onready + * @see #on + */ + isReady: function() { return _flac_ready; }, + /** + * Hook for handler function that gets called, when asynchronous initialization has finished. + * + * NOTE that if the execution environment does not support Object#defineProperty, then + * this function is not called, after {@link #isReady} is true. + * In this case, {@link #isReady} should be checked, before setting onready + * and if it is true, handler should be executed immediately instead of setting onready. + * + * @memberOf Flac# + * @function + * @param {Flac.event:ReadyEvent} event the ready-event object + * @see #isReady + * @see #on + * @default undefined + * @example + * // [1] if Object.defineProperty() IS supported: + * Flac.onready = function(event){ + * //gets executed when library becomes ready, or immediately, if it already is ready... + * doSomethingWithFlac(); + * }; + * + * // [2] if Object.defineProperty() is NOT supported: + * // do check Flac.isReady(), and only set handler, if not ready yet + * // (otherwise immediately excute handler code) + * if(!Flac.isReady()){ + * Flac.onready = function(event){ + * //gets executed when library becomes ready... + * doSomethingWithFlac(); + * }; + * } else { + * // Flac is already ready: immediately start processing + * doSomethingWithFlac(); + * } + */ + onready: void(0), + /** + * Ready event: is fired when the library has been initialized and is ready to be used + * (e.g. asynchronous loading of binary / WASM modules has been completed). + * + * Before this event is fired, use of functions related to encoding and decoding may + * cause errors. + * + * @event ReadyEvent + * @memberOf Flac + * @type {object} + * @property {"ready"} type the type of the event "ready" + * @property {Flac} target the initalized FLAC library instance + * + * @see #isReady + * @see #on + */ + /** + * Created event: is fired when an encoder or decoder was created. + * + * @event CreatedEvent + * @memberOf Flac + * @type {object} + * @property {"created"} type the type of the event "created" + * @property {Flac.CoderChangedEventData} target the information for the created encoder or decoder + * + * @see #on + */ + /** + * Destroyed event: is fired when an encoder or decoder was destroyed. + * + * @event DestroyedEvent + * @memberOf Flac + * @type {object} + * @property {"destroyed"} type the type of the event "destroyed" + * @property {Flac.CoderChangedEventData} target the information for the destroyed encoder or decoder + * + * @see #on + */ + /** + * Life cycle event data for signaling life cycle changes of encoder or decoder instances + * @interface CoderChangedEventData + * @memberOf Flac + * @property {number} id the ID for the encoder or decoder instance + * @property {"encoder" | "decoder"} type signifies whether the event is for an encoder or decoder instance + * @property {any} [data] specific data for the life cycle change + * + * @see Flac.event:CreatedEvent + * @see Flac.event:DestroyedEvent + */ + /** + * Add an event listener for module-events. + * Supported events: + *

    + *
  • "ready" → {@link Flac.event:ReadyEvent}: emitted when module is ready for usage (i.e. {@link #isReady} is true)
    + * NOTE listener will get immediately triggered if module is already "ready" + *
  • + *
  • "created" → {@link Flac.event:CreatedEvent}: emitted when an encoder or decoder instance was created
    + *
  • + *
  • "destroyed" → {@link Flac.event:DestroyedEvent}: emitted when an encoder or decoder instance was destroyed
    + *
  • + *
+ * + * @param {string} eventName + * @param {Function} listener + * + * @memberOf Flac# + * @function + * @see #off + * @see #onready + * @see Flac.event:ReadyEvent + * @see Flac.event:CreatedEvent + * @see Flac.event:DestroyedEvent + * @example + * Flac.on('ready', function(event){ + * //gets executed when library is ready, or becomes ready... + * }); + */ + on: add_event_listener, + /** + * Remove an event listener for module-events. + * @param {string} eventName + * @param {Function} listener + * + * @memberOf Flac# + * @function + * @see #on + */ + off: remove_event_listener, + + /** + * Set the "verify" flag. If true, the encoder will verify it's own encoded output by feeding it through an internal decoder and comparing the original signal against the decoded signal. If a mismatch occurs, the process call will return false. Note that this will slow the encoding process by the extra time required for decoding and comparison. + * + *

+ * NOTE: only use on un-initilized encoder instances! + * + * @param {number} encoder + * the ID of the encoder instance + * + * @param {boolean} is_verify enable/disable checksum verification during encoding + * + * @returns {boolean} false if the encoder is already initialized, else true + * + * @see #create_libflac_encoder + * @see #FLAC__stream_encoder_get_verify + * + * @memberOf Flac# + * @function + */ + FLAC__stream_encoder_set_verify: function(encoder, is_verify){ + is_verify = is_verify? 1 : 0; + Module.ccall('FLAC__stream_encoder_set_verify', 'number', ['number', 'number'], [ encoder, is_verify ]); + }, + /** + * Set the compression level + * + * The compression level is roughly proportional to the amount of effort the encoder expends to compress the file. A higher level usually means more computation but higher compression. The default level is suitable for most applications. + * + * Currently the levels range from 0 (fastest, least compression) to 8 (slowest, most compression). A value larger than 8 will be treated as 8. + * + * + *

+ * NOTE: only use on un-initilized encoder instances! + * + * @param {number} encoder + * the ID of the encoder instance + * + * @param {Flac.CompressionLevel} compression_level the desired Flac compression level: [0, 8] + * + * @returns {boolean} false if the encoder is already initialized, else true + * + * @see #create_libflac_encoder + * @see Flac.CompressionLevel + * @see FLAC API for FLAC__stream_encoder_set_compression_level() + * + * @memberOf Flac# + * @function + */ + FLAC__stream_encoder_set_compression_level: Module.cwrap('FLAC__stream_encoder_set_compression_level', 'number', [ 'number', 'number' ]), + /** + * Set the blocksize to use while encoding. + * The number of samples to use per frame. Use 0 to let the encoder estimate a blocksize; this is usually best. + * + *

+ * NOTE: only use on un-initilized encoder instances! + * + * @param {number} encoder + * the ID of the encoder instance + * + * @param {number} block_size the number of samples to use per frame + * + * @returns {boolean} false if the encoder is already initialized, else true + * + * @see #create_libflac_encoder + * + * @memberOf Flac# + * @function + */ + FLAC__stream_encoder_set_blocksize: Module.cwrap('FLAC__stream_encoder_set_blocksize', 'number', [ 'number', 'number']), + + + /** + * Get the state of the verify stream decoder. Useful when the stream encoder state is FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR. + * + * @param {number} encoder + * the ID of the encoder instance + * + * @returns {Flac.FLAC__StreamDecoderState} the verify stream decoder state + * + * @memberOf Flac# + * @function + */ + FLAC__stream_encoder_get_verify_decoder_state: Module.cwrap('FLAC__stream_encoder_get_verify_decoder_state', 'number', ['number']), + + /** + * Get the "verify" flag for the encoder. + * + * @param {number} encoder + * the ID of the encoder instance + * + * @returns {boolean} the verify flag for the encoder + * + * + * @memberOf Flac# + * @function + * + * @see #FLAC__stream_encoder_set_verify + */ + FLAC__stream_encoder_get_verify: Module.cwrap('FLAC__stream_encoder_get_verify', 'number', ['number']), +/* + +TODO export other encoder API functions?: + +FLAC__bool FLAC__stream_encoder_set_channels (FLAC__StreamEncoder *encoder, unsigned value) + +FLAC__bool FLAC__stream_encoder_set_bits_per_sample (FLAC__StreamEncoder *encoder, unsigned value) + +FLAC__bool FLAC__stream_encoder_set_sample_rate (FLAC__StreamEncoder *encoder, unsigned value) + +FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo (FLAC__StreamEncoder *encoder, FLAC__bool value) + +FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo (FLAC__StreamEncoder *encoder, FLAC__bool value) + +FLAC__bool FLAC__stream_encoder_set_apodization (FLAC__StreamEncoder *encoder, const char *specification) + +FLAC__bool FLAC__stream_encoder_set_max_lpc_order (FLAC__StreamEncoder *encoder, unsigned value) + +FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision (FLAC__StreamEncoder *encoder, unsigned value) + +FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search (FLAC__StreamEncoder *encoder, FLAC__bool value) + +FLAC__bool FLAC__stream_encoder_set_do_escape_coding (FLAC__StreamEncoder *encoder, FLAC__bool value) + +FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search (FLAC__StreamEncoder *encoder, FLAC__bool value) + +FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order (FLAC__StreamEncoder *encoder, unsigned value) + +FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order (FLAC__StreamEncoder *encoder, unsigned value) + +FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist (FLAC__StreamEncoder *encoder, unsigned value) + +FLAC__bool FLAC__stream_encoder_get_streamable_subset (const FLAC__StreamEncoder *encoder) + +unsigned FLAC__stream_encoder_get_channels (const FLAC__StreamEncoder *encoder) + +unsigned FLAC__stream_encoder_get_bits_per_sample (const FLAC__StreamEncoder *encoder) + +unsigned FLAC__stream_encoder_get_sample_rate (const FLAC__StreamEncoder *encoder) + +unsigned FLAC__stream_encoder_get_blocksize (const FLAC__StreamEncoder *encoder) + +FLAC__bool FLAC__stream_encoder_get_do_mid_side_stereo (const FLAC__StreamEncoder *encoder) + +FLAC__bool FLAC__stream_encoder_get_loose_mid_side_stereo (const FLAC__StreamEncoder *encoder) + +unsigned FLAC__stream_encoder_get_max_lpc_order (const FLAC__StreamEncoder *encoder) + +unsigned FLAC__stream_encoder_get_qlp_coeff_precision (const FLAC__StreamEncoder *encoder) + +FLAC__bool FLAC__stream_encoder_get_do_qlp_coeff_prec_search (const FLAC__StreamEncoder *encoder) + +FLAC__bool FLAC__stream_encoder_get_do_escape_coding (const FLAC__StreamEncoder *encoder) + +FLAC__bool FLAC__stream_encoder_get_do_exhaustive_model_search (const FLAC__StreamEncoder *encoder) + +unsigned FLAC__stream_encoder_get_min_residual_partition_order (const FLAC__StreamEncoder *encoder) + +unsigned FLAC__stream_encoder_get_max_residual_partition_order (const FLAC__StreamEncoder *encoder) + +unsigned FLAC__stream_encoder_get_rice_parameter_search_dist (const FLAC__StreamEncoder *encoder) + +FLAC__uint64 FLAC__stream_encoder_get_total_samples_estimate (const FLAC__StreamEncoder *encoder) + + + +TODO export other decoder API functions?: + + +const char * FLAC__stream_decoder_get_resolved_state_string (const FLAC__StreamDecoder *decoder) + +FLAC__uint64 FLAC__stream_decoder_get_total_samples (const FLAC__StreamDecoder *decoder) + +unsigned FLAC__stream_decoder_get_channels (const FLAC__StreamDecoder *decoder) + +unsigned FLAC__stream_decoder_get_bits_per_sample (const FLAC__StreamDecoder *decoder) + +unsigned FLAC__stream_decoder_get_sample_rate (const FLAC__StreamDecoder *decoder) + +unsigned FLAC__stream_decoder_get_blocksize (const FLAC__StreamDecoder *decoder) + + +FLAC__bool FLAC__stream_decoder_flush (FLAC__StreamDecoder *decoder) + +FLAC__bool FLAC__stream_decoder_skip_single_frame (FLAC__StreamDecoder *decoder) + + */ + + /** + * Set the compression level + * + * The compression level is roughly proportional to the amount of effort the encoder expends to compress the file. A higher level usually means more computation but higher compression. The default level is suitable for most applications. + * + * Currently the levels range from 0 (fastest, least compression) to 8 (slowest, most compression). A value larger than 8 will be treated as 8. + * + * This function automatically calls the following other set functions with appropriate values, so the client does not need to unless it specifically wants to override them: + *

+	 *     FLAC__stream_encoder_set_do_mid_side_stereo()
+	 *     FLAC__stream_encoder_set_loose_mid_side_stereo()
+	 *     FLAC__stream_encoder_set_apodization()
+	 *     FLAC__stream_encoder_set_max_lpc_order()
+	 *     FLAC__stream_encoder_set_qlp_coeff_precision()
+	 *     FLAC__stream_encoder_set_do_qlp_coeff_prec_search()
+	 *     FLAC__stream_encoder_set_do_escape_coding()
+	 *     FLAC__stream_encoder_set_do_exhaustive_model_search()
+	 *     FLAC__stream_encoder_set_min_residual_partition_order()
+	 *     FLAC__stream_encoder_set_max_residual_partition_order()
+	 *     FLAC__stream_encoder_set_rice_parameter_search_dist()
+	 * 
+ * The actual values set for each level are: + * | level | do mid-side stereo | loose mid-side stereo | apodization | max lpc order | qlp coeff precision | qlp coeff prec search | escape coding | exhaustive model search | min residual partition order | max residual partition order | rice parameter search dist | + * |--------|---------------------|------------------------|------------------------------------------------|----------------|----------------------|------------------------|----------------|--------------------------|-------------------------------|-------------------------------|------------------------------| + * | 0 | false | false | tukey(0.5) | 0 | 0 | false | false | false | 0 | 3 | 0 | + * | 1 | true | true | tukey(0.5) | 0 | 0 | false | false | false | 0 | 3 | 0 | + * | 2 | true | false | tukey(0.5) | 0 | 0 | false | false | false | 0 | 3 | 0 | + * | 3 | false | false | tukey(0.5) | 6 | 0 | false | false | false | 0 | 4 | 0 | + * | 4 | true | true | tukey(0.5) | 8 | 0 | false | false | false | 0 | 4 | 0 | + * | 5 | true | false | tukey(0.5) | 8 | 0 | false | false | false | 0 | 5 | 0 | + * | 6 | true | false | tukey(0.5);partial_tukey(2) | 8 | 0 | false | false | false | 0 | 6 | 0 | + * | 7 | true | false | tukey(0.5);partial_tukey(2) | 12 | 0 | false | false | false | 0 | 6 | 0 | + * | 8 | true | false | tukey(0.5);partial_tukey(2);punchout_tukey(3) | 12 | 0 | false | false | false | 0 | 6 | 0 | + * + * @interface CompressionLevel + * @memberOf Flac + * + * @property {"FLAC__COMPRESSION_LEVEL_0"} 0 compression level 0 + * @property {"FLAC__COMPRESSION_LEVEL_1"} 1 compression level 1 + * @property {"FLAC__COMPRESSION_LEVEL_2"} 2 compression level 2 + * @property {"FLAC__COMPRESSION_LEVEL_3"} 3 compression level 3 + * @property {"FLAC__COMPRESSION_LEVEL_4"} 4 compression level 4 + * @property {"FLAC__COMPRESSION_LEVEL_5"} 5 compression level 5 + * @property {"FLAC__COMPRESSION_LEVEL_6"} 6 compression level 6 + * @property {"FLAC__COMPRESSION_LEVEL_7"} 7 compression level 7 + * @property {"FLAC__COMPRESSION_LEVEL_8"} 8 compression level 8 + */ + /** + * Create an encoder. + * + * @param {number} sample_rate + * the sample rate of the input PCM data + * @param {number} channels + * the number of channels of the input PCM data + * @param {number} bps + * bits per sample of the input PCM data + * @param {Flac.CompressionLevel} compression_level + * the desired Flac compression level: [0, 8] + * @param {number} [total_samples] OPTIONAL + * the number of total samples of the input PCM data:
+ * Sets an estimate of the total samples that will be encoded. + * This is merely an estimate and may be set to 0 if unknown. + * This value will be written to the STREAMINFO block before encoding, + * and can remove the need for the caller to rewrite the value later if + * the value is known before encoding.
+ * If specified, the it will be written into metadata of the FLAC header.
+ * DEFAULT: 0 (i.e. unknown number of samples) + * @param {boolean} [is_verify] OPTIONAL + * enable/disable checksum verification during encoding
+ * DEFAULT: true
+ * NOTE: this argument is positional (i.e. total_samples must also be given) + * @param {number} [block_size] OPTIONAL + * the number of samples to use per frame.
+ * DEFAULT: 0 (i.e. encoder sets block size automatically) + * NOTE: this argument is positional (i.e. total_samples and is_verify must also be given) + * + * + * @returns {number} the ID of the created encoder instance (or 0, if there was an error) + * + * @memberOf Flac# + * @function + */ + create_libflac_encoder: function(sample_rate, channels, bps, compression_level, total_samples, is_verify, block_size){ + is_verify = typeof is_verify === 'undefined'? 1 : is_verify + 0; + total_samples = typeof total_samples === 'number'? total_samples : 0; + block_size = typeof block_size === 'number'? block_size : 0; + var ok = true; + var encoder = Module.ccall('FLAC__stream_encoder_new', 'number', [ ], [ ]); + ok &= Module.ccall('FLAC__stream_encoder_set_verify', 'number', ['number', 'number'], [ encoder, is_verify ]); + ok &= Module.ccall('FLAC__stream_encoder_set_compression_level', 'number', ['number', 'number'], [ encoder, compression_level ]); + ok &= Module.ccall('FLAC__stream_encoder_set_channels', 'number', ['number', 'number'], [ encoder, channels ]); + ok &= Module.ccall('FLAC__stream_encoder_set_bits_per_sample', 'number', ['number', 'number'], [ encoder, bps ]); + ok &= Module.ccall('FLAC__stream_encoder_set_sample_rate', 'number', ['number', 'number'], [ encoder, sample_rate ]); + ok &= Module.ccall('FLAC__stream_encoder_set_blocksize', 'number', [ 'number', 'number'], [ encoder, block_size ]); + ok &= Module.ccall('FLAC__stream_encoder_set_total_samples_estimate', 'number', ['number', 'number'], [ encoder, total_samples ]); + if (ok){ + do_fire_event('created', [{type: 'created', target: {id: encoder, type: 'encoder'}}], false); + return encoder; + } + return 0; + }, + /** + * @deprecated use {@link #create_libflac_encoder} instead + * @memberOf Flac# + * @function + */ + init_libflac_encoder: function(){ + console.warn('Flac.init_libflac_encoder() is deprecated, use Flac.create_libflac_encoder() instead!'); + return this.create_libflac_encoder.apply(this, arguments); + }, + + /** + * Create a decoder. + * + * @param {boolean} [is_verify] + * enable/disable checksum verification during decoding
+ * DEFAULT: true + * + * @returns {number} the ID of the created decoder instance (or 0, if there was an error) + * + * @memberOf Flac# + * @function + */ + create_libflac_decoder: function(is_verify){ + is_verify = typeof is_verify === 'undefined'? 1 : is_verify + 0; + var ok = true; + var decoder = Module.ccall('FLAC__stream_decoder_new', 'number', [ ], [ ]); + ok &= Module.ccall('FLAC__stream_decoder_set_md5_checking', 'number', ['number', 'number'], [ decoder, is_verify ]); + if (ok){ + do_fire_event('created', [{type: 'created', target: {id: decoder, type: 'decoder'}}], false); + return decoder; + } + return 0; + }, + /** + * @deprecated use {@link #create_libflac_decoder} instead + * @memberOf Flac# + * @function + */ + init_libflac_decoder: function(){ + console.warn('Flac.init_libflac_decoder() is deprecated, use Flac.create_libflac_decoder() instead!'); + return this.create_libflac_decoder.apply(this, arguments); + }, + /** + * The callback for writing the encoded FLAC data. + * + * @callback Flac~encoder_write_callback_fn + * @param {Uint8Array} data the encoded FLAC data + * @param {number} numberOfBytes the number of bytes in data + * @param {number} samples the number of samples encoded in data + * @param {number} currentFrame the number of the (current) encoded frame in data + * @returns {void | false} returning false indicates that an + * unrecoverable error occurred and decoding should be aborted + */ + /** + * The callback for the metadata of the encoded/decoded Flac data. + * + * By default, only the STREAMINFO metadata is enabled. + * + * For other metadata types {@link Flac.FLAC__MetadataType} they need to be enabled, + * see e.g. {@link Flac#FLAC__stream_decoder_set_metadata_respond} + * + * @callback Flac~metadata_callback_fn + * @param {Flac.StreamMetadata | undefined} metadata the FLAC meta data, NOTE only STREAMINFO is returned in first argument, for other types use 2nd argument's metadataBlock.data + * @param {Flac.MetadataBlock} metadataBlock the detailed meta data block + * + * @see Flac#init_decoder_stream + * @see Flac#init_encoder_stream + * @see Flac.CodingOptions + * @see Flac#FLAC__stream_decoder_set_metadata_respond_all + */ + /** + * FLAC meta data + * @interface Metadata + * @memberOf Flac + * @property {number} sampleRate the sample rate (Hz) + * @property {number} channels the number of channels + * @property {number} bitsPerSample bits per sample + */ + /** + * FLAC stream meta data + * @interface StreamMetadata + * @memberOf Flac + * @augments Flac.Metadata + * @property {number} min_blocksize the minimal block size (bytes) + * @property {number} max_blocksize the maximal block size (bytes) + * @property {number} min_framesize the minimal frame size (bytes) + * @property {number} max_framesize the maximal frame size (bytes) + * @property {number} total_samples the total number of (encoded/decoded) samples + * @property {string} md5sum the MD5 checksum for the decoded data (if validation is active) + */ + /** + * Initialize the encoder. + * + * @param {number} encoder + * the ID of the encoder instance that has not been initialized (or has been reset) + * + * @param {Flac~encoder_write_callback_fn} write_callback_fn + * the callback for writing the encoded Flac data: + *
write_callback_fn(data: Uint8Array, numberOfBytes: Number, samples: Number, currentFrame: Number)
+ * + * @param {Flac~metadata_callback_fn} [metadata_callback_fn] OPTIONAL + * the callback for the metadata of the encoded Flac data: + *
metadata_callback_fn(metadata: StreamMetadata)
+ * + * @param {number|boolean} [ogg_serial_number] OPTIONAL + * if number or true is specified, the encoder will be initialized to + * write to an OGG container, see {@link Flac.init_encoder_ogg_stream}: + * true will set a default serial number (1), + * if specified as number, it will be used as the stream's serial number within the ogg container. + * + * @returns {Flac.FLAC__StreamEncoderInitStatus} the encoder status (0 for FLAC__STREAM_ENCODER_INIT_STATUS_OK) + * + * @memberOf Flac# + * @function + */ + init_encoder_stream: function(encoder, write_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){ + + var is_ogg = (ogg_serial_number === true); + client_data = client_data|0; + + if(typeof write_callback_fn !== 'function'){ + return FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS; + } + setCallback(encoder, 'write', write_callback_fn); + + var __metadata_callback_fn_ptr = 0; + if(typeof metadata_callback_fn === 'function'){ + setCallback(encoder, 'metadata', metadata_callback_fn); + __metadata_callback_fn_ptr = metadata_fn_ptr; + } + + //NOTE the following comments are used for auto-detecting exported functions (only change if ccall function name(s) change!): + // Module.ccall('FLAC__stream_encoder_init_stream' + var func_name = 'FLAC__stream_encoder_init_stream'; + var args_types = ['number', 'number', 'number', 'number', 'number', 'number']; + var args = [ + encoder, + enc_write_fn_ptr, + 0,// FLAC__StreamEncoderSeekCallback + 0,// FLAC__StreamEncoderTellCallback + __metadata_callback_fn_ptr, + client_data + ]; + + if(typeof ogg_serial_number === 'number'){ + + is_ogg = true; + + } else if(is_ogg){//else: set default serial number for stream in OGG container + + //NOTE from FLAC docs: "It is recommended to set a serial number explicitly as the default of '0' may collide with other streams." + ogg_serial_number = 1; + } + + if(is_ogg){ + //NOTE the following comments are used for auto-detecting exported functions (only change if ccall function name(s) change!): + // Module.ccall('FLAC__stream_encoder_init_ogg_stream' + func_name = 'FLAC__stream_encoder_init_ogg_stream'; + + //2nd arg: FLAC__StreamEncoderReadCallback ptr -> duplicate first entry & insert at [1] + args.unshift(args[0]); + args[1] = 0;// FLAC__StreamEncoderReadCallback + + args_types.unshift(args_types[0]); + args_types[1] = 'number'; + + + //NOTE ignore BOOL return value when setting serial number, since init-call's returned + // status will also indicate, if encoder already has been initialized + Module.ccall( + 'FLAC__stream_encoder_set_ogg_serial_number', 'number', + ['number', 'number'], + [ encoder, ogg_serial_number ] + ); + } + + var init_status = Module.ccall(func_name, 'number', args_types, args); + + return init_status; + }, + /** + * Initialize the encoder for writing to an OGG container. + * + * @param {number} [ogg_serial_number] OPTIONAL + * the serial number for the stream in the OGG container + * DEFAULT: 1 + * + * @memberOf Flac# + * @function + * @copydoc #init_encoder_stream + */ + init_encoder_ogg_stream: function(encoder, write_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){ + + if(typeof ogg_serial_number !== 'number'){ + ogg_serial_number = true; + } + return this.init_encoder_stream(encoder, write_callback_fn, metadata_callback_fn, ogg_serial_number, client_data); + }, + /** + * Result / return value for {@link Flac~decoder_read_callback_fn} callback function + * + * @interface ReadResult + * @memberOf Flac + * @property {TypedArray} buffer a TypedArray (e.g. Uint8Array) with the read data + * @property {number} readDataLength the number of read data bytes. A number of 0 (zero) indicates that the end-of-stream is reached. + * @property {boolean} [error] OPTIONAL value of true indicates that an error occured (decoding will be aborted) + */ + /** + * Result / return value for {@link Flac~decoder_read_callback_fn} callback function for signifying that there is no more data to read + * + * @interface CompletedReadResult + * @memberOf Flac + * @augments Flac.ReadResult + * @property {TypedArray | undefined} buffer a TypedArray (e.g. Uint8Array) with the read data (will be ignored in case readDataLength is 0) + * @property {0} readDataLength the number of read data bytes: The number of 0 (zero) indicates that the end-of-stream is reached. + */ + /** + * The callback for reading the FLAC data that will be decoded. + * + * @callback Flac~decoder_read_callback_fn + * @param {number} numberOfBytes the maximal number of bytes that the read callback can return + * @returns {Flac.ReadResult | Flac.CompletedReadResult} the result of the reading action/request + */ + /** + * The callback for writing the decoded FLAC data. + * + * @callback Flac~decoder_write_callback_fn + * @param {Uint8Array[]} data array of the channels with the decoded PCM data as Uint8Arrays + * @param {Flac.BlockMetadata} frameInfo the metadata information for the decoded data + */ + /** + * The callback for reporting decoding errors. + * + * @callback Flac~decoder_error_callback_fn + * @param {number} errorCode the error code + * @param {Flac.FLAC__StreamDecoderErrorStatus} errorDescription the string representation / description of the error + */ + /** + * FLAC block meta data + * @interface BlockMetadata + * @augments Flac.Metadata + * @memberOf Flac + * + * @property {number} blocksize the block size (bytes) + * @property {number} number the number of the decoded samples or frames + * @property {string} numberType the type to which number refers to: either "frames" or "samples" + * @property {Flac.FLAC__ChannelAssignment} channelAssignment the channel assignment + * @property {string} crc the MD5 checksum for the decoded data, if validation is enabled + * @property {Flac.SubFrameMetadata[]} [subframes] the metadata of the subframes. The array length corresponds to the number of channels. NOTE will only be included if {@link Flac.CodingOptions CodingOptions.analyseSubframes} is enabled for the decoder. + * + * @see Flac.CodingOptions + * @see Flac#setOptions + */ + /** + * FLAC subframe metadata + * @interface SubFrameMetadata + * @memberOf Flac + * + * @property {Flac.FLAC__SubframeType} type the type of the subframe + * @property {number|Flac.FixedSubFrameData|Flac.LPCSubFrameData} data the type specific metadata for subframe + * @property {number} wastedBits the wasted bits-per-sample + */ + /** + * metadata for FIXED subframe type + * @interface FixedSubFrameData + * @memberOf Flac + * + * @property {number} order The polynomial order. + * @property {number[]} warmup Warmup samples to prime the predictor, length == order. + * @property {Flac.SubFramePartition} partition The residual coding method. + * @property {number[]} [residual] The residual signal, length == (blocksize minus order) samples. + * NOTE will only be included if {@link Flac.CodingOptions CodingOptions.analyseSubframes} is enabled for the decoder. + */ + /** + * metadata for LPC subframe type + * @interface LPCSubFrameData + * @augments Flac.FixedSubFrameData + * @memberOf Flac + * + * @property {number} order The FIR order. + * @property {number[]} qlp_coeff FIR filter coefficients. + * @property {number} qlp_coeff_precision Quantized FIR filter coefficient precision in bits. + * @property {number} quantization_level The qlp coeff shift needed. + */ + /** + * metadata for FIXED or LPC subframe partitions + * @interface SubFramePartition + * @memberOf Flac + * + * @property {Flac.FLAC__EntropyCodingMethodType} type the entropy coding method + * @property {Flac.SubFramePartitionData} data metadata for a Rice partitioned residual + */ + /** + * metadata for FIXED or LPC subframe partition data + * @interface SubFramePartitionData + * @memberOf Flac + * + * @property {number} order The partition order, i.e. # of contexts = 2 ^ order. + * @property {Flac.SubFramePartitionContent} contents The context's Rice parameters and/or raw bits. + */ + /** + * metadata for FIXED or LPC subframe partition data content + * @interface SubFramePartitionContent + * @memberOf Flac + * + * @property {number[]} parameters The Rice parameters for each context. + * @property {number[]} rawBits Widths for escape-coded partitions. Will be non-zero for escaped partitions and zero for unescaped partitions. + * @property {number} capacityByOrder The capacity of the parameters and raw_bits arrays specified as an order, i.e. the number of array elements allocated is 2 ^ capacity_by_order. + */ + /** + * The types for FLAC subframes + * + * @interface FLAC__SubframeType + * @memberOf Flac + * + * @property {"FLAC__SUBFRAME_TYPE_CONSTANT"}  0 constant signal + * @property {"FLAC__SUBFRAME_TYPE_VERBATIM"}  1 uncompressed signal + * @property {"FLAC__SUBFRAME_TYPE_FIXED"}  2 fixed polynomial prediction + * @property {"FLAC__SUBFRAME_TYPE_LPC"}  3 linear prediction + */ + /** + * The channel assignment for the (decoded) frame. + * + * @interface FLAC__ChannelAssignment + * @memberOf Flac + * + * @property {"FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT"} 0 independent channels + * @property {"FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE"} 1 left+side stereo + * @property {"FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE"} 2 right+side stereo + * @property {"FLAC__CHANNEL_ASSIGNMENT_MID_SIDE"} 3 mid+side stereo + */ + /** + * entropy coding methods + * + * @interface FLAC__EntropyCodingMethodType + * @memberOf Flac + * + * @property {"FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE"}  0 Residual is coded by partitioning into contexts, each with it's own 4-bit Rice parameter. + * @property {"FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2"}  1 Residual is coded by partitioning into contexts, each with it's own 5-bit Rice parameter. + */ + /** + * Initialize the decoder. + * + * @param {number} decoder + * the ID of the decoder instance that has not been initialized (or has been reset) + * + * @param {Flac~decoder_read_callback_fn} read_callback_fn + * the callback for reading the Flac data that should get decoded: + *
read_callback_fn(numberOfBytes: Number) : {buffer: ArrayBuffer, readDataLength: number, error: boolean}
+ * + * @param {Flac~decoder_write_callback_fn} write_callback_fn + * the callback for writing the decoded data: + *
write_callback_fn(data: Uint8Array[], frameInfo: Metadata)
+ * + * @param {Flac~decoder_error_callback_fn} error_callback_fn + * the error callback: + *
error_callback_fn(errorCode: Number, errorDescription: String)
+ * + * @param {Flac~metadata_callback_fn} [metadata_callback_fn] OPTIONAL + * callback for receiving the metadata of FLAC data that will be decoded: + *
metadata_callback_fn(metadata: StreamMetadata)
+ * + * @param {number|boolean} [ogg_serial_number] OPTIONAL + * if number or true is specified, the decoder will be initilized to + * read from an OGG container, see {@link Flac.init_decoder_ogg_stream}:
+ * true will use the default serial number, if specified as number the + * corresponding stream with the serial number from the ogg container will be used. + * + * @returns {Flac.FLAC__StreamDecoderInitStatus} the decoder status(0 for FLAC__STREAM_DECODER_INIT_STATUS_OK) + * + * @memberOf Flac# + * @function + */ + init_decoder_stream: function(decoder, read_callback_fn, write_callback_fn, error_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){ + + client_data = client_data|0; + + if(typeof read_callback_fn !== 'function'){ + return FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS; + } + setCallback(decoder, 'read', read_callback_fn); + + if(typeof write_callback_fn !== 'function'){ + return FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS; + } + setCallback(decoder, 'write', write_callback_fn); + + var __error_callback_fn_ptr = 0; + if(typeof error_callback_fn === 'function'){ + setCallback(decoder, 'error', error_callback_fn); + __error_callback_fn_ptr = dec_error_fn_ptr; + } + + var __metadata_callback_fn_ptr = 0; + if(typeof metadata_callback_fn === 'function'){ + setCallback(decoder, 'metadata', metadata_callback_fn); + __metadata_callback_fn_ptr = metadata_fn_ptr; + } + + var is_ogg = (ogg_serial_number === true); + if(typeof ogg_serial_number === 'number'){ + + is_ogg = true; + + //NOTE ignore BOOL return value when setting serial number, since init-call's returned + // status will also indicate, if decoder already has been initialized + Module.ccall( + 'FLAC__stream_decoder_set_ogg_serial_number', 'number', + ['number', 'number'], + [ decoder, ogg_serial_number ] + ); + } + + //NOTE the following comments are used for auto-detecting exported functions (only change if ccall function name(s) change!): + // Module.ccall('FLAC__stream_decoder_init_stream' + // Module.ccall('FLAC__stream_decoder_init_ogg_stream' + var init_func_name = !is_ogg? 'FLAC__stream_decoder_init_stream' : 'FLAC__stream_decoder_init_ogg_stream'; + + var init_status = Module.ccall( + init_func_name, 'number', + [ 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number'], + [ + decoder, + dec_read_fn_ptr, + 0,// FLAC__StreamDecoderSeekCallback + 0,// FLAC__StreamDecoderTellCallback + 0,// FLAC__StreamDecoderLengthCallback + 0,// FLAC__StreamDecoderEofCallback + dec_write_fn_ptr, + __metadata_callback_fn_ptr, + __error_callback_fn_ptr, + client_data + ] + ); + + return init_status; + }, + /** + * Initialize the decoder for writing to an OGG container. + * + * @param {number} [ogg_serial_number] OPTIONAL + * the serial number for the stream in the OGG container that should be decoded.
+ * The default behavior is to use the serial number of the first Ogg page. Setting a serial number here will explicitly specify which stream is to be decoded. + * + * @memberOf Flac# + * @function + * @copydoc #init_decoder_stream + */ + init_decoder_ogg_stream: function(decoder, read_callback_fn, write_callback_fn, error_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){ + + if(typeof ogg_serial_number !== 'number'){ + ogg_serial_number = true; + } + return this.init_decoder_stream(decoder, read_callback_fn, write_callback_fn, error_callback_fn, metadata_callback_fn, ogg_serial_number, client_data); + }, + /** + * Encode / submit data for encoding. + * + * This version allows you to supply the input data where the channels are interleaved into a + * single array (i.e. channel0_sample0, channel1_sample0, ... , channelN_sample0, channel0_sample1, ...). + * + * The samples need not be block-aligned but they must be sample-aligned, i.e. the first value should be + * channel0_sample0 and the last value channelN_sampleM. + * + * Each sample should be a signed integer, right-justified to the resolution set by bits-per-sample. + * + * For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767]. + * + * + * For applications where channel order is important, channels must follow the order as described in the frame header. + * + * @param {number} encoder + * the ID of the encoder instance + * + * @param {TypedArray} buffer + * the audio data in a typed array with signed integers (and size according to the set bits-per-sample setting) + * + * @param {number} num_of_samples + * the number of samples in buffer + * + * @returns {boolean} true if successful, else false; in this case, check the encoder state with FLAC__stream_encoder_get_state() to see what went wrong. + * + * @memberOf Flac# + * @function + */ + FLAC__stream_encoder_process_interleaved: function(encoder, buffer, num_of_samples){ + // get the length of the data in bytes + var numBytes = buffer.length * buffer.BYTES_PER_ELEMENT; + // malloc enough space for the data + var ptr = Module._malloc(numBytes); + // get a bytes-wise view on the newly allocated buffer + var heapBytes= new Uint8Array(Module.HEAPU8.buffer, ptr, numBytes); + // copy data into heapBytes + heapBytes.set(new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength));// issue #11 (2): do use byteOffset and byteLength for copying the data in case the underlying buffer/ArrayBuffer of the TypedArray view is larger than the TypedArray + var status = Module.ccall('FLAC__stream_encoder_process_interleaved', 'number', + ['number', 'number', 'number'], + [encoder, heapBytes.byteOffset, num_of_samples] + ); + Module._free(ptr); + return status; + }, + + /** + * Encode / submit data for encoding. + * + * Submit data for encoding. This version allows you to supply the input data via an array of pointers, + * each pointer pointing to an array of samples samples representing one channel. + * The samples need not be block-aligned, but each channel should have the same number of samples. + * + * Each sample should be a signed integer, right-justified to the resolution set by FLAC__stream_encoder_set_bits_per_sample(). + * For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767]. + * + * + * For applications where channel order is important, channels must follow the order as described in the frame header. + * + * @param {number} encoder + * the ID of the encoder instance + * + * @param {TypedArray[]} channelBuffers + * an array for the audio data channels as typed arrays with signed integers (and size according to the set bits-per-sample setting) + * + * @param {number} num_of_samples + * the number of samples in one channel (i.e. one of the buffers) + * + * @returns {boolean} true if successful, else false; in this case, check the encoder state with FLAC__stream_encoder_get_state() to see what went wrong. + * + * @memberOf Flac# + * @function + */ + FLAC__stream_encoder_process: function(encoder, channelBuffers, num_of_samples){ + + var ptrInfo = this._create_pointer_array(channelBuffers); + var pointerPtr = ptrInfo.pointerPointer; + + var status = Module.ccall('FLAC__stream_encoder_process', 'number', + ['number', 'number', 'number'], + [encoder, pointerPtr, num_of_samples] + ); + + this._destroy_pointer_array(ptrInfo); + return status; + }, + /** + * Decodes a single frame. + * + * To check decoding progress, use {@link #FLAC__stream_decoder_get_state}. + * + * @param {number} decoder + * the ID of the decoder instance + * + * @returns {boolean} FALSE if an error occurred + * + * @memberOf Flac# + * @function + */ + FLAC__stream_decoder_process_single: Module.cwrap('FLAC__stream_decoder_process_single', 'number', ['number']), + + /** + * Decodes data until end of stream. + * + * @param {number} decoder + * the ID of the decoder instance + * + * @returns {boolean} FALSE if an error occurred + * + * @memberOf Flac# + * @function + */ + FLAC__stream_decoder_process_until_end_of_stream: Module.cwrap('FLAC__stream_decoder_process_until_end_of_stream', 'number', ['number']), + + /** + * Decodes data until end of metadata. + * + * @param {number} decoder + * the ID of the decoder instance + * + * @returns {boolean} false if any fatal read, write, or memory allocation error occurred (meaning decoding must stop), else true. + * + * @memberOf Flac# + * @function + */ + FLAC__stream_decoder_process_until_end_of_metadata: Module.cwrap('FLAC__stream_decoder_process_until_end_of_metadata', 'number', ['number']), + + /** + * Decoder state code. + * + * @interface FLAC__StreamDecoderState + * @memberOf Flac + * + * @property {"FLAC__STREAM_DECODER_SEARCH_FOR_METADATA"} 0 The decoder is ready to search for metadata + * @property {"FLAC__STREAM_DECODER_READ_METADATA"} 1 The decoder is ready to or is in the process of reading metadata + * @property {"FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC"} 2 The decoder is ready to or is in the process of searching for the frame sync code + * @property {"FLAC__STREAM_DECODER_READ_FRAME"} 3 The decoder is ready to or is in the process of reading a frame + * @property {"FLAC__STREAM_DECODER_END_OF_STREAM"} 4 The decoder has reached the end of the stream + * @property {"FLAC__STREAM_DECODER_OGG_ERROR"} 5 An error occurred in the underlying Ogg layer + * @property {"FLAC__STREAM_DECODER_SEEK_ERROR"} 6 An error occurred while seeking. The decoder must be flushed with FLAC__stream_decoder_flush() or reset with FLAC__stream_decoder_reset() before decoding can continue + * @property {"FLAC__STREAM_DECODER_ABORTED"} 7 The decoder was aborted by the read callback + * @property {"FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR"} 8 An error occurred allocating memory. The decoder is in an invalid state and can no longer be used + * @property {"FLAC__STREAM_DECODER_UNINITIALIZED"} 9 The decoder is in the uninitialized state; one of the FLAC__stream_decoder_init_*() functions must be called before samples can be processed. + * + */ + /** + * + * @param {number} decoder + * the ID of the decoder instance + * + * @returns {Flac.FLAC__StreamDecoderState} the decoder state + * + * @memberOf Flac# + * @function + */ + FLAC__stream_decoder_get_state: Module.cwrap('FLAC__stream_decoder_get_state', 'number', ['number']), + + /** + * Encoder state code. + * + * @interface FLAC__StreamEncoderState + * @memberOf Flac + * + * @property {"FLAC__STREAM_ENCODER_OK"} 0 The encoder is in the normal OK state and samples can be processed. + * @property {"FLAC__STREAM_ENCODER_UNINITIALIZED"} 1 The encoder is in the uninitialized state; one of the FLAC__stream_encoder_init_*() functions must be called before samples can be processed. + * @property {"FLAC__STREAM_ENCODER_OGG_ERROR"} 2 An error occurred in the underlying Ogg layer. + * @property {"FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR"} 3 An error occurred in the underlying verify stream decoder; check FLAC__stream_encoder_get_verify_decoder_state(). + * @property {"FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"} 4 The verify decoder detected a mismatch between the original audio signal and the decoded audio signal. + * @property {"FLAC__STREAM_ENCODER_CLIENT_ERROR"} 5 One of the callbacks returned a fatal error. + * @property {"FLAC__STREAM_ENCODER_IO_ERROR"} 6 An I/O error occurred while opening/reading/writing a file. Check errno. + * @property {"FLAC__STREAM_ENCODER_FRAMING_ERROR"} 7 An error occurred while writing the stream; usually, the write_callback returned an error. + * @property {"FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR"} 8 Memory allocation failed. + * + */ + /** + * + * @param {number} encoder + * the ID of the encoder instance + * + * @returns {Flac.FLAC__StreamEncoderState} the encoder state + * + * @memberOf Flac# + * @function + */ + FLAC__stream_encoder_get_state: Module.cwrap('FLAC__stream_encoder_get_state', 'number', ['number']), + /** + * Direct the decoder to pass on all metadata blocks of type type. + * + * By default, only the STREAMINFO block is returned via the metadata callback. + * + *

+ * NOTE: only use on un-initilized decoder instances! + * + * @param {number} decoder + * the ID of the decoder instance + * + * @param {Flac.FLAC__MetadataType} type the metadata type to be enabled + * + * @returns {boolean} false if the decoder is already initialized, else true + * + * @memberOf Flac# + * @function + * + * @see Flac#FLAC__stream_decoder_set_metadata_respond_all + */ + FLAC__stream_decoder_set_metadata_respond: Module.cwrap('FLAC__stream_decoder_set_metadata_respond', 'number', ['number', 'number']), + /** + * Direct the decoder to pass on all APPLICATION metadata blocks of the given id. + * + * By default, only the STREAMINFO block is returned via the metadata callback. + * + *

+ * NOTE: only use on un-initilized decoder instances! + * + * @param {number} decoder + * the ID of the decoder instance + * + * @param {number} id the ID of application metadata + * + * @returns {boolean} false if the decoder is already initialized, else true + * + * @memberOf Flac# + * @function + * + * @see Flac#FLAC__stream_decoder_set_metadata_respond_all + */ + FLAC__stream_decoder_set_metadata_respond_application: Module.cwrap('FLAC__stream_decoder_set_metadata_respond_application', 'number', ['number', 'number']),// (FLAC__StreamDecoder *decoder, const FLAC__byte id[4]) + /** + * Direct the decoder to pass on all metadata blocks of any type. + * + * By default, only the STREAMINFO block is returned via the metadata callback. + * + *

+ * NOTE: only use on un-initilized decoder instances! + * + * @param {number} decoder + * the ID of the decoder instance + * + * @returns {boolean} false if the decoder is already initialized, else true + * + * @memberOf Flac# + * @function + * + * @see Flac#FLAC__stream_decoder_set_metadata_ignore_all + * @see Flac#FLAC__stream_decoder_set_metadata_respond_application + * @see Flac#FLAC__stream_decoder_set_metadata_respond + */ + FLAC__stream_decoder_set_metadata_respond_all: Module.cwrap('FLAC__stream_decoder_set_metadata_respond_all', 'number', ['number']),// (FLAC__StreamDecoder *decoder) + /** + * Direct the decoder to filter out all metadata blocks of type type. + * + * By default, only the STREAMINFO block is returned via the metadata callback. + * + *

+ * NOTE: only use on un-initilized decoder instances! + * + * @param {number} decoder + * the ID of the decoder instance + * + * @param {Flac.FLAC__MetadataType} type the metadata type to be ignored + * + * @returns {boolean} false if the decoder is already initialized, else true + * + * @memberOf Flac# + * @function + * + * @see Flac#FLAC__stream_decoder_set_metadata_ignore_all + */ + FLAC__stream_decoder_set_metadata_ignore: Module.cwrap('FLAC__stream_decoder_set_metadata_ignore', 'number', ['number', 'number']),// (FLAC__StreamDecoder *decoder, FLAC__MetadataType type) + /** + * Direct the decoder to filter out all APPLICATION metadata blocks of the given id. + * + * By default, only the STREAMINFO block is returned via the metadata callback. + * + *

+ * NOTE: only use on un-initilized decoder instances! + * + * @param {number} decoder + * the ID of the decoder instance + * + * @param {number} id the ID of application metadata + * + * @returns {boolean} false if the decoder is already initialized, else true + * + * @memberOf Flac# + * @function + * + * @see Flac#FLAC__stream_decoder_set_metadata_ignore_all + */ + FLAC__stream_decoder_set_metadata_ignore_application: Module.cwrap('FLAC__stream_decoder_set_metadata_ignore_application', 'number', ['number', 'number']),// (FLAC__StreamDecoder *decoder, const FLAC__byte id[4]) + /** + * Direct the decoder to filter out all metadata blocks of any type. + * + * By default, only the STREAMINFO block is returned via the metadata callback. + * + *

+ * NOTE: only use on un-initilized decoder instances! + * + * @param {number} decoder + * the ID of the decoder instance + * + * @returns {boolean} false if the decoder is already initialized, else true + * + * @memberOf Flac# + * @function + * + * @see Flac#FLAC__stream_decoder_set_metadata_respond_all + * @see Flac#FLAC__stream_decoder_set_metadata_ignore + * @see Flac#FLAC__stream_decoder_set_metadata_ignore_application + */ + FLAC__stream_decoder_set_metadata_ignore_all: Module.cwrap('FLAC__stream_decoder_set_metadata_ignore_all', 'number', ['number']),// (FLAC__StreamDecoder *decoder) + /** + * Set the metadata blocks to be emitted to the stream before encoding. A value of NULL, 0 implies no metadata; otherwise, supply an array of pointers to metadata blocks. + * The array is non-const since the encoder may need to change the is_last flag inside them, and in some cases update seek point offsets. Otherwise, the encoder + * will not modify or free the blocks. It is up to the caller to free the metadata blocks after encoding finishes. + * + *

+ * The encoder stores only copies of the pointers in the metadata array; the metadata blocks themselves must survive at least until after FLAC__stream_encoder_finish() returns. + * Do not free the blocks until then. + * + * The STREAMINFO block is always written and no STREAMINFO block may occur in the supplied array. + * + * By default the encoder does not create a SEEKTABLE. If one is supplied in the metadata array, but the client has specified that it does not support seeking, + * then the SEEKTABLE will be written verbatim. However by itself this is not very useful as the client will not know the stream offsets for the seekpoints ahead of time. + * In order to get a proper seektable the client must support seeking. See next note. + * + * SEEKTABLE blocks are handled specially. Since you will not know the values for the seek point stream offsets, you should pass in a SEEKTABLE 'template', that is, + * a SEEKTABLE object with the required sample numbers (or placeholder points), with 0 for the frame_samples and stream_offset fields for each point. + * If the client has specified that it supports seeking by providing a seek callback to FLAC__stream_encoder_init_stream() or both seek AND read callback to + * FLAC__stream_encoder_init_ogg_stream() (or by using FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE()), then while it is encoding the encoder will + * fill the stream offsets in for you and when encoding is finished, it will seek back and write the real values into the SEEKTABLE block in the stream. There are helper + * routines for manipulating seektable template blocks; see metadata.h: FLAC__metadata_object_seektable_template_*(). If the client does not support seeking, + * the SEEKTABLE will have inaccurate offsets which will slow down or remove the ability to seek in the FLAC stream. + * + * The encoder instance will modify the first SEEKTABLE block as it transforms the template to a valid seektable while encoding, but it is still up to the caller to free + * all metadata blocks after encoding. + * + * A VORBIS_COMMENT block may be supplied. The vendor string in it will be ignored. libFLAC will use it's own vendor string. libFLAC will not modify the passed-in + * VORBIS_COMMENT's vendor string, it will simply write it's own into the stream. If no VORBIS_COMMENT block is present in the metadata array, libFLAC will write an + * empty one, containing only the vendor string. + * + * The Ogg FLAC mapping requires that the VORBIS_COMMENT block be the second metadata block of the stream. The encoder already supplies the STREAMINFO block automatically. + * + * If metadata does not contain a VORBIS_COMMENT block, the encoder will supply that too. Otherwise, if metadata does contain a VORBIS_COMMENT block and it is not the first, + * the init function will reorder metadata by moving the VORBIS_COMMENT block to the front; the relative ordering of the other blocks will remain as they were. + * + * The Ogg FLAC mapping limits the number of metadata blocks per stream to 65535. If num_blocks exceeds this the function will return false. + * + * @param {number} encoder + * the ID of the encoder instance + * + * @param {Flac.PointerInfo} metadataBuffersPointer + * + * @param {number} num_blocks + * + * @returns {boolean} false if the encoder is already initialized, else true. false if the encoder is already initialized, or if num_blocks > 65535 if encoding to Ogg FLAC, else true. + * + * @memberOf Flac# + * @function + * + * @see Flac.FLAC__MetadataType + * @see Flac#_create_pointer_array + * @see Flac#_destroy_pointer_array + */ + FLAC__stream_encoder_set_metadata: function(encoder, metadataBuffersPointer, num_blocks){// ( FLAC__StreamEncoder * encoder, FLAC__StreamMetadata ** metadata, unsigned num_blocks) + var status = Module.ccall('FLAC__stream_encoder_set_metadata', 'number', + ['number', 'number', 'number'], + [encoder, metadataBuffersPointer.pointerPointer, num_blocks] + ); + return status; + }, + /** + * Helper object for allocating an array of buffers on the (memory) heap. + * + * @interface PointerInfo + * @memberOf Flac + * @property {number} pointerPointer pointer to the array of (pointer) buffers + * @property {number[]} dataPointer array of pointers to the allocated data arrays (i.e. buffers) + * + * @see Flac#_create_pointer_array + * @see Flac#_destroy_pointer_array + */ + /** + * Helper function for creating pointer (and allocating the data) to an array of buffers on the (memory) heap. + * + * Use the returned PointerInfo.dataPointer as argument, where the array-pointer is required. + * + * NOTE: afer use, the allocated buffers on the heap need be freed, see {@link #_destroy_pointer_array}. + * + * @param {Uint8Array[]} bufferArray + * the buffer for which to create + * + * @returns {Flac.PointerInfo} false if the decoder is already initialized, else true + * + * @memberOf Flac# + * @function + * + * @see Flac#_destroy_pointer_array + */ + _create_pointer_array: function(bufferArray){ + var size=bufferArray.length; + var ptrs = [], ptrData = new Uint32Array(size); + var ptrOffsets = new DataView(ptrData.buffer); + var buffer, numBytes, heapBytes, ptr; + for(var i=0, size; i < size; ++i){ + buffer = bufferArray[i]; + // get the length of the data in bytes + numBytes = buffer.length * buffer.BYTES_PER_ELEMENT; + // malloc enough space for the data + ptr = Module._malloc(numBytes); + ptrs.push(ptr); + // get a bytes-wise view on the newly allocated buffer + heapBytes = new Uint8Array(Module.HEAPU8.buffer, ptr, numBytes); + // copy data into heapBytes + heapBytes.set(new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength));// use FIX for issue #11 (2) + ptrOffsets.setUint32(i*4, ptr, true); + } + var nPointerBytes = ptrData.length * ptrData.BYTES_PER_ELEMENT + var pointerPtr = Module._malloc(nPointerBytes); + var pointerHeap = new Uint8Array(Module.HEAPU8.buffer, pointerPtr, nPointerBytes); + pointerHeap.set( new Uint8Array(ptrData.buffer) ); + + return { + dataPointer: ptrs, + pointerPointer: pointerPtr + }; + }, + /** + * Helper function for destroying/freeing a previously created pointer (and allocating the data) of an array of buffers on the (memory) heap. + * + * @param {Flac.PointerInfo} pointerInfo + * the pointer / allocation information that should be destroyed/freed + * + * + * @memberOf Flac# + * @function + * + * @see Flac#_create_pointer_array + */ + _destroy_pointer_array: function(pointerInfo){ + var pointerArray = pointerInfo.dataPointer; + for(var i=0, size=pointerArray.length; i < size; ++i){ + Module._free(pointerArray[i]); + } + Module._free(pointerInfo.pointerPointer); + }, + /** + * Get if MD5 verification is enabled for the decoder + * + * @param {number} decoder + * the ID of the decoder instance + * + * @returns {boolean} true if MD5 verification is enabled + * + * @memberOf Flac# + * @function + * + * @see #FLAC__stream_decoder_set_md5_checking + */ + FLAC__stream_decoder_get_md5_checking: Module.cwrap('FLAC__stream_decoder_get_md5_checking', 'number', ['number']), + + /** + * Set the "MD5 signature checking" flag. If true, the decoder will compute the MD5 signature of the unencoded audio data while decoding and compare it to the signature from the STREAMINFO block, + * if it exists, during {@link Flac.FLAC__stream_decoder_finish FLAC__stream_decoder_finish()}. + * + * MD5 signature checking will be turned off (until the next {@link Flac.FLAC__stream_decoder_reset FLAC__stream_decoder_reset()}) if there is no signature in the STREAMINFO block or when a seek is attempted. + * + * Clients that do not use the MD5 check should leave this off to speed up decoding. + * + * @param {number} decoder + * the ID of the decoder instance + * @param {boolean} is_verify + * enable/disable checksum verification during decoding + * @returns {boolean} FALSE if the decoder is already initialized, else TRUE. + * + * @memberOf Flac# + * @function + * + * @see #FLAC__stream_decoder_get_md5_checking + */ + FLAC__stream_decoder_set_md5_checking: function(decoder, is_verify){ + is_verify = is_verify? 1 : 0; + return Module.ccall('FLAC__stream_decoder_set_md5_checking', 'number', ['number', 'number'], [ decoder, is_verify ]); + }, + + /** + * Finish the encoding process. + * + * @param {number} encoder + * the ID of the encoder instance + * + * @returns {boolean} false if an error occurred processing the last frame; + * or if verify mode is set, there was a verify mismatch; else true. + * If false, caller should check the state with {@link Flac#FLAC__stream_encoder_get_state} + * for more information about the error. + * + * @memberOf Flac# + * @function + */ + FLAC__stream_encoder_finish: Module.cwrap('FLAC__stream_encoder_finish', 'number', [ 'number' ]), + /** + * Finish the decoding process. + * + * The decoder can be reused, after initializing it again. + * + * @param {number} decoder + * the ID of the decoder instance + * + * @returns {boolean} false if MD5 checking is on AND a STREAMINFO block was available AND the MD5 signature in + * the STREAMINFO block was non-zero AND the signature does not match the one computed by the decoder; + * else true. + * + * @memberOf Flac# + * @function + */ + FLAC__stream_decoder_finish: Module.cwrap('FLAC__stream_decoder_finish', 'number', [ 'number' ]), + /** + * Reset the decoder for reuse. + * + *

+ * NOTE: Needs to be re-initialized, before it can be used again + * + * @param {number} decoder + * the ID of the decoder instance + * + * @returns {boolean} true if successful + * + * @see #init_decoder_stream + * @see #init_decoder_ogg_stream + * + * @memberOf Flac# + * @function + */ + FLAC__stream_decoder_reset: Module.cwrap('FLAC__stream_decoder_reset', 'number', [ 'number' ]), + /** + * Delete the encoder instance, and free up its resources. + * + * @param {number} encoder + * the ID of the encoder instance + * + * @memberOf Flac# + * @function + */ + FLAC__stream_encoder_delete: function(encoder){ + this._clear_enc_cb(encoder);//<- remove callback references + Module.ccall('FLAC__stream_encoder_delete', 'number', [ 'number' ], [encoder]); + do_fire_event('destroyed', [{type: 'destroyed', target: {id: encoder, type: 'encoder'}}], false); + }, + /** + * Delete the decoder instance, and free up its resources. + * + * @param {number} decoder + * the ID of the decoder instance + * + * @memberOf Flac# + * @function + */ + FLAC__stream_decoder_delete: function(decoder){ + this._clear_dec_cb(decoder);//<- remove callback references + Module.ccall('FLAC__stream_decoder_delete', 'number', [ 'number' ], [decoder]); + do_fire_event('destroyed', [{type: 'destroyed', target: {id: decoder, type: 'decoder'}}], false); + } + +};//END: var _exported = { + +//if Properties are supported by JS execution environment: +// support "immediate triggering" onready function, if library is already initialized when setting onready callback +if(typeof Object.defineProperty === 'function'){ + //add internal field for storing onready callback: + _exported._onready = void(0); + //define getter & define setter with "immediate trigger" functionality: + Object.defineProperty(_exported, 'onready', { + get() { return this._onready; }, + set(newValue) { + this._onready = newValue; + if(newValue && this.isReady()){ + check_and_trigger_persisted_event('ready', newValue); + } + } + }); +} else { + //if Properties are NOTE supported by JS execution environment: + // pring usage warning for onready hook instead + console.warn('WARN: note that setting Flac.onready handler after Flac.isReady() is already true, will have no effect, that is, the handler function will not be triggered!'); +} + +if(expLib && expLib.exports){ + expLib.exports = _exported; +} +return _exported; + +}));//END: UMD wrapper diff --git a/music_assistant/server/providers/snapcast/snapweb/apple-touch-icon-180x180.png b/music_assistant/server/providers/snapcast/snapweb/apple-touch-icon-180x180.png deleted file mode 100644 index b37b7160ab6833daadfd8f04e793ae58ba1bb3db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1788 zcmZvddpOez1INeQr;$VMlsrj#-9}2o+%hTVvKblbWv$5lHY3^?)$4ZZ9M{}NmU}Z@ zCTvO6sGpoHw;UzSWmE2#vZMdrKh7WD&-eL0&-ee&O_aOKJ~<6J5D2u-73t))*UVp$ z0q;@nxAi@O^ik)0oJAaIkx10v-!FOt7xf+7-4=?b(nP!<(Hc+mwL&ChO-@ddqhYyw zf7vLcUn~d&=KqRVJIN~y1d_V$>SXVeG$tq;`jd80o?0v={_2@%C*p#Nc(tVDLRluv z3PyT#y?4eSLt<@3I!glpCnFU2Vm6i1tLZxbKJHAbHAw=)pxZBmZvg6X`XVSK)`gIz z$>sw68)SR~ngj5K;@4z+zJpj`rhQXA^~_2rfillNc{>$qZN=Sw5aUry$`zQ@%!L7s zcF596Go@WQ=EFJpmXn0HXBwaCSQq0E6sT>}{+dUFz`nRFZmv=1)UxfEdeVeLBGj(0M?be)U z@Im_%*+zlW53DSjLK0-{FlTWQpZ-!U@zp`z3B)EIxm#Th7+ZcN{->~?YLt4G&v*@VT1G@U|3pTZFXz!-_n$H3%-)=$* zzpa(>3Ce6>Tt%yHQD8Hc8DyKZ*4ZmPt!BJ4*FlyPYWR-@azx6d1QO)*>jzW}U|bq% z_K|64W-`y9mLE7|VAo?wexpvKV#VCdbMlEn&#;!hPpa#qdwx83tL19V1SlS8pf0xu zXfvR$FM3HM$1O~zAl#lK@dMUMur0NxKkMlMRq!V)HF}UBFWajOG9}f z>sZip1ql^Mtenm5yujzGMpN`FpuxW4x;~LD27sp-4_>OPT|$BRv}l0A?k@5sSZTtX z)~nne_FhQ} zck^QEsRct5x`OU)DbyagG*X?z2~)Toh-x)vKz1xe|cGEQWh&1Leqilly|+8l2a?4PRyJloYYsYt9DF%^UXn zRrUZ=cubqWbLn7*@dlgGO6rIcpK)4%Iv?u_ z4mQVoro}Umnbyh=is)2*wd@*Of2hPVx|8Md5x+Sc1pl+fRnVS;NS%)V455Oavas!D&o&u`k{;N1|DX)#mPF zhhYVX=KJJn&BEV9R$y=O=!adctjRSKy>Cb(VMQwEEjJ-*$)8pcT|1N(Mf6GWJTr8W z`IMVU$ee4{#ARcWAmS5(`BPIbNa5!<68eNhyT+C bPUfe=QP=b`tQOGm%V)06?oQ1P!Q_7cE9hre diff --git a/music_assistant/server/providers/snapcast/snapweb/assets/index-BDBx6C_I.css b/music_assistant/server/providers/snapcast/snapweb/assets/index-BDBx6C_I.css deleted file mode 100644 index 0e3d7da4d..000000000 --- a/music_assistant/server/providers/snapcast/snapweb/assets/index-BDBx6C_I.css +++ /dev/null @@ -1 +0,0 @@ -body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace} diff --git a/music_assistant/server/providers/snapcast/snapweb/assets/index-BYMjFABP.js b/music_assistant/server/providers/snapcast/snapweb/assets/index-BYMjFABP.js deleted file mode 100644 index 265dd634d..000000000 --- a/music_assistant/server/providers/snapcast/snapweb/assets/index-BYMjFABP.js +++ /dev/null @@ -1,135 +0,0 @@ -var a3=Object.defineProperty;var s3=(t,r,s)=>r in t?a3(t,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[r]=s;var Ie=(t,r,s)=>s3(t,typeof r!="symbol"?r+"":r,s);function l3(t,r){for(var s=0;su[p]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))u(p);new MutationObserver(p=>{for(const d of p)if(d.type==="childList")for(const b of d.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&u(b)}).observe(document,{childList:!0,subtree:!0});function s(p){const d={};return p.integrity&&(d.integrity=p.integrity),p.referrerPolicy&&(d.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?d.credentials="include":p.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function u(p){if(p.ep)return;p.ep=!0;const d=s(p);fetch(p.href,d)}})();var c3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function aa(t){if(t.__esModule)return t;var r=t.default;if(typeof r=="function"){var s=function u(){return this instanceof u?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};s.prototype=r.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach(function(u){var p=Object.getOwnPropertyDescriptor(t,u);Object.defineProperty(s,u,p.get?p:{enumerable:!0,get:function(){return t[u]}})}),s}var Hv={exports:{}},J0={},Gv={exports:{}},jt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Tc=Symbol.for("react.element"),u3=Symbol.for("react.portal"),f3=Symbol.for("react.fragment"),d3=Symbol.for("react.strict_mode"),p3=Symbol.for("react.profiler"),h3=Symbol.for("react.provider"),m3=Symbol.for("react.context"),g3=Symbol.for("react.forward_ref"),b3=Symbol.for("react.suspense"),v3=Symbol.for("react.memo"),k3=Symbol.for("react.lazy"),ng=Symbol.iterator;function y3(t){return t===null||typeof t!="object"?null:(t=ng&&t[ng]||t["@@iterator"],typeof t=="function"?t:null)}var Qv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yv=Object.assign,Kv={};function ol(t,r,s){this.props=t,this.context=r,this.refs=Kv,this.updater=s||Qv}ol.prototype.isReactComponent={};ol.prototype.setState=function(t,r){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,r,"setState")};ol.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Xv(){}Xv.prototype=ol.prototype;function Jp(t,r,s){this.props=t,this.context=r,this.refs=Kv,this.updater=s||Qv}var $p=Jp.prototype=new Xv;$p.constructor=Jp;Yv($p,ol.prototype);$p.isPureReactComponent=!0;var rg=Array.isArray,qv=Object.prototype.hasOwnProperty,e1={current:null},Zv={key:!0,ref:!0,__self:!0,__source:!0};function Jv(t,r,s){var u,p={},d=null,b=null;if(r!=null)for(u in r.ref!==void 0&&(b=r.ref),r.key!==void 0&&(d=""+r.key),r)qv.call(r,u)&&!Zv.hasOwnProperty(u)&&(p[u]=r[u]);var k=arguments.length-2;if(k===1)p.children=s;else if(1>>1,Pe=ce[Ae];if(0>>1;Aep(He,Ne))mtp(Zt,He)?(ce[Ae]=Zt,ce[mt]=Ne,Ae=mt):(ce[Ae]=He,ce[Ue]=Ne,Ae=Ue);else if(mtp(Zt,Ne))ce[Ae]=Zt,ce[mt]=Ne,Ae=mt;else break e}}return we}function p(ce,we){var Ne=ce.sortIndex-we.sortIndex;return Ne!==0?Ne:ce.id-we.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;t.unstable_now=function(){return d.now()}}else{var b=Date,k=b.now();t.unstable_now=function(){return b.now()-k}}var y=[],_=[],S=1,P=null,I=3,L=!1,R=!1,D=!1,Z=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(ce){for(var we=s(_);we!==null;){if(we.callback===null)u(_);else if(we.startTime<=ce)u(_),we.sortIndex=we.expirationTime,r(y,we);else break;we=s(_)}}function Q(ce){if(D=!1,B(ce),!R)if(s(y)!==null)R=!0,ye(U);else{var we=s(_);we!==null&&ve(Q,we.startTime-ce)}}function U(ce,we){R=!1,D&&(D=!1,F(X),X=-1),L=!0;var Ne=I;try{for(B(we),P=s(y);P!==null&&(!(P.expirationTime>we)||ce&&!he());){var Ae=P.callback;if(typeof Ae=="function"){P.callback=null,I=P.priorityLevel;var Pe=Ae(P.expirationTime<=we);we=t.unstable_now(),typeof Pe=="function"?P.callback=Pe:P===s(y)&&u(y),B(we)}else u(y);P=s(y)}if(P!==null)var tt=!0;else{var Ue=s(_);Ue!==null&&ve(Q,Ue.startTime-we),tt=!1}return tt}finally{P=null,I=Ne,L=!1}}var ee=!1,q=null,X=-1,me=5,le=-1;function he(){return!(t.unstable_now()-lece||125Ae?(ce.sortIndex=Ne,r(_,ce),s(y)===null&&ce===s(_)&&(D?(F(X),X=-1):D=!0,ve(Q,Ne-Ae))):(ce.sortIndex=Pe,r(y,ce),R||L||(R=!0,ye(U))),ce},t.unstable_shouldYield=he,t.unstable_wrapCallback=function(ce){var we=I;return function(){var Ne=I;I=we;try{return ce.apply(this,arguments)}finally{I=Ne}}}})(rk);nk.exports=rk;var N3=nk.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var R3=J,ao=N3;function Ve(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,s=1;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),B2=Object.prototype.hasOwnProperty,T3=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ig={},ag={};function F3(t){return B2.call(ag,t)?!0:B2.call(ig,t)?!1:T3.test(t)?ag[t]=!0:(ig[t]=!0,!1)}function L3(t,r,s,u){if(s!==null&&s.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return u?!1:s!==null?!s.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function D3(t,r,s,u){if(r===null||typeof r>"u"||L3(t,r,s,u))return!0;if(u)return!1;if(s!==null)switch(s.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function Dr(t,r,s,u,p,d,b){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=u,this.attributeNamespace=p,this.mustUseProperty=s,this.propertyName=t,this.type=r,this.sanitizeURL=d,this.removeEmptyString=b}var gr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){gr[t]=new Dr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];gr[r]=new Dr(r,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){gr[t]=new Dr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){gr[t]=new Dr(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){gr[t]=new Dr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){gr[t]=new Dr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){gr[t]=new Dr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){gr[t]=new Dr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){gr[t]=new Dr(t,5,!1,t.toLowerCase(),null,!1,!1)});var n1=/[\-:]([a-z])/g;function r1(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var r=t.replace(n1,r1);gr[r]=new Dr(r,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(n1,r1);gr[r]=new Dr(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(n1,r1);gr[r]=new Dr(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){gr[t]=new Dr(t,1,!1,t.toLowerCase(),null,!1,!1)});gr.xlinkHref=new Dr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){gr[t]=new Dr(t,1,!1,t.toLowerCase(),null,!0,!0)});function o1(t,r,s,u){var p=gr.hasOwnProperty(r)?gr[r]:null;(p!==null?p.type!==0:u||!(2k||p[b]!==d[k]){var y=` -`+p[b].replace(" at new "," at ");return t.displayName&&y.includes("")&&(y=y.replace("",t.displayName)),y}while(1<=b&&0<=k);break}}}finally{Zd=!1,Error.prepareStackTrace=s}return(t=t?t.displayName||t.name:"")?Ul(t):""}function O3(t){switch(t.tag){case 5:return Ul(t.type);case 16:return Ul("Lazy");case 13:return Ul("Suspense");case 19:return Ul("SuspenseList");case 0:case 2:case 15:return t=Jd(t.type,!1),t;case 11:return t=Jd(t.type.render,!1),t;case 1:return t=Jd(t.type,!0),t;default:return""}}function W2(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Cs:return"Fragment";case As:return"Portal";case j2:return"Profiler";case i1:return"StrictMode";case z2:return"Suspense";case V2:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case ak:return(t.displayName||"Context")+".Consumer";case ik:return(t._context.displayName||"Context")+".Provider";case a1:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case s1:return r=t.displayName||null,r!==null?r:W2(t.type)||"Memo";case Ui:r=t._payload,t=t._init;try{return W2(t(r))}catch{}}return null}function B3(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W2(r);case 8:return r===i1?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function oa(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function lk(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function j3(t){var r=lk(t)?"checked":"value",s=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),u=""+t[r];if(!t.hasOwnProperty(r)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var p=s.get,d=s.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(b){u=""+b,d.call(this,b)}}),Object.defineProperty(t,r,{enumerable:s.enumerable}),{getValue:function(){return u},setValue:function(b){u=""+b},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function vu(t){t._valueTracker||(t._valueTracker=j3(t))}function ck(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var s=r.getValue(),u="";return t&&(u=lk(t)?t.checked?"true":"false":t.value),t=u,t!==s?(r.setValue(t),!0):!1}function h0(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function U2(t,r){var s=r.checked;return Fn({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??t._wrapperState.initialChecked})}function lg(t,r){var s=r.defaultValue==null?"":r.defaultValue,u=r.checked!=null?r.checked:r.defaultChecked;s=oa(r.value!=null?r.value:s),t._wrapperState={initialChecked:u,initialValue:s,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function uk(t,r){r=r.checked,r!=null&&o1(t,"checked",r,!1)}function H2(t,r){uk(t,r);var s=oa(r.value),u=r.type;if(s!=null)u==="number"?(s===0&&t.value===""||t.value!=s)&&(t.value=""+s):t.value!==""+s&&(t.value=""+s);else if(u==="submit"||u==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?G2(t,r.type,s):r.hasOwnProperty("defaultValue")&&G2(t,r.type,oa(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function cg(t,r,s){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var u=r.type;if(!(u!=="submit"&&u!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,s||r===t.value||(t.value=r),t.defaultValue=r}s=t.name,s!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,s!==""&&(t.name=s)}function G2(t,r,s){(r!=="number"||h0(t.ownerDocument)!==t)&&(s==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+s&&(t.defaultValue=""+s))}var Hl=Array.isArray;function Ds(t,r,s,u){if(t=t.options,r){r={};for(var p=0;p"+r.valueOf().toString()+"",r=ku.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function lc(t,r){if(r){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=r;return}}t.textContent=r}var Xl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},z3=["Webkit","ms","Moz","O"];Object.keys(Xl).forEach(function(t){z3.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),Xl[r]=Xl[t]})});function hk(t,r,s){return r==null||typeof r=="boolean"||r===""?"":s||typeof r!="number"||r===0||Xl.hasOwnProperty(t)&&Xl[t]?(""+r).trim():r+"px"}function mk(t,r){t=t.style;for(var s in r)if(r.hasOwnProperty(s)){var u=s.indexOf("--")===0,p=hk(s,r[s],u);s==="float"&&(s="cssFloat"),u?t.setProperty(s,p):t[s]=p}}var V3=Fn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function K2(t,r){if(r){if(V3[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(Ve(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(Ve(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(Ve(61))}if(r.style!=null&&typeof r.style!="object")throw Error(Ve(62))}}function X2(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var q2=null;function l1(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Z2=null,Os=null,Bs=null;function dg(t){if(t=Dc(t)){if(typeof Z2!="function")throw Error(Ve(280));var r=t.stateNode;r&&(r=rf(r),Z2(t.stateNode,t.type,r))}}function gk(t){Os?Bs?Bs.push(t):Bs=[t]:Os=t}function bk(){if(Os){var t=Os,r=Bs;if(Bs=Os=null,dg(t),r)for(t=0;t>>=0,t===0?32:31-(J3(t)/$3|0)|0}var yu=64,_u=4194304;function Gl(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function v0(t,r){var s=t.pendingLanes;if(s===0)return 0;var u=0,p=t.suspendedLanes,d=t.pingedLanes,b=s&268435455;if(b!==0){var k=b&~p;k!==0?u=Gl(k):(d&=b,d!==0&&(u=Gl(d)))}else b=s&~p,b!==0?u=Gl(b):d!==0&&(u=Gl(d));if(u===0)return 0;if(r!==0&&r!==u&&!(r&p)&&(p=u&-u,d=r&-r,p>=d||p===16&&(d&4194240)!==0))return r;if(u&4&&(u|=s&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=u;0s;s++)r.push(t);return r}function Fc(t,r,s){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Bo(r),t[r]=s}function rC(t,r){var s=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var u=t.eventTimes;for(t=t.expirationTimes;0=Zl),_g=" ",wg=!1;function Ok(t,r){switch(t){case"keyup":return NC.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bk(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var xs=!1;function TC(t,r){switch(t){case"compositionend":return Bk(r);case"keypress":return r.which!==32?null:(wg=!0,_g);case"textInput":return t=r.data,t===_g&&wg?null:t;default:return null}}function FC(t,r){if(xs)return t==="compositionend"||!g1&&Ok(t,r)?(t=Lk(),Xu=p1=Ki=null,xs=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:s,offset:r-t};t=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Sg(s)}}function Wk(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Wk(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Uk(){for(var t=window,r=h0();r instanceof t.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)t=r.contentWindow;else break;r=h0(t.document)}return r}function b1(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function UC(t){var r=Uk(),s=t.focusedElem,u=t.selectionRange;if(r!==s&&s&&s.ownerDocument&&Wk(s.ownerDocument.documentElement,s)){if(u!==null&&b1(s)){if(r=u.start,t=u.end,t===void 0&&(t=r),"selectionStart"in s)s.selectionStart=r,s.selectionEnd=Math.min(t,s.value.length);else if(t=(r=s.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var p=s.textContent.length,d=Math.min(u.start,p);u=u.end===void 0?d:Math.min(u.end,p),!t.extend&&d>u&&(p=u,u=d,d=p),p=Eg(s,d);var b=Eg(s,u);p&&b&&(t.rangeCount!==1||t.anchorNode!==p.node||t.anchorOffset!==p.offset||t.focusNode!==b.node||t.focusOffset!==b.offset)&&(r=r.createRange(),r.setStart(p.node,p.offset),t.removeAllRanges(),d>u?(t.addRange(r),t.extend(b.node,b.offset)):(r.setEnd(b.node,b.offset),t.addRange(r)))}}for(r=[],t=s;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s=document.documentMode,Ss=null,rp=null,$l=null,op=!1;function Pg(t,r,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;op||Ss==null||Ss!==h0(u)||(u=Ss,"selectionStart"in u&&b1(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),$l&&hc($l,u)||($l=u,u=_0(rp,"onSelect"),0Ms||(t.current=up[Ms],up[Ms]=null,Ms--)}function vn(t,r){Ms++,up[Ms]=t.current,t.current=r}var ia={},Cr=la(ia),Gr=la(!1),Fa=ia;function Qs(t,r){var s=t.type.contextTypes;if(!s)return ia;var u=t.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===r)return u.__reactInternalMemoizedMaskedChildContext;var p={},d;for(d in s)p[d]=r[d];return u&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=p),p}function Qr(t){return t=t.childContextTypes,t!=null}function A0(){An(Gr),An(Cr)}function Lg(t,r,s){if(Cr.current!==ia)throw Error(Ve(168));vn(Cr,r),vn(Gr,s)}function Jk(t,r,s){var u=t.stateNode;if(r=r.childContextTypes,typeof u.getChildContext!="function")return s;u=u.getChildContext();for(var p in u)if(!(p in r))throw Error(Ve(108,B3(t)||"Unknown",p));return Fn({},s,u)}function C0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ia,Fa=Cr.current,vn(Cr,t),vn(Gr,Gr.current),!0}function Dg(t,r,s){var u=t.stateNode;if(!u)throw Error(Ve(169));s?(t=Jk(t,r,Fa),u.__reactInternalMemoizedMergedChildContext=t,An(Gr),An(Cr),vn(Cr,t)):An(Gr),vn(Gr,s)}var hi=null,of=!1,d2=!1;function $k(t){hi===null?hi=[t]:hi.push(t)}function t5(t){of=!0,$k(t)}function ca(){if(!d2&&hi!==null){d2=!0;var t=0,r=cn;try{var s=hi;for(cn=1;t>=b,p-=b,vi=1<<32-Bo(r)+p|s<X?(me=q,q=null):me=q.sibling;var le=I(F,q,B[X],Q);if(le===null){q===null&&(q=me);break}t&&q&&le.alternate===null&&r(F,q),O=d(le,O,X),ee===null?U=le:ee.sibling=le,ee=le,q=me}if(X===B.length)return s(F,q),Pn&&ya(F,X),U;if(q===null){for(;XX?(me=q,q=null):me=q.sibling;var he=I(F,q,le.value,Q);if(he===null){q===null&&(q=me);break}t&&q&&he.alternate===null&&r(F,q),O=d(he,O,X),ee===null?U=he:ee.sibling=he,ee=he,q=me}if(le.done)return s(F,q),Pn&&ya(F,X),U;if(q===null){for(;!le.done;X++,le=B.next())le=P(F,le.value,Q),le!==null&&(O=d(le,O,X),ee===null?U=le:ee.sibling=le,ee=le);return Pn&&ya(F,X),U}for(q=u(F,q);!le.done;X++,le=B.next())le=L(q,F,X,le.value,Q),le!==null&&(t&&le.alternate!==null&&q.delete(le.key===null?X:le.key),O=d(le,O,X),ee===null?U=le:ee.sibling=le,ee=le);return t&&q.forEach(function(de){return r(F,de)}),Pn&&ya(F,X),U}function Z(F,O,B,Q){if(typeof B=="object"&&B!==null&&B.type===Cs&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case bu:e:{for(var U=B.key,ee=O;ee!==null;){if(ee.key===U){if(U=B.type,U===Cs){if(ee.tag===7){s(F,ee.sibling),O=p(ee,B.props.children),O.return=F,F=O;break e}}else if(ee.elementType===U||typeof U=="object"&&U!==null&&U.$$typeof===Ui&&jg(U)===ee.type){s(F,ee.sibling),O=p(ee,B.props),O.ref=Rl(F,ee,B),O.return=F,F=O;break e}s(F,ee);break}else r(F,ee);ee=ee.sibling}B.type===Cs?(O=Ma(B.props.children,F.mode,Q,B.key),O.return=F,F=O):(Q=r0(B.type,B.key,B.props,null,F.mode,Q),Q.ref=Rl(F,O,B),Q.return=F,F=Q)}return b(F);case As:e:{for(ee=B.key;O!==null;){if(O.key===ee)if(O.tag===4&&O.stateNode.containerInfo===B.containerInfo&&O.stateNode.implementation===B.implementation){s(F,O.sibling),O=p(O,B.children||[]),O.return=F,F=O;break e}else{s(F,O);break}else r(F,O);O=O.sibling}O=y2(B,F.mode,Q),O.return=F,F=O}return b(F);case Ui:return ee=B._init,Z(F,O,ee(B._payload),Q)}if(Hl(B))return R(F,O,B,Q);if(El(B))return D(F,O,B,Q);Pu(F,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,O!==null&&O.tag===6?(s(F,O.sibling),O=p(O,B),O.return=F,F=O):(s(F,O),O=k2(B,F.mode,Q),O.return=F,F=O),b(F)):s(F,O)}return Z}var Ks=r4(!0),o4=r4(!1),E0=la(null),P0=null,Rs=null,_1=null;function w1(){_1=Rs=P0=null}function A1(t){var r=E0.current;An(E0),t._currentValue=r}function pp(t,r,s){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===s)break;t=t.return}}function zs(t,r){P0=t,_1=Rs=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&r&&(Hr=!0),t.firstContext=null)}function Ao(t){var r=t._currentValue;if(_1!==t)if(t={context:t,memoizedValue:r,next:null},Rs===null){if(P0===null)throw Error(Ve(308));Rs=t,P0.dependencies={lanes:0,firstContext:t}}else Rs=Rs.next=t;return r}var xa=null;function C1(t){xa===null?xa=[t]:xa.push(t)}function i4(t,r,s,u){var p=r.interleaved;return p===null?(s.next=s,C1(r)):(s.next=p.next,p.next=s),r.interleaved=s,Si(t,u)}function Si(t,r){t.lanes|=r;var s=t.alternate;for(s!==null&&(s.lanes|=r),s=t,t=t.return;t!==null;)t.childLanes|=r,s=t.alternate,s!==null&&(s.childLanes|=r),s=t,t=t.return;return s.tag===3?s.stateNode:null}var Hi=!1;function x1(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function a4(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function _i(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function ea(t,r,s){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,qt&2){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,Si(t,s)}return p=u.interleaved,p===null?(r.next=r,C1(u)):(r.next=p.next,p.next=r),u.interleaved=r,Si(t,s)}function Zu(t,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194240)!==0)){var u=r.lanes;u&=t.pendingLanes,s|=u,r.lanes=s,u1(t,s)}}function zg(t,r){var s=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var p=null,d=null;if(s=s.firstBaseUpdate,s!==null){do{var b={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};d===null?p=d=b:d=d.next=b,s=s.next}while(s!==null);d===null?p=d=r:d=d.next=r}else p=d=r;s={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:d,shared:u.shared,effects:u.effects},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=r:t.next=r,s.lastBaseUpdate=r}function M0(t,r,s,u){var p=t.updateQueue;Hi=!1;var d=p.firstBaseUpdate,b=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var y=k,_=y.next;y.next=null,b===null?d=_:b.next=_,b=y;var S=t.alternate;S!==null&&(S=S.updateQueue,k=S.lastBaseUpdate,k!==b&&(k===null?S.firstBaseUpdate=_:k.next=_,S.lastBaseUpdate=y))}if(d!==null){var P=p.baseState;b=0,S=_=y=null,k=d;do{var I=k.lane,L=k.eventTime;if((u&I)===I){S!==null&&(S=S.next={eventTime:L,lane:0,tag:k.tag,payload:k.payload,callback:k.callback,next:null});e:{var R=t,D=k;switch(I=r,L=s,D.tag){case 1:if(R=D.payload,typeof R=="function"){P=R.call(L,P,I);break e}P=R;break e;case 3:R.flags=R.flags&-65537|128;case 0:if(R=D.payload,I=typeof R=="function"?R.call(L,P,I):R,I==null)break e;P=Fn({},P,I);break e;case 2:Hi=!0}}k.callback!==null&&k.lane!==0&&(t.flags|=64,I=p.effects,I===null?p.effects=[k]:I.push(k))}else L={eventTime:L,lane:I,tag:k.tag,payload:k.payload,callback:k.callback,next:null},S===null?(_=S=L,y=P):S=S.next=L,b|=I;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;I=k,k=I.next,I.next=null,p.lastBaseUpdate=I,p.shared.pending=null}}while(!0);if(S===null&&(y=P),p.baseState=y,p.firstBaseUpdate=_,p.lastBaseUpdate=S,r=p.shared.interleaved,r!==null){p=r;do b|=p.lane,p=p.next;while(p!==r)}else d===null&&(p.shared.lanes=0);Oa|=b,t.lanes=b,t.memoizedState=P}}function Vg(t,r,s){if(t=r.effects,r.effects=null,t!==null)for(r=0;rs?s:4,t(!0);var u=h2.transition;h2.transition={};try{t(!1),r()}finally{cn=s,h2.transition=u}}function A4(){return Co().memoizedState}function i5(t,r,s){var u=na(t);if(s={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null},C4(t))x4(r,s);else if(s=i4(t,r,s,u),s!==null){var p=Rr();jo(s,t,u,p),S4(s,r,u)}}function a5(t,r,s){var u=na(t),p={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null};if(C4(t))x4(r,p);else{var d=t.alternate;if(t.lanes===0&&(d===null||d.lanes===0)&&(d=r.lastRenderedReducer,d!==null))try{var b=r.lastRenderedState,k=d(b,s);if(p.hasEagerState=!0,p.eagerState=k,zo(k,b)){var y=r.interleaved;y===null?(p.next=p,C1(r)):(p.next=y.next,y.next=p),r.interleaved=p;return}}catch{}finally{}s=i4(t,r,p,u),s!==null&&(p=Rr(),jo(s,t,u,p),S4(s,r,u))}}function C4(t){var r=t.alternate;return t===Rn||r!==null&&r===Rn}function x4(t,r){ec=N0=!0;var s=t.pending;s===null?r.next=r:(r.next=s.next,s.next=r),t.pending=r}function S4(t,r,s){if(s&4194240){var u=r.lanes;u&=t.pendingLanes,s|=u,r.lanes=s,u1(t,s)}}var R0={readContext:Ao,useCallback:kr,useContext:kr,useEffect:kr,useImperativeHandle:kr,useInsertionEffect:kr,useLayoutEffect:kr,useMemo:kr,useReducer:kr,useRef:kr,useState:kr,useDebugValue:kr,useDeferredValue:kr,useTransition:kr,useMutableSource:kr,useSyncExternalStore:kr,useId:kr,unstable_isNewReconciler:!1},s5={readContext:Ao,useCallback:function(t,r){return qo().memoizedState=[t,r===void 0?null:r],t},useContext:Ao,useEffect:Ug,useImperativeHandle:function(t,r,s){return s=s!=null?s.concat([t]):null,$u(4194308,4,v4.bind(null,r,t),s)},useLayoutEffect:function(t,r){return $u(4194308,4,t,r)},useInsertionEffect:function(t,r){return $u(4,2,t,r)},useMemo:function(t,r){var s=qo();return r=r===void 0?null:r,t=t(),s.memoizedState=[t,r],t},useReducer:function(t,r,s){var u=qo();return r=s!==void 0?s(r):r,u.memoizedState=u.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},u.queue=t,t=t.dispatch=i5.bind(null,Rn,t),[u.memoizedState,t]},useRef:function(t){var r=qo();return t={current:t},r.memoizedState=t},useState:Wg,useDebugValue:T1,useDeferredValue:function(t){return qo().memoizedState=t},useTransition:function(){var t=Wg(!1),r=t[0];return t=o5.bind(null,t[1]),qo().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,s){var u=Rn,p=qo();if(Pn){if(s===void 0)throw Error(Ve(407));s=s()}else{if(s=r(),fr===null)throw Error(Ve(349));Da&30||u4(u,r,s)}p.memoizedState=s;var d={value:s,getSnapshot:r};return p.queue=d,Ug(d4.bind(null,u,d,t),[t]),u.flags|=2048,wc(9,f4.bind(null,u,d,s,r),void 0,null),s},useId:function(){var t=qo(),r=fr.identifierPrefix;if(Pn){var s=ki,u=vi;s=(u&~(1<<32-Bo(u)-1)).toString(32)+s,r=":"+r+"R"+s,s=yc++,0<\/script>",t=t.removeChild(t.firstChild)):typeof u.is=="string"?t=b.createElement(s,{is:u.is}):(t=b.createElement(s),s==="select"&&(b=t,u.multiple?b.multiple=!0:u.size&&(b.size=u.size))):t=b.createElementNS(t,s),t[ei]=r,t[bc]=u,D4(t,r,!1,!1),r.stateNode=t;e:{switch(b=X2(s,u),s){case"dialog":wn("cancel",t),wn("close",t),p=u;break;case"iframe":case"object":case"embed":wn("load",t),p=u;break;case"video":case"audio":for(p=0;pZs&&(r.flags|=128,u=!0,Tl(d,!1),r.lanes=4194304)}else{if(!u)if(t=I0(b),t!==null){if(r.flags|=128,u=!0,s=t.updateQueue,s!==null&&(r.updateQueue=s,r.flags|=4),Tl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!b.alternate&&!Pn)return yr(r),null}else 2*Gn()-d.renderingStartTime>Zs&&s!==1073741824&&(r.flags|=128,u=!0,Tl(d,!1),r.lanes=4194304);d.isBackwards?(b.sibling=r.child,r.child=b):(s=d.last,s!==null?s.sibling=b:r.child=b,d.last=b)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=Gn(),r.sibling=null,s=Nn.current,vn(Nn,u?s&1|2:s&1),r):(yr(r),null);case 22:case 23:return j1(),u=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==u&&(r.flags|=8192),u&&r.mode&1?Jr&1073741824&&(yr(r),r.subtreeFlags&6&&(r.flags|=8192)):yr(r),null;case 24:return null;case 25:return null}throw Error(Ve(156,r.tag))}function m5(t,r){switch(k1(r),r.tag){case 1:return Qr(r.type)&&A0(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Xs(),An(Gr),An(Cr),P1(),t=r.flags,t&65536&&!(t&128)?(r.flags=t&-65537|128,r):null;case 5:return E1(r),null;case 13:if(An(Nn),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(Ve(340));Ys()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return An(Nn),null;case 4:return Xs(),null;case 10:return A1(r.type._context),null;case 22:case 23:return j1(),null;case 24:return null;default:return null}}var Iu=!1,Ar=!1,g5=typeof WeakSet=="function"?WeakSet:Set,lt=null;function Ts(t,r){var s=t.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(u){zn(t,r,u)}else s.current=null}function wp(t,r,s){try{s()}catch(u){zn(t,r,u)}}var eb=!1;function b5(t,r){if(ip=k0,t=Uk(),b1(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var p=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{s.nodeType,d.nodeType}catch{s=null;break e}var b=0,k=-1,y=-1,_=0,S=0,P=t,I=null;t:for(;;){for(var L;P!==s||p!==0&&P.nodeType!==3||(k=b+p),P!==d||u!==0&&P.nodeType!==3||(y=b+u),P.nodeType===3&&(b+=P.nodeValue.length),(L=P.firstChild)!==null;)I=P,P=L;for(;;){if(P===t)break t;if(I===s&&++_===p&&(k=b),I===d&&++S===u&&(y=b),(L=P.nextSibling)!==null)break;P=I,I=P.parentNode}P=L}s=k===-1||y===-1?null:{start:k,end:y}}else s=null}s=s||{start:0,end:0}}else s=null;for(ap={focusedElem:t,selectionRange:s},k0=!1,lt=r;lt!==null;)if(r=lt,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,lt=t;else for(;lt!==null;){r=lt;try{var R=r.alternate;if(r.flags&1024)switch(r.tag){case 0:case 11:case 15:break;case 1:if(R!==null){var D=R.memoizedProps,Z=R.memoizedState,F=r.stateNode,O=F.getSnapshotBeforeUpdate(r.elementType===r.type?D:To(r.type,D),Z);F.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var B=r.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ve(163))}}catch(Q){zn(r,r.return,Q)}if(t=r.sibling,t!==null){t.return=r.return,lt=t;break}lt=r.return}return R=eb,eb=!1,R}function tc(t,r,s){var u=r.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var p=u=u.next;do{if((p.tag&t)===t){var d=p.destroy;p.destroy=void 0,d!==void 0&&wp(r,s,d)}p=p.next}while(p!==u)}}function lf(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var u=s.create;s.destroy=u()}s=s.next}while(s!==r)}}function Ap(t){var r=t.ref;if(r!==null){var s=t.stateNode;switch(t.tag){case 5:t=s;break;default:t=s}typeof r=="function"?r(t):r.current=t}}function j4(t){var r=t.alternate;r!==null&&(t.alternate=null,j4(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[ei],delete r[bc],delete r[cp],delete r[$C],delete r[e5])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function z4(t){return t.tag===5||t.tag===3||t.tag===4}function tb(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||z4(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Cp(t,r,s){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?s.nodeType===8?s.parentNode.insertBefore(t,r):s.insertBefore(t,r):(s.nodeType===8?(r=s.parentNode,r.insertBefore(t,s)):(r=s,r.appendChild(t)),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=w0));else if(u!==4&&(t=t.child,t!==null))for(Cp(t,r,s),t=t.sibling;t!==null;)Cp(t,r,s),t=t.sibling}function xp(t,r,s){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?s.insertBefore(t,r):s.appendChild(t);else if(u!==4&&(t=t.child,t!==null))for(xp(t,r,s),t=t.sibling;t!==null;)xp(t,r,s),t=t.sibling}var pr=null,Fo=!1;function zi(t,r,s){for(s=s.child;s!==null;)V4(t,r,s),s=s.sibling}function V4(t,r,s){if(ti&&typeof ti.onCommitFiberUnmount=="function")try{ti.onCommitFiberUnmount($0,s)}catch{}switch(s.tag){case 5:Ar||Ts(s,r);case 6:var u=pr,p=Fo;pr=null,zi(t,r,s),pr=u,Fo=p,pr!==null&&(Fo?(t=pr,s=s.stateNode,t.nodeType===8?t.parentNode.removeChild(s):t.removeChild(s)):pr.removeChild(s.stateNode));break;case 18:pr!==null&&(Fo?(t=pr,s=s.stateNode,t.nodeType===8?f2(t.parentNode,s):t.nodeType===1&&f2(t,s),dc(t)):f2(pr,s.stateNode));break;case 4:u=pr,p=Fo,pr=s.stateNode.containerInfo,Fo=!0,zi(t,r,s),pr=u,Fo=p;break;case 0:case 11:case 14:case 15:if(!Ar&&(u=s.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){p=u=u.next;do{var d=p,b=d.destroy;d=d.tag,b!==void 0&&(d&2||d&4)&&wp(s,r,b),p=p.next}while(p!==u)}zi(t,r,s);break;case 1:if(!Ar&&(Ts(s,r),u=s.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=s.memoizedProps,u.state=s.memoizedState,u.componentWillUnmount()}catch(k){zn(s,r,k)}zi(t,r,s);break;case 21:zi(t,r,s);break;case 22:s.mode&1?(Ar=(u=Ar)||s.memoizedState!==null,zi(t,r,s),Ar=u):zi(t,r,s);break;default:zi(t,r,s)}}function nb(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var s=t.stateNode;s===null&&(s=t.stateNode=new g5),r.forEach(function(u){var p=S5.bind(null,t,u);s.has(u)||(s.add(u),u.then(p,p))})}}function Ro(t,r){var s=r.deletions;if(s!==null)for(var u=0;up&&(p=b),u&=~d}if(u=p,u=Gn()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*k5(u/1960))-u,10t?16:t,Xi===null)var u=!1;else{if(t=Xi,Xi=null,L0=0,qt&6)throw Error(Ve(331));var p=qt;for(qt|=4,lt=t.current;lt!==null;){var d=lt,b=d.child;if(lt.flags&16){var k=d.deletions;if(k!==null){for(var y=0;yGn()-O1?Pa(t,0):D1|=s),Yr(t,r)}function X4(t,r){r===0&&(t.mode&1?(r=_u,_u<<=1,!(_u&130023424)&&(_u=4194304)):r=1);var s=Rr();t=Si(t,r),t!==null&&(Fc(t,r,s),Yr(t,s))}function x5(t){var r=t.memoizedState,s=0;r!==null&&(s=r.retryLane),X4(t,s)}function S5(t,r){var s=0;switch(t.tag){case 13:var u=t.stateNode,p=t.memoizedState;p!==null&&(s=p.retryLane);break;case 19:u=t.stateNode;break;default:throw Error(Ve(314))}u!==null&&u.delete(r),X4(t,s)}var q4;q4=function(t,r,s){if(t!==null)if(t.memoizedProps!==r.pendingProps||Gr.current)Hr=!0;else{if(!(t.lanes&s)&&!(r.flags&128))return Hr=!1,p5(t,r,s);Hr=!!(t.flags&131072)}else Hr=!1,Pn&&r.flags&1048576&&e4(r,S0,r.index);switch(r.lanes=0,r.tag){case 2:var u=r.type;e0(t,r),t=r.pendingProps;var p=Qs(r,Cr.current);zs(r,s),p=I1(null,r,u,t,p,s);var d=N1();return r.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Qr(u)?(d=!0,C0(r)):d=!1,r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,x1(r),p.updater=sf,r.stateNode=p,p._reactInternals=r,mp(r,u,t,s),r=vp(null,r,u,!0,d,s)):(r.tag=0,Pn&&d&&v1(r),Ir(null,r,p,s),r=r.child),r;case 16:u=r.elementType;e:{switch(e0(t,r),t=r.pendingProps,p=u._init,u=p(u._payload),r.type=u,p=r.tag=P5(u),t=To(u,t),p){case 0:r=bp(null,r,u,t,s);break e;case 1:r=Zg(null,r,u,t,s);break e;case 11:r=Xg(null,r,u,t,s);break e;case 14:r=qg(null,r,u,To(u.type,t),s);break e}throw Error(Ve(306,u,""))}return r;case 0:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:To(u,p),bp(t,r,u,p,s);case 1:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:To(u,p),Zg(t,r,u,p,s);case 3:e:{if(T4(r),t===null)throw Error(Ve(387));u=r.pendingProps,d=r.memoizedState,p=d.element,a4(t,r),M0(r,u,null,s);var b=r.memoizedState;if(u=b.element,d.isDehydrated)if(d={element:u,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},r.updateQueue.baseState=d,r.memoizedState=d,r.flags&256){p=qs(Error(Ve(423)),r),r=Jg(t,r,u,s,p);break e}else if(u!==p){p=qs(Error(Ve(424)),r),r=Jg(t,r,u,s,p);break e}else for(to=$i(r.stateNode.containerInfo.firstChild),oo=r,Pn=!0,Lo=null,s=o4(r,null,u,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ys(),u===p){r=Ei(t,r,s);break e}Ir(t,r,u,s)}r=r.child}return r;case 5:return s4(r),t===null&&dp(r),u=r.type,p=r.pendingProps,d=t!==null?t.memoizedProps:null,b=p.children,sp(u,p)?b=null:d!==null&&sp(u,d)&&(r.flags|=32),R4(t,r),Ir(t,r,b,s),r.child;case 6:return t===null&&dp(r),null;case 13:return F4(t,r,s);case 4:return S1(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=Ks(r,null,u,s):Ir(t,r,u,s),r.child;case 11:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:To(u,p),Xg(t,r,u,p,s);case 7:return Ir(t,r,r.pendingProps,s),r.child;case 8:return Ir(t,r,r.pendingProps.children,s),r.child;case 12:return Ir(t,r,r.pendingProps.children,s),r.child;case 10:e:{if(u=r.type._context,p=r.pendingProps,d=r.memoizedProps,b=p.value,vn(E0,u._currentValue),u._currentValue=b,d!==null)if(zo(d.value,b)){if(d.children===p.children&&!Gr.current){r=Ei(t,r,s);break e}}else for(d=r.child,d!==null&&(d.return=r);d!==null;){var k=d.dependencies;if(k!==null){b=d.child;for(var y=k.firstContext;y!==null;){if(y.context===u){if(d.tag===1){y=_i(-1,s&-s),y.tag=2;var _=d.updateQueue;if(_!==null){_=_.shared;var S=_.pending;S===null?y.next=y:(y.next=S.next,S.next=y),_.pending=y}}d.lanes|=s,y=d.alternate,y!==null&&(y.lanes|=s),pp(d.return,s,r),k.lanes|=s;break}y=y.next}}else if(d.tag===10)b=d.type===r.type?null:d.child;else if(d.tag===18){if(b=d.return,b===null)throw Error(Ve(341));b.lanes|=s,k=b.alternate,k!==null&&(k.lanes|=s),pp(b,s,r),b=d.sibling}else b=d.child;if(b!==null)b.return=d;else for(b=d;b!==null;){if(b===r){b=null;break}if(d=b.sibling,d!==null){d.return=b.return,b=d;break}b=b.return}d=b}Ir(t,r,p.children,s),r=r.child}return r;case 9:return p=r.type,u=r.pendingProps.children,zs(r,s),p=Ao(p),u=u(p),r.flags|=1,Ir(t,r,u,s),r.child;case 14:return u=r.type,p=To(u,r.pendingProps),p=To(u.type,p),qg(t,r,u,p,s);case 15:return I4(t,r,r.type,r.pendingProps,s);case 17:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:To(u,p),e0(t,r),r.tag=1,Qr(u)?(t=!0,C0(r)):t=!1,zs(r,s),E4(r,u,p),mp(r,u,p,s),vp(null,r,u,!0,t,s);case 19:return L4(t,r,s);case 22:return N4(t,r,s)}throw Error(Ve(156,r.tag))};function Z4(t,r){return Ck(t,r)}function E5(t,r,s,u){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ko(t,r,s,u){return new E5(t,r,s,u)}function V1(t){return t=t.prototype,!(!t||!t.isReactComponent)}function P5(t){if(typeof t=="function")return V1(t)?1:0;if(t!=null){if(t=t.$$typeof,t===a1)return 11;if(t===s1)return 14}return 2}function ra(t,r){var s=t.alternate;return s===null?(s=ko(t.tag,r,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=r,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&14680064,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,r=t.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s}function r0(t,r,s,u,p,d){var b=2;if(u=t,typeof t=="function")V1(t)&&(b=1);else if(typeof t=="string")b=5;else e:switch(t){case Cs:return Ma(s.children,p,d,r);case i1:b=8,p|=8;break;case j2:return t=ko(12,s,r,p|2),t.elementType=j2,t.lanes=d,t;case z2:return t=ko(13,s,r,p),t.elementType=z2,t.lanes=d,t;case V2:return t=ko(19,s,r,p),t.elementType=V2,t.lanes=d,t;case sk:return uf(s,p,d,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case ik:b=10;break e;case ak:b=9;break e;case a1:b=11;break e;case s1:b=14;break e;case Ui:b=16,u=null;break e}throw Error(Ve(130,t==null?t:typeof t,""))}return r=ko(b,s,r,p),r.elementType=t,r.type=u,r.lanes=d,r}function Ma(t,r,s,u){return t=ko(7,t,u,r),t.lanes=s,t}function uf(t,r,s,u){return t=ko(22,t,u,r),t.elementType=sk,t.lanes=s,t.stateNode={isHidden:!1},t}function k2(t,r,s){return t=ko(6,t,null,r),t.lanes=s,t}function y2(t,r,s){return r=ko(4,t.children!==null?t.children:[],t.key,r),r.lanes=s,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function M5(t,r,s,u,p){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=e2(0),this.expirationTimes=e2(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=e2(0),this.identifierPrefix=u,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function W1(t,r,s,u,p,d,b,k,y){return t=new M5(t,r,s,k,y),r===1?(r=1,d===!0&&(r|=8)):r=0,d=ko(3,null,null,r),t.current=d,d.stateNode=t,d.memoizedState={element:u,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},x1(d),t}function I5(t,r,s){var u=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t6)}catch(t){console.error(t)}}t6(),tk.exports=so;var Q1=tk.exports;const Tu=Zp(Q1);var ub=Q1;O2.createRoot=ub.createRoot,O2.hydrateRoot=ub.hydrateRoot;const L5={black:"#000",white:"#fff"},Cc=L5,D5={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},ds=D5,O5={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},ps=O5,B5={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},hs=B5,j5={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},ms=j5,z5={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},gs=z5,V5={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Ll=V5,W5={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},U5=W5;function ja(t){let r="https://mui.com/production-error/?code="+t;for(let s=1;s0?hr(sl,--Kr):0,$s--,Xn===10&&($s=1,gf--),Xn}function io(){return Xn=Kr2||Sc(Xn)>3?"":" "}function sx(t,r){for(;--r&&io()&&!(Xn<48||Xn>102||Xn>57&&Xn<65||Xn>70&&Xn<97););return Bc(t,o0()+(r<6&&ri()==32&&io()==32))}function Np(t){for(;io();)switch(Xn){case t:return Kr;case 34:case 39:t!==34&&t!==39&&Np(Xn);break;case 40:t===41&&Np(t);break;case 92:io();break}return Kr}function lx(t,r){for(;io()&&t+Xn!==57;)if(t+Xn===84&&ri()===47)break;return"/*"+Bc(r,Kr-1)+"*"+mf(t===47?t:io())}function cx(t){for(;!Sc(ri());)io();return Bc(t,Kr)}function ux(t){return l6(a0("",null,null,null,[""],t=s6(t),0,[0],t))}function a0(t,r,s,u,p,d,b,k,y){for(var _=0,S=0,P=b,I=0,L=0,R=0,D=1,Z=1,F=1,O=0,B="",Q=p,U=d,ee=u,q=B;Z;)switch(R=O,O=io()){case 40:if(R!=108&&hr(q,P-1)==58){Ip(q+=rn(i0(O),"&","&\f"),"&\f")!=-1&&(F=-1);break}case 34:case 39:case 91:q+=i0(O);break;case 9:case 10:case 13:case 32:q+=ax(R);break;case 92:q+=sx(o0()-1,7);continue;case 47:switch(ri()){case 42:case 47:Fu(fx(lx(io(),o0()),r,s),y);break;default:q+="/"}break;case 123*D:k[_++]=Jo(q)*F;case 125*D:case 59:case 0:switch(O){case 0:case 125:Z=0;case 59+S:F==-1&&(q=rn(q,/\f/g,"")),L>0&&Jo(q)-P&&Fu(L>32?db(q+";",u,s,P-1):db(rn(q," ","")+";",u,s,P-2),y);break;case 59:q+=";";default:if(Fu(ee=fb(q,r,s,_,S,p,k,B,Q=[],U=[],P),d),O===123)if(S===0)a0(q,r,ee,ee,Q,d,P,k,U);else switch(I===99&&hr(q,3)===110?100:I){case 100:case 108:case 109:case 115:a0(t,ee,ee,u&&Fu(fb(t,ee,ee,0,0,p,k,B,p,Q=[],P),U),p,U,P,k,u?Q:U);break;default:a0(q,ee,ee,ee,[""],U,0,k,U)}}_=S=L=0,D=F=1,B=q="",P=b;break;case 58:P=1+Jo(q),L=R;default:if(D<1){if(O==123)--D;else if(O==125&&D++==0&&ix()==125)continue}switch(q+=mf(O),O*D){case 38:F=S>0?1:(q+="\f",-1);break;case 44:k[_++]=(Jo(q)-1)*F,F=1;break;case 64:ri()===45&&(q+=i0(io())),I=ri(),S=P=Jo(B=q+=cx(o0())),O++;break;case 45:R===45&&Jo(q)==2&&(D=0)}}return d}function fb(t,r,s,u,p,d,b,k,y,_,S){for(var P=p-1,I=p===0?d:[""],L=X1(I),R=0,D=0,Z=0;R0?I[F]+" "+O:rn(O,/&\f/g,I[F])))&&(y[Z++]=B);return bf(t,r,s,p===0?Y1:k,y,_,S)}function fx(t,r,s){return bf(t,r,s,r6,mf(ox()),xc(t,2,-2),0)}function db(t,r,s,u){return bf(t,r,s,K1,xc(t,0,u),xc(t,u+1,-1),u)}function Ws(t,r){for(var s="",u=X1(t),p=0;p6)switch(hr(t,r+1)){case 109:if(hr(t,r+4)!==45)break;case 102:return rn(t,/(.+:)(.+)-([^]+)/,"$1"+nn+"$2-$3$1"+B0+(hr(t,r+3)==108?"$3":"$2-$3"))+t;case 115:return~Ip(t,"stretch")?c6(rn(t,"stretch","fill-available"),r)+t:t}break;case 4949:if(hr(t,r+1)!==115)break;case 6444:switch(hr(t,Jo(t)-3-(~Ip(t,"!important")&&10))){case 107:return rn(t,":",":"+nn)+t;case 101:return rn(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nn+(hr(t,14)===45?"inline-":"")+"box$3$1"+nn+"$2$3$1"+_r+"$2box$3")+t}break;case 5936:switch(hr(t,r+11)){case 114:return nn+t+_r+rn(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return nn+t+_r+rn(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return nn+t+_r+rn(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return nn+t+_r+t+t}return t}var yx=function(r,s,u,p){if(r.length>-1&&!r.return)switch(r.type){case K1:r.return=c6(r.value,r.length);break;case o6:return Ws([Dl(r,{value:rn(r.value,"@","@"+nn)})],p);case Y1:if(r.length)return rx(r.props,function(d){switch(nx(d,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ws([Dl(r,{props:[rn(d,/:(read-\w+)/,":"+B0+"$1")]})],p);case"::placeholder":return Ws([Dl(r,{props:[rn(d,/:(plac\w+)/,":"+nn+"input-$1")]}),Dl(r,{props:[rn(d,/:(plac\w+)/,":"+B0+"$1")]}),Dl(r,{props:[rn(d,/:(plac\w+)/,_r+"input-$1")]})],p)}return""})}},_x=[yx],u6=function(r){var s=r.key;if(s==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(D){var Z=D.getAttribute("data-emotion");Z.indexOf(" ")!==-1&&(document.head.appendChild(D),D.setAttribute("data-s",""))})}var p=r.stylisPlugins||_x,d={},b,k=[];b=r.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+s+' "]'),function(D){for(var Z=D.getAttribute("data-emotion").split(" "),F=1;F=4;++u,p-=4)s=t.charCodeAt(u)&255|(t.charCodeAt(++u)&255)<<8|(t.charCodeAt(++u)&255)<<16|(t.charCodeAt(++u)&255)<<24,s=(s&65535)*1540483477+((s>>>16)*59797<<16),s^=s>>>24,r=(s&65535)*1540483477+((s>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(p){case 3:r^=(t.charCodeAt(u+2)&255)<<16;case 2:r^=(t.charCodeAt(u+1)&255)<<8;case 1:r^=t.charCodeAt(u)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var Tx={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Fx=!1,Lx=/[A-Z]|^ms/g,Dx=/_EMO_([^_]+?)_([^]*?)_EMO_/g,b6=function(r){return r.charCodeAt(1)===45},hb=function(r){return r!=null&&typeof r!="boolean"},_2=n6(function(t){return b6(t)?t:t.replace(Lx,"-$&").toLowerCase()}),mb=function(r,s){switch(r){case"animation":case"animationName":if(typeof s=="string")return s.replace(Dx,function(u,p,d){return $o={name:p,styles:d,next:$o},p})}return Tx[r]!==1&&!b6(r)&&typeof s=="number"&&s!==0?s+"px":s},Ox="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ec(t,r,s){if(s==null)return"";var u=s;if(u.__emotion_styles!==void 0)return u;switch(typeof s){case"boolean":return"";case"object":{var p=s;if(p.anim===1)return $o={name:p.name,styles:p.styles,next:$o},p.name;var d=s;if(d.styles!==void 0){var b=d.next;if(b!==void 0)for(;b!==void 0;)$o={name:b.name,styles:b.styles,next:$o},b=b.next;var k=d.styles+";";return k}return Bx(t,r,s)}case"function":{if(t!==void 0){var y=$o,_=s(t);return $o=y,Ec(t,r,_)}break}}var S=s;if(r==null)return S;var P=r[S];return P!==void 0?P:S}function Bx(t,r,s){var u="";if(Array.isArray(s))for(var p=0;p96?Ux:Hx},yb=function(r,s,u){var p;if(s){var d=s.shouldForwardProp;p=r.__emotion_forwardProp&&d?function(b){return r.__emotion_forwardProp(b)&&d(b)}:d}return typeof p!="function"&&u&&(p=r.__emotion_forwardProp),p},Gx=!1,Qx=function(r){var s=r.cache,u=r.serialized,p=r.isStringTag;return m6(s,u,p),zx(function(){return g6(s,u,p)}),null},Yx=function t(r,s){var u=r.__emotion_real===r,p=u&&r.__emotion_base||r,d,b;s!==void 0&&(d=s.label,b=s.target);var k=yb(r,s,u),y=k||kb(p),_=!y("as");return function(){var S=arguments,P=u&&r.__emotion_styles!==void 0?r.__emotion_styles.slice(0):[];if(d!==void 0&&P.push("label:"+d+";"),S[0]==null||S[0].raw===void 0)P.push.apply(P,S);else{P.push(S[0][0]);for(var I=S.length,L=1;Lr(qx(p)?s:p):r;return j.jsx(Wx,{styles:u})}function eh(t,r){return Rp(t,r)}const C6=(t,r)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=r(t.__emotion_styles))},Zx=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:A6,StyledEngineProvider:Xx,ThemeContext:jc,css:w6,default:eh,internal_processStyles:C6,keyframes:Pf},Symbol.toStringTag,{value:"Module"}));function bi(t){if(typeof t!="object"||t===null)return!1;const r=Object.getPrototypeOf(t);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function x6(t){if(!bi(t))return t;const r={};return Object.keys(t).forEach(s=>{r[s]=x6(t[s])}),r}function Tr(t,r,s={clone:!0}){const u=s.clone?Y({},t):t;return bi(t)&&bi(r)&&Object.keys(r).forEach(p=>{bi(r[p])&&Object.prototype.hasOwnProperty.call(t,p)&&bi(t[p])?u[p]=Tr(t[p],r[p],s):s.clone?u[p]=bi(r[p])?x6(r[p]):r[p]:u[p]=r[p]}),u}const Jx=Object.freeze(Object.defineProperty({__proto__:null,default:Tr,isPlainObject:bi},Symbol.toStringTag,{value:"Module"})),$x=["values","unit","step"],eS=t=>{const r=Object.keys(t).map(s=>({key:s,val:t[s]}))||[];return r.sort((s,u)=>s.val-u.val),r.reduce((s,u)=>Y({},s,{[u.key]:u.val}),{})};function S6(t){const{values:r={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:s="px",step:u=5}=t,p=Ke(t,$x),d=eS(r),b=Object.keys(d);function k(I){return`@media (min-width:${typeof r[I]=="number"?r[I]:I}${s})`}function y(I){return`@media (max-width:${(typeof r[I]=="number"?r[I]:I)-u/100}${s})`}function _(I,L){const R=b.indexOf(L);return`@media (min-width:${typeof r[I]=="number"?r[I]:I}${s}) and (max-width:${(R!==-1&&typeof r[b[R]]=="number"?r[b[R]]:L)-u/100}${s})`}function S(I){return b.indexOf(I)+1`@media (min-width:${th[t]}px)`};function Xr(t,r,s){const u=t.theme||{};if(Array.isArray(r)){const d=u.breakpoints||_b;return r.reduce((b,k,y)=>(b[d.up(d.keys[y])]=s(r[y]),b),{})}if(typeof r=="object"){const d=u.breakpoints||_b;return Object.keys(r).reduce((b,k)=>{if(Object.keys(d.values||th).indexOf(k)!==-1){const y=d.up(k);b[y]=s(r[k],k)}else{const y=k;b[y]=r[y]}return b},{})}return s(r)}function E6(t={}){var r;return((r=t.keys)==null?void 0:r.reduce((u,p)=>{const d=t.up(p);return u[d]={},u},{}))||{}}function P6(t,r){return t.reduce((s,u)=>{const p=s[u];return(!p||Object.keys(p).length===0)&&delete s[u],s},r)}function rS(t,...r){const s=E6(t),u=[s,...r].reduce((p,d)=>Tr(p,d),{});return P6(Object.keys(s),u)}function oS(t,r){if(typeof t!="object")return{};const s={},u=Object.keys(r);return Array.isArray(t)?u.forEach((p,d)=>{d{t[p]!=null&&(s[p]=!0)}),s}function Ia({values:t,breakpoints:r,base:s}){const u=s||oS(t,r),p=Object.keys(u);if(p.length===0)return t;let d;return p.reduce((b,k,y)=>(Array.isArray(t)?(b[k]=t[y]!=null?t[y]:t[d],d=y):typeof t=="object"?(b[k]=t[k]!=null?t[k]:t[d],d=k):b[k]=t,b),{})}function $e(t){if(typeof t!="string")throw new Error(ja(7));return t.charAt(0).toUpperCase()+t.slice(1)}const iS=Object.freeze(Object.defineProperty({__proto__:null,default:$e},Symbol.toStringTag,{value:"Module"}));function Mf(t,r,s=!0){if(!r||typeof r!="string")return null;if(t&&t.vars&&s){const u=`vars.${r}`.split(".").reduce((p,d)=>p&&p[d]?p[d]:null,t);if(u!=null)return u}return r.split(".").reduce((u,p)=>u&&u[p]!=null?u[p]:null,t)}function j0(t,r,s,u=s){let p;return typeof t=="function"?p=t(s):Array.isArray(t)?p=t[s]||u:p=Mf(t,s)||u,r&&(p=r(p,u,t)),p}function Qn(t){const{prop:r,cssProperty:s=t.prop,themeKey:u,transform:p}=t,d=b=>{if(b[r]==null)return null;const k=b[r],y=b.theme,_=Mf(y,u)||{};return Xr(b,k,P=>{let I=j0(_,p,P);return P===I&&typeof P=="string"&&(I=j0(_,p,`${r}${P==="default"?"":$e(P)}`,P)),s===!1?I:{[s]:I}})};return d.propTypes={},d.filterProps=[r],d}function aS(t){const r={};return s=>(r[s]===void 0&&(r[s]=t(s)),r[s])}const sS={m:"margin",p:"padding"},lS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},wb={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},cS=aS(t=>{if(t.length>2)if(wb[t])t=wb[t];else return[t];const[r,s]=t.split(""),u=sS[r],p=lS[s]||"";return Array.isArray(p)?p.map(d=>u+d):[u+p]}),nh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],rh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...nh,...rh];function zc(t,r,s,u){var p;const d=(p=Mf(t,r,!1))!=null?p:s;return typeof d=="number"?b=>typeof b=="string"?b:d*b:Array.isArray(d)?b=>typeof b=="string"?b:d[b]:typeof d=="function"?d:()=>{}}function oh(t){return zc(t,"spacing",8)}function za(t,r){if(typeof r=="string"||r==null)return r;const s=Math.abs(r),u=t(s);return r>=0?u:typeof u=="number"?-u:`-${u}`}function uS(t,r){return s=>t.reduce((u,p)=>(u[p]=za(r,s),u),{})}function fS(t,r,s,u){if(r.indexOf(s)===-1)return null;const p=cS(s),d=uS(p,u),b=t[s];return Xr(t,b,d)}function M6(t,r){const s=oh(t.theme);return Object.keys(t).map(u=>fS(t,r,u,s)).reduce(oc,{})}function Bn(t){return M6(t,nh)}Bn.propTypes={};Bn.filterProps=nh;function jn(t){return M6(t,rh)}jn.propTypes={};jn.filterProps=rh;function dS(t=8){if(t.mui)return t;const r=oh({spacing:t}),s=(...u)=>(u.length===0?[1]:u).map(d=>{const b=r(d);return typeof b=="number"?`${b}px`:b}).join(" ");return s.mui=!0,s}function If(...t){const r=t.reduce((u,p)=>(p.filterProps.forEach(d=>{u[d]=p}),u),{}),s=u=>Object.keys(u).reduce((p,d)=>r[d]?oc(p,r[d](u)):p,{});return s.propTypes={},s.filterProps=t.reduce((u,p)=>u.concat(p.filterProps),[]),s}function vo(t){return typeof t!="number"?t:`${t}px solid`}function Eo(t,r){return Qn({prop:t,themeKey:"borders",transform:r})}const pS=Eo("border",vo),hS=Eo("borderTop",vo),mS=Eo("borderRight",vo),gS=Eo("borderBottom",vo),bS=Eo("borderLeft",vo),vS=Eo("borderColor"),kS=Eo("borderTopColor"),yS=Eo("borderRightColor"),_S=Eo("borderBottomColor"),wS=Eo("borderLeftColor"),AS=Eo("outline",vo),CS=Eo("outlineColor"),Nf=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const r=zc(t.theme,"shape.borderRadius",4),s=u=>({borderRadius:za(r,u)});return Xr(t,t.borderRadius,s)}return null};Nf.propTypes={};Nf.filterProps=["borderRadius"];If(pS,hS,mS,gS,bS,vS,kS,yS,_S,wS,Nf,AS,CS);const Rf=t=>{if(t.gap!==void 0&&t.gap!==null){const r=zc(t.theme,"spacing",8),s=u=>({gap:za(r,u)});return Xr(t,t.gap,s)}return null};Rf.propTypes={};Rf.filterProps=["gap"];const Tf=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const r=zc(t.theme,"spacing",8),s=u=>({columnGap:za(r,u)});return Xr(t,t.columnGap,s)}return null};Tf.propTypes={};Tf.filterProps=["columnGap"];const Ff=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const r=zc(t.theme,"spacing",8),s=u=>({rowGap:za(r,u)});return Xr(t,t.rowGap,s)}return null};Ff.propTypes={};Ff.filterProps=["rowGap"];const xS=Qn({prop:"gridColumn"}),SS=Qn({prop:"gridRow"}),ES=Qn({prop:"gridAutoFlow"}),PS=Qn({prop:"gridAutoColumns"}),MS=Qn({prop:"gridAutoRows"}),IS=Qn({prop:"gridTemplateColumns"}),NS=Qn({prop:"gridTemplateRows"}),RS=Qn({prop:"gridTemplateAreas"}),TS=Qn({prop:"gridArea"});If(Rf,Tf,Ff,xS,SS,ES,PS,MS,IS,NS,RS,TS);function Us(t,r){return r==="grey"?r:t}const FS=Qn({prop:"color",themeKey:"palette",transform:Us}),LS=Qn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Us}),DS=Qn({prop:"backgroundColor",themeKey:"palette",transform:Us});If(FS,LS,DS);function eo(t){return t<=1&&t!==0?`${t*100}%`:t}const OS=Qn({prop:"width",transform:eo}),ih=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const r=s=>{var u,p;const d=((u=t.theme)==null||(u=u.breakpoints)==null||(u=u.values)==null?void 0:u[s])||th[s];return d?((p=t.theme)==null||(p=p.breakpoints)==null?void 0:p.unit)!=="px"?{maxWidth:`${d}${t.theme.breakpoints.unit}`}:{maxWidth:d}:{maxWidth:eo(s)}};return Xr(t,t.maxWidth,r)}return null};ih.filterProps=["maxWidth"];const BS=Qn({prop:"minWidth",transform:eo}),jS=Qn({prop:"height",transform:eo}),zS=Qn({prop:"maxHeight",transform:eo}),VS=Qn({prop:"minHeight",transform:eo});Qn({prop:"size",cssProperty:"width",transform:eo});Qn({prop:"size",cssProperty:"height",transform:eo});const WS=Qn({prop:"boxSizing"});If(OS,ih,BS,jS,zS,VS,WS);const US={border:{themeKey:"borders",transform:vo},borderTop:{themeKey:"borders",transform:vo},borderRight:{themeKey:"borders",transform:vo},borderBottom:{themeKey:"borders",transform:vo},borderLeft:{themeKey:"borders",transform:vo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:vo},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Nf},color:{themeKey:"palette",transform:Us},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Us},backgroundColor:{themeKey:"palette",transform:Us},p:{style:jn},pt:{style:jn},pr:{style:jn},pb:{style:jn},pl:{style:jn},px:{style:jn},py:{style:jn},padding:{style:jn},paddingTop:{style:jn},paddingRight:{style:jn},paddingBottom:{style:jn},paddingLeft:{style:jn},paddingX:{style:jn},paddingY:{style:jn},paddingInline:{style:jn},paddingInlineStart:{style:jn},paddingInlineEnd:{style:jn},paddingBlock:{style:jn},paddingBlockStart:{style:jn},paddingBlockEnd:{style:jn},m:{style:Bn},mt:{style:Bn},mr:{style:Bn},mb:{style:Bn},ml:{style:Bn},mx:{style:Bn},my:{style:Bn},margin:{style:Bn},marginTop:{style:Bn},marginRight:{style:Bn},marginBottom:{style:Bn},marginLeft:{style:Bn},marginX:{style:Bn},marginY:{style:Bn},marginInline:{style:Bn},marginInlineStart:{style:Bn},marginInlineEnd:{style:Bn},marginBlock:{style:Bn},marginBlockStart:{style:Bn},marginBlockEnd:{style:Bn},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Rf},rowGap:{style:Ff},columnGap:{style:Tf},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:eo},maxWidth:{style:ih},minWidth:{transform:eo},height:{transform:eo},maxHeight:{transform:eo},minHeight:{transform:eo},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Vc=US;function HS(...t){const r=t.reduce((u,p)=>u.concat(Object.keys(p)),[]),s=new Set(r);return t.every(u=>s.size===Object.keys(u).length)}function GS(t,r){return typeof t=="function"?t(r):t}function I6(){function t(s,u,p,d){const b={[s]:u,theme:p},k=d[s];if(!k)return{[s]:u};const{cssProperty:y=s,themeKey:_,transform:S,style:P}=k;if(u==null)return null;if(_==="typography"&&u==="inherit")return{[s]:u};const I=Mf(p,_)||{};return P?P(b):Xr(b,u,R=>{let D=j0(I,S,R);return R===D&&typeof R=="string"&&(D=j0(I,S,`${s}${R==="default"?"":$e(R)}`,R)),y===!1?D:{[y]:D}})}function r(s){var u;const{sx:p,theme:d={}}=s||{};if(!p)return null;const b=(u=d.unstable_sxConfig)!=null?u:Vc;function k(y){let _=y;if(typeof y=="function")_=y(d);else if(typeof y!="object")return y;if(!_)return null;const S=E6(d.breakpoints),P=Object.keys(S);let I=S;return Object.keys(_).forEach(L=>{const R=GS(_[L],d);if(R!=null)if(typeof R=="object")if(b[L])I=oc(I,t(L,R,d,b));else{const D=Xr({theme:d},R,Z=>({[L]:Z}));HS(D,R)?I[L]=r({sx:R,theme:d}):I=oc(I,D)}else I=oc(I,t(L,R,d,b))}),P6(P,I)}return Array.isArray(p)?p.map(k):k(p)}return r}const ll=I6();ll.filterProps=["sx"];function N6(t,r){const s=this;return s.vars&&typeof s.getColorSchemeSelector=="function"?{[s.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:r}:s.palette.mode===t?r:{}}const QS=["breakpoints","palette","spacing","shape"];function Wc(t={},...r){const{breakpoints:s={},palette:u={},spacing:p,shape:d={}}=t,b=Ke(t,QS),k=S6(s),y=dS(p);let _=Tr({breakpoints:k,direction:"ltr",components:{},palette:Y({mode:"light"},u),spacing:y,shape:Y({},nS,d)},b);return _.applyStyles=N6,_=r.reduce((S,P)=>Tr(S,P),_),_.unstable_sxConfig=Y({},Vc,b==null?void 0:b.unstable_sxConfig),_.unstable_sx=function(P){return ll({sx:P,theme:this})},_}const YS=Object.freeze(Object.defineProperty({__proto__:null,default:Wc,private_createBreakpoints:S6,unstable_applyStyles:N6},Symbol.toStringTag,{value:"Module"}));function KS(t){return Object.keys(t).length===0}function ah(t=null){const r=J.useContext(jc);return!r||KS(r)?t:r}const XS=Wc();function Lf(t=XS){return ah(t)}function qS({styles:t,themeId:r,defaultTheme:s={}}){const u=Lf(s),p=typeof t=="function"?t(r&&u[r]||u):t;return j.jsx(A6,{styles:p})}const ZS=["sx"],JS=t=>{var r,s;const u={systemProps:{},otherProps:{}},p=(r=t==null||(s=t.theme)==null?void 0:s.unstable_sxConfig)!=null?r:Vc;return Object.keys(t).forEach(d=>{p[d]?u.systemProps[d]=t[d]:u.otherProps[d]=t[d]}),u};function Uc(t){const{sx:r}=t,s=Ke(t,ZS),{systemProps:u,otherProps:p}=JS(s);let d;return Array.isArray(r)?d=[u,...r]:typeof r=="function"?d=(...b)=>{const k=r(...b);return bi(k)?Y({},u,k):u}:d=Y({},u,r),Y({},p,{sx:d})}const $S=Object.freeze(Object.defineProperty({__proto__:null,default:ll,extendSxProp:Uc,unstable_createStyleFunctionSx:I6,unstable_defaultSxConfig:Vc},Symbol.toStringTag,{value:"Module"})),Ab=t=>t,e7=()=>{let t=Ab;return{configure(r){t=r},generate(r){return t(r)},reset(){t=Ab}}},t7=e7(),R6=t7;function T6(t){var r,s,u="";if(typeof t=="string"||typeof t=="number")u+=t;else if(typeof t=="object")if(Array.isArray(t)){var p=t.length;for(r=0;rk!=="theme"&&k!=="sx"&&k!=="as"})(ll);return J.forwardRef(function(y,_){const S=Lf(s),P=Uc(y),{className:I,component:L="div"}=P,R=Ke(P,n7);return j.jsx(d,Y({as:L,ref:_,className:et(I,p?p(u):u),theme:r&&S[r]||S},R))})}const o7={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function kt(t,r,s="Mui"){const u=o7[r];return u?`${s}-${u}`:`${R6.generate(t)}-${r}`}function vt(t,r,s="Mui"){const u={};return r.forEach(p=>{u[p]=kt(t,p,s)}),u}var F6={exports:{}},fn={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var sh=Symbol.for("react.element"),lh=Symbol.for("react.portal"),Df=Symbol.for("react.fragment"),Of=Symbol.for("react.strict_mode"),Bf=Symbol.for("react.profiler"),jf=Symbol.for("react.provider"),zf=Symbol.for("react.context"),i7=Symbol.for("react.server_context"),Vf=Symbol.for("react.forward_ref"),Wf=Symbol.for("react.suspense"),Uf=Symbol.for("react.suspense_list"),Hf=Symbol.for("react.memo"),Gf=Symbol.for("react.lazy"),a7=Symbol.for("react.offscreen"),L6;L6=Symbol.for("react.module.reference");function Po(t){if(typeof t=="object"&&t!==null){var r=t.$$typeof;switch(r){case sh:switch(t=t.type,t){case Df:case Bf:case Of:case Wf:case Uf:return t;default:switch(t=t&&t.$$typeof,t){case i7:case zf:case Vf:case Gf:case Hf:case jf:return t;default:return r}}case lh:return r}}}fn.ContextConsumer=zf;fn.ContextProvider=jf;fn.Element=sh;fn.ForwardRef=Vf;fn.Fragment=Df;fn.Lazy=Gf;fn.Memo=Hf;fn.Portal=lh;fn.Profiler=Bf;fn.StrictMode=Of;fn.Suspense=Wf;fn.SuspenseList=Uf;fn.isAsyncMode=function(){return!1};fn.isConcurrentMode=function(){return!1};fn.isContextConsumer=function(t){return Po(t)===zf};fn.isContextProvider=function(t){return Po(t)===jf};fn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===sh};fn.isForwardRef=function(t){return Po(t)===Vf};fn.isFragment=function(t){return Po(t)===Df};fn.isLazy=function(t){return Po(t)===Gf};fn.isMemo=function(t){return Po(t)===Hf};fn.isPortal=function(t){return Po(t)===lh};fn.isProfiler=function(t){return Po(t)===Bf};fn.isStrictMode=function(t){return Po(t)===Of};fn.isSuspense=function(t){return Po(t)===Wf};fn.isSuspenseList=function(t){return Po(t)===Uf};fn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Df||t===Bf||t===Of||t===Wf||t===Uf||t===a7||typeof t=="object"&&t!==null&&(t.$$typeof===Gf||t.$$typeof===Hf||t.$$typeof===jf||t.$$typeof===zf||t.$$typeof===Vf||t.$$typeof===L6||t.getModuleId!==void 0)};fn.typeOf=Po;F6.exports=fn;var Cb=F6.exports;const s7=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function D6(t){const r=`${t}`.match(s7);return r&&r[1]||""}function O6(t,r=""){return t.displayName||t.name||D6(t)||r}function xb(t,r,s){const u=O6(r);return t.displayName||(u!==""?`${s}(${u})`:s)}function l7(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return O6(t,"Component");if(typeof t=="object")switch(t.$$typeof){case Cb.ForwardRef:return xb(t,t.render,"ForwardRef");case Cb.Memo:return xb(t,t.type,"memo");default:return}}}const c7=Object.freeze(Object.defineProperty({__proto__:null,default:l7,getFunctionName:D6},Symbol.toStringTag,{value:"Module"})),u7=["ownerState"],f7=["variants"],d7=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p7(t){return Object.keys(t).length===0}function h7(t){return typeof t=="string"&&t.charCodeAt(0)>96}function A2(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const m7=Wc(),g7=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Lu({defaultTheme:t,theme:r,themeId:s}){return p7(r)?t:r[s]||r}function b7(t){return t?(r,s)=>s[t]:null}function s0(t,r){let{ownerState:s}=r,u=Ke(r,u7);const p=typeof t=="function"?t(Y({ownerState:s},u)):t;if(Array.isArray(p))return p.flatMap(d=>s0(d,Y({ownerState:s},u)));if(p&&typeof p=="object"&&Array.isArray(p.variants)){const{variants:d=[]}=p;let k=Ke(p,f7);return d.forEach(y=>{let _=!0;typeof y.props=="function"?_=y.props(Y({ownerState:s},u,s)):Object.keys(y.props).forEach(S=>{(s==null?void 0:s[S])!==y.props[S]&&u[S]!==y.props[S]&&(_=!1)}),_&&(Array.isArray(k)||(k=[k]),k.push(typeof y.style=="function"?y.style(Y({ownerState:s},u,s)):y.style))}),k}return p}function v7(t={}){const{themeId:r,defaultTheme:s=m7,rootShouldForwardProp:u=A2,slotShouldForwardProp:p=A2}=t,d=b=>ll(Y({},b,{theme:Lu(Y({},b,{defaultTheme:s,themeId:r}))}));return d.__mui_systemSx=!0,(b,k={})=>{C6(b,U=>U.filter(ee=>!(ee!=null&&ee.__mui_systemSx)));const{name:y,slot:_,skipVariantsResolver:S,skipSx:P,overridesResolver:I=b7(g7(_))}=k,L=Ke(k,d7),R=S!==void 0?S:_&&_!=="Root"&&_!=="root"||!1,D=P||!1;let Z,F=A2;_==="Root"||_==="root"?F=u:_?F=p:h7(b)&&(F=void 0);const O=eh(b,Y({shouldForwardProp:F,label:Z},L)),B=U=>typeof U=="function"&&U.__emotion_real!==U||bi(U)?ee=>s0(U,Y({},ee,{theme:Lu({theme:ee.theme,defaultTheme:s,themeId:r})})):U,Q=(U,...ee)=>{let q=B(U);const X=ee?ee.map(B):[];y&&I&&X.push(he=>{const de=Lu(Y({},he,{defaultTheme:s,themeId:r}));if(!de.components||!de.components[y]||!de.components[y].styleOverrides)return null;const Ce=de.components[y].styleOverrides,_e={};return Object.entries(Ce).forEach(([ge,ye])=>{_e[ge]=s0(ye,Y({},he,{theme:de}))}),I(he,_e)}),y&&!R&&X.push(he=>{var de;const Ce=Lu(Y({},he,{defaultTheme:s,themeId:r})),_e=Ce==null||(de=Ce.components)==null||(de=de[y])==null?void 0:de.variants;return s0({variants:_e},Y({},he,{theme:Ce}))}),D||X.push(d);const me=X.length-ee.length;if(Array.isArray(U)&&me>0){const he=new Array(me).fill("");q=[...U,...he],q.raw=[...U.raw,...he]}const le=O(q,...X);return b.muiName&&(le.muiName=b.muiName),le};return O.withConfig&&(Q.withConfig=O.withConfig),Q}}const k7=v7();function Pc(t,r){const s=Y({},r);return Object.keys(t).forEach(u=>{if(u.toString().match(/^(components|slots)$/))s[u]=Y({},t[u],s[u]);else if(u.toString().match(/^(componentsProps|slotProps)$/)){const p=t[u]||{},d=r[u];s[u]={},!d||!Object.keys(d)?s[u]=p:!p||!Object.keys(p)?s[u]=d:(s[u]=Y({},d),Object.keys(p).forEach(b=>{s[u][b]=Pc(p[b],d[b])}))}else s[u]===void 0&&(s[u]=t[u])}),s}function B6(t){const{theme:r,name:s,props:u}=t;return!r||!r.components||!r.components[s]||!r.components[s].defaultProps?u:Pc(r.components[s].defaultProps,u)}function y7({props:t,name:r,defaultTheme:s,themeId:u}){let p=Lf(s);return u&&(p=p[u]||p),B6({theme:p,name:r,props:t})}const xo=typeof window<"u"?J.useLayoutEffect:J.useEffect;function _7(t,r,s,u,p){const[d,b]=J.useState(()=>p&&s?s(t).matches:u?u(t).matches:r);return xo(()=>{let k=!0;if(!s)return;const y=s(t),_=()=>{k&&b(y.matches)};return _(),y.addListener(_),()=>{k=!1,y.removeListener(_)}},[t,s]),d}const j6=J.useSyncExternalStore;function w7(t,r,s,u,p){const d=J.useCallback(()=>r,[r]),b=J.useMemo(()=>{if(p&&s)return()=>s(t).matches;if(u!==null){const{matches:S}=u(t);return()=>S}return d},[d,t,u,p,s]),[k,y]=J.useMemo(()=>{if(s===null)return[d,()=>()=>{}];const S=s(t);return[()=>S.matches,P=>(S.addListener(P),()=>{S.removeListener(P)})]},[d,s,t]);return j6(y,k,b)}function A7(t,r={}){const s=ah(),u=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:p=!1,matchMedia:d=u?window.matchMedia:null,ssrMatchMedia:b=null,noSsr:k=!1}=B6({name:"MuiUseMediaQuery",props:r,theme:s});let y=typeof t=="function"?t(s):t;return y=y.replace(/^@media( ?)/m,""),(j6!==void 0?w7:_7)(y,p,d,b,k)}function ks(t,r=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER){return Math.max(r,Math.min(t,s))}const C7=Object.freeze(Object.defineProperty({__proto__:null,default:ks},Symbol.toStringTag,{value:"Module"}));function Sb(...t){return t.reduce((r,s)=>s==null?r:function(...p){r.apply(this,p),s.apply(this,p)},()=>{})}function ch(t,r=166){let s;function u(...p){const d=()=>{t.apply(this,p)};clearTimeout(s),s=setTimeout(d,r)}return u.clear=()=>{clearTimeout(s)},u}function l0(t,r){var s,u;return J.isValidElement(t)&&r.indexOf((s=t.type.muiName)!=null?s:(u=t.type)==null||(u=u._payload)==null||(u=u.value)==null?void 0:u.muiName)!==-1}function Zn(t){return t&&t.ownerDocument||document}function Pi(t){return Zn(t).defaultView||window}function Fp(t,r){typeof t=="function"?t(r):t&&(t.current=r)}let Eb=0;function x7(t){const[r,s]=J.useState(t),u=t||r;return J.useEffect(()=>{r==null&&(Eb+=1,s(`mui-${Eb}`))},[r]),u}const Pb=D2.useId;function uh(t){if(Pb!==void 0){const r=Pb();return t??r}return x7(t)}function z0({controlled:t,default:r,name:s,state:u="value"}){const{current:p}=J.useRef(t!==void 0),[d,b]=J.useState(r),k=p?t:d,y=J.useCallback(_=>{p||b(_)},[]);return[k,y]}function yo(t){const r=J.useRef(t);return xo(()=>{r.current=t}),J.useRef((...s)=>(0,r.current)(...s)).current}function Wn(...t){return J.useMemo(()=>t.every(r=>r==null)?null:r=>{t.forEach(s=>{Fp(s,r)})},t)}const Mb={};function S7(t,r){const s=J.useRef(Mb);return s.current===Mb&&(s.current=t(r)),s}const E7=[];function P7(t){J.useEffect(t,E7)}class Qf{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Qf}start(r,s){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,s()},r)}}function fh(){const t=S7(Qf.create).current;return P7(t.disposeEffect),t}let Yf=!0,Lp=!1;const M7=new Qf,I7={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function N7(t){const{type:r,tagName:s}=t;return!!(s==="INPUT"&&I7[r]&&!t.readOnly||s==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function R7(t){t.metaKey||t.altKey||t.ctrlKey||(Yf=!0)}function C2(){Yf=!1}function T7(){this.visibilityState==="hidden"&&Lp&&(Yf=!0)}function F7(t){t.addEventListener("keydown",R7,!0),t.addEventListener("mousedown",C2,!0),t.addEventListener("pointerdown",C2,!0),t.addEventListener("touchstart",C2,!0),t.addEventListener("visibilitychange",T7,!0)}function L7(t){const{target:r}=t;try{return r.matches(":focus-visible")}catch{}return Yf||N7(r)}function z6(){const t=J.useCallback(p=>{p!=null&&F7(p.ownerDocument)},[]),r=J.useRef(!1);function s(){return r.current?(Lp=!0,M7.start(100,()=>{Lp=!1}),r.current=!1,!0):!1}function u(p){return L7(p)?(r.current=!0,!0):!1}return{isFocusVisibleRef:r,onFocus:u,onBlur:s,ref:t}}function V6(t){const r=t.documentElement.clientWidth;return Math.abs(window.innerWidth-r)}const D7={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},O7=D7;function wt(t,r,s=void 0){const u={};return Object.keys(t).forEach(p=>{u[p]=t[p].reduce((d,b)=>{if(b){const k=r(b);k!==""&&d.push(k),s&&s[b]&&d.push(s[b])}return d},[]).join(" ")}),u}function oi(t){return typeof t=="string"}function W6(t,r,s){return t===void 0||oi(t)?r:Y({},r,{ownerState:Y({},r.ownerState,s)})}function Na(t,r=[]){if(t===void 0)return{};const s={};return Object.keys(t).filter(u=>u.match(/^on[A-Z]/)&&typeof t[u]=="function"&&!r.includes(u)).forEach(u=>{s[u]=t[u]}),s}function Ib(t){if(t===void 0)return{};const r={};return Object.keys(t).filter(s=>!(s.match(/^on[A-Z]/)&&typeof t[s]=="function")).forEach(s=>{r[s]=t[s]}),r}function U6(t){const{getSlotProps:r,additionalProps:s,externalSlotProps:u,externalForwardedProps:p,className:d}=t;if(!r){const L=et(s==null?void 0:s.className,d,p==null?void 0:p.className,u==null?void 0:u.className),R=Y({},s==null?void 0:s.style,p==null?void 0:p.style,u==null?void 0:u.style),D=Y({},s,p,u);return L.length>0&&(D.className=L),Object.keys(R).length>0&&(D.style=R),{props:D,internalRef:void 0}}const b=Na(Y({},p,u)),k=Ib(u),y=Ib(p),_=r(b),S=et(_==null?void 0:_.className,s==null?void 0:s.className,d,p==null?void 0:p.className,u==null?void 0:u.className),P=Y({},_==null?void 0:_.style,s==null?void 0:s.style,p==null?void 0:p.style,u==null?void 0:u.style),I=Y({},_,s,y,k);return S.length>0&&(I.className=S),Object.keys(P).length>0&&(I.style=P),{props:I,internalRef:_.ref}}function H6(t,r,s){return typeof t=="function"?t(r,s):t}const B7=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Nr(t){var r;const{elementType:s,externalSlotProps:u,ownerState:p,skipResolvingSlotProps:d=!1}=t,b=Ke(t,B7),k=d?{}:H6(u,p),{props:y,internalRef:_}=U6(Y({},b,{externalSlotProps:k})),S=Wn(_,k==null?void 0:k.ref,(r=t.additionalProps)==null?void 0:r.ref);return W6(s,Y({},y,{ref:S}),p)}const j7=J.createContext(null),G6=j7;function Q6(){return J.useContext(G6)}const z7=typeof Symbol=="function"&&Symbol.for,V7=z7?Symbol.for("mui.nested"):"__THEME_NESTED__";function W7(t,r){return typeof r=="function"?r(t):Y({},t,r)}function U7(t){const{children:r,theme:s}=t,u=Q6(),p=J.useMemo(()=>{const d=u===null?s:W7(u,s);return d!=null&&(d[V7]=u!==null),d},[s,u]);return j.jsx(G6.Provider,{value:p,children:r})}const H7=["value"],Y6=J.createContext();function G7(t){let{value:r}=t,s=Ke(t,H7);return j.jsx(Y6.Provider,Y({value:r??!0},s))}const dh=()=>{const t=J.useContext(Y6);return t??!1},K6=J.createContext(void 0);function Q7({value:t,children:r}){return j.jsx(K6.Provider,{value:t,children:r})}function Y7(t){const{theme:r,name:s,props:u}=t;if(!r||!r.components||!r.components[s])return u;const p=r.components[s];return p.defaultProps?Pc(p.defaultProps,u):!p.styleOverrides&&!p.variants?Pc(p,u):u}function K7({props:t,name:r}){const s=J.useContext(K6);return Y7({props:t,name:r,theme:{components:s}})}const Nb={};function Rb(t,r,s,u=!1){return J.useMemo(()=>{const p=t&&r[t]||r;if(typeof s=="function"){const d=s(p),b=t?Y({},r,{[t]:d}):d;return u?()=>b:b}return t?Y({},r,{[t]:s}):Y({},r,s)},[t,r,s,u])}function X7(t){const{children:r,theme:s,themeId:u}=t,p=ah(Nb),d=Q6()||Nb,b=Rb(u,p,s),k=Rb(u,d,s,!0),y=b.direction==="rtl";return j.jsx(U7,{theme:k,children:j.jsx(jc.Provider,{value:b,children:j.jsx(G7,{value:y,children:j.jsx(Q7,{value:b==null?void 0:b.components,children:r})})})})}const q7=["component","direction","spacing","divider","children","className","useFlexGap"],Z7=Wc(),J7=k7("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,r)=>r.root});function $7(t){return y7({props:t,name:"MuiStack",defaultTheme:Z7})}function eE(t,r){const s=J.Children.toArray(t).filter(Boolean);return s.reduce((u,p,d)=>(u.push(p),d({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],nE=({ownerState:t,theme:r})=>{let s=Y({display:"flex",flexDirection:"column"},Xr({theme:r},Ia({values:t.direction,breakpoints:r.breakpoints.values}),u=>({flexDirection:u})));if(t.spacing){const u=oh(r),p=Object.keys(r.breakpoints.values).reduce((y,_)=>((typeof t.spacing=="object"&&t.spacing[_]!=null||typeof t.direction=="object"&&t.direction[_]!=null)&&(y[_]=!0),y),{}),d=Ia({values:t.direction,base:p}),b=Ia({values:t.spacing,base:p});typeof d=="object"&&Object.keys(d).forEach((y,_,S)=>{if(!d[y]){const I=_>0?d[S[_-1]]:"column";d[y]=I}}),s=Tr(s,Xr({theme:r},b,(y,_)=>t.useFlexGap?{gap:za(u,y)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${tE(_?d[_]:t.direction)}`]:za(u,y)}}))}return s=rS(r.breakpoints,s),s};function rE(t={}){const{createStyledComponent:r=J7,useThemeProps:s=$7,componentName:u="MuiStack"}=t,p=()=>wt({root:["root"]},y=>kt(u,y),{}),d=r(nE);return J.forwardRef(function(y,_){const S=s(y),P=Uc(S),{component:I="div",direction:L="column",spacing:R=0,divider:D,children:Z,className:F,useFlexGap:O=!1}=P,B=Ke(P,q7),Q={direction:L,spacing:R,useFlexGap:O},U=p();return j.jsx(d,Y({as:I,ownerState:Q,ref:_,className:et(U.root,F)},B,{children:D?eE(Z,D):Z}))})}function oE(t,r){return Y({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},r)}var Yn={},X6={exports:{}};(function(t){function r(s){return s&&s.__esModule?s:{default:s}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(X6);var q6=X6.exports;const iE=aa(H5),aE=aa(C7);var Z6=q6;Object.defineProperty(Yn,"__esModule",{value:!0});var Mn=Yn.alpha=ty;Yn.blend=vE;Yn.colorChannel=void 0;var Mc=Yn.darken=hh;Yn.decomposeColor=So;var sE=Yn.emphasize=ny,lE=Yn.getContrastRatio=pE;Yn.getLuminance=V0;Yn.hexToRgb=J6;Yn.hslToRgb=ey;var Ic=Yn.lighten=mh;Yn.private_safeAlpha=hE;Yn.private_safeColorChannel=void 0;Yn.private_safeDarken=mE;Yn.private_safeEmphasize=bE;Yn.private_safeLighten=gE;Yn.recomposeColor=cl;Yn.rgbToHex=dE;var Tb=Z6(iE),cE=Z6(aE);function ph(t,r=0,s=1){return(0,cE.default)(t,r,s)}function J6(t){t=t.slice(1);const r=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let s=t.match(r);return s&&s[0].length===1&&(s=s.map(u=>u+u)),s?`rgb${s.length===4?"a":""}(${s.map((u,p)=>p<3?parseInt(u,16):Math.round(parseInt(u,16)/255*1e3)/1e3).join(", ")})`:""}function uE(t){const r=t.toString(16);return r.length===1?`0${r}`:r}function So(t){if(t.type)return t;if(t.charAt(0)==="#")return So(J6(t));const r=t.indexOf("("),s=t.substring(0,r);if(["rgb","rgba","hsl","hsla","color"].indexOf(s)===-1)throw new Error((0,Tb.default)(9,t));let u=t.substring(r+1,t.length-1),p;if(s==="color"){if(u=u.split(" "),p=u.shift(),u.length===4&&u[3].charAt(0)==="/"&&(u[3]=u[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(p)===-1)throw new Error((0,Tb.default)(10,p))}else u=u.split(",");return u=u.map(d=>parseFloat(d)),{type:s,values:u,colorSpace:p}}const $6=t=>{const r=So(t);return r.values.slice(0,3).map((s,u)=>r.type.indexOf("hsl")!==-1&&u!==0?`${s}%`:s).join(" ")};Yn.colorChannel=$6;const fE=(t,r)=>{try{return $6(t)}catch{return t}};Yn.private_safeColorChannel=fE;function cl(t){const{type:r,colorSpace:s}=t;let{values:u}=t;return r.indexOf("rgb")!==-1?u=u.map((p,d)=>d<3?parseInt(p,10):p):r.indexOf("hsl")!==-1&&(u[1]=`${u[1]}%`,u[2]=`${u[2]}%`),r.indexOf("color")!==-1?u=`${s} ${u.join(" ")}`:u=`${u.join(", ")}`,`${r}(${u})`}function dE(t){if(t.indexOf("#")===0)return t;const{values:r}=So(t);return`#${r.map((s,u)=>uE(u===3?Math.round(255*s):s)).join("")}`}function ey(t){t=So(t);const{values:r}=t,s=r[0],u=r[1]/100,p=r[2]/100,d=u*Math.min(p,1-p),b=(_,S=(_+s/30)%12)=>p-d*Math.max(Math.min(S-3,9-S,1),-1);let k="rgb";const y=[Math.round(b(0)*255),Math.round(b(8)*255),Math.round(b(4)*255)];return t.type==="hsla"&&(k+="a",y.push(r[3])),cl({type:k,values:y})}function V0(t){t=So(t);let r=t.type==="hsl"||t.type==="hsla"?So(ey(t)).values:t.values;return r=r.map(s=>(t.type!=="color"&&(s/=255),s<=.03928?s/12.92:((s+.055)/1.055)**2.4)),Number((.2126*r[0]+.7152*r[1]+.0722*r[2]).toFixed(3))}function pE(t,r){const s=V0(t),u=V0(r);return(Math.max(s,u)+.05)/(Math.min(s,u)+.05)}function ty(t,r){return t=So(t),r=ph(r),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${r}`:t.values[3]=r,cl(t)}function hE(t,r,s){try{return ty(t,r)}catch{return t}}function hh(t,r){if(t=So(t),r=ph(r),t.type.indexOf("hsl")!==-1)t.values[2]*=1-r;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let s=0;s<3;s+=1)t.values[s]*=1-r;return cl(t)}function mE(t,r,s){try{return hh(t,r)}catch{return t}}function mh(t,r){if(t=So(t),r=ph(r),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*r;else if(t.type.indexOf("rgb")!==-1)for(let s=0;s<3;s+=1)t.values[s]+=(255-t.values[s])*r;else if(t.type.indexOf("color")!==-1)for(let s=0;s<3;s+=1)t.values[s]+=(1-t.values[s])*r;return cl(t)}function gE(t,r,s){try{return mh(t,r)}catch{return t}}function ny(t,r=.15){return V0(t)>.5?hh(t,r):mh(t,r)}function bE(t,r,s){try{return ny(t,r)}catch{return t}}function vE(t,r,s,u=1){const p=(y,_)=>Math.round((y**(1/u)*(1-s)+_**(1/u)*s)**u),d=So(t),b=So(r),k=[p(d.values[0],b.values[0]),p(d.values[1],b.values[1]),p(d.values[2],b.values[2])];return cl({type:"rgb",values:k})}const kE=["mode","contrastThreshold","tonalOffset"],Fb={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Cc.white,default:Cc.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},x2={text:{primary:Cc.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Cc.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Lb(t,r,s,u){const p=u.light||u,d=u.dark||u*1.5;t[r]||(t.hasOwnProperty(s)?t[r]=t[s]:r==="light"?t.light=Ic(t.main,p):r==="dark"&&(t.dark=Mc(t.main,d)))}function yE(t="light"){return t==="dark"?{main:hs[200],light:hs[50],dark:hs[400]}:{main:hs[700],light:hs[400],dark:hs[800]}}function _E(t="light"){return t==="dark"?{main:ps[200],light:ps[50],dark:ps[400]}:{main:ps[500],light:ps[300],dark:ps[700]}}function wE(t="light"){return t==="dark"?{main:ds[500],light:ds[300],dark:ds[700]}:{main:ds[700],light:ds[400],dark:ds[800]}}function AE(t="light"){return t==="dark"?{main:ms[400],light:ms[300],dark:ms[700]}:{main:ms[700],light:ms[500],dark:ms[900]}}function CE(t="light"){return t==="dark"?{main:gs[400],light:gs[300],dark:gs[700]}:{main:gs[800],light:gs[500],dark:gs[900]}}function xE(t="light"){return t==="dark"?{main:Ll[400],light:Ll[300],dark:Ll[700]}:{main:"#ed6c02",light:Ll[500],dark:Ll[900]}}function SE(t){const{mode:r="light",contrastThreshold:s=3,tonalOffset:u=.2}=t,p=Ke(t,kE),d=t.primary||yE(r),b=t.secondary||_E(r),k=t.error||wE(r),y=t.info||AE(r),_=t.success||CE(r),S=t.warning||xE(r);function P(D){return lE(D,x2.text.primary)>=s?x2.text.primary:Fb.text.primary}const I=({color:D,name:Z,mainShade:F=500,lightShade:O=300,darkShade:B=700})=>{if(D=Y({},D),!D.main&&D[F]&&(D.main=D[F]),!D.hasOwnProperty("main"))throw new Error(ja(11,Z?` (${Z})`:"",F));if(typeof D.main!="string")throw new Error(ja(12,Z?` (${Z})`:"",JSON.stringify(D.main)));return Lb(D,"light",O,u),Lb(D,"dark",B,u),D.contrastText||(D.contrastText=P(D.main)),D},L={dark:x2,light:Fb};return Tr(Y({common:Y({},Cc),mode:r,primary:I({color:d,name:"primary"}),secondary:I({color:b,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:I({color:k,name:"error"}),warning:I({color:S,name:"warning"}),info:I({color:y,name:"info"}),success:I({color:_,name:"success"}),grey:U5,contrastThreshold:s,getContrastText:P,augmentColor:I,tonalOffset:u},L[r]),p)}const EE=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function PE(t){return Math.round(t*1e5)/1e5}const Db={textTransform:"uppercase"},Ob='"Roboto", "Helvetica", "Arial", sans-serif';function ME(t,r){const s=typeof r=="function"?r(t):r,{fontFamily:u=Ob,fontSize:p=14,fontWeightLight:d=300,fontWeightRegular:b=400,fontWeightMedium:k=500,fontWeightBold:y=700,htmlFontSize:_=16,allVariants:S,pxToRem:P}=s,I=Ke(s,EE),L=p/14,R=P||(F=>`${F/_*L}rem`),D=(F,O,B,Q,U)=>Y({fontFamily:u,fontWeight:F,fontSize:R(O),lineHeight:B},u===Ob?{letterSpacing:`${PE(Q/O)}em`}:{},U,S),Z={h1:D(d,96,1.167,-1.5),h2:D(d,60,1.2,-.5),h3:D(b,48,1.167,0),h4:D(b,34,1.235,.25),h5:D(b,24,1.334,0),h6:D(k,20,1.6,.15),subtitle1:D(b,16,1.75,.15),subtitle2:D(k,14,1.57,.1),body1:D(b,16,1.5,.15),body2:D(b,14,1.43,.15),button:D(k,14,1.75,.4,Db),caption:D(b,12,1.66,.4),overline:D(b,12,2.66,1,Db),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Tr(Y({htmlFontSize:_,pxToRem:R,fontFamily:u,fontSize:p,fontWeightLight:d,fontWeightRegular:b,fontWeightMedium:k,fontWeightBold:y},Z),I,{clone:!1})}const IE=.2,NE=.14,RE=.12;function Sn(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${IE})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${NE})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${RE})`].join(",")}const TE=["none",Sn(0,2,1,-1,0,1,1,0,0,1,3,0),Sn(0,3,1,-2,0,2,2,0,0,1,5,0),Sn(0,3,3,-2,0,3,4,0,0,1,8,0),Sn(0,2,4,-1,0,4,5,0,0,1,10,0),Sn(0,3,5,-1,0,5,8,0,0,1,14,0),Sn(0,3,5,-1,0,6,10,0,0,1,18,0),Sn(0,4,5,-2,0,7,10,1,0,2,16,1),Sn(0,5,5,-3,0,8,10,1,0,3,14,2),Sn(0,5,6,-3,0,9,12,1,0,3,16,2),Sn(0,6,6,-3,0,10,14,1,0,4,18,3),Sn(0,6,7,-4,0,11,15,1,0,4,20,3),Sn(0,7,8,-4,0,12,17,2,0,5,22,4),Sn(0,7,8,-4,0,13,19,2,0,5,24,4),Sn(0,7,9,-4,0,14,21,2,0,5,26,4),Sn(0,8,9,-5,0,15,22,2,0,6,28,5),Sn(0,8,10,-5,0,16,24,2,0,6,30,5),Sn(0,8,11,-5,0,17,26,2,0,6,32,5),Sn(0,9,11,-5,0,18,28,2,0,7,34,6),Sn(0,9,12,-6,0,19,29,2,0,7,36,6),Sn(0,10,13,-6,0,20,31,3,0,8,38,7),Sn(0,10,13,-6,0,21,33,3,0,8,40,7),Sn(0,10,14,-6,0,22,35,3,0,8,42,7),Sn(0,11,14,-7,0,23,36,3,0,9,44,8),Sn(0,11,15,-7,0,24,38,3,0,9,46,8)],FE=["duration","easing","delay"],LE={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},DE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Bb(t){return`${Math.round(t)}ms`}function OE(t){if(!t)return 0;const r=t/36;return Math.round((4+15*r**.25+r/5)*10)}function BE(t){const r=Y({},LE,t.easing),s=Y({},DE,t.duration);return Y({getAutoHeightDuration:OE,create:(p=["all"],d={})=>{const{duration:b=s.standard,easing:k=r.easeInOut,delay:y=0}=d;return Ke(d,FE),(Array.isArray(p)?p:[p]).map(_=>`${_} ${typeof b=="string"?b:Bb(b)} ${k} ${typeof y=="string"?y:Bb(y)}`).join(",")}},t,{easing:r,duration:s})}const jE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},zE=jE,VE=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Kf(t={},...r){const{mixins:s={},palette:u={},transitions:p={},typography:d={}}=t,b=Ke(t,VE);if(t.vars)throw new Error(ja(18));const k=SE(u),y=Wc(t);let _=Tr(y,{mixins:oE(y.breakpoints,s),palette:k,shadows:TE.slice(),typography:ME(k,d),transitions:BE(p),zIndex:Y({},zE)});return _=Tr(_,b),_=r.reduce((S,P)=>Tr(S,P),_),_.unstable_sxConfig=Y({},Vc,b==null?void 0:b.unstable_sxConfig),_.unstable_sx=function(P){return ll({sx:P,theme:this})},_}const WE=Kf(),gh=WE;function Ga(){const t=Lf(gh);return t[Js]||t}var Hc={},S2={exports:{}},jb;function UE(){return jb||(jb=1,function(t){function r(s,u){if(s==null)return{};var p={};for(var d in s)if({}.hasOwnProperty.call(s,d)){if(u.includes(d))continue;p[d]=s[d]}return p}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(S2)),S2.exports}const HE=aa(Zx),GE=aa(Jx),QE=aa(iS),YE=aa(c7),KE=aa(YS),XE=aa($S);var ul=q6;Object.defineProperty(Hc,"__esModule",{value:!0});var qE=Hc.default=c9;Hc.shouldForwardProp=c0;Hc.systemDefaultTheme=void 0;var ho=ul(_6()),Dp=ul(UE()),zb=r9(HE),ZE=GE;ul(QE);ul(YE);var JE=ul(KE),$E=ul(XE);const e9=["ownerState"],t9=["variants"],n9=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function ry(t){if(typeof WeakMap!="function")return null;var r=new WeakMap,s=new WeakMap;return(ry=function(u){return u?s:r})(t)}function r9(t,r){if(!r&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var s=ry(r);if(s&&s.has(t))return s.get(t);var u={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in t)if(d!=="default"&&Object.prototype.hasOwnProperty.call(t,d)){var b=p?Object.getOwnPropertyDescriptor(t,d):null;b&&(b.get||b.set)?Object.defineProperty(u,d,b):u[d]=t[d]}return u.default=t,s&&s.set(t,u),u}function o9(t){return Object.keys(t).length===0}function i9(t){return typeof t=="string"&&t.charCodeAt(0)>96}function c0(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const a9=Hc.systemDefaultTheme=(0,JE.default)(),s9=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Du({defaultTheme:t,theme:r,themeId:s}){return o9(r)?t:r[s]||r}function l9(t){return t?(r,s)=>s[t]:null}function u0(t,r){let{ownerState:s}=r,u=(0,Dp.default)(r,e9);const p=typeof t=="function"?t((0,ho.default)({ownerState:s},u)):t;if(Array.isArray(p))return p.flatMap(d=>u0(d,(0,ho.default)({ownerState:s},u)));if(p&&typeof p=="object"&&Array.isArray(p.variants)){const{variants:d=[]}=p;let k=(0,Dp.default)(p,t9);return d.forEach(y=>{let _=!0;typeof y.props=="function"?_=y.props((0,ho.default)({ownerState:s},u,s)):Object.keys(y.props).forEach(S=>{(s==null?void 0:s[S])!==y.props[S]&&u[S]!==y.props[S]&&(_=!1)}),_&&(Array.isArray(k)||(k=[k]),k.push(typeof y.style=="function"?y.style((0,ho.default)({ownerState:s},u,s)):y.style))}),k}return p}function c9(t={}){const{themeId:r,defaultTheme:s=a9,rootShouldForwardProp:u=c0,slotShouldForwardProp:p=c0}=t,d=b=>(0,$E.default)((0,ho.default)({},b,{theme:Du((0,ho.default)({},b,{defaultTheme:s,themeId:r}))}));return d.__mui_systemSx=!0,(b,k={})=>{(0,zb.internal_processStyles)(b,U=>U.filter(ee=>!(ee!=null&&ee.__mui_systemSx)));const{name:y,slot:_,skipVariantsResolver:S,skipSx:P,overridesResolver:I=l9(s9(_))}=k,L=(0,Dp.default)(k,n9),R=S!==void 0?S:_&&_!=="Root"&&_!=="root"||!1,D=P||!1;let Z,F=c0;_==="Root"||_==="root"?F=u:_?F=p:i9(b)&&(F=void 0);const O=(0,zb.default)(b,(0,ho.default)({shouldForwardProp:F,label:Z},L)),B=U=>typeof U=="function"&&U.__emotion_real!==U||(0,ZE.isPlainObject)(U)?ee=>u0(U,(0,ho.default)({},ee,{theme:Du({theme:ee.theme,defaultTheme:s,themeId:r})})):U,Q=(U,...ee)=>{let q=B(U);const X=ee?ee.map(B):[];y&&I&&X.push(he=>{const de=Du((0,ho.default)({},he,{defaultTheme:s,themeId:r}));if(!de.components||!de.components[y]||!de.components[y].styleOverrides)return null;const Ce=de.components[y].styleOverrides,_e={};return Object.entries(Ce).forEach(([ge,ye])=>{_e[ge]=u0(ye,(0,ho.default)({},he,{theme:de}))}),I(he,_e)}),y&&!R&&X.push(he=>{var de;const Ce=Du((0,ho.default)({},he,{defaultTheme:s,themeId:r})),_e=Ce==null||(de=Ce.components)==null||(de=de[y])==null?void 0:de.variants;return u0({variants:_e},(0,ho.default)({},he,{theme:Ce}))}),D||X.push(d);const me=X.length-ee.length;if(Array.isArray(U)&&me>0){const he=new Array(me).fill("");q=[...U,...he],q.raw=[...U.raw,...he]}const le=O(q,...X);return b.muiName&&(le.muiName=b.muiName),le};return O.withConfig&&(Q.withConfig=O.withConfig),Q}}function Xf(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const br=t=>Xf(t)&&t!=="classes",We=qE({themeId:Js,defaultTheme:gh,rootShouldForwardProp:br}),u9=["theme"];function f9(t){let{theme:r}=t,s=Ke(t,u9);const u=r[Js];return j.jsx(X7,Y({},s,{themeId:u?Js:void 0,theme:u||r}))}const Vb=t=>{let r;return t<1?r=5.11916*t**2:r=4.5*Math.log(t+1)+2,(r/100).toFixed(2)};function At(t){return K7(t)}function d9(t){return kt("MuiSvgIcon",t)}vt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const p9=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],h9=t=>{const{color:r,fontSize:s,classes:u}=t,p={root:["root",r!=="inherit"&&`color${$e(r)}`,`fontSize${$e(s)}`]};return wt(p,d9,u)},m9=We("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.color!=="inherit"&&r[`color${$e(s.color)}`],r[`fontSize${$e(s.fontSize)}`]]}})(({theme:t,ownerState:r})=>{var s,u,p,d,b,k,y,_,S,P,I,L,R;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:r.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(s=t.transitions)==null||(u=s.create)==null?void 0:u.call(s,"fill",{duration:(p=t.transitions)==null||(p=p.duration)==null?void 0:p.shorter}),fontSize:{inherit:"inherit",small:((d=t.typography)==null||(b=d.pxToRem)==null?void 0:b.call(d,20))||"1.25rem",medium:((k=t.typography)==null||(y=k.pxToRem)==null?void 0:y.call(k,24))||"1.5rem",large:((_=t.typography)==null||(S=_.pxToRem)==null?void 0:S.call(_,35))||"2.1875rem"}[r.fontSize],color:(P=(I=(t.vars||t).palette)==null||(I=I[r.color])==null?void 0:I.main)!=null?P:{action:(L=(t.vars||t).palette)==null||(L=L.action)==null?void 0:L.active,disabled:(R=(t.vars||t).palette)==null||(R=R.action)==null?void 0:R.disabled,inherit:void 0}[r.color]}}),Op=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiSvgIcon"}),{children:p,className:d,color:b="inherit",component:k="svg",fontSize:y="medium",htmlColor:_,inheritViewBox:S=!1,titleAccess:P,viewBox:I="0 0 24 24"}=u,L=Ke(u,p9),R=J.isValidElement(p)&&p.type==="svg",D=Y({},u,{color:b,component:k,fontSize:y,instanceFontSize:r.fontSize,inheritViewBox:S,viewBox:I,hasSvgAsChild:R}),Z={};S||(Z.viewBox=I);const F=h9(D);return j.jsxs(m9,Y({as:k,className:et(F.root,d),focusable:"false",color:_,"aria-hidden":P?void 0:!0,role:P?"img":void 0,ref:s},Z,L,R&&p.props,{ownerState:D,children:[R?p.props.children:p,P?j.jsx("title",{children:P}):null]}))});Op.muiName="SvgIcon";function or(t,r){function s(u,p){return j.jsx(Op,Y({"data-testid":`${r}Icon`,ref:p},u,{children:t}))}return s.muiName=Op.muiName,J.memo(J.forwardRef(s))}function Bp(t,r){return Bp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,u){return s.__proto__=u,s},Bp(t,r)}function oy(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,Bp(t,r)}const Wb={disabled:!1},W0=Oo.createContext(null);var g9=function(r){return r.scrollTop},Yl="unmounted",wa="exited",Aa="entering",ys="entered",jp="exiting",Ii=function(t){oy(r,t);function r(u,p){var d;d=t.call(this,u,p)||this;var b=p,k=b&&!b.isMounting?u.enter:u.appear,y;return d.appearStatus=null,u.in?k?(y=wa,d.appearStatus=Aa):y=ys:u.unmountOnExit||u.mountOnEnter?y=Yl:y=wa,d.state={status:y},d.nextCallback=null,d}r.getDerivedStateFromProps=function(p,d){var b=p.in;return b&&d.status===Yl?{status:wa}:null};var s=r.prototype;return s.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},s.componentDidUpdate=function(p){var d=null;if(p!==this.props){var b=this.state.status;this.props.in?b!==Aa&&b!==ys&&(d=Aa):(b===Aa||b===ys)&&(d=jp)}this.updateStatus(!1,d)},s.componentWillUnmount=function(){this.cancelNextCallback()},s.getTimeouts=function(){var p=this.props.timeout,d,b,k;return d=b=k=p,p!=null&&typeof p!="number"&&(d=p.exit,b=p.enter,k=p.appear!==void 0?p.appear:b),{exit:d,enter:b,appear:k}},s.updateStatus=function(p,d){if(p===void 0&&(p=!1),d!==null)if(this.cancelNextCallback(),d===Aa){if(this.props.unmountOnExit||this.props.mountOnEnter){var b=this.props.nodeRef?this.props.nodeRef.current:Tu.findDOMNode(this);b&&g9(b)}this.performEnter(p)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wa&&this.setState({status:Yl})},s.performEnter=function(p){var d=this,b=this.props.enter,k=this.context?this.context.isMounting:p,y=this.props.nodeRef?[k]:[Tu.findDOMNode(this),k],_=y[0],S=y[1],P=this.getTimeouts(),I=k?P.appear:P.enter;if(!p&&!b||Wb.disabled){this.safeSetState({status:ys},function(){d.props.onEntered(_)});return}this.props.onEnter(_,S),this.safeSetState({status:Aa},function(){d.props.onEntering(_,S),d.onTransitionEnd(I,function(){d.safeSetState({status:ys},function(){d.props.onEntered(_,S)})})})},s.performExit=function(){var p=this,d=this.props.exit,b=this.getTimeouts(),k=this.props.nodeRef?void 0:Tu.findDOMNode(this);if(!d||Wb.disabled){this.safeSetState({status:wa},function(){p.props.onExited(k)});return}this.props.onExit(k),this.safeSetState({status:jp},function(){p.props.onExiting(k),p.onTransitionEnd(b.exit,function(){p.safeSetState({status:wa},function(){p.props.onExited(k)})})})},s.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},s.safeSetState=function(p,d){d=this.setNextCallback(d),this.setState(p,d)},s.setNextCallback=function(p){var d=this,b=!0;return this.nextCallback=function(k){b&&(b=!1,d.nextCallback=null,p(k))},this.nextCallback.cancel=function(){b=!1},this.nextCallback},s.onTransitionEnd=function(p,d){this.setNextCallback(d);var b=this.props.nodeRef?this.props.nodeRef.current:Tu.findDOMNode(this),k=p==null&&!this.props.addEndListener;if(!b||k){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var y=this.props.nodeRef?[this.nextCallback]:[b,this.nextCallback],_=y[0],S=y[1];this.props.addEndListener(_,S)}p!=null&&setTimeout(this.nextCallback,p)},s.render=function(){var p=this.state.status;if(p===Yl)return null;var d=this.props,b=d.children;d.in,d.mountOnEnter,d.unmountOnExit,d.appear,d.enter,d.exit,d.timeout,d.addEndListener,d.onEnter,d.onEntering,d.onEntered,d.onExit,d.onExiting,d.onExited,d.nodeRef;var k=Ke(d,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Oo.createElement(W0.Provider,{value:null},typeof b=="function"?b(p,k):Oo.cloneElement(Oo.Children.only(b),k))},r}(Oo.Component);Ii.contextType=W0;Ii.propTypes={};function bs(){}Ii.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:bs,onEntering:bs,onEntered:bs,onExit:bs,onExiting:bs,onExited:bs};Ii.UNMOUNTED=Yl;Ii.EXITED=wa;Ii.ENTERING=Aa;Ii.ENTERED=ys;Ii.EXITING=jp;const bh=Ii;function b9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vh(t,r){var s=function(d){return r&&J.isValidElement(d)?r(d):d},u=Object.create(null);return t&&J.Children.map(t,function(p){return p}).forEach(function(p){u[p.key]=s(p)}),u}function v9(t,r){t=t||{},r=r||{};function s(S){return S in r?r[S]:t[S]}var u=Object.create(null),p=[];for(var d in t)d in r?p.length&&(u[d]=p,p=[]):p.push(d);var b,k={};for(var y in r){if(u[y])for(b=0;bt.scrollTop;function el(t,r){var s,u;const{timeout:p,easing:d,style:b={}}=t;return{duration:(s=b.transitionDuration)!=null?s:typeof p=="number"?p:p[r.mode]||0,easing:(u=b.transitionTimingFunction)!=null?u:typeof d=="object"?d[r.mode]:d,delay:b.transitionDelay}}function C9(t){return kt("MuiPaper",t)}vt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const x9=["className","component","elevation","square","variant"],S9=t=>{const{square:r,elevation:s,variant:u,classes:p}=t,d={root:["root",u,!r&&"rounded",u==="elevation"&&`elevation${s}`]};return wt(d,C9,p)},E9=We("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[s.variant],!s.square&&r.rounded,s.variant==="elevation"&&r[`elevation${s.elevation}`]]}})(({theme:t,ownerState:r})=>{var s;return Y({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!r.square&&{borderRadius:t.shape.borderRadius},r.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},r.variant==="elevation"&&Y({boxShadow:(t.vars||t).shadows[r.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Mn("#fff",Vb(r.elevation))}, ${Mn("#fff",Vb(r.elevation))})`},t.vars&&{backgroundImage:(s=t.vars.overlays)==null?void 0:s[r.elevation]}))}),P9=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiPaper"}),{className:p,component:d="div",elevation:b=1,square:k=!1,variant:y="elevation"}=u,_=Ke(u,x9),S=Y({},u,{component:d,elevation:b,square:k,variant:y}),P=S9(S);return j.jsx(E9,Y({as:d,ownerState:S,className:et(P.root,p),ref:s},_))}),ua=P9,M9=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],I9=["component","slots","slotProps"],N9=["component"];function Ub(t,r){const{className:s,elementType:u,ownerState:p,externalForwardedProps:d,getSlotOwnerState:b,internalForwardedProps:k}=r,y=Ke(r,M9),{component:_,slots:S={[t]:void 0},slotProps:P={[t]:void 0}}=d,I=Ke(d,I9),L=S[t]||u,R=H6(P[t],p),D=U6(Y({className:s},y,{externalForwardedProps:t==="root"?I:void 0,externalSlotProps:R})),{props:{component:Z},internalRef:F}=D,O=Ke(D.props,N9),B=Wn(F,R==null?void 0:R.ref,r.ref),Q=b?b(O):{},U=Y({},p,Q),ee=t==="root"?Z||_:Z,q=W6(L,Y({},t==="root"&&!_&&!S[t]&&k,t!=="root"&&!S[t]&&k,O,ee&&{as:ee},{ref:B}),U);return Object.keys(Q).forEach(X=>{delete q[X]}),[L,q]}function R9(t){const{className:r,classes:s,pulsate:u=!1,rippleX:p,rippleY:d,rippleSize:b,in:k,onExited:y,timeout:_}=t,[S,P]=J.useState(!1),I=et(r,s.ripple,s.rippleVisible,u&&s.ripplePulsate),L={width:b,height:b,top:-(b/2)+d,left:-(b/2)+p},R=et(s.child,S&&s.childLeaving,u&&s.childPulsate);return!k&&!S&&P(!0),J.useEffect(()=>{if(!k&&y!=null){const D=setTimeout(y,_);return()=>{clearTimeout(D)}}},[y,k,_]),j.jsx("span",{className:I,style:L,children:j.jsx("span",{className:R})})}const mo=vt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),T9=["center","classes","className"];let qf=t=>t,Hb,Gb,Qb,Yb;const zp=550,F9=80,L9=Pf(Hb||(Hb=qf` - 0% { - transform: scale(0); - opacity: 0.1; - } - - 100% { - transform: scale(1); - opacity: 0.3; - } -`)),D9=Pf(Gb||(Gb=qf` - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -`)),O9=Pf(Qb||(Qb=qf` - 0% { - transform: scale(1); - } - - 50% { - transform: scale(0.92); - } - - 100% { - transform: scale(1); - } -`)),B9=We("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),j9=We(R9,{name:"MuiTouchRipple",slot:"Ripple"})(Yb||(Yb=qf` - opacity: 0; - position: absolute; - - &.${0} { - opacity: 0.3; - transform: scale(1); - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - &.${0} { - animation-duration: ${0}ms; - } - - & .${0} { - opacity: 1; - display: block; - width: 100%; - height: 100%; - border-radius: 50%; - background-color: currentColor; - } - - & .${0} { - opacity: 0; - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - & .${0} { - position: absolute; - /* @noflip */ - left: 0px; - top: 0; - animation-name: ${0}; - animation-duration: 2500ms; - animation-timing-function: ${0}; - animation-iteration-count: infinite; - animation-delay: 200ms; - } -`),mo.rippleVisible,L9,zp,({theme:t})=>t.transitions.easing.easeInOut,mo.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,mo.child,mo.childLeaving,D9,zp,({theme:t})=>t.transitions.easing.easeInOut,mo.childPulsate,O9,({theme:t})=>t.transitions.easing.easeInOut),z9=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiTouchRipple"}),{center:p=!1,classes:d={},className:b}=u,k=Ke(u,T9),[y,_]=J.useState([]),S=J.useRef(0),P=J.useRef(null);J.useEffect(()=>{P.current&&(P.current(),P.current=null)},[y]);const I=J.useRef(!1),L=fh(),R=J.useRef(null),D=J.useRef(null),Z=J.useCallback(Q=>{const{pulsate:U,rippleX:ee,rippleY:q,rippleSize:X,cb:me}=Q;_(le=>[...le,j.jsx(j9,{classes:{ripple:et(d.ripple,mo.ripple),rippleVisible:et(d.rippleVisible,mo.rippleVisible),ripplePulsate:et(d.ripplePulsate,mo.ripplePulsate),child:et(d.child,mo.child),childLeaving:et(d.childLeaving,mo.childLeaving),childPulsate:et(d.childPulsate,mo.childPulsate)},timeout:zp,pulsate:U,rippleX:ee,rippleY:q,rippleSize:X},S.current)]),S.current+=1,P.current=me},[d]),F=J.useCallback((Q={},U={},ee=()=>{})=>{const{pulsate:q=!1,center:X=p||U.pulsate,fakeElement:me=!1}=U;if((Q==null?void 0:Q.type)==="mousedown"&&I.current){I.current=!1;return}(Q==null?void 0:Q.type)==="touchstart"&&(I.current=!0);const le=me?null:D.current,he=le?le.getBoundingClientRect():{width:0,height:0,left:0,top:0};let de,Ce,_e;if(X||Q===void 0||Q.clientX===0&&Q.clientY===0||!Q.clientX&&!Q.touches)de=Math.round(he.width/2),Ce=Math.round(he.height/2);else{const{clientX:ge,clientY:ye}=Q.touches&&Q.touches.length>0?Q.touches[0]:Q;de=Math.round(ge-he.left),Ce=Math.round(ye-he.top)}if(X)_e=Math.sqrt((2*he.width**2+he.height**2)/3),_e%2===0&&(_e+=1);else{const ge=Math.max(Math.abs((le?le.clientWidth:0)-de),de)*2+2,ye=Math.max(Math.abs((le?le.clientHeight:0)-Ce),Ce)*2+2;_e=Math.sqrt(ge**2+ye**2)}Q!=null&&Q.touches?R.current===null&&(R.current=()=>{Z({pulsate:q,rippleX:de,rippleY:Ce,rippleSize:_e,cb:ee})},L.start(F9,()=>{R.current&&(R.current(),R.current=null)})):Z({pulsate:q,rippleX:de,rippleY:Ce,rippleSize:_e,cb:ee})},[p,Z,L]),O=J.useCallback(()=>{F({},{pulsate:!0})},[F]),B=J.useCallback((Q,U)=>{if(L.clear(),(Q==null?void 0:Q.type)==="touchend"&&R.current){R.current(),R.current=null,L.start(0,()=>{B(Q,U)});return}R.current=null,_(ee=>ee.length>0?ee.slice(1):ee),P.current=U},[L]);return J.useImperativeHandle(s,()=>({pulsate:O,start:F,stop:B}),[O,F,B]),j.jsx(B9,Y({className:et(mo.root,d.root,b),ref:D},k,{children:j.jsx(A9,{component:null,exit:!0,children:y})}))}),V9=z9;function W9(t){return kt("MuiButtonBase",t)}const U9=vt("MuiButtonBase",["root","disabled","focusVisible"]),H9=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],G9=t=>{const{disabled:r,focusVisible:s,focusVisibleClassName:u,classes:p}=t,b=wt({root:["root",r&&"disabled",s&&"focusVisible"]},W9,p);return s&&u&&(b.root+=` ${u}`),b},Q9=We("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,r)=>r.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${U9.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Y9=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiButtonBase"}),{action:p,centerRipple:d=!1,children:b,className:k,component:y="button",disabled:_=!1,disableRipple:S=!1,disableTouchRipple:P=!1,focusRipple:I=!1,LinkComponent:L="a",onBlur:R,onClick:D,onContextMenu:Z,onDragLeave:F,onFocus:O,onFocusVisible:B,onKeyDown:Q,onKeyUp:U,onMouseDown:ee,onMouseLeave:q,onMouseUp:X,onTouchEnd:me,onTouchMove:le,onTouchStart:he,tabIndex:de=0,TouchRippleProps:Ce,touchRippleRef:_e,type:ge}=u,ye=Ke(u,H9),ve=J.useRef(null),ce=J.useRef(null),we=Wn(ce,_e),{isFocusVisibleRef:Ne,onFocus:Ae,onBlur:Pe,ref:tt}=z6(),[Ue,He]=J.useState(!1);_&&Ue&&He(!1),J.useImperativeHandle(p,()=>({focusVisible:()=>{He(!0),ve.current.focus()}}),[]);const[mt,Zt]=J.useState(!1);J.useEffect(()=>{Zt(!0)},[]);const nt=mt&&!S&&!_;J.useEffect(()=>{Ue&&I&&!S&&mt&&ce.current.pulsate()},[S,I,Ue,mt]);function Gt(Re,ct,Tt=P){return yo(Dt=>(ct&&ct(Dt),!Tt&&ce.current&&ce.current[Re](Dt),!0))}const hn=Gt("start",ee),Rt=Gt("stop",Z),Vt=Gt("stop",F),Ct=Gt("stop",X),pt=Gt("stop",Re=>{Ue&&Re.preventDefault(),q&&q(Re)}),dt=Gt("start",he),Jt=Gt("stop",me),yn=Gt("stop",le),ut=Gt("stop",Re=>{Pe(Re),Ne.current===!1&&He(!1),R&&R(Re)},!1),$n=yo(Re=>{ve.current||(ve.current=Re.currentTarget),Ae(Re),Ne.current===!0&&(He(!0),B&&B(Re)),O&&O(Re)}),Qt=()=>{const Re=ve.current;return y&&y!=="button"&&!(Re.tagName==="A"&&Re.href)},Yt=J.useRef(!1),Sr=yo(Re=>{I&&!Yt.current&&Ue&&ce.current&&Re.key===" "&&(Yt.current=!0,ce.current.stop(Re,()=>{ce.current.start(Re)})),Re.target===Re.currentTarget&&Qt()&&Re.key===" "&&Re.preventDefault(),Q&&Q(Re),Re.target===Re.currentTarget&&Qt()&&Re.key==="Enter"&&!_&&(Re.preventDefault(),D&&D(Re))}),Kn=yo(Re=>{I&&Re.key===" "&&ce.current&&Ue&&!Re.defaultPrevented&&(Yt.current=!1,ce.current.stop(Re,()=>{ce.current.pulsate(Re)})),U&&U(Re),D&&Re.target===Re.currentTarget&&Qt()&&Re.key===" "&&!Re.defaultPrevented&&D(Re)});let $t=y;$t==="button"&&(ye.href||ye.to)&&($t=L);const ir={};$t==="button"?(ir.type=ge===void 0?"button":ge,ir.disabled=_):(!ye.href&&!ye.to&&(ir.role="button"),_&&(ir["aria-disabled"]=_));const Er=Wn(s,tt,ve),ar=Y({},u,{centerRipple:d,component:y,disabled:_,disableRipple:S,disableTouchRipple:P,focusRipple:I,tabIndex:de,focusVisible:Ue}),De=G9(ar);return j.jsxs(Q9,Y({as:$t,className:et(De.root,k),ownerState:ar,onBlur:ut,onClick:D,onContextMenu:Rt,onFocus:$n,onKeyDown:Sr,onKeyUp:Kn,onMouseDown:hn,onMouseLeave:pt,onMouseUp:Ct,onDragLeave:Vt,onTouchEnd:Jt,onTouchMove:yn,onTouchStart:dt,ref:Er,tabIndex:_?-1:de,type:ge},ir,ye,{children:[b,nt?j.jsx(V9,Y({ref:we,center:d},Ce)):null]}))}),fl=Y9;function K9(t){return kt("MuiAlert",t)}const X9=vt("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),Kb=X9;function q9(t){return kt("MuiIconButton",t)}const Z9=vt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),J9=Z9,$9=["edge","children","className","color","disabled","disableFocusRipple","size"],eP=t=>{const{classes:r,disabled:s,color:u,edge:p,size:d}=t,b={root:["root",s&&"disabled",u!=="default"&&`color${$e(u)}`,p&&`edge${$e(p)}`,`size${$e(d)}`]};return wt(b,q9,r)},tP=We(fl,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.color!=="default"&&r[`color${$e(s.color)}`],s.edge&&r[`edge${$e(s.edge)}`],r[`size${$e(s.size)}`]]}})(({theme:t,ownerState:r})=>Y({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!r.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},r.edge==="start"&&{marginLeft:r.size==="small"?-3:-12},r.edge==="end"&&{marginRight:r.size==="small"?-3:-12}),({theme:t,ownerState:r})=>{var s;const u=(s=(t.vars||t).palette)==null?void 0:s[r.color];return Y({},r.color==="inherit"&&{color:"inherit"},r.color!=="inherit"&&r.color!=="default"&&Y({color:u==null?void 0:u.main},!r.disableRipple&&{"&:hover":Y({},u&&{backgroundColor:t.vars?`rgba(${u.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(u.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),r.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},r.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${J9.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),nP=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiIconButton"}),{edge:p=!1,children:d,className:b,color:k="default",disabled:y=!1,disableFocusRipple:_=!1,size:S="medium"}=u,P=Ke(u,$9),I=Y({},u,{edge:p,color:k,disabled:y,disableFocusRipple:_,size:S}),L=eP(I);return j.jsx(tP,Y({className:et(L.root,b),centerRipple:!0,focusRipple:!_,disabled:y,ref:s},P,{ownerState:I,children:d}))}),Do=nP,rP=or(j.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),oP=or(j.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),iP=or(j.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),aP=or(j.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),sP=or(j.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),lP=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],cP=t=>{const{variant:r,color:s,severity:u,classes:p}=t,d={root:["root",`color${$e(s||u)}`,`${r}${$e(s||u)}`,`${r}`],icon:["icon"],message:["message"],action:["action"]};return wt(d,K9,p)},uP=We(ua,{name:"MuiAlert",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[s.variant],r[`${s.variant}${$e(s.color||s.severity)}`]]}})(({theme:t})=>{const r=t.palette.mode==="light"?Mc:Ic,s=t.palette.mode==="light"?Ic:Mc;return Y({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(([,u])=>u.main&&u.light).map(([u])=>({props:{colorSeverity:u,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${u}Color`]:r(t.palette[u].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${u}StandardBg`]:s(t.palette[u].light,.9),[`& .${Kb.icon}`]:t.vars?{color:t.vars.palette.Alert[`${u}IconColor`]}:{color:t.palette[u].main}}})),...Object.entries(t.palette).filter(([,u])=>u.main&&u.light).map(([u])=>({props:{colorSeverity:u,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${u}Color`]:r(t.palette[u].light,.6),border:`1px solid ${(t.vars||t).palette[u].light}`,[`& .${Kb.icon}`]:t.vars?{color:t.vars.palette.Alert[`${u}IconColor`]}:{color:t.palette[u].main}}})),...Object.entries(t.palette).filter(([,u])=>u.main&&u.dark).map(([u])=>({props:{colorSeverity:u,variant:"filled"},style:Y({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert[`${u}FilledColor`],backgroundColor:t.vars.palette.Alert[`${u}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[u].dark:t.palette[u].main,color:t.palette.getContrastText(t.palette[u].main)})}))]})}),fP=We("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,r)=>r.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),dP=We("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,r)=>r.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Xb=We("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,r)=>r.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),qb={success:j.jsx(rP,{fontSize:"inherit"}),warning:j.jsx(oP,{fontSize:"inherit"}),error:j.jsx(iP,{fontSize:"inherit"}),info:j.jsx(aP,{fontSize:"inherit"})},pP=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiAlert"}),{action:p,children:d,className:b,closeText:k="Close",color:y,components:_={},componentsProps:S={},icon:P,iconMapping:I=qb,onClose:L,role:R="alert",severity:D="success",slotProps:Z={},slots:F={},variant:O="standard"}=u,B=Ke(u,lP),Q=Y({},u,{color:y,severity:D,variant:O,colorSeverity:y||D}),U=cP(Q),ee={slots:Y({closeButton:_.CloseButton,closeIcon:_.CloseIcon},F),slotProps:Y({},S,Z)},[q,X]=Ub("closeButton",{elementType:Do,externalForwardedProps:ee,ownerState:Q}),[me,le]=Ub("closeIcon",{elementType:sP,externalForwardedProps:ee,ownerState:Q});return j.jsxs(uP,Y({role:R,elevation:0,ownerState:Q,className:et(U.root,b),ref:s},B,{children:[P!==!1?j.jsx(fP,{ownerState:Q,className:U.icon,children:P||I[D]||qb[D]}):null,j.jsx(dP,{ownerState:Q,className:U.message,children:d}),p!=null?j.jsx(Xb,{ownerState:Q,className:U.action,children:p}):null,p==null&&L?j.jsx(Xb,{ownerState:Q,className:U.action,children:j.jsx(q,Y({size:"small","aria-label":k,title:k,color:"inherit",onClick:L},X,{children:j.jsx(me,Y({fontSize:"small"},le))}))}):null]}))}),iy=pP;function hP(t){return kt("MuiTypography",t)}vt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const mP=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],gP=t=>{const{align:r,gutterBottom:s,noWrap:u,paragraph:p,variant:d,classes:b}=t,k={root:["root",d,t.align!=="inherit"&&`align${$e(r)}`,s&&"gutterBottom",u&&"noWrap",p&&"paragraph"]};return wt(k,hP,b)},bP=We("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.variant&&r[s.variant],s.align!=="inherit"&&r[`align${$e(s.align)}`],s.noWrap&&r.noWrap,s.gutterBottom&&r.gutterBottom,s.paragraph&&r.paragraph]}})(({theme:t,ownerState:r})=>Y({margin:0},r.variant==="inherit"&&{font:"inherit"},r.variant!=="inherit"&&t.typography[r.variant],r.align!=="inherit"&&{textAlign:r.align},r.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r.gutterBottom&&{marginBottom:"0.35em"},r.paragraph&&{marginBottom:16})),Zb={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},vP={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},kP=t=>vP[t]||t,yP=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiTypography"}),p=kP(u.color),d=Uc(Y({},u,{color:p})),{align:b="inherit",className:k,component:y,gutterBottom:_=!1,noWrap:S=!1,paragraph:P=!1,variant:I="body1",variantMapping:L=Zb}=d,R=Ke(d,mP),D=Y({},d,{align:b,color:p,className:k,component:y,gutterBottom:_,noWrap:S,paragraph:P,variant:I,variantMapping:L}),Z=y||(P?"p":L[I]||Zb[I])||"span",F=gP(D);return j.jsx(bP,Y({as:Z,ref:s,ownerState:D,className:et(F.root,k)},R))}),no=yP;function _P(t){return kt("MuiAppBar",t)}vt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const wP=["className","color","enableColorOnDark","position"],AP=t=>{const{color:r,position:s,classes:u}=t,p={root:["root",`color${$e(r)}`,`position${$e(s)}`]};return wt(p,_P,u)},Ou=(t,r)=>t?`${t==null?void 0:t.replace(")","")}, ${r})`:r,CP=We(ua,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[`position${$e(s.position)}`],r[`color${$e(s.color)}`]]}})(({theme:t,ownerState:r})=>{const s=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return Y({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},r.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},r.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},r.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},r.position==="static"&&{position:"static"},r.position==="relative"&&{position:"relative"},!t.vars&&Y({},r.color==="default"&&{backgroundColor:s,color:t.palette.getContrastText(s)},r.color&&r.color!=="default"&&r.color!=="inherit"&&r.color!=="transparent"&&{backgroundColor:t.palette[r.color].main,color:t.palette[r.color].contrastText},r.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!r.enableColorOnDark&&{backgroundColor:null,color:null},r.color==="transparent"&&Y({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&Y({},r.color==="default"&&{"--AppBar-background":r.enableColorOnDark?t.vars.palette.AppBar.defaultBg:Ou(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":r.enableColorOnDark?t.vars.palette.text.primary:Ou(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},r.color&&!r.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":r.enableColorOnDark?t.vars.palette[r.color].main:Ou(t.vars.palette.AppBar.darkBg,t.vars.palette[r.color].main),"--AppBar-color":r.enableColorOnDark?t.vars.palette[r.color].contrastText:Ou(t.vars.palette.AppBar.darkColor,t.vars.palette[r.color].contrastText)},!["inherit","transparent"].includes(r.color)&&{backgroundColor:"var(--AppBar-background)"},{color:r.color==="inherit"?"inherit":"var(--AppBar-color)"},r.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),xP=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiAppBar"}),{className:p,color:d="primary",enableColorOnDark:b=!1,position:k="fixed"}=u,y=Ke(u,wP),_=Y({},u,{color:d,position:k,enableColorOnDark:b}),S=AP(_);return j.jsx(CP,Y({square:!0,component:"header",ownerState:_,elevation:4,className:et(S.root,p,k==="fixed"&&"mui-fixed"),ref:s},y))}),SP=xP;function EP(t){return typeof t=="function"?t():t}const PP=J.forwardRef(function(r,s){const{children:u,container:p,disablePortal:d=!1}=r,[b,k]=J.useState(null),y=Wn(J.isValidElement(u)?u.ref:null,s);if(xo(()=>{d||k(EP(p)||document.body)},[p,d]),xo(()=>{if(b&&!d)return Fp(s,b),()=>{Fp(s,null)}},[s,b,d]),d){if(J.isValidElement(u)){const _={ref:y};return J.cloneElement(u,_)}return j.jsx(J.Fragment,{children:u})}return j.jsx(J.Fragment,{children:b&&Q1.createPortal(u,b)})}),MP=PP,IP=["onChange","maxRows","minRows","style","value"];function Bu(t){return parseInt(t,10)||0}const NP={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function RP(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const TP=J.forwardRef(function(r,s){const{onChange:u,maxRows:p,minRows:d=1,style:b,value:k}=r,y=Ke(r,IP),{current:_}=J.useRef(k!=null),S=J.useRef(null),P=Wn(s,S),I=J.useRef(null),L=J.useRef(null),R=J.useCallback(()=>{const F=S.current,B=Pi(F).getComputedStyle(F);if(B.width==="0px")return{outerHeightStyle:0,overflowing:!1};const Q=L.current;Q.style.width=B.width,Q.value=F.value||r.placeholder||"x",Q.value.slice(-1)===` -`&&(Q.value+=" ");const U=B.boxSizing,ee=Bu(B.paddingBottom)+Bu(B.paddingTop),q=Bu(B.borderBottomWidth)+Bu(B.borderTopWidth),X=Q.scrollHeight;Q.value="x";const me=Q.scrollHeight;let le=X;d&&(le=Math.max(Number(d)*me,le)),p&&(le=Math.min(Number(p)*me,le)),le=Math.max(le,me);const he=le+(U==="border-box"?ee+q:0),de=Math.abs(le-X)<=1;return{outerHeightStyle:he,overflowing:de}},[p,d,r.placeholder]),D=J.useCallback(()=>{const F=R();if(RP(F))return;const O=F.outerHeightStyle,B=S.current;I.current!==O&&(I.current=O,B.style.height=`${O}px`),B.style.overflow=F.overflowing?"hidden":""},[R]);xo(()=>{const F=()=>{D()};let O;const B=ch(F),Q=S.current,U=Pi(Q);U.addEventListener("resize",B);let ee;return typeof ResizeObserver<"u"&&(ee=new ResizeObserver(F),ee.observe(Q)),()=>{B.clear(),cancelAnimationFrame(O),U.removeEventListener("resize",B),ee&&ee.disconnect()}},[R,D]),xo(()=>{D()});const Z=F=>{_||D(),u&&u(F)};return j.jsxs(J.Fragment,{children:[j.jsx("textarea",Y({value:k,onChange:Z,ref:P,rows:d,style:b},y)),j.jsx("textarea",{"aria-hidden":!0,className:r.className,readOnly:!0,ref:L,tabIndex:-1,style:Y({},NP.shadow,b,{paddingTop:0,paddingBottom:0})})]})}),FP=TP;function fa({props:t,states:r,muiFormControl:s}){return r.reduce((u,p)=>(u[p]=t[p],s&&typeof t[p]>"u"&&(u[p]=s[p]),u),{})}const LP=J.createContext(void 0),Zf=LP;function si(){return J.useContext(Zf)}function ay(t){return j.jsx(qS,Y({},t,{defaultTheme:gh,themeId:Js}))}function Jb(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function U0(t,r=!1){return t&&(Jb(t.value)&&t.value!==""||r&&Jb(t.defaultValue)&&t.defaultValue!=="")}function DP(t){return t.startAdornment}function OP(t){return kt("MuiInputBase",t)}const BP=vt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),tl=BP,jP=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Jf=(t,r)=>{const{ownerState:s}=t;return[r.root,s.formControl&&r.formControl,s.startAdornment&&r.adornedStart,s.endAdornment&&r.adornedEnd,s.error&&r.error,s.size==="small"&&r.sizeSmall,s.multiline&&r.multiline,s.color&&r[`color${$e(s.color)}`],s.fullWidth&&r.fullWidth,s.hiddenLabel&&r.hiddenLabel]},$f=(t,r)=>{const{ownerState:s}=t;return[r.input,s.size==="small"&&r.inputSizeSmall,s.multiline&&r.inputMultiline,s.type==="search"&&r.inputTypeSearch,s.startAdornment&&r.inputAdornedStart,s.endAdornment&&r.inputAdornedEnd,s.hiddenLabel&&r.inputHiddenLabel]},zP=t=>{const{classes:r,color:s,disabled:u,error:p,endAdornment:d,focused:b,formControl:k,fullWidth:y,hiddenLabel:_,multiline:S,readOnly:P,size:I,startAdornment:L,type:R}=t,D={root:["root",`color${$e(s)}`,u&&"disabled",p&&"error",y&&"fullWidth",b&&"focused",k&&"formControl",I&&I!=="medium"&&`size${$e(I)}`,S&&"multiline",L&&"adornedStart",d&&"adornedEnd",_&&"hiddenLabel",P&&"readOnly"],input:["input",u&&"disabled",R==="search"&&"inputTypeSearch",S&&"inputMultiline",I==="small"&&"inputSizeSmall",_&&"inputHiddenLabel",L&&"inputAdornedStart",d&&"inputAdornedEnd",P&&"readOnly"]};return wt(D,OP,r)},ed=We("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Jf})(({theme:t,ownerState:r})=>Y({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${tl.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},r.multiline&&Y({padding:"4px 0 5px"},r.size==="small"&&{paddingTop:1}),r.fullWidth&&{width:"100%"})),td=We("input",{name:"MuiInputBase",slot:"Input",overridesResolver:$f})(({theme:t,ownerState:r})=>{const s=t.palette.mode==="light",u=Y({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:s?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),p={opacity:"0 !important"},d=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:s?.42:.5};return Y({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":u,"&::-moz-placeholder":u,"&:-ms-input-placeholder":u,"&::-ms-input-placeholder":u,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${tl.formControl} &`]:{"&::-webkit-input-placeholder":p,"&::-moz-placeholder":p,"&:-ms-input-placeholder":p,"&::-ms-input-placeholder":p,"&:focus::-webkit-input-placeholder":d,"&:focus::-moz-placeholder":d,"&:focus:-ms-input-placeholder":d,"&:focus::-ms-input-placeholder":d},[`&.${tl.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},r.size==="small"&&{paddingTop:1},r.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},r.type==="search"&&{MozAppearance:"textfield"})}),VP=j.jsx(ay,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),WP=J.forwardRef(function(r,s){var u;const p=At({props:r,name:"MuiInputBase"}),{"aria-describedby":d,autoComplete:b,autoFocus:k,className:y,components:_={},componentsProps:S={},defaultValue:P,disabled:I,disableInjectingGlobalStyles:L,endAdornment:R,fullWidth:D=!1,id:Z,inputComponent:F="input",inputProps:O={},inputRef:B,maxRows:Q,minRows:U,multiline:ee=!1,name:q,onBlur:X,onChange:me,onClick:le,onFocus:he,onKeyDown:de,onKeyUp:Ce,placeholder:_e,readOnly:ge,renderSuffix:ye,rows:ve,slotProps:ce={},slots:we={},startAdornment:Ne,type:Ae="text",value:Pe}=p,tt=Ke(p,jP),Ue=O.value!=null?O.value:Pe,{current:He}=J.useRef(Ue!=null),mt=J.useRef(),Zt=J.useCallback(De=>{},[]),nt=Wn(mt,B,O.ref,Zt),[Gt,hn]=J.useState(!1),Rt=si(),Vt=fa({props:p,muiFormControl:Rt,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Vt.focused=Rt?Rt.focused:Gt,J.useEffect(()=>{!Rt&&I&&Gt&&(hn(!1),X&&X())},[Rt,I,Gt,X]);const Ct=Rt&&Rt.onFilled,pt=Rt&&Rt.onEmpty,dt=J.useCallback(De=>{U0(De)?Ct&&Ct():pt&&pt()},[Ct,pt]);xo(()=>{He&&dt({value:Ue})},[Ue,dt,He]);const Jt=De=>{if(Vt.disabled){De.stopPropagation();return}he&&he(De),O.onFocus&&O.onFocus(De),Rt&&Rt.onFocus?Rt.onFocus(De):hn(!0)},yn=De=>{X&&X(De),O.onBlur&&O.onBlur(De),Rt&&Rt.onBlur?Rt.onBlur(De):hn(!1)},ut=(De,...Re)=>{if(!He){const ct=De.target||mt.current;if(ct==null)throw new Error(ja(1));dt({value:ct.value})}O.onChange&&O.onChange(De,...Re),me&&me(De,...Re)};J.useEffect(()=>{dt(mt.current)},[]);const $n=De=>{mt.current&&De.currentTarget===De.target&&mt.current.focus(),le&&le(De)};let Qt=F,Yt=O;ee&&Qt==="input"&&(ve?Yt=Y({type:void 0,minRows:ve,maxRows:ve},Yt):Yt=Y({type:void 0,maxRows:Q,minRows:U},Yt),Qt=FP);const Sr=De=>{dt(De.animationName==="mui-auto-fill-cancel"?mt.current:{value:"x"})};J.useEffect(()=>{Rt&&Rt.setAdornedStart(!!Ne)},[Rt,Ne]);const Kn=Y({},p,{color:Vt.color||"primary",disabled:Vt.disabled,endAdornment:R,error:Vt.error,focused:Vt.focused,formControl:Rt,fullWidth:D,hiddenLabel:Vt.hiddenLabel,multiline:ee,size:Vt.size,startAdornment:Ne,type:Ae}),$t=zP(Kn),ir=we.root||_.Root||ed,Er=ce.root||S.root||{},ar=we.input||_.Input||td;return Yt=Y({},Yt,(u=ce.input)!=null?u:S.input),j.jsxs(J.Fragment,{children:[!L&&VP,j.jsxs(ir,Y({},Er,!oi(ir)&&{ownerState:Y({},Kn,Er.ownerState)},{ref:s,onClick:$n},tt,{className:et($t.root,Er.className,y,ge&&"MuiInputBase-readOnly"),children:[Ne,j.jsx(Zf.Provider,{value:null,children:j.jsx(ar,Y({ownerState:Kn,"aria-invalid":Vt.error,"aria-describedby":d,autoComplete:b,autoFocus:k,defaultValue:P,disabled:Vt.disabled,id:Z,onAnimationStart:Sr,name:q,placeholder:_e,readOnly:ge,required:Vt.required,rows:ve,value:Ue,onKeyDown:de,onKeyUp:Ce,type:Ae},Yt,!oi(ar)&&{as:Qt,ownerState:Y({},Kn,Yt.ownerState)},{ref:nt,className:et($t.input,Yt.className,ge&&"MuiInputBase-readOnly"),onBlur:yn,onChange:ut,onFocus:Jt}))}),R,ye?ye(Y({},Vt,{startAdornment:Ne})):null]}))]})}),_h=WP;function UP(t){return kt("MuiInput",t)}const HP=Y({},tl,vt("MuiInput",["root","underline","input"])),Ol=HP;function GP(t){return kt("MuiOutlinedInput",t)}const QP=Y({},tl,vt("MuiOutlinedInput",["root","notchedOutline","input"])),Vi=QP;function YP(t){return kt("MuiFilledInput",t)}const KP=Y({},tl,vt("MuiFilledInput",["root","underline","input"])),ka=KP,XP=or(j.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),qP=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ZP={entering:{opacity:1},entered:{opacity:1}},JP=J.forwardRef(function(r,s){const u=Ga(),p={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{addEndListener:d,appear:b=!0,children:k,easing:y,in:_,onEnter:S,onEntered:P,onEntering:I,onExit:L,onExited:R,onExiting:D,style:Z,timeout:F=p,TransitionComponent:O=bh}=r,B=Ke(r,qP),Q=J.useRef(null),U=Wn(Q,k.ref,s),ee=_e=>ge=>{if(_e){const ye=Q.current;ge===void 0?_e(ye):_e(ye,ge)}},q=ee(I),X=ee((_e,ge)=>{yh(_e);const ye=el({style:Z,timeout:F,easing:y},{mode:"enter"});_e.style.webkitTransition=u.transitions.create("opacity",ye),_e.style.transition=u.transitions.create("opacity",ye),S&&S(_e,ge)}),me=ee(P),le=ee(D),he=ee(_e=>{const ge=el({style:Z,timeout:F,easing:y},{mode:"exit"});_e.style.webkitTransition=u.transitions.create("opacity",ge),_e.style.transition=u.transitions.create("opacity",ge),L&&L(_e)}),de=ee(R),Ce=_e=>{d&&d(Q.current,_e)};return j.jsx(O,Y({appear:b,in:_,nodeRef:Q,onEnter:X,onEntered:me,onEntering:q,onExit:he,onExited:de,onExiting:le,addEndListener:Ce,timeout:F},B,{children:(_e,ge)=>J.cloneElement(k,Y({style:Y({opacity:0,visibility:_e==="exited"&&!_?"hidden":void 0},ZP[_e],Z,k.props.style),ref:U},ge))}))}),sy=JP;function $P(t){return kt("MuiBackdrop",t)}vt("MuiBackdrop",["root","invisible"]);const eM=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],tM=t=>{const{classes:r,invisible:s}=t;return wt({root:["root",s&&"invisible"]},$P,r)},nM=We("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.invisible&&r.invisible]}})(({ownerState:t})=>Y({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),rM=J.forwardRef(function(r,s){var u,p,d;const b=At({props:r,name:"MuiBackdrop"}),{children:k,className:y,component:_="div",components:S={},componentsProps:P={},invisible:I=!1,open:L,slotProps:R={},slots:D={},TransitionComponent:Z=sy,transitionDuration:F}=b,O=Ke(b,eM),B=Y({},b,{component:_,invisible:I}),Q=tM(B),U=(u=R.root)!=null?u:P.root;return j.jsx(Z,Y({in:L,timeout:F},O,{children:j.jsx(nM,Y({"aria-hidden":!0},U,{as:(p=(d=D.root)!=null?d:S.Root)!=null?p:_,className:et(Q.root,y,U==null?void 0:U.className),ownerState:Y({},B,U==null?void 0:U.ownerState),classes:Q,ref:s,children:k}))}))}),ly=rM,oM=vt("MuiBox",["root"]),iM=oM,aM=Kf(),sM=r7({themeId:Js,defaultTheme:aM,defaultClassName:iM.root,generateClassName:R6.generate}),Va=sM;function lM(t){return kt("MuiButton",t)}const cM=vt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),ju=cM,uM=J.createContext({}),fM=uM,dM=J.createContext(void 0),pM=dM,hM=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],mM=t=>{const{color:r,disableElevation:s,fullWidth:u,size:p,variant:d,classes:b}=t,k={root:["root",d,`${d}${$e(r)}`,`size${$e(p)}`,`${d}Size${$e(p)}`,`color${$e(r)}`,s&&"disableElevation",u&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${$e(p)}`],endIcon:["icon","endIcon",`iconSize${$e(p)}`]},y=wt(k,lM,b);return Y({},b,y)},cy=t=>Y({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),gM=We(fl,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[s.variant],r[`${s.variant}${$e(s.color)}`],r[`size${$e(s.size)}`],r[`${s.variant}Size${$e(s.size)}`],s.color==="inherit"&&r.colorInherit,s.disableElevation&&r.disableElevation,s.fullWidth&&r.fullWidth]}})(({theme:t,ownerState:r})=>{var s,u;const p=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],d=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return Y({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":Y({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},r.variant==="text"&&r.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},r.variant==="outlined"&&r.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[r.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},r.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:d,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},r.variant==="contained"&&r.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[r.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[r.color].main}}),"&:active":Y({},r.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${ju.focusVisible}`]:Y({},r.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${ju.disabled}`]:Y({color:(t.vars||t).palette.action.disabled},r.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},r.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},r.variant==="text"&&{padding:"6px 8px"},r.variant==="text"&&r.color!=="inherit"&&{color:(t.vars||t).palette[r.color].main},r.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},r.variant==="outlined"&&r.color!=="inherit"&&{color:(t.vars||t).palette[r.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[r.color].mainChannel} / 0.5)`:`1px solid ${Mn(t.palette[r.color].main,.5)}`},r.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(s=(u=t.palette).getContrastText)==null?void 0:s.call(u,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:p,boxShadow:(t.vars||t).shadows[2]},r.variant==="contained"&&r.color!=="inherit"&&{color:(t.vars||t).palette[r.color].contrastText,backgroundColor:(t.vars||t).palette[r.color].main},r.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},r.size==="small"&&r.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},r.size==="large"&&r.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},r.size==="small"&&r.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},r.size==="large"&&r.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},r.size==="small"&&r.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},r.size==="large"&&r.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},r.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ju.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ju.disabled}`]:{boxShadow:"none"}}),bM=We("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.startIcon,r[`iconSize${$e(s.size)}`]]}})(({ownerState:t})=>Y({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},cy(t))),vM=We("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.endIcon,r[`iconSize${$e(s.size)}`]]}})(({ownerState:t})=>Y({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},cy(t))),kM=J.forwardRef(function(r,s){const u=J.useContext(fM),p=J.useContext(pM),d=Pc(u,r),b=At({props:d,name:"MuiButton"}),{children:k,color:y="primary",component:_="button",className:S,disabled:P=!1,disableElevation:I=!1,disableFocusRipple:L=!1,endIcon:R,focusVisibleClassName:D,fullWidth:Z=!1,size:F="medium",startIcon:O,type:B,variant:Q="text"}=b,U=Ke(b,hM),ee=Y({},b,{color:y,component:_,disabled:P,disableElevation:I,disableFocusRipple:L,fullWidth:Z,size:F,type:B,variant:Q}),q=mM(ee),X=O&&j.jsx(bM,{className:q.startIcon,ownerState:ee,children:O}),me=R&&j.jsx(vM,{className:q.endIcon,ownerState:ee,children:R}),le=p||"";return j.jsxs(gM,Y({ownerState:ee,className:et(u.className,q.root,S,le),component:_,disabled:P,focusRipple:!L,focusVisibleClassName:et(q.focusVisible,D),ref:s,type:B},U,{classes:q,children:[X,k,me]}))}),wi=kM;function yM(t){return kt("MuiCard",t)}vt("MuiCard",["root"]);const _M=["className","raised"],wM=t=>{const{classes:r}=t;return wt({root:["root"]},yM,r)},AM=We(ua,{name:"MuiCard",slot:"Root",overridesResolver:(t,r)=>r.root})(()=>({overflow:"hidden"})),CM=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiCard"}),{className:p,raised:d=!1}=u,b=Ke(u,_M),k=Y({},u,{raised:d}),y=wM(k);return j.jsx(AM,Y({className:et(y.root,p),elevation:d?8:void 0,ref:s,ownerState:k},b))}),xM=CM;function SM(t){return kt("MuiCardMedia",t)}vt("MuiCardMedia",["root","media","img"]);const EM=["children","className","component","image","src","style"],PM=t=>{const{classes:r,isMediaComponent:s,isImageComponent:u}=t;return wt({root:["root",s&&"media",u&&"img"]},SM,r)},MM=We("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t,{isMediaComponent:u,isImageComponent:p}=s;return[r.root,u&&r.media,p&&r.img]}})(({ownerState:t})=>Y({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},t.isMediaComponent&&{width:"100%"},t.isImageComponent&&{objectFit:"cover"})),IM=["video","audio","picture","iframe","img"],NM=["picture","img"],RM=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiCardMedia"}),{children:p,className:d,component:b="div",image:k,src:y,style:_}=u,S=Ke(u,EM),P=IM.indexOf(b)!==-1,I=!P&&k?Y({backgroundImage:`url("${k}")`},_):_,L=Y({},u,{component:b,isMediaComponent:P,isImageComponent:NM.indexOf(b)!==-1}),R=PM(L);return j.jsx(MM,Y({className:et(R.root,d),as:b,role:!P&&k?"img":void 0,ref:s,style:I,ownerState:L,src:P?k||y:void 0},S,{children:p}))}),TM=RM;function FM(t){return kt("PrivateSwitchBase",t)}vt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const LM=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],DM=t=>{const{classes:r,checked:s,disabled:u,edge:p}=t,d={root:["root",s&&"checked",u&&"disabled",p&&`edge${$e(p)}`],input:["input"]};return wt(d,FM,r)},OM=We(fl)(({ownerState:t})=>Y({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),BM=We("input",{shouldForwardProp:br})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),jM=J.forwardRef(function(r,s){const{autoFocus:u,checked:p,checkedIcon:d,className:b,defaultChecked:k,disabled:y,disableFocusRipple:_=!1,edge:S=!1,icon:P,id:I,inputProps:L,inputRef:R,name:D,onBlur:Z,onChange:F,onFocus:O,readOnly:B,required:Q=!1,tabIndex:U,type:ee,value:q}=r,X=Ke(r,LM),[me,le]=z0({controlled:p,default:!!k,name:"SwitchBase",state:"checked"}),he=si(),de=we=>{O&&O(we),he&&he.onFocus&&he.onFocus(we)},Ce=we=>{Z&&Z(we),he&&he.onBlur&&he.onBlur(we)},_e=we=>{if(we.nativeEvent.defaultPrevented)return;const Ne=we.target.checked;le(Ne),F&&F(we,Ne)};let ge=y;he&&typeof ge>"u"&&(ge=he.disabled);const ye=ee==="checkbox"||ee==="radio",ve=Y({},r,{checked:me,disabled:ge,disableFocusRipple:_,edge:S}),ce=DM(ve);return j.jsxs(OM,Y({component:"span",className:et(ce.root,b),centerRipple:!0,focusRipple:!_,disabled:ge,tabIndex:null,role:void 0,onFocus:de,onBlur:Ce,ownerState:ve,ref:s},X,{children:[j.jsx(BM,Y({autoFocus:u,checked:p,defaultChecked:k,className:ce.input,disabled:ge,id:ye?I:void 0,name:D,onChange:_e,readOnly:B,ref:R,required:Q,ownerState:ve,tabIndex:U,type:ee},ee==="checkbox"&&q===void 0?{}:{value:q},L)),me?d:P]}))}),zM=jM,VM=or(j.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),WM=or(j.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),UM=or(j.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function HM(t){return kt("MuiCheckbox",t)}const GM=vt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),E2=GM,QM=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],YM=t=>{const{classes:r,indeterminate:s,color:u,size:p}=t,d={root:["root",s&&"indeterminate",`color${$e(u)}`,`size${$e(p)}`]},b=wt(d,HM,r);return Y({},r,b)},KM=We(zM,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.indeterminate&&r.indeterminate,r[`size${$e(s.size)}`],s.color!=="default"&&r[`color${$e(s.color)}`]]}})(({theme:t,ownerState:r})=>Y({color:(t.vars||t).palette.text.secondary},!r.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${r.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(r.color==="default"?t.palette.action.active:t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},r.color!=="default"&&{[`&.${E2.checked}, &.${E2.indeterminate}`]:{color:(t.vars||t).palette[r.color].main},[`&.${E2.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),XM=j.jsx(WM,{}),qM=j.jsx(VM,{}),ZM=j.jsx(UM,{}),JM=J.forwardRef(function(r,s){var u,p;const d=At({props:r,name:"MuiCheckbox"}),{checkedIcon:b=XM,color:k="primary",icon:y=qM,indeterminate:_=!1,indeterminateIcon:S=ZM,inputProps:P,size:I="medium",className:L}=d,R=Ke(d,QM),D=_?S:y,Z=_?S:b,F=Y({},d,{color:k,indeterminate:_,size:I}),O=YM(F);return j.jsx(KM,Y({type:"checkbox",inputProps:Y({"data-indeterminate":_},P),icon:J.cloneElement(D,{fontSize:(u=D.props.fontSize)!=null?u:I}),checkedIcon:J.cloneElement(Z,{fontSize:(p=Z.props.fontSize)!=null?p:I}),ownerState:F,ref:s,className:et(O.root,L)},R,{classes:O}))}),uy=JM;function $b(t){return t.substring(2).toLowerCase()}function $M(t,r){return r.documentElement.clientWidth(setTimeout(()=>{y.current=!0},0),()=>{y.current=!1}),[]);const S=Wn(r.ref,k),P=yo(R=>{const D=_.current;_.current=!1;const Z=Zn(k.current);if(!y.current||!k.current||"clientX"in R&&$M(R,Z))return;if(b.current){b.current=!1;return}let F;R.composedPath?F=R.composedPath().indexOf(k.current)>-1:F=!Z.documentElement.contains(R.target)||k.current.contains(R.target),!F&&(s||!D)&&p(R)}),I=R=>D=>{_.current=!0;const Z=r.props[R];Z&&Z(D)},L={ref:S};return d!==!1&&(L[d]=I(d)),J.useEffect(()=>{if(d!==!1){const R=$b(d),D=Zn(k.current),Z=()=>{b.current=!0};return D.addEventListener(R,P),D.addEventListener("touchmove",Z),()=>{D.removeEventListener(R,P),D.removeEventListener("touchmove",Z)}}},[P,d]),u!==!1&&(L[u]=I(u)),J.useEffect(()=>{if(u!==!1){const R=$b(u),D=Zn(k.current);return D.addEventListener(R,P),()=>{D.removeEventListener(R,P)}}},[P,u]),j.jsx(J.Fragment,{children:J.cloneElement(r,L)})}const tI=(t,r)=>Y({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},r&&!t.vars&&{colorScheme:t.palette.mode}),nI=t=>Y({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),rI=(t,r=!1)=>{var s;const u={};r&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([b,k])=>{var y;u[t.getColorSchemeSelector(b).replace(/\s*&/,"")]={colorScheme:(y=k.palette)==null?void 0:y.mode}});let p=Y({html:tI(t,r),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:Y({margin:0},nI(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},u);const d=(s=t.components)==null||(s=s.MuiCssBaseline)==null?void 0:s.styleOverrides;return d&&(p=[p,d]),p};function oI(t){const r=At({props:t,name:"MuiCssBaseline"}),{children:s,enableColorScheme:u=!1}=r;return j.jsxs(J.Fragment,{children:[j.jsx(ay,{styles:p=>rI(p,u)}),s]})}function iI(t){const r=Zn(t);return r.body===t?Pi(t).innerWidth>r.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function ic(t,r){r?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function ev(t){return parseInt(Pi(t).getComputedStyle(t).paddingRight,10)||0}function aI(t){const s=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,u=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return s||u}function tv(t,r,s,u,p){const d=[r,s,...u];[].forEach.call(t.children,b=>{const k=d.indexOf(b)===-1,y=!aI(b);k&&y&&ic(b,p)})}function P2(t,r){let s=-1;return t.some((u,p)=>r(u)?(s=p,!0):!1),s}function sI(t,r){const s=[],u=t.container;if(!r.disableScrollLock){if(iI(u)){const b=V6(Zn(u));s.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${ev(u)+b}px`;const k=Zn(u).querySelectorAll(".mui-fixed");[].forEach.call(k,y=>{s.push({value:y.style.paddingRight,property:"padding-right",el:y}),y.style.paddingRight=`${ev(y)+b}px`})}let d;if(u.parentNode instanceof DocumentFragment)d=Zn(u).body;else{const b=u.parentElement,k=Pi(u);d=(b==null?void 0:b.nodeName)==="HTML"&&k.getComputedStyle(b).overflowY==="scroll"?b:u}s.push({value:d.style.overflow,property:"overflow",el:d},{value:d.style.overflowX,property:"overflow-x",el:d},{value:d.style.overflowY,property:"overflow-y",el:d}),d.style.overflow="hidden"}return()=>{s.forEach(({value:d,el:b,property:k})=>{d?b.style.setProperty(k,d):b.style.removeProperty(k)})}}function lI(t){const r=[];return[].forEach.call(t.children,s=>{s.getAttribute("aria-hidden")==="true"&&r.push(s)}),r}class cI{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(r,s){let u=this.modals.indexOf(r);if(u!==-1)return u;u=this.modals.length,this.modals.push(r),r.modalRef&&ic(r.modalRef,!1);const p=lI(s);tv(s,r.mount,r.modalRef,p,!0);const d=P2(this.containers,b=>b.container===s);return d!==-1?(this.containers[d].modals.push(r),u):(this.containers.push({modals:[r],container:s,restore:null,hiddenSiblings:p}),u)}mount(r,s){const u=P2(this.containers,d=>d.modals.indexOf(r)!==-1),p=this.containers[u];p.restore||(p.restore=sI(p,s))}remove(r,s=!0){const u=this.modals.indexOf(r);if(u===-1)return u;const p=P2(this.containers,b=>b.modals.indexOf(r)!==-1),d=this.containers[p];if(d.modals.splice(d.modals.indexOf(r),1),this.modals.splice(u,1),d.modals.length===0)d.restore&&d.restore(),r.modalRef&&ic(r.modalRef,s),tv(d.container,r.mount,r.modalRef,d.hiddenSiblings,!1),this.containers.splice(p,1);else{const b=d.modals[d.modals.length-1];b.modalRef&&ic(b.modalRef,!1)}return u}isTopModal(r){return this.modals.length>0&&this.modals[this.modals.length-1]===r}}const uI=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function fI(t){const r=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(r)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:r}function dI(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const r=u=>t.ownerDocument.querySelector(`input[type="radio"]${u}`);let s=r(`[name="${t.name}"]:checked`);return s||(s=r(`[name="${t.name}"]`)),s!==t}function pI(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||dI(t))}function hI(t){const r=[],s=[];return Array.from(t.querySelectorAll(uI)).forEach((u,p)=>{const d=fI(u);d===-1||!pI(u)||(d===0?r.push(u):s.push({documentOrder:p,tabIndex:d,node:u}))}),s.sort((u,p)=>u.tabIndex===p.tabIndex?u.documentOrder-p.documentOrder:u.tabIndex-p.tabIndex).map(u=>u.node).concat(r)}function mI(){return!0}function gI(t){const{children:r,disableAutoFocus:s=!1,disableEnforceFocus:u=!1,disableRestoreFocus:p=!1,getTabbable:d=hI,isEnabled:b=mI,open:k}=t,y=J.useRef(!1),_=J.useRef(null),S=J.useRef(null),P=J.useRef(null),I=J.useRef(null),L=J.useRef(!1),R=J.useRef(null),D=Wn(r.ref,R),Z=J.useRef(null);J.useEffect(()=>{!k||!R.current||(L.current=!s)},[s,k]),J.useEffect(()=>{if(!k||!R.current)return;const B=Zn(R.current);return R.current.contains(B.activeElement)||(R.current.hasAttribute("tabIndex")||R.current.setAttribute("tabIndex","-1"),L.current&&R.current.focus()),()=>{p||(P.current&&P.current.focus&&(y.current=!0,P.current.focus()),P.current=null)}},[k]),J.useEffect(()=>{if(!k||!R.current)return;const B=Zn(R.current),Q=q=>{Z.current=q,!(u||!b()||q.key!=="Tab")&&B.activeElement===R.current&&q.shiftKey&&(y.current=!0,S.current&&S.current.focus())},U=()=>{const q=R.current;if(q===null)return;if(!B.hasFocus()||!b()||y.current){y.current=!1;return}if(q.contains(B.activeElement)||u&&B.activeElement!==_.current&&B.activeElement!==S.current)return;if(B.activeElement!==I.current)I.current=null;else if(I.current!==null)return;if(!L.current)return;let X=[];if((B.activeElement===_.current||B.activeElement===S.current)&&(X=d(R.current)),X.length>0){var me,le;const he=!!((me=Z.current)!=null&&me.shiftKey&&((le=Z.current)==null?void 0:le.key)==="Tab"),de=X[0],Ce=X[X.length-1];typeof de!="string"&&typeof Ce!="string"&&(he?Ce.focus():de.focus())}else q.focus()};B.addEventListener("focusin",U),B.addEventListener("keydown",Q,!0);const ee=setInterval(()=>{B.activeElement&&B.activeElement.tagName==="BODY"&&U()},50);return()=>{clearInterval(ee),B.removeEventListener("focusin",U),B.removeEventListener("keydown",Q,!0)}},[s,u,p,b,k,d]);const F=B=>{P.current===null&&(P.current=B.relatedTarget),L.current=!0,I.current=B.target;const Q=r.props.onFocus;Q&&Q(B)},O=B=>{P.current===null&&(P.current=B.relatedTarget),L.current=!0};return j.jsxs(J.Fragment,{children:[j.jsx("div",{tabIndex:k?0:-1,onFocus:O,ref:_,"data-testid":"sentinelStart"}),J.cloneElement(r,{ref:D,onFocus:F}),j.jsx("div",{tabIndex:k?0:-1,onFocus:O,ref:S,"data-testid":"sentinelEnd"})]})}function bI(t){return typeof t=="function"?t():t}function vI(t){return t?t.props.hasOwnProperty("in"):!1}const kI=new cI;function yI(t){const{container:r,disableEscapeKeyDown:s=!1,disableScrollLock:u=!1,manager:p=kI,closeAfterTransition:d=!1,onTransitionEnter:b,onTransitionExited:k,children:y,onClose:_,open:S,rootRef:P}=t,I=J.useRef({}),L=J.useRef(null),R=J.useRef(null),D=Wn(R,P),[Z,F]=J.useState(!S),O=vI(y);let B=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(B=!1);const Q=()=>Zn(L.current),U=()=>(I.current.modalRef=R.current,I.current.mount=L.current,I.current),ee=()=>{p.mount(U(),{disableScrollLock:u}),R.current&&(R.current.scrollTop=0)},q=yo(()=>{const ye=bI(r)||Q().body;p.add(U(),ye),R.current&&ee()}),X=J.useCallback(()=>p.isTopModal(U()),[p]),me=yo(ye=>{L.current=ye,ye&&(S&&X()?ee():R.current&&ic(R.current,B))}),le=J.useCallback(()=>{p.remove(U(),B)},[B,p]);J.useEffect(()=>()=>{le()},[le]),J.useEffect(()=>{S?q():(!O||!d)&&le()},[S,le,O,d,q]);const he=ye=>ve=>{var ce;(ce=ye.onKeyDown)==null||ce.call(ye,ve),!(ve.key!=="Escape"||ve.which===229||!X())&&(s||(ve.stopPropagation(),_&&_(ve,"escapeKeyDown")))},de=ye=>ve=>{var ce;(ce=ye.onClick)==null||ce.call(ye,ve),ve.target===ve.currentTarget&&_&&_(ve,"backdropClick")};return{getRootProps:(ye={})=>{const ve=Na(t);delete ve.onTransitionEnter,delete ve.onTransitionExited;const ce=Y({},ve,ye);return Y({role:"presentation"},ce,{onKeyDown:he(ce),ref:D})},getBackdropProps:(ye={})=>{const ve=ye;return Y({"aria-hidden":!0},ve,{onClick:de(ve),open:S})},getTransitionProps:()=>{const ye=()=>{F(!1),b&&b()},ve=()=>{F(!0),k&&k(),d&&le()};return{onEnter:Sb(ye,y==null?void 0:y.props.onEnter),onExited:Sb(ve,y==null?void 0:y.props.onExited)}},rootRef:D,portalRef:me,isTopModal:X,exited:Z,hasTransition:O}}function _I(t){return kt("MuiModal",t)}vt("MuiModal",["root","hidden","backdrop"]);const wI=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],AI=t=>{const{open:r,exited:s,classes:u}=t;return wt({root:["root",!r&&s&&"hidden"],backdrop:["backdrop"]},_I,u)},CI=We("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,!s.open&&s.exited&&r.hidden]}})(({theme:t,ownerState:r})=>Y({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!r.open&&r.exited&&{visibility:"hidden"})),xI=We(ly,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,r)=>r.backdrop})({zIndex:-1}),SI=J.forwardRef(function(r,s){var u,p,d,b,k,y;const _=At({name:"MuiModal",props:r}),{BackdropComponent:S=xI,BackdropProps:P,className:I,closeAfterTransition:L=!1,children:R,container:D,component:Z,components:F={},componentsProps:O={},disableAutoFocus:B=!1,disableEnforceFocus:Q=!1,disableEscapeKeyDown:U=!1,disablePortal:ee=!1,disableRestoreFocus:q=!1,disableScrollLock:X=!1,hideBackdrop:me=!1,keepMounted:le=!1,onBackdropClick:he,open:de,slotProps:Ce,slots:_e}=_,ge=Ke(_,wI),ye=Y({},_,{closeAfterTransition:L,disableAutoFocus:B,disableEnforceFocus:Q,disableEscapeKeyDown:U,disablePortal:ee,disableRestoreFocus:q,disableScrollLock:X,hideBackdrop:me,keepMounted:le}),{getRootProps:ve,getBackdropProps:ce,getTransitionProps:we,portalRef:Ne,isTopModal:Ae,exited:Pe,hasTransition:tt}=yI(Y({},ye,{rootRef:s})),Ue=Y({},ye,{exited:Pe}),He=AI(Ue),mt={};if(R.props.tabIndex===void 0&&(mt.tabIndex="-1"),tt){const{onEnter:Ct,onExited:pt}=we();mt.onEnter=Ct,mt.onExited=pt}const Zt=(u=(p=_e==null?void 0:_e.root)!=null?p:F.Root)!=null?u:CI,nt=(d=(b=_e==null?void 0:_e.backdrop)!=null?b:F.Backdrop)!=null?d:S,Gt=(k=Ce==null?void 0:Ce.root)!=null?k:O.root,hn=(y=Ce==null?void 0:Ce.backdrop)!=null?y:O.backdrop,Rt=Nr({elementType:Zt,externalSlotProps:Gt,externalForwardedProps:ge,getSlotProps:ve,additionalProps:{ref:s,as:Z},ownerState:Ue,className:et(I,Gt==null?void 0:Gt.className,He==null?void 0:He.root,!Ue.open&&Ue.exited&&(He==null?void 0:He.hidden))}),Vt=Nr({elementType:nt,externalSlotProps:hn,additionalProps:P,getSlotProps:Ct=>ce(Y({},Ct,{onClick:pt=>{he&&he(pt),Ct!=null&&Ct.onClick&&Ct.onClick(pt)}})),className:et(hn==null?void 0:hn.className,P==null?void 0:P.className,He==null?void 0:He.backdrop),ownerState:Ue});return!le&&!de&&(!tt||Pe)?null:j.jsx(MP,{ref:Ne,container:D,disablePortal:ee,children:j.jsxs(Zt,Y({},Rt,{children:[!me&&S?j.jsx(nt,Y({},Vt)):null,j.jsx(gI,{disableEnforceFocus:Q,disableAutoFocus:B,disableRestoreFocus:q,isEnabled:Ae,open:de,children:J.cloneElement(R,mt)})]}))})}),wh=SI;function EI(t){return kt("MuiDialog",t)}const PI=vt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),M2=PI,MI=J.createContext({}),fy=MI,II=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],NI=We(ly,{name:"MuiDialog",slot:"Backdrop",overrides:(t,r)=>r.backdrop})({zIndex:-1}),RI=t=>{const{classes:r,scroll:s,maxWidth:u,fullWidth:p,fullScreen:d}=t,b={root:["root"],container:["container",`scroll${$e(s)}`],paper:["paper",`paperScroll${$e(s)}`,`paperWidth${$e(String(u))}`,p&&"paperFullWidth",d&&"paperFullScreen"]};return wt(b,EI,r)},TI=We(wh,{name:"MuiDialog",slot:"Root",overridesResolver:(t,r)=>r.root})({"@media print":{position:"absolute !important"}}),FI=We("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.container,r[`scroll${$e(s.scroll)}`]]}})(({ownerState:t})=>Y({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),LI=We(ua,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.paper,r[`scrollPaper${$e(s.scroll)}`],r[`paperWidth${$e(String(s.maxWidth))}`],s.fullWidth&&r.paperFullWidth,s.fullScreen&&r.paperFullScreen]}})(({theme:t,ownerState:r})=>Y({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},r.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},r.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!r.maxWidth&&{maxWidth:"calc(100% - 64px)"},r.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${M2.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},r.maxWidth&&r.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[r.maxWidth]}${t.breakpoints.unit}`,[`&.${M2.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[r.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},r.fullWidth&&{width:"calc(100% - 64px)"},r.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${M2.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),DI=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiDialog"}),p=Ga(),d={enter:p.transitions.duration.enteringScreen,exit:p.transitions.duration.leavingScreen},{"aria-describedby":b,"aria-labelledby":k,BackdropComponent:y,BackdropProps:_,children:S,className:P,disableEscapeKeyDown:I=!1,fullScreen:L=!1,fullWidth:R=!1,maxWidth:D="sm",onBackdropClick:Z,onClick:F,onClose:O,open:B,PaperComponent:Q=ua,PaperProps:U={},scroll:ee="paper",TransitionComponent:q=sy,transitionDuration:X=d,TransitionProps:me}=u,le=Ke(u,II),he=Y({},u,{disableEscapeKeyDown:I,fullScreen:L,fullWidth:R,maxWidth:D,scroll:ee}),de=RI(he),Ce=J.useRef(),_e=ce=>{Ce.current=ce.target===ce.currentTarget},ge=ce=>{F&&F(ce),Ce.current&&(Ce.current=null,Z&&Z(ce),O&&O(ce,"backdropClick"))},ye=uh(k),ve=J.useMemo(()=>({titleId:ye}),[ye]);return j.jsx(TI,Y({className:et(de.root,P),closeAfterTransition:!0,components:{Backdrop:NI},componentsProps:{backdrop:Y({transitionDuration:X,as:y},_)},disableEscapeKeyDown:I,onClose:O,open:B,ref:s,onClick:ge,ownerState:he},le,{children:j.jsx(q,Y({appear:!0,in:B,timeout:X,role:"presentation"},me,{children:j.jsx(FI,{className:et(de.container),onMouseDown:_e,ownerState:he,children:j.jsx(LI,Y({as:Q,elevation:24,role:"dialog","aria-describedby":b,"aria-labelledby":ye},U,{className:et(de.paper,U.className),ownerState:he,children:j.jsx(fy.Provider,{value:ve,children:S})}))})}))}))}),nd=DI;function OI(t){return kt("MuiDialogActions",t)}vt("MuiDialogActions",["root","spacing"]);const BI=["className","disableSpacing"],jI=t=>{const{classes:r,disableSpacing:s}=t;return wt({root:["root",!s&&"spacing"]},OI,r)},zI=We("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,!s.disableSpacing&&r.spacing]}})(({ownerState:t})=>Y({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),VI=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiDialogActions"}),{className:p,disableSpacing:d=!1}=u,b=Ke(u,BI),k=Y({},u,{disableSpacing:d}),y=jI(k);return j.jsx(zI,Y({className:et(y.root,p),ownerState:k,ref:s},b))}),rd=VI;function WI(t){return kt("MuiDialogContent",t)}vt("MuiDialogContent",["root","dividers"]);function UI(t){return kt("MuiDialogTitle",t)}const HI=vt("MuiDialogTitle",["root"]),GI=HI,QI=["className","dividers"],YI=t=>{const{classes:r,dividers:s}=t;return wt({root:["root",s&&"dividers"]},WI,r)},KI=We("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.dividers&&r.dividers]}})(({theme:t,ownerState:r})=>Y({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},r.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${GI.root} + &`]:{paddingTop:0}})),XI=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiDialogContent"}),{className:p,dividers:d=!1}=u,b=Ke(u,QI),k=Y({},u,{dividers:d}),y=YI(k);return j.jsx(KI,Y({className:et(y.root,p),ownerState:k,ref:s},b))}),od=XI;function qI(t){return kt("MuiDialogContentText",t)}vt("MuiDialogContentText",["root"]);const ZI=["children","className"],JI=t=>{const{classes:r}=t,u=wt({root:["root"]},qI,r);return Y({},r,u)},$I=We(no,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(t,r)=>r.root})({}),eN=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiDialogContentText"}),{className:p}=u,d=Ke(u,ZI),b=JI(d);return j.jsx($I,Y({component:"p",variant:"body1",color:"text.secondary",ref:s,ownerState:d,className:et(b.root,p)},u,{classes:b}))}),tN=eN,nN=["className","id"],rN=t=>{const{classes:r}=t;return wt({root:["root"]},UI,r)},oN=We(no,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,r)=>r.root})({padding:"16px 24px",flex:"0 0 auto"}),iN=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiDialogTitle"}),{className:p,id:d}=u,b=Ke(u,nN),k=u,y=rN(k),{titleId:_=d}=J.useContext(fy);return j.jsx(oN,Y({component:"h2",className:et(y.root,p),ownerState:k,ref:s,variant:"h6",id:d??_},b))}),id=iN;function aN(t){return kt("MuiDivider",t)}const sN=vt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),nv=sN,lN=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],cN=t=>{const{absolute:r,children:s,classes:u,flexItem:p,light:d,orientation:b,textAlign:k,variant:y}=t;return wt({root:["root",r&&"absolute",y,d&&"light",b==="vertical"&&"vertical",p&&"flexItem",s&&"withChildren",s&&b==="vertical"&&"withChildrenVertical",k==="right"&&b!=="vertical"&&"textAlignRight",k==="left"&&b!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",b==="vertical"&&"wrapperVertical"]},aN,u)},uN=We("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.absolute&&r.absolute,r[s.variant],s.light&&r.light,s.orientation==="vertical"&&r.vertical,s.flexItem&&r.flexItem,s.children&&r.withChildren,s.children&&s.orientation==="vertical"&&r.withChildrenVertical,s.textAlign==="right"&&s.orientation!=="vertical"&&r.textAlignRight,s.textAlign==="left"&&s.orientation!=="vertical"&&r.textAlignLeft]}})(({theme:t,ownerState:r})=>Y({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:Mn(t.palette.divider,.08)},r.variant==="inset"&&{marginLeft:72},r.variant==="middle"&&r.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},r.variant==="middle"&&r.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},r.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>Y({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:r})=>Y({},r.children&&r.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}),({theme:t,ownerState:r})=>Y({},r.children&&r.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:t})=>Y({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),fN=We("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.wrapper,s.orientation==="vertical"&&r.wrapperVertical]}})(({theme:t,ownerState:r})=>Y({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},r.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),dy=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiDivider"}),{absolute:p=!1,children:d,className:b,component:k=d?"div":"hr",flexItem:y=!1,light:_=!1,orientation:S="horizontal",role:P=k!=="hr"?"separator":void 0,textAlign:I="center",variant:L="fullWidth"}=u,R=Ke(u,lN),D=Y({},u,{absolute:p,component:k,flexItem:y,light:_,orientation:S,role:P,textAlign:I,variant:L}),Z=cN(D);return j.jsx(uN,Y({as:k,className:et(Z.root,b),role:P,ref:s,ownerState:D},R,{children:d?j.jsx(fN,{className:Z.wrapper,ownerState:D,children:d}):null}))});dy.muiSkipListHighlight=!0;const I2=dy,dN=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function pN(t,r,s){const u=r.getBoundingClientRect(),p=s&&s.getBoundingClientRect(),d=Pi(r);let b;if(r.fakeTransform)b=r.fakeTransform;else{const _=d.getComputedStyle(r);b=_.getPropertyValue("-webkit-transform")||_.getPropertyValue("transform")}let k=0,y=0;if(b&&b!=="none"&&typeof b=="string"){const _=b.split("(")[1].split(")")[0].split(",");k=parseInt(_[4],10),y=parseInt(_[5],10)}return t==="left"?p?`translateX(${p.right+k-u.left}px)`:`translateX(${d.innerWidth+k-u.left}px)`:t==="right"?p?`translateX(-${u.right-p.left-k}px)`:`translateX(-${u.left+u.width-k}px)`:t==="up"?p?`translateY(${p.bottom+y-u.top}px)`:`translateY(${d.innerHeight+y-u.top}px)`:p?`translateY(-${u.top-p.top+u.height-y}px)`:`translateY(-${u.top+u.height-y}px)`}function hN(t){return typeof t=="function"?t():t}function zu(t,r,s){const u=hN(s),p=pN(t,r,u);p&&(r.style.webkitTransform=p,r.style.transform=p)}const mN=J.forwardRef(function(r,s){const u=Ga(),p={enter:u.transitions.easing.easeOut,exit:u.transitions.easing.sharp},d={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{addEndListener:b,appear:k=!0,children:y,container:_,direction:S="down",easing:P=p,in:I,onEnter:L,onEntered:R,onEntering:D,onExit:Z,onExited:F,onExiting:O,style:B,timeout:Q=d,TransitionComponent:U=bh}=r,ee=Ke(r,dN),q=J.useRef(null),X=Wn(y.ref,q,s),me=ce=>we=>{ce&&(we===void 0?ce(q.current):ce(q.current,we))},le=me((ce,we)=>{zu(S,ce,_),yh(ce),L&&L(ce,we)}),he=me((ce,we)=>{const Ne=el({timeout:Q,style:B,easing:P},{mode:"enter"});ce.style.webkitTransition=u.transitions.create("-webkit-transform",Y({},Ne)),ce.style.transition=u.transitions.create("transform",Y({},Ne)),ce.style.webkitTransform="none",ce.style.transform="none",D&&D(ce,we)}),de=me(R),Ce=me(O),_e=me(ce=>{const we=el({timeout:Q,style:B,easing:P},{mode:"exit"});ce.style.webkitTransition=u.transitions.create("-webkit-transform",we),ce.style.transition=u.transitions.create("transform",we),zu(S,ce,_),Z&&Z(ce)}),ge=me(ce=>{ce.style.webkitTransition="",ce.style.transition="",F&&F(ce)}),ye=ce=>{b&&b(q.current,ce)},ve=J.useCallback(()=>{q.current&&zu(S,q.current,_)},[S,_]);return J.useEffect(()=>{if(I||S==="down"||S==="right")return;const ce=ch(()=>{q.current&&zu(S,q.current,_)}),we=Pi(q.current);return we.addEventListener("resize",ce),()=>{ce.clear(),we.removeEventListener("resize",ce)}},[S,I,_]),J.useEffect(()=>{I||ve()},[I,ve]),j.jsx(U,Y({nodeRef:q,onEnter:le,onEntered:de,onEntering:he,onExit:_e,onExited:ge,onExiting:Ce,addEndListener:ye,appear:k,in:I,timeout:Q},ee,{children:(ce,we)=>J.cloneElement(y,Y({ref:X,style:Y({visibility:ce==="exited"&&!I?"hidden":void 0},B,y.props.style)},we))}))}),gN=mN;function bN(t){return kt("MuiDrawer",t)}vt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const vN=["BackdropProps"],kN=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],py=(t,r)=>{const{ownerState:s}=t;return[r.root,(s.variant==="permanent"||s.variant==="persistent")&&r.docked,r.modal]},yN=t=>{const{classes:r,anchor:s,variant:u}=t,p={root:["root"],docked:[(u==="permanent"||u==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$e(s)}`,u!=="temporary"&&`paperAnchorDocked${$e(s)}`]};return wt(p,bN,r)},_N=We(wh,{name:"MuiDrawer",slot:"Root",overridesResolver:py})(({theme:t})=>({zIndex:(t.vars||t).zIndex.drawer})),rv=We("div",{shouldForwardProp:br,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:py})({flex:"0 0 auto"}),wN=We(ua,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.paper,r[`paperAnchor${$e(s.anchor)}`],s.variant!=="temporary"&&r[`paperAnchorDocked${$e(s.anchor)}`]]}})(({theme:t,ownerState:r})=>Y({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},r.anchor==="left"&&{left:0},r.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},r.anchor==="right"&&{right:0},r.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},r.anchor==="left"&&r.variant!=="temporary"&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},r.anchor==="top"&&r.variant!=="temporary"&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},r.anchor==="right"&&r.variant!=="temporary"&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},r.anchor==="bottom"&&r.variant!=="temporary"&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`})),hy={left:"right",right:"left",top:"down",bottom:"up"};function AN(t){return["left","right"].indexOf(t)!==-1}function CN({direction:t},r){return t==="rtl"&&AN(r)?hy[r]:r}const xN=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiDrawer"}),p=Ga(),d=dh(),b={enter:p.transitions.duration.enteringScreen,exit:p.transitions.duration.leavingScreen},{anchor:k="left",BackdropProps:y,children:_,className:S,elevation:P=16,hideBackdrop:I=!1,ModalProps:{BackdropProps:L}={},onClose:R,open:D=!1,PaperProps:Z={},SlideProps:F,TransitionComponent:O=gN,transitionDuration:B=b,variant:Q="temporary"}=u,U=Ke(u.ModalProps,vN),ee=Ke(u,kN),q=J.useRef(!1);J.useEffect(()=>{q.current=!0},[]);const X=CN({direction:d?"rtl":"ltr"},k),le=Y({},u,{anchor:k,elevation:P,open:D,variant:Q},ee),he=yN(le),de=j.jsx(wN,Y({elevation:Q==="temporary"?P:0,square:!0},Z,{className:et(he.paper,Z.className),ownerState:le,children:_}));if(Q==="permanent")return j.jsx(rv,Y({className:et(he.root,he.docked,S),ownerState:le,ref:s},ee,{children:de}));const Ce=j.jsx(O,Y({in:D,direction:hy[X],timeout:B,appear:q.current},F,{children:de}));return Q==="persistent"?j.jsx(rv,Y({className:et(he.root,he.docked,S),ownerState:le,ref:s},ee,{children:Ce})):j.jsx(_N,Y({BackdropProps:Y({},y,L,{transitionDuration:B}),className:et(he.root,he.modal,S),open:D,ownerState:le,onClose:R,hideBackdrop:I,ref:s},ee,U,{children:Ce}))}),SN=xN,EN=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],PN=t=>{const{classes:r,disableUnderline:s}=t,p=wt({root:["root",!s&&"underline"],input:["input"]},YP,r);return Y({},r,p)},MN=We(ed,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[...Jf(t,r),!s.disableUnderline&&r.underline]}})(({theme:t,ownerState:r})=>{var s;const u=t.palette.mode==="light",p=u?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",d=u?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",b=u?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",k=u?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return Y({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:d,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:b,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:d}},[`&.${ka.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:d},[`&.${ka.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:k}},!r.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(s=(t.vars||t).palette[r.color||"primary"])==null?void 0:s.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ka.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ka.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:p}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ka.disabled}, .${ka.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${ka.disabled}:before`]:{borderBottomStyle:"dotted"}},r.startAdornment&&{paddingLeft:12},r.endAdornment&&{paddingRight:12},r.multiline&&Y({padding:"25px 12px 8px"},r.size==="small"&&{paddingTop:21,paddingBottom:4},r.hiddenLabel&&{paddingTop:16,paddingBottom:17},r.hiddenLabel&&r.size==="small"&&{paddingTop:8,paddingBottom:9}))}),IN=We(td,{name:"MuiFilledInput",slot:"Input",overridesResolver:$f})(({theme:t,ownerState:r})=>Y({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},r.size==="small"&&{paddingTop:21,paddingBottom:4},r.hiddenLabel&&{paddingTop:16,paddingBottom:17},r.startAdornment&&{paddingLeft:0},r.endAdornment&&{paddingRight:0},r.hiddenLabel&&r.size==="small"&&{paddingTop:8,paddingBottom:9},r.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),my=J.forwardRef(function(r,s){var u,p,d,b;const k=At({props:r,name:"MuiFilledInput"}),{components:y={},componentsProps:_,fullWidth:S=!1,inputComponent:P="input",multiline:I=!1,slotProps:L,slots:R={},type:D="text"}=k,Z=Ke(k,EN),F=Y({},k,{fullWidth:S,inputComponent:P,multiline:I,type:D}),O=PN(k),B={root:{ownerState:F},input:{ownerState:F}},Q=L??_?Tr(B,L??_):B,U=(u=(p=R.root)!=null?p:y.Root)!=null?u:MN,ee=(d=(b=R.input)!=null?b:y.Input)!=null?d:IN;return j.jsx(_h,Y({slots:{root:U,input:ee},componentsProps:Q,fullWidth:S,inputComponent:P,multiline:I,ref:s,type:D},Z,{classes:O}))});my.muiName="Input";const gy=my;function NN(t){return kt("MuiFormControl",t)}vt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const RN=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],TN=t=>{const{classes:r,margin:s,fullWidth:u}=t,p={root:["root",s!=="none"&&`margin${$e(s)}`,u&&"fullWidth"]};return wt(p,NN,r)},FN=We("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},r)=>Y({},r.root,r[`margin${$e(t.margin)}`],t.fullWidth&&r.fullWidth)})(({ownerState:t})=>Y({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),LN=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiFormControl"}),{children:p,className:d,color:b="primary",component:k="div",disabled:y=!1,error:_=!1,focused:S,fullWidth:P=!1,hiddenLabel:I=!1,margin:L="none",required:R=!1,size:D="medium",variant:Z="outlined"}=u,F=Ke(u,RN),O=Y({},u,{color:b,component:k,disabled:y,error:_,fullWidth:P,hiddenLabel:I,margin:L,required:R,size:D,variant:Z}),B=TN(O),[Q,U]=J.useState(()=>{let Ce=!1;return p&&J.Children.forEach(p,_e=>{if(!l0(_e,["Input","Select"]))return;const ge=l0(_e,["Select"])?_e.props.input:_e;ge&&DP(ge.props)&&(Ce=!0)}),Ce}),[ee,q]=J.useState(()=>{let Ce=!1;return p&&J.Children.forEach(p,_e=>{l0(_e,["Input","Select"])&&(U0(_e.props,!0)||U0(_e.props.inputProps,!0))&&(Ce=!0)}),Ce}),[X,me]=J.useState(!1);y&&X&&me(!1);const le=S!==void 0&&!y?S:X;let he;const de=J.useMemo(()=>({adornedStart:Q,setAdornedStart:U,color:b,disabled:y,error:_,filled:ee,focused:le,fullWidth:P,hiddenLabel:I,size:D,onBlur:()=>{me(!1)},onEmpty:()=>{q(!1)},onFilled:()=>{q(!0)},onFocus:()=>{me(!0)},registerEffect:he,required:R,variant:Z}),[Q,b,y,_,ee,le,P,I,he,R,D,Z]);return j.jsx(Zf.Provider,{value:de,children:j.jsx(FN,Y({as:k,ownerState:O,className:et(B.root,d),ref:s},F,{children:p}))})}),Ah=LN,DN=rE({createStyledComponent:We("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,r)=>r.root}),useThemeProps:t=>At({props:t,name:"MuiStack"})}),mi=DN;function ON(t){return kt("MuiFormControlLabel",t)}const BN=vt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),Kl=BN,jN=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],zN=t=>{const{classes:r,disabled:s,labelPlacement:u,error:p,required:d}=t,b={root:["root",s&&"disabled",`labelPlacement${$e(u)}`,p&&"error",d&&"required"],label:["label",s&&"disabled"],asterisk:["asterisk",p&&"error"]};return wt(b,ON,r)},VN=We("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[{[`& .${Kl.label}`]:r.label},r.root,r[`labelPlacement${$e(s.labelPlacement)}`]]}})(({theme:t,ownerState:r})=>Y({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Kl.disabled}`]:{cursor:"default"}},r.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},r.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},r.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${Kl.label}`]:{[`&.${Kl.disabled}`]:{color:(t.vars||t).palette.text.disabled}}})),WN=We("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(t,r)=>r.asterisk})(({theme:t})=>({[`&.${Kl.error}`]:{color:(t.vars||t).palette.error.main}})),UN=J.forwardRef(function(r,s){var u,p;const d=At({props:r,name:"MuiFormControlLabel"}),{className:b,componentsProps:k={},control:y,disabled:_,disableTypography:S,label:P,labelPlacement:I="end",required:L,slotProps:R={}}=d,D=Ke(d,jN),Z=si(),F=(u=_??y.props.disabled)!=null?u:Z==null?void 0:Z.disabled,O=L??y.props.required,B={disabled:F,required:O};["checked","name","onChange","value","inputRef"].forEach(me=>{typeof y.props[me]>"u"&&typeof d[me]<"u"&&(B[me]=d[me])});const Q=fa({props:d,muiFormControl:Z,states:["error"]}),U=Y({},d,{disabled:F,labelPlacement:I,required:O,error:Q.error}),ee=zN(U),q=(p=R.typography)!=null?p:k.typography;let X=P;return X!=null&&X.type!==no&&!S&&(X=j.jsx(no,Y({component:"span"},q,{className:et(ee.label,q==null?void 0:q.className),children:X}))),j.jsxs(VN,Y({className:et(ee.root,b),ownerState:U,ref:s},D,{children:[J.cloneElement(y,B),O?j.jsxs(mi,{display:"block",children:[X,j.jsxs(WN,{ownerState:U,"aria-hidden":!0,className:ee.asterisk,children:[" ","*"]})]}):X]}))}),by=UN;function HN(t){return kt("MuiFormGroup",t)}vt("MuiFormGroup",["root","row","error"]);const GN=["className","row"],QN=t=>{const{classes:r,row:s,error:u}=t;return wt({root:["root",s&&"row",u&&"error"]},HN,r)},YN=We("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.row&&r.row]}})(({ownerState:t})=>Y({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})),KN=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiFormGroup"}),{className:p,row:d=!1}=u,b=Ke(u,GN),k=si(),y=fa({props:u,muiFormControl:k,states:["error"]}),_=Y({},u,{row:d,error:y.error}),S=QN(_);return j.jsx(YN,Y({className:et(S.root,p),ownerState:_,ref:s},b))}),XN=KN;function qN(t){return kt("MuiFormHelperText",t)}const ZN=vt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),ov=ZN;var iv;const JN=["children","className","component","disabled","error","filled","focused","margin","required","variant"],$N=t=>{const{classes:r,contained:s,size:u,disabled:p,error:d,filled:b,focused:k,required:y}=t,_={root:["root",p&&"disabled",d&&"error",u&&`size${$e(u)}`,s&&"contained",k&&"focused",b&&"filled",y&&"required"]};return wt(_,qN,r)},eR=We("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.size&&r[`size${$e(s.size)}`],s.contained&&r.contained,s.filled&&r.filled]}})(({theme:t,ownerState:r})=>Y({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${ov.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${ov.error}`]:{color:(t.vars||t).palette.error.main}},r.size==="small"&&{marginTop:4},r.contained&&{marginLeft:14,marginRight:14})),tR=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiFormHelperText"}),{children:p,className:d,component:b="p"}=u,k=Ke(u,JN),y=si(),_=fa({props:u,muiFormControl:y,states:["variant","size","disabled","error","filled","focused","required"]}),S=Y({},u,{component:b,contained:_.variant==="filled"||_.variant==="outlined",variant:_.variant,size:_.size,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required}),P=$N(S);return j.jsx(eR,Y({as:b,ownerState:S,className:et(P.root,d),ref:s},k,{children:p===" "?iv||(iv=j.jsx("span",{className:"notranslate",children:"​"})):p}))}),nR=tR;function rR(t){return kt("MuiFormLabel",t)}const oR=vt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),ac=oR,iR=["children","className","color","component","disabled","error","filled","focused","required"],aR=t=>{const{classes:r,color:s,focused:u,disabled:p,error:d,filled:b,required:k}=t,y={root:["root",`color${$e(s)}`,p&&"disabled",d&&"error",b&&"filled",u&&"focused",k&&"required"],asterisk:["asterisk",d&&"error"]};return wt(y,rR,r)},sR=We("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},r)=>Y({},r.root,t.color==="secondary"&&r.colorSecondary,t.filled&&r.filled)})(({theme:t,ownerState:r})=>Y({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${ac.focused}`]:{color:(t.vars||t).palette[r.color].main},[`&.${ac.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${ac.error}`]:{color:(t.vars||t).palette.error.main}})),lR=We("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,r)=>r.asterisk})(({theme:t})=>({[`&.${ac.error}`]:{color:(t.vars||t).palette.error.main}})),cR=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiFormLabel"}),{children:p,className:d,component:b="label"}=u,k=Ke(u,iR),y=si(),_=fa({props:u,muiFormControl:y,states:["color","required","focused","disabled","error","filled"]}),S=Y({},u,{color:_.color||"primary",component:b,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required}),P=aR(S);return j.jsxs(sR,Y({as:b,ownerState:S,className:et(P.root,d),ref:s},k,{children:[p,_.required&&j.jsxs(lR,{ownerState:S,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]}))}),uR=cR,fR=J.createContext(),av=fR;function dR(t){return kt("MuiGrid",t)}const pR=[0,1,2,3,4,5,6,7,8,9,10],hR=["column-reverse","column","row-reverse","row"],mR=["nowrap","wrap-reverse","wrap"],Bl=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Nc=vt("MuiGrid",["root","container","item","zeroMinWidth",...pR.map(t=>`spacing-xs-${t}`),...hR.map(t=>`direction-xs-${t}`),...mR.map(t=>`wrap-xs-${t}`),...Bl.map(t=>`grid-xs-${t}`),...Bl.map(t=>`grid-sm-${t}`),...Bl.map(t=>`grid-md-${t}`),...Bl.map(t=>`grid-lg-${t}`),...Bl.map(t=>`grid-xl-${t}`)]),gR=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Hs(t){const r=parseFloat(t);return`${r}${String(t).replace(String(r),"")||"px"}`}function bR({theme:t,ownerState:r}){let s;return t.breakpoints.keys.reduce((u,p)=>{let d={};if(r[p]&&(s=r[p]),!s)return u;if(s===!0)d={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(s==="auto")d={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const b=Ia({values:r.columns,breakpoints:t.breakpoints.values}),k=typeof b=="object"?b[p]:b;if(k==null)return u;const y=`${Math.round(s/k*1e8)/1e6}%`;let _={};if(r.container&&r.item&&r.columnSpacing!==0){const S=t.spacing(r.columnSpacing);if(S!=="0px"){const P=`calc(${y} + ${Hs(S)})`;_={flexBasis:P,maxWidth:P}}}d=Y({flexBasis:y,flexGrow:0,maxWidth:y},_)}return t.breakpoints.values[p]===0?Object.assign(u,d):u[t.breakpoints.up(p)]=d,u},{})}function vR({theme:t,ownerState:r}){const s=Ia({values:r.direction,breakpoints:t.breakpoints.values});return Xr({theme:t},s,u=>{const p={flexDirection:u};return u.indexOf("column")===0&&(p[`& > .${Nc.item}`]={maxWidth:"none"}),p})}function vy({breakpoints:t,values:r}){let s="";Object.keys(r).forEach(p=>{s===""&&r[p]!==0&&(s=p)});const u=Object.keys(t).sort((p,d)=>t[p]-t[d]);return u.slice(0,u.indexOf(s))}function kR({theme:t,ownerState:r}){const{container:s,rowSpacing:u}=r;let p={};if(s&&u!==0){const d=Ia({values:u,breakpoints:t.breakpoints.values});let b;typeof d=="object"&&(b=vy({breakpoints:t.breakpoints.values,values:d})),p=Xr({theme:t},d,(k,y)=>{var _;const S=t.spacing(k);return S!=="0px"?{marginTop:`-${Hs(S)}`,[`& > .${Nc.item}`]:{paddingTop:Hs(S)}}:(_=b)!=null&&_.includes(y)?{}:{marginTop:0,[`& > .${Nc.item}`]:{paddingTop:0}}})}return p}function yR({theme:t,ownerState:r}){const{container:s,columnSpacing:u}=r;let p={};if(s&&u!==0){const d=Ia({values:u,breakpoints:t.breakpoints.values});let b;typeof d=="object"&&(b=vy({breakpoints:t.breakpoints.values,values:d})),p=Xr({theme:t},d,(k,y)=>{var _;const S=t.spacing(k);return S!=="0px"?{width:`calc(100% + ${Hs(S)})`,marginLeft:`-${Hs(S)}`,[`& > .${Nc.item}`]:{paddingLeft:Hs(S)}}:(_=b)!=null&&_.includes(y)?{}:{width:"100%",marginLeft:0,[`& > .${Nc.item}`]:{paddingLeft:0}}})}return p}function _R(t,r,s={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[s[`spacing-xs-${String(t)}`]];const u=[];return r.forEach(p=>{const d=t[p];Number(d)>0&&u.push(s[`spacing-${p}-${String(d)}`])}),u}const wR=We("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t,{container:u,direction:p,item:d,spacing:b,wrap:k,zeroMinWidth:y,breakpoints:_}=s;let S=[];u&&(S=_R(b,_,r));const P=[];return _.forEach(I=>{const L=s[I];L&&P.push(r[`grid-${I}-${String(L)}`])}),[r.root,u&&r.container,d&&r.item,y&&r.zeroMinWidth,...S,p!=="row"&&r[`direction-xs-${String(p)}`],k!=="wrap"&&r[`wrap-xs-${String(k)}`],...P]}})(({ownerState:t})=>Y({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),vR,kR,yR,bR);function AR(t,r){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const s=[];return r.forEach(u=>{const p=t[u];if(Number(p)>0){const d=`spacing-${u}-${String(p)}`;s.push(d)}}),s}const CR=t=>{const{classes:r,container:s,direction:u,item:p,spacing:d,wrap:b,zeroMinWidth:k,breakpoints:y}=t;let _=[];s&&(_=AR(d,y));const S=[];y.forEach(I=>{const L=t[I];L&&S.push(`grid-${I}-${String(L)}`)});const P={root:["root",s&&"container",p&&"item",k&&"zeroMinWidth",..._,u!=="row"&&`direction-xs-${String(u)}`,b!=="wrap"&&`wrap-xs-${String(b)}`,...S]};return wt(P,dR,r)},xR=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiGrid"}),{breakpoints:p}=Ga(),d=Uc(u),{className:b,columns:k,columnSpacing:y,component:_="div",container:S=!1,direction:P="row",item:I=!1,rowSpacing:L,spacing:R=0,wrap:D="wrap",zeroMinWidth:Z=!1}=d,F=Ke(d,gR),O=L||R,B=y||R,Q=J.useContext(av),U=S?k||12:Q,ee={},q=Y({},F);p.keys.forEach(le=>{F[le]!=null&&(ee[le]=F[le],delete q[le])});const X=Y({},d,{columns:U,container:S,direction:P,item:I,rowSpacing:O,columnSpacing:B,wrap:D,zeroMinWidth:Z,spacing:R},ee,{breakpoints:p.keys}),me=CR(X);return j.jsx(av.Provider,{value:U,children:j.jsx(wR,Y({ownerState:X,className:et(me.root,b),as:_,ref:s},q))})}),f0=xR,SR=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Vp(t){return`scale(${t}, ${t**2})`}const ER={entering:{opacity:1,transform:Vp(1)},entered:{opacity:1,transform:"none"}},N2=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),ky=J.forwardRef(function(r,s){const{addEndListener:u,appear:p=!0,children:d,easing:b,in:k,onEnter:y,onEntered:_,onEntering:S,onExit:P,onExited:I,onExiting:L,style:R,timeout:D="auto",TransitionComponent:Z=bh}=r,F=Ke(r,SR),O=fh(),B=J.useRef(),Q=Ga(),U=J.useRef(null),ee=Wn(U,d.ref,s),q=ge=>ye=>{if(ge){const ve=U.current;ye===void 0?ge(ve):ge(ve,ye)}},X=q(S),me=q((ge,ye)=>{yh(ge);const{duration:ve,delay:ce,easing:we}=el({style:R,timeout:D,easing:b},{mode:"enter"});let Ne;D==="auto"?(Ne=Q.transitions.getAutoHeightDuration(ge.clientHeight),B.current=Ne):Ne=ve,ge.style.transition=[Q.transitions.create("opacity",{duration:Ne,delay:ce}),Q.transitions.create("transform",{duration:N2?Ne:Ne*.666,delay:ce,easing:we})].join(","),y&&y(ge,ye)}),le=q(_),he=q(L),de=q(ge=>{const{duration:ye,delay:ve,easing:ce}=el({style:R,timeout:D,easing:b},{mode:"exit"});let we;D==="auto"?(we=Q.transitions.getAutoHeightDuration(ge.clientHeight),B.current=we):we=ye,ge.style.transition=[Q.transitions.create("opacity",{duration:we,delay:ve}),Q.transitions.create("transform",{duration:N2?we:we*.666,delay:N2?ve:ve||we*.333,easing:ce})].join(","),ge.style.opacity=0,ge.style.transform=Vp(.75),P&&P(ge)}),Ce=q(I),_e=ge=>{D==="auto"&&O.start(B.current||0,ge),u&&u(U.current,ge)};return j.jsx(Z,Y({appear:p,in:k,nodeRef:U,onEnter:me,onEntered:le,onEntering:X,onExit:de,onExited:Ce,onExiting:he,addEndListener:_e,timeout:D==="auto"?null:D},F,{children:(ge,ye)=>J.cloneElement(d,Y({style:Y({opacity:0,transform:Vp(.75),visibility:ge==="exited"&&!k?"hidden":void 0},ER[ge],R,d.props.style),ref:ee},ye))}))});ky.muiSupportAuto=!0;const yy=ky,PR=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],MR=t=>{const{classes:r,disableUnderline:s}=t,p=wt({root:["root",!s&&"underline"],input:["input"]},UP,r);return Y({},r,p)},IR=We(ed,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[...Jf(t,r),!s.disableUnderline&&r.underline]}})(({theme:t,ownerState:r})=>{let u=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(u=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),Y({position:"relative"},r.formControl&&{"label + &":{marginTop:16}},!r.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ol.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ol.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${u}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ol.disabled}, .${Ol.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${u}`}},[`&.${Ol.disabled}:before`]:{borderBottomStyle:"dotted"}})}),NR=We(td,{name:"MuiInput",slot:"Input",overridesResolver:$f})({}),_y=J.forwardRef(function(r,s){var u,p,d,b;const k=At({props:r,name:"MuiInput"}),{disableUnderline:y,components:_={},componentsProps:S,fullWidth:P=!1,inputComponent:I="input",multiline:L=!1,slotProps:R,slots:D={},type:Z="text"}=k,F=Ke(k,PR),O=MR(k),Q={root:{ownerState:{disableUnderline:y}}},U=R??S?Tr(R??S,Q):Q,ee=(u=(p=D.root)!=null?p:_.Root)!=null?u:IR,q=(d=(b=D.input)!=null?b:_.Input)!=null?d:NR;return j.jsx(_h,Y({slots:{root:ee,input:q},slotProps:U,fullWidth:P,inputComponent:I,multiline:L,ref:s,type:Z},F,{classes:O}))});_y.muiName="Input";const wy=_y;function RR(t){return kt("MuiInputAdornment",t)}const TR=vt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),sv=TR;var lv;const FR=["children","className","component","disablePointerEvents","disableTypography","position","variant"],LR=(t,r)=>{const{ownerState:s}=t;return[r.root,r[`position${$e(s.position)}`],s.disablePointerEvents===!0&&r.disablePointerEvents,r[s.variant]]},DR=t=>{const{classes:r,disablePointerEvents:s,hiddenLabel:u,position:p,size:d,variant:b}=t,k={root:["root",s&&"disablePointerEvents",p&&`position${$e(p)}`,b,u&&"hiddenLabel",d&&`size${$e(d)}`]};return wt(k,RR,r)},OR=We("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:LR})(({theme:t,ownerState:r})=>Y({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},r.variant==="filled"&&{[`&.${sv.positionStart}&:not(.${sv.hiddenLabel})`]:{marginTop:16}},r.position==="start"&&{marginRight:8},r.position==="end"&&{marginLeft:8},r.disablePointerEvents===!0&&{pointerEvents:"none"})),BR=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiInputAdornment"}),{children:p,className:d,component:b="div",disablePointerEvents:k=!1,disableTypography:y=!1,position:_,variant:S}=u,P=Ke(u,FR),I=si()||{};let L=S;S&&I.variant,I&&!L&&(L=I.variant);const R=Y({},u,{hiddenLabel:I.hiddenLabel,size:I.size,disablePointerEvents:k,position:_,variant:L}),D=DR(R);return j.jsx(Zf.Provider,{value:null,children:j.jsx(OR,Y({as:b,ownerState:R,className:et(D.root,d),ref:s},P,{children:typeof p=="string"&&!y?j.jsx(no,{color:"text.secondary",children:p}):j.jsxs(J.Fragment,{children:[_==="start"?lv||(lv=j.jsx("span",{className:"notranslate",children:"​"})):null,p]})}))})}),jR=BR;function zR(t){return kt("MuiInputLabel",t)}vt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const VR=["disableAnimation","margin","shrink","variant","className"],WR=t=>{const{classes:r,formControl:s,size:u,shrink:p,disableAnimation:d,variant:b,required:k}=t,y={root:["root",s&&"formControl",!d&&"animated",p&&"shrink",u&&u!=="normal"&&`size${$e(u)}`,b],asterisk:[k&&"asterisk"]},_=wt(y,zR,r);return Y({},r,_)},UR=We(uR,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[{[`& .${ac.asterisk}`]:r.asterisk},r.root,s.formControl&&r.formControl,s.size==="small"&&r.sizeSmall,s.shrink&&r.shrink,!s.disableAnimation&&r.animated,s.focused&&r.focused,r[s.variant]]}})(({theme:t,ownerState:r})=>Y({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},r.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},r.size==="small"&&{transform:"translate(0, 17px) scale(1)"},r.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!r.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},r.variant==="filled"&&Y({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},r.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},r.shrink&&Y({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},r.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),r.variant==="outlined"&&Y({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},r.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},r.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),HR=J.forwardRef(function(r,s){const u=At({name:"MuiInputLabel",props:r}),{disableAnimation:p=!1,shrink:d,className:b}=u,k=Ke(u,VR),y=si();let _=d;typeof _>"u"&&y&&(_=y.filled||y.focused||y.adornedStart);const S=fa({props:u,muiFormControl:y,states:["size","variant","required","focused"]}),P=Y({},u,{disableAnimation:p,formControl:y,shrink:_,size:S.size,variant:S.variant,required:S.required,focused:S.focused}),I=WR(P);return j.jsx(UR,Y({"data-shrink":_,ownerState:P,ref:s,className:et(I.root,b)},k,{classes:I}))}),Ay=HR,GR=J.createContext({}),ii=GR;function QR(t){return kt("MuiList",t)}vt("MuiList",["root","padding","dense","subheader"]);const YR=["children","className","component","dense","disablePadding","subheader"],KR=t=>{const{classes:r,disablePadding:s,dense:u,subheader:p}=t;return wt({root:["root",!s&&"padding",u&&"dense",p&&"subheader"]},QR,r)},XR=We("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,!s.disablePadding&&r.padding,s.dense&&r.dense,s.subheader&&r.subheader]}})(({ownerState:t})=>Y({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),qR=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiList"}),{children:p,className:d,component:b="ul",dense:k=!1,disablePadding:y=!1,subheader:_}=u,S=Ke(u,YR),P=J.useMemo(()=>({dense:k}),[k]),I=Y({},u,{component:b,dense:k,disablePadding:y}),L=KR(I);return j.jsx(ii.Provider,{value:P,children:j.jsxs(XR,Y({as:b,className:et(L.root,d),ref:s,ownerState:I},S,{children:[_,p]}))})}),Cy=qR;function ZR(t){return kt("MuiListItem",t)}const JR=vt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),_s=JR;function $R(t){return kt("MuiListItemButton",t)}const eT=vt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),ws=eT,tT=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],nT=(t,r)=>{const{ownerState:s}=t;return[r.root,s.dense&&r.dense,s.alignItems==="flex-start"&&r.alignItemsFlexStart,s.divider&&r.divider,!s.disableGutters&&r.gutters]},rT=t=>{const{alignItems:r,classes:s,dense:u,disabled:p,disableGutters:d,divider:b,selected:k}=t,_=wt({root:["root",u&&"dense",!d&&"gutters",b&&"divider",p&&"disabled",r==="flex-start"&&"alignItemsFlexStart",k&&"selected"]},$R,s);return Y({},s,_)},oT=We(fl,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:nT})(({theme:t,ownerState:r})=>Y({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ws.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${ws.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${ws.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${ws.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${ws.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},r.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},r.alignItems==="flex-start"&&{alignItems:"flex-start"},!r.disableGutters&&{paddingLeft:16,paddingRight:16},r.dense&&{paddingTop:4,paddingBottom:4})),iT=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiListItemButton"}),{alignItems:p="center",autoFocus:d=!1,component:b="div",children:k,dense:y=!1,disableGutters:_=!1,divider:S=!1,focusVisibleClassName:P,selected:I=!1,className:L}=u,R=Ke(u,tT),D=J.useContext(ii),Z=J.useMemo(()=>({dense:y||D.dense||!1,alignItems:p,disableGutters:_}),[p,D.dense,y,_]),F=J.useRef(null);xo(()=>{d&&F.current&&F.current.focus()},[d]);const O=Y({},u,{alignItems:p,dense:Z.dense,disableGutters:_,divider:S,selected:I}),B=rT(O),Q=Wn(F,s);return j.jsx(ii.Provider,{value:Z,children:j.jsx(oT,Y({ref:Q,href:R.href||R.to,component:(R.href||R.to)&&b==="div"?"button":b,focusVisibleClassName:et(B.focusVisible,P),ownerState:O,className:et(B.root,L)},R,{classes:B,children:k}))})}),cv=iT;function aT(t){return kt("MuiListItemSecondaryAction",t)}vt("MuiListItemSecondaryAction",["root","disableGutters"]);const sT=["className"],lT=t=>{const{disableGutters:r,classes:s}=t;return wt({root:["root",r&&"disableGutters"]},aT,s)},cT=We("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.disableGutters&&r.disableGutters]}})(({ownerState:t})=>Y({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),xy=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiListItemSecondaryAction"}),{className:p}=u,d=Ke(u,sT),b=J.useContext(ii),k=Y({},u,{disableGutters:b.disableGutters}),y=lT(k);return j.jsx(cT,Y({className:et(y.root,p),ownerState:k,ref:s},d))});xy.muiName="ListItemSecondaryAction";const uT=xy,fT=["className"],dT=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],pT=(t,r)=>{const{ownerState:s}=t;return[r.root,s.dense&&r.dense,s.alignItems==="flex-start"&&r.alignItemsFlexStart,s.divider&&r.divider,!s.disableGutters&&r.gutters,!s.disablePadding&&r.padding,s.button&&r.button,s.hasSecondaryAction&&r.secondaryAction]},hT=t=>{const{alignItems:r,button:s,classes:u,dense:p,disabled:d,disableGutters:b,disablePadding:k,divider:y,hasSecondaryAction:_,selected:S}=t;return wt({root:["root",p&&"dense",!b&&"gutters",!k&&"padding",y&&"divider",d&&"disabled",s&&"button",r==="flex-start"&&"alignItemsFlexStart",_&&"secondaryAction",S&&"selected"],container:["container"]},ZR,u)},mT=We("div",{name:"MuiListItem",slot:"Root",overridesResolver:pT})(({theme:t,ownerState:r})=>Y({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!r.disablePadding&&Y({paddingTop:8,paddingBottom:8},r.dense&&{paddingTop:4,paddingBottom:4},!r.disableGutters&&{paddingLeft:16,paddingRight:16},!!r.secondaryAction&&{paddingRight:48}),!!r.secondaryAction&&{[`& > .${ws.root}`]:{paddingRight:48}},{[`&.${_s.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${_s.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${_s.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${_s.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},r.alignItems==="flex-start"&&{alignItems:"flex-start"},r.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},r.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${_s.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity)}}},r.hasSecondaryAction&&{paddingRight:48})),gT=We("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,r)=>r.container})({position:"relative"}),bT=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiListItem"}),{alignItems:p="center",autoFocus:d=!1,button:b=!1,children:k,className:y,component:_,components:S={},componentsProps:P={},ContainerComponent:I="li",ContainerProps:{className:L}={},dense:R=!1,disabled:D=!1,disableGutters:Z=!1,disablePadding:F=!1,divider:O=!1,focusVisibleClassName:B,secondaryAction:Q,selected:U=!1,slotProps:ee={},slots:q={}}=u,X=Ke(u.ContainerProps,fT),me=Ke(u,dT),le=J.useContext(ii),he=J.useMemo(()=>({dense:R||le.dense||!1,alignItems:p,disableGutters:Z}),[p,le.dense,R,Z]),de=J.useRef(null);xo(()=>{d&&de.current&&de.current.focus()},[d]);const Ce=J.Children.toArray(k),_e=Ce.length&&l0(Ce[Ce.length-1],["ListItemSecondaryAction"]),ge=Y({},u,{alignItems:p,autoFocus:d,button:b,dense:he.dense,disabled:D,disableGutters:Z,disablePadding:F,divider:O,hasSecondaryAction:_e,selected:U}),ye=hT(ge),ve=Wn(de,s),ce=q.root||S.Root||mT,we=ee.root||P.root||{},Ne=Y({className:et(ye.root,we.className,y),disabled:D},me);let Ae=_||"li";return b&&(Ne.component=_||"div",Ne.focusVisibleClassName=et(_s.focusVisible,B),Ae=fl),_e?(Ae=!Ne.component&&!_?"div":Ae,I==="li"&&(Ae==="li"?Ae="div":Ne.component==="li"&&(Ne.component="div")),j.jsx(ii.Provider,{value:he,children:j.jsxs(gT,Y({as:I,className:et(ye.container,L),ref:ve,ownerState:ge},X,{children:[j.jsx(ce,Y({},we,!oi(ce)&&{as:Ae,ownerState:Y({},ge,we.ownerState)},Ne,{children:Ce})),Ce.pop()]}))})):j.jsx(ii.Provider,{value:he,children:j.jsxs(ce,Y({},we,{as:Ae,ref:ve},!oi(ce)&&{ownerState:Y({},ge,we.ownerState)},Ne,{children:[Ce,Q&&j.jsx(uT,{children:Q})]}))})}),uv=bT,vT=vt("MuiListItemIcon",["root","alignItemsFlexStart"]),fv=vT;function kT(t){return kt("MuiListItemText",t)}const yT=vt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),H0=yT,_T=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],wT=t=>{const{classes:r,inset:s,primary:u,secondary:p,dense:d}=t;return wt({root:["root",s&&"inset",d&&"dense",u&&p&&"multiline"],primary:["primary"],secondary:["secondary"]},kT,r)},AT=We("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[{[`& .${H0.primary}`]:r.primary},{[`& .${H0.secondary}`]:r.secondary},r.root,s.inset&&r.inset,s.primary&&s.secondary&&r.multiline,s.dense&&r.dense]}})(({ownerState:t})=>Y({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),CT=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiListItemText"}),{children:p,className:d,disableTypography:b=!1,inset:k=!1,primary:y,primaryTypographyProps:_,secondary:S,secondaryTypographyProps:P}=u,I=Ke(u,_T),{dense:L}=J.useContext(ii);let R=y??p,D=S;const Z=Y({},u,{disableTypography:b,inset:k,primary:!!R,secondary:!!D,dense:L}),F=wT(Z);return R!=null&&R.type!==no&&!b&&(R=j.jsx(no,Y({variant:L?"body2":"body1",className:F.primary,component:_!=null&&_.variant?void 0:"span",display:"block"},_,{children:R}))),D!=null&&D.type!==no&&!b&&(D=j.jsx(no,Y({variant:"body2",className:F.secondary,color:"text.secondary",display:"block"},P,{children:D}))),j.jsxs(AT,Y({className:et(F.root,d),ownerState:Z,ref:s},I,{children:[R,D]}))}),dv=CT,xT=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function R2(t,r,s){return t===r?t.firstChild:r&&r.nextElementSibling?r.nextElementSibling:s?null:t.firstChild}function pv(t,r,s){return t===r?s?t.firstChild:t.lastChild:r&&r.previousElementSibling?r.previousElementSibling:s?null:t.lastChild}function Sy(t,r){if(r===void 0)return!0;let s=t.innerText;return s===void 0&&(s=t.textContent),s=s.trim().toLowerCase(),s.length===0?!1:r.repeating?s[0]===r.keys[0]:s.indexOf(r.keys.join(""))===0}function jl(t,r,s,u,p,d){let b=!1,k=p(t,r,r?s:!1);for(;k;){if(k===t.firstChild){if(b)return!1;b=!0}const y=u?!1:k.disabled||k.getAttribute("aria-disabled")==="true";if(!k.hasAttribute("tabindex")||!Sy(k,d)||y)k=p(t,k,s);else return k.focus(),!0}return!1}const ST=J.forwardRef(function(r,s){const{actions:u,autoFocus:p=!1,autoFocusItem:d=!1,children:b,className:k,disabledItemsFocusable:y=!1,disableListWrap:_=!1,onKeyDown:S,variant:P="selectedMenu"}=r,I=Ke(r,xT),L=J.useRef(null),R=J.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});xo(()=>{p&&L.current.focus()},[p]),J.useImperativeHandle(u,()=>({adjustStyleForScrollbar:(B,{direction:Q})=>{const U=!L.current.style.width;if(B.clientHeight{const Q=L.current,U=B.key,ee=Zn(Q).activeElement;if(U==="ArrowDown")B.preventDefault(),jl(Q,ee,_,y,R2);else if(U==="ArrowUp")B.preventDefault(),jl(Q,ee,_,y,pv);else if(U==="Home")B.preventDefault(),jl(Q,null,_,y,R2);else if(U==="End")B.preventDefault(),jl(Q,null,_,y,pv);else if(U.length===1){const q=R.current,X=U.toLowerCase(),me=performance.now();q.keys.length>0&&(me-q.lastTime>500?(q.keys=[],q.repeating=!0,q.previousKeyMatched=!0):q.repeating&&X!==q.keys[0]&&(q.repeating=!1)),q.lastTime=me,q.keys.push(X);const le=ee&&!q.repeating&&Sy(ee,q);q.previousKeyMatched&&(le||jl(Q,ee,!1,y,R2,q))?B.preventDefault():q.previousKeyMatched=!1}S&&S(B)},Z=Wn(L,s);let F=-1;J.Children.forEach(b,(B,Q)=>{if(!J.isValidElement(B)){F===Q&&(F+=1,F>=b.length&&(F=-1));return}B.props.disabled||(P==="selectedMenu"&&B.props.selected||F===-1)&&(F=Q),F===Q&&(B.props.disabled||B.props.muiSkipListHighlight||B.type.muiSkipListHighlight)&&(F+=1,F>=b.length&&(F=-1))});const O=J.Children.map(b,(B,Q)=>{if(Q===F){const U={};return d&&(U.autoFocus=!0),B.props.tabIndex===void 0&&P==="selectedMenu"&&(U.tabIndex=0),J.cloneElement(B,U)}return B});return j.jsx(Cy,Y({role:"menu",ref:Z,className:k,onKeyDown:D,tabIndex:p?0:-1},I,{children:O}))}),ET=ST;function PT(t){return kt("MuiPopover",t)}vt("MuiPopover",["root","paper"]);const MT=["onEntering"],IT=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],NT=["slotProps"];function hv(t,r){let s=0;return typeof r=="number"?s=r:r==="center"?s=t.height/2:r==="bottom"&&(s=t.height),s}function mv(t,r){let s=0;return typeof r=="number"?s=r:r==="center"?s=t.width/2:r==="right"&&(s=t.width),s}function gv(t){return[t.horizontal,t.vertical].map(r=>typeof r=="number"?`${r}px`:r).join(" ")}function T2(t){return typeof t=="function"?t():t}const RT=t=>{const{classes:r}=t;return wt({root:["root"],paper:["paper"]},PT,r)},TT=We(wh,{name:"MuiPopover",slot:"Root",overridesResolver:(t,r)=>r.root})({}),Ey=We(ua,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,r)=>r.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),FT=J.forwardRef(function(r,s){var u,p,d;const b=At({props:r,name:"MuiPopover"}),{action:k,anchorEl:y,anchorOrigin:_={vertical:"top",horizontal:"left"},anchorPosition:S,anchorReference:P="anchorEl",children:I,className:L,container:R,elevation:D=8,marginThreshold:Z=16,open:F,PaperProps:O={},slots:B,slotProps:Q,transformOrigin:U={vertical:"top",horizontal:"left"},TransitionComponent:ee=yy,transitionDuration:q="auto",TransitionProps:{onEntering:X}={},disableScrollLock:me=!1}=b,le=Ke(b.TransitionProps,MT),he=Ke(b,IT),de=(u=Q==null?void 0:Q.paper)!=null?u:O,Ce=J.useRef(),_e=Wn(Ce,de.ref),ge=Y({},b,{anchorOrigin:_,anchorReference:P,elevation:D,marginThreshold:Z,externalPaperSlotProps:de,transformOrigin:U,TransitionComponent:ee,transitionDuration:q,TransitionProps:le}),ye=RT(ge),ve=J.useCallback(()=>{if(P==="anchorPosition")return S;const Ct=T2(y),dt=(Ct&&Ct.nodeType===1?Ct:Zn(Ce.current).body).getBoundingClientRect();return{top:dt.top+hv(dt,_.vertical),left:dt.left+mv(dt,_.horizontal)}},[y,_.horizontal,_.vertical,S,P]),ce=J.useCallback(Ct=>({vertical:hv(Ct,U.vertical),horizontal:mv(Ct,U.horizontal)}),[U.horizontal,U.vertical]),we=J.useCallback(Ct=>{const pt={width:Ct.offsetWidth,height:Ct.offsetHeight},dt=ce(pt);if(P==="none")return{top:null,left:null,transformOrigin:gv(dt)};const Jt=ve();let yn=Jt.top-dt.vertical,ut=Jt.left-dt.horizontal;const $n=yn+pt.height,Qt=ut+pt.width,Yt=Pi(T2(y)),Sr=Yt.innerHeight-Z,Kn=Yt.innerWidth-Z;if(Z!==null&&ynSr){const $t=$n-Sr;yn-=$t,dt.vertical+=$t}if(Z!==null&&utKn){const $t=Qt-Kn;ut-=$t,dt.horizontal+=$t}return{top:`${Math.round(yn)}px`,left:`${Math.round(ut)}px`,transformOrigin:gv(dt)}},[y,P,ve,ce,Z]),[Ne,Ae]=J.useState(F),Pe=J.useCallback(()=>{const Ct=Ce.current;if(!Ct)return;const pt=we(Ct);pt.top!==null&&(Ct.style.top=pt.top),pt.left!==null&&(Ct.style.left=pt.left),Ct.style.transformOrigin=pt.transformOrigin,Ae(!0)},[we]);J.useEffect(()=>(me&&window.addEventListener("scroll",Pe),()=>window.removeEventListener("scroll",Pe)),[y,me,Pe]);const tt=(Ct,pt)=>{X&&X(Ct,pt),Pe()},Ue=()=>{Ae(!1)};J.useEffect(()=>{F&&Pe()}),J.useImperativeHandle(k,()=>F?{updatePosition:()=>{Pe()}}:null,[F,Pe]),J.useEffect(()=>{if(!F)return;const Ct=ch(()=>{Pe()}),pt=Pi(y);return pt.addEventListener("resize",Ct),()=>{Ct.clear(),pt.removeEventListener("resize",Ct)}},[y,F,Pe]);let He=q;q==="auto"&&!ee.muiSupportAuto&&(He=void 0);const mt=R||(y?Zn(T2(y)).body:void 0),Zt=(p=B==null?void 0:B.root)!=null?p:TT,nt=(d=B==null?void 0:B.paper)!=null?d:Ey,Gt=Nr({elementType:nt,externalSlotProps:Y({},de,{style:Ne?de.style:Y({},de.style,{opacity:0})}),additionalProps:{elevation:D,ref:_e},ownerState:ge,className:et(ye.paper,de==null?void 0:de.className)}),hn=Nr({elementType:Zt,externalSlotProps:(Q==null?void 0:Q.root)||{},externalForwardedProps:he,additionalProps:{ref:s,slotProps:{backdrop:{invisible:!0}},container:mt,open:F},ownerState:ge,className:et(ye.root,L)}),{slotProps:Rt}=hn,Vt=Ke(hn,NT);return j.jsx(Zt,Y({},Vt,!oi(Zt)&&{slotProps:Rt,disableScrollLock:me},{children:j.jsx(ee,Y({appear:!0,in:F,onEntering:tt,onExited:Ue,timeout:He},le,{children:j.jsx(nt,Y({},Gt,{children:I}))}))}))}),LT=FT;function DT(t){return kt("MuiMenu",t)}vt("MuiMenu",["root","paper","list"]);const OT=["onEntering"],BT=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],jT={vertical:"top",horizontal:"right"},zT={vertical:"top",horizontal:"left"},VT=t=>{const{classes:r}=t;return wt({root:["root"],paper:["paper"],list:["list"]},DT,r)},WT=We(LT,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,r)=>r.root})({}),UT=We(Ey,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,r)=>r.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),HT=We(ET,{name:"MuiMenu",slot:"List",overridesResolver:(t,r)=>r.list})({outline:0}),GT=J.forwardRef(function(r,s){var u,p;const d=At({props:r,name:"MuiMenu"}),{autoFocus:b=!0,children:k,className:y,disableAutoFocusItem:_=!1,MenuListProps:S={},onClose:P,open:I,PaperProps:L={},PopoverClasses:R,transitionDuration:D="auto",TransitionProps:{onEntering:Z}={},variant:F="selectedMenu",slots:O={},slotProps:B={}}=d,Q=Ke(d.TransitionProps,OT),U=Ke(d,BT),ee=dh(),q=Y({},d,{autoFocus:b,disableAutoFocusItem:_,MenuListProps:S,onEntering:Z,PaperProps:L,transitionDuration:D,TransitionProps:Q,variant:F}),X=VT(q),me=b&&!_&&I,le=J.useRef(null),he=(ce,we)=>{le.current&&le.current.adjustStyleForScrollbar(ce,{direction:ee?"rtl":"ltr"}),Z&&Z(ce,we)},de=ce=>{ce.key==="Tab"&&(ce.preventDefault(),P&&P(ce,"tabKeyDown"))};let Ce=-1;J.Children.map(k,(ce,we)=>{J.isValidElement(ce)&&(ce.props.disabled||(F==="selectedMenu"&&ce.props.selected||Ce===-1)&&(Ce=we))});const _e=(u=O.paper)!=null?u:UT,ge=(p=B.paper)!=null?p:L,ye=Nr({elementType:O.root,externalSlotProps:B.root,ownerState:q,className:[X.root,y]}),ve=Nr({elementType:_e,externalSlotProps:ge,ownerState:q,className:X.paper});return j.jsx(WT,Y({onClose:P,anchorOrigin:{vertical:"bottom",horizontal:ee?"right":"left"},transformOrigin:ee?jT:zT,slots:{paper:_e,root:O.root},slotProps:{root:ye,paper:ve},open:I,ref:s,transitionDuration:D,TransitionProps:Y({onEntering:he},Q),ownerState:q},U,{classes:R,children:j.jsx(HT,Y({onKeyDown:de,actions:le,autoFocus:b&&(Ce===-1||_),autoFocusItem:me,variant:F},S,{className:et(X.list,S.className),children:k}))}))}),Py=GT;function QT(t){return kt("MuiMenuItem",t)}const YT=vt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),zl=YT,KT=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],XT=(t,r)=>{const{ownerState:s}=t;return[r.root,s.dense&&r.dense,s.divider&&r.divider,!s.disableGutters&&r.gutters]},qT=t=>{const{disabled:r,dense:s,divider:u,disableGutters:p,selected:d,classes:b}=t,y=wt({root:["root",s&&"dense",r&&"disabled",!p&&"gutters",u&&"divider",d&&"selected"]},QT,b);return Y({},b,y)},ZT=We(fl,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:XT})(({theme:t,ownerState:r})=>Y({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!r.disableGutters&&{paddingLeft:16,paddingRight:16},r.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${zl.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${zl.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${zl.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${zl.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${zl.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${nv.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${nv.inset}`]:{marginLeft:52},[`& .${H0.root}`]:{marginTop:0,marginBottom:0},[`& .${H0.inset}`]:{paddingLeft:36},[`& .${fv.root}`]:{minWidth:36}},!r.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},r.dense&&Y({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${fv.root} svg`]:{fontSize:"1.25rem"}}))),JT=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiMenuItem"}),{autoFocus:p=!1,component:d="li",dense:b=!1,divider:k=!1,disableGutters:y=!1,focusVisibleClassName:_,role:S="menuitem",tabIndex:P,className:I}=u,L=Ke(u,KT),R=J.useContext(ii),D=J.useMemo(()=>({dense:b||R.dense||!1,disableGutters:y}),[R.dense,b,y]),Z=J.useRef(null);xo(()=>{p&&Z.current&&Z.current.focus()},[p]);const F=Y({},u,{dense:D.dense,divider:k,disableGutters:y}),O=qT(u),B=Wn(Z,s);let Q;return u.disabled||(Q=P!==void 0?P:-1),j.jsx(ii.Provider,{value:D,children:j.jsx(ZT,Y({ref:B,role:S,tabIndex:Q,component:d,focusVisibleClassName:et(O.focusVisible,_),className:et(O.root,I)},L,{ownerState:F,classes:O}))})}),Ra=JT;function $T(t){return kt("MuiNativeSelect",t)}const eF=vt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Ch=eF,tF=["className","disabled","error","IconComponent","inputRef","variant"],nF=t=>{const{classes:r,variant:s,disabled:u,multiple:p,open:d,error:b}=t,k={select:["select",s,u&&"disabled",p&&"multiple",b&&"error"],icon:["icon",`icon${$e(s)}`,d&&"iconOpen",u&&"disabled"]};return wt(k,$T,r)},My=({ownerState:t,theme:r})=>Y({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":Y({},r.vars?{backgroundColor:`rgba(${r.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:r.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Ch.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(r.vars||r).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(r.vars||r).shape.borderRadius,"&:focus":{borderRadius:(r.vars||r).shape.borderRadius},"&&&":{paddingRight:32}}),rF=We("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:br,overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.select,r[s.variant],s.error&&r.error,{[`&.${Ch.multiple}`]:r.multiple}]}})(My),Iy=({ownerState:t,theme:r})=>Y({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(r.vars||r).palette.action.active,[`&.${Ch.disabled}`]:{color:(r.vars||r).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),oF=We("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.icon,s.variant&&r[`icon${$e(s.variant)}`],s.open&&r.iconOpen]}})(Iy),iF=J.forwardRef(function(r,s){const{className:u,disabled:p,error:d,IconComponent:b,inputRef:k,variant:y="standard"}=r,_=Ke(r,tF),S=Y({},r,{disabled:p,variant:y,error:d}),P=nF(S);return j.jsxs(J.Fragment,{children:[j.jsx(rF,Y({ownerState:S,className:et(P.select,u),disabled:p,ref:k||s},_)),r.multiple?null:j.jsx(oF,{as:b,ownerState:S,className:P.icon})]})}),aF=iF;var bv;const sF=["children","classes","className","label","notched"],lF=We("fieldset",{shouldForwardProp:br})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),cF=We("legend",{shouldForwardProp:br})(({ownerState:t,theme:r})=>Y({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:r.transitions.create("width",{duration:150,easing:r.transitions.easing.easeOut})},t.withLabel&&Y({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:r.transitions.create("max-width",{duration:50,easing:r.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:r.transitions.create("max-width",{duration:100,easing:r.transitions.easing.easeOut,delay:50})})));function uF(t){const{className:r,label:s,notched:u}=t,p=Ke(t,sF),d=s!=null&&s!=="",b=Y({},t,{notched:u,withLabel:d});return j.jsx(lF,Y({"aria-hidden":!0,className:r,ownerState:b},p,{children:j.jsx(cF,{ownerState:b,children:d?j.jsx("span",{children:s}):bv||(bv=j.jsx("span",{className:"notranslate",children:"​"}))})}))}const fF=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],dF=t=>{const{classes:r}=t,u=wt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},GP,r);return Y({},r,u)},pF=We(ed,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Jf})(({theme:t,ownerState:r})=>{const s=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Y({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${Vi.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Vi.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:s}},[`&.${Vi.focused} .${Vi.notchedOutline}`]:{borderColor:(t.vars||t).palette[r.color].main,borderWidth:2},[`&.${Vi.error} .${Vi.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Vi.disabled} .${Vi.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},r.startAdornment&&{paddingLeft:14},r.endAdornment&&{paddingRight:14},r.multiline&&Y({padding:"16.5px 14px"},r.size==="small"&&{padding:"8.5px 14px"}))}),hF=We(uF,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,r)=>r.notchedOutline})(({theme:t})=>{const r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:r}}),mF=We(td,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:$f})(({theme:t,ownerState:r})=>Y({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},r.size==="small"&&{padding:"8.5px 14px"},r.multiline&&{padding:0},r.startAdornment&&{paddingLeft:0},r.endAdornment&&{paddingRight:0})),Ny=J.forwardRef(function(r,s){var u,p,d,b,k;const y=At({props:r,name:"MuiOutlinedInput"}),{components:_={},fullWidth:S=!1,inputComponent:P="input",label:I,multiline:L=!1,notched:R,slots:D={},type:Z="text"}=y,F=Ke(y,fF),O=dF(y),B=si(),Q=fa({props:y,muiFormControl:B,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),U=Y({},y,{color:Q.color||"primary",disabled:Q.disabled,error:Q.error,focused:Q.focused,formControl:B,fullWidth:S,hiddenLabel:Q.hiddenLabel,multiline:L,size:Q.size,type:Z}),ee=(u=(p=D.root)!=null?p:_.Root)!=null?u:pF,q=(d=(b=D.input)!=null?b:_.Input)!=null?d:mF;return j.jsx(_h,Y({slots:{root:ee,input:q},renderSuffix:X=>j.jsx(hF,{ownerState:U,className:O.notchedOutline,label:I!=null&&I!==""&&Q.required?k||(k=j.jsxs(J.Fragment,{children:[I," ","*"]})):I,notched:typeof R<"u"?R:!!(X.startAdornment||X.filled||X.focused)}),fullWidth:S,inputComponent:P,multiline:L,ref:s,type:Z},F,{classes:Y({},O,{notchedOutline:null})}))});Ny.muiName="Input";const Ry=Ny;function gF(t){return kt("MuiSelect",t)}const Vl=vt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var vv;const bF=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],vF=We("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[{[`&.${Vl.select}`]:r.select},{[`&.${Vl.select}`]:r[s.variant]},{[`&.${Vl.error}`]:r.error},{[`&.${Vl.multiple}`]:r.multiple}]}})(My,{[`&.${Vl.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),kF=We("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.icon,s.variant&&r[`icon${$e(s.variant)}`],s.open&&r.iconOpen]}})(Iy),yF=We("input",{shouldForwardProp:t=>Xf(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,r)=>r.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function kv(t,r){return typeof r=="object"&&r!==null?t===r:String(t)===String(r)}function _F(t){return t==null||typeof t=="string"&&!t.trim()}const wF=t=>{const{classes:r,variant:s,disabled:u,multiple:p,open:d,error:b}=t,k={select:["select",s,u&&"disabled",p&&"multiple",b&&"error"],icon:["icon",`icon${$e(s)}`,d&&"iconOpen",u&&"disabled"],nativeInput:["nativeInput"]};return wt(k,gF,r)},AF=J.forwardRef(function(r,s){var u;const{"aria-describedby":p,"aria-label":d,autoFocus:b,autoWidth:k,children:y,className:_,defaultOpen:S,defaultValue:P,disabled:I,displayEmpty:L,error:R=!1,IconComponent:D,inputRef:Z,labelId:F,MenuProps:O={},multiple:B,name:Q,onBlur:U,onChange:ee,onClose:q,onFocus:X,onOpen:me,open:le,readOnly:he,renderValue:de,SelectDisplayProps:Ce={},tabIndex:_e,value:ge,variant:ye="standard"}=r,ve=Ke(r,bF),[ce,we]=z0({controlled:ge,default:P,name:"Select"}),[Ne,Ae]=z0({controlled:le,default:S,name:"Select"}),Pe=J.useRef(null),tt=J.useRef(null),[Ue,He]=J.useState(null),{current:mt}=J.useRef(le!=null),[Zt,nt]=J.useState(),Gt=Wn(s,Z),hn=J.useCallback(Ge=>{tt.current=Ge,Ge&&He(Ge)},[]),Rt=Ue==null?void 0:Ue.parentNode;J.useImperativeHandle(Gt,()=>({focus:()=>{tt.current.focus()},node:Pe.current,value:ce}),[ce]),J.useEffect(()=>{S&&Ne&&Ue&&!mt&&(nt(k?null:Rt.clientWidth),tt.current.focus())},[Ue,k]),J.useEffect(()=>{b&&tt.current.focus()},[b]),J.useEffect(()=>{if(!F)return;const Ge=Zn(tt.current).getElementById(F);if(Ge){const Ot=()=>{getSelection().isCollapsed&&tt.current.focus()};return Ge.addEventListener("click",Ot),()=>{Ge.removeEventListener("click",Ot)}}},[F]);const Vt=(Ge,Ot)=>{Ge?me&&me(Ot):q&&q(Ot),mt||(nt(k?null:Rt.clientWidth),Ae(Ge))},Ct=Ge=>{Ge.button===0&&(Ge.preventDefault(),tt.current.focus(),Vt(!0,Ge))},pt=Ge=>{Vt(!1,Ge)},dt=J.Children.toArray(y),Jt=Ge=>{const Ot=dt.find(on=>on.props.value===Ge.target.value);Ot!==void 0&&(we(Ot.props.value),ee&&ee(Ge,Ot))},yn=Ge=>Ot=>{let on;if(Ot.currentTarget.hasAttribute("tabindex")){if(B){on=Array.isArray(ce)?ce.slice():[];const Nt=ce.indexOf(Ge.props.value);Nt===-1?on.push(Ge.props.value):on.splice(Nt,1)}else on=Ge.props.value;if(Ge.props.onClick&&Ge.props.onClick(Ot),ce!==on&&(we(on),ee)){const Nt=Ot.nativeEvent||Ot,Un=new Nt.constructor(Nt.type,Nt);Object.defineProperty(Un,"target",{writable:!0,value:{value:on,name:Q}}),ee(Un,Ge)}B||Vt(!1,Ot)}},ut=Ge=>{he||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Ge.key)!==-1&&(Ge.preventDefault(),Vt(!0,Ge))},$n=Ue!==null&&Ne,Qt=Ge=>{!$n&&U&&(Object.defineProperty(Ge,"target",{writable:!0,value:{value:ce,name:Q}}),U(Ge))};delete ve["aria-invalid"];let Yt,Sr;const Kn=[];let $t=!1;(U0({value:ce})||L)&&(de?Yt=de(ce):$t=!0);const ir=dt.map(Ge=>{if(!J.isValidElement(Ge))return null;let Ot;if(B){if(!Array.isArray(ce))throw new Error(ja(2));Ot=ce.some(on=>kv(on,Ge.props.value)),Ot&&$t&&Kn.push(Ge.props.children)}else Ot=kv(ce,Ge.props.value),Ot&&$t&&(Sr=Ge.props.children);return J.cloneElement(Ge,{"aria-selected":Ot?"true":"false",onClick:yn(Ge),onKeyUp:on=>{on.key===" "&&on.preventDefault(),Ge.props.onKeyUp&&Ge.props.onKeyUp(on)},role:"option",selected:Ot,value:void 0,"data-value":Ge.props.value})});$t&&(B?Kn.length===0?Yt=null:Yt=Kn.reduce((Ge,Ot,on)=>(Ge.push(Ot),on{const{classes:r}=t;return r},xh={name:"MuiSelect",overridesResolver:(t,r)=>r.root,shouldForwardProp:t=>br(t)&&t!=="variant",slot:"Root"},PF=We(wy,xh)(""),MF=We(Ry,xh)(""),IF=We(gy,xh)(""),Ty=J.forwardRef(function(r,s){const u=At({name:"MuiSelect",props:r}),{autoWidth:p=!1,children:d,classes:b={},className:k,defaultOpen:y=!1,displayEmpty:_=!1,IconComponent:S=XP,id:P,input:I,inputProps:L,label:R,labelId:D,MenuProps:Z,multiple:F=!1,native:O=!1,onClose:B,onOpen:Q,open:U,renderValue:ee,SelectDisplayProps:q,variant:X="outlined"}=u,me=Ke(u,xF),le=O?aF:CF,he=si(),de=fa({props:u,muiFormControl:he,states:["variant","error"]}),Ce=de.variant||X,_e=Y({},u,{variant:Ce,classes:b}),ge=EF(_e),ye=Ke(ge,SF),ve=I||{standard:j.jsx(PF,{ownerState:_e}),outlined:j.jsx(MF,{label:R,ownerState:_e}),filled:j.jsx(IF,{ownerState:_e})}[Ce],ce=Wn(s,ve.ref);return j.jsx(J.Fragment,{children:J.cloneElement(ve,Y({inputComponent:le,inputProps:Y({children:d,error:de.error,IconComponent:S,variant:Ce,type:void 0,multiple:F},O?{id:P}:{autoWidth:p,defaultOpen:y,displayEmpty:_,labelId:D,MenuProps:Z,onClose:B,onOpen:Q,open:U,renderValue:ee,SelectDisplayProps:Y({id:P},q)},L,{classes:L?Tr(ye,L.classes):ye},I?I.props.inputProps:{})},(F&&O||_)&&Ce==="outlined"?{notched:!0}:{},{ref:ce,className:et(ve.props.className,k,ge.root)},!I&&{variant:Ce},me))})});Ty.muiName="Select";const Sh=Ty;function NF(t,r,s=(u,p)=>u===p){return t.length===r.length&&t.every((u,p)=>s(u,r[p]))}const RF=2;function Fy(t,r){return t-r}function yv(t,r){var s;const{index:u}=(s=t.reduce((p,d,b)=>{const k=Math.abs(r-d);return p===null||k({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},OF=t=>t;let Hu;function wv(){return Hu===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Hu=CSS.supports("touch-action","none"):Hu=!0),Hu}function BF(t){const{"aria-labelledby":r,defaultValue:s,disabled:u=!1,disableSwap:p=!1,isRtl:d=!1,marks:b=!1,max:k=100,min:y=0,name:_,onChange:S,onChangeCommitted:P,orientation:I="horizontal",rootRef:L,scale:R=OF,step:D=1,shiftStep:Z=10,tabIndex:F,value:O}=t,B=J.useRef(),[Q,U]=J.useState(-1),[ee,q]=J.useState(-1),[X,me]=J.useState(!1),le=J.useRef(0),[he,de]=z0({controlled:O,default:s??y,name:"Slider"}),Ce=S&&((De,Re,ct)=>{const Tt=De.nativeEvent||De,Dt=new Tt.constructor(Tt.type,Tt);Object.defineProperty(Dt,"target",{writable:!0,value:{value:Re,name:_}}),S(Dt,Re,ct)}),_e=Array.isArray(he);let ge=_e?he.slice().sort(Fy):[he];ge=ge.map(De=>De==null?y:ks(De,y,k));const ye=b===!0&&D!==null?[...Array(Math.floor((k-y)/D)+1)].map((De,Re)=>({value:y+D*Re})):b||[],ve=ye.map(De=>De.value),{isFocusVisibleRef:ce,onBlur:we,onFocus:Ne,ref:Ae}=z6(),[Pe,tt]=J.useState(-1),Ue=J.useRef(),He=Wn(Ae,Ue),mt=Wn(L,He),Zt=De=>Re=>{var ct;const Tt=Number(Re.currentTarget.getAttribute("data-index"));Ne(Re),ce.current===!0&&tt(Tt),q(Tt),De==null||(ct=De.onFocus)==null||ct.call(De,Re)},nt=De=>Re=>{var ct;we(Re),ce.current===!1&&tt(-1),q(-1),De==null||(ct=De.onBlur)==null||ct.call(De,Re)},Gt=(De,Re)=>{const ct=Number(De.currentTarget.getAttribute("data-index")),Tt=ge[ct],Dt=ve.indexOf(Tt);let Ge=Re;if(ye&&D==null){const Ot=ve[ve.length-1];Ge>Ot?Ge=Ot:GeRe=>{var ct;if(D!==null){const Tt=Number(Re.currentTarget.getAttribute("data-index")),Dt=ge[Tt];let Ge=null;(Re.key==="ArrowLeft"||Re.key==="ArrowDown")&&Re.shiftKey||Re.key==="PageDown"?Ge=Math.max(Dt-Z,y):((Re.key==="ArrowRight"||Re.key==="ArrowUp")&&Re.shiftKey||Re.key==="PageUp")&&(Ge=Math.min(Dt+Z,k)),Ge!==null&&(Gt(Re,Ge),Re.preventDefault())}De==null||(ct=De.onKeyDown)==null||ct.call(De,Re)};xo(()=>{if(u&&Ue.current.contains(document.activeElement)){var De;(De=document.activeElement)==null||De.blur()}},[u]),u&&Q!==-1&&U(-1),u&&Pe!==-1&&tt(-1);const Rt=De=>Re=>{var ct;(ct=De.onChange)==null||ct.call(De,Re),Gt(Re,Re.target.valueAsNumber)},Vt=J.useRef();let Ct=I;d&&I==="horizontal"&&(Ct+="-reverse");const pt=({finger:De,move:Re=!1})=>{const{current:ct}=Ue,{width:Tt,height:Dt,bottom:Ge,left:Ot}=ct.getBoundingClientRect();let on;Ct.indexOf("vertical")===0?on=(Ge-De.y)/Dt:on=(De.x-Ot)/Tt,Ct.indexOf("-reverse")!==-1&&(on=1-on);let Nt;if(Nt=TF(on,y,k),D)Nt=LF(Nt,D,y);else{const uo=yv(ve,Nt);Nt=ve[uo]}Nt=ks(Nt,y,k);let Un=0;if(_e){Re?Un=Vt.current:Un=yv(ge,Nt),p&&(Nt=ks(Nt,ge[Un-1]||-1/0,ge[Un+1]||1/0));const uo=Nt;Nt=_v({values:ge,newValue:Nt,index:Un}),p&&Re||(Un=Nt.indexOf(uo),Vt.current=Un)}return{newValue:Nt,activeIndex:Un}},dt=yo(De=>{const Re=Vu(De,B);if(!Re)return;if(le.current+=1,De.type==="mousemove"&&De.buttons===0){Jt(De);return}const{newValue:ct,activeIndex:Tt}=pt({finger:Re,move:!0});Wu({sliderRef:Ue,activeIndex:Tt,setActive:U}),de(ct),!X&&le.current>RF&&me(!0),Ce&&!Uu(ct,he)&&Ce(De,ct,Tt)}),Jt=yo(De=>{const Re=Vu(De,B);if(me(!1),!Re)return;const{newValue:ct}=pt({finger:Re,move:!0});U(-1),De.type==="touchend"&&q(-1),P&&P(De,ct),B.current=void 0,ut()}),yn=yo(De=>{if(u)return;wv()||De.preventDefault();const Re=De.changedTouches[0];Re!=null&&(B.current=Re.identifier);const ct=Vu(De,B);if(ct!==!1){const{newValue:Dt,activeIndex:Ge}=pt({finger:ct});Wu({sliderRef:Ue,activeIndex:Ge,setActive:U}),de(Dt),Ce&&!Uu(Dt,he)&&Ce(De,Dt,Ge)}le.current=0;const Tt=Zn(Ue.current);Tt.addEventListener("touchmove",dt,{passive:!0}),Tt.addEventListener("touchend",Jt,{passive:!0})}),ut=J.useCallback(()=>{const De=Zn(Ue.current);De.removeEventListener("mousemove",dt),De.removeEventListener("mouseup",Jt),De.removeEventListener("touchmove",dt),De.removeEventListener("touchend",Jt)},[Jt,dt]);J.useEffect(()=>{const{current:De}=Ue;return De.addEventListener("touchstart",yn,{passive:wv()}),()=>{De.removeEventListener("touchstart",yn),ut()}},[ut,yn]),J.useEffect(()=>{u&&ut()},[u,ut]);const $n=De=>Re=>{var ct;if((ct=De.onMouseDown)==null||ct.call(De,Re),u||Re.defaultPrevented||Re.button!==0)return;Re.preventDefault();const Tt=Vu(Re,B);if(Tt!==!1){const{newValue:Ge,activeIndex:Ot}=pt({finger:Tt});Wu({sliderRef:Ue,activeIndex:Ot,setActive:U}),de(Ge),Ce&&!Uu(Ge,he)&&Ce(Re,Ge,Ot)}le.current=0;const Dt=Zn(Ue.current);Dt.addEventListener("mousemove",dt,{passive:!0}),Dt.addEventListener("mouseup",Jt)},Qt=G0(_e?ge[0]:y,y,k),Yt=G0(ge[ge.length-1],y,k)-Qt,Sr=(De={})=>{const Re=Na(De),ct={onMouseDown:$n(Re||{})},Tt=Y({},Re,ct);return Y({},De,{ref:mt},Tt)},Kn=De=>Re=>{var ct;(ct=De.onMouseOver)==null||ct.call(De,Re);const Tt=Number(Re.currentTarget.getAttribute("data-index"));q(Tt)},$t=De=>Re=>{var ct;(ct=De.onMouseLeave)==null||ct.call(De,Re),q(-1)};return{active:Q,axis:Ct,axisProps:DF,dragging:X,focusedThumbIndex:Pe,getHiddenInputProps:(De={})=>{var Re;const ct=Na(De),Tt={onChange:Rt(ct||{}),onFocus:Zt(ct||{}),onBlur:nt(ct||{}),onKeyDown:hn(ct||{})},Dt=Y({},ct,Tt);return Y({tabIndex:F,"aria-labelledby":r,"aria-orientation":I,"aria-valuemax":R(k),"aria-valuemin":R(y),name:_,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":(Re=t.step)!=null?Re:void 0,disabled:u},De,Dt,{style:Y({},O7,{direction:d?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Sr,getThumbProps:(De={})=>{const Re=Na(De),ct={onMouseOver:Kn(Re||{}),onMouseLeave:$t(Re||{})};return Y({},De,Re,ct)},marks:ye,open:ee,range:_e,rootRef:mt,trackLeap:Yt,trackOffset:Qt,values:ge,getThumbStyle:De=>({pointerEvents:Q!==-1&&Q!==De?"none":void 0})}}const jF=t=>!t||!oi(t);function zF(t){return kt("MuiSlider",t)}const VF=vt("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),_o=VF,WF=t=>{const{open:r}=t;return{offset:et(r&&_o.valueLabelOpen),circle:_o.valueLabelCircle,label:_o.valueLabelLabel}};function UF(t){const{children:r,className:s,value:u}=t,p=WF(t);return r?J.cloneElement(r,{className:et(r.props.className)},j.jsxs(J.Fragment,{children:[r.props.children,j.jsx("span",{className:et(p.offset,s),"aria-hidden":!0,children:j.jsx("span",{className:p.circle,children:j.jsx("span",{className:p.label,children:u})})})]})):null}const HF=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function Av(t){return t}const GF=We("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[`color${$e(s.color)}`],s.size!=="medium"&&r[`size${$e(s.size)}`],s.marked&&r.marked,s.orientation==="vertical"&&r.vertical,s.track==="inverted"&&r.trackInverted,s.track===!1&&r.trackFalse]}})(({theme:t})=>{var r;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${_o.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${_o.dragging}`]:{[`& .${_o.thumb}, & .${_o.track}`]:{transition:"none"}},variants:[...Object.keys(((r=t.vars)!=null?r:t).palette).filter(s=>{var u;return((u=t.vars)!=null?u:t).palette[s].main}).map(s=>({props:{color:s},style:{color:(t.vars||t).palette[s].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),QF=We("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(t,r)=>r.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),YF=We("span",{name:"MuiSlider",slot:"Track",overridesResolver:(t,r)=>r.track})(({theme:t})=>{var r;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((r=t.vars)!=null?r:t).palette).filter(s=>{var u;return((u=t.vars)!=null?u:t).palette[s].main}).map(s=>({props:{color:s,track:"inverted"},style:Y({},t.vars?{backgroundColor:t.vars.palette.Slider[`${s}Track`],borderColor:t.vars.palette.Slider[`${s}Track`]}:Y({backgroundColor:Ic(t.palette[s].main,.62),borderColor:Ic(t.palette[s].main,.62)},t.applyStyles("dark",{backgroundColor:Mc(t.palette[s].main,.5)}),t.applyStyles("dark",{borderColor:Mc(t.palette[s].main,.5)})))}))]}}),KF=We("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.thumb,r[`thumbColor${$e(s.color)}`],s.size!=="medium"&&r[`thumbSize${$e(s.size)}`]]}})(({theme:t})=>{var r;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${_o.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys(((r=t.vars)!=null?r:t).palette).filter(s=>{var u;return((u=t.vars)!=null?u:t).palette[s].main}).map(s=>({props:{color:s},style:{[`&:hover, &.${_o.focusVisible}`]:Y({},t.vars?{boxShadow:`0px 0px 0px 8px rgba(${t.vars.palette[s].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Mn(t.palette[s].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${_o.active}`]:Y({},t.vars?{boxShadow:`0px 0px 0px 14px rgba(${t.vars.palette[s].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Mn(t.palette[s].main,.16)}`})}}))]}}),XF=We(UF,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(t,r)=>r.valueLabel})(({theme:t})=>Y({zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${_o.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${_o.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),qF=We("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>Xf(t)&&t!=="markActive",overridesResolver:(t,r)=>{const{markActive:s}=t;return[r.mark,s&&r.markActive]}})(({theme:t})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]})),ZF=We("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>Xf(t)&&t!=="markLabelActive",overridesResolver:(t,r)=>r.markLabel})(({theme:t})=>Y({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]})),JF=t=>{const{disabled:r,dragging:s,marked:u,orientation:p,track:d,classes:b,color:k,size:y}=t,_={root:["root",r&&"disabled",s&&"dragging",u&&"marked",p==="vertical"&&"vertical",d==="inverted"&&"trackInverted",d===!1&&"trackFalse",k&&`color${$e(k)}`,y&&`size${$e(y)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",r&&"disabled",y&&`thumbSize${$e(y)}`,k&&`thumbColor${$e(k)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return wt(_,zF,b)},$F=({children:t})=>t,eL=J.forwardRef(function(r,s){var u,p,d,b,k,y,_,S,P,I,L,R,D,Z,F,O,B,Q,U,ee,q,X,me,le;const he=At({props:r,name:"MuiSlider"}),de=dh(),{"aria-label":Ce,"aria-valuetext":_e,"aria-labelledby":ge,component:ye="span",components:ve={},componentsProps:ce={},color:we="primary",classes:Ne,className:Ae,disableSwap:Pe=!1,disabled:tt=!1,getAriaLabel:Ue,getAriaValueText:He,marks:mt=!1,max:Zt=100,min:nt=0,orientation:Gt="horizontal",shiftStep:hn=10,size:Rt="medium",step:Vt=1,scale:Ct=Av,slotProps:pt,slots:dt,track:Jt="normal",valueLabelDisplay:yn="off",valueLabelFormat:ut=Av}=he,$n=Ke(he,HF),Qt=Y({},he,{isRtl:de,max:Zt,min:nt,classes:Ne,disabled:tt,disableSwap:Pe,orientation:Gt,marks:mt,color:we,size:Rt,step:Vt,shiftStep:hn,scale:Ct,track:Jt,valueLabelDisplay:yn,valueLabelFormat:ut}),{axisProps:Yt,getRootProps:Sr,getHiddenInputProps:Kn,getThumbProps:$t,open:ir,active:Er,axis:ar,focusedThumbIndex:De,range:Re,dragging:ct,marks:Tt,values:Dt,trackOffset:Ge,trackLeap:Ot,getThumbStyle:on}=BF(Y({},Qt,{rootRef:s}));Qt.marked=Tt.length>0&&Tt.some(Ln=>Ln.label),Qt.dragging=ct,Qt.focusedThumbIndex=De;const Nt=JF(Qt),Un=(u=(p=dt==null?void 0:dt.root)!=null?p:ve.Root)!=null?u:GF,uo=(d=(b=dt==null?void 0:dt.rail)!=null?b:ve.Rail)!=null?d:QF,pa=(k=(y=dt==null?void 0:dt.track)!=null?y:ve.Track)!=null?k:YF,Wo=(_=(S=dt==null?void 0:dt.thumb)!=null?S:ve.Thumb)!=null?_:KF,Fi=(P=(I=dt==null?void 0:dt.valueLabel)!=null?I:ve.ValueLabel)!=null?P:XF,qa=(L=(R=dt==null?void 0:dt.mark)!=null?R:ve.Mark)!=null?L:qF,ha=(D=(Z=dt==null?void 0:dt.markLabel)!=null?Z:ve.MarkLabel)!=null?D:ZF,Pr=(F=(O=dt==null?void 0:dt.input)!=null?O:ve.Input)!=null?F:"input",Za=(B=pt==null?void 0:pt.root)!=null?B:ce.root,$c=(Q=pt==null?void 0:pt.rail)!=null?Q:ce.rail,ma=(U=pt==null?void 0:pt.track)!=null?U:ce.track,gl=(ee=pt==null?void 0:pt.thumb)!=null?ee:ce.thumb,Ja=(q=pt==null?void 0:pt.valueLabel)!=null?q:ce.valueLabel,qr=(X=pt==null?void 0:pt.mark)!=null?X:ce.mark,eu=(me=pt==null?void 0:pt.markLabel)!=null?me:ce.markLabel,hd=(le=pt==null?void 0:pt.input)!=null?le:ce.input,md=Nr({elementType:Un,getSlotProps:Sr,externalSlotProps:Za,externalForwardedProps:$n,additionalProps:Y({},jF(Un)&&{as:ye}),ownerState:Y({},Qt,Za==null?void 0:Za.ownerState),className:[Nt.root,Ae]}),mn=Nr({elementType:uo,externalSlotProps:$c,ownerState:Qt,className:Nt.rail}),Br=Nr({elementType:pa,externalSlotProps:ma,additionalProps:{style:Y({},Yt[ar].offset(Ge),Yt[ar].leap(Ot))},ownerState:Y({},Qt,ma==null?void 0:ma.ownerState),className:Nt.track}),tu=Nr({elementType:Wo,getSlotProps:$t,externalSlotProps:gl,ownerState:Y({},Qt,gl==null?void 0:gl.ownerState),className:Nt.thumb}),gd=Nr({elementType:Fi,externalSlotProps:Ja,ownerState:Y({},Qt,Ja==null?void 0:Ja.ownerState),className:Nt.valueLabel}),bl=Nr({elementType:qa,externalSlotProps:qr,ownerState:Qt,className:Nt.mark}),vl=Nr({elementType:ha,externalSlotProps:eu,ownerState:Qt,className:Nt.markLabel}),bd=Nr({elementType:Pr,getSlotProps:Kn,externalSlotProps:hd,ownerState:Qt});return j.jsxs(Un,Y({},md,{children:[j.jsx(uo,Y({},mn)),j.jsx(pa,Y({},Br)),Tt.filter(Ln=>Ln.value>=nt&&Ln.value<=Zt).map((Ln,er)=>{const kl=G0(Ln.value,nt,Zt),$a=Yt[ar].offset(kl);let St;return Jt===!1?St=Dt.indexOf(Ln.value)!==-1:St=Jt==="normal"&&(Re?Ln.value>=Dt[0]&&Ln.value<=Dt[Dt.length-1]:Ln.value<=Dt[0])||Jt==="inverted"&&(Re?Ln.value<=Dt[0]||Ln.value>=Dt[Dt.length-1]:Ln.value>=Dt[0]),j.jsxs(J.Fragment,{children:[j.jsx(qa,Y({"data-index":er},bl,!oi(qa)&&{markActive:St},{style:Y({},$a,bl.style),className:et(bl.className,St&&Nt.markActive)})),Ln.label!=null?j.jsx(ha,Y({"aria-hidden":!0,"data-index":er},vl,!oi(ha)&&{markLabelActive:St},{style:Y({},$a,vl.style),className:et(Nt.markLabel,vl.className,St&&Nt.markLabelActive),children:Ln.label})):null]},er)}),Dt.map((Ln,er)=>{const kl=G0(Ln,nt,Zt),$a=Yt[ar].offset(kl),St=yn==="off"?$F:Fi;return j.jsx(St,Y({},!oi(St)&&{valueLabelFormat:ut,valueLabelDisplay:yn,value:typeof ut=="function"?ut(Ct(Ln),er):ut,index:er,open:ir===er||Er===er||yn==="on",disabled:tt},gd,{children:j.jsx(Wo,Y({"data-index":er},tu,{className:et(Nt.thumb,tu.className,Er===er&&Nt.active,De===er&&Nt.focusVisible),style:Y({},$a,on(er),tu.style),children:j.jsx(Pr,Y({"data-index":er,"aria-label":Ue?Ue(er):Ce,"aria-valuenow":Ct(Ln),"aria-labelledby":ge,"aria-valuetext":He?He(Ct(Ln),er):_e,value:Dt[er]},bd))}))}),er)})]}))}),Ly=eL;function tL(t={}){const{autoHideDuration:r=null,disableWindowBlurListener:s=!1,onClose:u,open:p,resumeHideDuration:d}=t,b=fh();J.useEffect(()=>{if(!p)return;function F(O){O.defaultPrevented||(O.key==="Escape"||O.key==="Esc")&&(u==null||u(O,"escapeKeyDown"))}return document.addEventListener("keydown",F),()=>{document.removeEventListener("keydown",F)}},[p,u]);const k=yo((F,O)=>{u==null||u(F,O)}),y=yo(F=>{!u||F==null||b.start(F,()=>{k(null,"timeout")})});J.useEffect(()=>(p&&y(r),b.clear),[p,r,y,b]);const _=F=>{u==null||u(F,"clickaway")},S=b.clear,P=J.useCallback(()=>{r!=null&&y(d??r*.5)},[r,d,y]),I=F=>O=>{const B=F.onBlur;B==null||B(O),P()},L=F=>O=>{const B=F.onFocus;B==null||B(O),S()},R=F=>O=>{const B=F.onMouseEnter;B==null||B(O),S()},D=F=>O=>{const B=F.onMouseLeave;B==null||B(O),P()};return J.useEffect(()=>{if(!s&&p)return window.addEventListener("focus",P),window.addEventListener("blur",S),()=>{window.removeEventListener("focus",P),window.removeEventListener("blur",S)}},[s,p,P,S]),{getRootProps:(F={})=>{const O=Y({},Na(t),Na(F));return Y({role:"presentation"},F,O,{onBlur:I(O),onFocus:L(O),onMouseEnter:R(O),onMouseLeave:D(O)})},onClickAway:_}}function nL(t){return kt("MuiSnackbarContent",t)}vt("MuiSnackbarContent",["root","message","action"]);const rL=["action","className","message","role"],oL=t=>{const{classes:r}=t;return wt({root:["root"],action:["action"],message:["message"]},nL,r)},iL=We(ua,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,r)=>r.root})(({theme:t})=>{const r=t.palette.mode==="light"?.8:.98,s=sE(t.palette.background.default,r);return Y({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(s),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:s,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),aL=We("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,r)=>r.message})({padding:"8px 0"}),sL=We("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,r)=>r.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),lL=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiSnackbarContent"}),{action:p,className:d,message:b,role:k="alert"}=u,y=Ke(u,rL),_=u,S=oL(_);return j.jsxs(iL,Y({role:k,square:!0,elevation:6,className:et(S.root,d),ownerState:_,ref:s},y,{children:[j.jsx(aL,{className:S.message,ownerState:_,children:b}),p?j.jsx(sL,{className:S.action,ownerState:_,children:p}):null]}))}),cL=lL;function uL(t){return kt("MuiSnackbar",t)}vt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const fL=["onEnter","onExited"],dL=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],pL=t=>{const{classes:r,anchorOrigin:s}=t,u={root:["root",`anchorOrigin${$e(s.vertical)}${$e(s.horizontal)}`]};return wt(u,uL,r)},Cv=We("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[`anchorOrigin${$e(s.anchorOrigin.vertical)}${$e(s.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:r})=>{const s={left:"50%",right:"auto",transform:"translateX(-50%)"};return Y({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},r.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},r.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},r.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:Y({},r.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},r.anchorOrigin.horizontal==="center"&&s,r.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},r.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),hL=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiSnackbar"}),p=Ga(),d={enter:p.transitions.duration.enteringScreen,exit:p.transitions.duration.leavingScreen},{action:b,anchorOrigin:{vertical:k,horizontal:y}={vertical:"bottom",horizontal:"left"},autoHideDuration:_=null,children:S,className:P,ClickAwayListenerProps:I,ContentProps:L,disableWindowBlurListener:R=!1,message:D,open:Z,TransitionComponent:F=yy,transitionDuration:O=d,TransitionProps:{onEnter:B,onExited:Q}={}}=u,U=Ke(u.TransitionProps,fL),ee=Ke(u,dL),q=Y({},u,{anchorOrigin:{vertical:k,horizontal:y},autoHideDuration:_,disableWindowBlurListener:R,TransitionComponent:F,transitionDuration:O}),X=pL(q),{getRootProps:me,onClickAway:le}=tL(Y({},q)),[he,de]=J.useState(!0),Ce=Nr({elementType:Cv,getSlotProps:me,externalForwardedProps:ee,ownerState:q,additionalProps:{ref:s},className:[X.root,P]}),_e=ye=>{de(!0),Q&&Q(ye)},ge=(ye,ve)=>{de(!1),B&&B(ye,ve)};return!Z&&he?null:j.jsx(eI,Y({onClickAway:le},I,{children:j.jsx(Cv,Y({},Ce,{children:j.jsx(F,Y({appear:!0,in:Z,timeout:O,direction:k==="top"?"down":"up",onEnter:ge,onExited:_e},U,{children:S||j.jsx(cL,Y({message:D,action:b},L))}))}))}))}),Dy=hL;function mL(t){return kt("MuiToolbar",t)}vt("MuiToolbar",["root","gutters","regular","dense"]);const gL=["className","component","disableGutters","variant"],bL=t=>{const{classes:r,disableGutters:s,variant:u}=t;return wt({root:["root",!s&&"gutters",u]},mL,r)},vL=We("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,!s.disableGutters&&r.gutters,r[s.variant]]}})(({theme:t,ownerState:r})=>Y({position:"relative",display:"flex",alignItems:"center"},!r.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},r.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:r})=>r.variant==="regular"&&t.mixins.toolbar),kL=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiToolbar"}),{className:p,component:d="div",disableGutters:b=!1,variant:k="regular"}=u,y=Ke(u,gL),_=Y({},u,{component:d,disableGutters:b,variant:k}),S=bL(_);return j.jsx(vL,Y({as:d,className:et(S.root,p),ref:s,ownerState:_},y))}),yL=kL;function _L(t){return kt("MuiTextField",t)}vt("MuiTextField",["root"]);const wL=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],AL={standard:wy,filled:gy,outlined:Ry},CL=t=>{const{classes:r}=t;return wt({root:["root"]},_L,r)},xL=We(Ah,{name:"MuiTextField",slot:"Root",overridesResolver:(t,r)=>r.root})({}),SL=J.forwardRef(function(r,s){const u=At({props:r,name:"MuiTextField"}),{autoComplete:p,autoFocus:d=!1,children:b,className:k,color:y="primary",defaultValue:_,disabled:S=!1,error:P=!1,FormHelperTextProps:I,fullWidth:L=!1,helperText:R,id:D,InputLabelProps:Z,inputProps:F,InputProps:O,inputRef:B,label:Q,maxRows:U,minRows:ee,multiline:q=!1,name:X,onBlur:me,onChange:le,onFocus:he,placeholder:de,required:Ce=!1,rows:_e,select:ge=!1,SelectProps:ye,type:ve,value:ce,variant:we="outlined"}=u,Ne=Ke(u,wL),Ae=Y({},u,{autoFocus:d,color:y,disabled:S,error:P,fullWidth:L,multiline:q,required:Ce,select:ge,variant:we}),Pe=CL(Ae),tt={};we==="outlined"&&(Z&&typeof Z.shrink<"u"&&(tt.notched=Z.shrink),tt.label=Q),ge&&((!ye||!ye.native)&&(tt.id=void 0),tt["aria-describedby"]=void 0);const Ue=uh(D),He=R&&Ue?`${Ue}-helper-text`:void 0,mt=Q&&Ue?`${Ue}-label`:void 0,Zt=AL[we],nt=j.jsx(Zt,Y({"aria-describedby":He,autoComplete:p,autoFocus:d,defaultValue:_,fullWidth:L,multiline:q,name:X,rows:_e,maxRows:U,minRows:ee,type:ve,value:ce,id:Ue,inputRef:B,onBlur:me,onChange:le,onFocus:he,placeholder:de,inputProps:F},tt,O));return j.jsxs(xL,Y({className:et(Pe.root,k),disabled:S,error:P,fullWidth:L,ref:s,required:Ce,color:y,variant:we,ownerState:Ae},Ne,{children:[Q!=null&&Q!==""&&j.jsx(Ay,Y({htmlFor:Ue,id:mt},Z,{children:Q})),ge?j.jsx(Sh,Y({"aria-describedby":He,id:Ue,labelId:mt,value:ce,input:nt},ye,{children:b})):nt,R&&j.jsx(nR,Y({id:He},I,{children:R}))]}))}),Zo=SL,EL=or(j.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),PL=or(j.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),ML=or(j.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),Oy=or(j.jsx("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),IL=or(j.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),NL=or(j.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"}),"SkipNext"),RL=or(j.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"}),"SkipPrevious"),TL=or(j.jsx("path",{d:"M6 6h12v12H6z"}),"Stop"),By=or(j.jsx("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z"}),"VolumeOff"),jy=or(j.jsx("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp");function FL(t){const[r,s]=J.useState(0),[u,p]=J.useState(null),[d,b]=J.useState(!1),[k,y]=J.useState(!1),[_,S]=J.useState(t.client.config.name),[P,I]=J.useState(t.client.config.latency),[L,R]=J.useState(t.client.config.latency);function D(X){console.debug("handleVolumeChange: "+X),t.client.config.volume.percent=X,t.snapcontrol.setVolume(t.client.id,X,!1),t.onVolumeChange()}function Z(X){console.debug("handleOptionsClicked"),p(X.currentTarget),b(!0),S(t.client.config.name),I(t.client.config.latency),R(t.client.config.latency)}function F(){p(null),b(!1)}function O(X){y(!1),X?(console.debug("handleDetailsClose, setting latency to "+P+", name: "+_),t.snapcontrol.setClientName(t.client.id,_),t.snapcontrol.setClientLatency(t.client.id,P),S(t.client.config.name),R(P)):(console.debug("handleDetailsClose, setting latency from "+P+" to "+L),t.snapcontrol.setClientLatency(t.client.id,L),S(t.client.config.name),I(L))}function B(){console.debug("handleDetailsClicked"),y(!0),p(null),b(!1)}function Q(X){console.debug("handleNameChange: "+X),S(X)}function U(X){console.debug("handleLatencyChange: "+X),I(X),t.snapcontrol.setClientLatency(t.client.id,X)}function ee(){console.debug("handleMuteClicked"),t.snapcontrol.setVolume(t.client.id,t.client.config.volume.percent,!t.client.config.volume.muted),s(r+1)}const q=[];return q.push(j.jsx(Ra,{onClick:()=>{B()},children:"Details"},"Menu-Details")),t.client.connected||q.push(j.jsx(Ra,{onClick:()=>{t.onDelete(),p(null),b(!1)},children:"Delete"},"Menu-Delete")),j.jsxs(Va,{sx:{opacity:t.client.connected?1:.5},children:[j.jsxs(f0,{container:!0,spacing:2,justifyContent:"center",alignItems:"center",children:[j.jsx(f0,{item:!0,xs:!0,children:j.jsxs(mi,{spacing:-1,direction:"column",children:[j.jsx(no,{variant:"subtitle1",align:"left",gutterBottom:!0,children:t.client.config.name===""?t.client.host.name:t.client.config.name}),j.jsxs(mi,{spacing:2,direction:"row",alignItems:"center",children:[j.jsx(Do,{"aria-label":"Mute",onClick:()=>{ee()},children:t.client.config.volume.muted?j.jsx(By,{}):j.jsx(jy,{})}),j.jsx(Ly,{"aria-label":"Volume",color:"secondary",min:0,max:100,size:"small",value:t.client.config.volume.percent,onChange:(X,me)=>{D(me)}},"slider-"+t.client.id)]})]})}),j.jsxs(f0,{item:!0,children:[j.jsx(Do,{"aria-label":"Options",onClick:X=>{Z(X)},children:j.jsx(PL,{})}),j.jsx(Py,{id:"basic-menu",anchorEl:u,open:d,onClose:()=>{F()},MenuListProps:{"aria-labelledby":"basic-button"},children:q})]})]}),j.jsxs(nd,{open:k,onClose:()=>{O(!1)},children:[j.jsx(id,{children:"Client settings"}),j.jsxs(od,{children:[j.jsx(Zo,{autoFocus:!0,margin:"dense",id:"name",label:"Name",type:"text",fullWidth:!0,variant:"standard",onChange:X=>{Q(X.target.value)},value:_}),j.jsx(Zo,{margin:"dense",id:"latency",label:"Latency",type:"number",fullWidth:!0,value:P,onChange:X=>{U(Number(X.target.value)||0)},InputProps:{endAdornment:j.jsx(jR,{position:"end",children:"ms"})},variant:"standard"}),j.jsx(Zo,{margin:"dense",id:"client",label:"Client",type:"text",fullWidth:!0,variant:"standard",value:t.client.snapclient.name+" "+t.client.snapclient.version,InputProps:{readOnly:!0}}),j.jsx(Zo,{margin:"dense",id:"mac",label:"MAC",type:"text",fullWidth:!0,variant:"standard",value:t.client.host.mac,InputProps:{readOnly:!0}}),j.jsx(Zo,{margin:"dense",id:"id",label:"ID",type:"text",fullWidth:!0,variant:"standard",value:t.client.id,InputProps:{readOnly:!0}}),j.jsx(Zo,{margin:"dense",id:"ip",label:"IP",type:"text",fullWidth:!0,variant:"standard",value:t.client.host.ip,InputProps:{readOnly:!0}}),j.jsx(Zo,{margin:"dense",id:"host",label:"Host",type:"text",fullWidth:!0,variant:"standard",value:t.client.host.name,InputProps:{readOnly:!0}}),j.jsx(Zo,{margin:"dense",id:"os",label:"OS",type:"text",fullWidth:!0,variant:"standard",value:t.client.host.os,InputProps:{readOnly:!0}})]}),j.jsxs(rd,{children:[j.jsx(wi,{onClick:()=>{O(!1)},children:"Cancel"}),j.jsx(wi,{onClick:()=>{O(!0)},children:"OK"})]})]})]})}const LL=""+new URL("logo192-wKJb_L8G.png",import.meta.url).href;function DL(t){var ve,ce,we,Ne;const[r,s]=J.useState(0),[u,p]=J.useState(!1),[d,b]=J.useState([]),[k,y]=J.useState(""),[_,S]=J.useState([]),[P,I]=J.useState(0),L=J.useRef({volumeEntered:!0,client_volumes:new Map,group_volume:0});function R(){const Ae=le();let Pe=0;for(const tt of Ae)Pe+=tt.config.volume.percent;Pe/=Ae.length,I(Pe)}J.useLayoutEffect(()=>{console.debug("useLayoutEffect"),R()});function D(Ae){console.debug("handleSettingsClicked");const Pe=[];for(const tt of t.server.groups)for(const Ue of tt.clients){const He=t.group.clients.includes(Ue);Pe.push({client:Ue,inGroup:He,wasInGroup:He})}p(!0),b(Pe),y(t.group.stream_id)}function Z(Ae){if(console.debug("handleSettingsClose: "+Ae),Ae){let Pe=!1;for(const tt of d)if(tt.inGroup!==tt.wasInGroup){Pe=!0;break}if(Pe){const tt=[];for(const Ue of d)Ue.inGroup&&tt.push(Ue.client.id);t.snapcontrol.setClients(t.group.id,tt)}t.group.stream_id!==k&&t.snapcontrol.setStream(t.group.id,k)}p(!1)}function F(Ae,Pe){console.debug("handleGroupClientChange: "+Ae.id+", in group: "+Pe);const tt=d,Ue=tt.findIndex(He=>He.client===Ae);tt[Ue].inGroup=Pe,b(tt),s(r+1)}function O(Ae){console.debug("handleClientDelete: "+Ae.getName());const Pe=_;Pe.includes(Ae)||Pe.push(Ae),S(Pe),s(r+1)}function B(Ae){console.debug("handleClientVolumeChange: "+Ae.getName()),R()}function Q(Ae,Pe){console.debug("handleSnackbarClose, client: "+Ae.getName()+", undo: "+Pe),Pe||t.snapcontrol.deleteClient(Ae.id);const tt=_;tt.includes(Ae)&&tt.splice(tt.indexOf(Ae),1),S(tt),s(r+1)}function U(){console.debug("handleMuteClicked"),t.group.muted=!t.group.muted,t.snapcontrol.muteGroup(t.group.id,t.group.muted),s(r+1)}function ee(Ae){if(console.debug("handleVolumeChange: "+Ae),L.current.volumeEntered){L.current.client_volumes.clear(),L.current.group_volume=0;for(const Ue of le())L.current.client_volumes.set(Ue.id,Ue.config.volume.percent),L.current.group_volume+=Ue.config.volume.percent;L.current.group_volume/=L.current.client_volumes.size,L.current.volumeEntered=!1}const Pe=Ae-L.current.group_volume;let tt;Pe<0?tt=(L.current.group_volume-Ae)/L.current.group_volume:tt=(Ae-L.current.group_volume)/(100-L.current.group_volume);for(const Ue of le()){let He=L.current.client_volumes.get(Ue.id);Pe<0?He-=tt*He:He+=tt*(100-He),Ue.config.volume.percent=He,t.snapcontrol.setVolume(Ue.id,He)}I(Ae)}function q(Ae){console.debug("handleVolumeChangeCommitted: "+Ae),L.current.volumeEntered=!0}function X(){var Ae;((Ae=t.server.getStream(t.group.stream_id))==null?void 0:Ae.properties.playbackStatus)==="playing"?t.snapcontrol.control(t.group.stream_id,"pause"):t.snapcontrol.control(t.group.stream_id,"play")}function me(){return _.map(Ae=>j.jsx(Dy,{open:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},autoHideDuration:6e3,onClose:(Pe,tt)=>{tt!=="clickaway"&&Q(Ae,!1)},children:j.jsxs(iy,{onClose:Pe=>{Q(Ae,!1)},severity:"info",sx:{width:"100%"},action:j.jsx(wi,{color:"inherit",size:"small",onClick:Pe=>{Q(Ae,!0)},children:"Undo"}),children:["Deleted ",Ae.getName()]})},"snackbar-"+Ae.id))}function le(){const Ae=[];for(const Pe of t.group.clients)(Pe.connected||t.showOffline)&&!_.includes(Pe)&&Ae.push(Pe);return Ae}const he=[];for(const Ae of le())he.push(j.jsx(FL,{client:Ae,snapcontrol:t.snapcontrol,onDelete:()=>{O(Ae)},onVolumeChange:()=>{B(Ae)}},Ae.id));if(he.length===0)return j.jsx("div",{children:me()});const de=t.server.getStream(t.group.stream_id),Ce=((ve=de==null?void 0:de.properties.metadata)==null?void 0:ve.artUrl)||LL,_e=((ce=de==null?void 0:de.properties.metadata)==null?void 0:ce.title)||"Unknown Title",ge=(we=de==null?void 0:de.properties.metadata)!=null&&we.artist?de.properties.metadata.artist.join(", "):"Unknown Artist";console.debug("Art URL: "+Ce);const ye=[];for(const Ae of t.server.groups)for(const Pe of Ae.clients)ye.push(Pe);return j.jsxs("div",{children:[j.jsxs(xM,{sx:{p:2,my:2,flexGrow:1},children:[j.jsxs(mi,{spacing:0,direction:"column",alignItems:"left",children:[j.jsxs(f0,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[j.jsxs(mi,{direction:"row",justifyContent:"center",alignItems:"center",children:[j.jsx(Do,{"aria-label":"Options",onClick:Ae=>{D()},children:j.jsx(IL,{})}),j.jsx(Ah,{variant:"standard",children:j.jsx(Sh,{id:"streamselect",value:t.group.stream_id,label:"Active stream",inputProps:{"aria-label":"Active stream"},onChange:Ae=>{const Pe=Ae.target.value;y(Pe),t.snapcontrol.setStream(t.group.id,Pe)},children:t.server.streams.map(Ae=>j.jsx(Ra,{value:Ae.id,children:Ae.id},Ae.id))})})]}),(de==null?void 0:de.properties.canControl)&&j.jsxs(mi,{direction:"row",justifyContent:"center",alignItems:"center",children:[j.jsx(Do,{"aria-label":"previous",onClick:()=>{t.snapcontrol.control(t.group.stream_id,"previous")},children:j.jsx(RL,{})}),j.jsx(Do,{"aria-label":"play/pause",onClick:()=>{X()},children:((Ne=t.server.getStream(t.group.stream_id))==null?void 0:Ne.properties.playbackStatus)==="playing"?j.jsx(ML,{}):j.jsx(Oy,{})}),j.jsx(Do,{"aria-label":"next",onClick:()=>{t.snapcontrol.control(t.group.stream_id,"next")},children:j.jsx(NL,{})})]})]}),(de==null?void 0:de.properties.metadata)&&j.jsxs(mi,{spacing:2,direction:"row",alignItems:"center",children:[j.jsx(TM,{component:"img",sx:{width:48},image:Ce,alt:_e+" cover"}),j.jsxs(mi,{spacing:0,direction:"column",justifyContent:"center",sx:{flexGrow:1,overflow:"hidden"},children:[j.jsx(no,{noWrap:!0,variant:"subtitle1",align:"left",children:_e}),j.jsx(no,{noWrap:!0,variant:"body1",align:"left",children:ge})]})]}),he.length>1&&j.jsxs(mi,{spacing:2,direction:"row",alignItems:"center",children:[j.jsx(Do,{"aria-label":"Mute",onClick:()=>{U()},children:t.group.muted?j.jsx(By,{}):j.jsx(jy,{})}),j.jsx(Ly,{"aria-label":"Volume",color:"secondary",min:0,max:100,size:"small",value:P,onChange:(Ae,Pe)=>{ee(Pe)},onChangeCommitted:(Ae,Pe)=>{q(Pe)}},"slider-"+t.group.id)]}),he.length===1&&j.jsx(Va,{sx:{py:.5}})]}),j.jsx(I2,{}),j.jsx(Va,{sx:{py:.5}}),j.jsx(j.Fragment,{children:he})]}),j.jsxs(nd,{fullWidth:!0,open:u,onClose:()=>{Z(!1)},children:[j.jsx(id,{children:"Group settings"}),j.jsxs(od,{children:[j.jsx(I2,{textAlign:"left",children:"Stream"}),j.jsx(Zo,{margin:"dense",id:"stream",select:!0,fullWidth:!0,variant:"standard",value:k,onChange:Ae=>{console.log("SetStream: "+Ae.target.value),y(Ae.target.value)},children:t.server.streams.map(Ae=>j.jsx(Ra,{value:Ae.id,children:Ae.id},Ae.id))}),j.jsx(I2,{textAlign:"left",children:"Clients"}),j.jsx(XN,{children:d.map(Ae=>j.jsx(by,{control:j.jsx(uy,{checked:Ae.inGroup,onChange:Pe=>{F(Ae.client,Pe.target.checked)}},"cb-"+Ae.client.id),label:Ae.client.getName()},"label-"+Ae.client.id))})]}),j.jsxs(rd,{children:[j.jsx(wi,{onClick:()=>{Z(!1)},children:"Cancel"}),j.jsx(wi,{onClick:()=>{Z(!0)},children:"OK"})]})]}),me()]})}function OL(t){return console.log("Render Server"),j.jsx(Va,{sx:{m:1.5},children:t.server.groups.map(r=>j.jsx(DL,{group:r,server:t.server,snapcontrol:t.snapcontrol,showOffline:t.showOffline},r.id))})}const BL="0.8.0"+(" (rev "+"66a15126578548ed544ab5b59acdece3825c2699".substring(0,8)+")");function jL(t){return j.jsx("div",{children:j.jsxs(nd,{open:t.open,scroll:"paper","aria-labelledby":"scroll-dialog-title","aria-describedby":"scroll-dialog-description",children:[j.jsx(id,{id:"scroll-dialog-title",children:"About Snapweb"}),j.jsx(od,{dividers:!0,children:j.jsxs(tN,{id:"scroll-dialog-description",tabIndex:-1,children:[j.jsxs("head",{children:[j.jsx("title",{children:"Snapweb licenses"}),j.jsx("meta",{httpEquiv:"content-type",content:"text/html;charset=utf-8"})]}),j.jsxs("body",{children:[j.jsxs("p",{children:["Version ",BL]}),j.jsxs("p",{children:["Copyright © 2020 - 2024 ",j.jsx("a",{href:"mailto:snapweb@badaix.de",children:"BadAix"})]}),j.jsxs("p",{children:["Author: ",j.jsx("a",{href:"https://de.linkedin.com/pub/johannes-pohl/65/6a6/253",children:"Johannes Pohl"})," and ",j.jsx("a",{href:"https://github.com/badaix/snapweb/graphs/contributors",children:"contributors"})]}),j.jsxs("div",{children:[j.jsx("h2",{children:"License"}),j.jsxs("p",{children:["Snapweb is licensed under the ",j.jsx("a",{href:"#gpl",children:"GNU General Public License, version 3 or later "})," (herein referred to as GPL)."]}),j.jsx("h2",{children:"How Can I Help?"}),j.jsx("p",{children:"If you find Snapcast and Snapweb useful, then I'd really appreciate it if you'd consider contributing to the project however you can. Donating is the easiest."}),j.jsxs("p",{children:["Donate on ",j.jsx("a",{href:"https://www.paypal.me/badaix",children:"PayPal"})]}),j.jsx("h2",{children:"Sources"}),j.jsxs("p",{children:["The sources to this application can be retrieved at ",j.jsx("a",{href:"https://github.com/badaix/snapweb",children:"https://github.com/badaix/snapweb"}),"."]}),j.jsx("h2",{children:"Libraries"}),j.jsxs("p",{children:["Snapweb uses external libraries that make extensive use of the following persons' or companies' code:",j.jsxs("table",{children:[j.jsxs("tr",{children:[j.jsx("th",{children:"name"}),j.jsx("th",{children:"license type"}),j.jsx("th",{children:"link"}),j.jsx("th",{children:"author"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@emotion/react"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/emotion-js/emotion.git#main"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@emotion/styled"}),j.jsx("td",{children:"MIT"}),j.jsx("td",{children:"git+https://github.com/emotion-js/emotion.git#main"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@mui/icons-material"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/mui/material-ui.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@mui/material"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/mui/material-ui.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@testing-library/jest-dom"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/testing-library/jest-dom.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@testing-library/react"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/testing-library/react-testing-library.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@testing-library/user-event"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/testing-library/user-event.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@types/jest"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"https://github.com/DefinitelyTyped/DefinitelyTyped.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@types/node"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"https://github.com/DefinitelyTyped/DefinitelyTyped.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@types/react"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"https://github.com/DefinitelyTyped/DefinitelyTyped.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@types/react-dom"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"https://github.com/DefinitelyTyped/DefinitelyTyped.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"libflacjs"}),j.jsx("td",{children:"MIT"}),j.jsx("td",{children:"git+https://github.com/mmig/libflac.js.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"react"}),j.jsx("td",{children:"MIT"}),j.jsx("td",{children:"git+https://github.com/facebook/react.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"react-dom"}),j.jsx("td",{children:"MIT"}),j.jsx("td",{children:"git+https://github.com/facebook/react.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"react-scripts"}),j.jsx("td",{children:"MIT"}),j.jsx("td",{children:"git+https://github.com/facebook/create-react-app.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"standardized-audio-context"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/chrisguttandin/standardized-audio-context.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"typescript"}),j.jsx("td",{children:"Apache-2.0"}),j.jsx("td",{children:"git+https://github.com/Microsoft/TypeScript.git"}),j.jsx("td",{children:"Microsoft Corp."})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"web-vitals"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/GoogleChrome/web-vitals.git"}),j.jsx("td",{children:"n/a"})]})]})]})]})]})]})}),j.jsx(rd,{children:j.jsx(wi,{onClick:t.onClose,children:"Close"})})]})})}var zL={BASE_URL:"./",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_GITREV:"66a15126578548ed544ab5b59acdece3825c2699",VITE_APP_NAME:"snapweb",VITE_APP_VERSION:"0.8.0"};const VL=zL.VITE_APP_SNAPSERVER_HOST||window.location.host,vs={snapserver_host:"snapserver.host",theme:"theme",showoffline:"showoffline"};var gi=(t=>(t.System="system",t.Light="light",t.Dark="dark",t))(gi||{});function F2(t,r){window.localStorage&&window.localStorage.setItem(t,r)}function d0(t,r=""){if(window.localStorage){const s=window.localStorage.getItem(t);return s!==null?s:(window.localStorage.setItem(t,r),r)}return r}const wr={get baseUrl(){return d0(vs.snapserver_host,(window.location.protocol==="https:"?"wss://":"ws://")+VL)},set baseUrl(t){F2(vs.snapserver_host,t)},get theme(){return d0(vs.theme,"system")},set theme(t){F2(vs.theme,t)},get showOffline(){return d0(vs.showoffline,String(!1))===String(!0)},set showOffline(t){F2(vs.showoffline,String(t))}};function WL(t){const[r,s]=J.useState(wr.baseUrl),[u,p]=J.useState(wr.theme),[d,b]=J.useState(wr.showOffline);function k(y){y&&(wr.baseUrl=r,wr.theme=u,wr.showOffline=d),t.onClose(y)}return j.jsx("div",{children:j.jsxs(nd,{open:t.open,children:[j.jsx(id,{children:"Settings"}),j.jsxs(od,{dividers:!0,children:[j.jsx(Zo,{autoFocus:!0,margin:"dense",id:"host",label:"Snapserver host",type:"text",fullWidth:!0,variant:"standard",onChange:y=>{s(y.target.value)},value:r}),j.jsx(Va,{sx:{py:1}}),j.jsxs(Ah,{variant:"standard",fullWidth:!0,sx:{minWidth:100},children:[j.jsx(Ay,{id:"theme-label",children:"Theme"}),j.jsxs(Sh,{labelId:"theme-select-label",id:"demo-theme-select",value:u,label:"Theme",onChange:y=>{console.log("Theme selected: "+y.target.value),p(y.target.value)},children:[j.jsx(Ra,{value:gi.System,children:gi.System}),j.jsx(Ra,{value:gi.Light,children:gi.Light}),j.jsx(Ra,{value:gi.Dark,children:gi.Dark})]})]}),j.jsx(Va,{sx:{py:1}}),j.jsx(by,{control:j.jsx(uy,{checked:d,onChange:(y,_)=>b(_)}),label:"Show offline clients"})]}),j.jsxs(rd,{children:[j.jsx(wi,{onClick:()=>{k(!1)},children:"Cancel"}),j.jsx(wi,{onClick:()=>{k(!0)},children:"OK"})]})]})})}var Ta;(t=>{class r{constructor(_){Ie(this,"arch","");Ie(this,"ip","");Ie(this,"mac","");Ie(this,"name","");Ie(this,"os","");this.fromJson(_)}fromJson(_){this.arch=_.arch,this.ip=_.ip,this.mac=_.mac,this.name=_.name,this.os=_.os}}t.Host=r;class s{constructor(_){Ie(this,"id","");Ie(this,"host");Ie(this,"snapclient");Ie(this,"config");Ie(this,"lastSeen");Ie(this,"connected",!1);this.fromJson(_)}fromJson(_){this.id=_.id,this.host=new r(_.host);const S=_.snapclient;this.snapclient={name:S.name,protocolVersion:S.protocolVersion,version:S.version};const P=_.config;this.config={instance:P.instance,latency:P.latency,name:P.name,volume:{muted:P.volume.muted,percent:P.volume.percent}},this.lastSeen={sec:_.lastSeen.sec,usec:_.lastSeen.usec},this.connected=!!_.connected}getName(){return this.config.name.length===0?this.host.name:this.config.name}}t.Client=s;class u{constructor(_){Ie(this,"name","");Ie(this,"id","");Ie(this,"stream_id","");Ie(this,"muted",!1);Ie(this,"clients",[]);this.fromJson(_)}fromJson(_){this.name=_.name,this.id=_.id,this.stream_id=_.stream_id,this.muted=!!_.muted;for(const S of _.clients)this.clients.push(new s(S))}getClient(_){for(const S of this.clients)if(S.id===_)return S;return null}}t.Group=u;class p{constructor(_){Ie(this,"title");Ie(this,"artist");Ie(this,"album");Ie(this,"artUrl");Ie(this,"duration");this.fromJson(_)}fromJson(_){this.title=_.title,this.artist=_.artist,this.album=_.album,this.artUrl=_.artUrl,this.duration=_.duration}}t.Metadata=p;class d{constructor(_){Ie(this,"loopStatus");Ie(this,"shuffle");Ie(this,"volume");Ie(this,"rate");Ie(this,"playbackStatus");Ie(this,"position");Ie(this,"minimumRate");Ie(this,"maximumRate");Ie(this,"canGoNext",!1);Ie(this,"canGoPrevious",!1);Ie(this,"canPlay",!1);Ie(this,"canPause",!1);Ie(this,"canSeek",!1);Ie(this,"canControl",!1);Ie(this,"metadata");this.fromJson(_)}fromJson(_){this.loopStatus=_.loopStatus,this.shuffle=_.shuffle,this.volume=_.volume,this.rate=_.rate,this.playbackStatus=_.playbackStatus,this.position=_.position,this.minimumRate=_.minimumRate,this.maximumRate=_.maximumRate,this.canGoNext=!!_.canGoNext,this.canGoPrevious=!!_.canGoPrevious,this.canPlay=!!_.canPlay,this.canPause=!!_.canPause,this.canSeek=!!_.canSeek,this.canControl=!!_.canControl,_.metadata!==void 0?this.metadata=new p(_.metadata):this.metadata=void 0}}t.Properties=d;class b{constructor(_){Ie(this,"id","");Ie(this,"status","");Ie(this,"uri");Ie(this,"properties");this.fromJson(_)}fromJson(_){this.id=_.id,this.status=_.status,_.properties!==void 0?this.properties=new d(_.properties):this.properties=new d({});const S=_.uri;this.uri={raw:S.raw,scheme:S.scheme,host:S.host,path:S.path,fragment:S.fragment,query:S.query}}}t.Stream=b;class k{constructor(_){Ie(this,"groups",[]);Ie(this,"server");Ie(this,"streams",[]);_&&this.fromJson(_)}fromJson(_){this.groups=[];for(const P of _.groups)this.groups.push(new u(P));const S=_.server.snapserver;this.server={host:new r(_.server.host),snapserver:{controlProtocolVersion:S.controlProtocolVersion,name:S.name,protocolVersion:S.protocolVersion,version:S.version}},this.streams=[];for(const P of _.streams)this.streams.push(new b(P))}getClient(_){for(const S of this.groups){const P=S.getClient(_);if(P)return P}return null}getGroup(_){for(const S of this.groups)if(S.id===_)return S;return null}getStream(_){for(const S of this.streams)if(S.id===_)return S;return null}}t.Server=k})(Ta||(Ta={}));class UL{constructor(){Ie(this,"onChange");Ie(this,"onConnectionChanged");Ie(this,"connection");Ie(this,"server");Ie(this,"msg_id");Ie(this,"status_req_id");Ie(this,"timer");this.onChange=null,this.onConnectionChanged=null,this.server=new Ta.Server,this.msg_id=0,this.status_req_id=-1,this.timer=null}connect(r){this.disconnect();try{this.connection=new WebSocket(r+"/jsonrpc"),this.connection.onmessage=s=>this.onMessage(s.data),this.connection.onopen=()=>{this.status_req_id=this.sendRequest("Server.GetStatus"),this.onConnectionChanged&&this.onConnectionChanged(this,!0)},this.connection.onerror=s=>{console.error("error:",s)},this.connection.onclose=()=>{this.onConnectionChanged&&this.onConnectionChanged(this,!1,"Connection lost, trying to reconnect."),console.info("connection lost, reconnecting in 1s"),this.timer=setTimeout(()=>this.connect(r),1e3)}}catch(s){console.info('Exception while connecting: "'+s+'", reconnecting in 1s'),this.onConnectionChanged&&this.onConnectionChanged(this,!1,'Exception while connecting: "'+s+'", trying to reconnect.'),this.timer=setTimeout(()=>this.connect(r),1e3)}}disconnect(){this.timer&&clearTimeout(this.timer),this.connection&&(this.connection.onclose=()=>{},this.connection.readyState===WebSocket.OPEN&&this.connection.close()),this.onConnectionChanged&&this.onConnectionChanged(this,!1)}onNotification(r){let s;switch(r.method){case"Client.OnVolumeChanged":return this.getClient(r.params.id).config.volume=r.params.volume,!0;case"Client.OnLatencyChanged":return this.getClient(r.params.id).config.latency=r.params.latency,!1;case"Client.OnNameChanged":return this.getClient(r.params.id).config.name=r.params.name,!0;case"Client.OnConnect":case"Client.OnDisconnect":return this.getClient(r.params.client.id).fromJson(r.params.client),!0;case"Group.OnMute":return this.getGroup(r.params.id).muted=!!r.params.mute,!0;case"Group.OnStreamChanged":return this.getGroup(r.params.id).stream_id=r.params.stream_id,!0;case"Stream.OnUpdate":return s=this.getStream(r.params.id),s.fromJson(r.params.stream),!0;case"Server.OnUpdate":return this.server.fromJson(r.params.server),!0;case"Stream.OnProperties":return s=this.getStream(r.params.id),s.properties.fromJson(r.params.properties),!0;default:return!1}}getClient(r){const s=this.server.getClient(r);if(s==null)throw new Error(`client ${r} was null`);return s}getGroup(r){const s=this.server.getGroup(r);if(s==null)throw new Error(`group ${r} was null`);return s}getGroupVolume(r,s){if(r.clients.length===0)return 0;let u=0,p=0;for(const d of r.clients)s&&!d.connected||(u+=d.config.volume.percent,++p);return p===0?0:u/p}getGroupFromClient(r){for(const s of this.server.groups)for(const u of s.clients)if(u.id===r)return s;throw new Error(`group for client ${r} was null`)}getStreamFromClient(r){const s=this.getGroupFromClient(r);return this.getStream(s.stream_id)}getStream(r){const s=this.server.getStream(r);if(s==null)throw new Error(`stream ${r} was null`);return s}setVolume(r,s,u){s=Math.max(0,Math.min(100,s));const p=this.getClient(r);p.config.volume.percent=s,u!==void 0&&(p.config.volume.muted=u),this.sendRequest("Client.SetVolume",{id:r,volume:{muted:p.config.volume.muted,percent:p.config.volume.percent}})}setClientName(r,s){const u=this.getClient(r),p=u.config.name!==""?u.config.name:u.host.name;s!==p&&(this.sendRequest("Client.SetName",{id:r,name:s}),u.config.name=s)}setClientLatency(r,s){const u=this.getClient(r),p=u.config.latency;s!==p&&(this.sendRequest("Client.SetLatency",{id:r,latency:s}),u.config.latency=s)}deleteClient(r){this.sendRequest("Server.DeleteClient",{id:r}),this.server.groups.forEach((s,u)=>{s.clients.forEach((p,d)=>{p.id===r&&this.server.groups[u].clients.splice(d,1)})}),this.server.groups.forEach((s,u)=>{s.clients.length===0&&this.server.groups.splice(u,1)})}setStream(r,s){this.getGroup(r).stream_id=s,this.sendRequest("Group.SetStream",{id:r,stream_id:s})}setClients(r,s){this.status_req_id=this.sendRequest("Group.SetClients",{id:r,clients:s})}muteGroup(r,s){this.getGroup(r).muted=s,this.sendRequest("Group.SetMute",{id:r,mute:s})}control(r,s,u){const p={id:r,command:s};u&&(p.params=u),this.sendRequest("Stream.Control",p)}sendRequest(r,s){const u={id:++this.msg_id,jsonrpc:"2.0",method:r};s&&(u.params=s);const p=JSON.stringify(u);return console.debug("Sending: "+p),this.connection.send(p),this.msg_id}onMessage(r){let s=!1;const u=JSON.parse(r);if(u.id!==void 0)u.id===this.status_req_id&&(this.server=new Ta.Server(u.result.server),s=!0);else{if(Array.isArray(u))for(const d of u)s=this.onNotification(d)||s;else s=this.onNotification(u);s=!0}s&&(this.onChange?(console.debug("onChange"),this.onChange(this,this.server)):console.debug("no onChange"))}}function HL(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Eh={exports:{}};Eh.exports;(function(t){var r={};(function(s,u){if(t.exports){var p=typeof process<"u"&&process&&r?r:s;u(p,t,HL)}else s.Flac=u(s)})(typeof self<"u"?self:typeof window<"u"?window:c3,function(s,u,p){var d=d||{},b=!1;if(d.onRuntimeInitialized=function(){b=!0,ci?ns("ready",[{type:"ready",target:ci}],!0):setTimeout(function(){ns("ready",[{type:"ready",target:ci}],!0)},0)},s&&s.FLAC_SCRIPT_LOCATION){d.locateFile=function(x){var M=s.FLAC_SCRIPT_LOCATION||"";return M[x]?M[x]:(M+=M&&!/\/$/.test(M)?"/":"",M+x)};var F=function(x){if(I){var M=Z(x,!0);return M.buffer||(M=new Uint8Array(M)),Ae(M.buffer),M}return new Promise(function(W,$){var re=new XMLHttpRequest;re.responseType="arraybuffer",re.addEventListener("load",function(se){W(re.response)}),re.addEventListener("error",function(se){$(se)}),re.open("GET",x),re.send()})}}if(s&&typeof s.fetch=="function"){var k=s.fetch;s.fetch=function(w){return k.apply(null,arguments).catch(function(x){try{var M=F(w);return M&&M.catch&&M.catch(function(W){throw x}),M}catch{throw x}})}}var y={},_;for(_ in d)d.hasOwnProperty(_)&&(y[_]=d[_]);var S=!1,P=!1,I=!1,L=!1;S=typeof window=="object",P=typeof importScripts=="function",I=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",L=!S&&!I&&!P;var R="";function D(w){return d.locateFile?d.locateFile(w,R):R+w}var Z,F,O,B;I?(P?R=p("path").dirname(R)+"/":R=__dirname+"/",Z=function(x,M){var W=es(x);return W?M?W:W.toString():(O||(O=p("fs")),B||(B=p("path")),x=B.normalize(x),O.readFileSync(x,M?null:"utf8"))},F=function(x){var M=Z(x,!0);return M.buffer||(M=new Uint8Array(M)),Ae(M.buffer),M},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),t.exports=d,d.inspect=function(){return"[Emscripten Module object]"}):L?(typeof read<"u"&&(Z=function(x){var M=es(x);return M?Bh(M):read(x)}),F=function(x){var M;return M=es(x),M||(typeof readbuffer=="function"?new Uint8Array(readbuffer(x)):(M=read(x,"binary"),Ae(typeof M=="object"),M))},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(S||P)&&(P?R=self.location.href:document.currentScript&&(R=document.currentScript.src),R.indexOf("blob:")!==0?R=R.substr(0,R.lastIndexOf("/")+1):R="",Z=function(x){try{var M=new XMLHttpRequest;return M.open("GET",x,!1),M.send(null),M.responseText}catch($){var W=es(x);if(W)return Bh(W);throw $}},P&&(F=function(x){try{var M=new XMLHttpRequest;return M.open("GET",x,!1),M.responseType="arraybuffer",M.send(null),new Uint8Array(M.response)}catch($){var W=es(x);if(W)return W;throw $}}));var Q=d.print||console.log.bind(console),U=d.printErr||console.warn.bind(console);for(_ in y)y.hasOwnProperty(_)&&(d[_]=y[_]);y=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit;function ee(w,x){return w}var q=[],X;function me(w,x){var M=we;if(!X){X=new WeakMap;for(var W=0;W=27&&Pr("Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."),x.push(null)},x.set=function(M,W){x[M]=W},x.get=function(M){return x[M]},x},Module:function(w){},Instance:function(w,x){this.exports=function(W,$,re){var se=new ArrayBuffer(8),fe=new Int32Array(se),xe=new Float32Array(se),Fe=new Float64Array(se);function Oe(gt){return fe[gt]}function ot(gt,_n){fe[gt]=_n}function rt(){return Fe[0]}function qe(gt){Fe[0]=gt}function yt(gt){xe[0]=gt}function en(gt,_n,zt){var _l=_n.memory,Le=re,K=new gt.Int8Array(zt),Ut=new gt.Int16Array(zt),e=new gt.Int32Array(zt),H=new gt.Uint8Array(zt),tn=new gt.Uint16Array(zt),ze=new gt.Uint32Array(zt),Ze=new gt.Float32Array(zt),it=new gt.Float64Array(zt),ie=gt.Math.imul,ue=gt.Math.fround,Dn=gt.Math.abs,Kt=gt.Math.clz32;gt.Math.min,gt.Math.max;var f8=gt.Math.floor;gt.Math.ceil,gt.Math.sqrt,_n.abort,gt.NaN;var d8=gt.Infinity,p8=_n.emscripten_resize_heap,h8=_n.emscripten_memcpy_big,m8=_n.fd_close,g8=_n.fd_read,b8=_n.round,$h=_n.fd_write,v8=_n.setTempRet0,k8=_n.fd_seek,be=5257216,rs=0,os=0,ne=0;function y8(){}function _8(){return 11584}function ba(i){var o=0,n=0;o=e[3544],n=i+3&-4,i=o+n|0;e:{if(i>>>0<=o>>>0&&(n|0)>=1||i>>>0>eg()<<16>>>0&&!p8(i|0))break e;return e[3544]=i,o}return e[2896]=48,-1}function In(i,o){var n=0,a=0;e:{if(!o||(n=i+o|0,K[n+-1|0]=0,K[i|0]=0,o>>>0<3)||(K[n+-2|0]=0,K[i+1|0]=0,K[n+-3|0]=0,K[i+2|0]=0,o>>>0<7)||(K[n+-4|0]=0,K[i+3|0]=0,o>>>0<9)||(a=0-i&3,n=a+i|0,e[n>>2]=0,a=o-a&-4,o=a+n|0,e[o+-4>>2]=0,a>>>0<9)||(e[n+8>>2]=0,e[n+4>>2]=0,e[o+-8>>2]=0,e[o+-12>>2]=0,a>>>0<25)||(e[n+24>>2]=0,e[n+20>>2]=0,e[n+16>>2]=0,e[n+12>>2]=0,e[o+-16>>2]=0,e[o+-20>>2]=0,e[o+-24>>2]=0,e[o+-28>>2]=0,o=a,a=n&4|24,o=o-a|0,o>>>0<32))break e;for(n=n+a|0;e[n+24>>2]=0,e[n+28>>2]=0,e[n+16>>2]=0,e[n+20>>2]=0,e[n+8>>2]=0,e[n+12>>2]=0,e[n>>2]=0,e[n+4>>2]=0,n=n+32|0,o=o+-32|0,o>>>0>31;);}return i}function gn(i,o,n){var a=0,c=0,f=0;if(n>>>0>=512)return h8(i|0,o|0,n|0)|0,i;c=i+n|0;e:{if(!((i^o)&3)){t:{if((n|0)<1){n=i;break t}if(!(i&3)){n=i;break t}for(n=i;;){if(K[n|0]=H[o|0],o=o+1|0,n=n+1|0,n>>>0>=c>>>0)break t;if(!(n&3))break}}a=c&-4;t:{if(a>>>0<64||(f=a+-64|0,n>>>0>f>>>0))break t;for(;e[n>>2]=e[o>>2],e[n+4>>2]=e[o+4>>2],e[n+8>>2]=e[o+8>>2],e[n+12>>2]=e[o+12>>2],e[n+16>>2]=e[o+16>>2],e[n+20>>2]=e[o+20>>2],e[n+24>>2]=e[o+24>>2],e[n+28>>2]=e[o+28>>2],e[n+32>>2]=e[o+32>>2],e[n+36>>2]=e[o+36>>2],e[n+40>>2]=e[o+40>>2],e[n+44>>2]=e[o+44>>2],e[n+48>>2]=e[o+48>>2],e[n+52>>2]=e[o+52>>2],e[n+56>>2]=e[o+56>>2],e[n+60>>2]=e[o+60>>2],o=o- -64|0,n=n- -64|0,n>>>0<=f>>>0;);}if(n>>>0>=a>>>0)break e;for(;e[n>>2]=e[o>>2],o=o+4|0,n=n+4|0,n>>>0>>0;);break e}if(c>>>0<4){n=i;break e}if(a=c+-4|0,a>>>0>>0){n=i;break e}for(n=i;K[n|0]=H[o|0],K[n+1|0]=H[o+1|0],K[n+2|0]=H[o+2|0],K[n+3|0]=H[o+3|0],o=o+4|0,n=n+4|0,n>>>0<=a>>>0;);}if(n>>>0>>0)for(;K[n|0]=H[o|0],o=o+1|0,n=n+1|0,(c|0)!=(n|0););return i}function bn(i){i=i|0;var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0;A=be-16|0,be=A;e:{t:{n:{o:{r:{i:{a:{s:{l:{u:{f:{if(i>>>0<=244){if(l=e[2897],f=i>>>0<11?16:i+11&-8,i=f>>>3|0,o=l>>>i|0,o&3){n=i+((o^-1)&1)|0,f=n<<3,o=e[f+11636>>2],i=o+8|0,a=e[o+8>>2],f=f+11628|0;c:{if((a|0)==(f|0)){C=11588,E=Xe(-2,n)&l,e[C>>2]=E;break c}e[a+12>>2]=f,e[f+8>>2]=a}n=n<<3,e[o+4>>2]=n|3,o=o+n|0,e[o+4>>2]=e[o+4>>2]|1;break e}if(h=e[2899],f>>>0<=h>>>0)break f;if(o){n=2<>>12&16,n=o,i=i>>>o|0,o=i>>>5&8,n=n|o,i=i>>>o|0,o=i>>>2&4,n=n|o,i=i>>>o|0,o=i>>>1&2,n=n|o,i=i>>>o|0,o=i>>>1&1,n=(n|o)+(i>>>o|0)|0,a=n<<3,o=e[a+11636>>2],i=e[o+8>>2],a=a+11628|0;c:{if((i|0)==(a|0)){l=Xe(-2,n)&l,e[2897]=l;break c}e[i+12>>2]=a,e[a+8>>2]=i}if(i=o+8|0,e[o+4>>2]=f|3,c=o+f|0,n=n<<3,a=n-f|0,e[c+4>>2]=a|1,e[o+n>>2]=a,h){f=h>>>3|0,o=(f<<3)+11628|0,n=e[2902],f=1<>2]}e[o+8>>2]=n,e[f+12>>2]=n,e[n+12>>2]=o,e[n+8>>2]=f}e[2902]=c,e[2899]=a;break e}if(v=e[2898],!v)break f;for(i=(v&0-v)+-1|0,o=i>>>12&16,n=o,i=i>>>o|0,o=i>>>5&8,n=n|o,i=i>>>o|0,o=i>>>2&4,n=n|o,i=i>>>o|0,o=i>>>1&2,n=n|o,i=i>>>o|0,o=i>>>1&1,o=e[((n|o)+(i>>>o|0)<<2)+11892>>2],a=(e[o+4>>2]&-8)-f|0,n=o;;){c:{if(i=e[n+16>>2],!i&&(i=e[n+20>>2],!i))break c;c=(e[i+4>>2]&-8)-f|0,n=c>>>0>>0,a=n?c:a,o=n?i:o,n=i;continue}break}if(m=e[o+24>>2],c=e[o+12>>2],(c|0)!=(o|0)){i=e[o+8>>2],e[i+12>>2]=c,e[c+8>>2]=i;break t}if(n=o+20|0,i=e[n>>2],!i){if(i=e[o+16>>2],!i)break u;n=o+16|0}for(;g=n,c=i,n=i+20|0,i=e[n>>2],!(!i&&(n=c+16|0,i=e[c+16>>2],!i)););e[g>>2]=0;break t}if(f=-1,i>>>0>4294967231||(i=i+11|0,f=i&-8,g=e[2898],!g))break f;n=0-f|0,i=i>>>8|0,h=0;c:{if(!i||(h=31,f>>>0>16777215))break c;a=i+1048320>>>16&8,o=i<>>16&4,l=o<>>16&2,i=(l<>>15|0)-(o|(i|a))|0,h=(i<<1|f>>>i+21&1)+28|0}a=e[(h<<2)+11892>>2];c:{d:{p:{if(!a){i=0;break p}for(o=f<<((h|0)==31?0:25-(h>>>1|0)|0),i=0;;){h:{if(l=(e[a+4>>2]&-8)-f|0,l>>>0>=n>>>0||(c=a,n=l,n))break h;n=0,i=a;break d}if(l=e[a+20>>2],a=e[((o>>>29&4)+a|0)+16>>2],i=l?(l|0)==(a|0)?i:l:i,o=o<<((a|0)!=0),!a)break}}if(!(i|c)){if(i=2<>>12&16,a=o,i=i>>>o|0,o=i>>>5&8,a=a|o,i=i>>>o|0,o=i>>>2&4,a=a|o,i=i>>>o|0,o=i>>>1&2,a=a|o,i=i>>>o|0,o=i>>>1&1,i=e[((a|o)+(i>>>o|0)<<2)+11892>>2]}if(!i)break c}for(;a=(e[i+4>>2]&-8)-f|0,o=a>>>0>>0,n=o?a:n,c=o?i:c,o=e[i+16>>2],o?i=o:i=e[i+20>>2],!!i;);}if(!c|n>>>0>=e[2899]-f>>>0)break f;if(h=e[c+24>>2],o=e[c+12>>2],(c|0)!=(o|0)){i=e[c+8>>2],e[i+12>>2]=o,e[o+8>>2]=i;break n}if(a=c+20|0,i=e[a>>2],!i){if(i=e[c+16>>2],!i)break l;a=c+16|0}for(;l=a,o=i,a=i+20|0,i=e[a>>2],!(!i&&(a=o+16|0,i=e[o+16>>2],!i)););e[l>>2]=0;break n}if(o=e[2899],o>>>0>=f>>>0){i=e[2902],n=o-f|0;f:{if(n>>>0>=16){e[2899]=n,a=i+f|0,e[2902]=a,e[a+4>>2]=n|1,e[i+o>>2]=n,e[i+4>>2]=f|3;break f}e[2902]=0,e[2899]=0,e[i+4>>2]=o|3,o=i+o|0,e[o+4>>2]=e[o+4>>2]|1}i=i+8|0;break e}if(o=e[2900],o>>>0>f>>>0){o=o-f|0,e[2900]=o,i=e[2903],n=i+f|0,e[2903]=n,e[n+4>>2]=o|1,e[i+4>>2]=f|3,i=i+8|0;break e}if(i=0,c=f+47|0,a=c,e[3015]?n=e[3017]:(e[3018]=-1,e[3019]=-1,e[3016]=4096,e[3017]=4096,e[3015]=A+12&-16^1431655768,e[3020]=0,e[3008]=0,n=4096),l=a+n|0,g=0-n|0,n=l&g,n>>>0<=f>>>0||(a=e[3007],a&&(h=e[3005],m=h+n|0,m>>>0<=h>>>0|m>>>0>a>>>0)))break e;if(H[12032]&4)break i;f:{c:{if(a=e[2903],a)for(i=12036;;){if(h=e[i>>2],h+e[i+4>>2]>>>0>a>>>0&&h>>>0<=a>>>0)break c;if(i=e[i+8>>2],!i)break}if(o=ba(0),(o|0)==-1||(l=n,i=e[3016],a=i+-1|0,a&o&&(l=(n-o|0)+(o+a&0-i)|0),l>>>0<=f>>>0|l>>>0>2147483646)||(i=e[3007],i&&(a=e[3005],g=a+l|0,g>>>0<=a>>>0|g>>>0>i>>>0)))break a;if(i=ba(l),(o|0)!=(i|0))break f;break r}if(l=g&l-o,l>>>0>2147483646)break a;if(o=ba(l),(o|0)==(e[i>>2]+e[i+4>>2]|0))break s;i=o}if(!((i|0)==-1|f+48>>>0<=l>>>0)){if(o=e[3017],o=o+(c-l|0)&0-o,o>>>0>2147483646){o=i;break r}if((ba(o)|0)!=-1){l=o+l|0,o=i;break r}ba(0-l|0);break a}if(o=i,(i|0)!=-1)break r;break a}c=0;break t}o=0;break n}if((o|0)!=-1)break r}e[3008]=e[3008]|4}if(n>>>0>2147483646||(o=ba(n),i=ba(0),o>>>0>=i>>>0|(o|0)==-1|(i|0)==-1)||(l=i-o|0,l>>>0<=f+40>>>0))break o}i=e[3005]+l|0,e[3005]=i,i>>>0>ze[3006]&&(e[3006]=i);r:{i:{a:{if(a=e[2903],a){for(i=12036;;){if(n=e[i>>2],c=e[i+4>>2],(n+c|0)==(o|0))break a;if(i=e[i+8>>2],!i)break}break i}for(i=e[2901],o>>>0>=i>>>0&&i||(e[2901]=o),i=0,e[3010]=l,e[3009]=o,e[2905]=-1,e[2906]=e[3015],e[3012]=0;n=i<<3,a=n+11628|0,e[n+11636>>2]=a,e[n+11640>>2]=a,i=i+1|0,(i|0)!=32;);i=l+-40|0,n=o+8&7?-8-o&7:0,a=i-n|0,e[2900]=a,n=o+n|0,e[2903]=n,e[n+4>>2]=a|1,e[(i+o|0)+4>>2]=40,e[2904]=e[3019];break r}if(H[i+12|0]&8|o>>>0<=a>>>0|n>>>0>a>>>0)break i;e[i+4>>2]=c+l,i=a+8&7?-8-a&7:0,o=i+a|0,e[2903]=o,n=e[2900]+l|0,i=n-i|0,e[2900]=i,e[o+4>>2]=i|1,e[(n+a|0)+4>>2]=40,e[2904]=e[3019];break r}i=e[2901],o>>>0>>0&&(e[2901]=o,i=0),n=o+l|0,i=12036;i:{a:{s:{l:{u:{f:{for(;;){if((n|0)!=e[i>>2]){if(i=e[i+8>>2],i)continue;break f}break}if(!(H[i+12|0]&8))break u}for(i=12036;;){if(n=e[i>>2],n>>>0<=a>>>0&&(c=n+e[i+4>>2]|0,c>>>0>a>>>0))break l;i=e[i+8>>2]}}if(e[i>>2]=o,e[i+4>>2]=e[i+4>>2]+l,h=(o+8&7?-8-o&7:0)+o|0,e[h+4>>2]=f|3,o=n+(n+8&7?-8-n&7:0)|0,i=(o-h|0)-f|0,c=f+h|0,(o|0)==(a|0)){e[2903]=c,i=e[2900]+i|0,e[2900]=i,e[c+4>>2]=i|1;break a}if(e[2902]==(o|0)){e[2902]=c,i=e[2899]+i|0,e[2899]=i,e[c+4>>2]=i|1,e[i+c>>2]=i;break a}if(n=e[o+4>>2],(n&3)==1){m=n&-8;u:{if(n>>>0<=255){if(a=e[o+8>>2],f=n>>>3|0,n=e[o+12>>2],(n|0)==(a|0)){C=11588,E=e[2897]&Xe(-2,f),e[C>>2]=E;break u}e[a+12>>2]=n,e[n+8>>2]=a;break u}g=e[o+24>>2],l=e[o+12>>2];f:{if((l|0)!=(o|0)){n=e[o+8>>2],e[n+12>>2]=l,e[l+8>>2]=n;break f}c:{if(a=o+20|0,f=e[a>>2],f||(a=o+16|0,f=e[a>>2],f))break c;l=0;break f}for(;n=a,l=f,a=f+20|0,f=e[a>>2],!(!f&&(a=l+16|0,f=e[l+16>>2],!f)););e[n>>2]=0}if(!g)break u;n=e[o+28>>2],a=(n<<2)+11892|0;f:{if(e[a>>2]==(o|0)){if(e[a>>2]=l,l)break f;C=11592,E=e[2898]&Xe(-2,n),e[C>>2]=E;break u}if(e[g+(e[g+16>>2]==(o|0)?16:20)>>2]=l,!l)break u}if(e[l+24>>2]=g,n=e[o+16>>2],n&&(e[l+16>>2]=n,e[n+24>>2]=l),n=e[o+20>>2],!n)break u;e[l+20>>2]=n,e[n+24>>2]=l}o=o+m|0,i=i+m|0}if(e[o+4>>2]=e[o+4>>2]&-2,e[c+4>>2]=i|1,e[i+c>>2]=i,i>>>0<=255){o=i>>>3|0,i=(o<<3)+11628|0,n=e[2897],o=1<>2]}e[i+8>>2]=c,e[o+12>>2]=c,e[c+12>>2]=i,e[c+8>>2]=o;break a}l=c,o=i>>>8|0,n=0;u:{if(!o||(n=31,i>>>0>16777215))break u;a=o+1048320>>>16&8,n=o<>>16&4,f=n<>>16&2,o=(f<>>15|0)-(n|(o|a))|0,n=(o<<1|i>>>o+21&1)+28|0}o=n,e[l+28>>2]=o,e[c+16>>2]=0,e[c+20>>2]=0,n=(o<<2)+11892|0,a=e[2898],f=1<>2]=c;break u}for(a=i<<((o|0)==31?0:25-(o>>>1|0)|0),o=e[n>>2];;){if(n=o,(e[o+4>>2]&-8)==(i|0))break s;if(o=a>>>29|0,a=a<<1,f=(n+(o&4)|0)+16|0,o=e[f>>2],!o)break}e[f>>2]=c}e[c+24>>2]=n,e[c+12>>2]=c,e[c+8>>2]=c;break a}for(i=l+-40|0,n=o+8&7?-8-o&7:0,g=i-n|0,e[2900]=g,n=o+n|0,e[2903]=n,e[n+4>>2]=g|1,e[(i+o|0)+4>>2]=40,e[2904]=e[3019],i=(c+(c+-39&7?39-c&7:0)|0)+-47|0,n=i>>>0>>0?a:i,e[n+4>>2]=27,i=e[3012],e[n+16>>2]=e[3011],e[n+20>>2]=i,i=e[3010],e[n+8>>2]=e[3009],e[n+12>>2]=i,e[3011]=n+8,e[3010]=l,e[3009]=o,e[3012]=0,i=n+24|0;e[i+4>>2]=7,o=i+8|0,i=i+4|0,c>>>0>o>>>0;);if((n|0)==(a|0))break r;if(e[n+4>>2]=e[n+4>>2]&-2,l=n-a|0,e[a+4>>2]=l|1,e[n>>2]=l,l>>>0<=255){o=l>>>3|0,i=(o<<3)+11628|0,n=e[2897],o=1<>2]}e[i+8>>2]=a,e[o+12>>2]=a,e[a+12>>2]=i,e[a+8>>2]=o;break r}e[a+16>>2]=0,e[a+20>>2]=0,h=a,i=l>>>8|0,o=0;l:{if(!i||(o=31,l>>>0>16777215))break l;n=i+1048320>>>16&8,o=i<>>16&4,c=o<>>16&2,i=(c<>>15|0)-(o|(i|n))|0,o=(i<<1|l>>>i+21&1)+28|0}i=o,e[h+28>>2]=i,o=(i<<2)+11892|0,n=e[2898],c=1<>2]=a,e[a+24>>2]=o;break l}for(i=l<<((i|0)==31?0:25-(i>>>1|0)|0),o=e[o>>2];;){if(n=o,(l|0)==(e[o+4>>2]&-8))break i;if(o=i>>>29|0,i=i<<1,c=(n+(o&4)|0)+16|0,o=e[c>>2],!o)break}e[c>>2]=a,e[a+24>>2]=n}e[a+12>>2]=a,e[a+8>>2]=a;break r}i=e[n+8>>2],e[i+12>>2]=c,e[n+8>>2]=c,e[c+24>>2]=0,e[c+12>>2]=n,e[c+8>>2]=i}i=h+8|0;break e}i=e[n+8>>2],e[i+12>>2]=a,e[n+8>>2]=a,e[a+24>>2]=0,e[a+12>>2]=n,e[a+8>>2]=i}if(i=e[2900],i>>>0<=f>>>0)break o;o=i-f|0,e[2900]=o,i=e[2903],n=i+f|0,e[2903]=n,e[n+4>>2]=o|1,e[i+4>>2]=f|3,i=i+8|0;break e}e[2896]=48,i=0;break e}n:{if(!h)break n;i=e[c+28>>2],a=(i<<2)+11892|0;o:{if(e[a>>2]==(c|0)){if(e[a>>2]=o,o)break o;g=Xe(-2,i)&g,e[2898]=g;break n}if(e[h+(e[h+16>>2]==(c|0)?16:20)>>2]=o,!o)break n}if(e[o+24>>2]=h,i=e[c+16>>2],i&&(e[o+16>>2]=i,e[i+24>>2]=o),i=e[c+20>>2],!i)break n;e[o+20>>2]=i,e[i+24>>2]=o}n:{if(n>>>0<=15){i=n+f|0,e[c+4>>2]=i|3,i=i+c|0,e[i+4>>2]=e[i+4>>2]|1;break n}if(e[c+4>>2]=f|3,o=c+f|0,e[o+4>>2]=n|1,e[o+n>>2]=n,n>>>0<=255){n=n>>>3|0,i=(n<<3)+11628|0,a=e[2897],n=1<>2]}e[i+8>>2]=o,e[n+12>>2]=o,e[o+12>>2]=i,e[o+8>>2]=n;break n}h=o,i=n>>>8|0,a=0;o:{if(!i||(a=31,n>>>0>16777215))break o;f=i+1048320>>>16&8,a=i<>>16&4,l=a<>>16&2,i=(l<>>15|0)-(a|(i|f))|0,a=(i<<1|n>>>i+21&1)+28|0}i=a,e[h+28>>2]=i,e[o+16>>2]=0,e[o+20>>2]=0,a=(i<<2)+11892|0;o:{f=1<>2]=o;break r}for(i=n<<((i|0)==31?0:25-(i>>>1|0)|0),f=e[a>>2];;){if(a=f,(e[a+4>>2]&-8)==(n|0))break o;if(f=i>>>29|0,i=i<<1,l=(a+(f&4)|0)+16|0,f=e[l>>2],!f)break}e[l>>2]=o}e[o+24>>2]=a,e[o+12>>2]=o,e[o+8>>2]=o;break n}i=e[a+8>>2],e[i+12>>2]=o,e[a+8>>2]=o,e[o+24>>2]=0,e[o+12>>2]=a,e[o+8>>2]=i}i=c+8|0;break e}t:{if(!m)break t;i=e[o+28>>2],n=(i<<2)+11892|0;n:{if(e[n>>2]==(o|0)){if(e[n>>2]=c,c)break n;C=11592,E=Xe(-2,i)&v,e[C>>2]=E;break t}if(e[(e[m+16>>2]==(o|0)?16:20)+m>>2]=c,!c)break t}if(e[c+24>>2]=m,i=e[o+16>>2],i&&(e[c+16>>2]=i,e[i+24>>2]=c),i=e[o+20>>2],!i)break t;e[c+20>>2]=i,e[i+24>>2]=c}t:{if(a>>>0<=15){i=a+f|0,e[o+4>>2]=i|3,i=i+o|0,e[i+4>>2]=e[i+4>>2]|1;break t}if(e[o+4>>2]=f|3,f=o+f|0,e[f+4>>2]=a|1,e[a+f>>2]=a,h){c=h>>>3|0,i=(c<<3)+11628|0,n=e[2902],c=1<>2]}e[i+8>>2]=n,e[l+12>>2]=n,e[n+12>>2]=i,e[n+8>>2]=l}e[2902]=f,e[2899]=a}i=o+8|0}return be=A+16|0,i|0}function Me(i){i=i|0;var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0;e:{if(!i)break e;a=i+-8|0,n=e[i+-4>>2],i=n&-8,f=a+i|0;t:{if(n&1)break t;if(!(n&3)||(n=e[a>>2],a=a-n|0,a>>>0>>0<=255){if(c=e[a+8>>2],n=n>>>3|0,o=e[a+12>>2],(o|0)==(c|0)){g=11588,m=e[2897]&Xe(-2,n),e[g>>2]=m;break t}e[c+12>>2]=o,e[o+8>>2]=c;break t}h=e[a+24>>2],n=e[a+12>>2];n:{if((n|0)!=(a|0)){o=e[a+8>>2],e[o+12>>2]=n,e[n+8>>2]=o;break n}o:{if(c=a+20|0,o=e[c>>2],o||(c=a+16|0,o=e[c>>2],o))break o;n=0;break n}for(;l=c,n=o,c=n+20|0,o=e[c>>2],!(!o&&(c=n+16|0,o=e[n+16>>2],!o)););e[l>>2]=0}if(!h)break t;c=e[a+28>>2],o=(c<<2)+11892|0;n:{if(e[o>>2]==(a|0)){if(e[o>>2]=n,n)break n;g=11592,m=e[2898]&Xe(-2,c),e[g>>2]=m;break t}if(e[h+(e[h+16>>2]==(a|0)?16:20)>>2]=n,!n)break t}if(e[n+24>>2]=h,o=e[a+16>>2],o&&(e[n+16>>2]=o,e[o+24>>2]=n),o=e[a+20>>2],!o)break t;e[n+20>>2]=o,e[o+24>>2]=n;break t}if(n=e[f+4>>2],(n&3)!=3)break t;e[2899]=i,e[f+4>>2]=n&-2,e[a+4>>2]=i|1,e[i+a>>2]=i;return}if(f>>>0<=a>>>0||(n=e[f+4>>2],!(n&1)))break e;t:{if(!(n&2)){if((f|0)==e[2903]){if(e[2903]=a,i=e[2900]+i|0,e[2900]=i,e[a+4>>2]=i|1,e[2902]!=(a|0))break e;e[2899]=0,e[2902]=0;return}if((f|0)==e[2902]){e[2902]=a,i=e[2899]+i|0,e[2899]=i,e[a+4>>2]=i|1,e[i+a>>2]=i;return}i=(n&-8)+i|0;n:{if(n>>>0<=255){if(o=e[f+8>>2],n=n>>>3|0,c=e[f+12>>2],(o|0)==(c|0)){g=11588,m=e[2897]&Xe(-2,n),e[g>>2]=m;break n}e[o+12>>2]=c,e[c+8>>2]=o;break n}h=e[f+24>>2],n=e[f+12>>2];o:{if((f|0)!=(n|0)){o=e[f+8>>2],e[o+12>>2]=n,e[n+8>>2]=o;break o}r:{if(c=f+20|0,o=e[c>>2],o||(c=f+16|0,o=e[c>>2],o))break r;n=0;break o}for(;l=c,n=o,c=n+20|0,o=e[c>>2],!(!o&&(c=n+16|0,o=e[n+16>>2],!o)););e[l>>2]=0}if(!h)break n;c=e[f+28>>2],o=(c<<2)+11892|0;o:{if((f|0)==e[o>>2]){if(e[o>>2]=n,n)break o;g=11592,m=e[2898]&Xe(-2,c),e[g>>2]=m;break n}if(e[h+((f|0)==e[h+16>>2]?16:20)>>2]=n,!n)break n}if(e[n+24>>2]=h,o=e[f+16>>2],o&&(e[n+16>>2]=o,e[o+24>>2]=n),o=e[f+20>>2],!o)break n;e[n+20>>2]=o,e[o+24>>2]=n}if(e[a+4>>2]=i|1,e[i+a>>2]=i,e[2902]!=(a|0))break t;e[2899]=i;return}e[f+4>>2]=n&-2,e[a+4>>2]=i|1,e[i+a>>2]=i}if(i>>>0<=255){i=i>>>3|0,n=(i<<3)+11628|0,o=e[2897],i=1<>2]}e[n+8>>2]=a,e[i+12>>2]=a,e[a+12>>2]=n,e[a+8>>2]=i;return}e[a+16>>2]=0,e[a+20>>2]=0,f=a,c=i>>>8|0,o=0;t:{if(!c||(o=31,i>>>0>16777215))break t;n=c,c=c+1048320>>>16&8,o=n<>>16&4,o=o<>>16&2,o=(o<>>15|0)-(l|(c|h))|0,o=(o<<1|i>>>o+21&1)+28|0}e[f+28>>2]=o,l=(o<<2)+11892|0;t:{n:{c=e[2898],n=1<>2]=a,e[a+24>>2]=l;break o}for(c=i<<((o|0)==31?0:25-(o>>>1|0)|0),n=e[l>>2];;){if(o=n,(e[n+4>>2]&-8)==(i|0))break n;if(n=c>>>29|0,c=c<<1,l=(o+(n&4)|0)+16|0,n=e[l>>2],!n)break}e[l>>2]=a,e[a+24>>2]=o}e[a+12>>2]=a,e[a+8>>2]=a;break t}i=e[o+8>>2],e[i+12>>2]=a,e[o+8>>2]=a,e[a+24>>2]=0,e[a+12>>2]=o,e[a+8>>2]=i}if(i=e[2905]+-1|0,e[2905]=i,i)break e;for(a=12044;i=e[a>>2],a=i+8|0,!!i;);e[2905]=-1}}function Ho(i,o){var n=0,a=0,c=0;n=0;e:{if(!i||(a=oe(i,0,o,0),c=ne,n=a,(i|o)>>>0<65536))break e;n=c?-1:a}return o=n,i=bn(o),!i|!(H[i+-4|0]&3)||In(i,o),i}function xn(i,o){var n=0,a=0;return i?o>>>0>=4294967232?(e[2896]=48,0):(n=w8(i+-8|0,o>>>0<11?16:o+11&-8),n?n+8|0:(n=bn(o),n?(a=e[i+-4>>2],a=(a&3?-4:-8)+(a&-8)|0,gn(n,i,a>>>0>>0?a:o),Me(i),n):0)):bn(o)}function w8(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0;h=e[i+4>>2],n=h&3,a=h&-8,f=a+i|0;e:{if(!n){if(n=0,o>>>0<256||a>>>0>=o+4>>>0&&(n=i,a-o>>>0<=e[3017]<<1>>>0))break e;return 0}t:{if(a>>>0>=o>>>0){if(n=a-o|0,n>>>0<16)break t;e[i+4>>2]=h&1|o|2,o=i+o|0,e[o+4>>2]=n|3,e[f+4>>2]=e[f+4>>2]|1,em(o,n);break t}if(n=0,(f|0)==e[2903]){if(c=a+e[2900]|0,c>>>0<=o>>>0)break e;e[i+4>>2]=h&1|o|2,n=i+o|0,o=c-o|0,e[n+4>>2]=o|1,e[2900]=o,e[2903]=n;break t}if((f|0)==e[2902]){if(c=a+e[2899]|0,c>>>0>>0)break e;n=c-o|0;n:{if(n>>>0>=16){e[i+4>>2]=h&1|o|2,o=i+o|0,e[o+4>>2]=n|1,c=i+c|0,e[c>>2]=n,e[c+4>>2]=e[c+4>>2]&-2;break n}e[i+4>>2]=c|h&1|2,o=i+c|0,e[o+4>>2]=e[o+4>>2]|1,n=0,o=0}e[2902]=o,e[2899]=n;break t}if(l=e[f+4>>2],l&2||(g=a+(l&-8)|0,g>>>0>>0))break e;v=g-o|0;n:{if(l>>>0<=255){if(n=l>>>3|0,l=e[f+8>>2],c=e[f+12>>2],(l|0)==(c|0)){A=11588,C=e[2897]&Xe(-2,n),e[A>>2]=C;break n}e[l+12>>2]=c,e[c+8>>2]=l;break n}m=e[f+24>>2],a=e[f+12>>2];o:{if((f|0)!=(a|0)){n=e[f+8>>2],e[n+12>>2]=a,e[a+8>>2]=n;break o}r:{if(n=f+20|0,l=e[n>>2],l||(n=f+16|0,l=e[n>>2],l))break r;a=0;break o}for(;c=n,a=l,n=a+20|0,l=e[n>>2],!(!l&&(n=a+16|0,l=e[a+16>>2],!l)););e[c>>2]=0}if(!m)break n;c=e[f+28>>2],n=(c<<2)+11892|0;o:{if((f|0)==e[n>>2]){if(e[n>>2]=a,a)break o;A=11592,C=e[2898]&Xe(-2,c),e[A>>2]=C;break n}if(e[((f|0)==e[m+16>>2]?16:20)+m>>2]=a,!a)break n}if(e[a+24>>2]=m,n=e[f+16>>2],n&&(e[a+16>>2]=n,e[n+24>>2]=a),n=e[f+20>>2],!n)break n;e[a+20>>2]=n,e[n+24>>2]=a}if(v>>>0<=15){e[i+4>>2]=h&1|g|2,o=i+g|0,e[o+4>>2]=e[o+4>>2]|1;break t}e[i+4>>2]=h&1|o|2,n=i+o|0,e[n+4>>2]=v|3,o=i+g|0,e[o+4>>2]=e[o+4>>2]|1,em(n,v)}n=i}return n}function em(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0;f=i+o|0;e:{t:{if(n=e[i+4>>2],n&1)break t;if(!(n&3))break e;if(n=e[i>>2],o=n+o|0,i=i-n|0,(i|0)!=e[2902]){if(n>>>0<=255){if(c=n>>>3|0,n=e[i+8>>2],a=e[i+12>>2],(a|0)==(n|0)){g=11588,m=e[2897]&Xe(-2,c),e[g>>2]=m;break t}e[n+12>>2]=a,e[a+8>>2]=n;break t}h=e[i+24>>2],n=e[i+12>>2];n:{if((n|0)!=(i|0)){a=e[i+8>>2],e[a+12>>2]=n,e[n+8>>2]=a;break n}o:{if(a=i+20|0,c=e[a>>2],c||(a=i+16|0,c=e[a>>2],c))break o;n=0;break n}for(;l=a,n=c,a=n+20|0,c=e[a>>2],!(!c&&(a=n+16|0,c=e[n+16>>2],!c)););e[l>>2]=0}if(!h)break t;a=e[i+28>>2],c=(a<<2)+11892|0;n:{if(e[c>>2]==(i|0)){if(e[c>>2]=n,n)break n;g=11592,m=e[2898]&Xe(-2,a),e[g>>2]=m;break t}if(e[h+(e[h+16>>2]==(i|0)?16:20)>>2]=n,!n)break t}if(e[n+24>>2]=h,a=e[i+16>>2],a&&(e[n+16>>2]=a,e[a+24>>2]=n),a=e[i+20>>2],!a)break t;e[n+20>>2]=a,e[a+24>>2]=n;break t}if(n=e[f+4>>2],(n&3)!=3)break t;e[2899]=o,e[f+4>>2]=n&-2,e[i+4>>2]=o|1,e[f>>2]=o;return}n=e[f+4>>2];t:{if(!(n&2)){if((f|0)==e[2903]){if(e[2903]=i,o=e[2900]+o|0,e[2900]=o,e[i+4>>2]=o|1,e[2902]!=(i|0))break e;e[2899]=0,e[2902]=0;return}if((f|0)==e[2902]){e[2902]=i,o=e[2899]+o|0,e[2899]=o,e[i+4>>2]=o|1,e[i+o>>2]=o;return}o=(n&-8)+o|0;n:{if(n>>>0<=255){if(c=n>>>3|0,n=e[f+8>>2],a=e[f+12>>2],(n|0)==(a|0)){g=11588,m=e[2897]&Xe(-2,c),e[g>>2]=m;break n}e[n+12>>2]=a,e[a+8>>2]=n;break n}h=e[f+24>>2],n=e[f+12>>2];o:{if((f|0)!=(n|0)){a=e[f+8>>2],e[a+12>>2]=n,e[n+8>>2]=a;break o}r:{if(a=f+20|0,c=e[a>>2],c||(a=f+16|0,c=e[a>>2],c))break r;n=0;break o}for(;l=a,n=c,a=n+20|0,c=e[a>>2],!(!c&&(a=n+16|0,c=e[n+16>>2],!c)););e[l>>2]=0}if(!h)break n;a=e[f+28>>2],c=(a<<2)+11892|0;o:{if((f|0)==e[c>>2]){if(e[c>>2]=n,n)break o;g=11592,m=e[2898]&Xe(-2,a),e[g>>2]=m;break n}if(e[h+((f|0)==e[h+16>>2]?16:20)>>2]=n,!n)break n}if(e[n+24>>2]=h,a=e[f+16>>2],a&&(e[n+16>>2]=a,e[a+24>>2]=n),a=e[f+20>>2],!a)break n;e[n+20>>2]=a,e[a+24>>2]=n}if(e[i+4>>2]=o|1,e[i+o>>2]=o,e[2902]!=(i|0))break t;e[2899]=o;return}e[f+4>>2]=n&-2,e[i+4>>2]=o|1,e[i+o>>2]=o}if(o>>>0<=255){n=o>>>3|0,o=(n<<3)+11628|0,a=e[2897],n=1<>2]}e[o+8>>2]=i,e[n+12>>2]=i,e[i+12>>2]=o,e[i+8>>2]=n;return}e[i+16>>2]=0,e[i+20>>2]=0,a=i,c=o>>>8|0,n=0;t:{if(!c||(n=31,o>>>0>16777215))break t;l=c+1048320>>>16&8,c=c<>>16&4,f=c<>>16&2,n=(f<>>15|0)-(c|(n|l))|0,n=(n<<1|o>>>n+21&1)+28|0}e[a+28>>2]=n,c=(n<<2)+11892|0;t:{a=e[2898],l=1<>2]=i;break n}for(a=o<<((n|0)==31?0:25-(n>>>1|0)|0),n=e[c>>2];;){if(c=n,(e[n+4>>2]&-8)==(o|0))break t;if(n=a>>>29|0,a=a<<1,l=(c+(n&4)|0)+16|0,n=e[l>>2],!n)break}e[l>>2]=i}e[i+24>>2]=c,e[i+12>>2]=i,e[i+8>>2]=i;return}o=e[c+8>>2],e[o+12>>2]=i,e[c+8>>2]=i,e[i+24>>2]=0,e[i+12>>2]=c,e[i+8>>2]=o}}function A8(i,o){var n=0;n=(o|0)!=0;e:{t:{n:{if(!o|!(i&3))break n;for(;;){if(H[i|0]==79)break t;if(i=i+1|0,o=o+-1|0,n=(o|0)!=0,!o)break n;if(!(i&3))break}}if(!n)break e}t:{if(H[i|0]==79|o>>>0<4)break t;for(;;){if(n=e[i>>2]^1330597711,(n^-1)&n+-16843009&-2139062144)break t;if(i=i+4|0,o=o+-4|0,!(o>>>0>3))break}}if(!o)break e;for(;;){if(H[i|0]==79)return i;if(i=i+1|0,o=o+-1|0,!o)break}}return 0}function tm(i,o){var n=0,a=0,c=0;if(qe(+i),n=Oe(1)|0,a=Oe(0)|0,c=n,n=n>>>20&2047,(n|0)!=2047){if(!n)return n=o,i==0?o=0:(i=tm(i*18446744073709552e3,o),o=e[o>>2]+-64|0),e[n>>2]=o,i;e[o>>2]=n+-1022,ot(0,a|0),ot(1,c&-2146435073|1071644672),i=+rt()}return i}function vr(i,o,n,a,c,f){var l=0,h=0,g=0,m=0;e:{if(f&64){a=o,c=f+-64|0,o=c&31,32<=(c&63)>>>0?(c=a<>>32-o|n<>>0?(h=l<>>32-a|c<>>0?(f=0,a=a>>>c|0):(f=a>>>c|0,a=((1<>>c),a=m|a,c=f|h,f=o,o=g&31,32<=(g&63)>>>0?(h=f<>>32-o|n<>2]=o,e[i+4>>2]=n,e[i+8>>2]=a,e[i+12>>2]=c}function wl(i,o,n,a,c,f){var l=0,h=0,g=0,m=0;e:{if(f&64){n=f+-64|0,o=n&31,32<=(n&63)>>>0?(n=0,o=c>>>o|0):(n=c>>>o|0,o=((1<>>o),a=0,c=0;break e}if(!f)break e;h=c,g=a,m=64-f|0,l=m&31,32<=(m&63)>>>0?(h=g<>>32-l|h<>>0?(l=0,o=n>>>o|0):(l=n>>>o|0,o=((1<>>o),o=m|o,n=l|h,l=a,a=f&31,32<=(f&63)>>>0?(h=0,a=c>>>a|0):(h=c>>>a|0,a=((1<>>a),c=h}e[i>>2]=o,e[i+4>>2]=n,e[i+8>>2]=a,e[i+12>>2]=c}function C8(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0;l=be-32|0,be=l,c=a&2147483647,g=c,c=c+-1006698496|0,h=n,f=n,n>>>0<0&&(c=c+1|0),m=f,f=c,c=g+-1140785152|0,v=h,h>>>0<0&&(c=c+1|0);e:{if((c|0)==(f|0)&m>>>0>>0|f>>>0>>0){if(c=a<<4|n>>>28,n=n<<4|o>>>28,o=o&268435455,h=o,(o|0)==134217728&i>>>0>=1|o>>>0>134217728){c=c+1073741824|0,i=n+1|0,i>>>0<1&&(c=c+1|0),f=i;break e}if(f=n,c=c-((n>>>0<0)+-1073741824|0)|0,i|h^134217728)break e;i=f+(f&1)|0,i>>>0>>0&&(c=c+1|0),f=i;break e}if(!(!h&(g|0)==2147418112?!(i|o):(g|0)==2147418112&h>>>0<0|g>>>0<2147418112)){c=a<<4|n>>>28,f=n<<4|o>>>28,c=c&524287|2146959360;break e}if(f=0,c=2146435072,g>>>0>1140785151||(c=0,h=g>>>16|0,h>>>0<15249))break e;if(c=a&65535|65536,vr(l+16|0,i,o,n,c,h+-15233|0),wl(l,i,o,n,c,15361-h|0),n=e[l+4>>2],i=e[l+8>>2],c=e[l+12>>2]<<4|i>>>28,f=i<<4|n>>>28,i=n&268435455,n=i,o=e[l>>2]|((e[l+16>>2]|e[l+24>>2])!=0|(e[l+20>>2]|e[l+28>>2])!=0),(i|0)==134217728&o>>>0>=1|i>>>0>134217728){i=f+1|0,i>>>0<1&&(c=c+1|0),f=i;break e}if(o|n^134217728)break e;i=f+(f&1)|0,i>>>0>>0&&(c=c+1|0),f=i}return be=l+32|0,ot(0,f|0),ot(1,a&-2147483648|c),+rt()}function nm(i,o){var n=0;if(o)for(;n=H[(H[i|0]^n)+1024|0],i=i+1|0,o=o+-1|0,!!o;);return n}function x8(i,o){var n=0,a=0;if(o>>>0>7)for(;a=n,n=H[i|0]|H[i+1|0]<<8,n=a^(n<<8&16711680|n<<24)>>>16,n=tn[(H[i+7|0]<<1)+1280>>1]^(tn[((H[i+6|0]<<1)+1280|0)+512>>1]^(tn[(H[i+5|0]<<1)+2304>>1]^(tn[(H[i+4|0]<<1)+2816>>1]^(tn[(H[i+3|0]<<1)+3328>>1]^(tn[(H[i+2|0]<<1)+3840>>1]^(tn[((n&255)<<1)+4352>>1]^tn[(n>>>7&510)+4864>>1])))))),i=i+8|0,o=o+-8|0,o>>>0>7;);if(o)for(;n=tn[((H[i|0]^(n&65280)>>>8)<<1)+1280>>1]^n<<8,i=i+1|0,o=o+-1|0,!!o;);return n&65535}function rm(i,o,n){var a=0;if(o>>>0>=2)for(;a=n,n=e[i>>2],a=a^n>>>16,a=tn[((a&255)<<1)+4352>>1]^tn[(a>>>7&510)+4864>>1]^tn[(n>>>7&510)+3840>>1]^tn[((n&255)<<1)+3328>>1],n=e[i+4>>2],n=a^tn[(n>>>23&510)+2816>>1]^tn[(n>>>15&510)+2304>>1]^tn[((n>>>7&510)+1280|0)+512>>1]^tn[((n&255)<<1)+1280>>1],i=i+8|0,o=o+-2|0,o>>>0>1;);return o&&(i=e[i>>2],o=i>>>16^n,n=tn[((o&255)<<1)+2304>>1]^tn[(o>>>7&510)+2816>>1]^tn[((i>>>7&510)+1280|0)+512>>1]^tn[((i&255)<<1)+1280>>1]),n&65535}function Go(i,o,n){var a=0;e:{if((i|0)==(o|0))break e;if((o-i|0)-n>>>0<=0-(n<<1)>>>0){gn(i,o,n);return}a=(i^o)&3;t:{n:{if(i>>>0>>0){if(a)break t;if(!(i&3))break n;for(;;){if(!n)break e;if(K[i|0]=H[o|0],o=o+1|0,n=n+-1|0,i=i+1|0,!(i&3))break}break n}o:{if(a)break o;if(i+n&3)for(;;){if(!n)break e;if(n=n+-1|0,a=n+i|0,K[a|0]=H[o+n|0],!(a&3))break}if(n>>>0<=3)break o;for(;n=n+-4|0,e[n+i>>2]=e[o+n>>2],n>>>0>3;);}if(!n)break e;for(;n=n+-1|0,K[n+i|0]=H[o+n|0],!!n;);break e}if(n>>>0<=3)break t;for(;e[i>>2]=e[o>>2],o=o+4|0,i=i+4|0,n=n+-4|0,n>>>0>3;);}if(!n)break e;for(;K[i|0]=H[o|0],i=i+1|0,o=o+1|0,n=n+-1|0,!!n;);}}function xd(i){var o=0;o=e[i>>2],o&&Me(o),Me(i)}function S8(i){var o=0;o=e[i>>2],o&&Me(o),e[i+36>>2]=0,e[i+40>>2]=0,e[i>>2]=0,e[i+4>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0}function E8(i,o){var n=0;return e[i+8>>2]=0,e[i+12>>2]=0,e[i+4>>2]=2048,e[i+16>>2]=0,e[i+20>>2]=0,n=bn(8192),e[i>>2]=n,n?(e[i+40>>2]=o,e[i+36>>2]=7,1):0}function P8(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0;f=e[i+16>>2],n=e[i+28>>2];e:{if(f>>>0<=n>>>0){c=n;break e}if(o=e[i+32>>2],!o){c=n;break e}if(c=n+1|0,e[i+28>>2]=c,a=e[i+24>>2],o>>>0<=31){for(n=e[e[i>>2]+(n<<2)>>2];a=tn[((n>>>24-o&255^a>>>8)<<1)+1280>>1]^a<<8&65280,h=o>>>0<24,l=o+8|0,o=l,!!h;);e[i+32>>2]=l}e[i+32>>2]=0,e[i+24>>2]=a}o=rm(e[i>>2]+(c<<2)|0,f-c|0,tn[i+24>>1]),e[i+28>>2]=0,e[i+24>>2]=o,n=e[i+20>>2];e:{if(!n||(a=e[i+32>>2],a>>>0>=n>>>0))break e;for(c=e[e[i>>2]+(e[i+16>>2]<<2)>>2];o=tn[((c>>>24-a&255^o>>>8)<<1)+1280>>1]^o<<8&65280,a=a+8|0,a>>>0>>0;);e[i+32>>2]=a,e[i+24>>2]=o}return o}function Sd(i){return!(H[i+20|0]&7)}function om(i){return 8-(e[i+20>>2]&7)|0}function Je(i,o,n){var a=0,c=0,f=0;e:{if(n){t:{for(;;){if(f=e[i+8>>2],c=e[i+16>>2],a=e[i+20>>2],((f-c<<5)+(e[i+12>>2]<<3)|0)-a>>>0>=n>>>0)break t;if(!Al(i))break}return 0}if(f>>>0>c>>>0){if(a){if(f=e[i>>2],c=e[f+(c<<2)>>2]&-1>>>a,a=32-a|0,a>>>0>n>>>0){e[o>>2]=c>>>a-n,e[i+20>>2]=e[i+20>>2]+n;break e}if(e[o>>2]=c,e[i+20>>2]=0,e[i+16>>2]=e[i+16>>2]+1,n=n-a|0,!n)break e;return a=e[o>>2]<>2]=a,e[o>>2]=a|e[(e[i+16>>2]<<2)+f>>2]>>>32-n,e[i+20>>2]=n,1}if(a=e[e[i>>2]+(c<<2)>>2],n>>>0<=31){e[o>>2]=a>>>32-n,e[i+20>>2]=n;break e}return e[o>>2]=a,e[i+16>>2]=e[i+16>>2]+1,1}if(c=e[e[i>>2]+(c<<2)>>2],a){e[o>>2]=(c&-1>>>a)>>>32-(n+a|0),e[i+20>>2]=e[i+20>>2]+n;break e}e[o>>2]=c>>>32-n,e[i+20>>2]=e[i+20>>2]+n;break e}e[o>>2]=0}return 1}function Al(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0;l=be-16|0,be=l,f=e[i+16>>2];e:{if(!f){n=e[i+8>>2];break e}o=e[i+28>>2];t:{if(f>>>0<=o>>>0){a=o;break t}if(n=e[i+32>>2],!n){a=o;break t}if(a=o+1|0,e[i+28>>2]=a,c=e[i+24>>2],n>>>0<=31){for(o=e[e[i>>2]+(o<<2)>>2];c=tn[((o>>>24-n&255^c>>>8)<<1)+1280>>1]^c<<8&65280,h=n>>>0<24,g=n+8|0,n=g,!!h;);e[i+32>>2]=g}e[i+32>>2]=0,e[i+24>>2]=c}o=rm(e[i>>2]+(a<<2)|0,f-a|0,tn[i+24>>1]),e[i+28>>2]=0,e[i+24>>2]=o,a=e[i>>2],o=e[i+16>>2],Go(a,a+(o<<2)|0,(e[i+8>>2]-o|0)+(e[i+12>>2]!=0)<<2),e[i+16>>2]=0,n=e[i+8>>2]-o|0,e[i+8>>2]=n}o=e[i+12>>2],a=(e[i+4>>2]-n<<2)-o|0,e[l+12>>2]=a,c=0;e:{if(!a||(a=e[i>>2]+(n<<2)|0,n=a+o|0,o&&(o=e[a>>2],e[a>>2]=o<<24|o<<8&16711680|(o>>>8&65280|o>>>24)),!Le[e[i+36>>2]](n,l+12|0,e[i+40>>2])))break e;if(f=e[l+12>>2],n=e[i+12>>2],c=e[i+8>>2],o=c<<2,a=(f+(n+o|0)|0)+3>>>2|0,g=i,c>>>0>>0){for(n=e[i>>2];h=n+(c<<2)|0,o=e[h>>2],e[h>>2]=o<<8&16711680|o<<24|(o>>>8&65280|o>>>24),c=c+1|0,(a|0)!=(c|0););n=e[i+12>>2],o=e[i+8>>2]<<2}o=o+(n+f|0)|0,e[g+12>>2]=o&3,e[i+8>>2]=o>>>2,c=1}return be=l+16|0,c}function Di(i,o,n){var a=0,c=0;a=be-16|0,be=a,c=0;e:{if(!Je(i,a+12|0,n))break e;i=1<>2]=(i^e[a+12>>2])-i,c=1}return i=c,be=a+16|0,i}function Oi(i,o,n){var a=0,c=0,f=0,l=0;a=be-16|0,be=a,c=o,f=o;e:{t:{if(n>>>0>=33){if(!Je(i,a+12|0,n+-32|0)||!Je(i,a+8|0,32))break e;i=e[a+12>>2],n=0,e[o>>2]=n,e[o+4>>2]=i,o=e[a+8>>2]|n;break t}if(!Je(i,a+8|0,n))break e;i=0,o=e[a+8>>2]}e[f>>2]=o,e[c+4>>2]=i,l=1}return be=a+16|0,l}function Ed(i,o){var n=0,a=0,c=0;n=be-16|0,be=n,e[n+8>>2]=0;e:{if(!Je(i,n+8|0,8)||!Je(i,n+12|0,8)||(a=e[n+8>>2]|e[n+12>>2]<<8,e[n+8>>2]=a,!Je(i,n+12|0,8))||(a=a|e[n+12>>2]<<16,e[n+8>>2]=a,!Je(i,n+12|0,8)))break e;i=a|e[n+12>>2]<<24,e[n+8>>2]=i,e[o>>2]=i,c=1}return be=n+16|0,c}function Pd(i,o){var n=0,a=0,c=0,f=0;a=be-16|0,be=a,c=1;e:{if(!o)break e;n=e[i+20>>2]&7;t:{if(n){if(n=8-n|0,n=n>>>0>>0?n:o,!Je(i,a+8|0,n))break t;o=o-n|0}if(n=o>>>3|0,n){for(;;){n:{if(!e[i+20>>2]){if(n>>>0>3){for(;;){f=e[i+16>>2];o:{if(f>>>0>2]){e[i+16>>2]=f+1,n=n+-4|0;break o}if(!Al(i))break t}if(!(n>>>0>3))break}if(!n)break n}for(;;){if(!Je(i,a+12|0,8))break t;if(n=n+-1|0,!n)break}break n}if(!Je(i,a+12|0,8))break t;if(n=n+-1|0,n)continue}break}o=o&7}if(!o||Je(i,a+8|0,o))break e}c=0}return be=a+16|0,c}function is(i,o){var n=0,a=0,c=0;n=be-16|0,be=n,a=1;e:{if(!o)break e;for(;;){t:{if(!e[i+20>>2]){n:{if(o>>>0<4)break n;for(;;){c=e[i+16>>2];o:{if(c>>>0>2]){e[i+16>>2]=c+1,o=o+-4|0;break o}if(!Al(i))break t}if(!(o>>>0>3))break}if(o)break n;break e}for(;;){if(!Je(i,n+12|0,8))break t;if(o=o+-1|0,!o)break}break e}if(!Je(i,n+12|0,8))break t;if(o=o+-1|0,o)continue;break e}break}a=0}return be=n+16|0,a}function Io(i,o,n){var a=0,c=0;c=be-16|0,be=c;e:{if(!n){a=1;break e}for(;;){if(!e[i+20>>2]){t:{if(n>>>0<4)break t;for(;;){n:{if(a=e[i+16>>2],a>>>0>2]){e[i+16>>2]=a+1,a=e[e[i>>2]+(a<<2)>>2],a=a<<24|a<<8&16711680|(a>>>8&65280|a>>>24),K[o|0]=a,K[o+1|0]=a>>>8,K[o+2|0]=a>>>16,K[o+3|0]=a>>>24,n=n+-4|0,o=o+4|0;break n}if(Al(i))break n;a=0;break e}if(!(n>>>0>3))break}if(n)break t;a=1;break e}for(;;){if(!Je(i,c+12|0,8)){a=0;break e}if(K[o|0]=e[c+12>>2],a=1,o=o+1|0,n=n+-1|0,!n)break}break e}if(!Je(i,c+12|0,8)){a=0;break e}if(K[o|0]=e[c+12>>2],a=1,o=o+1|0,n=n+-1|0,!n)break}}return be=c+16|0,a}function Md(i,o){var n=0,a=0,c=0;e[o>>2]=0;e:{for(;;){a=e[i+16>>2];t:{if(a>>>0>=ze[i+8>>2]){n=e[i+20>>2];break t}for(n=e[i+20>>2],c=e[i>>2];;){if(a=e[c+(a<<2)>>2]<>2],o=Kt(a),e[n>>2]=c+o,n=(o+e[i+20>>2]|0)+1|0,e[i+20>>2]=n,o=1,n>>>0<32)break e;return e[i+20>>2]=0,e[i+16>>2]=e[i+16>>2]+1,1}if(e[o>>2]=(e[o>>2]-n|0)+32,n=0,e[i+20>>2]=0,a=e[i+16>>2]+1|0,e[i+16>>2]=a,!(a>>>0>2]))break}}if(c=e[i+12>>2]<<3,c>>>0>n>>>0){if(a=(e[e[i>>2]+(a<<2)>>2]&-1<<32-c)<>2],o=Kt(a),e[n>>2]=c+o,e[i+20>>2]=(o+e[i+20>>2]|0)+1,1;e[o>>2]=e[o>>2]+(c-n|0),e[i+20>>2]=c}if(!Al(i))break}o=0}return o}function im(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0;l=be-16|0,be=l,C=(n<<2)+o|0;e:{if(!a){if(N=1,(n|0)<1)break e;for(;;){if(!Md(i,l+8|0)){N=0;break e}if(n=e[l+8>>2],e[o>>2]=n>>>1^0-(n&1),o=o+4|0,!(o>>>0>>0))break}break e}t:{n:{if(c=e[i+16>>2],v=e[i+8>>2],c>>>0>=v>>>0)break n;A=e[i>>2],E=e[i+20>>2],m=e[A+(c<<2)>>2]<>>0>>0)for(T=32-a|0;;){n=c,h=f;a:{if(m){h=Kt(m),g=h;break a}for(;;){if(n=n+1|0,n>>>0>=v>>>0)break i;if(m=e[(n<<2)+A>>2],g=Kt(m),h=g+h|0,!!m)break}}c=m<>>T|0,e[l+8>>2]=h,f=(h^-1)+f&31;a:{if(f>>>0>=a>>>0){m=c<>>0>=v>>>0)break r;n=e[(c<<2)+A>>2],f=f+T|0,m=n<<32-f,g=n>>>f|g}if(e[l+12>>2]=g,n=h<>2]=n>>>1^0-(n&1),o=o+4|0,!(o>>>0>>0))break}o=c>>>0>>0,e[i+16>>2]=(o&!f)+c,e[i+20>>2]=32-(f||o<<5),N=1;break e}e[i+20>>2]=0,n=c+1|0,e[i+16>>2]=v>>>0>n>>>0?v:n;break n}if(!Md(i,l+8|0))break e;h=e[l+8>>2]+h|0,e[l+8>>2]=h,g=0,f=0;break o}e[i+16>>2]=c,e[i+20>>2]=0}if(!Je(i,l+12|0,a-f|0))break e;if(n=h<>2]|g,e[l+12>>2]=c,h=0,n=n|c,e[o>>2]=n>>>1^0-(n&1),A=e[i>>2],c=e[i+16>>2],E=e[i+20>>2],m=e[A+(c<<2)>>2]<>2],o=o+4|0,c>>>0>>0|o>>>0>=C>>>0)break t}n=1;continue}n=0}}return be=l+16|0,N}function M8(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0;h=be-16|0,be=h;e:{if(!Je(i,h+12|0,8))break e;c=e[h+12>>2],n&&(f=e[a>>2],e[a>>2]=f+1,K[n+f|0]=c);t:{n:{o:{r:{if(!(c&128))break r;i:{if(!(!(c&192)|c&32)){l=31,f=1;break i}if(!(!(c&224)|c&16)){l=15,f=2;break i}if(!(!(c&240)|c&8)){l=7,f=3;break i}if(c&248&&(l=3,f=4,!(c&4)))break i;if(!(c&252)|c&2)break o;l=1,f=5}if(c=c&l,!n)for(;;){if(!Je(i,h+12|0,8))break e;if(n=e[h+12>>2],(n&192)!=128)break n;if(c=n&63|c<<6,f=f+-1|0,!f)break r}for(;;){if(!Je(i,h+12|0,8))break e;if(l=e[h+12>>2],g=e[a>>2],e[a>>2]=g+1,K[n+g|0]=l,(l&192)!=128)break n;if(c=l&63|c<<6,f=f+-1|0,!f)break}}e[o>>2]=c;break t}e[o>>2]=-1;break t}e[o>>2]=-1}m=1}return be=h+16|0,m}function I8(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0;h=be-16|0,be=h;e:{if(!Je(i,h+12|0,8))break e;c=e[h+12>>2],n&&(l=e[a>>2],e[a>>2]=l+1,K[n+l|0]=c);t:{n:{o:{r:{if(c&128){if(!(!(c&192)|c&32)){c=c&31,f=1;break r}if(!(!(c&224)|c&16)){c=c&15,f=2;break r}if(!(!(c&240)|c&8)){c=c&7,f=3;break r}if(!(!(c&248)|c&4)){c=c&3,f=4;break r}if(!(!(c&252)|c&2)){c=c&1,f=5;break r}if(f=1,!(!(c&254)|c&1)){f=6,c=0;break r}e[o>>2]=-1,e[o+4>>2]=-1;break e}l=0;break o}if(l=0,!n)for(;;){if(!Je(i,h+12|0,8)){f=0;break e}if(n=e[h+12>>2],(n&192)!=128)break n;if(n=n&63,l=l<<6|c>>>26,c=n|c<<6,f=f+-1|0,!f)break o}for(;;){if(!Je(i,h+12|0,8)){f=0;break e}if(g=e[h+12>>2],m=e[a>>2],e[a>>2]=m+1,K[n+m|0]=g,(g&192)!=128)break n;if(l=l<<6|c>>>26,c=g&63|c<<6,f=f+-1|0,!f)break}}e[o>>2]=c,e[o+4>>2]=l;break t}e[o>>2]=-1,e[o+4>>2]=-1}f=1}return be=h+16|0,f}function N8(i,o){var n=0,a=0,c=0,f=0,l=0;n=be-208|0,be=n,e[n+8>>2]=1,e[n+12>>2]=0;e:{if(f=ie(o,24),!f)break e;for(e[n+16>>2]=24,e[n+20>>2]=24,o=24,c=o,a=2;l=c+24|0,c=o,o=o+l|0,e[(n+16|0)+(a<<2)>>2]=o,a=a+1|0,o>>>0>>0;);c=(i+f|0)+-24|0;t:{if(c>>>0<=i>>>0){a=1,o=1;break t}for(a=1,o=1;;){n:{if((a&3)==3){Id(i,o,n+16|0),su(n+8|0,2),o=o+2|0;break n}a=o+-1|0;o:{if(ze[(n+16|0)+(a<<2)>>2]>=c-i>>>0){lu(i,n+8|0,o,0,n+16|0);break o}Id(i,o,n+16|0)}if((o|0)==1){cu(n+8|0,1),o=0;break n}cu(n+8|0,a),o=1}if(a=e[n+8>>2]|1,e[n+8>>2]=a,i=i+24|0,!(i>>>0>>0))break}}for(lu(i,n+8|0,o,0,n+16|0);;){t:{n:{o:{if(!((o|0)!=1|(a|0)!=1)){if(e[n+12>>2])break o;break e}if((o|0)>1)break n}c=am(n+8|0),su(n+8|0,c),a=e[n+8>>2],o=o+c|0;break t}cu(n+8|0,2),e[n+8>>2]=e[n+8>>2]^7,su(n+8|0,1),f=i+-24|0,c=o+-2|0,lu(f-e[(n+16|0)+(c<<2)>>2]|0,n+8|0,o+-1|0,1,n+16|0),cu(n+8|0,1),a=e[n+8>>2]|1,e[n+8>>2]=a,lu(f,n+8|0,c,1,n+16|0),o=c}i=i+-24|0}}be=n+208|0}function Id(i,o,n){var a=0,c=0,f=0,l=0,h=0;a=be-240|0,be=a,e[a>>2]=i,l=1;e:{if((o|0)<2)break e;for(c=i;;){if(f=c+-24|0,h=o+-2|0,c=f-e[(h<<2)+n>>2]|0,(Le[1](i,c)|0)>=0&&(Le[1](i,f)|0)>-1)break e;i=(l<<2)+a|0;t:{if((Le[1](c,f)|0)>=0){e[i>>2]=c,h=o+-1|0;break t}e[i>>2]=f,c=f}if(l=l+1|0,(h|0)<2)break e;i=e[a>>2],o=h}}sm(a,l),be=a+240|0}function su(i,o){var n=0,a=0,c=0;c=i;e:{if(o>>>0<=31){n=e[i>>2],a=e[i+4>>2];break e}n=e[i+4>>2],e[i+4>>2]=0,e[i>>2]=n,o=o+-32|0,a=0}e[c+4>>2]=a>>>o,e[i>>2]=a<<32-o|n>>>o}function lu(i,o,n,a,c){var f=0,l=0,h=0,g=0;f=be-240|0,be=f,l=e[o>>2],e[f+232>>2]=l,o=e[o+4>>2],e[f>>2]=i,e[f+236>>2]=o,h=1;e:{t:{n:{o:{if(!o&&(l|0)==1||(l=i-e[(n<<2)+c>>2]|0,(Le[1](l,i)|0)<1))break o;for(g=!a;;){r:{if(o=l,!(!g|(n|0)<2)&&(a=e[((n<<2)+c|0)+-8>>2],l=i+-24|0,(Le[1](l,o)|0)>-1||(Le[1](l-a|0,o)|0)>-1))break r;if(e[(h<<2)+f>>2]=o,i=am(f+232|0),su(f+232|0,i),h=h+1|0,n=i+n|0,!e[f+236>>2]&&e[f+232>>2]==1)break t;if(a=0,g=1,i=o,l=o-e[(n<<2)+c>>2]|0,(Le[1](l,e[f>>2])|0)>0)continue;break n}break}o=i;break t}o=i}if(a)break e}sm(f,h),Id(o,n,c)}be=f+240|0}function cu(i,o){var n=0,a=0,c=0;c=i;e:{if(o>>>0<=31){n=e[i+4>>2],a=e[i>>2];break e}n=e[i>>2],e[i+4>>2]=n,e[i>>2]=0,o=o+-32|0,a=0}e[c>>2]=a<>2]=n<>>32-o}function am(i){var o=0;return o=Yd(e[i>>2]+-1|0),o||(i=Yd(e[i+4>>2]),i?i+32|0:0)}function sm(i,o){var n=0,a=0,c=0,f=0,l=0,h=0;a=24,c=be-256|0,be=c;e:{if((o|0)<2)break e;for(h=(o<<2)+i|0,e[h>>2]=c,n=c;;){for(f=a>>>0<256?a:256,gn(n,e[i>>2],f),n=0;l=(n<<2)+i|0,n=n+1|0,gn(e[l>>2],e[(n<<2)+i>>2],f),e[l>>2]=e[l>>2]+f,(o|0)!=(n|0););if(a=a-f|0,!a)break e;n=e[h>>2]}}be=c+256|0}function R8(i){return i+-1>>>0<=655349?!((i>>>0)%10)|(!((i>>>0)%1e3)|i>>>0<65536):0}function T8(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0;if(a=e[i>>2],!a)return 1;for(l=e[i+4>>2],i=0,c=1;;){if(h=n,f=o,o=ie(i,24)+l|0,n=e[o>>2],o=e[o+4>>2],!((n|0)==-1&(o|0)==-1|c|((o|0)==(f|0)&n>>>0>h>>>0|o>>>0>f>>>0)))return 0;if(c=0,i=i+1|0,!(i>>>0>>0))break}return 1}function lm(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0;e:{if(n=e[i>>2],!n||(N8(e[i+4>>2],n),!e[i>>2]))break e;if(n=1,o=e[i>>2],o>>>0>1)for(l=1;;){c=e[i+4>>2],a=c+ie(l,24)|0,f=e[a>>2],h=e[a+4>>2],g=h;t:{if((f|0)!=-1|(h|0)!=-1&&(h=f,f=(c+ie(n,24)|0)+-24|0,(h|0)==e[f>>2]&e[f+4>>2]==(g|0)))break t;f=e[a+4>>2],o=c+ie(n,24)|0,e[o>>2]=e[a>>2],e[o+4>>2]=f,c=e[a+20>>2],e[o+16>>2]=e[a+16>>2],e[o+20>>2]=c,c=e[a+12>>2],e[o+8>>2]=e[a+8>>2],e[o+12>>2]=c,n=n+1|0,o=e[i>>2]}if(l=l+1|0,!(l>>>0>>0))break}if(n>>>0>=o>>>0)break e;for(a=e[i+4>>2];i=a+ie(n,24)|0,e[i+16>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0,e[i>>2]=-1,e[i+4>>2]=-1,n=n+1|0,(o|0)!=(n|0););}}function F8(i,o){i=i|0,o=o|0;var n=0,a=0;return n=e[i+4>>2],a=e[o+4>>2],i=e[i>>2],o=e[o>>2],((i|0)==(o|0)&(n|0)==(a|0)?0:(n|0)==(a|0)&i>>>0>>0|n>>>0>>0?-1:1)|0}function L8(i){var o=0,n=0,a=0,c=0;n=1;e:{o=H[i|0];t:{if(!(o&128))break t;if(!((o&224)!=192|(H[i+1|0]&192)!=128))return((o&254)!=192)<<1;n:{if((o&240)!=224||(a=H[i+1|0],(a&192)!=128)||(c=H[i+2|0],(c&192)!=128))break n;if(n=0,(a&224)==128&&(o|0)==224)break t;o:{r:switch(o+-237|0){case 0:if((a&224)!=160)break o;break t;case 2:break r;default:break o}if((a|0)!=191)break o;if((c&254)==190)break t}return 3}n:{if((o&248)!=240||(n=H[i+1|0],(n&192)!=128|(H[i+2|0]&192)!=128))break n;if((H[i+3|0]&192)==128)break e}n:{if((o&252)!=248||(n=H[i+1|0],(n&192)!=128|(H[i+2|0]&192)!=128|((H[i+3|0]&192)!=128|(H[i+4|0]&192)!=128)))break n;return(o|0)==248&&(n&248)==128?0:5}if(n=0,(o&254)!=252||(a=H[i+1|0],(a&192)!=128|(H[i+2|0]&192)!=128|((H[i+3|0]&192)!=128|(H[i+4|0]&192)!=128))||(H[i+5|0]&192)!=128)break t;n=(o|0)==252&&(a&252)==128?0:6}return n}return(o|0)==240?((n&240)!=128)<<2:4}function D8(i,o){var n=0,a=0,c=0,f=0,l=0,h=0;e:{t:{n:{o:{r:{i:{a:{if(o){if(o=e[i+140>>2],a=o,n=e[i+136>>2],!o&n>>>0<=88199|o>>>0<0){i=0;break e}if(Kd(n,a)|ne){i=0;break e}if(a=e[i+148>>2],!a)break t;if(H[(e[i+152>>2]+(a<<5)|0)+-24|0]==170)break a;i=0;break e}if(n=e[i+148>>2],!n)break t;for(c=n+-1|0,l=e[i+152>>2],o=0;;){if(i=l+(o<<5)|0,!H[i+8|0])break n;a=H[i+23|0];s:{l:{if(o>>>0>>0){if(!a)break o;if(H[e[i+24>>2]+8|0]>1)break r;break l}if(!a)break s}for(h=i+24|0,i=0;;){if(i&&(f=e[h>>2]+(i<<4)|0,(H[f+-8|0]+1|0)!=H[f+8|0]))break i;if(i=i+1|0,!(i>>>0>>0))break}}if(i=1,o=o+1|0,(n|0)==(o|0))break}break e}for(l=a+-1|0,h=e[i+152>>2],o=0;;){if(i=h+(o<<5)|0,n=H[i+8|0],!n)break n;if(!((n|0)==170|n>>>0<100)){i=0;break e}if(Kd(e[i>>2],e[i+4>>2])|ne){i=0;break e}n=H[i+23|0];a:{s:{if(o>>>0>>0){if(!n)break o;if(H[e[i+24>>2]+8|0]<2)break s;break r}if(!n)break a}for(f=e[i+24>>2],i=0;;){if(c=f+(i<<4)|0,Kd(e[c>>2],e[c+4>>2])|ne){i=0;break e}if(H[c+8|0]!=(H[c+-8|0]+1|0)&&i)break i;if(i=i+1|0,!(i>>>0>>0))break}}if(i=1,o=o+1|0,(a|0)==(o|0))break}break e}i=0;break e}i=0;break e}i=0;break e}i=0;break e}i=0}return i}function O8(i){var o=0,n=0;e:{t:{if(n=e[i+4>>2],o=H[n|0],!o)break t;for(;;){if((o+-32&255)>>>0<95){if(n=n+1|0,o=H[n|0],o)continue;break t}break}n=0;break e}if(n=1,o=e[i+8>>2],!H[o|0])break e;for(;;){if(i=L8(o),!i){n=0;break e}if(o=i+o|0,!H[o|0])break}}return n}function B8(i,o,n){for(var a=0;a=i,!!(a&&(i=a+-1|0,o>>>a>>>0<=n>>>0)););return a}function j8(i){var o=0,n=0;e:{if(!(i&1)){for(;o=o+1|0,n=i&2,i=i>>>1|0,!n;);if(i=15,o>>>0>14)break e}i=o}return i}function an(i){e[i+8>>2]=0,e[i>>2]=0,e[i+4>>2]=0}function sn(i){var o=0;o=e[i>>2],o&&Me(o),o=e[i+4>>2],o&&Me(o),e[i+8>>2]=0,e[i>>2]=0,e[i+4>>2]=0}function Nd(i,o){var n=0,a=0,c=0,f=0;a=1;e:{if(ze[i+8>>2]>=o>>>0||(a=e[i>>2],c=4<>>0>29||Me(a),e[i>>2]=n,a=0,!n)||(f=e[i+4>>2],n=xn(f,c),n|o>>>0>29||Me(f),e[i+4>>2]=n,!n))break e;In(n,c),e[i+8>>2]=o,a=1}return a}function z8(i){return i=e[i>>2],H[i+14|0]|H[i+15|0]<<8|(H[i+16|0]<<16|H[i+17|0]<<24)}function cm(i,o){var n=0,a=0,c=0;if(i){In(i+8|0,352),e[i+24>>2]=1024,e[i+4>>2]=16384,a=bn(16384),e[i>>2]=a,n=bn(4096),e[i+16>>2]=n,c=bn(8192),e[i+20>>2]=c;e:{if(a){if(n&&c)break e;Me(a),n=e[i+16>>2]}return n&&Me(n),o=e[i+20>>2],o&&Me(o),In(i,360),-1}e[i+336>>2]=o,i=0}else i=-1;return i}function um(i){var o=0;i&&(o=e[i>>2],o&&Me(o),o=e[i+16>>2],o&&Me(o),o=e[i+20>>2],o&&Me(o),In(i,360))}function fm(i){var o=0,n=0,a=0,c=0;if(i){if(K[e[i>>2]+22|0]=0,K[e[i>>2]+23|0]=0,K[e[i>>2]+24|0]=0,K[e[i>>2]+25|0]=0,a=e[i+4>>2],(a|0)>=1)for(c=e[i>>2];o=e[((H[n+c|0]^o>>>24)<<2)+6512>>2]^o<<8,n=n+1|0,(a|0)!=(n|0););if(a=e[i+12>>2],(a|0)>=1)for(c=e[i+8>>2],n=0;o=e[((H[n+c|0]^o>>>24)<<2)+6512>>2]^o<<8,n=n+1|0,(a|0)!=(n|0););K[e[i>>2]+22|0]=o,K[e[i>>2]+23|0]=o>>>8,K[e[i>>2]+24|0]=o>>>16,K[e[i>>2]+25|0]=o>>>24}}function V8(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0;l=-1;e:{t:{if(!i||(g=e[i>>2],!g))break t;if(!o)return 0;for(;;){if(h=e[((f<<3)+o|0)+4>>2],(h|0)<0|(m|0)>(2147483647-h|0))break t;if(m=h+m|0,f=f+1|0,(f|0)==1)break}if(f=e[i+12>>2],f&&(h=e[i+8>>2]-f|0,e[i+8>>2]=h,h&&Go(g,f+g|0,h),e[i+12>>2]=0),f=e[i+4>>2],(f-m|0)<=e[i+8>>2]){if((f|0)>(2147483647-m|0)||(f=f+m|0,f=(f|0)<2147482623?f+1024|0:f,g=xn(e[i>>2],f),!g))break e;e[i>>2]=g,e[i+4>>2]=f}if(g=(m|0)/255|0,A=g+1|0,dm(i,A))break t;for(l=e[i+8>>2],f=0;h=e[i>>2]+l|0,l=(f<<3)+o|0,gn(h,e[l>>2],e[l+4>>2]),l=e[i+8>>2]+e[l+4>>2]|0,e[i+8>>2]=l,f=f+1|0,(f|0)!=1;);h=e[i+16>>2],C=h,o=e[i+28>>2],E=o;n:{if((m|0)<=254){l=e[i+20>>2],f=0;break n}for(l=e[i+20>>2],f=0;v=o+f|0,e[h+(v<<2)>>2]=255,N=e[i+356>>2],v=(v<<3)+l|0,e[v>>2]=e[i+352>>2],e[v+4>>2]=N,f=f+1|0,(g|0)!=(f|0););f=g}if(f=E+f|0,e[C+(f<<2)>>2]=m-ie(g,255),f=(f<<3)+l|0,e[f>>2]=a,e[f+4>>2]=c,e[i+352>>2]=a,e[i+356>>2]=c,a=h+(o<<2)|0,e[a>>2]=e[a>>2]|256,e[i+28>>2]=o+A,o=e[i+348>>2],a=e[i+344>>2]+1|0,a>>>0<1&&(o=o+1|0),e[i+344>>2]=a,e[i+348>>2]=o,l=0,!n)break t;e[i+328>>2]=1}return l}return o=e[i>>2],o&&Me(o),o=e[i+16>>2],o&&Me(o),o=e[i+20>>2],o&&Me(o),In(i,360),-1}function dm(i,o){var n=0;e:{if(n=e[i+24>>2],(n-o|0)<=e[i+28>>2]){if((n|0)>(2147483647-o|0)||(o=o+n|0,o=(o|0)<2147483615?o+32|0:o,n=xn(e[i+16>>2],o<<2),!n)||(e[i+16>>2]=n,n=xn(e[i+20>>2],o<<3),!n))break e;e[i+24>>2]=o,e[i+20>>2]=n}return 0}return o=e[i>>2],o&&Me(o),o=e[i+16>>2],o&&Me(o),o=e[i+20>>2],o&&Me(o),In(i,360),-1}function W8(i,o){var n=0;return n=be-16|0,be=n,e[n+8>>2]=e[o>>2],e[n+12>>2]=e[o+4>>2],i=V8(i,n+8|0,e[o+12>>2],e[o+16>>2],e[o+20>>2]),be=n+16|0,i}function pm(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0;e:{if(!i||(g=e[i+28>>2],c=(g|0)<255?g:255,!c)||(v=e[i>>2],!v))break e;t:{n:{o:{if(A=e[i+332>>2],A){if((g|0)>=1)break o;h=-1,f=-1;break n}for(a=(c|0)>0?c:0;;){if((a|0)==(l|0))break n;if(m=l<<2,c=l+1|0,l=c,H[m+e[i+16>>2]|0]!=255)break}a=c;break n}c=(c|0)>1?c:1,h=-1,f=-1;o:{for(;;){if(!((l|0)<=4096|(m|0)<=3)){n=1;break o}if(m=0,C=H[e[i+16>>2]+(a<<2)|0],(C|0)!=255&&(E=E+1|0,m=E,f=e[i+20>>2]+(a<<3)|0,h=e[f>>2],f=e[f+4>>2]),l=l+C|0,a=a+1|0,(c|0)==(a|0))break}a=c}if(c=255,(a|0)==255)break t}if(c=a,!n)break e}if(e[i+40>>2]=1399285583,Ut[i+44>>1]=0,n=e[i+16>>2],a=(H[n+1|0]^-1)&1,a=A?a:a|2,K[i+45|0]=a,!e[i+328>>2]|(c|0)!=(g|0)||(K[i+45|0]=a|4),e[i+332>>2]=1,K[i+53|0]=f>>>24,K[i+52|0]=f>>>16,K[i+51|0]=f>>>8,K[i+50|0]=f,K[i+49|0]=(f&16777215)<<8|h>>>24,K[i+48|0]=(f&65535)<<16|h>>>16,K[i+47|0]=(f&255)<<24|h>>>8,K[i+46|0]=h,a=e[i+336>>2],K[i+54|0]=a,K[i+55|0]=a>>>8,K[i+56|0]=a>>>16,K[i+57|0]=a>>>24,a=e[i+340>>2],(a|0)==-1&&(e[i+340>>2]=0,a=0),K[i+66|0]=c,l=0,Ut[i+62>>1]=0,Ut[i+64>>1]=0,K[i+61|0]=a>>>24,K[i+60|0]=a>>>16,K[i+59|0]=a>>>8,K[i+58|0]=a,N=1,e[i+340>>2]=a+1,(c|0)>=1)for(a=0;f=e[n+(a<<2)>>2],K[(i+a|0)+67|0]=f,l=(f&255)+l|0,a=a+1|0,(c|0)!=(a|0););if(e[o>>2]=i+40,a=c+27|0,e[i+324>>2]=a,e[o+4>>2]=a,a=e[i+12>>2],e[o+12>>2]=l,e[o+8>>2]=a+v,a=g-c|0,e[i+28>>2]=a,Go(n,n+(c<<2)|0,a<<2),n=e[i+20>>2],Go(n,n+(c<<3)|0,e[i+28>>2]<<3),e[i+12>>2]=e[i+12>>2]+l,!o)break e;if(i=0,K[e[o>>2]+22|0]=0,K[e[o>>2]+23|0]=0,K[e[o>>2]+24|0]=0,K[e[o>>2]+25|0]=0,n=e[o+4>>2],(n|0)>=1)for(c=e[o>>2],a=0;i=e[((H[a+c|0]^i>>>24)<<2)+6512>>2]^i<<8,a=a+1|0,(n|0)!=(a|0););if(n=e[o+12>>2],(n|0)>=1)for(c=e[o+8>>2],a=0;i=e[((H[a+c|0]^i>>>24)<<2)+6512>>2]^i<<8,a=a+1|0,(n|0)!=(a|0););K[e[o>>2]+22|0]=i,K[e[o>>2]+23|0]=i>>>8,K[e[o>>2]+24|0]=i>>>16,K[e[o>>2]+25|0]=i>>>24}return N}function U8(i,o){var n=0,a=0,c=0;if(!(!i|!e[i>>2])){n=e[i+28>>2],c=i;e:{t:{if(e[i+328>>2]){if(n)break t;a=0;break e}if(a=0,e[i+332>>2]|!n)break e}a=1}n=pm(c,o,a)}return n}function H8(i){return i&&(e[i>>2]=0,e[i+4>>2]=0,e[i+24>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0),0}function G8(i){var o=0;i&&(o=e[i>>2],o&&Me(o),e[i>>2]=0,e[i+4>>2]=0,e[i+24>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0)}function Q8(i,o){var n=0,a=0,c=0;if(n=e[i+4>>2],(n|0)>=0){c=e[i+12>>2],c&&(a=e[i+8>>2]-c|0,e[i+8>>2]=a,(a|0)>=1&&(n=e[i>>2],Go(n,n+c|0,a),n=e[i+4>>2]),e[i+12>>2]=0),a=n,n=e[i+8>>2];e:{if((a-n|0)>=(o|0)){o=e[i>>2];break e}n=(o+n|0)+4096|0,o=e[i>>2];t:{if(o){o=xn(o,n);break t}o=bn(n)}if(!o)return o=e[i>>2],o&&Me(o),e[i>>2]=0,e[i+4>>2]=0,e[i+24>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0,0;e[i+4>>2]=n,e[i>>2]=o,n=e[i+8>>2]}i=o+n|0}else i=0;return i}function Y8(i,o){var n=0,a=0;n=-1,a=e[i+4>>2];e:{if((a|0)<0||(o=e[i+8>>2]+o|0,(o|0)>(a|0)))break e;e[i+8>>2]=o,n=0}return n}function K8(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0;m=be-16|0,be=m;e:{if(e[i+4>>2]<0)break e;c=e[i+12>>2],v=e[i+8>>2]-c|0,n=c+e[i>>2]|0;t:{n:{o:{f=e[i+20>>2];r:{if(!f){if((v|0)<27)break e;if((H[n|0]|H[n+1|0]<<8|(H[n+2|0]<<16|H[n+3|0]<<24))!=1399285583)break r;if(c=H[n+26|0],f=c+27|0,(v|0)<(f|0))break e;if(c)for(c=e[i+24>>2];c=H[(n+l|0)+27|0]+c|0,e[i+24>>2]=c,l=l+1|0,l>>>0>2]=f}if((e[i+24>>2]+f|0)>(v|0))break e;if(h=H[n+22|0]|H[n+23|0]<<8|(H[n+24|0]<<16|H[n+25|0]<<24),e[m+12>>2]=h,l=0,K[n+22|0]=0,K[n+23|0]=0,K[n+24|0]=0,K[n+25|0]=0,A=e[i+24>>2],g=e[i+20>>2],K[n+22|0]=0,K[n+23|0]=0,K[n+24|0]=0,K[n+25|0]=0,(g|0)>0)for(f=0;a=e[((H[n+f|0]^a>>>24)<<2)+6512>>2]^a<<8,f=f+1|0,(g|0)!=(f|0););if(c=n+22|0,(A|0)>0)for(g=n+g|0;a=e[((H[l+g|0]^a>>>24)<<2)+6512>>2]^a<<8,l=l+1|0,(A|0)!=(l|0););if(K[n+22|0]=a,K[n+23|0]=a>>>8,K[n+24|0]=a>>>16,K[n+25|0]=a>>>24,e[m+12>>2]==(H[c|0]|H[c+1|0]<<8|(H[c+2|0]<<16|H[c+3|0]<<24)))break o;K[c|0]=h,K[c+1|0]=h>>>8,K[c+2|0]=h>>>16,K[c+3|0]=h>>>24}if(e[i+20>>2]=0,e[i+24>>2]=0,a=A8(n+1|0,v+-1|0),!a)break n;l=e[i>>2];break t}h=e[i+12>>2];o:{if(!o){f=e[i+24>>2],a=e[i+20>>2];break o}c=h+e[i>>2]|0,e[o>>2]=c,a=e[i+20>>2],e[o+4>>2]=a,e[o+8>>2]=a+c,f=e[i+24>>2],e[o+12>>2]=f}e[i+24>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,a=a+f|0,e[i+12>>2]=h+a;break e}l=e[i>>2],a=l+e[i+8>>2]|0}e[i+12>>2]=a-l,a=n-a|0}return be=m+16|0,a}function X8(i,o){var n=0;if(e[i+4>>2]>=0){for(;;){if(n=K8(i,o),(n|0)>0)return 1;if(!n)return 0;if(!e[i+16>>2])break}e[i+16>>2]=1,i=-1}else i=0;return i}function q8(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0;c=-1;e:{t:{if(!i||(l=e[i>>2],!l)||(a=e[o>>2],v=H[a+5|0],f=e[o+12>>2],A=e[o+8>>2],g=H[a+26|0],E=H[a+18|0]|H[a+19|0]<<8|(H[a+20|0]<<16|H[a+21|0]<<24),m=H[a+14|0]|H[a+15|0]<<8|(H[a+16|0]<<16|H[a+17|0]<<24),N=H[a+6|0]|H[a+7|0]<<8|(H[a+8|0]<<16|H[a+9|0]<<24),T=H[a+10|0]|H[a+11|0]<<8|(H[a+12|0]<<16|H[a+13|0]<<24),C=H[a+4|0],n=e[i+36>>2],o=e[i+12>>2],o&&(h=e[i+8>>2]-o|0,e[i+8>>2]=h,h&&Go(l,o+l|0,h),e[i+12>>2]=0),n&&(o=i,l=e[i+28>>2]-n|0,l?(h=e[i+16>>2],Go(h,h+(n<<2)|0,l<<2),l=e[i+20>>2],Go(l,l+(n<<3)|0,e[i+28>>2]-n<<3),h=e[i+28>>2]-n|0):h=0,e[o+28>>2]=h,e[i+36>>2]=0,e[i+32>>2]=e[i+32>>2]-n),(m|0)!=e[i+336>>2]|C)||dm(i,g+1|0))break t;h=v&1,l=e[i+340>>2];n:{if((l|0)==(E|0))break n;if(n=e[i+32>>2],m=e[i+28>>2],(n|0)<(m|0)){for(c=e[i+8>>2],C=e[i+16>>2],o=n;c=c-H[C+(o<<2)|0]|0,o=o+1|0,(o|0)<(m|0););e[i+8>>2]=c}if(e[i+28>>2]=n,(l|0)==-1)break n;o=n+1|0,e[i+28>>2]=o,e[e[i+16>>2]+(n<<2)>>2]=1024,e[i+32>>2]=o}l=v&2,c=0;n:{if(!h||(o=e[i+28>>2],e[(e[i+16>>2]+(o<<2)|0)+-4>>2]!=1024&&(o|0)>=1)||(l=0,!g))break n;for(o=0;;){if(c=o+1|0,o=H[(o+a|0)+27|0],f=f-o|0,A=o+A|0,(o|0)!=255)break n;if(o=c,(g|0)==(o|0))break}c=g}if(f){n=e[i+4>>2],o=e[i+8>>2];n:{if((n-f|0)>(o|0)){n=e[i>>2];break n}if((n|0)>(2147483647-f|0)||(o=n+f|0,o=(o|0)<2147482623?o+1024|0:o,n=xn(e[i>>2],o),!n))break e;e[i>>2]=n,e[i+4>>2]=o,o=e[i+8>>2]}gn(o+n|0,A,f),e[i+8>>2]=e[i+8>>2]+f}A=v&4;n:{if((c|0)>=(g|0))break n;v=e[i+20>>2],h=e[i+16>>2],n=e[i+28>>2],o=h+(n<<2)|0,f=H[(a+c|0)+27|0],e[o>>2]=f,m=v+(n<<3)|0,e[m>>2]=-1,e[m+4>>2]=-1,l&&(e[o>>2]=f|256),o=n+1|0,e[i+28>>2]=o,c=c+1|0;o:{if((f|0)==255){n=-1;break o}e[i+32>>2]=o}if((c|0)!=(g|0))for(;l=H[(a+c|0)+27|0],e[h+(o<<2)>>2]=l,f=v+(o<<3)|0,e[f>>2]=-1,e[f+4>>2]=-1,f=o+1|0,e[i+28>>2]=f,c=c+1|0,(l|0)!=255&&(e[i+32>>2]=f,n=o),o=f,(c|0)!=(g|0););if((n|0)==-1)break n;o=e[i+20>>2]+(n<<3)|0,e[o>>2]=N,e[o+4>>2]=T}n:{if(!A||(e[i+328>>2]=1,o=e[i+28>>2],(o|0)<1))break n;o=(e[i+16>>2]+(o<<2)|0)+-4|0,e[o>>2]=e[o>>2]|512}e[i+340>>2]=E+1,c=0}return c}return o=e[i>>2],o&&Me(o),o=e[i+16>>2],o&&Me(o),o=e[i+20>>2],o&&Me(o),In(i,360),-1}function hm(i){e[i+4>>2]<0||(e[i+8>>2]=0,e[i+12>>2]=0,e[i+24>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0)}function mm(i){!i|!e[i>>2]?i=-1:(e[i+344>>2]=0,e[i+348>>2]=0,e[i+340>>2]=-1,e[i+332>>2]=0,e[i+324>>2]=0,e[i+328>>2]=0,e[i+36>>2]=0,e[i+28>>2]=0,e[i+32>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0,e[i+352>>2]=0,e[i+356>>2]=0,i=0)}function Z8(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0;e:{if(!i||(g=e[i>>2],!g)||(f=e[i+36>>2],e[i+32>>2]<=(f|0)))break e;if(a=e[i+16>>2],l=e[a+(f<<2)>>2],l&1024)return e[i+36>>2]=f+1,o=i,a=i,n=e[i+348>>2],i=e[i+344>>2]+1|0,i>>>0<1&&(n=n+1|0),e[a+344>>2]=i,e[o+348>>2]=n,-1;c=l&512,h=255,n=l&255;t:{if((n|0)!=255){h=n;break t}for(;f=f+1|0,n=e[(f<<2)+a>>2],c=n&512?512:c,n=n&255,h=n+h|0,(n|0)==255;);}t:{if(!o){c=e[i+344>>2],n=e[i+348>>2],l=e[i+12>>2];break t}e[o+8>>2]=l&256,e[o+12>>2]=c,l=e[i+12>>2],e[o>>2]=g+l,a=e[i+348>>2],n=a,c=e[i+344>>2],e[o+24>>2]=c,e[o+28>>2]=n,a=e[i+20>>2]+(f<<3)|0,g=e[a+4>>2],a=e[a>>2],e[o+4>>2]=h,e[o+16>>2]=a,e[o+20>>2]=g}a=c+1|0,a>>>0<1&&(n=n+1|0),e[i+344>>2]=a,e[i+348>>2]=n,c=1,e[i+36>>2]=f+1,e[i+12>>2]=l+h}return c}function J8(i){var o=0;e:{if(cm(i+8|0,e[i+4>>2]))break e;H8(i+368|0),e[i+396>>2]=-1,e[i+400>>2]=-1,e[i+408>>2]=0,e[i+412>>2]=0,e[i+404>>2]=e[i>>2],o=1}return o}function gm(i){e[i>>2]=1}function $8(i){mm(i+8|0),hm(i+368|0),e[i+408>>2]=0,e[i+412>>2]=0,e[i>>2]&&(e[i+404>>2]=1)}function ew(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0;g=be-16|0,be=g,m=e[n>>2],e[n>>2]=0;e:{t:{n:{if(!m)break n;for(v=i+416|0,A=i+368|0,E=i+440|0,N=i+8|0,T=e[2721],z=H[7536];;){if(e[i+408>>2])break n;o:{r:{if(e[i+412>>2]){if(e[i+432>>2]){if(h=e[i+440>>2],l=e[i+444>>2],f=m-f|0,l>>>0>f>>>0)break r;o=gn(o,h,l),e[n>>2]=l+e[n>>2],e[i+432>>2]=0,o=o+l|0;break o}if(f=Z8(N,E),(f|0)>=1){if(e[i+432>>2]=1,C=e[i+444>>2],(C|0)<1||(l=e[E>>2],H[l|0]!=(z|0)))break o;if(h=3,(C|0)<9||(f=T,(H[l+1|0]|H[l+2|0]<<8|(H[l+3|0]<<16|H[l+4|0]<<24))!=(H[f|0]|H[f+1|0]<<8|(H[f+2|0]<<16|H[f+3|0]<<24))))break e;if(f=H[l+5|0],e[i+396>>2]=f,e[i+400>>2]=H[l+6|0],(f|0)!=1){h=4;break e}e[i+444>>2]=C+-9,e[i+440>>2]=l+9;break o}if(f){h=2;break e}e[i+412>>2]=0;break o}if(f=X8(A,v),(f|0)>=1){if(e[i+404>>2]&&(f=z8(v),e[i+404>>2]=0,e[i+344>>2]=f,e[i+4>>2]=f),q8(N,v))break o;e[i+432>>2]=0,e[i+412>>2]=1;break o}if(f){h=2;break e}if(f=m-e[n>>2]|0,f=f>>>0>8192?f:8192,l=Q8(A,f),!l){h=7;break e}e[g+12>>2]=f;i:switch((Le[8](a,l,g+12|0,c)|0)+-1|0){case 0:e[i+408>>2]=1;break;case 4:break t;default:break i}if((Y8(A,e[g+12>>2])|0)>=0)break o;h=6;break e}o=gn(o,h,f),e[n>>2]=f+e[n>>2],e[i+440>>2]=f+e[i+440>>2],e[i+444>>2]=e[i+444>>2]-f,o=o+f|0}if(f=e[n>>2],!(m>>>0>f>>>0))break}}return be=g+16|0,!f&e[i+408>>2]!=0}h=5}return be=g+16|0,h}function bm(i){e[i+80>>2]=0,e[i+84>>2]=0,e[i+64>>2]=1732584193,e[i+68>>2]=-271733879,e[i+72>>2]=-1732584194,e[i+76>>2]=271733878,e[i+88>>2]=0,e[i+92>>2]=0}function vm(i,o){var n=0,a=0,c=0;a=e[o+80>>2]&63,n=a+o|0,K[n|0]=128,n=n+1|0,c=56;e:{if(a>>>0<56){c=55-a|0;break e}In(n,a^63),uu(o- -64|0,o),n=o}In(n,c),n=e[o+80>>2],e[o+56>>2]=n<<3,e[o+60>>2]=e[o+84>>2]<<3|n>>>29,uu(o- -64|0,o),n=H[o+76|0]|H[o+77|0]<<8|(H[o+78|0]<<16|H[o+79|0]<<24),a=H[o+72|0]|H[o+73|0]<<8|(H[o+74|0]<<16|H[o+75|0]<<24),K[i+8|0]=a,K[i+9|0]=a>>>8,K[i+10|0]=a>>>16,K[i+11|0]=a>>>24,K[i+12|0]=n,K[i+13|0]=n>>>8,K[i+14|0]=n>>>16,K[i+15|0]=n>>>24,n=H[o+68|0]|H[o+69|0]<<8|(H[o+70|0]<<16|H[o+71|0]<<24),a=H[o+64|0]|H[o+65|0]<<8|(H[o+66|0]<<16|H[o+67|0]<<24),K[i|0]=a,K[i+1|0]=a>>>8,K[i+2|0]=a>>>16,K[i+3|0]=a>>>24,K[i+4|0]=n,K[i+5|0]=n>>>8,K[i+6|0]=n>>>16,K[i+7|0]=n>>>24,i=e[o+88>>2],i&&(Me(i),e[o+88>>2]=0,e[o+92>>2]=0),In(o,96)}function uu(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0;A=e[o+16>>2],g=e[o+32>>2],C=e[o+48>>2],E=e[o+36>>2],N=e[o+52>>2],T=e[o+4>>2],l=e[o+20>>2],h=e[i+4>>2],m=e[o>>2],Be=e[i>>2],z=e[i+12>>2],v=e[i+8>>2],a=h+Xe(((m+Be|0)+(z^(z^v)&h)|0)+-680876936|0,7)|0,G=e[o+12>>2],te=e[o+8>>2],c=Xe(((T+z|0)+(a&(h^v)^v)|0)+-389564586|0,12)+a|0,n=Xe(((te+v|0)+(c&(a^h)^h)|0)+606105819|0,17)+c|0,f=Xe(((h+G|0)+(a^n&(a^c))|0)+-1044525330|0,22)+n|0,a=Xe(((a+A|0)+(c^f&(n^c))|0)+-176418897|0,7)+f|0,ae=e[o+28>>2],pe=e[o+24>>2],c=Xe(((c+l|0)+(n^a&(n^f))|0)+1200080426|0,12)+a|0,n=Xe(((n+pe|0)+(f^c&(a^f))|0)+-1473231341|0,17)+c|0,f=Xe(((f+ae|0)+(a^n&(a^c))|0)+-45705983|0,22)+n|0,a=Xe(((a+g|0)+(c^f&(n^c))|0)+1770035416|0,7)+f|0,ke=e[o+44>>2],Se=e[o+40>>2],c=Xe(((c+E|0)+(n^a&(n^f))|0)+-1958414417|0,12)+a|0,n=Xe(((n+Se|0)+(f^c&(a^f))|0)+-42063|0,17)+c|0,f=Xe(((f+ke|0)+(a^n&(a^c))|0)+-1990404162|0,22)+n|0,a=Xe(((a+C|0)+(c^f&(n^c))|0)+1804603682|0,7)+f|0,Ee=e[o+56>>2],Te=e[o+60>>2],c=Xe(((c+N|0)+(n^a&(n^f))|0)+-40341101|0,12)+a|0,o=c+Xe(((n+Ee|0)+(f^(a^f)&c)|0)+-1502002290|0,17)|0,je=o+ke|0,n=a+T|0,a=Xe(((f+Te|0)+(a^o&(a^c))|0)+1236535329|0,22)+o|0,n=Xe((n+(o^(a^o)&c)|0)+-165796510|0,5)+a|0,o=Xe(((c+pe|0)+(a^o&(a^n))|0)+-1069501632|0,9)+n|0,c=Xe((je+((n^o)&a^n)|0)+643717713|0,14)+o|0,a=Xe(((a+m|0)+(o^n&(o^c))|0)+-373897302|0,20)+c|0,n=Xe(((n+l|0)+(c^o&(a^c))|0)+-701558691|0,5)+a|0,o=Xe(((o+Se|0)+(a^c&(a^n))|0)+38016083|0,9)+n|0,c=Xe(((Te+c|0)+((n^o)&a^n)|0)+-660478335|0,14)+o|0,a=Xe(((a+A|0)+(o^n&(o^c))|0)+-405537848|0,20)+c|0,n=Xe(((n+E|0)+(c^o&(a^c))|0)+568446438|0,5)+a|0,o=Xe(((o+Ee|0)+(a^c&(a^n))|0)+-1019803690|0,9)+n|0,c=Xe(((c+G|0)+((n^o)&a^n)|0)+-187363961|0,14)+o|0,a=Xe(((a+g|0)+(o^n&(o^c))|0)+1163531501|0,20)+c|0,n=Xe(((n+N|0)+(c^o&(a^c))|0)+-1444681467|0,5)+a|0,o=Xe(((o+te|0)+(a^c&(a^n))|0)+-51403784|0,9)+n|0,c=Xe(((c+ae|0)+((n^o)&a^n)|0)+1735328473|0,14)+o|0,f=o^c,a=Xe(((a+C|0)+(o^f&n)|0)+-1926607734|0,20)+c|0,n=Xe(((n+l|0)+(a^f)|0)+-378558|0,4)+a|0,o=Xe(((o+g|0)+(a^c^n)|0)+-2022574463|0,11)+n|0,c=Xe(((c+ke|0)+(o^(a^n))|0)+1839030562|0,16)+o|0,a=Xe(((a+Ee|0)+(c^(o^n))|0)+-35309556|0,23)+c|0,n=Xe(((n+T|0)+(a^(o^c))|0)+-1530992060|0,4)+a|0,o=Xe(((o+A|0)+(n^(a^c))|0)+1272893353|0,11)+n|0,c=Xe(((c+ae|0)+(o^(a^n))|0)+-155497632|0,16)+o|0,a=Xe(((a+Se|0)+(c^(o^n))|0)+-1094730640|0,23)+c|0,n=Xe(((n+N|0)+(a^(o^c))|0)+681279174|0,4)+a|0,o=Xe(((o+m|0)+(n^(a^c))|0)+-358537222|0,11)+n|0,c=Xe(((c+G|0)+(o^(a^n))|0)+-722521979|0,16)+o|0,a=Xe(((a+pe|0)+(c^(o^n))|0)+76029189|0,23)+c|0,n=Xe(((n+E|0)+(a^(o^c))|0)+-640364487|0,4)+a|0,o=Xe(((o+C|0)+(n^(a^c))|0)+-421815835|0,11)+n|0,f=n+m|0,m=o^n,n=Xe(((c+Te|0)+(o^(a^n))|0)+530742520|0,16)+o|0,c=Xe(((a+te|0)+(m^n)|0)+-995338651|0,23)+n|0,a=Xe((f+((c|o^-1)^n)|0)+-198630844|0,6)+c|0,f=c+l|0,l=n+Ee|0,n=Xe(((o+ae|0)+(c^(a|n^-1))|0)+1126891415|0,10)+a|0,c=Xe((l+(a^(n|c^-1))|0)+-1416354905|0,15)+n|0,o=Xe((f+((c|a^-1)^n)|0)+-57434055|0,21)+c|0,f=c+Se|0,l=n+G|0,n=Xe(((a+C|0)+(c^(o|n^-1))|0)+1700485571|0,6)+o|0,c=Xe((l+(o^(n|c^-1))|0)+-1894986606|0,10)+n|0,a=Xe((f+((c|o^-1)^n)|0)+-1051523|0,15)+c|0,f=c+Te|0,g=n+g|0,n=Xe(((o+T|0)+(c^(a|n^-1))|0)+-2054922799|0,21)+a|0,c=Xe((g+(a^(n|c^-1))|0)+1873313359|0,6)+n|0,o=Xe((f+((c|a^-1)^n)|0)+-30611744|0,10)+c|0,a=Xe(((a+pe|0)+(c^(o|n^-1))|0)+-1560198380|0,15)+o|0,n=Xe(((n+N|0)+(o^(a|c^-1))|0)+1309151649|0,21)+a|0,c=Xe(((c+A|0)+((n|o^-1)^a)|0)+-145523070|0,6)+n|0,e[i>>2]=c+Be,o=Xe(((o+ke|0)+(n^(c|a^-1))|0)+-1120210379|0,10)+c|0,e[i+12>>2]=o+z,a=Xe(((a+te|0)+(c^(o|n^-1))|0)+718787259|0,15)+o|0,e[i+8>>2]=a+v,Qe=i,Ye=Xe(((n+E|0)+(o^(a|c^-1))|0)+-343485551|0,21)+(a+h|0)|0,e[Qe+4>>2]=Ye}function km(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0;oe(c,0,n,0);e:{if(ne||(h=ie(n,c),oe(a,0,h,0),ne))break e;l=e[i+88>>2],A=ie(a,h);t:{if(ze[i+92>>2]>=A>>>0){f=l;break t}f=xn(l,A);n:{if(!f){if(Me(l),f=bn(A),e[i+88>>2]=f,f)break n;return e[i+92>>2]=0,0}e[i+88>>2]=f}e[i+92>>2]=A}t:{n:{o:{r:{i:{a:{s:{l:{u:{f:{c:{d:{if(l=ie(c,100)+n|0,(l|0)<=300){p:switch(l+-101|0){case 3:break i;case 5:break a;case 7:break s;case 2:case 4:case 6:break n;case 0:break o;case 1:break r;default:break p}switch(l+-201|0){case 0:break l;case 1:break u;case 3:break f;case 5:break c;case 7:break d;default:break n}}p:{h:{m:switch(l+-401|0){default:switch(l+-301|0){case 0:break p;case 1:break h;default:break n}case 7:if(!a)break t;for(E=e[o+28>>2],g=e[o+24>>2],C=e[o+20>>2],h=e[o+16>>2],v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;m=n<<2,e[f>>2]=e[m+o>>2],e[f+4>>2]=e[c+m>>2],e[f+8>>2]=e[l+m>>2],e[f+12>>2]=e[v+m>>2],e[f+16>>2]=e[h+m>>2],e[f+20>>2]=e[m+C>>2],e[f+24>>2]=e[g+m>>2],e[f+28>>2]=e[m+E>>2],f=f+32|0,n=n+1|0,(a|0)!=(n|0););break t;case 5:if(!a)break t;for(C=e[o+20>>2],h=e[o+16>>2],v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;g=n<<2,e[f>>2]=e[g+o>>2],e[f+4>>2]=e[c+g>>2],e[f+8>>2]=e[l+g>>2],e[f+12>>2]=e[g+v>>2],e[f+16>>2]=e[h+g>>2],e[f+20>>2]=e[g+C>>2],f=f+24|0,n=n+1|0,(a|0)!=(n|0););break t;case 3:if(!a)break t;for(v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;h=n<<2,e[f>>2]=e[h+o>>2],e[f+4>>2]=e[c+h>>2],e[f+8>>2]=e[l+h>>2],e[f+12>>2]=e[h+v>>2],f=f+16|0,n=n+1|0,(a|0)!=(n|0););break t;case 1:if(!a)break t;for(l=e[o+4>>2],c=e[o>>2],o=0;n=o<<2,e[f>>2]=e[n+c>>2],e[f+4>>2]=e[n+l>>2],f=f+8|0,o=o+1|0,(a|0)!=(o|0););break t;case 0:break m;case 2:case 4:case 6:break n}if(!a)break t;for(n=e[o>>2],o=0;e[f>>2]=e[n+(o<<2)>>2],f=f+4|0,o=o+1|0,(a|0)!=(o|0););break t}if(!a)break t;for(n=0;c=n<<2,l=e[c+e[o>>2]>>2],K[f|0]=l,K[f+2|0]=l>>>16,K[f+1|0]=l>>>8,c=e[c+e[o+4>>2]>>2],K[f+3|0]=c,K[f+5|0]=c>>>16,K[f+4|0]=c>>>8,f=f+6|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(n=0;c=e[e[o>>2]+(n<<2)>>2],K[f|0]=c,K[f+2|0]=c>>>16,K[f+1|0]=c>>>8,f=f+3|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(E=e[o+28>>2],g=e[o+24>>2],C=e[o+20>>2],h=e[o+16>>2],v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;m=n<<2,Ut[f>>1]=e[m+o>>2],Ut[f+2>>1]=e[c+m>>2],Ut[f+4>>1]=e[l+m>>2],Ut[f+6>>1]=e[v+m>>2],Ut[f+8>>1]=e[h+m>>2],Ut[f+10>>1]=e[m+C>>2],Ut[f+12>>1]=e[g+m>>2],Ut[f+14>>1]=e[m+E>>2],f=f+16|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(C=e[o+20>>2],h=e[o+16>>2],v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;g=n<<2,Ut[f>>1]=e[g+o>>2],Ut[f+2>>1]=e[c+g>>2],Ut[f+4>>1]=e[l+g>>2],Ut[f+6>>1]=e[g+v>>2],Ut[f+8>>1]=e[h+g>>2],Ut[f+10>>1]=e[g+C>>2],f=f+12|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;h=n<<2,Ut[f>>1]=e[h+o>>2],Ut[f+2>>1]=e[c+h>>2],Ut[f+4>>1]=e[l+h>>2],Ut[f+6>>1]=e[h+v>>2],f=f+8|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(l=e[o+4>>2],c=e[o>>2],o=0;n=o<<2,Ut[f>>1]=e[n+c>>2],Ut[f+2>>1]=e[n+l>>2],f=f+4|0,o=o+1|0,(a|0)!=(o|0););break t}if(!a)break t;for(n=e[o>>2],o=0;Ut[f>>1]=e[n+(o<<2)>>2],f=f+2|0,o=o+1|0,(a|0)!=(o|0););break t}if(!a)break t;for(c=0;n=c<<2,K[f|0]=e[n+e[o>>2]>>2],K[f+1|0]=e[n+e[o+4>>2]>>2],K[f+2|0]=e[n+e[o+8>>2]>>2],K[f+3|0]=e[n+e[o+12>>2]>>2],K[f+4|0]=e[n+e[o+16>>2]>>2],K[f+5|0]=e[n+e[o+20>>2]>>2],K[f+6|0]=e[n+e[o+24>>2]>>2],K[f+7|0]=e[n+e[o+28>>2]>>2],f=f+8|0,c=c+1|0,(c|0)!=(a|0););break t}if(!a)break t;for(c=0;n=c<<2,K[f|0]=e[n+e[o>>2]>>2],K[f+1|0]=e[n+e[o+4>>2]>>2],K[f+2|0]=e[n+e[o+8>>2]>>2],K[f+3|0]=e[n+e[o+12>>2]>>2],K[f+4|0]=e[n+e[o+16>>2]>>2],K[f+5|0]=e[n+e[o+20>>2]>>2],f=f+6|0,c=c+1|0,(c|0)!=(a|0););break t}if(!a)break t;for(c=0;n=c<<2,K[f|0]=e[n+e[o>>2]>>2],K[f+1|0]=e[n+e[o+4>>2]>>2],K[f+2|0]=e[n+e[o+8>>2]>>2],K[f+3|0]=e[n+e[o+12>>2]>>2],f=f+4|0,c=c+1|0,(c|0)!=(a|0););break t}if(!a)break t;for(n=0;c=n<<2,K[f|0]=e[c+e[o>>2]>>2],K[f+1|0]=e[c+e[o+4>>2]>>2],f=f+2|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(n=0;K[f|0]=e[e[o>>2]+(n<<2)>>2],f=f+1|0,n=n+1|0,(a|0)!=(n|0););break t}n:switch(c+-1|0){case 3:if(!n|!a)break t;for(l=0;;){for(c=0;e[f>>2]=e[e[(c<<2)+o>>2]+(l<<2)>>2],f=f+4|0,c=c+1|0,(c|0)!=(n|0););if(l=l+1|0,(l|0)==(a|0))break}break t;case 2:if(!n|!a)break t;for(;;){for(c=0;l=e[e[(c<<2)+o>>2]+(v<<2)>>2],K[f|0]=l,K[f+2|0]=l>>>16,K[f+1|0]=l>>>8,f=f+3|0,c=c+1|0,(c|0)!=(n|0););if(v=v+1|0,(v|0)==(a|0))break}break t;case 1:if(!n|!a)break t;for(l=0;;){for(c=0;Ut[f>>1]=e[e[(c<<2)+o>>2]+(l<<2)>>2],f=f+2|0,c=c+1|0,(c|0)!=(n|0););if(l=l+1|0,(l|0)==(a|0))break}break t;case 0:break n;default:break t}if(!n|!a)break t;for(l=0;;){for(c=0;K[f|0]=e[e[(c<<2)+o>>2]+(l<<2)>>2],f=f+1|0,c=c+1|0,(c|0)!=(n|0););if(l=l+1|0,(l|0)==(a|0))break}}n=e[i+80>>2],o=n+A|0,e[i+80>>2]=o,a=e[i+88>>2],o>>>0>>0&&(o=i+84|0,e[o>>2]=e[o>>2]+1),c=64-(n&63)|0,o=(i-c|0)- -64|0;t:{if(A>>>0>>0){gn(o,a,A);break t}if(gn(o,a,c),n=i- -64|0,uu(n,i),f=a+c|0,o=A-c|0,o>>>0>=64)for(;c=H[f+4|0]|H[f+5|0]<<8|(H[f+6|0]<<16|H[f+7|0]<<24),a=H[f|0]|H[f+1|0]<<8|(H[f+2|0]<<16|H[f+3|0]<<24),K[i|0]=a,K[i+1|0]=a>>>8,K[i+2|0]=a>>>16,K[i+3|0]=a>>>24,K[i+4|0]=c,K[i+5|0]=c>>>8,K[i+6|0]=c>>>16,K[i+7|0]=c>>>24,c=H[f+60|0]|H[f+61|0]<<8|(H[f+62|0]<<16|H[f+63|0]<<24),a=H[f+56|0]|H[f+57|0]<<8|(H[f+58|0]<<16|H[f+59|0]<<24),K[i+56|0]=a,K[i+57|0]=a>>>8,K[i+58|0]=a>>>16,K[i+59|0]=a>>>24,K[i+60|0]=c,K[i+61|0]=c>>>8,K[i+62|0]=c>>>16,K[i+63|0]=c>>>24,c=H[f+52|0]|H[f+53|0]<<8|(H[f+54|0]<<16|H[f+55|0]<<24),a=H[f+48|0]|H[f+49|0]<<8|(H[f+50|0]<<16|H[f+51|0]<<24),K[i+48|0]=a,K[i+49|0]=a>>>8,K[i+50|0]=a>>>16,K[i+51|0]=a>>>24,K[i+52|0]=c,K[i+53|0]=c>>>8,K[i+54|0]=c>>>16,K[i+55|0]=c>>>24,c=H[f+44|0]|H[f+45|0]<<8|(H[f+46|0]<<16|H[f+47|0]<<24),a=H[f+40|0]|H[f+41|0]<<8|(H[f+42|0]<<16|H[f+43|0]<<24),K[i+40|0]=a,K[i+41|0]=a>>>8,K[i+42|0]=a>>>16,K[i+43|0]=a>>>24,K[i+44|0]=c,K[i+45|0]=c>>>8,K[i+46|0]=c>>>16,K[i+47|0]=c>>>24,c=H[f+36|0]|H[f+37|0]<<8|(H[f+38|0]<<16|H[f+39|0]<<24),a=H[f+32|0]|H[f+33|0]<<8|(H[f+34|0]<<16|H[f+35|0]<<24),K[i+32|0]=a,K[i+33|0]=a>>>8,K[i+34|0]=a>>>16,K[i+35|0]=a>>>24,K[i+36|0]=c,K[i+37|0]=c>>>8,K[i+38|0]=c>>>16,K[i+39|0]=c>>>24,c=H[f+28|0]|H[f+29|0]<<8|(H[f+30|0]<<16|H[f+31|0]<<24),a=H[f+24|0]|H[f+25|0]<<8|(H[f+26|0]<<16|H[f+27|0]<<24),K[i+24|0]=a,K[i+25|0]=a>>>8,K[i+26|0]=a>>>16,K[i+27|0]=a>>>24,K[i+28|0]=c,K[i+29|0]=c>>>8,K[i+30|0]=c>>>16,K[i+31|0]=c>>>24,c=H[f+20|0]|H[f+21|0]<<8|(H[f+22|0]<<16|H[f+23|0]<<24),a=H[f+16|0]|H[f+17|0]<<8|(H[f+18|0]<<16|H[f+19|0]<<24),K[i+16|0]=a,K[i+17|0]=a>>>8,K[i+18|0]=a>>>16,K[i+19|0]=a>>>24,K[i+20|0]=c,K[i+21|0]=c>>>8,K[i+22|0]=c>>>16,K[i+23|0]=c>>>24,c=H[f+12|0]|H[f+13|0]<<8|(H[f+14|0]<<16|H[f+15|0]<<24),a=H[f+8|0]|H[f+9|0]<<8|(H[f+10|0]<<16|H[f+11|0]<<24),K[i+8|0]=a,K[i+9|0]=a>>>8,K[i+10|0]=a>>>16,K[i+11|0]=a>>>24,K[i+12|0]=c,K[i+13|0]=c>>>8,K[i+14|0]=c>>>16,K[i+15|0]=c>>>24,uu(n,i),f=f- -64|0,o=o+-64|0,o>>>0>63;);gn(i,f,o)}f=1}return f}function tw(i){return i=i|0,m8(e[i+60>>2])|0}function fu(i){return i?(e[2896]=i,-1):0}function nw(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0,f=0,l=0;a=be-32|0,be=a,e[a+16>>2]=o,c=e[i+48>>2],e[a+20>>2]=n-((c|0)!=0),f=e[i+44>>2],e[a+28>>2]=c,e[a+24>>2]=f;e:{t:{n:{if(fu(g8(e[i+60>>2],a+16|0,2,a+12|0)|0)){e[a+12>>2]=-1,n=-1;break n}if(c=e[a+12>>2],(c|0)>0)break t;n=c}e[i>>2]=e[i>>2]|n&48^16;break e}if(l=e[a+20>>2],c>>>0<=l>>>0){n=c;break e}if(f=e[i+44>>2],e[i+4>>2]=f,e[i+8>>2]=f+(c-l|0),!e[i+48>>2])break e;e[i+4>>2]=f+1,K[(o+n|0)+-1|0]=H[f|0]}return be=a+32|0,n|0}function rw(i,o,n,a){i=i|0,o=o|0,n=n|0,a=a|0;var c=0;c=be-16|0,be=c;e:{if(!fu(k8(e[i+60>>2],o|0,n|0,a&255,c+8|0)|0)){o=e[c+12>>2],i=e[c+8>>2];break e}e[c+8>>2]=-1,e[c+12>>2]=-1,o=-1,i=-1}return be=c+16|0,ne=o,i|0}function ym(i){var o=0;if(i)return e[i+76>>2]<=-1,Rd(i);if(e[2794]&&(o=ym(e[2794])),i=e[3023],i)for(;ze[i+20>>2]>ze[i+28>>2]&&(o=Rd(i)|o),i=e[i+56>>2],!!i;);return o}function Rd(i){var o=0,n=0;e:{if(ze[i+20>>2]<=ze[i+28>>2]||(Le[e[i+36>>2]](i,0,0)|0,e[i+20>>2]))break e;return-1}return o=e[i+4>>2],n=e[i+8>>2],o>>>0>>0&&(o=o-n|0,Le[e[i+40>>2]](i,o,o>>31,1)|0),e[i+28>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i+4>>2]=0,e[i+8>>2]=0,0}function _m(i){var o=0,n=0,a=0,c=0;c=e[i+76>>2]>=0?1:0,a=e[i>>2]&1,a||(o=e[i+52>>2],o&&(e[o+56>>2]=e[i+56>>2]),n=e[i+56>>2],n&&(e[n+52>>2]=o),e[3023]==(i|0)&&(e[3023]=n)),ym(i),Le[e[i+12>>2]](i)|0,o=e[i+96>>2],o&&Me(o);e:{if(!a){Me(i);break e}if(!c)break e}}function du(i,o,n){var a=0,c=0,f=0;e:{if(!n)break e;for(;;){if(a=H[i|0],c=H[o|0],(a|0)==(c|0)){if(o=o+1|0,i=i+1|0,n=n+-1|0,n)continue;break e}break}f=a-c|0}return f}function wm(i){e[i+8>>2]=0,e[i+12>>2]=0,e[i>>2]=0,e[i+4>>2]=3,e[i+56>>2]=0,e[i+60>>2]=0,e[i+48>>2]=0,e[i+52>>2]=0,e[i+40>>2]=0,e[i+44>>2]=0,e[i+32>>2]=0,e[i+36>>2]=0,e[i+24>>2]=0,e[i+28>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0}function Am(i){return i=+b8(+i),Dn(i)<2147483648?~~i:-2147483648}function po(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0;e:{t:{n:{o:{if(qe(+i),o=Oe(1)|0,a=Oe(0)|0,((o|0)>0||(o|0)>=0&&!(a>>>0<0)&&!0)&&(f=o,o>>>0>1048575))break o;if(!(o&2147483647|a))return-1/(i*i);if((o|0)>-1||!1)break n;return(i-i)/0}if(f>>>0>2146435071)break e;if(o=1072693248,l=-1023,(f|0)!=1072693248){o=f;break t}if(a)break t;return 0}qe(+(i*0x40000000000000)),o=Oe(1)|0,a=Oe(0)|0,l=-1077}o=o+614242|0,c=+((o>>>20|0)+l|0),ot(0,a|0),ot(1,(o&1048575)+1072079006|0),i=+rt()+-1,n=i/(i+2),h=c*.6931471803691238,g=i,m=c*19082149292705877e-26,v=n,c=i*(i*.5),n=n*n,i=n*n,i=h+(g+(m+v*(c+(i*(i*(i*.15313837699209373+.22222198432149784)+.3999999999940942)+n*(i*(i*(i*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)))-c))}return i}function ow(i,o,n,a){var c=0,f=0;if(a)for(;f=c<<2,Ze[f+n>>2]=Ze[o+f>>2]*ue(e[i+f>>2]),c=c+1|0,(c|0)!=(a|0););}function iw(i,o,n,a){i=i|0,o=o|0,n=n|0,a=a|0;var c=0,f=0,l=0,h=ue(0),g=0,m=0;l=o-n|0;e:{if(!n){for(;c=c+1|0,c>>>0<=l>>>0;);break e}for(m=In(a,n<<2);;){for(h=Ze[(c<<2)+i>>2],f=0;g=(f<<2)+m|0,Ze[g>>2]=Ze[g>>2]+ue(h*Ze[(c+f<<2)+i>>2]),f=f+1|0,(f|0)!=(n|0););if(c=c+1|0,!(c>>>0<=l>>>0))break}}if(c>>>0>>0)for(;;){if(n=o-c|0,n)for(h=Ze[(c<<2)+i>>2],f=0;l=(f<<2)+a|0,Ze[l>>2]=Ze[l>>2]+ue(h*Ze[(c+f<<2)+i>>2]),f=f+1|0,f>>>0>>0;);if(c=c+1|0,(c|0)==(o|0))break}}function aw(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0;h=be-256|0,be=h,E=e[o>>2],v=+Ze[i>>2];e:{for(;;){if((f|0)==(E|0))break e;A=f+1|0,l=+ue(-Ze[(A<<2)+i>>2]);t:{if(f){for(C=f>>>1|0,c=0;l=l-it[(c<<3)+h>>3]*+Ze[(f-c<<2)+i>>2],c=c+1|0,(f|0)!=(c|0););if(l=l/v,it[(f<<3)+h>>3]=l,c=0,C)for(;g=(c<<3)+h|0,m=it[g>>3],N=g,g=((c^-1)+f<<3)+h|0,it[N>>3]=m+l*it[g>>3],it[g>>3]=l*m+it[g>>3],c=c+1|0,(C|0)!=(c|0););if(!(f&1))break t;g=(C<<3)+h|0,m=it[g>>3],it[g>>3]=m+l*m;break t}l=l/v,it[(f<<3)+h>>3]=l}for(m=1-l*l,c=0;Ze[((f<<7)+n|0)+(c<<2)>>2]=-ue(it[(c<<3)+h>>3]),c=c+1|0,c>>>0<=f>>>0;);if(v=v*m,it[(f<<3)+a>>3]=v,f=A,v==0)break}e[o>>2]=A}be=h+256|0}function sw(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=ue(0);g=be-16|0,be=g;e:{if(!o){h=2;break e}for(f=n+-1|0,n=0;A=+ue(Dn(Ze[(n<<2)+i>>2])),l=l>2],e[g+12>>2]=n+-1,f=f-n|0,e[c>>2]=f;t:{if(h=-1<(n|0)){e[c>>2]=n,f=n;break t}if((f|0)>=(h|0))break t;h=1;break e}if(h=0,(f|0)>=0){if(!o)break e;for(l=0,n=0;;){if(E=n<<2,l=l+ +ue(Ze[E+i>>2]*ue(1<>2]=f,n=n+1|0,(n|0)==(o|0))break e;l=l-+(f|0),f=e[c>>2]}}if(o)for(n=0,N=ue(1<<0-f),l=0;h=n<<2,l=l+ +ue(Ze[h+i>>2]/N),f=Am(l),f=(f|0)<(m|0)?(f|0)<(v|0)?v:f:C,e[a+h>>2]=f,l=l-+(f|0),n=n+1|0,(n|0)!=(o|0););h=0,e[c>>2]=0}return be=g+16|0,h}function lw(i,o,n,a,c,f){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0;var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0;e:{if(a>>>0>=13){if((o|0)<1)break e;for(Be=a+-13|0;;){G=0,pe=0,ae=0,Se=0,ke=0,Te=0,Ee=0,je=0,te=0,z=0,T=0,N=0,E=0,C=0,A=0,v=0,m=0,g=0,h=0,a=0;t:switch(Be|0){case 19:G=ie(e[((l<<2)+i|0)+-128>>2],e[n+124>>2]);case 18:pe=ie(e[((l<<2)+i|0)+-124>>2],e[n+120>>2])+G|0;case 17:ae=ie(e[((l<<2)+i|0)+-120>>2],e[n+116>>2])+pe|0;case 16:Se=ie(e[((l<<2)+i|0)+-116>>2],e[n+112>>2])+ae|0;case 15:ke=ie(e[((l<<2)+i|0)+-112>>2],e[n+108>>2])+Se|0;case 14:Te=ie(e[((l<<2)+i|0)+-108>>2],e[n+104>>2])+ke|0;case 13:Ee=ie(e[((l<<2)+i|0)+-104>>2],e[n+100>>2])+Te|0;case 12:je=ie(e[((l<<2)+i|0)+-100>>2],e[n+96>>2])+Ee|0;case 11:te=ie(e[((l<<2)+i|0)+-96>>2],e[n+92>>2])+je|0;case 10:z=ie(e[((l<<2)+i|0)+-92>>2],e[n+88>>2])+te|0;case 9:T=ie(e[((l<<2)+i|0)+-88>>2],e[n+84>>2])+z|0;case 8:N=ie(e[((l<<2)+i|0)+-84>>2],e[n+80>>2])+T|0;case 7:E=ie(e[((l<<2)+i|0)+-80>>2],e[n+76>>2])+N|0;case 6:C=ie(e[((l<<2)+i|0)+-76>>2],e[n+72>>2])+E|0;case 5:A=ie(e[((l<<2)+i|0)+-72>>2],e[n+68>>2])+C|0;case 4:v=ie(e[((l<<2)+i|0)+-68>>2],e[n+64>>2])+A|0;case 3:m=ie(e[((l<<2)+i|0)+-64>>2],e[n+60>>2])+v|0;case 2:g=ie(e[((l<<2)+i|0)+-60>>2],e[n+56>>2])+m|0;case 1:h=ie(e[((l<<2)+i|0)+-56>>2],e[n+52>>2])+g|0;case 0:a=(l<<2)+i|0,a=((((((((((((ie(e[a+-52>>2],e[n+48>>2])+h|0)+ie(e[a+-48>>2],e[n+44>>2])|0)+ie(e[a+-44>>2],e[n+40>>2])|0)+ie(e[a+-40>>2],e[n+36>>2])|0)+ie(e[a+-36>>2],e[n+32>>2])|0)+ie(e[a+-32>>2],e[n+28>>2])|0)+ie(e[a+-28>>2],e[n+24>>2])|0)+ie(e[a+-24>>2],e[n+20>>2])|0)+ie(e[a+-20>>2],e[n+16>>2])|0)+ie(e[a+-16>>2],e[n+12>>2])|0)+ie(e[a+-12>>2],e[n+8>>2])|0)+ie(e[a+-8>>2],e[n+4>>2])|0)+ie(e[a+-4>>2],e[n>>2])|0;break;default:break t}if(h=l<<2,e[h+f>>2]=e[i+h>>2]-(a>>c),l=l+1|0,(l|0)==(o|0))break}break e}if(a>>>0>=9){if(a>>>0>=11){if((a|0)!=12){if((o|0)<1)break e;for(T=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],v=e[i+-28>>2],A=e[i+-32>>2],C=e[i+-36>>2],E=e[i+-40>>2],z=e[i+-44>>2],te=e[n>>2],G=e[n+4>>2],pe=e[n+8>>2],ae=e[n+12>>2],Se=e[n+16>>2],ke=e[n+20>>2],Te=e[n+24>>2],Ee=e[n+28>>2],je=e[n+32>>2],Be=e[n+36>>2],Ye=e[n+40>>2],n=0;N=E,E=C,C=A,A=v,v=m,m=g,g=h,h=a,a=l,l=T,Qe=n<<2,T=e[Qe+i>>2],e[f+Qe>>2]=T-((((((((((ie(N,Be)+ie(z,Ye)|0)+ie(E,je)|0)+ie(C,Ee)|0)+ie(A,Te)|0)+ie(v,ke)|0)+ie(m,Se)|0)+ie(g,ae)|0)+ie(h,pe)|0)+ie(a,G)|0)+ie(l,te)>>c),z=N,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(z=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],v=e[i+-28>>2],A=e[i+-32>>2],C=e[i+-36>>2],E=e[i+-40>>2],N=e[i+-44>>2],te=e[i+-48>>2],G=e[n>>2],pe=e[n+4>>2],ae=e[n+8>>2],Se=e[n+12>>2],ke=e[n+16>>2],Te=e[n+20>>2],Ee=e[n+24>>2],je=e[n+28>>2],Be=e[n+32>>2],Ye=e[n+36>>2],Qe=e[n+40>>2],st=e[n+44>>2],n=0;T=N,N=E,E=C,C=A,A=v,v=m,m=g,g=h,h=a,a=l,l=z,at=n<<2,z=e[at+i>>2],e[f+at>>2]=z-(((((((((((ie(T,Qe)+ie(te,st)|0)+ie(N,Ye)|0)+ie(E,Be)|0)+ie(C,je)|0)+ie(A,Ee)|0)+ie(v,Te)|0)+ie(m,ke)|0)+ie(g,Se)|0)+ie(h,ae)|0)+ie(a,pe)|0)+ie(l,G)>>c),te=T,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=10){if((o|0)<1)break e;for(E=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],v=e[i+-28>>2],A=e[i+-32>>2],N=e[i+-36>>2],z=e[n>>2],T=e[n+4>>2],te=e[n+8>>2],G=e[n+12>>2],pe=e[n+16>>2],ae=e[n+20>>2],Se=e[n+24>>2],ke=e[n+28>>2],Te=e[n+32>>2],n=0;C=A,A=v,v=m,m=g,g=h,h=a,a=l,l=E,Ee=n<<2,E=e[Ee+i>>2],e[f+Ee>>2]=E-((((((((ie(C,ke)+ie(N,Te)|0)+ie(A,Se)|0)+ie(v,ae)|0)+ie(m,pe)|0)+ie(g,G)|0)+ie(h,te)|0)+ie(a,T)|0)+ie(l,z)>>c),N=C,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(N=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],v=e[i+-28>>2],A=e[i+-32>>2],C=e[i+-36>>2],T=e[i+-40>>2],z=e[n>>2],te=e[n+4>>2],G=e[n+8>>2],pe=e[n+12>>2],ae=e[n+16>>2],Se=e[n+20>>2],ke=e[n+24>>2],Te=e[n+28>>2],Ee=e[n+32>>2],je=e[n+36>>2],n=0;E=C,C=A,A=v,v=m,m=g,g=h,h=a,a=l,l=N,Be=n<<2,N=e[Be+i>>2],e[f+Be>>2]=N-(((((((((ie(E,Ee)+ie(T,je)|0)+ie(C,Te)|0)+ie(A,ke)|0)+ie(v,Se)|0)+ie(m,ae)|0)+ie(g,pe)|0)+ie(h,G)|0)+ie(a,te)|0)+ie(l,z)>>c),T=E,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=5){if(a>>>0>=7){if((a|0)!=8){if((o|0)<1)break e;for(A=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],C=e[i+-28>>2],E=e[n>>2],N=e[n+4>>2],z=e[n+8>>2],T=e[n+12>>2],te=e[n+16>>2],G=e[n+20>>2],pe=e[n+24>>2],n=0;v=m,m=g,g=h,h=a,a=l,l=A,ae=n<<2,A=e[ae+i>>2],e[f+ae>>2]=A-((((((ie(v,G)+ie(C,pe)|0)+ie(m,te)|0)+ie(g,T)|0)+ie(h,z)|0)+ie(a,N)|0)+ie(l,E)>>c),C=v,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(C=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],v=e[i+-28>>2],E=e[i+-32>>2],N=e[n>>2],z=e[n+4>>2],T=e[n+8>>2],te=e[n+12>>2],G=e[n+16>>2],pe=e[n+20>>2],ae=e[n+24>>2],Se=e[n+28>>2],n=0;A=v,v=m,m=g,g=h,h=a,a=l,l=C,ke=n<<2,C=e[ke+i>>2],e[f+ke>>2]=C-(((((((ie(A,ae)+ie(E,Se)|0)+ie(v,pe)|0)+ie(m,G)|0)+ie(g,te)|0)+ie(h,T)|0)+ie(a,z)|0)+ie(l,N)>>c),E=A,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=6){if((o|0)<1)break e;for(m=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],v=e[i+-20>>2],A=e[n>>2],C=e[n+4>>2],E=e[n+8>>2],N=e[n+12>>2],z=e[n+16>>2],n=0;g=h,h=a,a=l,l=m,T=n<<2,m=e[T+i>>2],e[f+T>>2]=m-((((ie(g,N)+ie(v,z)|0)+ie(h,E)|0)+ie(a,C)|0)+ie(l,A)>>c),v=g,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(v=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],A=e[i+-24>>2],C=e[n>>2],E=e[n+4>>2],N=e[n+8>>2],z=e[n+12>>2],T=e[n+16>>2],te=e[n+20>>2],n=0;m=g,g=h,h=a,a=l,l=v,G=n<<2,v=e[G+i>>2],e[f+G>>2]=v-(((((ie(m,T)+ie(A,te)|0)+ie(g,z)|0)+ie(h,N)|0)+ie(a,E)|0)+ie(l,C)>>c),A=m,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=3){if((a|0)!=4){if((o|0)<1)break e;for(h=e[i+-4>>2],l=e[i+-8>>2],g=e[i+-12>>2],m=e[n>>2],v=e[n+4>>2],A=e[n+8>>2],n=0;a=l,l=h,C=n<<2,h=e[C+i>>2],e[f+C>>2]=h-((ie(a,v)+ie(g,A)|0)+ie(l,m)>>c),g=a,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(g=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],m=e[i+-16>>2],v=e[n>>2],A=e[n+4>>2],C=e[n+8>>2],E=e[n+12>>2],n=0;h=a,a=l,l=g,N=n<<2,g=e[N+i>>2],e[f+N>>2]=g-(((ie(h,C)+ie(m,E)|0)+ie(a,A)|0)+ie(l,v)>>c),m=h,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=2){if((o|0)<1)break e;for(l=e[i+-4>>2],a=e[n>>2],n=0;h=ie(a,l),g=n<<2,l=e[g+i>>2],e[f+g>>2]=l-(h>>c),n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(a=e[i+-4>>2],h=e[i+-8>>2],g=e[n>>2],m=e[n+4>>2],n=0;l=a,v=n<<2,a=e[v+i>>2],e[f+v>>2]=a-(ie(l,g)+ie(h,m)>>c),h=l,n=n+1|0,(n|0)!=(o|0););}}function cw(i,o,n,a,c,f){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0;var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,bt=0,_t=0,xt=0,Pt=0,It=0,Lt=0,Bt=0,Wt=0,Ht=0,ln=0,On=0,cr=0,zr=0,Vr=0,Zr=0;e:{if(a>>>0>=13){if((o|0)<1)break e;for(te=c,C=a+-13|0;;){c=0,a=0;t:switch(C|0){case 19:a=e[((T<<2)+i|0)+-128>>2],c=a,h=a>>31,a=e[n+124>>2],c=oe(c,h,a,a>>31),a=ne;case 18:h=e[((T<<2)+i|0)+-124>>2],l=h,g=h>>31,h=e[n+120>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 17:h=e[((T<<2)+i|0)+-120>>2],l=h,g=h>>31,h=e[n+116>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 16:h=e[((T<<2)+i|0)+-116>>2],l=h,g=h>>31,h=e[n+112>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 15:h=e[((T<<2)+i|0)+-112>>2],l=h,g=h>>31,h=e[n+108>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 14:h=e[((T<<2)+i|0)+-108>>2],l=h,g=h>>31,h=e[n+104>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 13:h=e[((T<<2)+i|0)+-104>>2],l=h,g=h>>31,h=e[n+100>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 12:h=e[((T<<2)+i|0)+-100>>2],l=h,g=h>>31,h=e[n+96>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 11:h=e[((T<<2)+i|0)+-96>>2],l=h,g=h>>31,h=e[n+92>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 10:h=e[((T<<2)+i|0)+-92>>2],l=h,g=h>>31,h=e[n+88>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 9:h=e[((T<<2)+i|0)+-88>>2],l=h,g=h>>31,h=e[n+84>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 8:h=e[((T<<2)+i|0)+-84>>2],l=h,g=h>>31,h=e[n+80>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 7:h=e[((T<<2)+i|0)+-80>>2],l=h,g=h>>31,h=e[n+76>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 6:h=e[((T<<2)+i|0)+-76>>2],l=h,g=h>>31,h=e[n+72>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 5:h=e[((T<<2)+i|0)+-72>>2],l=h,g=h>>31,h=e[n+68>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 4:h=e[((T<<2)+i|0)+-68>>2],l=h,g=h>>31,h=e[n+64>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 3:h=e[((T<<2)+i|0)+-64>>2],l=h,g=h>>31,h=e[n+60>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 2:h=e[((T<<2)+i|0)+-60>>2],l=h,g=h>>31,h=e[n+56>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 1:h=e[((T<<2)+i|0)+-56>>2],l=h,g=h>>31,h=e[n+52>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 0:g=(T<<2)+i|0,h=e[g+-52>>2],l=h,m=h>>31,h=e[n+48>>2],h=oe(l,m,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,a=e[g+-48>>2],c=a,m=a>>31,a=e[n+44>>2],a=oe(c,m,a,a>>31),c=a+h|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-44>>2],h=a,m=a>>31,a=e[n+40>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-40>>2],h=a,m=a>>31,a=e[n+36>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-36>>2],h=a,m=a>>31,a=e[n+32>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-32>>2],h=a,m=a>>31,a=e[n+28>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-28>>2],h=a,m=a>>31,a=e[n+24>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-24>>2],h=a,m=a>>31,a=e[n+20>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-20>>2],h=a,m=a>>31,a=e[n+16>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-16>>2],h=a,m=a>>31,a=e[n+12>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-12>>2],h=a,m=a>>31,a=e[n+8>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-8>>2],h=a,m=a>>31,a=e[n+4>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-4>>2],h=a,g=a>>31,a=e[n>>2],a=oe(h,g,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=l;break;default:break t}if(h=T<<2,l=h+f|0,m=e[i+h>>2],h=a,a=te,g=a&31,e[l>>2]=m-(32<=(a&63)>>>0?h>>g:((1<>>g),T=T+1|0,(T|0)==(o|0))break}break e}if(a>>>0>=9){if(a>>>0>=11){if((a|0)!=12){if((o|0)<1)break e;for(v=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],g=e[i+-28>>2],m=e[i+-32>>2],A=e[i+-36>>2],G=e[i+-40>>2],E=e[i+-44>>2],l=e[n>>2],ln=l,On=l>>31,l=e[n+4>>2],cr=l,Bt=l>>31,l=e[n+8>>2],Wt=l,Ht=l>>31,l=e[n+12>>2],Pt=l,It=l>>31,l=e[n+16>>2],Lt=l,bt=l>>31,l=e[n+20>>2],_t=l,xt=l>>31,l=e[n+24>>2],at=l,st=l>>31,l=e[n+28>>2],je=l,Qe=l>>31,l=e[n+32>>2],Ye=l,Ee=l>>31,l=e[n+36>>2],Te=l,Be=l>>31,n=e[n+40>>2],ke=n,Se=n>>31,n=0;z=G,G=A,A=m,m=g,g=C,C=h,h=te,te=a,a=T,T=v,l=n<<2,pe=l+f|0,v=e[i+l>>2],N=oe(z,z>>31,Te,Be),l=ne,E=oe(E,E>>31,ke,Se),N=E+N|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,E=oe(G,G>>31,Ye,Ee),N=E+N|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,E=oe(A,A>>31,je,Qe),N=E+N|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,E=oe(m,m>>31,at,st),N=E+N|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,E=oe(g,g>>31,_t,xt),N=E+N|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,E=oe(C,C>>31,Lt,bt),N=E+N|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,E=oe(h,h>>31,Pt,It),N=E+N|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,E=oe(te,te>>31,Wt,Ht),N=E+N|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,E=oe(a,a>>31,cr,Bt),N=E+N|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,E=oe(T,T>>31,ln,On),N=E+N|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,E=l,l=c,ae=l&31,e[pe>>2]=v-(32<=(l&63)>>>0?E>>ae:((1<>>ae),E=z,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(E=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],g=e[i+-28>>2],m=e[i+-32>>2],A=e[i+-36>>2],G=e[i+-40>>2],z=e[i+-44>>2],l=e[i+-48>>2],v=e[n>>2],zr=v,Vr=v>>31,v=e[n+4>>2],Zr=v,ln=v>>31,v=e[n+8>>2],On=v,cr=v>>31,v=e[n+12>>2],Bt=v,Wt=v>>31,v=e[n+16>>2],Ht=v,Pt=v>>31,v=e[n+20>>2],It=v,Lt=v>>31,v=e[n+24>>2],bt=v,_t=v>>31,v=e[n+28>>2],xt=v,at=v>>31,v=e[n+32>>2],st=v,je=v>>31,v=e[n+36>>2],Qe=v,Ye=v>>31,v=e[n+40>>2],Ee=v,Te=v>>31,n=e[n+44>>2],Be=n,ke=n>>31,n=0;v=z,z=G,G=A,A=m,m=g,g=C,C=h,h=te,te=a,a=T,T=E,E=n<<2,Se=E+f|0,E=e[i+E>>2],N=oe(v,v>>31,Ee,Te),ae=ne,pe=N,N=oe(l,l>>31,Be,ke),pe=pe+N|0,l=ne+ae|0,l=pe>>>0>>0?l+1|0:l,N=oe(z,z>>31,Qe,Ye),ae=N+pe|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,N=oe(G,G>>31,st,je),ae=N+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,N=oe(A,A>>31,xt,at),ae=N+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,N=oe(m,m>>31,bt,_t),ae=N+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,N=oe(g,g>>31,It,Lt),ae=N+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,N=oe(C,C>>31,Ht,Pt),ae=N+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,N=oe(h,h>>31,Bt,Wt),ae=N+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,N=oe(te,te>>31,On,cr),ae=N+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,N=oe(a,a>>31,Zr,ln),ae=N+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,N=oe(T,T>>31,zr,Vr),ae=N+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,N=l,l=c,pe=l&31,e[Se>>2]=E-(32<=(l&63)>>>0?N>>pe:((1<>>pe),l=v,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=10){if((o|0)<1)break e;for(G=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],g=e[i+-28>>2],m=e[i+-32>>2],z=e[i+-36>>2],A=e[n>>2],Pt=A,It=A>>31,A=e[n+4>>2],Lt=A,bt=A>>31,A=e[n+8>>2],_t=A,xt=A>>31,A=e[n+12>>2],at=A,st=A>>31,A=e[n+16>>2],je=A,Qe=A>>31,A=e[n+20>>2],Ye=A,Ee=A>>31,A=e[n+24>>2],Te=A,Be=A>>31,A=e[n+28>>2],ke=A,Se=A>>31,n=e[n+32>>2],pe=n,ae=n>>31,n=0;A=m,m=g,g=C,C=h,h=te,te=a,a=T,T=G,l=n<<2,N=l+f|0,G=e[i+l>>2],v=oe(A,A>>31,ke,Se),l=ne,z=oe(z,z>>31,pe,ae),v=z+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,z=oe(m,m>>31,Te,Be),v=z+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,z=oe(g,g>>31,Ye,Ee),v=z+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,z=oe(C,C>>31,je,Qe),v=z+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,z=oe(h,h>>31,at,st),v=z+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,z=oe(te,te>>31,_t,xt),v=z+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,z=oe(a,a>>31,Lt,bt),v=z+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,z=oe(T,T>>31,Pt,It),v=z+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,z=l,l=c,E=l&31,e[N>>2]=G-(32<=(l&63)>>>0?z>>E:((1<>>E),z=A,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(z=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],g=e[i+-28>>2],m=e[i+-32>>2],A=e[i+-36>>2],v=e[i+-40>>2],l=e[n>>2],Bt=l,Wt=l>>31,l=e[n+4>>2],Ht=l,Pt=l>>31,l=e[n+8>>2],It=l,Lt=l>>31,l=e[n+12>>2],bt=l,_t=l>>31,l=e[n+16>>2],xt=l,at=l>>31,l=e[n+20>>2],st=l,je=l>>31,l=e[n+24>>2],Qe=l,Ye=l>>31,l=e[n+28>>2],Ee=l,Te=l>>31,l=e[n+32>>2],Be=l,ke=l>>31,n=e[n+36>>2],Se=n,pe=n>>31,n=0;G=A,A=m,m=g,g=C,C=h,h=te,te=a,a=T,T=z,l=n<<2,ae=l+f|0,z=e[i+l>>2],E=oe(G,G>>31,Be,ke),l=ne,v=oe(v,v>>31,Se,pe),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(A,A>>31,Ee,Te),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(m,m>>31,Qe,Ye),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(g,g>>31,st,je),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(C,C>>31,xt,at),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(h,h>>31,bt,_t),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(te,te>>31,It,Lt),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(a,a>>31,Ht,Pt),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(T,T>>31,Bt,Wt),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=l,l=c,N=l&31,e[ae>>2]=z-(32<=(l&63)>>>0?v>>N:((1<>>N),v=G,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=5){if(a>>>0>=7){if((a|0)!=8){if((o|0)<1)break e;for(m=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],A=e[i+-28>>2],g=e[n>>2],at=g,st=g>>31,g=e[n+4>>2],je=g,Qe=g>>31,g=e[n+8>>2],Ye=g,Ee=g>>31,g=e[n+12>>2],Te=g,Be=g>>31,g=e[n+16>>2],ke=g,Se=g>>31,g=e[n+20>>2],pe=g,ae=g>>31,n=e[n+24>>2],N=n,E=n>>31,n=0;g=C,C=h,h=te,te=a,a=T,T=m,m=n<<2,v=m+f|0,m=e[i+m>>2],G=oe(g,g>>31,pe,ae),l=ne,A=oe(A,A>>31,N,E),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,A=oe(C,C>>31,ke,Se),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,A=oe(h,h>>31,Te,Be),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,A=oe(te,te>>31,Ye,Ee),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,A=oe(a,a>>31,je,Qe),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,A=oe(T,T>>31,at,st),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,z=c&31,e[v>>2]=m-(32<=(c&63)>>>0?l>>z:((1<>>z),A=g,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(A=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],g=e[i+-28>>2],G=e[i+-32>>2],m=e[n>>2],bt=m,_t=m>>31,m=e[n+4>>2],xt=m,at=m>>31,m=e[n+8>>2],st=m,je=m>>31,m=e[n+12>>2],Qe=m,Ye=m>>31,m=e[n+16>>2],Ee=m,Te=m>>31,m=e[n+20>>2],Be=m,ke=m>>31,m=e[n+24>>2],Se=m,pe=m>>31,n=e[n+28>>2],ae=n,N=n>>31,n=0;m=g,g=C,C=h,h=te,te=a,a=T,T=A,A=n<<2,E=A+f|0,A=e[i+A>>2],z=oe(m,m>>31,Se,pe),l=ne,G=oe(G,G>>31,ae,N),z=G+z|0,l=ne+l|0,l=z>>>0>>0?l+1|0:l,G=oe(g,g>>31,Be,ke),z=G+z|0,l=ne+l|0,l=z>>>0>>0?l+1|0:l,G=oe(C,C>>31,Ee,Te),z=G+z|0,l=ne+l|0,l=z>>>0>>0?l+1|0:l,G=oe(h,h>>31,Qe,Ye),z=G+z|0,l=ne+l|0,l=z>>>0>>0?l+1|0:l,G=oe(te,te>>31,st,je),z=G+z|0,l=ne+l|0,l=z>>>0>>0?l+1|0:l,G=oe(a,a>>31,xt,at),z=G+z|0,l=ne+l|0,l=z>>>0>>0?l+1|0:l,G=oe(T,T>>31,bt,_t),z=G+z|0,l=ne+l|0,l=z>>>0>>0?l+1|0:l,G=l,l=c,v=l&31,e[E>>2]=A-(32<=(l&63)>>>0?G>>v:((1<>>v),G=m,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=6){if((o|0)<1)break e;for(C=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],g=e[i+-20>>2],h=e[n>>2],Ee=h,Te=h>>31,h=e[n+4>>2],Be=h,ke=h>>31,h=e[n+8>>2],Se=h,pe=h>>31,h=e[n+12>>2],ae=h,N=h>>31,n=e[n+16>>2],E=n,v=n>>31,n=0;h=te,te=a,a=T,T=C,C=n<<2,z=C+f|0,C=e[i+C>>2],A=oe(h,h>>31,ae,N),m=ne,g=oe(g,g>>31,E,v),A=g+A|0,l=ne+m|0,l=A>>>0>>0?l+1|0:l,g=oe(te,te>>31,Se,pe),m=g+A|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,g=oe(a,a>>31,Be,ke),m=g+m|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,g=oe(T,T>>31,Ee,Te),m=g+m|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,A=c&31,e[z>>2]=C-(32<=(c&63)>>>0?l>>A:((1<>>A),g=h,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(g=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],m=e[i+-24>>2],C=e[n>>2],Qe=C,Ye=C>>31,C=e[n+4>>2],Ee=C,Te=C>>31,C=e[n+8>>2],Be=C,ke=C>>31,C=e[n+12>>2],Se=C,pe=C>>31,C=e[n+16>>2],ae=C,N=C>>31,n=e[n+20>>2],E=n,v=n>>31,n=0;C=h,h=te,te=a,a=T,T=g,g=n<<2,z=g+f|0,g=e[i+g>>2],l=oe(C,C>>31,ae,N),A=ne,m=oe(m,m>>31,E,v),je=m+l|0,l=ne+A|0,l=je>>>0>>0?l+1|0:l,m=oe(h,h>>31,Se,pe),A=m+je|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,m=oe(te,te>>31,Be,ke),A=m+A|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,m=oe(a,a>>31,Ee,Te),A=m+A|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,m=oe(T,T>>31,Qe,Ye),A=m+A|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,G=c&31,e[z>>2]=g-(32<=(c&63)>>>0?l>>G:((1<>>G),m=C,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=3){if((a|0)!=4){if((o|0)<1)break e;for(te=e[i+-4>>2],T=e[i+-8>>2],h=e[i+-12>>2],a=e[n>>2],ae=a,N=a>>31,a=e[n+4>>2],E=a,v=a>>31,n=e[n+8>>2],z=n,G=n>>31,n=0;a=T,T=te,te=n<<2,A=te+f|0,te=e[i+te>>2],m=te,g=oe(a,a>>31,E,v),C=ne,h=oe(h,h>>31,z,G),g=h+g|0,l=ne+C|0,l=g>>>0>>0?l+1|0:l,h=oe(T,T>>31,ae,N),C=h+g|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,h=c,g=h&31,e[A>>2]=m-(32<=(h&63)>>>0?l>>g:((1<>>g),h=a,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(h=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],C=e[i+-16>>2],te=e[n>>2],ke=te,Se=te>>31,te=e[n+4>>2],pe=te,ae=te>>31,te=e[n+8>>2],N=te,E=N>>31,n=e[n+12>>2],v=n,z=n>>31,n=0;te=a,a=T,T=h,h=n<<2,G=h+f|0,h=e[i+h>>2],m=oe(te,te>>31,N,E),g=ne,C=oe(C,C>>31,v,z),m=C+m|0,l=ne+g|0,l=m>>>0>>0?l+1|0:l,C=oe(a,a>>31,pe,ae),g=C+m|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,C=oe(T,T>>31,ke,Se),g=C+g|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,m=c&31,e[G>>2]=h-(32<=(c&63)>>>0?l>>m:((1<>>m),C=te,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=2){if((o|0)<1)break e;for(T=e[i+-4>>2],n=e[n>>2],m=n,g=n>>31,n=0;a=n<<2,l=a+f|0,te=e[i+a>>2],T=oe(T,T>>31,m,g),h=ne,a=c,C=a&31,e[l>>2]=te-(32<=(a&63)>>>0?h>>C:((1<>>C),T=te,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(a=e[i+-4>>2],te=e[i+-8>>2],T=e[n>>2],v=T,z=v>>31,n=e[n+4>>2],G=n,A=n>>31,n=0;T=a,a=n<<2,m=a+f|0,a=e[i+a>>2],C=oe(T,T>>31,v,z),h=ne,te=oe(te,te>>31,G,A),C=te+C|0,l=ne+h|0,l=C>>>0>>0?l+1|0:l,h=C,C=c&31,e[m>>2]=a-(32<=(c&63)>>>0?l>>C:((1<>>C),te=T,n=n+1|0,(n|0)!=(o|0););}}function uw(i,o,n,a,c,f){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0;var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0;e:{if(a>>>0>=13){if((o|0)<1)break e;for(G=a+-13|0;;){Be=0,je=0,Ee=0,Te=0,ke=0,Se=0,ae=0,pe=0,te=0,T=0,C=0,v=0,N=0,m=0,E=0,h=0,z=0,A=0,g=0,a=0;t:switch(G|0){case 19:Be=ie(e[((l<<2)+f|0)+-128>>2],e[n+124>>2]);case 18:je=ie(e[((l<<2)+f|0)+-124>>2],e[n+120>>2])+Be|0;case 17:Ee=ie(e[((l<<2)+f|0)+-120>>2],e[n+116>>2])+je|0;case 16:Te=ie(e[((l<<2)+f|0)+-116>>2],e[n+112>>2])+Ee|0;case 15:ke=ie(e[((l<<2)+f|0)+-112>>2],e[n+108>>2])+Te|0;case 14:Se=ie(e[((l<<2)+f|0)+-108>>2],e[n+104>>2])+ke|0;case 13:ae=ie(e[((l<<2)+f|0)+-104>>2],e[n+100>>2])+Se|0;case 12:pe=ie(e[((l<<2)+f|0)+-100>>2],e[n+96>>2])+ae|0;case 11:te=ie(e[((l<<2)+f|0)+-96>>2],e[n+92>>2])+pe|0;case 10:T=ie(e[((l<<2)+f|0)+-92>>2],e[n+88>>2])+te|0;case 9:C=ie(e[((l<<2)+f|0)+-88>>2],e[n+84>>2])+T|0;case 8:v=ie(e[((l<<2)+f|0)+-84>>2],e[n+80>>2])+C|0;case 7:N=ie(e[((l<<2)+f|0)+-80>>2],e[n+76>>2])+v|0;case 6:m=ie(e[((l<<2)+f|0)+-76>>2],e[n+72>>2])+N|0;case 5:E=ie(e[((l<<2)+f|0)+-72>>2],e[n+68>>2])+m|0;case 4:h=ie(e[((l<<2)+f|0)+-68>>2],e[n+64>>2])+E|0;case 3:z=ie(e[((l<<2)+f|0)+-64>>2],e[n+60>>2])+h|0;case 2:A=ie(e[((l<<2)+f|0)+-60>>2],e[n+56>>2])+z|0;case 1:g=ie(e[((l<<2)+f|0)+-56>>2],e[n+52>>2])+A|0;case 0:a=(l<<2)+f|0,a=((((((((((((ie(e[a+-52>>2],e[n+48>>2])+g|0)+ie(e[a+-48>>2],e[n+44>>2])|0)+ie(e[a+-44>>2],e[n+40>>2])|0)+ie(e[a+-40>>2],e[n+36>>2])|0)+ie(e[a+-36>>2],e[n+32>>2])|0)+ie(e[a+-32>>2],e[n+28>>2])|0)+ie(e[a+-28>>2],e[n+24>>2])|0)+ie(e[a+-24>>2],e[n+20>>2])|0)+ie(e[a+-20>>2],e[n+16>>2])|0)+ie(e[a+-16>>2],e[n+12>>2])|0)+ie(e[a+-12>>2],e[n+8>>2])|0)+ie(e[a+-8>>2],e[n+4>>2])|0)+ie(e[a+-4>>2],e[n>>2])|0;break;default:break t}if(g=l<<2,e[g+f>>2]=e[i+g>>2]+(a>>c),l=l+1|0,(l|0)==(o|0))break}break e}if(a>>>0>=9){if(a>>>0>=11){if((a|0)!=12){if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],z=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],m=e[f+-32>>2],N=e[f+-36>>2],v=e[f+-40>>2],C=e[f+-44>>2],Qe=e[n>>2],Ye=e[n+4>>2],Be=e[n+8>>2],je=e[n+12>>2],Ee=e[n+16>>2],Te=e[n+20>>2],ke=e[n+24>>2],Se=e[n+28>>2],ae=e[n+32>>2],pe=e[n+36>>2],te=e[n+40>>2],n=0;G=v,C=ie(v,pe)+ie(C,te)|0,v=N,C=C+ie(ae,v)|0,N=m,C=ie(m,Se)+C|0,m=E,C=C+ie(ke,m)|0,E=h,C=ie(h,Te)+C|0,h=z,C=C+ie(Ee,h)|0,z=A,C=ie(A,je)+C|0,A=g,T=ie(g,Be)+C|0,g=a,C=n<<2,T=ie(a,Ye)+T|0,a=l,l=e[C+i>>2]+(T+ie(Qe,a)>>c)|0,e[f+C>>2]=l,C=G,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],z=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],m=e[f+-32>>2],N=e[f+-36>>2],v=e[f+-40>>2],C=e[f+-44>>2],T=e[f+-48>>2],at=e[n>>2],st=e[n+4>>2],Qe=e[n+8>>2],Ye=e[n+12>>2],Be=e[n+16>>2],je=e[n+20>>2],Ee=e[n+24>>2],Te=e[n+28>>2],ke=e[n+32>>2],Se=e[n+36>>2],ae=e[n+40>>2],pe=e[n+44>>2],n=0;G=C,T=ie(C,ae)+ie(T,pe)|0,C=v,T=ie(v,Se)+T|0,v=N,T=T+ie(ke,v)|0,N=m,T=ie(m,Te)+T|0,m=E,T=T+ie(Ee,m)|0,E=h,T=ie(h,je)+T|0,h=z,T=T+ie(Be,h)|0,z=A,T=ie(A,Ye)+T|0,A=g,te=ie(g,Qe)+T|0,g=a,T=n<<2,te=ie(a,st)+te|0,a=l,l=e[T+i>>2]+(te+ie(at,a)>>c)|0,e[f+T>>2]=l,T=G,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=10){if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],z=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],m=e[f+-32>>2],N=e[f+-36>>2],Ee=e[n>>2],Te=e[n+4>>2],ke=e[n+8>>2],Se=e[n+12>>2],ae=e[n+16>>2],pe=e[n+20>>2],te=e[n+24>>2],T=e[n+28>>2],G=e[n+32>>2],n=0;v=m,N=ie(m,T)+ie(N,G)|0,m=E,N=N+ie(te,m)|0,E=h,N=ie(h,pe)+N|0,h=z,N=N+ie(ae,h)|0,z=A,N=ie(A,Se)+N|0,A=g,C=ie(g,ke)+N|0,g=a,N=n<<2,C=ie(a,Te)+C|0,a=l,l=e[N+i>>2]+(C+ie(Ee,a)>>c)|0,e[f+N>>2]=l,N=v,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],z=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],m=e[f+-32>>2],N=e[f+-36>>2],v=e[f+-40>>2],Be=e[n>>2],je=e[n+4>>2],Ee=e[n+8>>2],Te=e[n+12>>2],ke=e[n+16>>2],Se=e[n+20>>2],ae=e[n+24>>2],pe=e[n+28>>2],te=e[n+32>>2],T=e[n+36>>2],n=0;C=N,v=ie(te,C)+ie(v,T)|0,N=m,v=ie(m,pe)+v|0,m=E,v=v+ie(ae,m)|0,E=h,v=ie(h,Se)+v|0,h=z,v=v+ie(ke,h)|0,z=A,v=ie(A,Te)+v|0,A=g,G=ie(g,Ee)+v|0,g=a,v=n<<2,G=ie(a,je)+G|0,a=l,l=e[v+i>>2]+(G+ie(Be,a)>>c)|0,e[f+v>>2]=l,v=C,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=5){if(a>>>0>=7){if((a|0)!=8){if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],z=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],ae=e[n>>2],pe=e[n+4>>2],te=e[n+8>>2],T=e[n+12>>2],G=e[n+16>>2],C=e[n+20>>2],v=e[n+24>>2],n=0;m=h,E=ie(h,C)+ie(v,E)|0,h=z,E=E+ie(G,h)|0,z=A,E=ie(A,T)+E|0,A=g,N=ie(g,te)+E|0,g=a,E=n<<2,N=ie(a,pe)+N|0,a=l,l=e[E+i>>2]+(N+ie(ae,a)>>c)|0,e[f+E>>2]=l,E=m,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],z=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],m=e[f+-32>>2],ke=e[n>>2],Se=e[n+4>>2],ae=e[n+8>>2],pe=e[n+12>>2],te=e[n+16>>2],T=e[n+20>>2],G=e[n+24>>2],C=e[n+28>>2],n=0;N=E,m=ie(G,E)+ie(m,C)|0,E=h,m=ie(h,T)+m|0,h=z,m=m+ie(te,h)|0,z=A,m=ie(A,pe)+m|0,A=g,v=ie(g,ae)+m|0,g=a,m=n<<2,v=ie(a,Se)+v|0,a=l,l=e[m+i>>2]+(v+ie(ke,a)>>c)|0,e[f+m>>2]=l,m=N,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=6){if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],z=e[f+-20>>2],G=e[n>>2],C=e[n+4>>2],v=e[n+8>>2],N=e[n+12>>2],m=e[n+16>>2],n=0;h=A,z=ie(N,h)+ie(m,z)|0,A=g,E=ie(g,v)+z|0,g=a,z=n<<2,E=ie(a,C)+E|0,a=l,l=e[z+i>>2]+(E+ie(G,a)>>c)|0,e[f+z>>2]=l,z=h,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],z=e[f+-20>>2],h=e[f+-24>>2],te=e[n>>2],T=e[n+4>>2],G=e[n+8>>2],C=e[n+12>>2],v=e[n+16>>2],N=e[n+20>>2],n=0;E=z,h=ie(v,E)+ie(h,N)|0,z=A,h=ie(A,C)+h|0,A=g,m=ie(g,G)+h|0,g=a,h=n<<2,m=ie(a,T)+m|0,a=l,l=e[h+i>>2]+(m+ie(te,a)>>c)|0,e[f+h>>2]=l,h=E,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=3){if((a|0)!=4){if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],m=e[n>>2],E=e[n+4>>2],h=e[n+8>>2],n=0;A=a,z=n<<2,g=ie(a,E)+ie(g,h)|0,a=l,l=e[z+i>>2]+(g+ie(m,a)>>c)|0,e[f+z>>2]=l,g=A,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],v=e[n>>2],N=e[n+4>>2],m=e[n+8>>2],E=e[n+12>>2],n=0;z=g,h=ie(g,m)+ie(A,E)|0,g=a,A=n<<2,h=ie(a,N)+h|0,a=l,l=e[A+i>>2]+(h+ie(v,a)>>c)|0,e[f+A>>2]=l,A=z,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=2){if((o|0)<1)break e;for(l=e[f+-4>>2],g=e[n>>2],n=0;a=n<<2,l=e[a+i>>2]+(ie(l,g)>>c)|0,e[a+f>>2]=l,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],h=e[n>>2],z=e[n+4>>2],n=0;g=l,A=n<<2,l=e[A+i>>2]+(ie(l,h)+ie(a,z)>>c)|0,e[f+A>>2]=l,a=g,n=n+1|0,(n|0)!=(o|0););}}function fw(i,o,n,a,c,f){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0;var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,bt=0,_t=0,xt=0,Pt=0,It=0,Lt=0,Bt=0,Wt=0,Ht=0,ln=0,On=0,cr=0,zr=0,Vr=0,Zr=0,fi=0;e:{if(a>>>0>=13){if((o|0)<1)break e;for(E=c,C=a+-13|0;;){c=0,a=0;t:switch(C|0){case 19:a=e[((m<<2)+f|0)+-128>>2],c=a,h=a>>31,a=e[n+124>>2],c=oe(c,h,a,a>>31),a=ne;case 18:h=e[((m<<2)+f|0)+-124>>2],l=h,g=h>>31,h=e[n+120>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 17:h=e[((m<<2)+f|0)+-120>>2],l=h,g=h>>31,h=e[n+116>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 16:h=e[((m<<2)+f|0)+-116>>2],l=h,g=h>>31,h=e[n+112>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 15:h=e[((m<<2)+f|0)+-112>>2],l=h,g=h>>31,h=e[n+108>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 14:h=e[((m<<2)+f|0)+-108>>2],l=h,g=h>>31,h=e[n+104>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 13:h=e[((m<<2)+f|0)+-104>>2],l=h,g=h>>31,h=e[n+100>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 12:h=e[((m<<2)+f|0)+-100>>2],l=h,g=h>>31,h=e[n+96>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 11:h=e[((m<<2)+f|0)+-96>>2],l=h,g=h>>31,h=e[n+92>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 10:h=e[((m<<2)+f|0)+-92>>2],l=h,g=h>>31,h=e[n+88>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 9:h=e[((m<<2)+f|0)+-88>>2],l=h,g=h>>31,h=e[n+84>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 8:h=e[((m<<2)+f|0)+-84>>2],l=h,g=h>>31,h=e[n+80>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 7:h=e[((m<<2)+f|0)+-80>>2],l=h,g=h>>31,h=e[n+76>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 6:h=e[((m<<2)+f|0)+-76>>2],l=h,g=h>>31,h=e[n+72>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 5:h=e[((m<<2)+f|0)+-72>>2],l=h,g=h>>31,h=e[n+68>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 4:h=e[((m<<2)+f|0)+-68>>2],l=h,g=h>>31,h=e[n+64>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 3:h=e[((m<<2)+f|0)+-64>>2],l=h,g=h>>31,h=e[n+60>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 2:h=e[((m<<2)+f|0)+-60>>2],l=h,g=h>>31,h=e[n+56>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 1:h=e[((m<<2)+f|0)+-56>>2],l=h,g=h>>31,h=e[n+52>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 0:h=(m<<2)+f|0,g=e[h+-52>>2],l=g,v=g>>31,g=e[n+48>>2],g=oe(l,v,g,g>>31)+c|0,l=a+ne|0,l=g>>>0>>0?l+1|0:l,a=e[h+-48>>2],c=a,v=a>>31,a=e[n+44>>2],c=oe(c,v,a,a>>31),a=c+g|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-44>>2],c=a,v=a>>31,a=e[n+40>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-40>>2],c=a,v=a>>31,a=e[n+36>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-36>>2],c=a,v=a>>31,a=e[n+32>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-32>>2],c=a,v=a>>31,a=e[n+28>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-28>>2],c=a,v=a>>31,a=e[n+24>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-24>>2],c=a,v=a>>31,a=e[n+20>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-20>>2],c=a,v=a>>31,a=e[n+16>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-16>>2],c=a,v=a>>31,a=e[n+12>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-12>>2],c=a,v=a>>31,a=e[n+8>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-8>>2],c=a,v=a>>31,a=e[n+4>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-4>>2],c=a,h=a>>31,a=e[n>>2],c=oe(c,h,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,c=a,a=l;break;default:break t}if(h=m<<2,v=h+f|0,l=e[i+h>>2],g=c,c=E,h=c&31,e[v>>2]=l+(32<=(c&63)>>>0?a>>h:((1<>>h),m=m+1|0,(m|0)==(o|0))break}break e}if(a>>>0>=9){if(a>>>0>=11){if((a|0)!=12){if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[f+-32>>2],N=e[f+-36>>2],z=e[f+-40>>2],T=e[f+-44>>2],l=e[n>>2],G=l,Be=l>>31,l=e[n+4>>2],je=l,Qe=l>>31,l=e[n+8>>2],Te=l,at=l>>31,l=e[n+12>>2],st=l,Se=l>>31,l=e[n+16>>2],bt=l,_t=l>>31,l=e[n+20>>2],Ye=l,Pt=l>>31,l=e[n+24>>2],It=l,ke=l>>31,l=e[n+28>>2],Lt=l,Bt=l>>31,l=e[n+32>>2],xt=l,Ht=l>>31,l=e[n+36>>2],ln=l,pe=l>>31,n=e[n+40>>2],On=n,cr=n>>31,n=0;l=n<<2,Wt=l+f|0,zr=e[i+l>>2],te=z,l=oe(z,z>>31,ln,pe),Vr=ne,z=N,ae=oe(T,T>>31,On,cr),T=ae+l|0,l=ne+Vr|0,l=T>>>0>>0?l+1|0:l,ae=T,T=oe(N,N>>31,xt,Ht),N=ae+T|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,T=N,N=A,ae=T,T=oe(A,A>>31,Lt,Bt),A=ae+T|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,T=A,A=v,v=T,T=oe(A,A>>31,It,ke),v=v+T|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,T=v,v=C,ae=T,T=oe(C,C>>31,Ye,Pt),C=ae+T|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,T=C,C=g,ae=T,T=oe(g,g>>31,bt,_t),g=ae+T|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,T=g,g=h,ae=T,T=oe(h,h>>31,st,Se),h=ae+T|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,ae=h,h=E,T=oe(h,h>>31,Te,at),E=ae+T|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,T=E,E=a,Ee=Wt,ae=T,T=oe(a,a>>31,je,Qe),a=ae+T|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,ae=a,a=m,T=oe(a,a>>31,G,Be),m=ae+T|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,Wt=m,m=c,T=m&31,m=(32<=(m&63)>>>0?l>>T:((1<>>T)+zr|0,e[Ee>>2]=m,T=te,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[f+-32>>2],N=e[f+-36>>2],z=e[f+-40>>2],T=e[f+-44>>2],l=e[f+-48>>2],te=e[n>>2],Be=te,je=te>>31,te=e[n+4>>2],Qe=te,Te=te>>31,te=e[n+8>>2],at=te,st=te>>31,te=e[n+12>>2],Se=te,bt=te>>31,te=e[n+16>>2],_t=te,Ye=te>>31,te=e[n+20>>2],Pt=te,It=te>>31,te=e[n+24>>2],ke=te,Lt=te>>31,te=e[n+28>>2],Bt=te,xt=te>>31,te=e[n+32>>2],Ht=te,ln=te>>31,te=e[n+36>>2],pe=te,On=te>>31,te=e[n+40>>2],cr=te,Wt=te>>31,n=e[n+44>>2],zr=n,Vr=n>>31,n=0;te=n<<2,ae=te+f|0,fi=e[i+te>>2],te=T,G=oe(T,T>>31,cr,Wt),Ee=ne,T=z,Zr=oe(l,l>>31,zr,Vr),G=Zr+G|0,l=ne+Ee|0,l=G>>>0>>0?l+1|0:l,Ee=G,G=oe(z,z>>31,pe,On),z=Ee+G|0,l=ne+l|0,l=z>>>0>>0?l+1|0:l,G=z,z=N,Ee=G,G=oe(N,N>>31,Ht,ln),N=Ee+G|0,l=ne+l|0,l=N>>>0>>0?l+1|0:l,G=N,N=A,Ee=G,G=oe(A,A>>31,Bt,xt),A=Ee+G|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,G=A,A=v,v=G,G=oe(A,A>>31,ke,Lt),v=v+G|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,G=v,v=C,Ee=G,G=oe(C,C>>31,Pt,It),C=Ee+G|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,G=C,C=g,Ee=G,G=oe(g,g>>31,_t,Ye),g=Ee+G|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,G=g,g=h,Ee=G,G=oe(h,h>>31,Se,bt),h=Ee+G|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,Ee=h,h=E,G=oe(h,h>>31,at,st),E=Ee+G|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,G=E,E=a,Ee=ae,ae=G,G=oe(a,a>>31,Qe,Te),a=ae+G|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,ae=a,a=m,G=oe(a,a>>31,Be,je),m=ae+G|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,ae=m,m=c,G=m&31,m=(32<=(m&63)>>>0?l>>G:((1<>>G)+fi|0,e[Ee>>2]=m,l=te,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=10){if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[f+-32>>2],N=e[f+-36>>2],l=e[n>>2],T=l,te=l>>31,l=e[n+4>>2],G=l,Be=l>>31,l=e[n+8>>2],je=l,Qe=l>>31,l=e[n+12>>2],Te=l,at=l>>31,l=e[n+16>>2],st=l,Se=l>>31,l=e[n+20>>2],bt=l,_t=l>>31,l=e[n+24>>2],Ye=l,Pt=l>>31,l=e[n+28>>2],It=l,ke=l>>31,n=e[n+32>>2],Lt=n,Bt=n>>31,n=0;l=n<<2,xt=l+f|0,Ht=e[i+l>>2],z=A,l=oe(A,A>>31,It,ke),ln=ne,A=v,pe=oe(N,N>>31,Lt,Bt),N=pe+l|0,l=ne+ln|0,l=N>>>0>>0?l+1|0:l,v=N,N=oe(A,A>>31,Ye,Pt),v=v+N|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,N=v,v=C,pe=N,N=oe(C,C>>31,bt,_t),C=pe+N|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,N=C,C=g,pe=N,N=oe(g,g>>31,st,Se),g=pe+N|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,N=g,g=h,pe=N,N=oe(h,h>>31,Te,at),h=pe+N|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,pe=h,h=E,N=oe(h,h>>31,je,Qe),E=pe+N|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,N=E,E=a,ae=xt,pe=N,N=oe(a,a>>31,G,Be),a=pe+N|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,pe=a,a=m,N=oe(a,a>>31,T,te),m=pe+N|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,xt=m,m=c,N=m&31,m=(32<=(m&63)>>>0?l>>N:((1<>>N)+Ht|0,e[ae>>2]=m,N=z,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[f+-32>>2],N=e[f+-36>>2],z=e[f+-40>>2],l=e[n>>2],te=l,G=l>>31,l=e[n+4>>2],Be=l,je=l>>31,l=e[n+8>>2],Qe=l,Te=l>>31,l=e[n+12>>2],at=l,st=l>>31,l=e[n+16>>2],Se=l,bt=l>>31,l=e[n+20>>2],_t=l,Ye=l>>31,l=e[n+24>>2],Pt=l,It=l>>31,l=e[n+28>>2],ke=l,Lt=l>>31,l=e[n+32>>2],Bt=l,xt=l>>31,n=e[n+36>>2],Ht=n,ln=n>>31,n=0;l=n<<2,pe=l+f|0,On=e[i+l>>2],T=N,l=oe(N,N>>31,Bt,xt),cr=ne,N=A,Wt=oe(z,z>>31,Ht,ln),z=Wt+l|0,l=ne+cr|0,l=z>>>0>>0?l+1|0:l,ae=z,z=oe(A,A>>31,ke,Lt),A=ae+z|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,z=A,A=v,v=z,z=oe(A,A>>31,Pt,It),v=v+z|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,z=v,v=C,ae=z,z=oe(C,C>>31,_t,Ye),C=ae+z|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,z=C,C=g,ae=z,z=oe(g,g>>31,Se,bt),g=ae+z|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,z=g,g=h,ae=z,z=oe(h,h>>31,at,st),h=ae+z|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,ae=h,h=E,z=oe(h,h>>31,Qe,Te),E=ae+z|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,z=E,E=a,ae=pe,pe=z,z=oe(a,a>>31,Be,je),a=pe+z|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,pe=a,a=m,z=oe(a,a>>31,te,G),m=pe+z|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,pe=m,m=c,z=m&31,m=(32<=(m&63)>>>0?l>>z:((1<>>z)+On|0,e[ae>>2]=m,z=T,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=5){if(a>>>0>=7){if((a|0)!=8){if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[n>>2],N=A,z=A>>31,A=e[n+4>>2],T=A,te=A>>31,A=e[n+8>>2],G=A,Be=A>>31,A=e[n+12>>2],je=A,Qe=A>>31,A=e[n+16>>2],Te=A,at=A>>31,A=e[n+20>>2],st=A,Se=A>>31,n=e[n+24>>2],bt=n,_t=n>>31,n=0;A=n<<2,Ye=A+f|0,Pt=e[i+A>>2],A=C,l=oe(A,A>>31,st,Se),It=ne,C=g,ke=oe(v,v>>31,bt,_t),v=ke+l|0,l=ne+It|0,l=v>>>0>>0?l+1|0:l,ke=v,v=oe(g,g>>31,Te,at),g=ke+v|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,v=g,g=h,ke=v,v=oe(h,h>>31,je,Qe),h=ke+v|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,ke=h,h=E,v=oe(h,h>>31,G,Be),E=ke+v|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=E,E=a,pe=Ye,ke=v,v=oe(a,a>>31,T,te),a=ke+v|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,ke=a,a=m,v=oe(a,a>>31,N,z),m=ke+v|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,Ye=m,m=c,v=m&31,m=(32<=(m&63)>>>0?l>>v:((1<>>v)+Pt|0,e[pe>>2]=m,v=A,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[f+-32>>2],l=e[n>>2],z=l,T=l>>31,l=e[n+4>>2],te=l,G=l>>31,l=e[n+8>>2],Be=l,je=l>>31,l=e[n+12>>2],Qe=l,Te=l>>31,l=e[n+16>>2],at=l,st=l>>31,l=e[n+20>>2],Se=l,bt=l>>31,l=e[n+24>>2],_t=l,Ye=l>>31,n=e[n+28>>2],Pt=n,It=n>>31,n=0;l=n<<2,ke=l+f|0,Lt=e[i+l>>2],N=v,l=oe(v,v>>31,_t,Ye),Bt=ne,v=C,xt=oe(A,A>>31,Pt,It),A=xt+l|0,l=ne+Bt|0,l=A>>>0>>0?l+1|0:l,pe=A,A=oe(C,C>>31,Se,bt),C=pe+A|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,A=C,C=g,pe=A,A=oe(g,g>>31,at,st),g=pe+A|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,A=g,g=h,pe=A,A=oe(h,h>>31,Qe,Te),h=pe+A|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,pe=h,h=E,A=oe(h,h>>31,Be,je),E=pe+A|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,A=E,E=a,pe=ke,ke=A,A=oe(a,a>>31,te,G),a=ke+A|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,ke=a,a=m,A=oe(a,a>>31,z,T),m=ke+A|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,ke=m,m=c,A=m&31,m=(32<=(m&63)>>>0?l>>A:((1<>>A)+Lt|0,e[pe>>2]=m,A=N,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=6){if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[n>>2],v=C,A=C>>31,C=e[n+4>>2],N=C,z=C>>31,C=e[n+8>>2],T=C,te=C>>31,C=e[n+12>>2],G=C,Be=C>>31,n=e[n+16>>2],je=n,Qe=n>>31,n=0;C=n<<2,Te=C+f|0,at=e[i+C>>2],C=h,l=oe(h,h>>31,G,Be),st=ne,h=E,Se=oe(g,g>>31,je,Qe),g=Se+l|0,l=ne+st|0,l=g>>>0>>0?l+1|0:l,E=g,g=oe(h,h>>31,T,te),E=E+g|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,g=E,E=a,Se=g,g=oe(a,a>>31,N,z),a=Se+g|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=m,m=oe(a,a>>31,v,A),g=g+m|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,m=c&31,m=(32<=(c&63)>>>0?l>>m:((1<>>m)+at|0,e[Te>>2]=m,g=C,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[n>>2],A=v,N=A>>31,v=e[n+4>>2],z=v,T=v>>31,v=e[n+8>>2],te=v,G=v>>31,v=e[n+12>>2],Be=v,je=v>>31,v=e[n+16>>2],Qe=v,Te=v>>31,n=e[n+20>>2],at=n,st=n>>31,n=0;v=n<<2,Se=v+f|0,bt=e[i+v>>2],v=g,l=oe(g,g>>31,Qe,Te),_t=ne,g=h,Ye=oe(C,C>>31,at,st),C=Ye+l|0,l=ne+_t|0,l=C>>>0>>0?l+1|0:l,ke=C,C=oe(h,h>>31,Be,je),h=ke+C|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,ke=h,h=E,C=oe(h,h>>31,te,G),E=ke+C|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,C=E,E=a,ke=Se,Se=C,C=oe(a,a>>31,z,T),a=Se+C|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,C=a,a=m,m=oe(a,a>>31,A,N),C=C+m|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,m=c&31,m=(32<=(c&63)>>>0?l>>m:((1<>>m)+bt|0,e[ke>>2]=m,C=v,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=3){if((a|0)!=4){if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[n>>2],C=h,v=h>>31,h=e[n+4>>2],A=h,N=h>>31,n=e[n+8>>2],z=n,T=n>>31,n=0;h=n<<2,g=h+f|0,te=e[i+h>>2],h=a,a=oe(h,h>>31,A,N),l=ne,G=g,E=oe(E,E>>31,z,T),a=E+a|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=m,m=oe(a,a>>31,C,v),E=g+m|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,m=E,g=c&31,m=(32<=(c&63)>>>0?l>>g:((1<>>g)+te|0,e[G>>2]=m,E=h,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[n>>2],v=g,A=g>>31,g=e[n+4>>2],N=g,z=g>>31,g=e[n+8>>2],T=g,te=g>>31,n=e[n+12>>2],G=n,Be=n>>31,n=0;g=n<<2,C=g+f|0,je=e[i+g>>2],g=E,l=oe(g,g>>31,T,te),Qe=ne,E=a,Se=C,Te=oe(h,h>>31,G,Be),h=Te+l|0,l=ne+Qe|0,l=h>>>0>>0?l+1|0:l,C=h,h=oe(a,a>>31,N,z),a=C+h|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,h=a,a=m,m=oe(a,a>>31,v,A),h=h+m|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,m=h,h=c,C=h&31,m=(32<=(h&63)>>>0?l>>C:((1<>>C)+je|0,e[Se>>2]=m,h=g,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=2){if((o|0)<1)break e;for(m=e[f+-4>>2],n=e[n>>2],g=n,C=n>>31,n=0;a=n<<2,v=a+f|0,l=e[i+a>>2],m=oe(m,m>>31,g,C),h=ne,a=c,E=a&31,m=l+(32<=(a&63)>>>0?h>>E:((1<>>E)|0,e[v>>2]=m,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[n>>2],g=E,C=g>>31,n=e[n+4>>2],v=n,A=n>>31,n=0;E=n<<2,h=E+f|0,N=e[i+E>>2],E=m,m=oe(m,m>>31,g,C),l=ne,T=h,h=m,m=oe(a,a>>31,v,A),a=h+m|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,m=a,a=c,h=a&31,m=(32<=(a&63)>>>0?l>>h:((1<>>h)+N|0,e[T>>2]=m,a=E,n=n+1|0,(n|0)!=(o|0););}}function dw(i,o){return i>0?(i=po(.5/+(o>>>0)*i)*.5/.6931471805599453,i>=0?i:0):i<0?1e32:0}function pw(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0;if(f=1,o){for(v=.5/+(n>>>0),h=4294967295;;){c=it[(l<<3)+i>>3];e:{if(c>0){c=po(v*c)*.5/.6931471805599453,c=c>=0?c:0;break e}c=c<0?1e32:0}if(c=c*+(n-f>>>0)+ +(ie(a,f)>>>0),g=c>2],!((a^-1)&a+-16843009&-2139062144););if(!(a&255))return n-i|0;for(;a=H[n+1|0],o=n+1|0,n=o,!!a;);}return o-i|0}function hw(i,o){var n=0,a=0;e:{if(a=o&255,a){if(i&3)for(;;){if(n=H[i|0],!n|(n|0)==(o&255))break e;if(i=i+1|0,!(i&3))break}n=e[i>>2];t:{if((n^-1)&n+-16843009&-2139062144)break t;for(a=ie(a,16843009);;){if(n=n^a,(n^-1)&n+-16843009&-2139062144)break t;if(n=e[i+4>>2],i=i+4|0,!!(n+-16843009&(n^-1)&-2139062144))break}}for(;n=i,a=H[n|0],!!(a&&(i=n+1|0,(a|0)!=(o&255))););return n}return Cl(i)+i|0}return i}function xl(i,o){return i=hw(i,o),H[i|0]==(o&255)?i:0}function mw(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0,f=0,l=0,h=0,g=0,m=0;a=be-32|0,be=a,c=e[i+28>>2],e[a+16>>2]=c,f=e[i+20>>2],e[a+28>>2]=n,e[a+24>>2]=o,o=f-c|0,e[a+20>>2]=o,c=o+n|0,m=2,o=a+16|0;e:{t:{n:{if(!fu($h(e[i+60>>2],a+16|0,2,a+12|0)|0))for(;;){if(f=e[a+12>>2],(f|0)==(c|0))break n;if((f|0)<=-1)break t;if(l=e[o+4>>2],h=f>>>0>l>>>0,g=(h<<3)+o|0,l=f-(h?l:0)|0,e[g>>2]=l+e[g>>2],g=(h?12:4)+o|0,e[g>>2]=e[g>>2]-l,c=c-f|0,o=h?o+8|0:o,m=m-h|0,!!fu($h(e[i+60>>2],o|0,m|0,a+12|0)|0))break}if(e[a+12>>2]=-1,(c|0)!=-1)break t}o=e[i+44>>2],e[i+28>>2]=o,e[i+20>>2]=o,e[i+16>>2]=o+e[i+48>>2],i=n;break e}if(e[i+28>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i>>2]=e[i>>2]|32,i=0,(m|0)==2)break e;i=n-e[o+4>>2]|0}return be=a+32|0,i|0}function ui(i,o,n){var a=0;e:{if(i>>>0>1073741823||(i=bn(i?i<<2:1),!i))break e;a=e[o>>2],a&&Me(a),e[o>>2]=i,e[n>>2]=i,a=1}return a}function gw(i,o,n){var a=0;e:{if(i>>>0>536870911||(i=bn(i?i<<3:1),!i))break e;a=e[o>>2],a&&Me(a),e[o>>2]=i,e[n>>2]=i,a=1}return a}function pu(i,o){return o&&i?(oe(o,0,i,0),ne?i=0:i=bn(ie(i,o)),i):bn(1)}function bw(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=ue(0),f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=ue(0);if(o)for(a=e[i+-4>>2],g=e[i+-8>>2],C=a-g|0,f=e[i+-12>>2],m=C+(f-g|0)|0,G=m+(((f<<1)-g|0)-e[i+-16>>2]|0)|0;g=e[(T<<2)+i>>2],f=g>>31,N=(f^f+g)+N|0,f=g-a|0,A=f>>31,E=(A^f+A)+E|0,A=f-C|0,a=A>>31,v=(a^a+A)+v|0,m=A-m|0,a=m>>31,l=(a^a+m)+l|0,C=m-G|0,a=C>>31,h=(a^a+C)+h|0,a=g,C=f,G=m,m=A,T=T+1|0,(T|0)!=(o|0););i=E>>>0>>0?E:v,i=i>>>0>>0?i:l;e:{if(N>>>0<(i>>>0>>0?i:h)>>>0||(z=1,i=v>>>0>>0?v:l,E>>>0<(i>>>0>>0?i:h)>>>0))break e;i=l>>>0>>0,z=v>>>0<(i?l:h)>>>0?2:i?3:4}return i=n,N?c=ue(po(+(N>>>0)*.6931471805599453/+(o>>>0))/.6931471805599453):c=ue(0),Ze[i>>2]=c,i=n,E?c=ue(po(+(E>>>0)*.6931471805599453/+(o>>>0))/.6931471805599453):c=ue(0),Ze[i+4>>2]=c,i=n,v?c=ue(po(+(v>>>0)*.6931471805599453/+(o>>>0))/.6931471805599453):c=ue(0),Ze[i+8>>2]=c,i=n,l?c=ue(po(+(l>>>0)*.6931471805599453/+(o>>>0))/.6931471805599453):c=ue(0),Ze[i+12>>2]=c,h?(te=n,ae=ue(po(+(h>>>0)*.6931471805599453/+(o>>>0))/.6931471805599453),Ze[te+16>>2]=ae,z|0):(Ze[n+16>>2]=0,z|0)}function vw(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=ue(0),C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=ue(0);e:{if(!o)break e;for(f=e[i+-4>>2],g=e[i+-8>>2],l=f-g|0,m=e[i+-12>>2],N=l+(m-g|0)|0,ke=N+(((m<<1)-g|0)-e[i+-16>>2]|0)|0,m=0,g=0;a=e[(pe<<2)+i>>2],c=a>>31,c=c^a+c,h=c+ae|0,h>>>0>>0&&(te=te+1|0),ae=h,c=a-f|0,h=c>>31,h=h^c+h,f=h+G|0,f>>>0>>0&&(T=T+1|0),G=f,h=c-l|0,f=h>>31,f=f^f+h,l=f+z|0,l>>>0>>0&&(v=v+1|0),z=l,N=h-N|0,f=N>>31,f=f^f+N,l=f+C|0,l>>>0>>0&&(g=g+1|0),C=l,l=N-ke|0,f=l>>31,f=f^f+l,l=f+E|0,l>>>0>>0&&(m=m+1|0),E=l,f=a,l=c,ke=N,N=h,pe=pe+1|0,(pe|0)!=(o|0););}a=(v|0)==(T|0)&G>>>0>>0|T>>>0>>0,c=a?G:z,i=c,a=a?T:v,c=(g|0)==(a|0)&c>>>0>>0|a>>>0>>0,h=c?i:C,a=c?a:g,c=(m|0)==(a|0)&h>>>0>>0|a>>>0>>0,h=c?h:E,a=c?a:m,i=0;e:{if((a|0)==(te|0)&ae>>>0>>0|te>>>0>>0||(a=(g|0)==(v|0)&z>>>0>>0|v>>>0>>0,c=a?z:C,i=c,a=a?v:g,c=(m|0)==(a|0)&c>>>0>>0|a>>>0>>0,h=c?i:E,a=c?a:m,i=1,(a|0)==(T|0)&G>>>0>>0|T>>>0>>0))break e;i=(g|0)==(m|0)&C>>>0>>0|g>>>0>>0,a=i,c=a?C:E,i=a?g:m,i=(i|0)==(v|0)&z>>>0>>0|v>>>0>>0?2:a?3:4}return l=n,te|ae?A=ue(po((+(ae>>>0)+4294967296*+(te>>>0))*.6931471805599453/+(o>>>0))/.6931471805599453):A=ue(0),Ze[l>>2]=A,l=n,T|G?A=ue(po((+(G>>>0)+4294967296*+(T>>>0))*.6931471805599453/+(o>>>0))/.6931471805599453):A=ue(0),Ze[l+4>>2]=A,l=n,v|z?A=ue(po((+(z>>>0)+4294967296*+(v>>>0))*.6931471805599453/+(o>>>0))/.6931471805599453):A=ue(0),Ze[l+8>>2]=A,l=n,g|C?A=ue(po((+(C>>>0)+4294967296*+(g>>>0))*.6931471805599453/+(o>>>0))/.6931471805599453):A=ue(0),Ze[l+12>>2]=A,m|E?(Se=n,Ee=ue(po((+(E>>>0)+4294967296*+(m>>>0))*.6931471805599453/+(o>>>0))/.6931471805599453),Ze[Se+16>>2]=Ee,i|0):(Ze[n+16>>2]=0,i|0)}function kw(i,o,n,a){var c=0,f=0;e:{t:{n:switch(n|0){case 4:if(n=0,(o|0)<=0)break t;for(;f=n<<2,c=f+i|0,e[a+f>>2]=(e[c+-16>>2]+(e[c>>2]+ie(e[c+-8>>2],6)|0)|0)-(e[c+-12>>2]+e[c+-4>>2]<<2),n=n+1|0,(n|0)!=(o|0););break t;case 3:if(n=0,(o|0)<=0)break t;for(;f=n<<2,c=f+i|0,e[a+f>>2]=(e[c>>2]-e[c+-12>>2]|0)+ie(e[c+-8>>2]-e[c+-4>>2]|0,3),n=n+1|0,(n|0)!=(o|0););break t;case 2:if(n=0,(o|0)<=0)break t;for(;f=n<<2,c=f+i|0,e[a+f>>2]=e[c+-8>>2]+(e[c>>2]-(e[c+-4>>2]<<1)|0),n=n+1|0,(n|0)!=(o|0););break t;case 0:break e;case 1:break n;default:break t}if(n=0,(o|0)<=0)break t;for(;f=n<<2,c=f+i|0,e[a+f>>2]=e[c>>2]-e[c+-4>>2],n=n+1|0,(n|0)!=(o|0););}return}gn(a,i,o<<2)}function yw(i,o,n,a){var c=0,f=0,l=0,h=0,g=0;e:{t:{n:switch(n|0){case 4:if((o|0)<1)break t;for(f=e[a+-12>>2],l=e[a+-4>>2],n=0;g=n<<2,h=g+a|0,c=e[h+-8>>2],l=((e[i+g>>2]+ie(c,-6)|0)-e[h+-16>>2]|0)+(f+l<<2)|0,e[h>>2]=l,f=c,n=n+1|0,(n|0)!=(o|0););break t;case 3:if((o|0)<1)break t;for(c=e[a+-12>>2],f=e[a+-4>>2],n=0;l=n<<2,h=l+a|0,g=e[i+l>>2]+c|0,c=e[h+-8>>2],f=g+ie(f-c|0,3)|0,e[h>>2]=f,n=n+1|0,(n|0)!=(o|0););break t;case 2:if((o|0)<1)break t;for(c=e[a+-4>>2],n=0;f=n<<2,l=f+a|0,c=(e[i+f>>2]+(c<<1)|0)-e[l+-8>>2]|0,e[l>>2]=c,n=n+1|0,(n|0)!=(o|0););break t;case 0:break e;case 1:break n;default:break t}if((o|0)<1)break t;for(c=e[a+-4>>2],n=0;f=n<<2,c=e[f+i>>2]+c|0,e[a+f>>2]=c,n=n+1|0,(n|0)!=(o|0););}return}gn(a,i,o<<2)}function _w(i){var o=0,n=0;return o=H[i+74|0],K[i+74|0]=o+-1|o,ze[i+20>>2]>ze[i+28>>2]&&Le[e[i+36>>2]](i,0,0)|0,e[i+28>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,o=e[i>>2],o&4?(e[i>>2]=o|32,-1):(n=e[i+44>>2]+e[i+48>>2]|0,e[i+8>>2]=n,e[i+4>>2]=n,o<<27>>31)}function Cm(){var i=0,o=0,n=0,a=0,c=0;if(a=Ho(1,8),a){if(n=Ho(1,504),e[a>>2]=n,n){if(i=Ho(1,6160),e[a+4>>2]=i,i){if(o=Ho(1,44),e[i+56>>2]=o,o){if(e[i+1128>>2]=16,c=bn(e[1364]<<1&-16),e[i+1120>>2]=c,c)return e[i+252>>2]=0,e[i+220>>2]=0,e[i+224>>2]=0,o=i+3616|0,e[o>>2]=0,e[o+4>>2]=0,o=i+3608|0,e[o>>2]=0,e[o+4>>2]=0,o=i+3600|0,e[o>>2]=0,e[o+4>>2]=0,o=i+3592|0,e[o>>2]=0,e[o+4>>2]=0,e[i+60>>2]=0,e[i+64>>2]=0,e[i+68>>2]=0,e[i+72>>2]=0,e[i+76>>2]=0,e[i+80>>2]=0,e[i+84>>2]=0,e[i+88>>2]=0,e[i+92>>2]=0,e[i+96>>2]=0,e[i+100>>2]=0,e[i+104>>2]=0,e[i+108>>2]=0,e[i+112>>2]=0,e[i+116>>2]=0,e[i+120>>2]=0,an(i+124|0),an(i+136|0),an(i+148|0),an(i+160|0),an(i+172|0),an(i+184|0),an(i+196|0),an(i+208|0),e[i+48>>2]=0,e[i+52>>2]=0,In(i+608|0,512),e[i+1124>>2]=0,e[i+608>>2]=1,e[i+32>>2]=0,e[i+24>>2]=0,e[i+28>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0,e[i>>2]=0,e[i+4>>2]=0,e[n+28>>2]=0,gm(n+32|0),e[n>>2]=9,a|0;xd(o)}Me(i)}Me(n)}Me(a)}return 0}function xm(i){i=i|0;var o=0,n=0;i&&(Td(i),o=e[i+4>>2],n=e[o+1120>>2],n&&(Me(n),o=e[i+4>>2]),xd(e[o+56>>2]),sn(e[i+4>>2]+124|0),sn(e[i+4>>2]+136|0),sn(e[i+4>>2]+148|0),sn(e[i+4>>2]+160|0),sn(e[i+4>>2]+172|0),sn(e[i+4>>2]+184|0),sn(e[i+4>>2]+196|0),sn(e[i+4>>2]+208|0),Me(e[i+4>>2]),Me(e[i>>2]),Me(i))}function Td(i){i=i|0;var o=0,n=0,a=0;return a=1,e[e[i>>2]>>2]!=9&&(o=e[i+4>>2],vm(o+3732|0,o+3636|0),Me(e[e[i+4>>2]+452>>2]),e[e[i+4>>2]+452>>2]=0,o=e[i+4>>2],e[o+252>>2]=0,S8(e[o+56>>2]),a=i+4|0,o=e[i+4>>2],n=e[o+60>>2],n&&(Me(n+-16|0),e[e[a>>2]+60>>2]=0,o=e[a>>2]),n=e[o+3592>>2],n&&(Me(n),e[e[a>>2]+92>>2]=0,e[e[a>>2]+3592>>2]=0,o=e[a>>2]),n=e[o- -64>>2],n&&(Me(n+-16|0),e[e[a>>2]- -64>>2]=0,o=e[a>>2]),n=e[o+3596>>2],n&&(Me(n),e[e[a>>2]+96>>2]=0,e[e[a>>2]+3596>>2]=0,o=e[a>>2]),n=e[o+68>>2],n&&(Me(n+-16|0),e[e[a>>2]+68>>2]=0,o=e[a>>2]),n=e[o+3600>>2],n&&(Me(n),e[e[a>>2]+100>>2]=0,e[e[a>>2]+3600>>2]=0,o=e[a>>2]),n=e[o+72>>2],n&&(Me(n+-16|0),e[e[a>>2]+72>>2]=0,o=e[a>>2]),n=e[o+3604>>2],n&&(Me(n),e[e[a>>2]+104>>2]=0,e[e[a>>2]+3604>>2]=0,o=e[a>>2]),n=e[o+76>>2],n&&(Me(n+-16|0),e[e[a>>2]+76>>2]=0,o=e[a>>2]),n=e[o+3608>>2],n&&(Me(n),e[e[a>>2]+108>>2]=0,e[e[a>>2]+3608>>2]=0,o=e[a>>2]),n=e[o+80>>2],n&&(Me(n+-16|0),e[e[a>>2]+80>>2]=0,o=e[a>>2]),n=e[o+3612>>2],n&&(Me(n),e[e[a>>2]+112>>2]=0,e[e[a>>2]+3612>>2]=0,o=e[a>>2]),n=e[o+84>>2],n&&(Me(n+-16|0),e[e[a>>2]+84>>2]=0,o=e[a>>2]),n=e[o+3616>>2],n&&(Me(n),e[e[a>>2]+116>>2]=0,e[e[a>>2]+3616>>2]=0,o=e[a>>2]),n=e[o+88>>2],n&&(Me(n+-16|0),e[e[a>>2]+88>>2]=0,o=e[a>>2]),n=e[o+3620>>2],n&&(Me(n),e[e[a>>2]+120>>2]=0,e[e[a>>2]+3620>>2]=0,o=e[a>>2]),e[o+220>>2]=0,e[o+224>>2]=0,e[o>>2]&&(o=e[i>>2]+32|0,G8(o+368|0),um(o+8|0),o=e[i+4>>2]),n=e[o+52>>2],n&&((n|0)!=e[1887]&&(_m(n),o=e[a>>2]),e[o+52>>2]=0),a=1,e[o+3624>>2]&&(a=!du(o+312|0,o+3732|0,16)),e[o+48>>2]=0,e[o+3632>>2]=0,In(o+608|0,512),e[o+32>>2]=0,e[o+24>>2]=0,e[o+28>>2]=0,e[o+16>>2]=0,e[o+20>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[o>>2]=0,e[o+4>>2]=0,o=e[i+4>>2],e[o+1124>>2]=0,e[o+608>>2]=1,o=e[i>>2],e[o+28>>2]=0,gm(o+32|0),e[e[i>>2]>>2]=9),a|0}function Sm(i,o,n,a,c,f,l,h,g,m){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0,h=h|0,g=g|0,m=m|0,Em(i,o,n,a,c,f,l,h,g,m,0)|0}function Em(i,o,n,a,c,f,l,h,g,m,v){var A=0,C=0;A=5;e:{C=e[i>>2];t:{if(e[C>>2]!=9||(A=2,!g|(!o|!l))||n&&!f|(!a|!c))break t;if(A=e[i+4>>2],e[A>>2]=v,v){if(!J8(C+32|0))break e;A=e[i+4>>2]}if(wm(A+3524|0),v=e[i+4>>2],e[v+44>>2]=5,e[v+40>>2]=6,e[v+36>>2]=5,!E8(e[v+56>>2],i))return e[e[i>>2]>>2]=8,3;v=e[i+4>>2],e[v+48>>2]=m,e[v+32>>2]=g,e[v+28>>2]=h,e[v+24>>2]=l,e[v+20>>2]=f,e[v+16>>2]=c,e[v+12>>2]=a,e[v+8>>2]=n,e[v+4>>2]=o,e[v+3520>>2]=0,e[v+248>>2]=0,e[v+240>>2]=0,e[v+244>>2]=0,e[v+228>>2]=0,e[v+232>>2]=0,e[v+3624>>2]=e[e[i>>2]+28>>2],e[v+3628>>2]=1,e[v+3632>>2]=0,A=Pm(i)?0:3}return A}return e[e[i>>2]+4>>2]=4,4}function ww(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0;e:{if(a=e[n+4>>2],e[a>>2]||(c=e[a+20>>2],!c)||!Le[c](n,e[a+48>>2]))break e;return e[o>>2]=0,e[e[n>>2]>>2]=4,0}e:{t:{if(e[o>>2]){if(a=e[n+4>>2],!(!e[a+3632>>2]|ze[a+6152>>2]<21)){e[e[n>>2]>>2]=7;break t}n:{o:{r:{i:{if(e[a>>2])switch(c=0,ew(e[n>>2]+32|0,i,o,n,e[a+48>>2])|0){case 0:case 2:break o;case 1:break r;default:break i}if(c=Le[e[a+4>>2]](n,i,o,e[a+48>>2])|0,(c|0)!=2)break o}e[e[n>>2]>>2]=7;break t}if(i=1,!e[o>>2])break n;break e}if(i=1,e[o>>2])break e;if((c|0)==1)break n;if(o=e[n+4>>2],e[o>>2]||(a=e[o+20>>2],!a)||!Le[a](n,e[o+48>>2]))break e}e[e[n>>2]>>2]=4;break t}e[e[n>>2]>>2]=7}i=0}return i|0}function Pm(i){i=i|0;var o=0,n=0,a=0;o=e[i+4>>2];e:{if(e[e[i>>2]>>2]==9&&!e[o+3628>>2])break e;if(e[o+3624>>2]=0,e[o+240>>2]=0,e[o+244>>2]=0,e[o>>2]&&(o=e[i>>2]+32|0,mm(o+8|0),hm(o+368|0),e[o+408>>2]=0,e[o+412>>2]=0,o=e[i+4>>2]),o=e[o+56>>2],e[o+8>>2]=0,e[o+12>>2]=0,e[o+16>>2]=0,e[o+20>>2]=0,o=1,n=e[i>>2],!o)return e[n>>2]=8,0;e[n>>2]=2,o=e[i+4>>2],e[o>>2]&&($8(n+32|0),o=e[i+4>>2]);t:{if(!e[o+3628>>2]){if(n=0,e[o+52>>2]==e[1887])break e;if(a=e[o+8>>2],!a)break t;if((Le[a](i,0,0,e[o+48>>2])|0)==1)break e;o=e[i+4>>2];break t}e[o+3628>>2]=0}e[e[i>>2]>>2]=0,e[o+248>>2]=0,Me(e[o+452>>2]),e[e[i+4>>2]+452>>2]=0,o=e[i+4>>2],e[o+252>>2]=0,e[o+3624>>2]=e[e[i>>2]+28>>2],e[o+228>>2]=0,e[o+232>>2]=0,bm(o+3636|0),i=e[i+4>>2],e[i+6152>>2]=0,e[i+6136>>2]=0,e[i+6140>>2]=0,n=1}return n|0}function Aw(i,o,n,a,c,f,l,h,g,m){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0,h=h|0,g=g|0,m=m|0,Em(i,o,n,a,c,f,l,h,g,m,1)|0}function Cw(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==9?(i=i+32|0,e[i+4>>2]=o,e[i>>2]=0,i=1):i=0,i|0}function xw(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==9?(e[i+28>>2]=o,i=1):i=0,i|0}function Sw(i,o){i=i|0,o=o|0;var n=0;e:{if(e[e[i>>2]>>2]!=9|o>>>0>126||(n=1,i=e[i+4>>2],e[(i+(o<<2)|0)+608>>2]=1,(o|0)!=2))break e;e[i+1124>>2]=0}return n|0}function Ew(i,o){i=i|0,o=o|0;var n=0,a=0,c=0;n=0;e:{if(e[e[i>>2]>>2]!=9||(a=e[i+4>>2],n=1,e[a+616>>2]))break e;n=e[a+1120>>2];t:{c=e[a+1124>>2];n:{if((c|0)!=e[a+1128>>2]){a=n;break n}o:{if(!c){a=xn(n,0);break o}if(c+c>>>0>=c>>>0){if(a=xn(n,c<<1),a)break o;Me(n),a=e[i+4>>2]}e[a+1120>>2]=0;break t}if(n=e[i+4>>2],e[n+1120>>2]=a,!a)break t;e[n+1128>>2]=e[n+1128>>2]<<1,c=e[n+1124>>2]}return n=a,a=e[1364]>>>3|0,gn(n+ie(a,c)|0,o,a),i=e[i+4>>2],e[i+1124>>2]=e[i+1124>>2]+1,1}e[e[i>>2]>>2]=8,n=0}return n|0}function Pw(i){i=i|0;var o=0;if(e[e[i>>2]>>2]==9){for(o=e[i+4>>2],i=0;e[(o+(i<<2)|0)+608>>2]=1,i=i+1|0,(i|0)!=128;);e[o+1124>>2]=0,i=1}else i=0;return i|0}function Mw(i,o){i=i|0,o=o|0;var n=0;e:{if(e[e[i>>2]>>2]!=9|o>>>0>126||(i=e[i+4>>2],e[(i+(o<<2)|0)+608>>2]=0,n=1,(o|0)!=2))break e;e[i+1124>>2]=0}return n|0}function Iw(i,o){i=i|0,o=o|0;var n=0,a=0,c=0;if(e[e[i>>2]>>2]==9){if(n=e[i+4>>2],!e[n+616>>2])return 1;a=e[n+1120>>2];e:{c=e[n+1124>>2];t:{if((c|0)!=e[n+1128>>2]){n=a;break t}n:{if(!c){n=xn(a,0);break n}if(c+c>>>0>=c>>>0){if(n=xn(a,c<<1),n)break n;Me(a),n=e[i+4>>2]}e[n+1120>>2]=0;break e}if(a=e[i+4>>2],e[a+1120>>2]=n,!n)break e;e[a+1128>>2]=e[a+1128>>2]<<1,c=e[a+1124>>2]}return a=n,n=e[1364]>>>3|0,gn(a+ie(n,c)|0,o,n),i=e[i+4>>2],e[i+1124>>2]=e[i+1124>>2]+1,1}e[e[i>>2]>>2]=8}return 0}function Nw(i){return i=i|0,e[e[i>>2]>>2]==9?(In(e[i+4>>2]+608|0,512),e[e[i+4>>2]+1124>>2]=0,i=1):i=0,i|0}function Fd(i){return i=i|0,e[e[i>>2]>>2]}function Rw(i){return i=i|0,e[e[i>>2]+28>>2]}function Mm(i){i=i|0;var o=0,n=0,a=0;o=be-16|0,be=o,n=1;e:{for(;;){t:{n:switch(e[e[i>>2]>>2]){case 0:if(Ld(i))continue;n=0;break t;case 1:a=(Dd(i)|0)!=0;break e;case 2:if(Im(i))continue;break t;case 4:case 7:break t;case 3:break n;default:break e}if(!Nm(i,o+12|0)){n=0;break t}if(!e[o+12>>2])continue}break}a=n}return be=o+16|0,a|0}function Ld(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0;n=be-16|0,be=n,f=1;e:{for(;;){o=0;t:{for(;;){l=e[i+4>>2];n:{if(e[l+3520>>2]){c=H[l+3590|0],e[n+8>>2]=c,e[l+3520>>2]=0;break n}if(!Je(e[l+56>>2],n+8|0,8)){a=0;break e}c=e[n+8>>2]}if(H[a+5409|0]==(c|0)){a=a+1|0,o=1;break t}if(a=0,(o|0)==3)break e;if(H[o+7552|0]==(c|0)){if(o=o+1|0,(o|0)!=3)continue;n:{o:{if(!Je(e[e[i+4>>2]+56>>2],n+12|0,24)||!Je(e[e[i+4>>2]+56>>2],n+12|0,8)||(c=e[n+12>>2],!Je(e[e[i+4>>2]+56>>2],n+12|0,8))||(l=e[n+12>>2],!Je(e[e[i+4>>2]+56>>2],n+12|0,8)))break o;if(h=e[n+12>>2],Je(e[e[i+4>>2]+56>>2],n+12|0,8))break n}break e}if(is(e[e[i+4>>2]+56>>2],e[n+12>>2]&127|(h<<7&16256|(l&127|c<<7&16256)<<14)))continue;break e}break}n:{if((c|0)!=255)break n;if(K[e[i+4>>2]+3588|0]=255,!Je(e[e[i+4>>2]+56>>2],n+8|0,8))break e;if(o=e[n+8>>2],(o|0)==255){o=e[i+4>>2],e[o+3520>>2]=1,K[o+3590|0]=255;break n}if((o&-2)!=248)break n;K[e[i+4>>2]+3589|0]=o,e[e[i>>2]>>2]=3,a=1;break e}if(o=0,!f||(f=e[i+4>>2],o=0,e[f+3632>>2]))break t;Le[e[f+32>>2]](i,0,e[f+48>>2]),o=0}if(f=o,!(a>>>0<4))break}a=1,e[e[i>>2]>>2]=1}return be=n+16|0,a}function Dd(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0;h=be-192|0,be=h;e:{t:{if(!Je(e[e[i+4>>2]+56>>2],h+184|0,e[1391]))break t;if(T=e[h+184>>2],c=i+4|0,!Je(e[e[c>>2]+56>>2],h+180|0,e[1392])||!Je(e[e[c>>2]+56>>2],h+176|0,e[1393]))break e;l=(T|0)!=0;n:{o:{r:{i:{a:switch(n=e[h+180>>2],n|0){case 3:break i;case 0:break a;default:break r}if(a=e[h+176>>2],n=0,o=e[c>>2],e[o+256>>2]=0,e[o+264>>2]=a,e[o+260>>2]=l,f=e[o+56>>2],o=e[1356],!Je(f,h,o)||(e[e[c>>2]+272>>2]=e[h>>2],f=e[1357],!Je(e[e[c>>2]+56>>2],h,f))||(e[e[c>>2]+276>>2]=e[h>>2],l=e[1358],!Je(e[e[c>>2]+56>>2],h,l))||(e[e[c>>2]+280>>2]=e[h>>2],g=e[1359],!Je(e[e[c>>2]+56>>2],h,g))||(e[e[c>>2]+284>>2]=e[h>>2],m=e[1360],!Je(e[e[c>>2]+56>>2],h,m))||(e[e[c>>2]+288>>2]=e[h>>2],v=e[1361],!Je(e[e[c>>2]+56>>2],h,v))||(e[e[c>>2]+292>>2]=e[h>>2]+1,A=e[1362],!Je(e[e[c>>2]+56>>2],h,A))||(e[e[c>>2]+296>>2]=e[h>>2]+1,C=e[c>>2],E=e[C+56>>2],N=C+304|0,C=e[1363],!Oi(E,N,C))||(E=e[c>>2],!Io(e[E+56>>2],E+312|0,16)))break e;if(!is(e[e[c>>2]+56>>2],a-((C+(A+(v+(m+(g+(l+(o+f|0)|0)|0)|0)|0)|0)|0)+128>>>3|0)|0))break t;if(o=e[c>>2],e[o+248>>2]=1,du(o+312|0,7555,16)||(e[o+3624>>2]=0),e[o+3632>>2]|!e[o+608>>2]||(n=e[o+28>>2],!n))break o;Le[n](i,o+256|0,e[o+48>>2]);break o}o=e[c>>2],e[o+252>>2]=0,f=e[h+176>>2],e[o+448>>2]=(f>>>0)/18,e[o+440>>2]=f,e[o+436>>2]=l,e[o+432>>2]=3,o=e[c>>2],n=e[o+452>>2],a=e[o+448>>2];i:{if(a){if(oe(a,0,24,0),!ne){if(o=xn(n,ie(a,24)),o){e[e[c>>2]+452>>2]=o;break i}Me(n),o=e[c>>2]}e[o+452>>2]=0;break n}if(o=xn(n,0),e[e[c>>2]+452>>2]=o,!o)break n}n=e[c>>2],o=0;i:{if(!e[n+448>>2])break i;for(l=e[1367],g=e[1366],m=e[1365],a=0;;){if(!Oi(e[n+56>>2],h,m)||(n=e[h+4>>2],o=ie(a,24),v=e[c>>2],A=o+e[v+452>>2]|0,e[A>>2]=e[h>>2],e[A+4>>2]=n,!Oi(e[v+56>>2],h,g))||(n=e[h+4>>2],v=e[c>>2],A=o+e[v+452>>2]|0,e[A+8>>2]=e[h>>2],e[A+12>>2]=n,!Je(e[v+56>>2],h+188|0,l)))break t;if(n=e[c>>2],e[(o+e[n+452>>2]|0)+16>>2]=e[h+188>>2],a=a+1|0,o=e[n+448>>2],!(a>>>0>>0))break}o=ie(o,-18)}if(o=o+f|0,o){if(!is(e[n+56>>2],o))break t;n=e[c>>2]}if(e[n+252>>2]=1,e[n+3632>>2]|!e[n+620>>2]||(o=e[n+28>>2],!o))break o;Le[o](i,n+432|0,e[n+48>>2]);break o}a=e[c>>2],g=e[(a+(n<<2)|0)+608>>2],f=e[h+176>>2],o=In(h,176),e[o+8>>2]=f,e[o>>2]=n,e[o+4>>2]=l,m=!g;r:{if((n|0)!=2)break r;if(v=o+16|0,l=e[1364]>>>3|0,!Io(e[a+56>>2],v,l))break t;if(f>>>0>>0){e[e[i>>2]>>2]=8,n=0;break e}if(f=f-l|0,a=e[c>>2],A=e[a+1124>>2],!A)break r;for(C=e[a+1120>>2],n=0;;){if(du(C+ie(n,l)|0,v,l)){if(n=n+1|0,(A|0)!=(n|0))continue;break r}break}m=(g|0)!=0}if(m){if(!is(e[a+56>>2],f))break t;break o}r:{i:{a:{s:{l:{u:{f:switch(e[o+180>>2]){case 1:if(is(e[a+56>>2],f))break l;l=0;break r;case 2:if(!f)break u;if(n=bn(f),e[o+20>>2]=n,!n){e[e[i>>2]>>2]=8,l=0;break r}if(Io(e[a+56>>2],n,f))break l;l=0;break r;case 4:c:{if(f>>>0<8)break c;if(l=0,!Ed(e[a+56>>2],o+16|0))break r;f=f+-8|0,n=e[o+16>>2];d:{if(n){if(f>>>0>>0){e[o+16>>2]=0,e[o+20>>2]=0;break c}p:{h:{if((n|0)==-1){e[o+20>>2]=0;break h}if(a=bn(n+1|0),e[o+20>>2]=a,a)break p}e[e[i>>2]>>2]=8;break r}if(!Io(e[e[c>>2]+56>>2],a,n))break r;f=f-n|0,K[e[o+20>>2]+e[o+16>>2]|0]=0;break d}e[o+20>>2]=0}if(!Ed(e[e[c>>2]+56>>2],o+24|0))break r;if(n=e[o+24>>2],n>>>0>=100001){e[o+24>>2]=0;break r}if(!n)break c;if(a=pu(n,8),e[o+28>>2]=a,!a)break a;if(!e[o+24>>2])break c;e[a>>2]=0,e[a+4>>2]=0,n=0;d:{if(f>>>0<4)break d;for(;;){if(!Ed(e[e[c>>2]+56>>2],a))break i;f=f+-4|0,g=e[o+28>>2],m=n<<3,a=g+m|0,l=e[a>>2];p:{if(l){if(f>>>0>>0)break d;h:{m:{if((l|0)==-1){e[(g+(n<<3)|0)+4>>2]=0;break m}if(g=bn(l+1|0),e[a+4>>2]=g,g)break h}e[e[i>>2]>>2]=8;break i}if(f=f-l|0,In(g,e[a>>2]),l=Io(e[e[c>>2]+56>>2],e[a+4>>2],e[a>>2]),g=m+e[o+28>>2]|0,a=e[g+4>>2],!l){Me(a),e[(e[o+28>>2]+(n<<3)|0)+4>>2]=0;break d}K[a+e[g>>2]|0]=0;break p}e[a+4>>2]=0}if(n=n+1|0,n>>>0>=ze[o+24>>2])break c;if(a=e[o+28>>2]+(n<<3)|0,e[a>>2]=0,e[a+4>>2]=0,!(f>>>0>=4))break}}e[o+24>>2]=n}if(!f||(e[o+24>>2]||(n=o+28|0,Me(e[n>>2]),e[n>>2]=0),is(e[e[c>>2]+56>>2],f)))break l;l=0;break r;case 5:if(l=0,n=In(o+16|0,160),!Io(e[a+56>>2],n,e[1378]>>>3|0)||!Oi(e[e[c>>2]+56>>2],o+152|0,e[1379])||!Je(e[e[c>>2]+56>>2],o+188|0,e[1380])||(e[o+160>>2]=e[o+188>>2]!=0,!Pd(e[e[c>>2]+56>>2],e[1381]))||!Je(e[e[c>>2]+56>>2],o+188|0,e[1382]))break r;if(n=e[o+188>>2],e[o+164>>2]=n,!n)break l;if(n=Ho(n,32),e[o+168>>2]=n,!n)break s;if(m=e[1371],!Oi(e[e[c>>2]+56>>2],n,m))break r;for(v=e[1373]>>>3|0,A=e[1370],C=e[1369],g=e[1368],E=e[1377],z=e[1376],G=e[1375],te=e[1374],ae=e[1372],f=0;;){if(!Je(e[e[c>>2]+56>>2],o+188|0,ae)||(n=(f<<5)+n|0,K[n+8|0]=e[o+188>>2],!Io(e[e[c>>2]+56>>2],n+9|0,v))||!Je(e[e[c>>2]+56>>2],o+188|0,te)||(K[n+22|0]=H[n+22|0]&254|K[o+188|0]&1,!Je(e[e[c>>2]+56>>2],o+188|0,G))||(a=n+22|0,K[a|0]=H[o+188|0]<<1&2|H[a|0]&253,!Pd(e[e[c>>2]+56>>2],z))||!Je(e[e[c>>2]+56>>2],o+188|0,E))break r;a=e[o+188>>2],K[n+23|0]=a;c:{if(a=a&255,!a)break c;a=Ho(a,16),e[n+24>>2]=a;d:{if(a){if(N=n+23|0,!H[N|0])break c;if(!Oi(e[e[c>>2]+56>>2],a,g))break r;pe=n+24|0,n=0;break d}e[e[i>>2]>>2]=8;break r}for(;;){if(!Je(e[e[c>>2]+56>>2],o+188|0,C)||(K[((n<<4)+a|0)+8|0]=e[o+188>>2],!Pd(e[e[c>>2]+56>>2],A)))break r;if(n=n+1|0,n>>>0>=H[N|0])break c;if(a=e[pe>>2],!Oi(e[e[c>>2]+56>>2],a+(n<<4)|0,g))break}break r}if(f=f+1|0,f>>>0>=ze[o+164>>2])break l;if(n=e[o+168>>2],!Oi(e[e[c>>2]+56>>2],n+(f<<5)|0,m))break}break r;case 6:c:{if(!Je(e[a+56>>2],o+188|0,e[1383])||(e[o+16>>2]=e[o+188>>2],!Je(e[e[c>>2]+56>>2],o+188|0,e[1384])))break c;d:{n=e[o+188>>2];p:{if((n|0)==-1){e[o+20>>2]=0;break p}if(a=bn(n+1|0),e[o+20>>2]=a,a)break d}e[e[i>>2]>>2]=8,l=0;break r}if(n){if(!Io(e[e[c>>2]+56>>2],a,n))break c;a=e[o+20>>2],n=e[o+188>>2]}else n=0;if(K[n+a|0]=0,!Je(e[e[c>>2]+56>>2],o+188|0,e[1385]))break c;d:{n=e[o+188>>2];p:{if((n|0)==-1){e[o+24>>2]=0;break p}if(a=bn(n+1|0),e[o+24>>2]=a,a)break d}e[e[i>>2]>>2]=8,l=0;break r}if(n){if(!Io(e[e[c>>2]+56>>2],a,n))break c;a=e[o+24>>2],n=e[o+188>>2]}else n=0;if(K[n+a|0]=0,!Je(e[e[c>>2]+56>>2],o+28|0,e[1386])||!Je(e[e[c>>2]+56>>2],o+32|0,e[1387])||!Je(e[e[c>>2]+56>>2],o+36|0,e[1388])||!Je(e[e[c>>2]+56>>2],o+40|0,e[1389])||!Je(e[e[c>>2]+56>>2],o+44|0,e[1390]))break c;if(n=e[o+44>>2],a=bn(n||1),e[o+48>>2]=a,!a){e[e[i>>2]>>2]=8,l=0;break r}if(!n||Io(e[e[c>>2]+56>>2],a,n))break l}l=0;break r;case 0:case 3:break l;default:break f}f:{if(f){if(n=bn(f),e[o+16>>2]=n,n)break f;e[e[i>>2]>>2]=8,l=0;break r}e[o+16>>2]=0;break l}if(Io(e[a+56>>2],n,f))break l;l=0;break r}e[o+20>>2]=0}if(l=1,n=e[c>>2],e[n+3632>>2]||(a=e[n+28>>2],!a))break r;Le[a](i,o,e[n+48>>2]);break r}e[e[i>>2]>>2]=8;break r}e[o+24>>2]=0,e[e[i>>2]>>2]=8;break r}e[o+24>>2]=n,l=0}r:{i:switch(e[o+180>>2]+-1|0){case 1:if(o=e[o+20>>2],!o)break r;Me(o);break r;case 3:if(n=e[o+20>>2],n&&Me(n),a=e[o+24>>2],a)for(n=0;f=e[(e[o+28>>2]+(n<<3)|0)+4>>2],f&&(Me(f),a=e[o+24>>2]),n=n+1|0,n>>>0>>0;);if(o=e[o+28>>2],!o)break r;Me(o);break r;case 4:if(a=e[o+164>>2],a)for(n=0;f=e[(e[o+168>>2]+(n<<5)|0)+24>>2],f&&(Me(f),a=e[o+164>>2]),n=n+1|0,n>>>0>>0;);if(o=e[o+168>>2],!o)break r;Me(o);break r;case 5:if(n=e[o+20>>2],n&&Me(n),n=e[o+24>>2],n&&Me(n),o=e[o+48>>2],!o)break r;Me(o);break r;case 0:break r;default:break i}if(o=e[o+16>>2],!o)break r;Me(o)}if(!l)break t}if(n=1,!T)break e;o:{r:{if(a=e[c>>2],e[a>>2]||(f=e[a+12>>2],!f)||(o=a+6136|0,Le[f](i,o,e[a+48>>2]))||!Sd(e[e[c>>2]+56>>2]))break r;a=e[o>>2],c=e[e[c>>2]+56>>2],c=((e[c+8>>2]-e[c+16>>2]<<5)+(e[c+12>>2]<<3)|0)-e[c+20>>2]>>>3|0,f=e[o+4>>2]-(a>>>0>>0)|0,e[o>>2]=a-c,e[o+4>>2]=f;break o}o=e[c>>2],e[o+6136>>2]=0,e[o+6140>>2]=0}e[e[i>>2]>>2]=2;break e}e[e[i>>2]>>2]=8}n=0}return be=h+192|0,n}function Im(i){var o=0,n=0,a=0,c=0,f=0;c=be-16|0,be=c;e:{t:{n:{if(n=e[i+4>>2],!e[n+248>>2]||(a=e[n+308>>2],o=a,f=e[n+304>>2],!(o|f))||(a=e[n+244>>2],(o|0)==(a|0)&ze[n+240>>2]>>0|a>>>0>>0))break n;e[e[i>>2]>>2]=4;break t}n:{if(Sd(e[n+56>>2])||(n=e[e[i+4>>2]+56>>2],Je(n,c+12|0,om(n))))break n;o=0;break e}for(n=0;;){a=e[i+4>>2];n:{if(e[a+3520>>2]){o=H[a+3590|0],e[c+12>>2]=o,e[a+3520>>2]=0;break n}if(o=0,!Je(e[a+56>>2],c+12|0,8))break e;o=e[c+12>>2]}n:{if((o|0)!=255)break n;if(K[e[i+4>>2]+3588|0]=255,o=0,!Je(e[e[i+4>>2]+56>>2],c+12|0,8))break e;if(o=e[c+12>>2],(o|0)==255){o=e[i+4>>2],e[o+3520>>2]=1,K[o+3590|0]=255;break n}if((o&-2)!=248)break n;K[e[i+4>>2]+3589|0]=o,e[e[i>>2]>>2]=3;break t}o=n,n=1,!o&&(o=e[i+4>>2],!e[o+3632>>2]&&Le[e[o+32>>2]](i,0,e[o+48>>2]))}}o=1}return be=c+16|0,o}function Nm(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0;h=be+-64|0,be=h,e[o>>2]=0,n=e[i+4>>2],c=tn[(H[n+3588|0]<<1)+1280>>1],f=e[n+56>>2],e[f+24>>2]=tn[((H[n+3589|0]^c>>>8)<<1)+1280>>1]^c<<8&65280,n=e[f+20>>2],e[f+28>>2]=e[f+16>>2],e[f+32>>2]=n,f=e[i+4>>2],K[h+32|0]=H[f+3588|0],n=H[f+3589|0],e[h+12>>2]=2,K[h+33|0]=n;e:{if(!Je(e[f+56>>2],h+28|0,8))break e;c=i+4|0;t:{n:{o:{r:{if(f=e[h+28>>2],(f|0)==255)break r;if(K[h+34|0]=f,e[h+12>>2]=3,!Je(e[e[c>>2]+56>>2],h+28|0,8))break n;if(f=e[h+28>>2],(f|0)==255)break r;g=n>>>1&1,n=e[h+12>>2],K[n+(h+32|0)|0]=f,f=1,e[h+12>>2]=n+1,n=H[h+34|0],a=n>>>4|0,e[h+28>>2]=a;i:{a:{s:{l:switch(a-1|0){case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:e[e[c>>2]+1136>>2]=256<>2]+1136>>2]=576<>2]+1136>>2]=192}a=0}f=g}l=n&15,e[h+28>>2]=l;i:{a:{s:switch(l-1|0){default:if(l=0,g=e[c>>2],e[g+248>>2])break a;f=1;break i;case 0:e[e[c>>2]+1140>>2]=88200,l=0;break i;case 1:e[e[c>>2]+1140>>2]=176400,l=0;break i;case 2:e[e[c>>2]+1140>>2]=192e3,l=0;break i;case 3:e[e[c>>2]+1140>>2]=8e3,l=0;break i;case 4:e[e[c>>2]+1140>>2]=16e3,l=0;break i;case 5:e[e[c>>2]+1140>>2]=22050,l=0;break i;case 6:e[e[c>>2]+1140>>2]=24e3,l=0;break i;case 7:e[e[c>>2]+1140>>2]=32e3,l=0;break i;case 8:e[e[c>>2]+1140>>2]=44100,l=0;break i;case 9:e[e[c>>2]+1140>>2]=48e3,l=0;break i;case 10:e[e[c>>2]+1140>>2]=96e3,l=0;break i;case 11:case 12:case 13:break i;case 14:break s}f=e[c>>2],e[f+3632>>2]||Le[e[f+32>>2]](i,1,e[f+48>>2]),n=e[i>>2],e[n>>2]=2;break o}e[g+1140>>2]=e[g+288>>2]}v=H[h+35|0],m=v>>>4|0,e[h+28>>2]=m;i:{a:{if(m&8){n=e[c>>2],e[n+1144>>2]=2,g=1;s:switch(m&7){case 1:g=2;break a;case 0:break a;case 2:break s;default:break i}g=3;break a}n=e[c>>2],e[n+1144>>2]=m+1,g=0}e[n+1148>>2]=g,g=f}m=v>>>1&7,e[h+28>>2]=m,f=1;i:{a:{s:switch(m-1|0){default:if(!e[n+248>>2])break i;e[n+1152>>2]=e[n+296>>2];break a;case 0:e[n+1152>>2]=8;break a;case 1:e[n+1152>>2]=12;break a;case 3:e[n+1152>>2]=16;break a;case 4:e[n+1152>>2]=20;break a;case 2:case 6:break i;case 5:break s}e[n+1152>>2]=24}f=g}i:{if(!(!e[n+248>>2]|e[n+272>>2]==e[n+276>>2]&&!(K[h+33|0]&1))){if(!I8(e[n+56>>2],h+16|0,h+32|0,h+12|0))break n;if(g=e[h+20>>2],n=g,m=e[h+16>>2],(m|0)==-1&(n|0)==-1){g=H[(e[h+12>>2]+h|0)+31|0],f=e[c>>2],e[f+3520>>2]=1,K[f+3590|0]=g,e[f+3632>>2]||Le[e[f+32>>2]](i,1,e[f+48>>2]),n=e[i>>2],e[n>>2]=2;break o}g=e[c>>2],A=g+1160|0,e[A>>2]=m,e[A+4>>2]=n,e[g+1156>>2]=1;break i}if(!M8(e[n+56>>2],h+28|0,h+32|0,h+12|0))break n;if(g=e[h+28>>2],(g|0)==-1){g=H[(e[h+12>>2]+h|0)+31|0],f=e[c>>2],e[f+3520>>2]=1,K[f+3590|0]=g,e[f+3632>>2]||Le[e[f+32>>2]](i,1,e[f+48>>2]),n=e[i>>2],e[n>>2]=2;break o}n=e[c>>2],e[n+1160>>2]=g,e[n+1156>>2]=0}if(n=e[c>>2],a){if(!Je(e[n+56>>2],h+28|0,8))break n;if(n=e[h+12>>2],g=e[h+28>>2],K[n+(h+32|0)|0]=g,e[h+12>>2]=n+1,(a|0)==7){if(!Je(e[e[c>>2]+56>>2],h+8|0,8))break n;g=e[h+12>>2],n=e[h+8>>2],K[g+(h+32|0)|0]=n,e[h+12>>2]=g+1,g=n|e[h+28>>2]<<8,e[h+28>>2]=g}n=e[c>>2],e[n+1136>>2]=g+1}if(l){if(!Je(e[n+56>>2],h+28|0,8))break n;g=e[h+12>>2],n=e[h+28>>2],K[g+(h+32|0)|0]=n,e[h+12>>2]=g+1;i:{if((l|0)!=12){if(!Je(e[e[c>>2]+56>>2],h+8|0,8))break n;if(g=e[h+12>>2],n=e[h+8>>2],K[g+(h+32|0)|0]=n,e[h+12>>2]=g+1,a=n|e[h+28>>2]<<8,e[h+28>>2]=a,(l|0)==13)break i;a=ie(a,10);break i}a=ie(n,1e3)}n=e[c>>2],e[n+1140>>2]=a}if(!Je(e[n+56>>2],h+28|0,8))break n;if(g=H[h+28|0],a=nm(h+32|0,e[h+12>>2]),n=e[c>>2],(a|0)!=(g|0)){e[n+3632>>2]||Le[e[n+32>>2]](i,1,e[n+48>>2]),n=e[i>>2],e[n>>2]=2;break o}e[n+232>>2]=0;i:{a:{if(e[n+1156>>2])break a;if(a=n+1160|0,g=e[a>>2],e[h+28>>2]=g,e[n+1156>>2]=1,l=e[n+228>>2],l){Se=a,Ee=oe(l,0,g,0),e[Se>>2]=Ee,e[a+4>>2]=ne;break a}if(e[n+248>>2]){if(a=e[n+272>>2],(a|0)!=e[n+276>>2])break i;n=n+1160|0,Se=n,Ee=oe(a,0,g,0),e[Se>>2]=Ee,e[n+4>>2]=ne,g=e[c>>2],e[g+232>>2]=e[g+276>>2];break a}if(!g){g=n+1160|0,e[g>>2]=0,e[g+4>>2]=0,g=e[c>>2],e[g+232>>2]=e[g+1136>>2];break a}a=n+1160|0,Se=a,Ee=oe(e[n+1136>>2],0,g,0),e[Se>>2]=Ee,e[a+4>>2]=ne}if(!(f|v&1)){n=e[i>>2];break o}n=e[c>>2]}i:{if(!e[n+3632>>2]){Le[e[n+32>>2]](i,3,e[n+48>>2]);break i}e[n+6152>>2]=e[n+6152>>2]+1}n=e[i>>2],e[n>>2]=2;break o}f=e[c>>2],e[f+3520>>2]=1,K[f+3590|0]=255,e[f+3632>>2]||Le[e[f+32>>2]](i,1,e[f+48>>2]),n=e[i>>2],e[n>>2]=2}if(g=1,e[n>>2]==2)break e;if(n=e[c>>2],f=e[n+1144>>2],l=e[n+1136>>2],!(ze[n+224>>2]>=f>>>0&&ze[n+220>>2]>=l>>>0)){a=e[n+60>>2],a&&(Me(a+-16|0),e[e[c>>2]+60>>2]=0,n=e[c>>2]),a=e[n+3592>>2],a&&(Me(a),e[e[c>>2]+92>>2]=0,e[e[c>>2]+3592>>2]=0,n=e[c>>2]),a=e[n- -64>>2],a&&(Me(a+-16|0),e[e[c>>2]- -64>>2]=0,n=e[c>>2]),a=e[n+3596>>2],a&&(Me(a),e[e[c>>2]+96>>2]=0,e[e[c>>2]+3596>>2]=0,n=e[c>>2]),a=e[n+68>>2],a&&(Me(a+-16|0),e[e[c>>2]+68>>2]=0,n=e[c>>2]),a=e[n+3600>>2],a&&(Me(a),e[e[c>>2]+100>>2]=0,e[e[c>>2]+3600>>2]=0,n=e[c>>2]),a=e[n+72>>2],a&&(Me(a+-16|0),e[e[c>>2]+72>>2]=0,n=e[c>>2]),a=e[n+3604>>2],a&&(Me(a),e[e[c>>2]+104>>2]=0,e[e[c>>2]+3604>>2]=0,n=e[c>>2]),a=e[n+76>>2],a&&(Me(a+-16|0),e[e[c>>2]+76>>2]=0,n=e[c>>2]),a=e[n+3608>>2],a&&(Me(a),e[e[c>>2]+108>>2]=0,e[e[c>>2]+3608>>2]=0,n=e[c>>2]),a=e[n+80>>2],a&&(Me(a+-16|0),e[e[c>>2]+80>>2]=0,n=e[c>>2]),a=e[n+3612>>2],a&&(Me(a),e[e[c>>2]+112>>2]=0,e[e[c>>2]+3612>>2]=0,n=e[c>>2]),a=e[n+84>>2],a&&(Me(a+-16|0),e[e[c>>2]+84>>2]=0,n=e[c>>2]),a=e[n+3616>>2],a&&(Me(a),e[e[c>>2]+116>>2]=0,e[e[c>>2]+3616>>2]=0,n=e[c>>2]),a=e[n+88>>2],a&&(Me(a+-16|0),e[e[c>>2]+88>>2]=0,n=e[c>>2]),n=e[n+3620>>2],n&&(Me(n),e[e[c>>2]+120>>2]=0,e[e[c>>2]+3620>>2]=0);o:{if(!f)break o;if(l>>>0>4294967291||(n=l+4|0,(n&1073741823)!=(n|0)))break t;for(m=n<<2,a=0;;){if(n=bn(m),!n)break t;if(e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,e[n+12>>2]=0,v=a<<2,e[(v+e[c>>2]|0)+60>>2]=n+16,n=v+e[c>>2]|0,ui(l,n+3592|0,n+92|0)){if(a=a+1|0,(f|0)==(a|0))break o;continue}break}e[e[i>>2]>>2]=8;break n}n=e[c>>2],e[n+224>>2]=f,e[n+220>>2]=l,f=e[n+1144>>2]}o:{if(f)for(G=e[1412],pe=-1<>2];r:{i:switch(e[n+1148>>2]+-1|0){case 0:a=((f|0)==1)+a|0;break r;case 1:a=!f+a|0;break r;case 2:break i;default:break r}a=((f|0)==1)+a|0}if(!Je(e[n+56>>2],h+28|0,8))break n;n=e[h+28>>2],e[h+28>>2]=n&254,E=n&1;r:{if(E){if(!Md(e[e[c>>2]+56>>2],h+32|0)||(n=e[c>>2],l=e[h+32>>2]+1|0,e[(n+ie(f,292)|0)+1464>>2]=l,a>>>0<=l>>>0))break n;a=a-l|0;break r}n=e[c>>2],e[(n+ie(f,292)|0)+1464>>2]=0}l=e[h+28>>2];r:{if(l&128){e[n+3632>>2]||Le[e[n+32>>2]](i,0,e[n+48>>2]),e[e[i>>2]>>2]=2;break r}i:{a:{s:switch(l|0){case 0:if(l=e[((f<<2)+n|0)+60>>2],m=ie(f,292)+n|0,e[m+1176>>2]=0,!Di(e[n+56>>2],h+32|0,a))break n;if(e[m+1180>>2]=e[h+32>>2],n=0,a=e[c>>2],!e[a+1136>>2])break a;for(;e[l+(n<<2)>>2]=e[h+32>>2],n=n+1|0,n>>>0>2];);break a;case 2:if(l=(n+1136|0)+ie(f,292)|0,m=l+44|0,v=f<<2,A=e[(v+n|0)+92>>2],e[m>>2]=A,e[l+40>>2]=1,l=0,e[n+1136>>2]){for(;;){if(!Di(e[n+56>>2],h+32|0,a))break n;if(e[A+(l<<2)>>2]=e[h+32>>2],l=l+1|0,n=e[c>>2],C=e[n+1136>>2],!(l>>>0>>0))break}l=C<<2}gn(e[(n+v|0)+60>>2],e[m>>2],l);break a;default:break s}if(l>>>0<=15){s:{if(!e[n+3632>>2]){Le[e[n+32>>2]](i,3,e[n+48>>2]);break s}e[n+6152>>2]=e[n+6152>>2]+1}e[e[i>>2]>>2]=2;break r}if(l>>>0<=24){if(m=ie(f,292)+n|0,e[m+1176>>2]=2,A=f<<2,C=e[(A+n|0)+92>>2],v=l>>>1&7,e[m+1192>>2]=v,e[m+1212>>2]=C,l=e[n+56>>2],v)for(C=m+1196|0,n=0;;){if(!Di(l,h+32|0,a))break n;if(e[C+(n<<2)>>2]=e[h+32>>2],l=e[e[c>>2]+56>>2],n=n+1|0,(v|0)==(n|0))break}if(!Je(l,h+16|0,ae))break n;l=m+1180|0,a=e[h+16>>2],e[l>>2]=a,n=e[c>>2];s:{l:{if(a>>>0<=1){if(!Je(e[n+56>>2],h+16|0,te))break n;if(n=e[c>>2],a=e[h+16>>2],e[n+1136>>2]>>>a>>>0>=v>>>0)break l;e[n+3632>>2]||Le[e[n+32>>2]](i,0,e[n+48>>2]),e[e[i>>2]>>2]=2;break s}u:{if(!e[n+3632>>2]){Le[e[n+32>>2]](i,3,e[n+48>>2]);break u}e[n+6152>>2]=e[n+6152>>2]+1}e[e[i>>2]>>2]=2;break s}if(e[m+1184>>2]=a,n=ie(f,12),e[m+1188>>2]=(n+e[c>>2]|0)+124,l=e[l>>2],l>>>0<2&&(N=a,a=e[i+4>>2],!Rm(i,v,N,(n+a|0)+124|0,e[(a+A|0)+92>>2],(l|0)==1)))break n;n=v<<2,gn(e[(A+e[c>>2]|0)+60>>2],m+1196|0,n),a=e[c>>2],l=a+A|0,yw(e[l+92>>2],e[a+1136>>2]-v|0,v,n+e[l+60>>2]|0)}if(e[e[i>>2]>>2]==2)break r;if(E)break i;break r}if(l>>>0<=63){s:{if(!e[n+3632>>2]){Le[e[n+32>>2]](i,3,e[n+48>>2]);break s}e[n+6152>>2]=e[n+6152>>2]+1}e[e[i>>2]>>2]=2;break r}for(m=ie(f,292)+n|0,e[m+1176>>2]=3,A=f<<2,T=e[(A+n|0)+92>>2],C=l>>>1&31,v=C+1|0,e[m+1192>>2]=v,e[m+1460>>2]=T,l=e[n+56>>2],n=0;;){if(!Di(l,h+32|0,a))break n;if(e[(m+(n<<2)|0)+1332>>2]=e[h+32>>2],T=(n|0)!=(C|0),l=e[e[c>>2]+56>>2],n=n+1|0,!T)break}if(!Je(l,h+16|0,G))break n;n=e[h+16>>2];s:{if((n|0)==(pe|0)){n=e[c>>2],e[n+3632>>2]||Le[e[n+32>>2]](i,0,e[n+48>>2]),e[e[i>>2]>>2]=2;break s}if(z=m+1196|0,e[z>>2]=n+1,!Di(e[e[c>>2]+56>>2],h+32|0,ke))break n;if(n=e[h+32>>2],(n|0)<=-1){n=e[c>>2],e[n+3632>>2]||Le[e[n+32>>2]](i,0,e[n+48>>2]),e[e[i>>2]>>2]=2;break s}for(T=m+1200|0,e[T>>2]=n,l=e[e[c>>2]+56>>2],n=0;;){if(!Di(l,h+32|0,e[z>>2]))break n;if(e[(m+(n<<2)|0)+1204>>2]=e[h+32>>2],N=(n|0)!=(C|0),l=e[e[c>>2]+56>>2],n=n+1|0,!N)break}if(!Je(l,h+16|0,ae))break n;N=m+1180|0,l=e[h+16>>2],e[N>>2]=l,n=e[c>>2];l:{if(l>>>0<=1){if(!Je(e[n+56>>2],h+16|0,te))break n;if(n=e[c>>2],l=e[h+16>>2],e[n+1136>>2]>>>l>>>0>C>>>0)break l;e[n+3632>>2]||Le[e[n+32>>2]](i,0,e[n+48>>2]),e[e[i>>2]>>2]=2;break s}u:{if(!e[n+3632>>2]){Le[e[n+32>>2]](i,3,e[n+48>>2]);break u}e[n+6152>>2]=e[n+6152>>2]+1}e[e[i>>2]>>2]=2;break s}if(e[m+1184>>2]=l,n=ie(f,12),e[m+1188>>2]=(n+e[c>>2]|0)+124,C=e[N>>2],C>>>0<2&&(N=l,l=e[i+4>>2],!Rm(i,v,N,(n+l|0)+124|0,e[(l+A|0)+92>>2],(C|0)==1)))break n;l=v<<2,gn(e[(e[c>>2]+A|0)+60>>2],m+1332|0,l);l:{if(C=e[z>>2],C+((Kt(v)^31)+a|0)>>>0<=32){if(n=e[c>>2],a>>>0>16|C>>>0>16)break l;a=n+A|0,Le[e[n+44>>2]](e[a+92>>2],e[n+1136>>2]-v|0,m+1204|0,v,e[T>>2],l+e[a+60>>2]|0);break s}n=e[c>>2],a=n+A|0,Le[e[n+40>>2]](e[a+92>>2],e[n+1136>>2]-v|0,m+1204|0,v,e[T>>2],l+e[a+60>>2]|0);break s}a=n+A|0,Le[e[n+36>>2]](e[a+92>>2],e[n+1136>>2]-v|0,m+1204|0,v,e[T>>2],l+e[a+60>>2]|0)}if(!E|e[e[i>>2]>>2]==2)break r;break i}if(!E)break r}if(a=e[c>>2],n=e[(a+ie(f,292)|0)+1464>>2],e[h+28>>2]=n,!e[a+1136>>2]||(l=e[(a+(f<<2)|0)+60>>2],e[l>>2]=e[l>>2]<>2]<2))break r;for(;m=l+(n<<2)|0,e[m>>2]=e[m>>2]<>2],n=n+1|0,n>>>0>2];);}if(e[e[i>>2]>>2]==2)break o;if(f=f+1|0,n=e[c>>2],!(f>>>0>2]))break}r:{if(Sd(e[n+56>>2]))break r;if(e[h+32>>2]=0,f=e[e[c>>2]+56>>2],!Je(f,h+32|0,om(f)))break n;if(!e[h+32>>2])break r;f=e[c>>2],e[f+3632>>2]||Le[e[f+32>>2]](i,0,e[f+48>>2]),e[e[i>>2]>>2]=2}if(e[e[i>>2]>>2]==2||(f=P8(e[e[c>>2]+56>>2]),g=0,!Je(e[e[c>>2]+56>>2],h+16|0,e[1404])))break e;r:{if((f|0)==e[h+16>>2]){i:{a:{s:switch(f=e[c>>2],e[f+1148>>2]+-1|0){case 2:break i;case 0:break a;case 1:break s;default:break r}if(!e[f+1136>>2])break r;for(n=e[f- -64>>2],l=e[f+60>>2],a=0;m=a<<2,v=m+l|0,e[v>>2]=e[v>>2]+e[n+m>>2],a=a+1|0,a>>>0>2];);break r}if(!e[f+1136>>2])break r;for(n=e[f- -64>>2],l=e[f+60>>2],a=0;m=a<<2,v=m+n|0,e[v>>2]=e[l+m>>2]-e[v>>2],a=a+1|0,a>>>0>2];);break r}if(!e[f+1136>>2])break r;for(v=e[f- -64>>2],A=e[f+60>>2],a=0;l=a<<2,n=l+A|0,E=l+v|0,l=e[E>>2],m=l&1|e[n>>2]<<1,e[n>>2]=l+m>>1,e[E>>2]=m-l>>1,a=a+1|0,a>>>0>2];);break r}if(f=e[c>>2],e[f+3632>>2]||Le[e[f+32>>2]](i,2,e[f+48>>2]),n=e[c>>2],!e[n+1144>>2])break r;for(a=0;In(e[((a<<2)+n|0)+60>>2],e[n+1136>>2]<<2),a=a+1|0,n=e[c>>2],a>>>0>2];);}e[o>>2]=1,n=e[c>>2],o=e[n+232>>2],o&&(e[n+228>>2]=o),o=e[i>>2],l=e[n+1144>>2],e[o+8>>2]=l,e[o+12>>2]=e[n+1148>>2],E=e[n+1152>>2],e[o+16>>2]=E,e[o+20>>2]=e[n+1140>>2],f=e[n+1136>>2],e[o+24>>2]=f,o=n+1160|0,m=e[o>>2],a=e[o+4>>2],o=a,C=f+m|0,C>>>0>>0&&(o=o+1|0),e[n+240>>2]=C,e[n+244>>2]=o,v=n+60|0,A=n+1136|0;r:{i:{a:{if(e[n+3632>>2]){if(e[n+6156>>2]=1,E=e[n+6144>>2],f=e[n+6148>>2],gn(n+3752|0,A,2384),(a|0)==(f|0)&E>>>0>>0|f>>>0>>0|((o|0)==(f|0)&E>>>0>=C>>>0|f>>>0>o>>>0))break r;if(a=0,o=e[c>>2],e[o+3632>>2]=0,f=E-m|0,c=f,c){if(l)for(;m=a<<2,e[m+(h+32|0)>>2]=e[(n+m|0)+60>>2]+(c<<2),a=a+1|0,(l|0)!=(a|0););e[o+3752>>2]=e[o+3752>>2]-c,n=o+3776|0,c=n,a=n,o=e[n+4>>2],n=f+e[n>>2]|0,n>>>0>>0&&(o=o+1|0),e[a>>2]=n,e[c+4>>2]=o,o=e[i+4>>2],o=Le[e[o+24>>2]](i,o+3752|0,h+32|0,e[o+48>>2])|0;break a}o=Le[e[o+24>>2]](i,A,v,e[o+48>>2])|0;break a}s:{if(!e[n+248>>2]){e[n+3624>>2]=0;break s}if(!e[n+3624>>2])break s;if(!km(n+3636|0,v,l,f,E+7>>>3|0))break i;n=e[c>>2]}o=Le[e[n+24>>2]](i,A,v,e[n+48>>2])|0}if(!o)break r}e[e[i>>2]>>2]=7;break e}e[e[i>>2]>>2]=2}g=1;break e}g=0;break e}e[e[i>>2]>>2]=8,g=0}return be=h- -64|0,g}function Rm(i,o,n,a,c,f){var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0;l=be-16|0,be=l,h=e[e[i+4>>2]+1136>>2],A=e[(f?5644:5640)>>2],C=e[(f?5632:5628)>>2];e:{t:{if(Nd(a,n>>>0>6?n:6)){if(g=n?h>>>n|0:h-o|0,E=e[1409],!n)break t;for(f=0;;){if(!Je(e[e[i+4>>2]+56>>2],l+12|0,C)){h=0;break e}m=v<<2,e[m+e[a>>2]>>2]=e[l+12>>2];n:{if(ze[l+12>>2]>>0){if(h=0,e[m+e[a+4>>2]>>2]=0,m=g-(v?0:o)|0,!im(e[e[i+4>>2]+56>>2],(f<<2)+c|0,m,e[l+12>>2]))break e;f=f+m|0;break n}if(!Je(e[e[i+4>>2]+56>>2],l+12|0,E)){h=0;break e}if(e[m+e[a+4>>2]>>2]=e[l+12>>2],h=v?0:o,h>>>0>=g>>>0)break n;for(;;){if(!Di(e[e[i+4>>2]+56>>2],l+8|0,e[l+12>>2])){h=0;break e}if(e[(f<<2)+c>>2]=e[l+8>>2],f=f+1|0,h=h+1|0,(g|0)==(h|0))break}}if(h=1,v=v+1|0,!!(v>>>n))break}break e}e[e[i>>2]>>2]=8,h=0;break e}if(h=0,!Je(e[e[i+4>>2]+56>>2],l+12|0,C))break e;e[e[a>>2]>>2]=e[l+12>>2];t:{if(ze[l+12>>2]>=A>>>0){if(!Je(e[e[i+4>>2]+56>>2],l+12|0,E))break e;if(e[e[a+4>>2]>>2]=e[l+12>>2],!g)break t;for(f=0;;){if(!Di(e[e[i+4>>2]+56>>2],l+8|0,e[l+12>>2])){h=0;break e}if(e[(f<<2)+c>>2]=e[l+8>>2],f=f+1|0,h=h+1|0,(g|0)==(h|0))break}break t}if(e[e[a+4>>2]>>2]=0,!im(e[e[i+4>>2]+56>>2],c,g,e[l+12>>2]))break e}h=1}return be=l+16|0,h}function Tw(i){i=i|0;var o=0,n=0;e:{t:{for(;;){n:{o=1;o:switch(e[e[i>>2]>>2]){case 0:if(Ld(i))continue;break n;case 2:case 3:case 4:case 7:break t;case 1:break o;default:break e}if(Dd(i))continue}break}o=0}n=o}return n|0}function Fw(i){i=i|0;var o=0,n=0,a=0;o=be-16|0,be=o,n=1;e:{t:{for(;;){n:{o:switch(e[e[i>>2]>>2]){case 0:if(Ld(i))continue;break n;case 1:if(Dd(i))continue;break n;case 2:if(Im(i))continue;break t;case 4:case 7:break t;case 3:break o;default:break e}if(Nm(i,o+12|0))continue}break}n=0}a=n}return be=o+16|0,a|0}function Lw(i,o,n,a){return i=i|0,o=o|0,n=n|0,a=a|0,i=Le[e[e[i+4>>2]+4>>2]](i,o,n,a)|0,i>>>0<=2?e[(i<<2)+7572>>2]:5}function Dw(i){var o=0;o=e[i>>2],o&&Me(o),e[i+16>>2]=0,e[i>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0}function Ow(i){var o=0;return e[i+16>>2]=0,e[i+8>>2]=8192,e[i+12>>2]=0,o=i,i=bn(32768),e[o>>2]=i,(i|0)!=0}function Od(i){e[i+12>>2]=0,e[i+16>>2]=0}function Bw(i,o){var n=0,a=0,c=0,f=0;n=be-16|0,be=n,a=0;e:{if(!Bd(i,n+12|0,n+8|0))break e;c=o,f=x8(e[n+12>>2],e[n+8>>2]),Ut[c>>1]=f,a=1}return be=n+16|0,a}function Bd(i,o,n){var a=0,c=0,f=0,l=0,h=0;f=e[i+16>>2];e:{if(f&7)break e;t:{if(!f){c=e[i>>2],a=0;break t}l=e[i+12>>2];n:{if((l|0)!=e[i+8>>2]||(c=f+63>>>5|0,a=c+l|0,a>>>0<=l>>>0))break n;l=0,f=e[i>>2],h=a,a=c&1023,a=h+(a?1024-a|0:0)|0;o:{if(a){if((a|0)!=(a&1073741823))break e;if(c=xn(f,a<<2),c)break o;return Me(f),0}if(c=xn(f,0),!c)break e}e[i+8>>2]=a,e[i>>2]=c,l=e[i+12>>2],f=e[i+16>>2]}c=e[i>>2],a=e[i+4>>2]<<32-f,e[c+(l<<2)>>2]=a<<24|a<<8&16711680|(a>>>8&65280|a>>>24),a=e[i+16>>2]>>>3|0}e[o>>2]=c,e[n>>2]=a+(e[i+12>>2]<<2),l=1}return l}function jw(i,o){var n=0,a=0,c=0,f=0;n=be-16|0,be=n,a=0;e:{if(!Bd(i,n+12|0,n+8|0))break e;c=o,f=nm(e[n+12>>2],e[n+8>>2]),K[c|0]=f,a=1}return be=n+16|0,a}function as(i,o){var n=0,a=0,c=0,f=0;e:{t:{if(!o)break t;n=e[i+8>>2],a=e[i+12>>2];n:{if(n>>>0>a+o>>>0||(c=a+((e[i+16>>2]+o|0)+31>>>5|0)|0,c>>>0<=n>>>0))break n;a=0,f=e[i>>2],n=c-n&1023,n=c+(n?1024-n|0:0)|0;o:{if(n){if((n|0)!=(n&1073741823))break e;if(c=xn(f,n<<2),c)break o;return Me(f),0}if(c=xn(f,0),!c)break e}e[i+8>>2]=n,e[i>>2]=c}if(n=e[i+16>>2],n){if(c=n,n=32-n|0,a=n>>>0>>0?n:o,f=c+a|0,e[i+16>>2]=f,n=e[i+4>>2]<>2]=n,(f|0)!=32)break t;f=e[i+12>>2],e[i+12>>2]=f+1,e[e[i>>2]+(f<<2)>>2]=n<<8&16711680|n<<24|(n>>>8&65280|n>>>24),e[i+16>>2]=0,o=o-a|0}if(o>>>0>=32)for(n=e[i>>2];a=e[i+12>>2],e[i+12>>2]=a+1,e[n+(a<<2)>>2]=0,o=o+-32|0,o>>>0>31;);if(!o)break t;e[i+16>>2]=o,e[i+4>>2]=0}a=1}return a}function ht(i,o,n){var a=0;e:{if(n>>>0<=31&&(a=0,o>>>n))break e;a=ft(i,o,n)}return a}function ft(i,o,n){var a=0,c=0,f=0,l=0,h=0;e:{if(!i|n>>>0>32||(c=e[i>>2],!c)||(l=1,!n))break e;h=e[i+8>>2],a=e[i+12>>2];t:{if(h>>>0>a+n>>>0){a=c;break t}if(f=a+((e[i+16>>2]+n|0)+31>>>5|0)|0,f>>>0<=h>>>0){a=c;break t}l=0,a=f-h&1023,f=f+(a?1024-a|0:0)|0;n:{if(f){if((f|0)!=(f&1073741823))break e;if(a=xn(c,f<<2),a)break n;return Me(c),0}if(a=xn(c,0),!a)break e}e[i+8>>2]=f,e[i>>2]=a}if(c=e[i+16>>2],f=32-c|0,f>>>0>n>>>0)return e[i+16>>2]=n+c,e[i+4>>2]=e[i+4>>2]<>2]=c,n=e[i+12>>2],e[i+12>>2]=n+1,a=(n<<2)+a|0,n=e[i+4>>2]<>>c,e[a>>2]=n<<24|n<<8&16711680|(n>>>8&65280|n>>>24),e[i+4>>2]=o,1;l=1,n=i,i=e[i+12>>2],e[n+12>>2]=i+1,e[(i<<2)+a>>2]=o<<8&16711680|o<<24|(o>>>8&65280|o>>>24)}return l}function Bi(i,o,n){return ft(i,(n>>>0<32?-1<>>0>=33){if(a=a+-32|0,n>>>a|0&&a>>>0<=31||!ft(i,n,a))break e;return(ft(i,o,32)|0)!=0}if((a|0)!=32&&o>>>a)break e;c=ft(i,o,a)}return c}function jd(i,o){var n=0;e:{if(!ft(i,o&255,8)||!ft(i,o>>>8&255,8)||!ft(i,o>>>16&255,8))break e;n=(ft(i,o>>>24|0,8)|0)!=0}return n}function No(i,o,n){var a=0,c=0,f=0,l=0;a=e[i+8>>2],c=e[i+12>>2];e:{t:{if(a>>>0>(c+(n>>>2|0)|0)+1>>>0||(f=c+((e[i+16>>2]+(n<<3)|0)+31>>>5|0)|0,f>>>0<=a>>>0))break t;c=0,l=e[i>>2],a=f-a&1023,a=f+(a?1024-a|0:0)|0;n:{if(a){if((a|0)!=(a&1073741823))break e;if(f=xn(l,a<<2),f)break n;return Me(l),0}if(f=xn(l,0),!f)break e}e[i+8>>2]=a,e[i>>2]=f}if(c=1,!n)break e;c=0;t:{for(;;){if(!ft(i,H[o+c|0],8))break t;if(c=c+1|0,(c|0)==(n|0))break}return 1}c=0}return c}function hu(i,o){return o>>>0<=31?ft(i,1,o+1|0):as(i,o)?(ft(i,1,1)|0)!=0:0}function Tm(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0;c=1;e:{if(!n)break e;for(v=a+1|0,A=-1<>>31-a|0;;){l=e[o>>2],m=l<<1^l>>31,l=m>>>a|0,c=v+l|0;t:{n:{if(f=e[i+16>>2],!f||(h=c+f|0,h>>>0>31))break n;e[i+16>>2]=h,e[i+4>>2]=(m|A)&C|e[i+4>>2]<>2],h=e[i+12>>2];n:{if(g>>>0>(h+(f+l|0)|0)+1>>>0||(c=h+((c+f|0)+31>>>5|0)|0,c>>>0<=g>>>0))break n;h=e[i>>2],f=c-g&1023,f=c+(f?1024-f|0:0)|0;o:{if(f){if(c=0,(f|0)!=(f&1073741823))break e;if(g=xn(h,f<<2),g)break o;return Me(h),0}if(g=xn(h,0),c=0,!g)break e}e[i+8>>2]=f,e[i>>2]=g}n:{if(!l)break n;if(c=e[i+16>>2],c){if(f=e[i+4>>2],h=32-c|0,l>>>0>>0){e[i+16>>2]=c+l,e[i+4>>2]=f<>2]=c,f=e[i+12>>2],e[i+12>>2]=f+1,e[e[i>>2]+(f<<2)>>2]=c<<8&16711680|c<<24|(c>>>8&65280|c>>>24),e[i+16>>2]=0,l=l-h|0}if(l>>>0>=32)for(c=e[i>>2];f=e[i+12>>2],e[i+12>>2]=f+1,e[c+(f<<2)>>2]=0,l=l+-32|0,l>>>0>31;);if(!l)break n;e[i+16>>2]=l,e[i+4>>2]=0}if(l=(m|A)&C,c=e[i+4>>2],h=e[i+16>>2],f=32-h|0,v>>>0>>0){e[i+16>>2]=h+v,e[i+4>>2]=l|c<>2]=h,m=e[i+12>>2],e[i+12>>2]=m+1,c=c<>>h,e[e[i>>2]+(m<<2)>>2]=c<<24|c<<8&16711680|(c>>>8&65280|c>>>24),e[i+4>>2]=l}if(o=o+4|0,n=n+-1|0,!n)break}c=1}return c}function zw(i,o){if((o|0)>=0){if(o>>>0<=127)return ft(i,o,8);if(o>>>0<=2047)return ft(i,o>>>6|192,8)&ft(i,o&63|128,8)&1;if(o>>>0<=65535)return ft(i,o>>>12|224,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;if(o>>>0<=2097151)return ft(i,o>>>18|240,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;if(o>>>0<=67108863)return ft(i,o>>>24|248,8)&ft(i,o>>>18&63|128,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;i=ft(i,o>>>30|252,8)&ft(i,o>>>24&63|128,8)&ft(i,o>>>18&63|128,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1}else i=0;return i}function Vw(i,o,n){if((n|0)==15|n>>>0<15){if(!n&o>>>0<=127|n>>>0<0)return ft(i,o,8);if(!n&o>>>0<=2047|n>>>0<0)return ft(i,(n&63)<<26|o>>>6|192,8)&ft(i,o&63|128,8)&1;if(!n&o>>>0<=65535|n>>>0<0)return ft(i,(n&4095)<<20|o>>>12|224,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;if(!n&o>>>0<=2097151|n>>>0<0)return ft(i,(n&262143)<<14|o>>>18|240,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;if(!n&o>>>0<=67108863|n>>>0<0)return ft(i,(n&16777215)<<8|o>>>24|248,8)&ft(i,o>>>18&63|128,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;if(!n&o>>>0<=2147483647|n>>>0<0)return ft(i,(n&1073741823)<<2|o>>>30|252,8)&ft(i,o>>>24&63|128,8)&ft(i,o>>>18&63|128,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;i=ft(i,254,8)&ft(i,(n&1073741823)<<2|o>>>30|128,8)&ft(i,o>>>24&63|128,8)&ft(i,o>>>18&63|128,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1}else i=0;return i}function Ww(i){return cm(i+8|0,e[i>>2])?i=0:(e[i+392>>2]=0,e[i+396>>2]=0,e[i+384>>2]=0,e[i+388>>2]=1,i=1),i}function Fm(i){e[i>>2]=0,e[i+4>>2]=0}function Uw(i,o,n,a,c,f,l,h,g){var m=0,v=0,A=0,C=0,E=0,N=0;m=be-96|0,be=m;e:{t:{if(e[i+384>>2]){e[m+72>>2]=0,e[m+76>>2]=0,C=m+80|0,A=C,e[A>>2]=0,e[A+4>>2]=0,e[m+88>>2]=0,e[m+92>>2]=0,e[m+64>>2]=0,e[m+68>>2]=0,v=e[i+396>>2],A=a,E=e[i+392>>2],N=A+E|0,N>>>0>>0&&(v=v+1|0),e[C>>2]=N,e[C+4>>2]=v;n:{o:{if(e[i+388>>2]){if((n|0)!=38)break n;K[m|0]=H[7536],n=e[2721],n=H[n|0]|H[n+1|0]<<8|(H[n+2|0]<<16|H[n+3|0]<<24),K[m+5|0]=1,K[m+6|0]=0,K[m+1|0]=n,K[m+2|0]=n>>>8,K[m+3|0]=n>>>16,K[m+4|0]=n>>>24,v=e[i+4>>2],n=H[5409]|H[5410]<<8|(H[5411]<<16|H[5412]<<24),K[m+9|0]=n,K[m+10|0]=n>>>8,K[m+11|0]=n>>>16,K[m+12|0]=n>>>24,K[m+8|0]=v,K[m+7|0]=v>>>8,n=H[o+34|0]|H[o+35|0]<<8|(H[o+36|0]<<16|H[o+37|0]<<24),v=H[o+30|0]|H[o+31|0]<<8|(H[o+32|0]<<16|H[o+33|0]<<24),K[m+43|0]=v,K[m+44|0]=v>>>8,K[m+45|0]=v>>>16,K[m+46|0]=v>>>24,K[m+47|0]=n,K[m+48|0]=n>>>8,K[m+49|0]=n>>>16,K[m+50|0]=n>>>24,n=H[o+28|0]|H[o+29|0]<<8|(H[o+30|0]<<16|H[o+31|0]<<24),v=H[o+24|0]|H[o+25|0]<<8|(H[o+26|0]<<16|H[o+27|0]<<24),K[m+37|0]=v,K[m+38|0]=v>>>8,K[m+39|0]=v>>>16,K[m+40|0]=v>>>24,K[m+41|0]=n,K[m+42|0]=n>>>8,K[m+43|0]=n>>>16,K[m+44|0]=n>>>24,n=H[o+20|0]|H[o+21|0]<<8|(H[o+22|0]<<16|H[o+23|0]<<24),v=H[o+16|0]|H[o+17|0]<<8|(H[o+18|0]<<16|H[o+19|0]<<24),K[m+29|0]=v,K[m+30|0]=v>>>8,K[m+31|0]=v>>>16,K[m+32|0]=v>>>24,K[m+33|0]=n,K[m+34|0]=n>>>8,K[m+35|0]=n>>>16,K[m+36|0]=n>>>24,n=H[o+12|0]|H[o+13|0]<<8|(H[o+14|0]<<16|H[o+15|0]<<24),v=H[o+8|0]|H[o+9|0]<<8|(H[o+10|0]<<16|H[o+11|0]<<24),K[m+21|0]=v,K[m+22|0]=v>>>8,K[m+23|0]=v>>>16,K[m+24|0]=v>>>24,K[m+25|0]=n,K[m+26|0]=n>>>8,K[m+27|0]=n>>>16,K[m+28|0]=n>>>24,n=H[o+4|0]|H[o+5|0]<<8|(H[o+6|0]<<16|H[o+7|0]<<24),o=H[o|0]|H[o+1|0]<<8|(H[o+2|0]<<16|H[o+3|0]<<24),K[m+13|0]=o,K[m+14|0]=o>>>8,K[m+15|0]=o>>>16,K[m+16|0]=o>>>24,K[m+17|0]=n,K[m+18|0]=n>>>8,K[m+19|0]=n>>>16,K[m+20|0]=n>>>24,e[m+68>>2]=51,e[m+72>>2]=1,e[m+64>>2]=m,e[i+388>>2]=0;break o}e[m+68>>2]=n,e[m+64>>2]=o}if(f&&(e[m+76>>2]=1),o=i+8|0,W8(o,m- -64|0))break n;if(n=i+368|0,!a)for(;;){if(!pm(o,n,1))break t;if(Le[l](h,e[i+368>>2],e[i+372>>2],0,c,g))break n;if(Le[l](h,e[i+376>>2],e[i+380>>2],0,c,g))break n}for(;;){if(!U8(o,n))break t;if(Le[l](h,e[i+368>>2],e[i+372>>2],0,c,g))break n;if(Le[l](h,e[i+376>>2],e[i+380>>2],0,c,g))break}}l=1;break e}if(l=1,a|c|(n|0)!=4|(H[o|0]|H[o+1|0]<<8|(H[o+2|0]<<16|H[o+3|0]<<24))!=(H[5409]|H[5410]<<8|(H[5411]<<16|H[5412]<<24)))break e;e[i+384>>2]=1,A=a}o=i,a=o,n=e[o+396>>2],i=A+e[o+392>>2]|0,i>>>0>>0&&(n=n+1|0),e[a+392>>2]=i,e[o+396>>2]=n,l=0}return be=m+96|0,l}function Lm(i){e[i>>2]=0,e[i+4>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0}function ls(i){var o=0;o=e[i>>2],o&&Me(o),o=e[i+8>>2],o&&Me(o),e[i>>2]=0,e[i+4>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0}function Dm(i,o,n,a,c,f,l){var h=0,g=0,m=0;h=be-16|0,be=h;e:{if(!c)break e;t:switch(Le[c](i,o,n,l)|0){case 1:e[e[i>>2]>>2]=5;break e;case 0:break t;default:break e}if(c=bn(282),e[a>>2]=c,!c){e[e[i>>2]>>2]=8;break e}for(g=27;;){e[h+12>>2]=g,o=5;t:{n:switch(Le[f](i,c,h+12|0,l)|0){case 1:if(o=e[h+12>>2],o)break t;o=2;default:e[e[i>>2]>>2]=o;break e;case 3:break e;case 0:break n}o=e[h+12>>2]}if(c=o+c|0,g=g-o|0,!g)break}o=e[a>>2],e[a+4>>2]=H[o+26|0]+27;t:{if(!(K[o+5|0]&1|(H[o|0]|H[o+1|0]<<8|(H[o+2|0]<<16|H[o+3|0]<<24))!=1399285583|((H[o+6|0]|H[o+7|0]<<8|(H[o+8|0]<<16|H[o+9|0]<<24))!=0|(H[o+10|0]|H[o+11|0]<<8|(H[o+12|0]<<16|H[o+13|0]<<24))!=0))&&(g=H[o+26|0],g))break t;e[e[i>>2]>>2]=2;break e}for(c=o+27|0;;){e[h+12>>2]=g,o=5;t:{n:switch(Le[f](i,c,h+12|0,l)|0){case 1:if(o=e[h+12>>2],o)break t;o=2;default:e[e[i>>2]>>2]=o;break e;case 3:break e;case 0:break n}o=e[h+12>>2]}if(c=o+c|0,g=g-o|0,!g)break}c=0,o=e[a>>2],n=H[o+26|0];t:{if((n|0)!=1)for(n=n+-1|0;;){if(H[(o+c|0)+27|0]!=255){e[e[i>>2]>>2]=2;break t}if(c=c+1|0,!(c>>>0>>0))break}if(c=H[(o+c|0)+27|0]+ie(c,255)|0,e[a+12>>2]=c,g=bn(c||1),e[a+8>>2]=g,!g){e[e[i>>2]>>2]=8;break t}if(n=h,c){for(;;){e[h+12>>2]=c,o=5;n:{o:switch(Le[f](i,g,h+12|0,l)|0){case 1:if(o=e[h+12>>2],o)break n;o=2;default:e[e[i>>2]>>2]=o;break t;case 3:break t;case 0:break o}o=e[h+12>>2]}if(g=o+g|0,c=c-o|0,!c)break}o=e[a>>2]}if(e[n+12>>2]=H[o+22|0]|H[o+23|0]<<8|(H[o+24|0]<<16|H[o+25|0]<<24),fm(a),o=e[a>>2],e[h+12>>2]==(H[o+22|0]|H[o+23|0]<<8|(H[o+24|0]<<16|H[o+25|0]<<24))){m=1;break e}e[e[i>>2]>>2]=2}}return be=h+16|0,m}function Om(i,o,n,a,c,f,l){e:{t:{if(!c)break t;n:switch(Le[c](i,o,n,l)|0){case 1:break e;case 0:break n;default:break t}if(fm(a),Le[f](i,e[a>>2],e[a+4>>2],0,0,l))break e;if(!Le[f](i,e[a+8>>2],e[a+12>>2],0,0,l))return 1;e[e[i>>2]>>2]=5}return 0}return e[e[i>>2]>>2]=5,0}function Hw(i){return 0}function Gw(i,o,n,a){return ne=0,0}function Bm(i,o){var n=0,a=0;n=H[i|0],a=H[o|0];e:{if(!n|(n|0)!=(a|0))break e;for(;;){if(a=H[o+1|0],n=H[i+1|0],!n)break e;if(o=o+1|0,i=i+1|0,(n|0)!=(a|0))break}}return n-a|0}function zd(i,o){var n=0,a=0,c=0,f=0;return n=i*i,a=n*.5,c=1-a,f=1-c-a,a=n*n,c+(f+(n*(n*(n*(n*2480158728947673e-20+-.001388888888887411)+.0416666666666666)+a*a*(n*(n*-11359647557788195e-27+2087572321298175e-24)+-27557314351390663e-23))-i*o))}function ji(i,o){e:{if((o|0)>=1024){if(i=i*898846567431158e293,(o|0)<2047){o=o+-1023|0;break e}i=i*898846567431158e293,o=((o|0)<3069?o:3069)+-2046|0;break e}if((o|0)>-1023)break e;if(i=i*22250738585072014e-324,(o|0)>-2045){o=o+1022|0;break e}i=i*22250738585072014e-324,o=((o|0)>-3066?o:-3066)+2044|0}return ot(0,0),ot(1,o+1023<<20),i*+rt()}function Qw(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0;if(h=be-560|0,be=h,f=(n+-3|0)/24|0,z=(f|0)>0?f:0,v=n+ie(z,-24)|0,C=e[1901],m=a+-1|0,(C+m|0)>=0)for(f=a+C|0,n=z-m|0;it[(h+320|0)+(l<<3)>>3]=(n|0)<0?0:+e[(n<<2)+7616>>2],n=n+1|0,l=l+1|0,(f|0)!=(l|0););for(E=v+-24|0,f=0,l=(C|0)>0?C:0,A=(a|0)<1;;){e:{if(A){c=0;break e}for(g=f+m|0,n=0,c=0;c=c+it[(n<<3)+i>>3]*it[(h+320|0)+(g-n<<3)>>3],n=n+1|0,(a|0)!=(n|0););}if(it[(f<<3)+h>>3]=c,n=(f|0)==(l|0),f=f+1|0,!!n)break}pe=47-v|0,G=48-v|0,ke=v+-25|0,f=C;e:{for(;;){if(c=it[(f<<3)+h>>3],n=0,l=f,m=(f|0)<1,!m)for(;;){A=(h+480|0)+(n<<2)|0,N=c,c=c*5960464477539063e-23;t:{if(Dn(c)<2147483648){g=~~c;break t}g=-2147483648}c=+(g|0),N=N+c*-16777216;t:{if(Dn(N)<2147483648){g=~~N;break t}g=-2147483648}if(e[A>>2]=g,l=l+-1|0,c=it[(l<<3)+h>>3]+c,n=n+1|0,(f|0)==(n|0))break}c=ji(c,E),c=c+f8(c*.125)*-8;t:{if(Dn(c)<2147483648){A=~~c;break t}A=-2147483648}c=c-+(A|0);t:{n:{o:{te=(E|0)<1;r:{if(!te){l=((f<<2)+h|0)+476|0,g=e[l>>2],n=g>>G,T=l,l=g-(n<>2]=l,A=n+A|0,g=l>>pe;break r}if(E)break o;g=e[((f<<2)+h|0)+476>>2]>>23}if((g|0)<1)break t;break n}if(g=2,c>=.5)break n;g=0;break t}if(n=0,l=0,!m)for(;;){T=(h+480|0)+(n<<2)|0,ae=e[T>>2],m=16777215;n:{o:{if(l||(m=16777216,ae))break o;l=0;break n}e[T>>2]=m-ae,l=1}if(n=n+1|0,(f|0)==(n|0))break}n:{if(te)break n;o:switch(ke|0){case 0:n=((f<<2)+h|0)+476|0,e[n>>2]=e[n>>2]&8388607;break n;case 1:break o;default:break n}n=((f<<2)+h|0)+476|0,e[n>>2]=e[n>>2]&4194303}if(A=A+1|0,(g|0)!=2||(c=1-c,g=2,!l))break t;c=c-ji(1,E)}if(c==0){l=0;t:{if(n=f,(n|0)<=(C|0))break t;for(;n=n+-1|0,l=e[(h+480|0)+(n<<2)>>2]|l,(n|0)>(C|0););if(!l)break t;for(v=E;v=v+-24|0,f=f+-1|0,!e[(h+480|0)+(f<<2)>>2];);break e}for(n=1;l=n,n=n+1|0,!e[(h+480|0)+(C-l<<2)>>2];);for(l=f+l|0;;){if(m=a+f|0,f=f+1|0,it[(h+320|0)+(m<<3)>>3]=e[(z+f<<2)+7616>>2],n=0,c=0,(a|0)>=1)for(;c=c+it[(n<<3)+i>>3]*it[(h+320|0)+(m-n<<3)>>3],n=n+1|0,(a|0)!=(n|0););if(it[(f<<3)+h>>3]=c,!((f|0)<(l|0)))break}f=l;continue}break}c=ji(c,0-E|0);t:{if(c>=16777216){a=(h+480|0)+(f<<2)|0,N=c,c=c*5960464477539063e-23;n:{if(Dn(c)<2147483648){n=~~c;break n}n=-2147483648}c=N+ +(n|0)*-16777216;n:{if(Dn(c)<2147483648){i=~~c;break n}i=-2147483648}e[a>>2]=i,f=f+1|0;break t}n=Dn(c)<2147483648?~~c:-2147483648,v=E}e[(h+480|0)+(f<<2)>>2]=n}c=ji(1,v);e:{if((f|0)<=-1)break e;for(n=f;it[(n<<3)+h>>3]=c*+e[(h+480|0)+(n<<2)>>2],c=c*5960464477539063e-23,i=(n|0)>0,n=n+-1|0,!!i;);if(m=0,(f|0)<0)break e;for(i=(C|0)>0?C:0,l=f;;){for(a=i>>>0>>0?i:m,v=f-l|0,n=0,c=0;c=c+it[(n<<3)+10384>>3]*it[(n+l<<3)+h>>3],E=(n|0)!=(a|0),n=n+1|0,!!E;);if(it[(h+160|0)+(v<<3)>>3]=c,l=l+-1|0,n=(f|0)!=(m|0),m=m+1|0,!n)break}}if(c=0,(f|0)>=0)for(n=f;c=c+it[(h+160|0)+(n<<3)>>3],i=(n|0)>0,n=n+-1|0,!!i;);if(it[o>>3]=g?-c:c,c=it[h+160>>3]-c,n=1,(f|0)>=1)for(;c=c+it[(h+160|0)+(n<<3)>>3],i=(n|0)!=(f|0),n=n+1|0,!!i;);return it[o+8>>3]=g?-c:c,be=h+560|0,A&7}function Yw(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0;l=be-48|0,be=l,qe(+i),f=Oe(1)|0,a=Oe(0)|0;e:{t:{c=f,f=c,h=c&2147483647;n:{if(h>>>0<=1074752122){if((f&1048575)==598523)break n;if(h>>>0<=1073928572){if((c|0)>0||(c|0)>=0&&!(a>>>0<0)&&!0){i=i+-1.5707963267341256,n=i+-6077100506506192e-26,it[o>>3]=n,it[o+8>>3]=i-n+-6077100506506192e-26,a=1;break e}i=i+1.5707963267341256,n=i+6077100506506192e-26,it[o>>3]=n,it[o+8>>3]=i-n+6077100506506192e-26,a=-1;break e}if((c|0)>0||(c|0)>=0&&!(a>>>0<0)&&!0){i=i+-3.1415926534682512,n=i+-12154201013012384e-26,it[o>>3]=n,it[o+8>>3]=i-n+-12154201013012384e-26,a=2;break e}i=i+3.1415926534682512,n=i+12154201013012384e-26,it[o>>3]=n,it[o+8>>3]=i-n+12154201013012384e-26,a=-2;break e}if(h>>>0<=1075594811){if(h>>>0<=1075183036){if((h|0)==1074977148)break n;if((c|0)>0||(c|0)>=0&&!(a>>>0<0)&&!0){i=i+-4.712388980202377,n=i+-18231301519518578e-26,it[o>>3]=n,it[o+8>>3]=i-n+-18231301519518578e-26,a=3;break e}i=i+4.712388980202377,n=i+18231301519518578e-26,it[o>>3]=n,it[o+8>>3]=i-n+18231301519518578e-26,a=-3;break e}if((h|0)==1075388923)break n;if((c|0)>0||(c|0)>=0&&!(a>>>0<0)&&!0){i=i+-6.2831853069365025,n=i+-2430840202602477e-25,it[o>>3]=n,it[o+8>>3]=i-n+-2430840202602477e-25,a=4;break e}i=i+6.2831853069365025,n=i+2430840202602477e-25,it[o>>3]=n,it[o+8>>3]=i-n+2430840202602477e-25,a=-4;break e}if(h>>>0>1094263290)break t}m=i*.6366197723675814+6755399441055744+-6755399441055744,n=i+m*-1.5707963267341256,g=m*6077100506506192e-26,i=n-g,it[o>>3]=i,qe(+i),a=Oe(1)|0,Oe(0)|0,c=h>>>20|0,f=(c-(a>>>20&2047)|0)<17,Dn(m)<2147483648?a=~~m:a=-2147483648;n:{if(f||(g=n,i=m*6077100506303966e-26,n=n-i,g=m*20222662487959506e-37-(g-n-i),i=n-g,it[o>>3]=i,f=c,qe(+i),c=Oe(1)|0,Oe(0)|0,(f-(c>>>20&2047)|0)<50))break n;g=n,i=m*20222662487111665e-37,n=n-i,g=m*84784276603689e-45-(g-n-i),i=n-g,it[o>>3]=i}it[o+8>>3]=n-i-g;break e}if(h>>>0>=2146435072){i=i-i,it[o>>3]=i,it[o+8>>3]=i,a=0;break e}for(ot(0,a|0),ot(1,c&1048575|1096810496),i=+rt(),a=0,f=1;v=(l+16|0)+(a<<3)|0,Dn(i)<2147483648?a=~~i:a=-2147483648,n=+(a|0),it[v>>3]=n,i=(i-n)*16777216,a=1,v=f&1,f=0,!!v;);it[l+32>>3]=i;t:{if(i!=0){a=2;break t}for(f=1;a=f,f=a+-1|0,it[(l+16|0)+(a<<3)>>3]==0;);}if(a=Qw(l+16|0,l,(h>>>20|0)+-1046|0,a+1|0),i=it[l>>3],(c|0)<-1||(c|0)<=-1||!1){it[o>>3]=-i,it[o+8>>3]=-it[l+8>>3],a=0-a|0;break e}it[o>>3]=i,c=e[l+12>>2],e[o+8>>2]=e[l+8>>2],e[o+12>>2]=c}return be=l+48|0,a}function jm(i,o){var n=0,a=0;return n=i*i,a=i,i=n*i,a-(n*(o*.5-i*(n*(n*n)*(n*158969099521155e-24+-25050760253406863e-24)+(n*(n*27557313707070068e-22+-.0001984126982985795)+.00833333333332249)))-o+i*.16666666666666632)}function pn(i){var o=0,n=0,a=0;o=be-16|0,be=o,qe(+i),a=Oe(1)|0,Oe(0)|0,a=a&2147483647;e:{if(a>>>0<=1072243195){if(n=1,a>>>0<1044816030)break e;n=zd(i,0);break e}if(n=i-i,a>>>0>=2146435072)break e;t:switch(Yw(i,o)&3){case 0:n=zd(it[o>>3],it[o+8>>3]);break e;case 1:n=-jm(it[o>>3],it[o+8>>3]);break e;case 2:n=-zd(it[o>>3],it[o+8>>3]);break e;default:break t}n=jm(it[o>>3],it[o+8>>3])}return i=n,be=o+16|0,i}function Kw(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0;qe(+i),a=Oe(1)|0,h=Oe(0)|0,f=a>>>31|0;e:{t:{n:{o:{l=i;r:{i:{o=a,a=o&2147483647;a:{if(a>>>0>=1082532651){if(o=o&2147483647,(o|0)==2146435072&h>>>0>0|o>>>0>2146435072)return i;if(i>709.782712893384)return i*898846567431158e293;if(!(i<-708.3964185322641)||!(i<-745.1332191019411))break a;break t}if(a>>>0<1071001155)break o;if(a>>>0<1072734898)break i}if(i=i*1.4426950408889634+it[(f<<3)+10448>>3],Dn(i)<2147483648){o=~~i;break r}o=-2147483648;break r}o=(f^1)-f|0}n=+(o|0),i=l+n*-.6931471803691238,c=n*19082149292705877e-26,n=i-c;break n}if(a>>>0<=1043333120)break e;o=0,n=i}if(l=i,i=n*n,i=n-i*(i*(i*(i*(i*41381367970572385e-24+-16533902205465252e-22)+6613756321437934e-20)+-.0027777777777015593)+.16666666666666602),c=l+(n*i/(2-i)-c)+1,!o)break t;c=ji(c,o)}return c}return i+1}function Xw(i,o){var n=0,a=ue(0),c=0,f=ue(0),l=0,h=0,g=0;h=o+-1|0;e:{if(o&1){if(c=(h|0)/2|0,(o|0)>=0)for(g=(c|0)>0?c:0,l=g+1|0,f=ue(h|0);a=ue(n|0),Ze[(n<<2)+i>>2]=ue(a+a)/f,c=(n|0)==(g|0),n=n+1|0,!c;);if((l|0)>=(o|0))break e;for(f=ue(h|0);a=ue(l|0),Ze[(l<<2)+i>>2]=ue(2)-ue(ue(a+a)/f),l=l+1|0,(l|0)!=(o|0););break e}if(c=(o|0)/2|0,(o|0)>=2){for(f=ue(h|0);a=ue(n|0),Ze[(n<<2)+i>>2]=ue(a+a)/f,n=n+1|0,(c|0)!=(n|0););n=c}if((n|0)>=(o|0))break e;for(f=ue(h|0);a=ue(n|0),Ze[(n<<2)+i>>2]=ue(2)-ue(ue(a+a)/f),n=n+1|0,(n|0)!=(o|0););}}function qw(i,o){var n=0,a=ue(0),c=ue(0),f=0,l=ue(0);if((o|0)>=1)for(c=ue(o+-1|0);a=ue(ue(n|0)/c),f=(n<<2)+i|0,l=ue(+ue(Dn(ue(a+ue(-.5))))*-.47999998927116394+.6200000047683716+pn(+a*6.283185307179586)*-.3799999952316284),Ze[f>>2]=l,n=n+1|0,(n|0)!=(o|0););}function Zw(i,o){var n=0,a=0,c=0,f=0,l=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=+(n|0),f=(n<<2)+i|0,l=ue(pn(c*12.566370614359172/a)*.07999999821186066+(pn(c*6.283185307179586/a)*-.5+.41999998688697815)),Ze[f>>2]=l,n=n+1|0,(n|0)!=(o|0););}function Jw(i,o){var n=0,a=0,c=0,f=0,l=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=+(n|0),f=(n<<2)+i|0,l=ue(pn(c*12.566370614359172/a)*.14127999544143677+(pn(c*6.283185307179586/a)*-.488290011882782+.35874998569488525)+pn(c*18.84955592153876/a)*-.011680000461637974),Ze[f>>2]=l,n=n+1|0,(n|0)!=(o|0););}function $w(i,o){var n=0,a=0,c=0;if((o|0)>=1)for(c=+(o+-1|0)*.5;n=(+(a|0)-c)/c,n=1-n*n,Ze[(a<<2)+i>>2]=n*n,a=a+1|0,(a|0)!=(o|0););}function eA(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=ue(0);if((o|0)>=1)for(n=+(o+-1|0);c=+(a|0),f=pn(c*12.566370614359172/n),l=pn(c*6.283185307179586/n),h=pn(c*18.84955592153876/n),g=(a<<2)+i|0,m=ue(pn(c*25.132741228718345/n)*.0069473679177463055+(f*.27726316452026367+(l*-.4166315793991089+.21557894349098206)+h*-.08357894420623779)),Ze[g>>2]=m,a=a+1|0,(a|0)!=(o|0););}function tA(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=ue(0);if((o|0)>=1)for(c=+(o+-1|0)*.5,l=c*+n;f=(+(a|0)-c)/l,h=(a<<2)+i|0,g=ue(Kw(f*(f*-.5))),Ze[h>>2]=g,a=a+1|0,(a|0)!=(o|0););}function nA(i,o){var n=0,a=0,c=0,f=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=(n<<2)+i|0,f=ue(pn(+(n|0)*6.283185307179586/a)*-.46000000834465027+.5400000214576721),Ze[c>>2]=f,n=n+1|0,(n|0)!=(o|0););}function zm(i,o){var n=0,a=0,c=0,f=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=(n<<2)+i|0,f=ue(.5-pn(+(n|0)*6.283185307179586/a)*.5),Ze[c>>2]=f,n=n+1|0,(n|0)!=(o|0););}function rA(i,o){var n=0,a=0,c=0,f=0,l=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=+(n|0),f=(n<<2)+i|0,l=ue(pn(c*12.566370614359172/a)*.09799999743700027+(pn(c*6.283185307179586/a)*-.49799999594688416+.4020000100135803)+pn(c*18.84955592153876/a)*-.0010000000474974513),Ze[f>>2]=l,n=n+1|0,(n|0)!=(o|0););}function oA(i,o){var n=0,a=0,c=0,f=0,l=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=+(n|0),f=(n<<2)+i|0,l=ue(pn(c*12.566370614359172/a)*.13659949600696564+(pn(c*6.283185307179586/a)*-.48917749524116516+.36358189582824707)+pn(c*18.84955592153876/a)*-.010641099885106087),Ze[f>>2]=l,n=n+1|0,(n|0)!=(o|0););}function iA(i,o){var n=0;if((o|0)>=1)for(;e[(n<<2)+i>>2]=1065353216,n=n+1|0,(n|0)!=(o|0););}function aA(i,o){var n=0,a=0,c=ue(0),f=0,l=ue(0),h=0;a=1;e:{if(o&1){if(n=(o+1|0)/2|0,(o|0)>=1)for(c=ue(ue(o|0)+ue(1)),f=(n|0)>1?n:1,a=f+1|0,n=1;l=ue(n|0),Ze[((n<<2)+i|0)+-4>>2]=ue(l+l)/c,h=(n|0)==(f|0),n=n+1|0,!h;);if((a|0)>(o|0))break e;for(c=ue(ue(o|0)+ue(1));Ze[((a<<2)+i|0)+-4>>2]=ue((o-a<<1)+2|0)/c,n=(o|0)==(a|0),a=a+1|0,!n;);break e}if(n=1,(o|0)>=2)for(f=o>>>1|0,n=f+1|0,c=ue(ue(o|0)+ue(1));l=ue(a|0),Ze[((a<<2)+i|0)+-4>>2]=ue(l+l)/c,h=(a|0)==(f|0),a=a+1|0,!h;);if((n|0)>(o|0))break e;for(c=ue(ue(o|0)+ue(1));Ze[((n<<2)+i|0)+-4>>2]=ue((o-n<<1)+2|0)/c,a=(o|0)!=(n|0),n=n+1|0,!!a;);}}function sA(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=ue(0);e:{if(n<=ue(0)){if((o|0)<1)break e;for(;e[(a<<2)+i>>2]=1065353216,a=a+1|0,(a|0)!=(o|0););break e}if(n>=ue(1)){if((o|0)<1)break e;for(f=+(o+-1|0);h=(a<<2)+i|0,g=ue(.5-pn(+(a|0)*6.283185307179586/f)*.5),Ze[h>>2]=g,a=a+1|0,(a|0)!=(o|0););break e}n=ue(ue(n*ue(.5))*ue(o|0));t:{if(ue(Dn(n))=1)for(;e[(a<<2)+i>>2]=1065353216,a=a+1|0,(a|0)!=(o|0););if((c|0)<2)break e;for(o=o-c|0,l=c+-1|0,f=+(l|0),a=0;h=(a<<2)+i|0,g=ue(.5-pn(+(a|0)*3.141592653589793/f)*.5),Ze[h>>2]=g,h=(o+a<<2)+i|0,g=ue(.5-pn(+(a+l|0)*3.141592653589793/f)*.5),Ze[h>>2]=g,a=a+1|0,(c|0)!=(a|0););}}function lA(i,o,n,a,c){for(var f=0,l=0,h=0,g=0,m=0,v=0,A=ue(0),C=0,E=0,N=0,T=ue(0);A=n,n=ue(.05000000074505806),!(!(A<=ue(0))&&(n=ue(.949999988079071),!(A>=ue(1)))););n=ue(o|0),a=ue(n*a);e:{if(ue(Dn(a))>>0>>0?f:g,In(i,(g<<2)+4|0),f=g+1|0;E=(m|0)==(g|0),m=m+1|0,!E;);l=l+h|0;e:{if((f|0)>=(l|0)|(f|0)>=(o|0))break e;for(C=+(h|0),m=1;;){if(N=(f<<2)+i|0,T=ue(.5-pn(+(m|0)*3.141592653589793/C)*.5),Ze[N>>2]=T,f=f+1|0,(f|0)>=(l|0))break e;if(m=m+1|0,!((f|0)<(o|0)))break}}l=v-h|0;e:{if((f|0)>=(l|0)|(f|0)>=(o|0))break e;for(;;){if(e[(f<<2)+i>>2]=1065353216,f=f+1|0,(f|0)>=(l|0))break e;if(!((f|0)<(o|0)))break}}e:{if((f|0)>=(v|0)|(f|0)>=(o|0))break e;for(C=+(h|0);;){if(N=(f<<2)+i|0,T=ue(.5-pn(+(h|0)*3.141592653589793/C)*.5),Ze[N>>2]=T,f=f+1|0,(f|0)>=(v|0))break e;if(h=h+-1|0,!((f|0)<(o|0)))break}}(f|0)<(o|0)&&In((f<<2)+i|0,o-f<<2)}function cA(i,o,n,a,c){for(var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=ue(0),E=0,N=ue(0),T=0,z=ue(0);C=n,n=ue(.05000000074505806),!(!(C<=ue(0))&&(n=ue(.949999988079071),!(C>=ue(1)))););n=ue(C*ue(.5)),N=n,C=ue(o|0),a=ue(C*a);e:{if(ue(Dn(a))>>0>>0?l:o,A=+(l|0),g=0,E=1;T=(g<<2)+i|0,z=ue(.5-pn(+(E|0)*3.141592653589793/A)*.5),Ze[T>>2]=z,E=E+1|0,g=g+1|0,(g|0)!=(f|0););g=v-l|0;e:{if((f|0)>=(g|0)|(f|0)>=(o|0))break e;for(;;){if(e[(f<<2)+i>>2]=1065353216,f=f+1|0,(f|0)>=(g|0))break e;if(!((f|0)<(o|0)))break}}e:{if((f|0)>=(v|0)|(f|0)>=(o|0))break e;for(A=+(l|0);;){if(T=(f<<2)+i|0,z=ue(.5-pn(+(l|0)*3.141592653589793/A)*.5),Ze[T>>2]=z,f=f+1|0,(f|0)>=(v|0))break e;if(l=l+-1|0,!((f|0)<(o|0)))break}}e:{if((f|0)>=(m|0)|(f|0)>=(o|0))break e;for(l=f^-1,v=l+m|0,l=o+l|0,In((f<<2)+i|0,((v>>>0>>0?v:l)<<2)+4|0);;){if(f=f+1|0,(f|0)>=(m|0))break e;if(!((f|0)<(o|0)))break}}m=h+m|0;e:{if((f|0)>=(m|0)|(f|0)>=(o|0))break e;for(A=+(h|0),l=1;;){if(T=(f<<2)+i|0,z=ue(.5-pn(+(l|0)*3.141592653589793/A)*.5),Ze[T>>2]=z,f=f+1|0,(f|0)>=(m|0))break e;if(l=l+1|0,!((f|0)<(o|0)))break}}l=o-h|0;e:{if((f|0)>=(l|0)|(f|0)>=(o|0))break e;for(;;){if(e[(f<<2)+i>>2]=1065353216,f=f+1|0,(f|0)>=(l|0))break e;if(!((f|0)<(o|0)))break}}if((f|0)<(o|0))for(A=+(h|0);T=(f<<2)+i|0,z=ue(.5-pn(+(h|0)*3.141592653589793/A)*.5),Ze[T>>2]=z,h=h+-1|0,f=f+1|0,(f|0)!=(o|0););}function uA(i,o){var n=0,a=0,c=0;if((o|0)>=1)for(a=+(o+-1|0)*.5;c=(+(n|0)-a)/a,Ze[(n<<2)+i>>2]=1-c*c,n=n+1|0,(n|0)!=(o|0););}function Vd(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0;a=Cl(e[2720]);e:{if(!ht(o,e[i+4>>2],e[1391])||!ht(o,e[i>>2],e[1392])||(n=e[i+8>>2],n=e[i>>2]==4?(n+a|0)-e[i+16>>2]|0:n,c=e[1393],n>>>c)||!ht(o,n,c))break e;t:{n:{o:{r:{i:{a:{s:switch(e[i>>2]){case 3:if(!e[i+16>>2])break t;c=e[1367],l=e[1366],h=e[1365],n=0;break a;case 0:if(!ht(o,e[i+16>>2],e[1356])||!ht(o,e[i+20>>2],e[1357])||!ht(o,e[i+24>>2],e[1358])||!ht(o,e[i+28>>2],e[1359])||!ht(o,e[i+32>>2],e[1360])||!ht(o,e[i+36>>2]+-1|0,e[1361])||!ht(o,e[i+40>>2]+-1|0,e[1362])||!ss(o,e[i+48>>2],e[i+52>>2],e[1363]))break e;if(No(o,i+56|0,16))break t;break e;case 1:if(as(o,e[i+8>>2]<<3))break t;break e;case 6:break o;case 5:break r;case 4:break i;case 2:break s;default:break n}if(n=e[1364]>>>3|0,!No(o,i+16|0,n))break e;if(No(o,e[i+20>>2],e[i+8>>2]-n|0))break t;break e}for(;;){if(a=ie(n,24),f=a+e[i+20>>2]|0,!ss(o,e[f>>2],e[f+4>>2],h)||(f=a+e[i+20>>2]|0,!ss(o,e[f+8>>2],e[f+12>>2],l))||!ht(o,e[(a+e[i+20>>2]|0)+16>>2],c))break e;if(n=n+1|0,!(n>>>0>2]))break}break t}if(!jd(o,a)||!No(o,e[2720],a)||!jd(o,e[i+24>>2]))break e;if(!e[i+24>>2])break t;for(n=0;;){if(a=n<<3,!jd(o,e[a+e[i+28>>2]>>2])||(a=a+e[i+28>>2]|0,!No(o,e[a+4>>2],e[a>>2])))break e;if(n=n+1|0,!(n>>>0>2]))break}break t}if(!No(o,i+16|0,e[1378]>>>3|0)||!ss(o,e[i+152>>2],e[i+156>>2],e[1379])||!ht(o,e[i+160>>2]!=0,e[1380])||!as(o,e[1381])||!ht(o,e[i+164>>2],e[1382]))break e;if(!e[i+164>>2])break t;for(l=e[1373]>>>3|0,h=e[1370],f=e[1369],m=e[1368],v=e[1377],A=e[1376],C=e[1375],E=e[1374],N=e[1372],T=e[1371],a=0;;){if(n=e[i+168>>2]+(a<<5)|0,!ss(o,e[n>>2],e[n+4>>2],T)||!ht(o,H[n+8|0],N)||!No(o,n+9|0,l)||!ht(o,K[n+22|0]&1,E)||!ht(o,H[n+22|0]>>>1&1,C)||!as(o,A)||!ht(o,H[n+23|0],v))break e;r:{if(g=n+23|0,!H[g|0])break r;for(z=n+24|0,n=0;;){if(c=e[z>>2]+(n<<4)|0,!ss(o,e[c>>2],e[c+4>>2],m)||!ht(o,H[c+8|0],f))return 0;if(as(o,h)){if(n=n+1|0,n>>>0>=H[g|0])break r;continue}break}return 0}if(a=a+1|0,!(a>>>0>2]))break}break t}if(!ht(o,e[i+16>>2],e[1383])||(n=Cl(e[i+20>>2]),!ht(o,n,e[1384]))||!No(o,e[i+20>>2],n)||(n=Cl(e[i+24>>2]),!ht(o,n,e[1385]))||!No(o,e[i+24>>2],n)||!ht(o,e[i+28>>2],e[1386])||!ht(o,e[i+32>>2],e[1387])||!ht(o,e[i+36>>2],e[1388])||!ht(o,e[i+40>>2],e[1389])||!ht(o,e[i+44>>2],e[1390]))break e;if(No(o,e[i+48>>2],e[i+44>>2]))break t;break e}if(!No(o,e[i+16>>2],e[i+8>>2]))break e}G=1}return G}function Vm(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0;f=be-16|0,be=f;e:{if(!ht(o,e[1394],e[1395])||!ht(o,0,e[1396])||!ht(o,e[i+20>>2]!=0,e[1397]))break e;g=16,m=1,a=o;t:{n:{o:{r:{i:{a:{s:{l:{u:{if(n=e[i>>2],(n|0)<=2047){if((n|0)<=575){if(c=1,(n|0)==192)break t;if((n|0)==256)break a;if((n|0)!=512)break n;c=9;break t}if((n|0)==576)break u;if((n|0)==1024)break i;if((n|0)!=1152)break n;c=3;break t}if((n|0)<=4607){if((n|0)==2048)break r;if((n|0)==2304)break l;if((n|0)!=4096)break n;c=12;break t}if((n|0)<=16383){if((n|0)==4608)break s;if((n|0)!=8192)break n;c=13;break t}if((n|0)==16384)break o;if((n|0)!=32768)break n;c=15;break t}c=2;break t}c=4;break t}c=5;break t}c=8;break t}c=10;break t}c=11;break t}c=14;break t}n=n>>>0<257,g=n?8:16,m=0,c=n?6:7}if(!ht(a,c,e[1398]))break e;t:{n:{o:{r:{i:{a:{s:{l:{if(n=e[i+4>>2],(n|0)<=44099){if((n|0)<=22049){if((n|0)==8e3)break l;if((n|0)!=16e3)break n;a=5;break t}if((n|0)==22050)break s;if((n|0)==24e3)break a;if((n|0)!=32e3)break n;a=8;break t}if((n|0)<=95999){if((n|0)==44100)break i;if((n|0)==48e3)break r;if(a=1,(n|0)==88200)break t;break n}if((n|0)==96e3)break o;if((n|0)!=192e3){if((n|0)!=176400)break n;a=2;break t}a=3;break t}a=4;break t}a=6;break t}a=7;break t}a=9;break t}a=10;break t}a=11;break t}if(l=(n>>>0)%1e3|0,n>>>0<=255e3&&(a=12,h=12,!l))break t;if(!((n>>>0)%10)){a=14,h=14;break t}a=n>>>0<65536?13:0,h=a}if(l=0,!ht(o,a,e[1399]))break e;t:{n:switch(e[i+12>>2]){case 0:a=e[i+8>>2]+-1|0;break t;case 1:a=8;break t;case 2:a=9;break t;case 3:break n;default:break t}a=10}if(!ht(o,a,e[1400])||(a=o,n=Xe(e[i+16>>2]+-8|0,30),n>>>0<=4?n=e[(n<<2)+10464>>2]:n=0,!ht(a,n,e[1401]))||!ht(o,0,e[1402]))break e;t:{if(!e[i+20>>2]){if(zw(o,e[i+24>>2]))break t;break e}if(!Vw(o,e[i+24>>2],e[i+28>>2]))break e}if(!m&&!ht(o,e[i>>2]+-1|0,g))break e;t:{n:switch(h+-12|0){case 0:if(ht(o,ze[i+4>>2]/1e3|0,8))break t;break e;case 1:if(ht(o,e[i+4>>2],16))break t;break e;case 2:break n;default:break t}if(!ht(o,ze[i+4>>2]/10|0,16))break e}if(!jw(o,f+15|0))break e;l=(ht(o,H[f+15|0],e[1403])|0)!=0}return be=f+16|0,l}function fA(i,o,n,a){var c=0;e:{if(!ht(a,e[1417]|(n|0)!=0,e[1416]+(e[1415]+e[1414]|0)|0)||n&&!hu(a,n+-1|0))break e;c=(Bi(a,e[i>>2],o)|0)!=0}return c}function dA(i,o,n,a,c){var f=0;e:{if(!ht(c,e[1419]|(a|0)!=0|e[i+12>>2]<<1,e[1416]+(e[1415]+e[1414]|0)|0)||a&&!hu(c,a+-1|0))break e;t:{if(!e[i+12>>2])break t;for(a=0;;){if(Bi(c,e[((a<<2)+i|0)+16>>2],n)){if(a=a+1|0,a>>>0>2])continue;break t}break}return 0}if(!ht(c,e[i>>2],e[1405]))break e;t:{if(ze[i>>2]>1)break t;if(!ht(c,e[i+4>>2],e[1406]))break e;if(n=e[i>>2],n>>>0>1)break t;if(a=o,o=e[i+8>>2],!Wm(c,e[i+32>>2],a,e[i+12>>2],e[o>>2],e[o+4>>2],e[i+4>>2],(n|0)==1))break e}f=1}return f}function Wm(i,o,n,a,c,f,l,h){var g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0;C=e[(h?5644:5640)>>2],m=e[(h?5632:5628)>>2];e:{t:{if(!l){if(!e[f>>2]){if(!ht(i,e[c>>2],m)||!Tm(i,o,n,e[c>>2]))break t;break e}if(!ht(i,C,m)||!ht(i,e[f>>2],e[1409]))break t;if(!n)break e;for(h=0;;){if(Bi(i,e[(h<<2)+o>>2],e[f>>2])){if(h=h+1|0,(h|0)!=(n|0))continue;break e}break}return 0}for(T=n+a>>>l|0,z=e[1409],n=0;;){h=n,E=T-(v?0:a)|0,n=h+E|0,N=v<<2,g=N+f|0;n:{if(!e[g>>2]){if(A=0,g=c+N|0,!ht(i,e[g>>2],m))break t;if(Tm(i,(h<<2)+o|0,E,e[g>>2]))break n;break t}if(A=0,!ht(i,C,m)||!ht(i,e[g>>2],z))break t;if(h>>>0>=n>>>0)break n;for(;;){if(!Bi(i,e[(h<<2)+o>>2],e[g>>2]))break t;if(h=h+1|0,(h|0)==(n|0))break}}if(A=1,v=v+1|0,!!(v>>>l))break}}return A}return 1}function pA(i,o,n,a,c){var f=0;e:{if(!ht(c,(e[i+12>>2]<<1)+-2|(e[1420]|(a|0)!=0),e[1416]+(e[1415]+e[1414]|0)|0)||a&&!hu(c,a+-1|0))break e;t:{if(!e[i+12>>2])break t;for(a=0;;){if(Bi(c,e[((a<<2)+i|0)+152>>2],n)){if(a=a+1|0,a>>>0>2])continue;break t}break}return 0}if(!ht(c,e[i+16>>2]+-1|0,e[1412])||!Bi(c,e[i+20>>2],e[1413]))break e;t:{if(!e[i+12>>2])break t;for(a=0;;){if(Bi(c,e[((a<<2)+i|0)+24>>2],e[i+16>>2])){if(a=a+1|0,a>>>0>2])continue;break t}break}return 0}if(!ht(c,e[i>>2],e[1405]))break e;t:{if(ze[i>>2]>1)break t;if(!ht(c,e[i+4>>2],e[1406]))break e;if(n=e[i>>2],n>>>0>1)break t;if(a=o,o=e[i+8>>2],!Wm(c,e[i+280>>2],a,e[i+12>>2],e[o>>2],e[o+4>>2],e[i+4>>2],(n|0)==1))break e}f=1}return f}function hA(i,o,n,a,c){i=e[i>>2];e:{if(!ht(c,e[1418]|(a|0)!=0,e[1416]+(e[1415]+e[1414]|0)|0)||a&&!hu(c,a+-1|0))break e;if(!o)return 1;a=0;t:{for(;;){if(!Bi(c,e[i+(a<<2)>>2],n))break t;if(a=a+1|0,(a|0)==(o|0))break}return 1}}return 0}function lr(i,o,n){var a=0,c=0,f=0;if(!n)return 0;a=H[i|0];e:{if(!a)break e;for(;;){t:{if(c=H[o|0],(c|0)!=(a|0)||(n=n+-1|0,!n|!c))break t;if(o=o+1|0,a=H[i+1|0],i=i+1|0,a)continue;break e}break}f=a}return(f&255)-H[o|0]|0}function mA(i){var o=0,n=0;o=be-16|0,be=o,n=-1;e:{if(_w(i)||(Le[e[i+32>>2]](i,o+15|0,1)|0)!=1)break e;n=H[o+15|0]}return be=o+16|0,n}function Wd(i){var o=0,n=0,a=0,c=0;if(e[i+112>>2]=0,e[i+116>>2]=0,a=e[i+8>>2],c=e[i+4>>2],o=a-c|0,n=o>>31,e[i+120>>2]=o,e[i+124>>2]=n,!(((n|0)<0?1:(n|0)<=0?o>>>0>0?0:1:0)|1)){e[i+104>>2]=c;return}e[i+104>>2]=a}function Hn(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0;n=e[i+116>>2],a=n;e:{f=e[i+112>>2];t:{if(n|f&&(n=e[i+124>>2],(n|0)>(a|0)||(n|0)>=(a|0)&&!(ze[i+120>>2]>>0)&&!0))break t;if(f=mA(i),(f|0)>-1)break e}return e[i+104>>2]=0,-1}n=e[i+8>>2],a=e[i+116>>2],c=a;e:{t:{if(o=e[i+112>>2],!(a|o)||(a=(e[i+124>>2]^-1)+c|0,c=e[i+120>>2]^-1,o=c+o|0,o>>>0>>0&&(a=a+1|0),c=o,o=e[i+4>>2],l=n-o|0,h=c>>>0>>0?0:1,l=l>>31,(a|0)>(l|0)||(a|0)>=(l|0)&&h))break t;e[i+104>>2]=c+o;break e}e[i+104>>2]=n}e:{if(!n){n=e[i+4>>2];break e}a=i,o=n,n=e[i+4>>2],o=(o-n|0)+1|0,c=o+e[i+120>>2]|0,i=e[i+124>>2]+(o>>31)|0,e[a+120>>2]=c,e[a+124>>2]=c>>>0>>0?i+1|0:i}return i=n+-1|0,H[i|0]!=(f|0)&&(K[i|0]=f),f}function gA(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0;c=be-16|0,be=c,f=(yt(o),Oe(0)),n=f&2147483647;e:{if(n+-8388608>>>0<=2130706431){a=n,n=n>>>7|0,a=a<<25,n=n+1065353216|0,l=a,n=a>>>0<0?n+1|0:n;break e}if(n>>>0>=2139095040){n=f,a=n>>>7|0,l=n<<25,n=a|2147418112;break e}if(!n){n=0;break e}a=n,n=Kt(n),vr(c,a,0,0,0,n+81|0),h=e[c>>2],g=e[c+4>>2],l=e[c+8>>2],n=e[c+12>>2]^65536|16265-n<<16}e[i>>2]=h,e[i+4>>2]=g,e[i+8>>2]=l,e[i+12>>2]=f&-2147483648|n,be=c+16|0}function jr(i,o){var n=0,a=0,c=0,f=0,l=0,h=0;a=be-16|0,be=a,l=i,h=i;e:{if(!o){o=0,f=0;break e}n=o>>31,c=n+o^n,n=Kt(c),vr(a,c,0,0,0,n+81|0),n=(e[a+12>>2]^65536)+(16414-n<<16)|0,c=0+e[a+8>>2]|0,c>>>0>>0&&(n=n+1|0),o=o&-2147483648|n,n=e[a+4>>2],f=e[a>>2]}e[h>>2]=f,e[l+4>>2]=n,e[i+8>>2]=c,e[i+12>>2]=o,be=a+16|0}function Xt(i,o,n,a,c,f,l,h,g){var m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,bt=0,_t=0,xt=0,Pt=0,It=0,Lt=0,Bt=0,Wt=0,Ht=0,ln=0,On=0,cr=0,zr=0,Vr=0,Zr=0,fi=0,us=0;E=be-96|0,be=E,T=n,v=l,ae=(v&131071)<<15|f>>>17,m=g&65535,ke=m,G=h,v=h,Te=v<<15|l>>>17,N=(c^g)&-2147483648,v=c&65535,C=v,z=a,Qe=v,v=m,Be=(v&131071)<<15|h>>>17,Bt=g>>>16&32767,Wt=c>>>16&32767;e:{t:{if(Wt+-1>>>0<=32765&&(pe=0,Bt+-1>>>0<32766))break t;if(A=c&2147483647,m=A,v=a,!(!a&(m|0)==2147418112?!(o|n):(m|0)==2147418112&a>>>0<0|m>>>0<2147418112)){Se=a,N=c|32768;break e}if(A=g&2147483647,c=A,a=h,!(!a&(c|0)==2147418112?!(f|l):(c|0)==2147418112&a>>>0<0|c>>>0<2147418112)){Se=h,N=g|32768,o=f,n=l;break e}if(!(o|v|(m^2147418112|n))){if(!(a|f|(c|l))){N=2147450880,o=0,n=0;break e}N=N|2147418112,o=0,n=0;break e}if(!(a|f|(c^2147418112|l))){if(a=o|v,c=n|m,o=0,n=0,!(a|c)){N=2147450880;break e}N=N|2147418112;break e}if(!(o|v|(n|m))){o=0,n=0;break e}if(!(a|f|(c|l))){o=0,n=0;break e}if(a=0,(m|0)==65535|m>>>0<65535&&(m=o,g=n,a=!(C|z),h=a<<6,v=Kt(a?o:z)+32|0,o=Kt(a?n:C),o=h+((o|0)==32?v:o)|0,vr(E+80|0,m,g,z,C,o+-15|0),z=e[E+88>>2],T=e[E+84>>2],Qe=e[E+92>>2],a=16-o|0,o=e[E+80>>2]),pe=a,c>>>0>65535)break t;n=!(G|ke),c=n<<6,h=Kt(n?f:G)+32|0,n=Kt(n?l:ke),n=c+((n|0)==32?h:n)|0,g=n,vr(E- -64|0,f,l,G,ke,n+-15|0),f=e[E+76>>2],n=f,h=e[E+72>>2],c=h,c=c<<15,v=e[E+68>>2],Te=v>>>17|c,c=v,f=e[E+64>>2],ae=(c&131071)<<15|f>>>17,Be=(n&131071)<<15|h>>>17,pe=(a-g|0)+16|0}a=ae,G=0,g=oe(a,0,o,G),n=ne,je=n,Ee=f<<15&-32768,f=oe(Ee,0,T,0),c=f+g|0,A=ne+n|0,A=c>>>0>>0?A+1|0:A,n=c,f=0,l=oe(Ee,Ye,o,G),c=f+l|0,m=ne+n|0,m=c>>>0>>0?m+1|0:m,ae=c,l=m,_t=(n|0)==(m|0)&c>>>0>>0|m>>>0>>0,On=oe(a,Ht,T,ln),xt=ne,at=z,f=oe(Ee,Ye,z,0),c=f+On|0,C=ne+xt|0,C=c>>>0>>0?C+1|0:C,cr=c,h=oe(Te,0,o,G),c=c+h|0,f=ne+C|0,Pt=c,f=c>>>0>>0?f+1|0:f,ke=f,h=f,f=(A|0)==(je|0)&n>>>0>>0|A>>>0>>0,c=A,n=c+Pt|0,m=f+h|0,je=n,m=n>>>0>>0?m+1|0:m,c=m,h=n,Vr=oe(a,Ht,z,zr),It=ne,n=Ee,st=Qe|65536,Ee=te,f=oe(n,Ye,st,te),n=f+Vr|0,m=ne+It|0,m=n>>>0>>0?m+1|0:m,Zr=n,v=oe(T,ln,Te,fi),n=n+v|0,te=m,f=m+ne|0,f=n>>>0>>0?f+1|0:f,Lt=n,bt=Be&2147483647|-2147483648,n=oe(bt,0,o,G),o=Lt+n|0,G=f,v=f+ne|0,Ye=o,n=o>>>0>>0?v+1|0:v,m=c+o|0,f=0,o=f+h|0,o>>>0>>0&&(m=m+1|0),Qe=o,Be=m,f=m,h=o+_t|0,h>>>0>>0&&(f=f+1|0),g=f,z=(pe+(Bt+Wt|0)|0)+-16383|0,f=oe(at,zr,Te,fi),o=ne,A=0,v=oe(a,Ht,st,Ee),a=v+f|0,m=ne+o|0,m=a>>>0>>0?m+1|0:m,pe=a,v=a,a=m,m=(o|0)==(a|0)&v>>>0>>0|a>>>0>>0,f=oe(bt,us,T,ln),o=f+v|0,v=ne+a|0,v=o>>>0>>0?v+1|0:v,T=o,f=o,o=v,a=(a|0)==(o|0)&f>>>0>>0|o>>>0>>0,f=m+a|0,f>>>0>>0&&(A=1),v=f,a=o,f=A,_t=v,m=0,v=(C|0)==(ke|0)&Pt>>>0>>0|ke>>>0>>0,C=v+((C|0)==(xt|0)&cr>>>0>>0|C>>>0>>0)|0,C>>>0>>0&&(m=1),A=C,C=C+T|0,v=a+m|0,pe=C,m=C,v=m>>>0>>0?v+1|0:v,a=v,o=(o|0)==(a|0)&m>>>0>>0|a>>>0>>0,v=_t+o|0,v>>>0>>0&&(f=f+1|0),o=v,v=oe(bt,us,st,Ee),o=o+v|0,m=ne+f|0,m=o>>>0>>0?m+1|0:m,A=o,C=oe(bt,us,at,zr),f=ne,T=oe(Te,fi,st,Ee),o=T+C|0,v=ne+f|0,v=o>>>0>>0?v+1|0:v,T=o,o=v,v=(f|0)==(o|0)&T>>>0>>0|o>>>0>>0,f=o+A|0,A=m+v|0,v=f>>>0>>0?A+1|0:A,at=f,m=a+T|0,A=0,o=A+pe|0,o>>>0>>0&&(m=m+1|0),C=o,f=o,o=m,a=(a|0)==(o|0)&f>>>0>>0|o>>>0>>0,f=at+a|0,f>>>0>>0&&(v=v+1|0),T=f,A=o,m=0,f=(te|0)==(G|0)&Lt>>>0>>0|G>>>0>>0,te=f+((te|0)==(It|0)&Zr>>>0>>0|te>>>0>>0)|0,te>>>0>>0&&(m=1),f=te+((n|0)==(G|0)&Ye>>>0>>0|n>>>0>>0)|0,a=n,n=a+C|0,A=f+A|0,A=n>>>0>>0?A+1|0:A,te=n,a=n,n=A,o=(o|0)==(n|0)&a>>>0>>0|n>>>0>>0,a=o+T|0,a>>>0>>0&&(v=v+1|0),o=n,m=v,v=a,f=0,a=(c|0)==(Be|0)&Qe>>>0>>0|Be>>>0>>0,c=a+((c|0)==(ke|0)&je>>>0>>0|c>>>0>>0)|0,c>>>0>>0&&(f=1),a=c+te|0,A=o+f|0,A=a>>>0>>0?A+1|0:A,o=a,c=A,o=(n|0)==(c|0)&o>>>0>>0|c>>>0>>0,n=v+o|0,n>>>0>>0&&(m=m+1|0),o=n,n=m;t:{if(n&65536){z=z+1|0;break t}C=l>>>31|0,m=n<<1|o>>>31,o=o<<1|c>>>31,n=m,m=c<<1|a>>>31,a=a<<1|g>>>31,c=m,v=ae,m=l<<1|v>>>31,ae=v<<1,l=m,v=g<<1|h>>>31,h=h<<1|C,g=v}if((z|0)>=32767){N=N|2147418112,o=0,n=0;break e}t:{if((z|0)<=0){if(f=1-z|0,f>>>0<=127){v=z+127|0,vr(E+48|0,ae,l,h,g,v),vr(E+32|0,a,c,o,n,v),wl(E+16|0,ae,l,h,g,f),wl(E,a,c,o,n,f),ae=(e[E+48>>2]|e[E+56>>2])!=0|(e[E+52>>2]|e[E+60>>2])!=0|(e[E+32>>2]|e[E+16>>2]),l=e[E+36>>2]|e[E+20>>2],h=e[E+40>>2]|e[E+24>>2],g=e[E+44>>2]|e[E+28>>2],a=e[E>>2],c=e[E+4>>2],n=e[E+12>>2],o=e[E+8>>2];break t}o=0,n=0;break e}n=n&65535|z<<16}if(Se=o|Se,N=n|N,!(!h&(g|0)==-2147483648?!(l|ae):(g|0)>-1)){A=N,C=c,o=a+1|0,o>>>0<1&&(C=C+1|0),n=C,a=(c|0)==(n|0)&o>>>0>>0|n>>>0>>0,c=a+Se|0,c>>>0>>0&&(A=A+1|0),Se=c,N=A;break e}if(h|ae|(g^-2147483648|l)){o=a,n=c;break e}C=N,m=c,o=a&1,n=o+a|0,n>>>0>>0&&(m=m+1|0),o=n,n=m,a=(c|0)==(n|0)&o>>>0>>0|n>>>0>>0,c=a+Se|0,c>>>0>>0&&(C=C+1|0),Se=c,N=C}e[i>>2]=o,e[i+4>>2]=n,e[i+8>>2]=Se,e[i+12>>2]=N,be=E+96|0}function Mr(i,o,n,a,c,f,l,h,g){var m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0;A=be-112|0,be=A,C=h,N=g&2147483647,v=n+-1|0,m=o+-1|0,(m|0)!=-1&&(v=v+1|0),E=m,G=(m|0)==-1&(v|0)==-1,T=c&2147483647,m=T,z=a,v=(n|0)==(v|0)&E>>>0>>0|v>>>0>>0,E=a+v|0,E>>>0>>0&&(m=m+1|0),E=E+-1|0,v=m+-1|0,m=E;e:{t:{if(v=(m|0)!=-1?v+1|0:v,!((m|0)==-1&(v|0)==2147418111?G:v>>>0>2147418111)&&(v=l+-1|0,m=f+-1|0,(m|0)!=-1&&(v=v+1|0),E=m,G=(m|0)!=-1|(v|0)!=-1,m=N,v=(l|0)==(v|0)&E>>>0>>0|v>>>0>>0,E=v+C|0,E>>>0>>0&&(m=m+1|0),v=E+-1|0,m=m+-1|0,m=(v|0)!=-1?m+1|0:m,(v|0)==-1&(m|0)==2147418111?G:(m|0)==2147418111&(v|0)!=-1|m>>>0<2147418111))break t;if(!(!z&(T|0)==2147418112?!(o|n):(T|0)==2147418112&z>>>0<0|T>>>0<2147418112)){h=a,g=c|32768,f=o,l=n;break e}if(!(!C&(N|0)==2147418112?!(f|l):(N|0)==2147418112&C>>>0<0|N>>>0<2147418112)){g=g|32768;break e}if(!(o|z|(T^2147418112|n))){m=a,a=!(o^f|a^h|(n^l|c^g^-2147483648)),h=a?0:m,g=a?2147450880:c,f=a?0:o,l=a?0:n;break e}if(!(f|C|(N^2147418112|l)))break e;if(!(o|z|(n|T))){if(f|C|(l|N))break e;f=o&f,l=n&l,h=a&h,g=c&g;break e}if(f|C|(l|N))break t;f=o,l=n,h=a,g=c;break e}v=(C|0)==(z|0)&(N|0)==(T|0)?(n|0)==(l|0)&f>>>0>o>>>0|l>>>0>n>>>0:(N|0)==(T|0)&C>>>0>z>>>0|N>>>0>T>>>0,m=v,T=m?f:o,N=m?l:n,C=m?g:c,z=C,E=m?h:a,m=C&65535,c=v?c:g,te=c,a=v?a:h,G=c>>>16&32767,C=C>>>16&32767,C||(c=!(m|E),h=c<<6,g=Kt(c?T:E)+32|0,c=Kt(c?N:m),c=h+((c|0)==32?g:c)|0,vr(A+96|0,T,N,E,m,c+-15|0),E=e[A+104>>2],T=e[A+96>>2],N=e[A+100>>2],C=16-c|0,m=e[A+108>>2]),f=v?o:f,l=v?n:l,o=a,n=te&65535,G?o=n:(h=o,a=!(o|n),c=a<<6,g=Kt(a?f:o)+32|0,o=Kt(a?l:n),o=c+((o|0)==32?g:o)|0,vr(A+80|0,f,l,h,n,o+-15|0),G=16-o|0,f=e[A+80>>2],l=e[A+84>>2],a=e[A+88>>2],o=e[A+92>>2]),n=a,v=o<<3|n>>>29,h=n<<3|l>>>29,g=v|524288,o=E,a=m<<3|o>>>29,c=o<<3|N>>>29,E=a,v=z^te,o=f,m=l<<3|o>>>29,o=o<<3,n=m,f=C-G|0,a=o;t:{if(!f)break t;if(f>>>0>127){h=0,g=0,m=0,a=1;break t}vr(A- -64|0,o,n,h,g,128-f|0),wl(A+48|0,o,n,h,g,f),h=e[A+56>>2],g=e[A+60>>2],m=e[A+52>>2],a=e[A+48>>2]|((e[A+64>>2]|e[A+72>>2])!=0|(e[A+68>>2]|e[A+76>>2])!=0)}l=m,E=E|524288,o=T,m=N<<3|o>>>29,n=o<<3;t:{if((v|0)<-1||(v|0)<=-1||!1){if(N=a,o=n-a|0,T=c-h|0,a=(l|0)==(m|0)&n>>>0>>0|m>>>0>>0,f=T-a|0,n=m-((n>>>0>>0)+l|0)|0,l=(E-((c>>>0>>0)+g|0)|0)-(T>>>0>>0)|0,!(o|f|(n|l))){f=0,l=0,h=0,g=0;break e}if(l>>>0>524287)break t;h=o,a=!(f|l),c=a<<6,g=Kt(a?o:f)+32|0,o=Kt(a?n:l),o=c+((o|0)==32?g:o)|0,o=o+-12|0,vr(A+32|0,h,n,f,l,o),C=C-o|0,f=e[A+40>>2],l=e[A+44>>2],o=e[A+32>>2],n=e[A+36>>2];break t}if(v=l+m|0,o=a,n=o+n|0,n>>>0>>0&&(v=v+1|0),o=n,n=v,l=(l|0)==(n|0)&o>>>0>>0|n>>>0>>0,v=g+E|0,a=c+h|0,a>>>0>>0&&(v=v+1|0),f=a,c=l+a|0,a=v,a=c>>>0>>0?a+1|0:a,f=c,l=a,!(a&1048576))break t;o=o&1|((n&1)<<31|o>>>1),n=f<<31|n>>>1,C=C+1|0,f=(l&1)<<31|f>>>1,l=l>>>1|0}if(h=0,m=z&-2147483648,(C|0)>=32767){g=m|2147418112,f=0,l=0;break e}c=0;t:{if((C|0)>0){c=C;break t}vr(A+16|0,o,n,f,l,C+127|0),wl(A,o,n,f,l,1-C|0),o=e[A>>2]|((e[A+16>>2]|e[A+24>>2])!=0|(e[A+20>>2]|e[A+28>>2])!=0),n=e[A+4>>2],f=e[A+8>>2],l=e[A+12>>2]}h=h|((l&7)<<29|f>>>3),c=m|l>>>3&65535|c<<16,m=f<<29,a=0,f=m,l=(n&7)<<29|o>>>3|a,m=c,a=n>>>3|f,v=a,c=o&7,o=c>>>0>4,n=o+l|0,n>>>0>>0&&(v=v+1|0),o=n,n=v,a=(a|0)==(n|0)&o>>>0>>0|n>>>0>>0,f=a+h|0,f>>>0>>0&&(m=m+1|0),c=(c|0)==4,a=c?o&1:0,g=m,h=f,c=0,m=n+c|0,n=o+a|0,n>>>0>>0&&(m=m+1|0),f=n,o=n,l=m,o=(c|0)==(m|0)&o>>>0>>0|m>>>0>>0,n=h+o|0,n>>>0>>0&&(g=g+1|0),h=n}e[i>>2]=f,e[i+4>>2]=l,e[i+8>>2]=h,e[i+12>>2]=g,be=A+112|0}function Qo(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0;f=be-16|0,be=f,qe(+o),g=Oe(1)|0,l=Oe(0)|0,h=g&2147483647,n=h,c=n+-1048576|0,a=l,a>>>0<0&&(c=c+1|0);e:{if((c|0)==2145386495|c>>>0<2145386495){h=a<<28,c=(n&15)<<28|a>>>4,n=(n>>>4|0)+1006632960|0,a=c,n=a>>>0<0?n+1|0:n;break e}if((n|0)==2146435072&a>>>0>=0|n>>>0>2146435072){h=l<<28,c=l,n=g,l=n>>>4|0,a=(n&15)<<28|c>>>4,n=l|2147418112;break e}if(!(n|a)){h=0,a=0,n=0;break e}c=n,n=(n|0)==1&a>>>0<0|n>>>0<1?Kt(l)+32|0:Kt(n),vr(f,a,c,0,0,n+49|0),m=e[f>>2],h=e[f+4>>2],a=e[f+8>>2],n=e[f+12>>2]^65536|15372-n<<16}e[i>>2]=m,e[i+4>>2]=h,e[i+8>>2]=a,e[i+12>>2]=g&-2147483648|n,be=f+16|0}function va(i,o,n,a,c,f,l,h){var g=0,m=0,v=0,A=0,C=0,E=0;m=1,g=a&2147483647,C=g,v=n;e:{if((!n&(g|0)==2147418112?i|o:(g|0)==2147418112&n>>>0>0|g>>>0>2147418112)||(A=h&2147483647,E=A,g=l,!l&(A|0)==2147418112?c|f:(A|0)==2147418112&l>>>0>0|A>>>0>2147418112))break e;if(!(i|c|(g|v)|(o|f|(C|E))))return 0;if(v=a&h,(v|0)>0||(v|0)>=0&&!((n&l)>>>0<0)&&!0){if(m=-1,(n|0)==(l|0)&(a|0)==(h|0)?(o|0)==(f|0)&i>>>0>>0|o>>>0>>0:(a|0)<(h|0)||(a|0)<=(h|0)&&!(n>>>0>=l>>>0)&&!0)break e;return(i^c|n^l)!=0|(o^f|a^h)!=0}if(m=-1,(n|0)==(l|0)&(a|0)==(h|0)?(o|0)==(f|0)&i>>>0>c>>>0|o>>>0>f>>>0:(a|0)>(h|0)||(a|0)>=(h|0)&&!(n>>>0<=l>>>0)&&!0)break e;m=(i^c|n^l)!=0|(o^f|a^h)!=0}return m}function Um(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0;h=-1,f=a&2147483647,g=f,l=n;e:{if((!n&(f|0)==2147418112?i|o:(f|0)==2147418112&n>>>0>0|f>>>0>2147418112)||(f=c&2147483647,m=f,(f|0)!=2147418112&&f>>>0>2147418112))break e;if(!(i|l|(o|(g|m))))return 0;if(l=a&c,(l|0)>0||(l|0)>=0||!1){if(!n&(a|0)==(c|0)?!o&i>>>0<0|o>>>0<0:(a|0)<(c|0)||(a|0)<=(c|0)&&!(n>>>0>=0)&&!0)break e;return(i|n)!=0|(o|a^c)!=0}if(!n&(a|0)==(c|0)?!o&i>>>0>0|o>>>0>0:(a|0)>(c|0)||(a|0)>=(c|0)&&!(n>>>0<=0)&&!0)break e;h=(i|n)!=0|(o|a^c)!=0}return h}function Hm(i,o,n,a,c,f,l,h,g){e[i>>2]=o,e[i+4>>2]=n,e[i+8>>2]=a,e[i+12>>2]=c&65535|(g>>>16&32768|c>>>16&32767)<<16}function cs(i,o){var n=0,a=0,c=0,f=0,l=0,h=0;n=be-16|0,be=n,l=i,h=i;e:{if(!o){o=0,a=0;break e}a=o,o=Kt(o)^31,vr(n,a,0,0,0,112-o|0),o=(e[n+12>>2]^65536)+(o+16383<<16)|0,c=0+e[n+8>>2]|0,c>>>0>>0&&(o=o+1|0),f=e[n+4>>2],a=e[n>>2]}e[h>>2]=a,e[l+4>>2]=f,e[i+8>>2]=c,e[i+12>>2]=o,be=n+16|0}function Ud(i,o,n,a,c,f,l,h,g){var m=0;m=be-16|0,be=m,Mr(m,o,n,a,c,f,l,h,g^-2147483648),o=e[m+4>>2],e[i>>2]=e[m>>2],e[i+4>>2]=o,o=e[m+12>>2],e[i+8>>2]=e[m+8>>2],e[i+12>>2]=o,be=m+16|0}function Gm(i,o,n,a,c,f){var l=0;l=be-80|0,be=l;e:{if((f|0)>=16384){if(Xt(l+32|0,o,n,a,c,0,0,0,2147352576),a=e[l+40>>2],c=e[l+44>>2],o=e[l+32>>2],n=e[l+36>>2],(f|0)<32767){f=f+-16383|0;break e}Xt(l+16|0,o,n,a,c,0,0,0,2147352576),f=((f|0)<49149?f:49149)+-32766|0,a=e[l+24>>2],c=e[l+28>>2],o=e[l+16>>2],n=e[l+20>>2];break e}if((f|0)>-16383)break e;if(Xt(l- -64|0,o,n,a,c,0,0,0,65536),a=e[l+72>>2],c=e[l+76>>2],o=e[l+64>>2],n=e[l+68>>2],(f|0)>-32765){f=f+16382|0;break e}Xt(l+48|0,o,n,a,c,0,0,0,65536),f=((f|0)>-49146?f:-49146)+32764|0,a=e[l+56>>2],c=e[l+60>>2],o=e[l+48>>2],n=e[l+52>>2]}Xt(l,o,n,a,c,0,0,0,f+16383<<16),o=e[l+12>>2],e[i+8>>2]=e[l+8>>2],e[i+12>>2]=o,o=e[l+4>>2],e[i>>2]=e[l>>2],e[i+4>>2]=o,be=l+80|0}function Yo(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0;f=oe(o,n,0,0),l=ne,h=oe(0,0,a,c),f=f+h|0,l=ne+l|0,m=oe(c,0,n,0),g=f+m|0,f=ne+(f>>>0>>0?l+1|0:l)|0,l=oe(a,0,o,0),v=ne,h=oe(n,0,a,0),a=v+h|0,n=g>>>0>>0?f+1|0:f,f=ne,f=a>>>0>>0?f+1|0:f,g=f+g|0,g>>>0>>0&&(n=n+1|0),o=oe(o,0,c,0)+a|0,c=ne,a=o>>>0>>0?c+1|0:c,c=g+a|0,c>>>0>>0&&(n=n+1|0),e[i+8>>2]=c,e[i+12>>2]=n,e[i>>2]=l,e[i+4>>2]=o}function Qm(i,o,n,a,c,f,l,h,g){var m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,bt=0,_t=0,xt=0,Pt=0,It=0,Lt=0,Bt=0,Wt=0,Ht=0,ln=0,On=0;E=be-192|0,be=E,at=h,_t=g&65535,z=a,N=c&65535,Ye=(c^g)&-2147483648,G=g>>>16&32767;e:{ae=c>>>16&32767;t:{n:{if(ae+-1>>>0<=32765&&G+-1>>>0<32766)break n;if(v=c&2147483647,A=v,m=a,!(!m&(v|0)==2147418112?!(o|n):(v|0)==2147418112&m>>>0<0|v>>>0<2147418112)){xt=a,Ye=c|32768;break t}if(v=g&2147483647,c=v,a=h,!(!a&(v|0)==2147418112?!(f|l):(v|0)==2147418112&a>>>0<0|v>>>0<2147418112)){xt=h,Ye=g|32768,o=f,n=l;break t}if(!(o|m|(A^2147418112|n))){if(!(a|f|(c^2147418112|l))){o=0,n=0,Ye=2147450880;break t}Ye=Ye|2147418112,o=0,n=0;break t}if(!(a|f|(c^2147418112|l))){o=0,n=0;break t}if(!(o|m|(n|A)))break e;if(!(a|f|(c|l))){Ye=Ye|2147418112,o=0,n=0;break t}if(v=0,(A|0)==65535|A>>>0<65535&&(g=o,a=!(N|z),h=a<<6,m=Kt(a?o:z)+32|0,o=Kt(a?n:N),o=h+((o|0)==32?m:o)|0,vr(E+176|0,g,n,z,N,o+-15|0),v=16-o|0,z=e[E+184>>2],N=e[E+188>>2],n=e[E+180>>2],o=e[E+176>>2]),c>>>0>65535)break n;a=!(at|_t),c=a<<6,h=Kt(a?f:at)+32|0,a=Kt(a?l:_t),a=c+((a|0)==32?h:a)|0,vr(E+160|0,f,l,at,_t,a+-15|0),v=(a+v|0)+-16|0,at=e[E+168>>2],_t=e[E+172>>2],f=e[E+160>>2],l=e[E+164>>2]}c=_t|65536,bt=c,Wt=at,a=at,C=c<<15|a>>>17,a=a<<15|l>>>17,h=-102865788-a|0,c=C,m=c,g=1963258675-(m+(4192101508>>0)|0)|0,Yo(E+144|0,a,m,h,g),m=e[E+152>>2],Yo(E+128|0,0-m|0,0-(e[E+156>>2]+(0>>0)|0)|0,h,g),h=e[E+136>>2],g=h<<1|e[E+132>>2]>>>31,h=e[E+140>>2]<<1|h>>>31,Yo(E+112|0,g,h,a,c),m=h,h=e[E+120>>2],Yo(E+96|0,g,m,0-h|0,0-(e[E+124>>2]+(0>>0)|0)|0),h=e[E+104>>2],A=e[E+108>>2]<<1|h>>>31,g=h<<1|e[E+100>>2]>>>31,Yo(E+80|0,g,A,a,c),h=e[E+88>>2],Yo(E- -64|0,g,A,0-h|0,0-(e[E+92>>2]+(0>>0)|0)|0),h=e[E+72>>2],g=h<<1|e[E+68>>2]>>>31,h=e[E+76>>2]<<1|h>>>31,Yo(E+48|0,g,h,a,c),m=h,h=e[E+56>>2],Yo(E+32|0,g,m,0-h|0,0-(e[E+60>>2]+(0>>0)|0)|0),h=e[E+40>>2],A=e[E+44>>2]<<1|h>>>31,g=h<<1|e[E+36>>2]>>>31,Yo(E+16|0,g,A,a,c),h=e[E+24>>2],Yo(E,g,A,0-h|0,0-(e[E+28>>2]+(0>>0)|0)|0),Pt=(ae-G|0)+v|0,h=e[E+8>>2],m=e[E+12>>2]<<1|h>>>31,g=h<<1,v=m+-1|0,g=(e[E+4>>2]>>>31|g)+-1|0,(g|0)!=-1&&(v=v+1|0),h=g,m=0,ke=m,pe=c,A=0,C=oe(h,m,c,A),c=ne,ae=c,Se=v,G=0,m=a,h=oe(v,G,m,0),a=h+C|0,v=ne+c|0,v=a>>>0>>0?v+1|0:v,h=a,a=v,T=oe(g,ke,m,T),c=0+T|0,v=h,m=v+ne|0,m=c>>>0>>0?m+1|0:m,T=c,c=m,m=(v|0)==(m|0)&T>>>0>>0|m>>>0>>0,v=(a|0)==(ae|0)&v>>>0>>0|a>>>0>>0,h=a,a=oe(Se,G,pe,A)+a|0,A=v+ne|0,A=a>>>0>>0?A+1|0:A,h=a,a=m+a|0,m=A,je=a,h=a>>>0>>0?m+1|0:m,a=l,Te=(a&131071)<<15|f>>>17,pe=oe(g,ke,Te,0),a=ne,Ee=a,v=f,te=v<<15&-32768,A=oe(Se,G,te,0),m=A+pe|0,v=ne+a|0,v=m>>>0>>0?v+1|0:v,a=v,Be=oe(g,ke,te,Be),te=0+Be|0,v=m+ne|0,v=te>>>0>>0?v+1|0:v,v=(m|0)==(v|0)&te>>>0>>0|v>>>0>>0,m=(a|0)==(Ee|0)&m>>>0>>0|a>>>0>>0,C=a,a=oe(Se,G,Te,Qe)+a|0,A=m+ne|0,A=a>>>0>>0?A+1|0:A,m=a,a=v+m|0,C=a>>>0>>0?A+1|0:A,v=a,a=T+a|0,m=C+c|0,m=a>>>0>>0?m+1|0:m,ae=a,v=h,pe=m,a=(c|0)==(m|0)&a>>>0>>0|m>>>0>>0,c=a+je|0,c>>>0>>0&&(v=v+1|0),m=v,a=(ae|0)!=0|(pe|0)!=0,c=c+a|0,c>>>0>>0&&(m=m+1|0),v=c,c=0-v|0,T=0,h=oe(c,T,g,ke),a=ne,Ee=a,te=oe(Se,G,c,T),c=ne,je=c,Te=0-((0>>0)+m|0)|0,m=0,T=oe(g,ke,Te,m),C=T+te|0,v=ne+c|0,v=C>>>0>>0?v+1|0:v,c=C,T=0+h|0,A=a+c|0,A=T>>>0>>0?A+1|0:A,C=T,a=A,A=(Ee|0)==(a|0)&C>>>0>>0|a>>>0>>0,C=(v|0)==(je|0)&c>>>0>>0|v>>>0>>0,c=oe(Se,G,Te,m)+v|0,m=C+ne|0,m=c>>>0>>0?m+1|0:m,h=c,c=A+c|0,c>>>0>>0&&(m=m+1|0),Te=c,h=m,c=0-ae|0,Qe=0-((0>>0)+pe|0)|0,ae=0,je=oe(Qe,ae,g,ke),te=ne,pe=c,Be=0,m=oe(c,Be,Se,G),c=m+je|0,v=ne+te|0,A=c,c=c>>>0>>0?v+1|0:v,pe=oe(g,ke,pe,Be),g=0+pe|0,m=A,v=m+ne|0,v=g>>>0>>0?v+1|0:v,v=(m|0)==(v|0)&g>>>0>>0|v>>>0>>0,m=(c|0)==(te|0)&m>>>0>>0|c>>>0>>0,g=c,c=oe(Qe,ae,Se,G)+c|0,C=m+ne|0,C=c>>>0>>0?C+1|0:C,g=c,c=v+c|0,m=C,m=c>>>0>>0?m+1|0:m,g=c,c=T+c|0,m=m+a|0,m=c>>>0>>0?m+1|0:m,g=c,v=h,c=m,a=(a|0)==(m|0)&g>>>0>>0|m>>>0>>0,h=a+Te|0,h>>>0>>0&&(v=v+1|0),a=h,m=v,C=a,A=c+-1|0,a=g+-2|0,a>>>0<4294967294&&(A=A+1|0),h=a,v=a,a=A,c=(c|0)==(a|0)&v>>>0>>0|a>>>0>>0,g=C+c|0,g>>>0>>0&&(m=m+1|0),c=g+-1|0,v=m+-1|0,v=(c|0)!=-1?v+1|0:v,g=0,Se=g,G=c,m=z,te=m<<2|n>>>30,Te=0,C=oe(c,g,te,Te),g=ne,T=g,A=g,g=n,Qe=(g&1073741823)<<2|o>>>30,Be=v,g=0,m=oe(Qe,0,v,g),c=m+C|0,A=ne+A|0,A=c>>>0>>0?A+1|0:A,m=c,pe=A,Ee=(T|0)==(A|0)&m>>>0>>0|A>>>0>>0,C=A,A=0,T=A,v=0,je=a,st=((N&1073741823)<<2|z>>>30)&-262145|262144,c=oe(a,A,st,0),a=c+m|0,C=ne+C|0,C=a>>>0>>0?C+1|0:C,z=a,c=C,a=(pe|0)==(c|0)&a>>>0>>0|c>>>0>>0,m=a+Ee|0,m>>>0>>0&&(v=1),A=oe(Be,g,st,It),a=A+m|0,m=ne+v|0,v=a>>>0>>0?m+1|0:m,A=oe(G,Se,st,It),m=ne,n=a,N=oe(te,Te,Be,g),a=N+A|0,C=ne+m|0,C=a>>>0>>0?C+1|0:C,N=a,a=C,C=(m|0)==(a|0)&N>>>0>>0|a>>>0>>0,A=n+a|0,v=v+C|0,m=A,C=m>>>0>>0?v+1|0:v,n=m,A=c+N|0,v=0,a=v+z|0,a>>>0>>0&&(A=A+1|0),N=a,m=a,a=A,c=(c|0)==(a|0)&m>>>0>>0|a>>>0>>0,m=n+c|0,m>>>0>>0&&(C=C+1|0),Ht=m,c=N,v=a,z=oe(Qe,ae,je,T),A=ne,pe=h,Ee=oe(h,0,te,Te),h=Ee+z|0,m=ne+A|0,m=h>>>0>>0?m+1|0:m,ke=h,h=m,z=(A|0)==(m|0)&ke>>>0>>0|m>>>0>>0,A=m,ln=c,m=0,On=z,Lt=o<<2&-4,n=0,z=oe(G,Se,Lt,n),c=z+ke|0,A=ne+A|0,A=c>>>0>>0?A+1|0:A,Ee=c,z=c,c=A,h=(h|0)==(c|0)&z>>>0>>0|c>>>0>>0,A=On+h|0,A>>>0>>0&&(m=1),h=ln+A|0,v=m+v|0,v=h>>>0>>0?v+1|0:v,z=h,A=C,h=v,a=(a|0)==(v|0)&z>>>0>>0|v>>>0>>0,m=a+Ht|0,m>>>0>>0&&(A=A+1|0),ln=m,N=z,ke=h,Ht=oe(Be,g,Lt,n),Be=ne,g=oe(st,It,pe,Bt),a=g+Ht|0,C=ne+Be|0,C=a>>>0>>0?C+1|0:C,st=a,m=oe(te,Te,je,T),a=a+m|0,g=C,v=g+ne|0,v=a>>>0>>0?v+1|0:v,te=a,C=oe(G,Se,Qe,ae),a=a+C|0,m=ne+v|0,G=a,m=a>>>0>>0?m+1|0:m,Se=0,C=A,a=m,m=(m|0)==(v|0)&G>>>0>>0|m>>>0>>0,A=(g|0)==(Be|0)&st>>>0>>0|g>>>0>>0,g=(g|0)==(v|0)&te>>>0>>0|v>>>0>>0,v=A+g|0,g=m+v|0,v=g,m=a|0,g=m+N|0,v=(v|Se)+ke|0,v=g>>>0>>0?v+1|0:v,ke=g,N=v,h=(h|0)==(v|0)&g>>>0>>0|v>>>0>>0,g=h+ln|0,g>>>0>>0&&(C=C+1|0),Te=g,g=C,C=ke,z=N,Se=Ee,je=oe(je,T,Lt,n),T=ne,m=oe(Qe,ae,pe,Bt),h=m+je|0,A=ne+T|0,A=h>>>0>>0?A+1|0:A,v=A,ae=v,A=0,m=(v|0)==(T|0)&h>>>0>>0|v>>>0>>0,h=v+Se|0,v=(m|A)+c|0,v=h>>>0>>0?v+1|0:v,ae=h,m=h,h=v,m=(c|0)==(v|0)&m>>>0>>0|v>>>0>>0,Ee=C,c=m,m=v+G|0,C=0,a=C+ae|0,a>>>0>>0&&(m=m+1|0),a=(h|0)==(m|0)&a>>>0>>0|m>>>0>>0,c=c+a|0,c>>>0>>0&&(A=1),a=Ee+c|0,C=A+z|0,h=a,m=g,C=a>>>0>>0?C+1|0:C,g=C,a=(N|0)==(g|0)&a>>>0>>0|g>>>0>>0,c=a+Te|0,c>>>0>>0&&(m=m+1|0),a=c,c=m;n:{if((m|0)==131071|m>>>0<131071){Se=0,N=f,te=0,v=oe(h,Se,N,te),A=ne,m=o<<17,o=0,n=(v|0)!=0|(A|0)!=0,z=o-n|0,st=m-(o>>>0>>0)|0,ae=0-v|0,T=0-((0>>0)+A|0)|0,n=0,Te=oe(g,n,N,te),o=ne,Qe=o,G=0,v=oe(h,Se,l,G),m=v+Te|0,A=ne+o|0,A=m>>>0>>0?A+1|0:A,o=m,v=m,pe=0,m=pe,Ee=v,m=(v|0)==(T|0)&ae>>>0>>0|T>>>0>>0,ke=z-m|0,st=st-(z>>>0>>0)|0,m=oe(a,0,N,te),v=ne,N=oe(h,Se,at,0),m=N+m|0,C=ne+v|0,C=m>>>0>>0?C+1|0:C,N=oe(g,n,l,G),m=N+m|0,v=ne+C|0,v=m>>>0>>0?v+1|0:v,C=v,v=(A|0)==(Qe|0)&o>>>0>>0|A>>>0>>0,o=A+m|0,v=v+C|0,v=o>>>0>>0?v+1|0:v,A=o,o=v,m=oe(h,g,bt,0),N=ne,z=A,A=oe(f,l,c,0),v=A+m|0,m=ne+N|0,m=v>>>0>>0?m+1|0:m,C=oe(a,c,l,G),A=C+v|0,m=oe(g,n,at,_t),n=m+A|0,m=n,v=0,n=z+v|0,m=o+m|0,o=n,z=ke-o|0,n=st-((ke>>>0>>0)+(o>>>0>>0?m+1|0:m)|0)|0,Pt=Pt+-1|0,at=ae-pe|0,o=T-((ae>>>0>>0)+Ee|0)|0;break n}G=g>>>1|0,A=0,C=o<<16,v=a<<31,h=(g&1)<<31|h>>>1,g=g>>>1|v,Qe=0,Be=0,o=oe(h,Qe,f,Be),m=ne,v=m,m=(o|0)!=0|(m|0)!=0,N=n-m|0,Bt=C-(n>>>0>>0)|0,ke=0-o|0,Se=0-((0>>0)+v|0)|0,C=Se,T=0,pe=oe(h,Qe,l,T),o=ne,It=o,Ee=G|a<<31,Lt=c<<31|a>>>1|A,v=Ee,G=oe(v,0,f,Be),n=G+pe|0,m=ne+o|0,m=n>>>0>>0?m+1|0:m,o=m,m=n,je=m,te=0,m=(m|0)==(C|0)&ke>>>0>>0|C>>>0>>0,Te=N-m|0,Bt=Bt-(N>>>0>>0)|0,v=oe(l,T,v,A),A=ne,m=c,C=m>>>1|0,G=(m&1)<<31|a>>>1,N=C,C=oe(G,0,f,Be),m=C+v|0,v=ne+A|0,v=m>>>0>>0?v+1|0:v,C=oe(h,Qe,at,0),A=C+m|0,m=ne+v|0,v=A,A=v>>>0>>0?m+1|0:m,m=(o|0)==(It|0)&n>>>0>>0|o>>>0>>0,n=o,o=o+v|0,A=m+A|0,m=o,o=m>>>0>>0?A+1|0:A,n=oe(h,g,bt,0),v=ne,A=m,a=oe(f,l,c>>>1|0,0),n=a+n|0,m=ne+v|0,m=n>>>0>>0?m+1|0:m,a=oe(l,T,G,N),n=a+n|0,m=ne+m|0,a=oe(Ee,Lt,at,_t),n=a+n|0,m=n,a=0,n=A+a|0,v=o+m|0,o=n,z=Te-o|0,n=Bt-((Te>>>0>>0)+(o>>>0>>0?v+1|0:v)|0)|0,a=G,c=N,at=ke-te|0,o=Se-((ke>>>0>>0)+je|0)|0}if((Pt|0)>=16384){Ye=Ye|2147418112,o=0,n=0;break t}if(A=Pt+16383|0,(Pt|0)<=-16383){n:{if(A||(A=g,N=at,C=o<<1|N>>>31,m=N<<1,l=(l|0)==(C|0)&m>>>0>f>>>0|C>>>0>l>>>0,m=c&65535,f=z,C=n<<1|f>>>31,n=f<<1|o>>>31,c=n,o=C,o=(c|0)==(Wt|0)&(o|0)==(bt|0)?l:(bt|0)==(o|0)&c>>>0>Wt>>>0|o>>>0>bt>>>0,n=o+h|0,n>>>0>>0&&(A=A+1|0),o=n,c=o,n=A,c=a+((g|0)==(A|0)&c>>>0>>0|A>>>0>>0)|0,c>>>0>>0&&(m=m+1|0),a=m,!(m&65536)))break n;xt=c|xt,Ye=a|Ye;break t}o=0,n=0;break t}v=g,c=c&65535,N=at,m=o<<1|N>>>31,N=N<<1,l=(l|0)==(m|0)&N>>>0>=f>>>0|m>>>0>l>>>0,f=z,m=n<<1|f>>>31,n=f<<1|o>>>31,o=(n|0)==(Wt|0)&(m|0)==(bt|0)?l:(bt|0)==(m|0)&n>>>0>=Wt>>>0|m>>>0>bt>>>0,n=o+h|0,n>>>0>>0&&(v=v+1|0),o=n,n=v,f=a,a=((g|0)==(v|0)&o>>>0>>0|v>>>0>>0)+a|0,v=A<<16|c,xt=a|xt,Ye=Ye|(a>>>0>>0?v+1|0:v)}e[i>>2]=o,e[i+4>>2]=n,e[i+8>>2]=xt,e[i+12>>2]=Ye,be=E+192|0;return}e[i>>2]=0,e[i+4>>2]=0,o=!(a|f|(c|l)),e[i+8>>2]=o?0:xt,e[i+12>>2]=o?2147450880:Ye,be=E+192|0}function bA(i,o,n,a){var c=0,f=0;f=a&65535,a=a>>>16&32767;e:{if((a|0)!=32767){if(c=4,a)break e;return i|n|(o|f)?3:2}c=!(i|n|(o|f))}return c}function Ym(i,o,n,a,c,f,l,h,g){var m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0;m=be-128|0,be=m;e:{t:{n:{if(!va(f,l,h,g,0,0,0,0)||(v=bA(f,l,h,g),ae=c>>>16|0,N=ae&32767,(N|0)==32767))break n;if(v)break t}Xt(m+16|0,o,n,a,c,f,l,h,g),c=e[m+16>>2],a=e[m+20>>2],n=e[m+24>>2],o=e[m+28>>2],Qm(m,c,a,n,o,c,a,n,o),a=e[m+8>>2],c=e[m+12>>2],h=e[m>>2],g=e[m+4>>2];break e}if(A=c&65535|N<<16,C=A,E=a,T=h,te=g>>>16&32767,v=g&65535|te<<16,(va(o,n,E,C,f,l,h,v)|0)<=0){if(va(o,n,E,C,f,l,T,v)){h=o,g=n;break e}Xt(m+112|0,o,n,a,c,0,0,0,0),a=e[m+120>>2],c=e[m+124>>2],h=e[m+112>>2],g=e[m+116>>2];break e}if(N?(g=n,h=o):(Xt(m+96|0,o,n,E,C,0,0,0,1081540608),h=e[m+108>>2],C=h,E=e[m+104>>2],N=(h>>>16|0)+-120|0,g=e[m+100>>2],h=e[m+96>>2]),te||(Xt(m+80|0,f,l,T,v,0,0,0,1081540608),f=e[m+92>>2],v=f,T=e[m+88>>2],te=(v>>>16|0)+-120|0,l=e[m+84>>2],f=e[m+80>>2]),ke=T,A=T,T=E-A|0,C=C&65535|65536,pe=v&65535|65536,v=(l|0)==(g|0)&h>>>0>>0|g>>>0>>0,A=(C-(pe+(E>>>0>>0)|0)|0)-(T>>>0>>0)|0,G=T-v|0,z=(A|0)>-1?1:0,T=h-f|0,v=g-((h>>>0>>0)+l|0)|0,(N|0)>(te|0)){for(;;){t:{if(z&1){if(!(T|G|(v|A))){Xt(m+32|0,o,n,a,c,0,0,0,0),a=e[m+40>>2],c=e[m+44>>2],h=e[m+32>>2],g=e[m+36>>2];break e}h=G,z=A<<1|h>>>31,G=h<<1,A=z,z=0,h=v>>>31|0;break t}A=0,v=g,G=g>>>31|0,T=h,h=E,z=C<<1|h>>>31,h=h<<1}if(E=h|G,g=E,h=ke,G=g-h|0,C=A|z,A=C-((g>>>0>>0)+pe|0)|0,h=T,z=v<<1|h>>>31,h=h<<1,g=z,v=(l|0)==(g|0)&h>>>0>>0|g>>>0>>0,A=A-(G>>>0>>0)|0,G=G-v|0,z=(A|0)>-1?1:0,T=h-f|0,v=g-((h>>>0>>0)+l|0)|0,N=N+-1|0,!((N|0)>(te|0)))break}N=te}t:{if(!z||(h=T,E=G,g=v,C=A,h|E|(g|C)))break t;Xt(m+48|0,o,n,a,c,0,0,0,0),a=e[m+56>>2],c=e[m+60>>2],h=e[m+48>>2],g=e[m+52>>2];break e}if((C|0)==65535|C>>>0<65535)for(;a=g>>>31|0,o=0,N=N+-1|0,A=g<<1|h>>>31,h=h<<1,g=A,n=E,z=C<<1|n>>>31,E=n<<1|a,o=o|z,C=o,!!((o|0)==65536&E>>>0<0|o>>>0<65536););if(o=ae&32768,(N|0)<=0){Xt(m- -64|0,h,g,E,C&65535|(o|N+120)<<16,0,0,0,1065811968),a=e[m+72>>2],c=e[m+76>>2],h=e[m+64>>2],g=e[m+68>>2];break e}a=E,c=C&65535|(o|N)<<16}e[i>>2]=h,e[i+4>>2]=g,e[i+8>>2]=a,e[i+12>>2]=c,be=m+128|0}function vA(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0;for(f=be-48|0,be=f,c=o+4|0,h=e[2644],v=e[2641];;){n=e[o+4>>2];e:{if(n>>>0>2]){e[c>>2]=n+1,n=H[n|0];break e}n=Hn(o)}if(!((n|0)==32|n+-9>>>0<5))break}l=1;e:{t:switch(n+-43|0){case 0:case 2:break t;default:break e}if(l=(n|0)==45?-1:1,n=e[o+4>>2],n>>>0>2]){e[c>>2]=n+1,n=H[n|0];break e}n=Hn(o)}e:{t:{n:{for(;;){if(K[a+10484|0]==(n|32)){o:{if(a>>>0>6)break o;if(n=e[o+4>>2],n>>>0>2]){e[c>>2]=n+1,n=H[n|0];break o}n=Hn(o)}if(a=a+1|0,(a|0)!=8)continue;break n}break}if((a|0)!=3){if((a|0)==8)break n;if(a>>>0<4)break t;if((a|0)==8)break n}if(o=e[o+104>>2],o&&(e[c>>2]=e[c>>2]+-1),a>>>0<4)break n;for(;o&&(e[c>>2]=e[c>>2]+-1),a=a+-1|0,a>>>0>3;);}gA(f,ue(ue(l|0)*ue(d8))),l=e[f+8>>2],n=e[f+12>>2],g=e[f>>2],m=e[f+4>>2];break e}t:{n:{o:{if(a)break o;for(a=0;;){if(K[a+10493|0]!=(n|32))break o;r:{if(a>>>0>1)break r;if(n=e[o+4>>2],n>>>0>2]){e[c>>2]=n+1,n=H[n|0];break r}n=Hn(o)}if(a=a+1|0,(a|0)==3)break}break n}o:switch(a|0){case 0:r:{if((n|0)!=48)break r;a=e[o+4>>2];i:{if(a>>>0>2]){e[c>>2]=a+1,a=H[a|0];break i}a=Hn(o)}if((a&-33)==88){kA(f+16|0,o,v,h,l),l=e[f+24>>2],n=e[f+28>>2],g=e[f+16>>2],m=e[f+20>>2];break e}if(!e[o+104>>2])break r;e[c>>2]=e[c>>2]+-1}yA(f+32|0,o,n,v,h,l),l=e[f+40>>2],n=e[f+44>>2],g=e[f+32>>2],m=e[f+36>>2];break e;case 3:break n;default:break o}e[o+104>>2]&&(e[c>>2]=e[c>>2]+-1);break t}n:{a=e[o+4>>2];o:{if(a>>>0>2]){e[c>>2]=a+1,n=H[a|0];break o}n=Hn(o)}if((n|0)==40){a=1;break n}if(l=0,n=2147450880,!e[o+104>>2])break e;e[c>>2]=e[c>>2]+-1;break e}for(;;){n=e[o+4>>2];n:{if(n>>>0>2]){e[c>>2]=n+1,h=H[n|0];break n}h=Hn(o)}if(!(h+-97>>>0>=26&&!(h+-48>>>0<10|h+-65>>>0<26|(h|0)==95))){a=a+1|0;continue}break}if(l=0,n=2147450880,(h|0)==41||(o=e[o+104>>2],o&&(e[c>>2]=e[c>>2]+-1),!a))break e;for(;a=a+-1|0,o&&(e[c>>2]=e[c>>2]+-1),!!a;);break e}e[2896]=28,Wd(o),l=0,n=0}e[i>>2]=g,e[i+4>>2]=m,e[i+8>>2]=l,e[i+12>>2]=n,be=f+48|0}function kA(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0;f=be-432|0,be=f,l=e[o+4>>2];e:{if(l>>>0>2]){e[o+4>>2]=l+1,h=H[l|0];break e}h=Hn(o)}e:{t:{for(;;){if((h|0)!=48)n:{if((h|0)!=46)break e;if(l=e[o+4>>2],l>>>0>=ze[o+104>>2])break n;e[o+4>>2]=l+1,h=H[l|0];break t}else{l=e[o+4>>2],l>>>0>2]?(e[o+4>>2]=l+1,h=H[l|0]):h=Hn(o),ke=1;continue}break}h=Hn(o)}if(pe=1,(h|0)!=48)break e;for(;;){l=e[o+4>>2];t:{if(l>>>0>2]){e[o+4>>2]=l+1,h=H[l|0];break t}h=Hn(o)}if(E=E+-1|0,G=G+-1|0,(G|0)!=-1&&(E=E+1|0),(h|0)!=48)break}ke=1}for(C=1073676288,l=0;;){e:{Se=h|32;t:{n:{if(Ee=h+-48|0,Ee>>>0<10)break n;if(Se+-97>>>0>5&&(h|0)!=46)break e;if((h|0)!=46)break n;if(pe)break e;pe=1,G=m,E=l;break t}h=(h|0)>57?Se+-87|0:Ee;n:{if((l|0)<0||(l|0)<=0&&!(m>>>0>7)&&!0){N=h+(N<<4)|0;break n}if((l|0)<0||(l|0)<=0&&!(m>>>0>28)&&!0){jr(f+48|0,h),Xt(f+32|0,te,ae,g,C,0,0,0,1073414144),te=e[f+32>>2],ae=e[f+36>>2],g=e[f+40>>2],C=e[f+44>>2],Xt(f+16|0,te,ae,g,C,e[f+48>>2],e[f+52>>2],e[f+56>>2],e[f+60>>2]),Mr(f,v,A,T,z,e[f+16>>2],e[f+20>>2],e[f+24>>2],e[f+28>>2]),T=e[f+8>>2],z=e[f+12>>2],v=e[f>>2],A=e[f+4>>2];break n}if(!h|Te)break n;Xt(f+80|0,te,ae,g,C,0,0,0,1073610752),Mr(f- -64|0,v,A,T,z,e[f+80>>2],e[f+84>>2],e[f+88>>2],e[f+92>>2]),T=e[f+72>>2],z=e[f+76>>2],Te=1,v=e[f+64>>2],A=e[f+68>>2]}m=m+1|0,m>>>0<1&&(l=l+1|0),ke=1}h=e[o+4>>2],h>>>0>2]?(e[o+4>>2]=h+1,h=H[h|0]):h=Hn(o);continue}break}e:{t:{if(!ke){if(!e[o+104>>2]||(n=e[o+4>>2],e[o+4>>2]=n+-1,e[o+4>>2]=n+-2,!pe))break t;e[o+4>>2]=n+-3;break t}if((l|0)<0||(l|0)<=0&&!(m>>>0>7)&&!0)for(g=m,C=l;N=N<<4,g=g+1|0,g>>>0<1&&(C=C+1|0),!!((g|0)!=8|C););n:{if((h&-33)==80){if(g=Km(o),h=ne,C=h,g|(h|0)!=-2147483648||(g=0,C=0,!e[o+104>>2]))break n;e[o+4>>2]=e[o+4>>2]+-1;break n}if(g=0,C=0,!e[o+104>>2])break n;e[o+4>>2]=e[o+4>>2]+-1}if(!N){Qo(f+112|0,+(c|0)*0),v=e[f+112>>2],A=e[f+116>>2],n=e[f+120>>2],o=e[f+124>>2];break e}if(o=pe?G:m,l=(pe?E:l)<<2|o>>>30,o=g+(o<<2)|0,E=o+-32|0,m=E,l=l+C|0,o=(o>>>0>>0?l+1|0:l)+-1|0,l=m>>>0<4294967264?o+1|0:o,(l|0)>0||(l|0)>=0&&!(m>>>0<=0-a>>>0)&&!0){e[2896]=68,jr(f+160|0,c),Xt(f+144|0,e[f+160>>2],e[f+164>>2],e[f+168>>2],e[f+172>>2],-1,-1,-1,2147418111),Xt(f+128|0,e[f+144>>2],e[f+148>>2],e[f+152>>2],e[f+156>>2],-1,-1,-1,2147418111),v=e[f+128>>2],A=e[f+132>>2],n=e[f+136>>2],o=e[f+140>>2];break e}if(o=a+-226|0,h=m>>>0>>0?0:1,o=o>>31,(l|0)>(o|0)||(l|0)>=(o|0)&&h){if((N|0)>-1)for(;Mr(f+416|0,v,A,T,z,0,0,0,-1073807360),o=Um(v,A,T,z,1073610752),g=(o|0)<0,Mr(f+400|0,v,A,T,z,g?v:e[f+416>>2],g?A:e[f+420>>2],g?T:e[f+424>>2],g?z:e[f+428>>2]),l=l+-1|0,m=m+-1|0,(m|0)!=-1&&(l=l+1|0),T=e[f+408>>2],z=e[f+412>>2],v=e[f+400>>2],A=e[f+404>>2],N=N<<1|(o|0)>-1,(N|0)>-1;);o=(m-a|0)+32|0,g=o,h=n,C=o>>>0>=n>>>0?0:1,n=l-((a>>31)+(m>>>0>>0)|0)|0,o=o>>>0<32?n+1|0:n,o=(o|0)<0||(o|0)<=0&&C?(g|0)>0?g:0:h;n:{if((o|0)>=113){jr(f+384|0,c),G=e[f+392>>2],E=e[f+396>>2],te=e[f+384>>2],ae=e[f+388>>2],l=0,c=0,a=0,n=0;break n}Qo(f+352|0,ji(1,144-o|0)),jr(f+336|0,c),te=e[f+336>>2],ae=e[f+340>>2],G=e[f+344>>2],E=e[f+348>>2],Hm(f+368|0,e[f+352>>2],e[f+356>>2],e[f+360>>2],e[f+364>>2],te,ae,G,E),l=e[f+376>>2],c=e[f+380>>2],a=e[f+372>>2],n=e[f+368>>2]}o=!(N&1)&((va(v,A,T,z,0,0,0,0)|0)!=0&(o|0)<32),cs(f+320|0,o+N|0),Xt(f+304|0,te,ae,G,E,e[f+320>>2],e[f+324>>2],e[f+328>>2],e[f+332>>2]),Mr(f+272|0,e[f+304>>2],e[f+308>>2],e[f+312>>2],e[f+316>>2],n,a,l,c),Xt(f+288|0,o?0:v,o?0:A,o?0:T,o?0:z,te,ae,G,E),Mr(f+256|0,e[f+288>>2],e[f+292>>2],e[f+296>>2],e[f+300>>2],e[f+272>>2],e[f+276>>2],e[f+280>>2],e[f+284>>2]),Ud(f+240|0,e[f+256>>2],e[f+260>>2],e[f+264>>2],e[f+268>>2],n,a,l,c),o=e[f+240>>2],n=e[f+244>>2],a=e[f+248>>2],c=e[f+252>>2],va(o,n,a,c,0,0,0,0)||(e[2896]=68),Gm(f+224|0,o,n,a,c,m),v=e[f+224>>2],A=e[f+228>>2],n=e[f+232>>2],o=e[f+236>>2];break e}e[2896]=68,jr(f+208|0,c),Xt(f+192|0,e[f+208>>2],e[f+212>>2],e[f+216>>2],e[f+220>>2],0,0,0,65536),Xt(f+176|0,e[f+192>>2],e[f+196>>2],e[f+200>>2],e[f+204>>2],0,0,0,65536),v=e[f+176>>2],A=e[f+180>>2],n=e[f+184>>2],o=e[f+188>>2];break e}Qo(f+96|0,+(c|0)*0),v=e[f+96>>2],A=e[f+100>>2],n=e[f+104>>2],o=e[f+108>>2]}e[i>>2]=v,e[i+4>>2]=A,e[i+8>>2]=n,e[i+12>>2]=o,be=f+432|0}function yA(i,o,n,a,c,f){var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0;l=be-8976|0,be=l,Se=a+c|0,Be=0-Se|0;e:{t:{for(;;){if((n|0)!=48)n:{if((n|0)!=46)break e;if(n=e[o+4>>2],n>>>0>=ze[o+104>>2])break n;e[o+4>>2]=n+1,n=H[n|0];break t}else{n=e[o+4>>2],n>>>0>2]?(m=1,e[o+4>>2]=n+1,n=H[n|0]):(m=1,n=Hn(o));continue}break}n=Hn(o)}if(N=1,(n|0)!=48)break e;for(;;){n=e[o+4>>2];t:{if(n>>>0>2]){e[o+4>>2]=n+1,n=H[n|0];break t}n=Hn(o)}if(h=h+-1|0,g=g+-1|0,(g|0)!=-1&&(h=h+1|0),(n|0)!=48)break}m=1}e[l+784>>2]=0;e:{t:{C=(n|0)==46,E=n+-48|0;n:{o:{r:{if(C|E>>>0<=9)for(;;){i:{if(C&1){if(!N){g=v,h=A,N=1;break i}m=!m;break r}if(v=v+1|0,v>>>0<1&&(A=A+1|0),(T|0)<=2044){pe=(n|0)==48?pe:v,m=(l+784|0)+(T<<2)|0,e[m>>2]=G?(ie(e[m>>2],10)+n|0)+-48|0:E,m=1,E=G+1|0,n=(E|0)==9,G=n?0:E,T=n+T|0;break i}if((n|0)==48)break i;e[l+8960>>2]=e[l+8960>>2]|1,pe=18396}n=e[o+4>>2];i:{if(n>>>0>2]){e[o+4>>2]=n+1,n=H[n|0];break i}n=Hn(o)}if(C=(n|0)==46,E=n+-48|0,!(C|E>>>0<10))break}if(g=N?g:v,h=N?h:A,!(!m|(n&-33)!=69)){C=Km(o),n=ne,z=n;i:{if(C|(n|0)!=-2147483648||(C=0,z=0,!e[o+104>>2]))break i;e[o+4>>2]=e[o+4>>2]+-1}if(!m)break n;h=h+z|0,g=g+C|0,g>>>0>>0&&(h=h+1|0);break t}if(m=!m,(n|0)<0)break o}if(!e[o+104>>2])break o;e[o+4>>2]=e[o+4>>2]+-1}if(!m)break t}e[2896]=28,v=0,A=0,Wd(o),n=0,o=0;break e}if(o=e[l+784>>2],!o){Qo(l,+(f|0)*0),v=e[l>>2],A=e[l+4>>2],n=e[l+8>>2],o=e[l+12>>2];break e}if(!((g|0)!=(v|0)|(h|0)!=(A|0)|((A|0)>0?1:(A|0)>=0?v>>>0<=9?0:1:0)|(o>>>a|0?(a|0)<=30:0))){jr(l+48|0,f),cs(l+32|0,o),Xt(l+16|0,e[l+48>>2],e[l+52>>2],e[l+56>>2],e[l+60>>2],e[l+32>>2],e[l+36>>2],e[l+40>>2],e[l+44>>2]),v=e[l+16>>2],A=e[l+20>>2],n=e[l+24>>2],o=e[l+28>>2];break e}if((h|0)>0||(h|0)>=0&&!(g>>>0<=(c|0)/-2>>>0)&&!0){e[2896]=68,jr(l+96|0,f),Xt(l+80|0,e[l+96>>2],e[l+100>>2],e[l+104>>2],e[l+108>>2],-1,-1,-1,2147418111),Xt(l- -64|0,e[l+80>>2],e[l+84>>2],e[l+88>>2],e[l+92>>2],-1,-1,-1,2147418111),v=e[l+64>>2],A=e[l+68>>2],n=e[l+72>>2],o=e[l+76>>2];break e}if(o=c+-226|0,n=g>>>0>=o>>>0?0:1,o=o>>31,(h|0)<(o|0)||(h|0)<=(o|0)&&n){e[2896]=68,jr(l+144|0,f),Xt(l+128|0,e[l+144>>2],e[l+148>>2],e[l+152>>2],e[l+156>>2],0,0,0,65536),Xt(l+112|0,e[l+128>>2],e[l+132>>2],e[l+136>>2],e[l+140>>2],0,0,0,65536),v=e[l+112>>2],A=e[l+116>>2],n=e[l+120>>2],o=e[l+124>>2];break e}if(G){if((G|0)<=8){for(n=(l+784|0)+(T<<2)|0,o=e[n>>2];o=ie(o,10),G=G+1|0,(G|0)!=9;);e[n>>2]=o}T=T+1|0}t:{if(N=g,(pe|0)>(g|0)|(pe|0)>=9|(g|0)>17)break t;if((N|0)==9){jr(l+192|0,f),cs(l+176|0,e[l+784>>2]),Xt(l+160|0,e[l+192>>2],e[l+196>>2],e[l+200>>2],e[l+204>>2],e[l+176>>2],e[l+180>>2],e[l+184>>2],e[l+188>>2]),v=e[l+160>>2],A=e[l+164>>2],n=e[l+168>>2],o=e[l+172>>2];break e}if((N|0)<=8){jr(l+272|0,f),cs(l+256|0,e[l+784>>2]),Xt(l+240|0,e[l+272>>2],e[l+276>>2],e[l+280>>2],e[l+284>>2],e[l+256>>2],e[l+260>>2],e[l+264>>2],e[l+268>>2]),jr(l+224|0,e[(0-N<<2)+10560>>2]),Qm(l+208|0,e[l+240>>2],e[l+244>>2],e[l+248>>2],e[l+252>>2],e[l+224>>2],e[l+228>>2],e[l+232>>2],e[l+236>>2]),v=e[l+208>>2],A=e[l+212>>2],n=e[l+216>>2],o=e[l+220>>2];break e}if(o=(ie(N,-3)+a|0)+27|0,n=e[l+784>>2],n>>>o|0&&(o|0)<=30)break t;jr(l+352|0,f),cs(l+336|0,n),Xt(l+320|0,e[l+352>>2],e[l+356>>2],e[l+360>>2],e[l+364>>2],e[l+336>>2],e[l+340>>2],e[l+344>>2],e[l+348>>2]),jr(l+304|0,e[(N<<2)+10488>>2]),Xt(l+288|0,e[l+320>>2],e[l+324>>2],e[l+328>>2],e[l+332>>2],e[l+304>>2],e[l+308>>2],e[l+312>>2],e[l+316>>2]),v=e[l+288>>2],A=e[l+292>>2],n=e[l+296>>2],o=e[l+300>>2];break e}for(;n=T,T=n+-1|0,!e[(l+784|0)+(T<<2)>>2];);G=0,o=(N|0)%9|0;t:{if(!o){m=0;break t}E=(N|0)>-1?o:o+9|0;n:{if(!n){m=0,n=0;break n}for(g=e[(0-E<<2)+10560>>2],v=1e9/(g|0)|0,C=0,o=0,m=0;A=(l+784|0)+(o<<2)|0,T=e[A>>2],z=(T>>>0)/(g>>>0)|0,h=C+z|0,e[A>>2]=h,h=!h&(o|0)==(m|0),m=h?m+1&2047:m,N=h?N+-9|0:N,C=ie(v,T-ie(g,z)|0),o=o+1|0,(n|0)!=(o|0););if(!C)break n;e[(l+784|0)+(n<<2)>>2]=C,n=n+1|0}N=(N-E|0)+9|0}for(;;){A=(l+784|0)+(m<<2)|0;t:{for(;;){if((N|0)!=36|ze[A>>2]>=10384593&&(N|0)>=36)break t;for(T=n+2047|0,C=0,E=n;n=E,v=T&2047,E=(l+784|0)+(v<<2)|0,o=e[E>>2],h=o>>>3|0,o=o<<29,g=o+C|0,g>>>0>>0&&(h=h+1|0),o=0,!h&g>>>0<1000000001|h>>>0<0||(o=$m(g,h,1e9),g=g-oe(o,ne,1e9,0)|0),C=o,e[E>>2]=g,E=(v|0)!=(n+-1&2047)||(m|0)==(v|0)||g?n:v,T=v+-1|0,(m|0)!=(v|0););if(G=G+-29|0,!!C)break}m=m+-1&2047,(E|0)==(m|0)&&(o=(l+784|0)+((E+2046&2047)<<2)|0,n=E+-1&2047,e[o>>2]=e[o>>2]|e[(l+784|0)+(n<<2)>>2]),N=N+9|0,e[(l+784|0)+(m<<2)>>2]=C;continue}break}t:{n:for(;;){for(g=n+1&2047,v=(l+784|0)+((n+-1&2047)<<2)|0;;){h=(N|0)>45?9:1;o:{for(;;){E=m,o=0;r:{for(;;){i:{if(m=o+E&2047,(m|0)==(n|0)||(m=e[(l+784|0)+(m<<2)>>2],A=e[(o<<2)+10512>>2],m>>>0>>0))break i;if(m>>>0>A>>>0)break r;if(o=o+1|0,(o|0)!=4)continue}break}if((N|0)!=36)break r;for(g=0,h=0,o=0,v=0,A=0;m=o+E&2047,(m|0)==(n|0)&&(n=n+1&2047,e[((n<<2)+l|0)+780>>2]=0),Xt(l+768|0,g,h,v,A,0,0,1342177280,1075633366),cs(l+752|0,e[(l+784|0)+(m<<2)>>2]),Mr(l+736|0,e[l+768>>2],e[l+772>>2],e[l+776>>2],e[l+780>>2],e[l+752>>2],e[l+756>>2],e[l+760>>2],e[l+764>>2]),v=e[l+744>>2],A=e[l+748>>2],g=e[l+736>>2],h=e[l+740>>2],o=o+1|0,(o|0)!=4;);if(jr(l+720|0,f),Xt(l+704|0,g,h,v,A,e[l+720>>2],e[l+724>>2],e[l+728>>2],e[l+732>>2]),v=e[l+712>>2],A=e[l+716>>2],g=0,h=0,C=e[l+704>>2],z=e[l+708>>2],Ee=G+113|0,c=Ee-c|0,pe=(c|0)<(a|0),o=pe?(c|0)>0?c:0:a,(o|0)<=112)break o;N=0,T=0,m=0,a=0;break t}if(G=h+G|0,m=n,(n|0)!=(E|0))break}for(A=1e9>>>h|0,C=-1<>2],o=o+(z>>>h|0)|0,e[T>>2]=o,o=!o&(m|0)==(E|0),m=o?m+1&2047:m,N=o?N+-9|0:N,o=ie(A,C&z),E=E+1&2047,(E|0)!=(n|0););if(!o)continue;if((g|0)!=(m|0)){e[(l+784|0)+(n<<2)>>2]=o,n=g;continue n}e[v>>2]=e[v>>2]|1,m=g;continue}break}break}Qo(l+656|0,ji(1,225-o|0)),Hm(l+688|0,e[l+656>>2],e[l+660>>2],e[l+664>>2],e[l+668>>2],C,z,v,A),m=e[l+696>>2],a=e[l+700>>2],N=e[l+688>>2],T=e[l+692>>2],Qo(l+640|0,ji(1,113-o|0)),Ym(l+672|0,C,z,v,A,e[l+640>>2],e[l+644>>2],e[l+648>>2],e[l+652>>2]),g=e[l+672>>2],h=e[l+676>>2],te=e[l+680>>2],ae=e[l+684>>2],Ud(l+624|0,C,z,v,A,g,h,te,ae),Mr(l+608|0,N,T,m,a,e[l+624>>2],e[l+628>>2],e[l+632>>2],e[l+636>>2]),v=e[l+616>>2],A=e[l+620>>2],C=e[l+608>>2],z=e[l+612>>2]}ke=E+4&2047;t:{if((ke|0)==(n|0))break t;ke=e[(l+784|0)+(ke<<2)>>2];n:{if(ke>>>0<=499999999){if((E+5&2047)==(n|0)&&!ke)break n;Qo(l+496|0,+(f|0)*.25),Mr(l+480|0,g,h,te,ae,e[l+496>>2],e[l+500>>2],e[l+504>>2],e[l+508>>2]),te=e[l+488>>2],ae=e[l+492>>2],g=e[l+480>>2],h=e[l+484>>2];break n}if((ke|0)!=5e8){Qo(l+592|0,+(f|0)*.75),Mr(l+576|0,g,h,te,ae,e[l+592>>2],e[l+596>>2],e[l+600>>2],e[l+604>>2]),te=e[l+584>>2],ae=e[l+588>>2],g=e[l+576>>2],h=e[l+580>>2];break n}if(Te=+(f|0),(E+5&2047)==(n|0)){Qo(l+528|0,Te*.5),Mr(l+512|0,g,h,te,ae,e[l+528>>2],e[l+532>>2],e[l+536>>2],e[l+540>>2]),te=e[l+520>>2],ae=e[l+524>>2],g=e[l+512>>2],h=e[l+516>>2];break n}Qo(l+560|0,Te*.75),Mr(l+544|0,g,h,te,ae,e[l+560>>2],e[l+564>>2],e[l+568>>2],e[l+572>>2]),te=e[l+552>>2],ae=e[l+556>>2],g=e[l+544>>2],h=e[l+548>>2]}if((o|0)>111||(Ym(l+464|0,g,h,te,ae,0,0,0,1073676288),va(e[l+464>>2],e[l+468>>2],e[l+472>>2],e[l+476>>2],0,0,0,0)))break t;Mr(l+448|0,g,h,te,ae,0,0,0,1073676288),te=e[l+456>>2],ae=e[l+460>>2],g=e[l+448>>2],h=e[l+452>>2]}Mr(l+432|0,C,z,v,A,g,h,te,ae),Ud(l+416|0,e[l+432>>2],e[l+436>>2],e[l+440>>2],e[l+444>>2],N,T,m,a),v=e[l+424>>2],A=e[l+428>>2],C=e[l+416>>2],z=e[l+420>>2];t:{if((Ee&2147483647)<=(-2-Se|0)||(n=l+400|0,e[n+8>>2]=v,e[n+12>>2]=A&2147483647,e[n>>2]=C,e[n+4>>2]=z,Xt(l+384|0,C,z,v,A,0,0,0,1073610752),a=Um(e[l+400>>2],e[l+404>>2],e[l+408>>2],e[l+412>>2],1081081856),n=(a|0)<0,v=n?v:e[l+392>>2],A=n?A:e[l+396>>2],C=n?C:e[l+384>>2],z=n?z:e[l+388>>2],G=((a|0)>-1)+G|0,je=!(pe&(n|(o|0)!=(c|0))&(va(g,h,te,ae,0,0,0,0)|0)!=0),Qe=0,Ye=(G+110|0)<=(Be|0),Ye?je:Qe))break t;e[2896]=68}Gm(l+368|0,C,z,v,A,G),v=e[l+368>>2],A=e[l+372>>2],n=e[l+376>>2],o=e[l+380>>2]}e[i>>2]=v,e[i+4>>2]=A,e[i+8>>2]=n,e[i+12>>2]=o,be=l+8976|0}function Km(i){var o=0,n=0,a=0,c=0,f=0;e:{t:{n:{a=e[i+4>>2];o:{if(a>>>0>2]){e[i+4>>2]=a+1,n=H[a|0];break o}n=Hn(i)}switch(n+-43|0){case 0:case 2:break t;default:break n}}o=n+-48|0;break e}f=(n|0)==45,a=e[i+4>>2];t:{if(a>>>0>2]){e[i+4>>2]=a+1,n=H[a|0];break t}n=Hn(i)}o=n+-48|0,o>>>0<10|!e[i+104>>2]||(e[i+4>>2]=e[i+4>>2]+-1)}e:{if(o>>>0<10){for(o=0;;){o=ie(o,10)+n|0,a=e[i+4>>2];t:{if(a>>>0>2]){e[i+4>>2]=a+1,n=H[a|0];break t}n=Hn(i)}if(c=n+-48|0,o=o+-48|0,!((o|0)<214748364&&c>>>0<=9))break}a=o,o=o>>31;t:{if(c>>>0>=10)break t;for(;;){o=oe(a,o,10,0),a=o+n|0,n=ne,c=a>>>0>>0?n+1|0:n,o=e[i+4>>2];n:{if(o>>>0>2]){e[i+4>>2]=o+1,n=H[o|0];break n}n=Hn(i)}if(o=c+-1|0,a=a+-48|0,a>>>0<4294967248&&(o=o+1|0),c=n+-48|0,c>>>0>9)break t;if(!((o|0)<21474836||(o|0)<=21474836&&!(a>>>0>=2061584302)))break}}if(c>>>0<10)for(;;){n=e[i+4>>2];t:{if(n>>>0>2]){e[i+4>>2]=n+1,n=H[n|0];break t}n=Hn(i)}if(!(n+-48>>>0<10))break}e[i+104>>2]&&(e[i+4>>2]=e[i+4>>2]+-1),i=a,a=f?0-i|0:i,o=f?0-(o+(0>>0)|0)|0:o;break e}if(a=0,o=-2147483648,!e[i+104>>2])break e;return e[i+4>>2]=e[i+4>>2]+-1,ne=-2147483648,0}return ne=o,a}function _A(i,o){var n=0,a=0,c=0;n=be-160|0,be=n,In(n+16|0,144),e[n+92>>2]=-1,e[n+60>>2]=o,e[n+24>>2]=-1,e[n+20>>2]=o,Wd(n+16|0),vA(n,n+16|0),o=e[n+8>>2],a=e[n+12>>2],c=e[n+4>>2],e[i>>2]=e[n>>2],e[i+4>>2]=c,e[i+8>>2]=o,e[i+12>>2]=a,be=n+160|0}function Ko(i){var o=0,n=0;return o=be-16|0,be=o,_A(o,i),n=C8(e[o>>2],e[o+4>>2],e[o+8>>2],e[o+12>>2]),be=o+16|0,n}function wA(){var i=0,o=0,n=0,a=0;if(o=Ho(1,8),!o)return 0;i=Ho(1,1032),e[o>>2]=i;e:{if(!i)break e;if(a=Ho(1,11856),e[o+4>>2]=a,!a){Me(i);break e}if(i=Ho(1,20),a=e[o+4>>2],e[a+6856>>2]=i,!i){Me(a),Me(e[o>>2]);break e}e[a+7296>>2]=0,i=e[o>>2],e[i+44>>2]=13,e[i+48>>2]=1056964608,e[i+36>>2]=0,e[i+40>>2]=1,e[i+28>>2]=16,e[i+32>>2]=44100,e[i+20>>2]=0,e[i+24>>2]=2,e[i+12>>2]=1,e[i+16>>2]=0,e[i+4>>2]=0,e[i+8>>2]=1,i=e[o>>2],e[i+592>>2]=0,e[i+596>>2]=0,e[i+556>>2]=0,e[i+560>>2]=0,e[i+564>>2]=0,e[i+568>>2]=0,e[i+572>>2]=0,e[i+576>>2]=0,e[i+580>>2]=0,e[i+584>>2]=0,e[i+600>>2]=0,e[i+604>>2]=0,a=e[o+4>>2],n=a,e[n+7248>>2]=0,e[n+7252>>2]=0,e[n+7048>>2]=0,n=n+7256|0,e[n>>2]=0,e[n+4>>2]=0,n=a+7264|0,e[n>>2]=0,e[n+4>>2]=0,n=a+7272|0,e[n>>2]=0,e[n+4>>2]=0,n=a+7280|0,e[n>>2]=0,e[n+4>>2]=0,e[a+7288>>2]=0,Fm(i+632|0),i=e[o>>2];t:{if(e[i>>2]!=1||(e[i+16>>2]=1,e[i+20>>2]=0,Hd(o,10777),i=e[o>>2],e[i>>2]!=1))break t;e[i+576>>2]=0,e[i+580>>2]=5,e[i+564>>2]=0,e[i+568>>2]=0,e[i+556>>2]=8,e[i+560>>2]=0}return i=e[o+4>>2],e[i+11848>>2]=0,e[i+6176>>2]=i+336,i=e[o+4>>2],e[i+6180>>2]=i+628,i=e[o+4>>2],e[i+6184>>2]=i+920,i=e[o+4>>2],e[i+6188>>2]=i+1212,i=e[o+4>>2],e[i+6192>>2]=i+1504,i=e[o+4>>2],e[i+6196>>2]=i+1796,i=e[o+4>>2],e[i+6200>>2]=i+2088,i=e[o+4>>2],e[i+6204>>2]=i+2380,i=e[o+4>>2],e[i+6208>>2]=i+2672,i=e[o+4>>2],e[i+6212>>2]=i+2964,i=e[o+4>>2],e[i+6216>>2]=i+3256,i=e[o+4>>2],e[i+6220>>2]=i+3548,i=e[o+4>>2],e[i+6224>>2]=i+3840,i=e[o+4>>2],e[i+6228>>2]=i+4132,i=e[o+4>>2],e[i+6232>>2]=i+4424,i=e[o+4>>2],e[i+6236>>2]=i+4716,i=e[o+4>>2],e[i+6240>>2]=i+5008,i=e[o+4>>2],e[i+6244>>2]=i+5300,i=e[o+4>>2],e[i+6248>>2]=i+5592,i=e[o+4>>2],e[i+6252>>2]=i+5884,i=e[o+4>>2],e[i+6640>>2]=i+6256,i=e[o+4>>2],e[i+6644>>2]=i+6268,i=e[o+4>>2],e[i+6648>>2]=i+6280,i=e[o+4>>2],e[i+6652>>2]=i+6292,i=e[o+4>>2],e[i+6656>>2]=i+6304,i=e[o+4>>2],e[i+6660>>2]=i+6316,i=e[o+4>>2],e[i+6664>>2]=i+6328,i=e[o+4>>2],e[i+6668>>2]=i+6340,i=e[o+4>>2],e[i+6672>>2]=i+6352,i=e[o+4>>2],e[i+6676>>2]=i+6364,i=e[o+4>>2],e[i+6680>>2]=i+6376,i=e[o+4>>2],e[i+6684>>2]=i+6388,i=e[o+4>>2],e[i+6688>>2]=i+6400,i=e[o+4>>2],e[i+6692>>2]=i+6412,i=e[o+4>>2],e[i+6696>>2]=i+6424,i=e[o+4>>2],e[i+6700>>2]=i+6436,i=e[o+4>>2],e[i+6704>>2]=i+6448,i=e[o+4>>2],e[i+6708>>2]=i+6460,i=e[o+4>>2],e[i+6712>>2]=i+6472,i=e[o+4>>2],e[i+6716>>2]=i+6484,an(e[o+4>>2]+6256|0),an(e[o+4>>2]+6268|0),an(e[o+4>>2]+6280|0),an(e[o+4>>2]+6292|0),an(e[o+4>>2]+6304|0),an(e[o+4>>2]+6316|0),an(e[o+4>>2]+6328|0),an(e[o+4>>2]+6340|0),an(e[o+4>>2]+6352|0),an(e[o+4>>2]+6364|0),an(e[o+4>>2]+6376|0),an(e[o+4>>2]+6388|0),an(e[o+4>>2]+6400|0),an(e[o+4>>2]+6412|0),an(e[o+4>>2]+6424|0),an(e[o+4>>2]+6436|0),an(e[o+4>>2]+6448|0),an(e[o+4>>2]+6460|0),an(e[o+4>>2]+6472|0),an(e[o+4>>2]+6484|0),an(e[o+4>>2]+11724|0),an(e[o+4>>2]+11736|0),e[e[o>>2]>>2]=1,o|0}return Me(o),0}function Hd(i,o){var n=0,a=0,c=0,f=ue(0),l=ue(0),h=0,g=0,m=ue(0),v=0,A=0;n=e[i>>2];e:{if(e[n>>2]!=1)break e;for(e[n+40>>2]=0;;){t:{n:{o:{r:{i:{a:{s:{l:{u:{f:{c:{d:{p:{h:{v=xl(o,59);m:{if(v){c=v-o|0;break m}c=Cl(o)}if(A=(c|0)!=8,!A){if(lr(10584,o,8))break h;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=0;break t}m:switch(c+-6|0){case 1:break c;case 0:break d;case 20:break p;case 7:break m;default:break f}if(h=1,lr(10593,o,13))break u;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=1;break t}if(h=0,lr(10607,o,8))break u;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=2;break t}if(h=0,lr(10616,o,26))break u;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=3;break t}if(lr(10643,o,6))break t;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=4;break t}if(lr(10650,o,7))break l;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=5;break t}if(h=0,c>>>0<8)break s}if(lr(10658,o,6))break a;if(l=ue(Ko(o+6|0)),l>ue(0)^1|l<=ue(.5)^1)break t;o=e[i>>2],Ze[((e[o+40>>2]<<4)+o|0)+48>>2]=l,o=e[i>>2],c=e[o+40>>2],e[o+40>>2]=c+1,e[(o+(c<<4)|0)+44>>2]=6;break t}if(lr(10665,o,7))break i;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=7;break t}s:switch(c+-4|0){case 0:break s;case 1:break o;default:break t}if(lr(10673,o,4))break t;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=8;break t}if(!h||lr(10678,o,13))break r;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=9;break t}if(lr(10692,o,7))break t;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=10;break t}r:{if((c|0)!=9||lr(10700,o,9))break r;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=11;break t}if(!A){if(!lr(10710,o,8)){e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=12;break t}if(lr(10719,o,6))break t;break n}if(!lr(10719,o,6))break n;if(c>>>0<16)break t;if(!lr(10726,o,14)){g=Ko(o+14|0);r:{if(Dn(g)<2147483648){c=~~g;break r}c=-2147483648}a=xl(o,47),f=ue(.10000000149011612);r:{if(!a||(n=a+1|0,f=ue(.9900000095367432),!(ue(Ko(n))>2],n=e[o+40>>2],(c|0)<=1){Ze[((n<<4)+o|0)+48>>2]=l,o=e[i>>2],c=e[o+40>>2],e[o+40>>2]=c+1,e[(o+(c<<4)|0)+44>>2]=13;break t}if(n+c>>>0>31)break t;for(m=ue(ue(ue(1)/ue(ue(1)-f))+ue(-1)),f=ue(m+ue(c|0)),a=0;Ze[((n<<4)+o|0)+48>>2]=l,o=e[i>>2],Ze[((e[o+40>>2]<<4)+o|0)+52>>2]=ue(a|0)/f,o=e[i>>2],a=a+1|0,Ze[((e[o+40>>2]<<4)+o|0)+56>>2]=ue(m+ue(a|0))/f,o=e[i>>2],h=e[o+40>>2],n=h+1|0,e[o+40>>2]=n,e[((h<<4)+o|0)+44>>2]=14,(a|0)!=(c|0););break t}if(c>>>0<17||lr(10741,o,15))break t;g=Ko(o+15|0);r:{if(Dn(g)<2147483648){c=~~g;break r}c=-2147483648}l=ue(.20000000298023224),a=xl(o,47),f=ue(.20000000298023224);r:{if(!a||(n=a+1|0,f=ue(.9900000095367432),!(ue(Ko(n))>2],n=e[o+40>>2],(c|0)<=1){Ze[((n<<4)+o|0)+48>>2]=l,o=e[i>>2],c=e[o+40>>2],e[o+40>>2]=c+1,e[(o+(c<<4)|0)+44>>2]=13;break t}if(n+c>>>0>31)break t;for(m=ue(ue(ue(1)/ue(ue(1)-f))+ue(-1)),f=ue(m+ue(c|0)),a=0;Ze[((n<<4)+o|0)+48>>2]=l,o=e[i>>2],Ze[((e[o+40>>2]<<4)+o|0)+52>>2]=ue(a|0)/f,o=e[i>>2],a=a+1|0,Ze[((e[o+40>>2]<<4)+o|0)+56>>2]=ue(m+ue(a|0))/f,o=e[i>>2],h=e[o+40>>2],n=h+1|0,e[o+40>>2]=n,e[((h<<4)+o|0)+44>>2]=15,(a|0)!=(c|0););break t}if(lr(10757,o,5))break t;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=16;break t}if(l=ue(Ko(o+6|0)),l>=ue(0)^1|l<=ue(1)^1)break t;o=e[i>>2],Ze[((e[o+40>>2]<<4)+o|0)+48>>2]=l,o=e[i>>2],c=e[o+40>>2],e[o+40>>2]=c+1,e[(o+(c<<4)|0)+44>>2]=13}if(n=e[i>>2],a=e[n+40>>2],!(v&&(o=v+1|0,(a|0)!=32)))break}if(c=1,a)break e;e[n+40>>2]=1,e[n+44>>2]=13,e[n+48>>2]=1056964608}return c}function AA(i){i=i|0;var o=0,n=0;i&&(e[e[i+4>>2]+11848>>2]=1,Xm(i),o=e[i+4>>2],n=e[o+11752>>2],n&&(xm(n),o=e[i+4>>2]),sn(o+6256|0),sn(e[i+4>>2]+6268|0),sn(e[i+4>>2]+6280|0),sn(e[i+4>>2]+6292|0),sn(e[i+4>>2]+6304|0),sn(e[i+4>>2]+6316|0),sn(e[i+4>>2]+6328|0),sn(e[i+4>>2]+6340|0),sn(e[i+4>>2]+6352|0),sn(e[i+4>>2]+6364|0),sn(e[i+4>>2]+6376|0),sn(e[i+4>>2]+6388|0),sn(e[i+4>>2]+6400|0),sn(e[i+4>>2]+6412|0),sn(e[i+4>>2]+6424|0),sn(e[i+4>>2]+6436|0),sn(e[i+4>>2]+6448|0),sn(e[i+4>>2]+6460|0),sn(e[i+4>>2]+6472|0),sn(e[i+4>>2]+6484|0),sn(e[i+4>>2]+11724|0),sn(e[i+4>>2]+11736|0),xd(e[e[i+4>>2]+6856>>2]),Me(e[i+4>>2]),Me(e[i>>2]),Me(i))}function Xm(i){i=i|0;var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0;h=be-32|0,be=h;e:{if(!i)break e;t:{n:switch(f=e[i>>2],o=e[f>>2],o|0){case 1:break e;case 0:break n;default:break t}if(n=e[i+4>>2],e[n+11848>>2]||(n=e[n+7052>>2],!n))break t;a=e[f+36>>2],e[f+36>>2]=n,a=!mu(i,(n|0)!=(a|0),1),f=e[i>>2]}e[f+12>>2]&&(n=e[i+4>>2],vm(n+6928|0,n+7060|0)),f=i+4|0,o=e[i+4>>2];t:{if(e[o+11848>>2]){n=a;break t}c=e[i>>2];n:{if(e[c>>2])break n;if(A=e[o+7268>>2],A){o:{if(e[o+7260>>2]){if(E=e[o+6900>>2],C=e[o+6896>>2],n=o+6920|0,g=e[n>>2],m=e[n+4>>2],(Le[A](i,0,0,e[o+7288>>2])|0)==2)break o;Lm(h),n=e[i>>2],c=e[n+608>>2],l=e[n+612>>2],n=e[i+4>>2];r:{if(!Dm(i,c,l,h,e[n+7268>>2],e[n+7264>>2],e[n+7288>>2]))break r;if(A=e[1357]+e[1356]|0,N=e[1362]+(e[1361]+(e[1360]+(e[1359]+(A+e[1358]|0)|0)|0)|0)|0,n=N+e[1363]>>>3|0,n+33>>>0>ze[h+12>>2]){e[e[i>>2]>>2]=2,ls(h);break o}if(c=o+6936|0,v=H[c+4|0]|H[c+5|0]<<8|(H[c+6|0]<<16|H[c+7|0]<<24),n=n+e[h+8>>2]|0,c=H[c|0]|H[c+1|0]<<8|(H[c+2|0]<<16|H[c+3|0]<<24),K[n+25|0]=c,K[n+26|0]=c>>>8,K[n+27|0]=c>>>16,K[n+28|0]=c>>>24,K[n+29|0]=v,K[n+30|0]=v>>>8,K[n+31|0]=v>>>16,K[n+32|0]=v>>>24,o=o+6928|0,c=H[o+4|0]|H[o+5|0]<<8|(H[o+6|0]<<16|H[o+7|0]<<24),o=H[o|0]|H[o+1|0]<<8|(H[o+2|0]<<16|H[o+3|0]<<24),K[n+17|0]=o,K[n+18|0]=o>>>8,K[n+19|0]=o>>>16,K[n+20|0]=o>>>24,K[n+21|0]=c,K[n+22|0]=c>>>8,K[n+23|0]=c>>>16,K[n+24|0]=c>>>24,n=N+-4>>>3|0,n+22>>>0>ze[h+12>>2]){e[e[i>>2]>>2]=2,ls(h);break o}if(n=n+e[h+8>>2]|0,K[n+21|0]=g,K[n+20|0]=(m&255)<<24|g>>>8,K[n+19|0]=(m&65535)<<16|g>>>16,K[n+18|0]=(m&16777215)<<8|g>>>24,n=n+17|0,K[n|0]=H[n|0]&240|m&15,n=A>>>3|0,n+23>>>0>ze[h+12>>2]){e[e[i>>2]>>2]=2,ls(h);break o}if(n=n+e[h+8>>2]|0,K[n+22|0]=E,K[n+21|0]=E>>>8,K[n+20|0]=E>>>16,K[n+19|0]=C,K[n+18|0]=C>>>8,K[n+17|0]=C>>>16,n=e[i>>2],c=e[n+608>>2],o=e[n+612>>2],n=e[i+4>>2],n=Om(i,c,o,h,e[n+7268>>2],e[n+7276>>2],e[n+7288>>2]),ls(h),!n||(n=e[e[f>>2]+7048>>2],!n|!e[n>>2])||(o=e[i>>2],!(e[o+616>>2]|e[o+620>>2])))break o;if(lm(n),Lm(h),n=e[i>>2],c=e[n+616>>2],o=e[n+620>>2],n=e[i+4>>2],!Dm(i,c,o,h,e[n+7268>>2],e[n+7264>>2],e[n+7288>>2]))break r;if(l=e[f>>2],n=e[l+7048>>2],o=e[n>>2],e[h+12>>2]!=(ie(o,18)+4|0)){e[e[i>>2]>>2]=2,ls(h);break o}if(o)for(o=e[h+8>>2]+4|0,c=0;g=e[n+4>>2]+ie(c,24)|0,m=e[g>>2],n=e[g+4>>2],v=e[g+8>>2],l=e[g+12>>2],g=e[g+16>>2],K[o+17|0]=g,K[o+15|0]=v,K[o+7|0]=m,K[o+16|0]=g>>>8,K[o+14|0]=(l&255)<<24|v>>>8,K[o+13|0]=(l&65535)<<16|v>>>16,K[o+12|0]=(l&16777215)<<8|v>>>24,K[o+11|0]=l,K[o+10|0]=l>>>8,K[o+9|0]=l>>>16,K[o+8|0]=l>>>24,K[o+6|0]=(n&255)<<24|m>>>8,K[o+5|0]=(n&65535)<<16|m>>>16,K[o+4|0]=(n&16777215)<<8|m>>>24,K[o+3|0]=n,K[o+2|0]=n>>>8,K[o+1|0]=n>>>16,K[o|0]=n>>>24,o=o+18|0,c=c+1|0,l=e[f>>2],n=e[l+7048>>2],c>>>0>2];);n=e[i>>2],Om(i,e[n+616>>2],e[n+620>>2],h,e[l+7268>>2],e[l+7276>>2],e[l+7288>>2])}ls(h);break o}E=e[o+6912>>2],g=e[o+6900>>2],m=e[o+6896>>2],l=o+6920|0,n=e[l>>2],l=e[l+4>>2];r:{i:switch(z=i,v=e[c+612>>2],C=e[1357]+e[1356]|0,N=e[1362]+(e[1361]+(e[1360]+(e[1359]+(C+e[1358]|0)|0)|0)|0)|0,T=(N+e[1363]>>>3|0)+4|0,c=T+e[c+608>>2]|0,c>>>0>>0&&(v=v+1|0),Le[A](z,c,v,e[o+7288>>2])|0){case 0:break r;case 1:break i;default:break o}e[e[i>>2]>>2]=5;break o}if(c=o+6928|0,o=e[i+4>>2],Le[e[o+7276>>2]](i,c,16,0,0,e[o+7288>>2])){e[e[i>>2]>>2]=5;break o}K[h+4|0]=n,K[h+3|0]=(l&255)<<24|n>>>8,K[h+2|0]=(l&65535)<<16|n>>>16,K[h+1|0]=(l&16777215)<<8|n>>>24,K[h|0]=(l&15|E<<4)+240;r:{i:switch(n=(N+-4>>>3|0)+4|0,o=e[i>>2],c=n+e[o+608>>2]|0,o=e[o+612>>2],o=c>>>0>>0?o+1|0:o,n=e[i+4>>2],Le[e[n+7268>>2]](i,c,o,e[n+7288>>2])|0){case 0:break r;case 1:break i;default:break o}e[e[i>>2]>>2]=5;break o}if(n=e[i+4>>2],Le[e[n+7276>>2]](i,h,5,0,0,e[n+7288>>2])){e[e[i>>2]>>2]=5;break o}K[h+5|0]=g,K[h+4|0]=g>>>8,K[h+3|0]=g>>>16,K[h+2|0]=m,K[h+1|0]=m>>>8,K[h|0]=m>>>16;r:{i:switch(n=(C>>>3|0)+4|0,o=e[i>>2],c=n+e[o+608>>2]|0,o=e[o+612>>2],o=c>>>0>>0?o+1|0:o,n=e[i+4>>2],Le[e[n+7268>>2]](i,c,o,e[n+7288>>2])|0){case 0:break r;case 1:break i;default:break o}e[e[i>>2]>>2]=5;break o}if(n=e[i+4>>2],Le[e[n+7276>>2]](i,h,6,0,0,e[n+7288>>2])){e[e[i>>2]>>2]=5;break o}if(n=e[e[f>>2]+7048>>2],!n|!e[n>>2]||(o=e[i>>2],!(e[o+616>>2]|e[o+620>>2])))break o;lm(n);r:{i:{a:switch(n=e[i>>2],o=e[n+616>>2]+4|0,n=e[n+620>>2],c=o>>>0<4?n+1|0:n,n=e[i+4>>2],Le[e[n+7268>>2]](i,o,c,e[n+7288>>2])|0){case 1:break i;case 0:break a;default:break o}if(c=e[f>>2],o=e[c+7048>>2],!e[o>>2])break o;l=0;break r}e[e[i>>2]>>2]=5;break o}for(;;){r:{if(m=ie(l,24),g=m+e[o+4>>2]|0,n=e[g+4>>2],g=e[g>>2],v=g<<24|g<<8&16711680,e[h>>2]=((n&255)<<24|g>>>8)&-16777216|((n&16777215)<<8|g>>>24)&16711680|(n>>>8&65280|n>>>24),e[h+4>>2]=(n<<24|g>>>8)&65280|(n<<8|g>>>24)&255|v,g=m+e[o+4>>2]|0,n=e[g+12>>2],g=e[g+8>>2],v=g<<24|g<<8&16711680,e[h+8>>2]=((n&255)<<24|g>>>8)&-16777216|((n&16777215)<<8|g>>>24)&16711680|(n>>>8&65280|n>>>24),e[h+12>>2]=(n<<24|g>>>8)&65280|(n<<8|g>>>24)&255|v,n=tn[(m+e[o+4>>2]|0)+16>>1],Ut[h+16>>1]=(n<<24|n<<8&16711680)>>>16,Le[e[c+7276>>2]](i,h,18,0,0,e[c+7288>>2]))break r;if(l=l+1|0,c=e[f>>2],o=e[c+7048>>2],l>>>0>2])continue;break o}break}e[e[i>>2]>>2]=5}o=e[i+4>>2],c=e[i>>2],a=e[c>>2]?1:a}if(n=e[o+7280>>2],!n)break n;Le[n](i,o+6872|0,e[o+7288>>2]),c=e[i>>2]}if(!e[c+4>>2]){n=a;break t}if(n=e[e[f>>2]+11752>>2],!n){n=a;break t}if(Td(n)){n=a;break t}if(n=1,a)break t;e[e[i>>2]>>2]=4}if(o=e[f>>2],a=e[o+7296>>2],a&&((a|0)!=e[1896]&&(_m(a),o=e[f>>2]),e[o+7296>>2]=0),e[o+7260>>2]&&um(e[i>>2]+640|0),o=e[i>>2],a=e[o+600>>2],a&&(Me(a),o=e[i>>2],e[o+600>>2]=0,e[o+604>>2]=0),e[o+24>>2])for(a=0;c=e[f>>2],o=a<<2,l=e[(c+o|0)+7328>>2],l&&(Me(l),e[(o+e[f>>2]|0)+7328>>2]=0,c=e[f>>2]),c=e[(c+o|0)+7368>>2],c&&(Me(c),e[(o+e[f>>2]|0)+7368>>2]=0),a=a+1|0,a>>>0>2]+24>>2];);if(o=e[f>>2],a=e[o+7360>>2],a&&(Me(a),e[e[f>>2]+7360>>2]=0,o=e[f>>2]),a=e[o+7400>>2],a&&(Me(a),e[e[f>>2]+7400>>2]=0,o=e[f>>2]),a=e[o+7364>>2],a&&(Me(a),e[e[f>>2]+7364>>2]=0,o=e[f>>2]),a=e[o+7404>>2],a&&(Me(a),e[e[f>>2]+7404>>2]=0,o=e[f>>2]),c=e[i>>2],e[c+40>>2])for(a=0;l=a<<2,g=e[(l+o|0)+7408>>2],g&&(Me(g),e[(l+e[i+4>>2]|0)+7408>>2]=0,c=e[i>>2],o=e[i+4>>2]),a=a+1|0,a>>>0>2];);if(a=e[o+7536>>2],a&&(Me(a),o=e[i+4>>2],e[o+7536>>2]=0,c=e[i>>2]),e[c+24>>2])for(c=0;a=c<<3,l=e[(a+o|0)+7540>>2],l&&(Me(l),e[(a+e[f>>2]|0)+7540>>2]=0,o=e[f>>2]),l=e[(o+a|0)+7544>>2],l&&(Me(l),e[(a+e[f>>2]|0)+7544>>2]=0,o=e[f>>2]),c=c+1|0,c>>>0>2]+24>>2];);if(a=e[o+7604>>2],a&&(Me(a),e[e[f>>2]+7604>>2]=0,o=e[f>>2]),a=e[o+7608>>2],a&&(Me(a),e[e[f>>2]+7608>>2]=0,o=e[f>>2]),a=e[o+7612>>2],a&&(Me(a),e[e[f>>2]+7612>>2]=0,o=e[f>>2]),a=e[o+7616>>2],a&&(Me(a),e[e[f>>2]+7616>>2]=0,o=e[f>>2]),a=e[o+7620>>2],a&&(Me(a),o=e[f>>2],e[o+7620>>2]=0),a=e[o+7624>>2],a&&(Me(a),o=e[f>>2],e[o+7624>>2]=0),a=e[i>>2],!(!e[a+4>>2]|!e[a+24>>2]))for(f=0;c=f<<2,l=e[(c+o|0)+11764>>2],l&&(Me(l),e[(c+e[i+4>>2]|0)+11764>>2]=0,o=e[i+4>>2],a=e[i>>2]),f=f+1|0,f>>>0>2];);Dw(e[o+6856>>2]),a=e[i>>2],e[a+44>>2]=13,e[a+48>>2]=1056964608,e[a+36>>2]=0,e[a+40>>2]=1,e[a+28>>2]=16,e[a+32>>2]=44100,e[a+20>>2]=0,e[a+24>>2]=2,e[a+12>>2]=1,e[a+16>>2]=0,e[a+4>>2]=0,e[a+8>>2]=1,a=e[i>>2],e[a+592>>2]=0,e[a+596>>2]=0,e[a+556>>2]=0,e[a+560>>2]=0,e[a+564>>2]=0,e[a+568>>2]=0,e[a+572>>2]=0,e[a+576>>2]=0,e[a+580>>2]=0,e[a+584>>2]=0,e[a+600>>2]=0,e[a+604>>2]=0,o=e[i+4>>2],e[o+7248>>2]=0,e[o+7252>>2]=0,e[o+7048>>2]=0,f=o+7256|0,e[f>>2]=0,e[f+4>>2]=0,f=o+7264|0,e[f>>2]=0,e[f+4>>2]=0,f=o+7272|0,e[f>>2]=0,e[f+4>>2]=0,f=o+7280|0,e[f>>2]=0,e[f+4>>2]=0,e[o+7288>>2]=0,Fm(a+632|0),o=e[i>>2];t:{if(e[o>>2]!=1||(e[o+16>>2]=1,e[o+20>>2]=0,Hd(i,10777),o=e[i>>2],e[o>>2]!=1))break t;e[o+576>>2]=0,e[o+580>>2]=5,e[o+564>>2]=0,e[o+568>>2]=0,e[o+556>>2]=8,e[o+560>>2]=0}n||(e[o>>2]=1),o=!n}return be=h+32|0,o|0}function mu(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0;g=be-48|0,be=g;e:{t:{if(c=e[i>>2],!e[c+12>>2]||(a=e[i+4>>2],a=km(a+7060|0,a+4|0,e[c+24>>2],e[c+36>>2],e[c+28>>2]+7>>>3|0),c=e[i>>2],a))break t;e[c>>2]=8,o=0;break e}a=e[c+576>>2],o?C=0:(o=j8(e[c+36>>2]),c=e[i>>2],f=e[c+580>>2],C=o>>>0>>0?o:f),h=e[c+36>>2],e[g+8>>2]=h,e[g+12>>2]=e[c+32>>2],o=e[c+24>>2],e[g+20>>2]=0,e[g+16>>2]=o,o=e[c+28>>2],e[g+28>>2]=0,e[g+24>>2]=o,f=e[i+4>>2],e[g+32>>2]=e[f+7056>>2],N=a>>>0>>0?a:C;t:{n:{o:{r:{i:{a:{s:{if(!e[c+16>>2]){v=1;break s}if(!e[c+20>>2]|!e[f+6864>>2])break s;if(v=1,E=1,e[f+6868>>2])break a}s:{if(!e[c+24>>2]){a=0;break s}for(;;){E=(l<<2)+f|0,a=0,A=0;l:{if(!h)break l;for(T=e[E+4>>2],o=0;;){u:{if(a=e[T+(o<<2)>>2]|a,m=a&1,o=o+1|0,o>>>0>=h>>>0)break u;if(!m)continue}break}if(o=0,A=0,!a||(A=0,m))break l;for(;o=o+1|0,m=a&2,a=a>>1,!m;);if(m=0,A=0,!o)break l;for(;a=T+(m<<2)|0,e[a>>2]=e[a>>2]>>o,m=m+1|0,(m|0)!=(h|0););A=o}if(o=A,h=ie(l,584)+f|0,a=e[c+28>>2],o=o>>>0>a>>>0?a:o,e[h+624>>2]=o,e[h+916>>2]=o,e[E+216>>2]=a-o,l=l+1|0,a=e[c+24>>2],l>>>0>=a>>>0)break s;h=e[c+36>>2]}}if(o=1,v)break i;h=e[c+36>>2],E=0}m=e[f+36>>2],a=0,l=0;a:{if(!h)break a;for(o=0;;){s:{if(o=e[(l<<2)+m>>2]|o,v=o&1,l=l+1|0,l>>>0>=h>>>0)break s;if(!v)continue}break}if(l=0,v|!o)break a;for(;l=l+1|0,v=o&2,o=o>>1,!v;);if(o=0,!l){l=0;break a}for(;v=(o<<2)+m|0,e[v>>2]=e[v>>2]>>l,o=o+1|0,(h|0)!=(o|0););}o=e[c+28>>2],l=l>>>0>o>>>0?o:l,e[f+5296>>2]=l,e[f+5588>>2]=l,e[f+248>>2]=o-l,l=e[c+36>>2];a:{if(!l)break a;for(h=e[f+40>>2],o=0;;){s:{if(a=e[h+(o<<2)>>2]|a,v=a&1,o=o+1|0,o>>>0>=l>>>0)break s;if(!v)continue}break}if(o=0,!a){a=0;break a}if(v){a=0;break a}for(;o=o+1|0,v=a&2,a=a>>1,!v;);if(a=0,!o)break a;for(;v=h+(a<<2)|0,e[v>>2]=e[v>>2]>>o,a=a+1|0,(l|0)!=(a|0););a=o}if(o=e[c+28>>2],a=a>>>0>o>>>0?o:a,e[f+5880>>2]=a,e[f+6172>>2]=a,e[f+252>>2]=(o-a|0)+1,E)break r;a=e[c+24>>2],o=0}if(c=o,a)for(a=0;o=(a<<2)+f|0,f=(a<<3)+f|0,Gd(i,N,C,g+8|0,e[o+216>>2],e[o+4>>2],f+6176|0,f+6640|0,f+256|0,o+6768|0,o+6808|0),f=e[i+4>>2],a=a+1|0,a>>>0>2]+24>>2];);if(c)break o;m=e[f+36>>2]}Gd(i,N,C,g+8|0,e[f+248>>2],m,f+6240|0,f+6704|0,f+320|0,f+6800|0,f+6840|0),o=e[i+4>>2],Gd(i,N,C,g+8|0,e[o+252>>2],e[o+40>>2],o+6248|0,o+6712|0,o+328|0,o+6804|0,o+6844|0),A=g,o=e[i+4>>2];r:{if(!(!e[e[i>>2]+20>>2]|!e[o+6864>>2])){a=e[o+6868>>2]?3:0;break r}a=e[o+6844>>2],f=e[o+6808>>2],c=a+f|0,l=e[o+6812>>2],f=f+l|0,h=c>>>0>>0,l=a+l|0,f=h?c:f,c=l>>>0>>0,a=a+e[o+6840>>2]>>>0<(c?l:f)>>>0?3:c?2:h}if(e[A+20>>2]=a,!Vm(g+8|0,e[o+6856>>2])){e[e[i>>2]>>2]=7,o=0;break e}f=i,l=e[g+8>>2];r:{i:switch(a|0){default:a=e[i+4>>2],h=0,o=0,c=0,m=0;break r;case 0:a=e[i+4>>2],c=a+336|0,o=c+ie(e[a+6768>>2],292)|0,h=(c+ie(e[a+6772>>2],292)|0)+584|0,c=e[a+216>>2],m=e[a+220>>2];break r;case 1:a=e[i+4>>2],o=(a+ie(e[a+6768>>2],292)|0)+336|0,h=(ie(e[a+6804>>2],292)+a|0)+5592|0,c=e[a+216>>2],m=e[a+252>>2];break r;case 2:a=e[i+4>>2],h=(a+ie(e[a+6772>>2],292)|0)+920|0,o=(ie(e[a+6804>>2],292)+a|0)+5592|0,c=e[a+252>>2],m=e[a+220>>2];break r;case 3:break i}a=e[i+4>>2],c=a+5008|0,o=c+ie(e[a+6800>>2],292)|0,h=(c+ie(e[a+6804>>2],292)|0)+584|0,c=e[a+248>>2],m=e[a+252>>2]}if(!Qd(f,l,c,o,e[a+6856>>2])||!Qd(i,e[g+8>>2],m,h,e[e[i+4>>2]+6856>>2]))break n;o=e[i>>2];break t}if(a=Vm(g+8|0,e[f+6856>>2]),o=e[i>>2],a){if(!e[o+24>>2])break t;for(a=0;;){if(o=e[i+4>>2],f=o+(a<<2)|0,!Qd(i,e[g+8>>2],e[f+216>>2],((o+ie(a,584)|0)+ie(e[f+6768>>2],292)|0)+336|0,e[o+6856>>2]))break n;if(a=a+1|0,o=e[i>>2],!(a>>>0>2]))break}break t}e[o>>2]=7}o=0;break e}e[o+20>>2]&&(o=e[i+4>>2],a=e[o+6864>>2]+1|0,e[o+6864>>2]=a>>>0>2]?a:0),o=e[i+4>>2],e[o+6868>>2]=e[g+20>>2],o=e[o+6856>>2],a=e[o+16>>2]&7,A=1;t:{if(!a)break t;A=as(o,8-a|0)}if(!A){e[e[i>>2]>>2]=8,o=0;break e}t:{if(Bw(e[e[i+4>>2]+6856>>2],g+8|0)&&ht(e[e[i+4>>2]+6856>>2],tn[g+8>>1],e[1404]))break t;e[e[i>>2]>>2]=8,o=0;break e}if(o=0,!Sl(i,e[e[i>>2]+36>>2],n))break e;o=e[i+4>>2],e[o+7052>>2]=0,e[o+7056>>2]=e[o+7056>>2]+1,n=o+6920|0,a=n,A=a,o=e[a+4>>2],i=e[e[i>>2]+36>>2],n=i+e[a>>2]|0,n>>>0>>0&&(o=o+1|0),e[A>>2]=n,e[a+4>>2]=o,o=1}return i=o,be=g+48|0,i}function CA(i,o,n,a,c,f){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,qm(i,0,o,n,a,c,f,0)|0}function qm(i,o,n,a,c,f,l,h){var g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0;T=be-176|0,be=T,m=13,g=e[i>>2];e:{if(e[g>>2]!=1||(m=3,!n|(c?0:a))||(m=4,A=e[g+24>>2],A+-1>>>0>7))break e;t:{n:{if((A|0)!=2){e[g+16>>2]=0;break n}if(e[g+16>>2])break t}e[g+20>>2]=0}if(A=e[g+28>>2],A>>>0>=32){e[g+16>>2]=0,m=5;break e}if(m=5,A+-4>>>0>20)break e;if(e[g+32>>2]+-1>>>0>=655350){m=6;break e}g=e[i>>2],v=e[g+36>>2];t:{if(!v){v=e[g+556>>2]?4096:1152,e[g+36>>2]=v;break t}if(m=7,v+-16>>>0>65519)break e}if(m=8,A=e[g+556>>2],A>>>0>32||(m=10,v>>>0>>0))break e;A=e[g+560>>2];t:{if(!A){E=g,A=e[g+28>>2];n:{if(A>>>0<=15){A=A>>>0>5?(A>>>1|0)+2|0:5;break n}if((A|0)==16){if(A=7,v>>>0<193||(A=8,v>>>0<385)||(A=9,v>>>0<577)||(A=10,v>>>0<1153)||(A=11,v>>>0<2305))break n;A=v>>>0<4609?12:13;break n}if(A=13,v>>>0<385)break n;A=v>>>0<1153?14:15}e[E+560>>2]=A;break t}if(m=9,A+-5>>>0>10)break e}t:{if(!e[g+8>>2]){v=e[g+580>>2];break t}if(m=11,!((v>>>0<4609|ze[g+32>>2]>48e3)&v>>>0<16385)||!R8(e[e[i>>2]+32>>2])||(g=e[i>>2],Xe(e[g+28>>2]+-8|0,30)>>>0>4)||(v=e[g+580>>2],v>>>0>8))break e;if(ze[g+32>>2]>48e3)break t;if(ze[g+36>>2]>4608|ze[g+556>>2]>12)break e}A=1<>>0>=A>>>0&&(v=A+-1|0,e[g+580>>2]=v),ze[g+576>>2]>=v>>>0&&(e[g+576>>2]=v);t:{if(!h||(v=e[g+600>>2],!v)||(E=e[g+604>>2],E>>>0<2))break t;for(m=1;;){if(A=e[(m<<2)+v>>2],!(!A|e[A>>2]!=4)){for(;g=(m<<2)+v|0,m=m+-1|0,e[g>>2]=e[(m<<2)+v>>2],v=e[e[i>>2]+600>>2],!!m;);e[v>>2]=A,g=e[i>>2];break t}if(m=m+1|0,(E|0)==(m|0))break}}E=e[g+604>>2];t:{n:{if(v=e[g+600>>2],v){if(A=0,!E)break t;for(;;){if(g=e[(A<<2)+v>>2],!(!g|e[g>>2]!=3)){e[e[i+4>>2]+7048>>2]=g+16;break n}if(A=A+1|0,(E|0)==(A|0))break}break n}if(m=12,E)break e;A=0;break t}for(g=0,E=0,A=0;;){m=12;n:{o:{r:{i:{a:switch(v=e[(N<<2)+v>>2],e[v>>2]){case 0:break e;case 6:break o;case 5:break r;case 4:break i;case 3:break a;default:break n}if(te)break e;if(te=1,A=E,C=g,T8(v+16|0))break n;break e}if(A=1,C=g,!E)break n;break e}if(A=E,C=g,D8(v+16|0,e[v+160>>2]))break n;break e}if(G=v+16|0,!O8(G))break e;A=E,C=g;o:switch(e[G>>2]+-1|0){case 0:if(ae||(C=e[v+20>>2],Bm(C,10763)&&Bm(C,10773))||e[v+28>>2]!=32)break e;if(ae=1,A=E,C=g,e[v+32>>2]==32)break n;break e;case 1:break o;default:break n}if(C=1,g)break e}if(N=N+1|0,g=e[i>>2],N>>>0>=ze[g+604>>2])break t;v=e[g+600>>2],g=C,E=A}}if(v=0,N=e[i+4>>2],e[N>>2]=0,e[g+24>>2])for(;g=v<<2,e[(g+N|0)+4>>2]=0,e[(g+e[i+4>>2]|0)+7328>>2]=0,e[(g+e[i+4>>2]|0)+44>>2]=0,e[(g+e[i+4>>2]|0)+7368>>2]=0,N=e[i+4>>2],v=v+1|0,v>>>0>2]+24>>2];);if(g=0,e[N+36>>2]=0,e[e[i+4>>2]+7360>>2]=0,e[e[i+4>>2]+76>>2]=0,e[e[i+4>>2]+7400>>2]=0,e[e[i+4>>2]+40>>2]=0,e[e[i+4>>2]+7364>>2]=0,e[e[i+4>>2]+80>>2]=0,e[e[i+4>>2]+7404>>2]=0,m=e[i+4>>2],v=e[i>>2],e[v+40>>2])for(;C=g<<2,e[(C+m|0)+84>>2]=0,e[(C+e[i+4>>2]|0)+7408>>2]=0,m=e[i+4>>2],g=g+1|0,v=e[i>>2],g>>>0>2];);if(g=0,e[m+7536>>2]=0,e[m+212>>2]=0,e[v+24>>2])for(;C=g<<3,e[(C+m|0)+256>>2]=0,e[(C+e[i+4>>2]|0)+7540>>2]=0,e[(C+e[i+4>>2]|0)+260>>2]=0,e[(C+e[i+4>>2]|0)+7544>>2]=0,m=e[i+4>>2],e[(m+(g<<2)|0)+6768>>2]=0,g=g+1|0,g>>>0>2]+24>>2];);e[m+320>>2]=0,e[e[i+4>>2]+7604>>2]=0,e[e[i+4>>2]+324>>2]=0,e[e[i+4>>2]+7608>>2]=0,g=e[i+4>>2],e[g+6800>>2]=0,e[g+328>>2]=0,e[e[i+4>>2]+7612>>2]=0,e[e[i+4>>2]+332>>2]=0,e[e[i+4>>2]+7616>>2]=0,g=e[i+4>>2],e[g+7620>>2]=0,e[g+7624>>2]=0,e[g+6848>>2]=0,e[g+6852>>2]=0,e[g+6804>>2]=0,C=e[i>>2],E=e[C+36>>2],C=e[C+32>>2],e[g+7052>>2]=0,e[g+7056>>2]=0,e[g+6864>>2]=0,m=g,z=+(C>>>0)*.4/+(E>>>0)+.5;t:{if(z<4294967296&z>=0){C=~~z>>>0;break t}C=0}e[m+6860>>2]=C||1,wm(g+7156|0),m=e[i+4>>2],e[m+7244>>2]=12,e[m+7240>>2]=13,e[m+7236>>2]=12,e[m+7228>>2]=14,e[m+7224>>2]=15,e[m+7220>>2]=16,e[m+7232>>2]=17,v=e[i>>2],e[v>>2]=0,e[m+7260>>2]=h;t:{n:{o:{if(h){if(!Ww(v+632|0))break o;v=e[i>>2],m=e[i+4>>2]}if(g=i+4|0,e[m+7276>>2]=n,e[m+7264>>2]=o,e[m+7288>>2]=l,e[m+7280>>2]=f,e[m+7272>>2]=c,e[m+7268>>2]=a,o=e[v+36>>2],ze[m>>2]>>0){a=o+5|0;r:{i:{a:{if(e[v+24>>2])for(n=0;;){if(f=n<<2,c=f+e[g>>2]|0,l=ui(a,c+7328|0,c+4|0),c=e[(f+e[g>>2]|0)+4>>2],e[c>>2]=0,e[c+4>>2]=0,e[c+8>>2]=0,e[c+12>>2]=0,c=(f+e[g>>2]|0)+4|0,e[c>>2]=e[c>>2]+16,!l)break a;if(n=n+1|0,!(n>>>0>2]+24>>2]))break}if(n=e[g>>2],c=ui(a,n+7360|0,n+36|0),n=e[e[g>>2]+36>>2],e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,e[n+12>>2]=0,n=e[g>>2],e[n+36>>2]=e[n+36>>2]+16,c?(n=e[g>>2],a=ui(a,n+7364|0,n+40|0),n=e[e[g>>2]+40>>2],e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,e[n+12>>2]=0,n=e[g>>2]+40|0,e[n>>2]=e[n>>2]+16,n=(a|0)!=0):n=(c|0)!=0,!n)break a;if(a=e[i>>2],e[a+556>>2]){if(n=e[g>>2],e[a+40>>2])for(m=0;;){if(n=(m<<2)+n|0,!ui(o,n+7408|0,n+84|0))break a;if(n=e[i+4>>2],m=m+1|0,!(m>>>0>2]+40>>2]))break}if(!ui(o,n+7536|0,n+212|0))break a}for(l=0,v=1,f=0;;){if(f>>>0>2]+24>>2]){for(m=0,n=1,a=0;;){if(m&1)break a;if(a=(e[g>>2]+(f<<3)|0)+(a<<2)|0,c=ui(o,a+7540|0,a+256|0),h=n&(c|0)!=0,m=!c,a=1,n=0,!h)break}if(f=f+1|0,c)continue;break a}break}for(h=1;;){if(m=0,n=1,a=0,!h)break a;for(;;){if(m&1)break a;if(a=(e[g>>2]+(l<<3)|0)+(a<<2)|0,c=ui(o,a+7604|0,a+320|0),f=n&(c|0)!=0,m=!c,a=1,n=0,!f)break}if(h=(c|0)!=0,n=v&h,l=1,v=0,!n)break}if(!c)break a;if(a=o<<1,n=e[i+4>>2],n=gw(a,n+7620|0,n+6848|0),m=e[i>>2],c=e[m+572>>2],!c|!n)break i;if(n=e[g>>2],ui(a,n+7624|0,n+6852|0))break r}m=e[i>>2];break t}if(c|!n)break t}m=e[g>>2];r:{if((o|0)==e[m>>2]||(n=e[i>>2],!e[n+556>>2]|!e[n+40>>2]))break r;for(m=0;;){i:{a:{s:{l:{u:{f:{c:{d:{p:{h:{m:{g:{b:{v:{k:{y:{_:{w:{A:switch(n=(m<<4)+n|0,e[n+44>>2]){case 16:break s;case 15:break l;case 14:break u;case 13:break f;case 12:break c;case 11:break d;case 10:break p;case 9:break h;case 8:break m;case 7:break g;case 6:break b;case 5:break v;case 4:break k;case 3:break y;case 2:break _;case 1:break w;case 0:break A;default:break a}Xw(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}qw(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}Zw(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}Jw(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}$w(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}eA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}tA(e[(e[g>>2]+(m<<2)|0)+84>>2],o,Ze[n+48>>2]);break i}nA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}zm(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}rA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}oA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}iA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}aA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}sA(e[(e[g>>2]+(m<<2)|0)+84>>2],o,Ze[n+48>>2]);break i}lA(e[(e[g>>2]+(m<<2)|0)+84>>2],o,Ze[n+48>>2],Ze[n+52>>2],Ze[n+56>>2]);break i}cA(e[(e[g>>2]+(m<<2)|0)+84>>2],o,Ze[n+48>>2],Ze[n+52>>2],Ze[n+56>>2]);break i}uA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}zm(e[(e[g>>2]+(m<<2)|0)+84>>2],o)}if(m=m+1|0,n=e[i>>2],!(m>>>0>2]))break}m=e[g>>2]}e[m>>2]=o}if(o=Ow(e[m+6856>>2]),a=e[i>>2],!o){e[a>>2]=8,m=1;break e}if(e[a+4>>2]){m=1,n=e[g>>2],o=e[a+36>>2]+1|0,e[n+11796>>2]=o;r:{if(!e[a+24>>2])break r;if(o=pu(4,o),e[e[i+4>>2]+11764>>2]=o,a=e[i>>2],o)for(;;){if(n=e[g>>2],m>>>0>=ze[a+24>>2])break r;if(o=pu(4,e[n+11796>>2]),e[(e[i+4>>2]+(m<<2)|0)+11764>>2]=o,m=m+1|0,a=e[i>>2],!o)break}e[a>>2]=8,m=1;break e}e[n+11800>>2]=0;r:{if(n=e[n+11752>>2],n||(n=Cm(),e[e[g>>2]+11752>>2]=n,n))break r;e[e[i>>2]>>2]=3,m=1;break e}if(o=Sm(n,18,0,0,0,0,19,20,21,i),a=e[i>>2],o)break n;n=!e[a+4>>2]}else n=1;if(o=e[g>>2],e[o+7312>>2]=0,e[o+7316>>2]=0,e[o+7292>>2]=0,c=o+11816|0,e[c>>2]=0,e[c+4>>2]=0,c=o+11824|0,e[c>>2]=0,e[c+4>>2]=0,c=o+11832|0,e[c>>2]=0,e[c+4>>2]=0,e[o+11840>>2]=0,e[a+624>>2]=0,e[a+628>>2]=0,e[a+616>>2]=0,e[a+620>>2]=0,e[a+608>>2]=0,e[a+612>>2]=0,n||(e[o+11756>>2]=0),!ht(e[o+6856>>2],e[1354],e[1355])){e[e[i>>2]>>2]=7,m=1;break e}if(m=1,!Sl(i,0,0))break e;if(o=e[i+4>>2],n=e[i>>2],e[n+4>>2]&&(e[o+11756>>2]=1),e[o+6872>>2]=0,e[o+6876>>2]=0,e[o+6880>>2]=34,e[o+6888>>2]=e[n+36>>2],e[e[i+4>>2]+6892>>2]=e[e[i>>2]+36>>2],e[e[i+4>>2]+6896>>2]=0,e[e[i+4>>2]+6900>>2]=0,e[e[i+4>>2]+6904>>2]=e[e[i>>2]+32>>2],e[e[i+4>>2]+6908>>2]=e[e[i>>2]+24>>2],e[e[i+4>>2]+6912>>2]=e[e[i>>2]+28>>2],o=e[i>>2],n=e[o+596>>2],a=e[i+4>>2]+6920|0,e[a>>2]=e[o+592>>2],e[a+4>>2]=n,o=e[i+4>>2],n=o+6936|0,e[n>>2]=0,e[n+4>>2]=0,o=o+6928|0,e[o>>2]=0,e[o+4>>2]=0,e[e[i>>2]+12>>2]&&bm(e[g>>2]+7060|0),o=e[g>>2],!Vd(o+6872|0,e[o+6856>>2])){e[e[i>>2]>>2]=7;break e}if(!Sl(i,0,0))break e;if(e[e[g>>2]+6896>>2]=-1<>2]+6920|0,e[o>>2]=0,e[o+4>>2]=0,!A){if(e[T>>2]=4,n=e[e[i>>2]+604>>2],o=T,e[o+24>>2]=0,e[o+28>>2]=0,e[o+16>>2]=0,e[o+20>>2]=0,e[o+8>>2]=8,e[o+4>>2]=!n,!Vd(o,e[e[i+4>>2]+6856>>2])){e[e[i>>2]>>2]=7;break e}if(!Sl(i,0,0))break e}r:{if(a=e[i>>2],c=e[a+604>>2],!c)break r;for(n=0;;){if(o=e[e[a+600>>2]+(n<<2)>>2],e[o+4>>2]=(c+-1|0)==(n|0),!Vd(o,e[e[g>>2]+6856>>2])){e[e[i>>2]>>2]=7;break e}if(Sl(i,0,0)){if(n=n+1|0,a=e[i>>2],c=e[a+604>>2],n>>>0>=c>>>0)break r;continue}break}break e}r:{if(o=e[g>>2],n=e[o+7272>>2],!n||(o=Le[n](i,a+624|0,e[o+7288>>2])|0,a=e[i>>2],(o|0)!=1))break r;e[a>>2]=5;break e}if(m=0,!e[a+4>>2])break e;e[e[g>>2]+11756>>2]=2;break e}e[e[i>>2]>>2]=2,m=1;break e}e[a>>2]=3,m=1;break e}e[m>>2]=8,m=1}return be=T+176|0,m}function xA(i,o,n,a,c,f,l){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0;var h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0;A=1<>>0>1?A:1,g=0-a|0,C=n+a>>>f|0,m=C-a|0;e:{if(l+4>>>0<(Kt(C)^-32)+33>>>0){for(l=0;;){if(a=0,g=g+C|0,h>>>0>>0){for(;n=e[(h<<2)+i>>2],v=n>>31,a=(v^n+v)+a|0,h=h+1|0,h>>>0>>0;);h=m}if(n=(l<<3)+o|0,e[n>>2]=a,e[n+4>>2]=0,m=m+C|0,l=l+1|0,(N|0)==(l|0))break}break e}for(n=0;;){if(E=0,a=0,g=g+C|0,h>>>0>>0){for(;l=e[(h<<2)+i>>2],v=l>>31,v=v^l+v,l=v+E|0,l>>>0>>0&&(a=a+1|0),E=l,h=h+1|0,h>>>0>>0;);h=m}if(l=(n<<3)+o|0,e[l>>2]=E,e[l+4>>2]=a,m=m+C|0,n=n+1|0,(N|0)==(n|0))break}}if((f|0)>(c|0))for(h=0,i=A;;){if(f=f+-1|0,g=0,i=i>>>1|0,i)for(;a=(h<<3)+o|0,n=e[a+8>>2],m=e[a+12>>2]+e[a+4>>2]|0,a=e[a>>2],n=a+n|0,n>>>0>>0&&(m=m+1|0),l=(A<<3)+o|0,e[l>>2]=n,e[l+4>>2]=m,h=h+2|0,A=A+1|0,g=g+1|0,(g|0)!=(i|0););if(!((f|0)>(c|0)))break}}function SA(i,o,n,a){i=i|0,o=o|0,n=n|0,a=a|0;var c=0,f=0;return f=e[a+4>>2],e[f+11760>>2]?(e[n>>2]=4,i=H[5409]|H[5410]<<8|(H[5411]<<16|H[5412]<<24),K[o|0]=i,K[o+1|0]=i>>>8,K[o+2|0]=i>>>16,K[o+3|0]=i>>>24,e[e[a+4>>2]+11760>>2]=0,0):(i=e[f+11812>>2],i?(c=e[n>>2],i>>>0>>0&&(e[n>>2]=i,c=i),gn(o,e[f+11804>>2],c),i=e[a+4>>2],o=i+11804|0,a=o,c=e[o>>2],o=e[n>>2],e[a>>2]=c+o,i=i+11812|0,e[i>>2]=e[i>>2]-o,0):2)}function EA(i,o,n,a){i=i|0,o=o|0,n=n|0,a=a|0;var c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0;if(h=e[o>>2],f=e[a+4>>2],i=e[o+8>>2],i){for(c=h<<2;;){if(g=l<<2,m=e[g+n>>2],v=e[(f+g|0)+11764>>2],du(m,v,c)){c=0;e:{if(h)for(i=0;;){if(n=i<<2,g=e[n+m>>2],n=e[n+v>>2],(g|0)!=(n|0)){c=i;break e}if(i=i+1|0,(h|0)==(i|0))break}n=0,g=0}return m=e[o+28>>2],i=c,A=i+e[o+24>>2]|0,A>>>0>>0&&(m=m+1|0),v=f+11816|0,e[v>>2]=A,e[v+4>>2]=m,i=e[o+28>>2],o=e[o+24>>2],e[f+11840>>2]=g,e[f+11836>>2]=n,e[f+11832>>2]=c,e[f+11828>>2]=l,C=f+11824|0,E=$m(o,i,h),e[C>>2]=E,e[e[a>>2]>>2]=4,1}if(l=l+1|0,(i|0)==(l|0))break}n=f+11800|0,o=e[n>>2]-h|0,e[n>>2]=o;e:{if(!i||(n=e[f+11764>>2],c=n,n=h<<2,Go(c,c+n|0,o<<2),l=1,(i|0)==1))break e;for(;o=e[a+4>>2],c=e[(o+(l<<2)|0)+11764>>2],Go(c,n+c|0,e[o+11800>>2]<<2),l=l+1|0,(i|0)!=(l|0););}return 0}return i=f+11800|0,e[i>>2]=e[i>>2]-h,0}function PA(i,o,n){}function MA(i,o,n){n=n|0,e[e[n>>2]>>2]=3}function Sl(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0;f=be-16|0,be=f,c=Bd(e[e[i+4>>2]+6856>>2],f+4|0,f),a=e[i>>2];e:{t:{if(!c){e[a>>2]=8;break t}n:{if(!e[a+4>>2])break n;if(a=e[i+4>>2],e[a+11804>>2]=e[f+4>>2],e[a+11812>>2]=e[f>>2],!e[a+11756>>2]){e[a+11760>>2]=1;break n}if(Mm(e[a+11752>>2]))break n;if(Od(e[e[i+4>>2]+6856>>2]),i=e[i>>2],e[i>>2]==4)break e;e[i>>2]=3;break e}C=e[f>>2],N=e[f+4>>2],e[f+8>>2]=0,e[f+12>>2]=0;n:{o:{if(a=e[i+4>>2],c=e[a+7272>>2],!c||(Le[c](i,f+8|0,e[a+7288>>2])|0)!=1)break o;break n}o:{if(o)break o;r:switch(H[N|0]&127){case 0:a=e[f+12>>2],c=e[i>>2],e[c+608>>2]=e[f+8>>2],e[c+612>>2]=a;break o;case 3:break r;default:break o}if(a=e[i>>2],e[a+616>>2]|e[a+620>>2])break o;c=e[f+12>>2],e[a+616>>2]=e[f+8>>2],e[a+620>>2]=c}l=e[i+4>>2],h=e[l+7048>>2];o:{if(!h||(g=e[i>>2],c=g,a=e[c+628>>2],T=e[c+624>>2],!(a|T))||(z=e[h>>2],!z)||(v=e[l+7292>>2],v>>>0>=z>>>0))break o;for(E=e[l+7316>>2],c=E,G=e[l+7312>>2],te=e[g+36>>2],g=te,m=G+g|0,m>>>0>>0&&(c=c+1|0),c=c+-1|0,A=c+1|0,g=c,c=m+-1|0,g=(c|0)!=-1?A:g,ae=e[h+4>>2];;){if(h=ae+ie(v,24)|0,A=e[h>>2],m=e[h+4>>2],(g|0)==(m|0)&A>>>0>c>>>0|m>>>0>g>>>0)break o;if((m|0)==(E|0)&A>>>0>=G>>>0|m>>>0>E>>>0&&(e[h>>2]=G,e[h+4>>2]=E,m=e[f+8>>2],A=e[f+12>>2],e[h+16>>2]=te,e[h+8>>2]=m-T,e[h+12>>2]=A-(a+(m>>>0>>0)|0)),v=v+1|0,e[l+7292>>2]=v,(v|0)==(z|0))break}}o:{if(e[l+7260>>2]){n=Uw(e[i>>2]+632|0,N,C,o,e[l+7056>>2],n,e[l+7276>>2],i,e[l+7288>>2]);break o}n=Le[e[l+7276>>2]](i,N,C,o,e[l+7056>>2],e[l+7288>>2])|0}if(!n){if(n=e[i+4>>2],a=n,g=a,c=e[a+7308>>2],l=C+e[a+7304>>2]|0,l>>>0>>0&&(c=c+1|0),e[g+7304>>2]=l,e[a+7308>>2]=c,a=e[n+7316>>2],c=e[n+7312>>2]+o|0,c>>>0>>0&&(a=a+1|0),e[n+7312>>2]=c,e[n+7316>>2]=a,v=1,c=n,a=e[n+7320>>2],n=e[n+7056>>2]+1|0,e[c+7320>>2]=a>>>0>n>>>0?a:n,Od(e[e[i+4>>2]+6856>>2]),!o)break e;o=e[i+4>>2]+6896|0,n=e[o>>2],c=o,o=e[f>>2],e[c>>2]=o>>>0>>0?o:n,n=e[i+4>>2]+6900|0,i=e[n>>2],e[n>>2]=o>>>0>i>>>0?o:i;break e}}e[e[i>>2]>>2]=5,Od(e[e[i+4>>2]+6856>>2]),e[e[i>>2]>>2]=5}v=0}return be=f+16|0,v}function IA(i,o,n,a,c,f,l){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0,qm(i,o,n,a,c,f,l,1)|0}function Gd(i,o,n,a,c,f,l,h,g,m,v){var A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,bt=0,_t=0,xt=0,Pt=0,It=ue(0),Lt=0,Bt=0,Wt=0,Ht=0,ln=0,On=0,cr=ue(0),zr=0,Vr=0,Zr=0,fi=0,us=0,tg=0;N=be-576|0,be=N,Be=e[(ze[e[i>>2]+28>>2]>16?5644:5640)>>2],C=e[a>>2];e:{t:{if(e[e[i+4>>2]+7256>>2]&&(A=-1,C>>>0>3))break t;if(z=e[l>>2],e[z+4>>2]=f,e[z>>2]=1,A=e[z+288>>2]+(e[1416]+(e[1415]+(e[1414]+ie(c,C)|0)|0)|0)|0,C=e[a>>2],C>>>0<4)break e}E=e[i+4>>2],z=C+-4|0;t:{if(((Kt(z|1)^31)+c|0)+4>>>0<=32){E=Le[e[E+7224>>2]](f+16|0,z,N+416|0)|0;break t}E=Le[e[E+7228>>2]](f+16|0,z,N+416|0)|0}t:{n:{o:{r:{if(T=e[i+4>>2],e[T+7248>>2]|Ze[N+420>>2]!=ue(0))break r;if(C=1,G=e[f>>2],z=e[a>>2],z>>>0<=1)break o;for(;;){if((G|0)!=e[(C<<2)+f>>2])break r;if(C=C+1|0,!(C>>>0>>0))break}break o}if(C=e[i>>2],!e[T+7252>>2]){z=A;break n}if(z=-1,(A|0)!=-1){z=A;break t}if(!e[C+556>>2])break n;z=A;break t}i=e[l+4>>2],e[i+4>>2]=G,e[i>>2]=0,i=e[i+288>>2]+(e[1416]+(e[1415]+(e[1414]+c|0)|0)|0)|0,ae=i>>>0>>0,A=ae?i:A;break e}if(A=e[C+568>>2],te=A?0:E,E=A?4:E,A=e[a>>2],at=E>>>0>>0?E:A+-1|0,te>>>0>at>>>0)break t;for(_t=Be+-1|0,xt=e[1416],st=e[1415],Pt=e[1414],cr=ue(c>>>0);;){if(C=te<<2,It=Ze[C+(N+416|0)>>2],!(It>=cr)){bt=!ae,G=bt<<2,Lt=e[G+h>>2],ke=e[l+G>>2],Ee=e[e[i>>2]+572>>2],A=e[i+4>>2],E=e[A+6852>>2],T=e[A+6848>>2],A=f+C|0,C=e[a>>2]-te|0,G=e[g+G>>2],kw(A,C,te,G),e[ke+36>>2]=G,e[ke+12>>2]=Lt,e[ke>>2]=2,e[ke+4>>2]=0,Bt=It>ue(0),je=e[i+4>>2],Se=te,Qe=+It+.5;n:{if(Qe<4294967296&Qe>=0){A=~~Qe>>>0;break n}A=0}if(A=Bt?A+1|0:1,T=Zm(je,G,T,E,C,Se,A>>>0>>0?A:_t,Be,o,n,c,Ee,ke+4|0),e[ke+16>>2]=te,te)for(E=ke+20|0,A=0;C=A<<2,e[C+E>>2]=e[f+C>>2],A=A+1|0,(te|0)!=(A|0););A=e[ke+288>>2]+(xt+(st+(Pt+(T+ie(c,te)|0)|0)|0)|0)|0,C=A>>>0>>0,ae=C?bt:ae,z=C?A:z}if(te=te+1|0,!(te>>>0<=at>>>0))break}C=e[i>>2]}if(E=e[C+556>>2],!E){A=z;break e}if(A=e[a>>2],E=E>>>0>>0?E:A+-1|0,e[N+12>>2]=E,!E){A=z;break e}if(!e[C+40>>2]){A=z;break e}for(ln=33-c|0,zr=Be+-1|0,Vr=e[1413],Zr=e[1412],fi=e[1416],ke=e[1415],us=e[1414],Qe=+(c>>>0),at=c>>>0<18,_t=c>>>0>16,xt=c>>>0>17;;){C=e[i+4>>2],ow(f,e[(C+(Wt<<2)|0)+84>>2],e[C+212>>2],A),A=e[i+4>>2],Le[e[A+7232>>2]](e[A+212>>2],e[a>>2],e[N+12>>2]+1|0,N+272|0);t:{if(Ze[N+272>>2]==ue(0)||(aw(N+272|0,N+12|0,e[i+4>>2]+7628|0,N+16|0),T=1,C=e[N+12>>2],G=e[i>>2],e[G+568>>2]||(A=N,C=pw(A+16|0,C,e[a>>2],(e[G+564>>2]?5:e[G+560>>2])+c|0),e[A+12>>2]=C,T=C),A=e[a>>2],C>>>0>=A>>>0&&(C=A+-1|0,e[N+12>>2]=C),T>>>0>C>>>0))break t;for(;;){n:{if(st=T+-1|0,Te=dw(it[(N+16|0)+(st<<3)>>3],A-T|0),Te>=Qe)break n;A=Te>0,Te=Te+.5;o:{if(Te<4294967296&Te>=0){E=~~Te>>>0;break o}E=0}E=A?E+1|0:1,A=E>>>0>>0,C=e[i>>2];o:{if(e[C+564>>2]){if(Se=5,je=15,xt||(G=(Kt(T)^-32)+ln|0,G>>>0>14))break o;je=G>>>0>5?G:5;break o}je=e[C+560>>2],Se=je}for(Pt=A?E:zr,Ht=(T<<2)+f|0,A=Kt(T),bt=A^31,On=(A^-32)+ln|0;;){if(Ee=e[a>>2],E=!ae,A=E<<2,Bt=e[A+h>>2],pe=e[l+A>>2],Ye=e[g+A>>2],Lt=e[C+572>>2],C=e[i+4>>2],te=e[C+6852>>2],G=e[C+6848>>2],A=0,tg=ae,ae=(C+(st<<7)|0)+7628|0,C=at?On>>>0>Se>>>0?Se:On:Se,!sw(ae,T,C,N+448|0,N+444|0)){Ee=Ee-T|0,ae=c+C|0;o:{if(ae+bt>>>0<=32){if(A=e[i+4>>2],!(C>>>0>16|_t)){Le[e[A+7244>>2]](Ht,Ee,N+448|0,T,e[N+444>>2],Ye);break o}Le[e[A+7236>>2]](Ht,Ee,N+448|0,T,e[N+444>>2],Ye);break o}Le[e[e[i+4>>2]+7240>>2]](Ht,Ee,N+448|0,T,e[N+444>>2],Ye)}if(e[pe>>2]=3,e[pe+4>>2]=0,e[pe+284>>2]=Ye,e[pe+12>>2]=Bt,te=Zm(e[i+4>>2],Ye,G,te,Ee,T,Pt,Be,o,n,c,Lt,pe+4|0),e[pe+20>>2]=C,e[pe+16>>2]=T,e[pe+24>>2]=e[N+444>>2],gn(pe+28|0,N+448|0,128),A=0,T)for(;G=A<<2,e[(G+pe|0)+156>>2]=e[f+G>>2],A=A+1|0,(T|0)!=(A|0););A=((e[pe+288>>2]+((((te+ie(T,ae)|0)+us|0)+ke|0)+fi|0)|0)+Zr|0)+Vr|0}if(C=(A|0)!=0&A>>>0>>0,ae=C?E:tg,z=C?A:z,Se=Se+1|0,Se>>>0>je>>>0)break n;C=e[i>>2]}}if(T=T+1|0,T>>>0>ze[N+12>>2])break t;A=e[a>>2]}}if(Wt=Wt+1|0,Wt>>>0>2]+40>>2]){A=e[a>>2];continue}break}A=z}(A|0)==-1&&(i=e[a>>2],o=e[(ae<<2)+l>>2],e[o+4>>2]=f,e[o>>2]=1,A=e[o+288>>2]+(e[1416]+(e[1415]+(e[1414]+ie(i,c)|0)|0)|0)|0),e[m>>2]=ae,e[v>>2]=A,be=N+576|0}function Qd(i,o,n,a,c){var f=0;f=1;e:{t:{n:switch(e[a>>2]){case 0:if(fA(a+4|0,n,e[a+288>>2],c))break e;break t;case 2:if(dA(a+4|0,o-e[a+16>>2]|0,n,e[a+288>>2],c))break e;break t;case 3:if(pA(a+4|0,o-e[a+16>>2]|0,n,e[a+288>>2],c))break e;break t;case 1:break n;default:break e}if(hA(a+4|0,o,n,e[a+288>>2],c))break e}e[e[i>>2]>>2]=7,f=0}return f}function NA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+632>>2]=o,i=1):i=0,i|0}function RA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+4>>2]=o,i=1):i=0,i|0}function TA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+24>>2]=o,i=1):i=0,i|0}function FA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+28>>2]=o,i=1):i=0,i|0}function LA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+32>>2]=o,i=1):i=0,i|0}function DA(i,o){i=i|0,o=o|0;var n=0,a=0,c=0;return a=e[i>>2],e[a>>2]==1?(n=ie(o>>>0<8?o:8,44),o=n+11184|0,c=e[o+4>>2],e[a+16>>2]=e[o>>2],e[a+20>>2]=c,a=Hd(i,e[o+40>>2]),o=0,i=e[i>>2],e[i>>2]==1?(o=n+11184|0,n=e[o+32>>2],e[i+576>>2]=e[o+28>>2],e[i+580>>2]=n,e[i+568>>2]=e[o+24>>2],e[i+564>>2]=e[o+16>>2],n=e[o+12>>2],e[i+556>>2]=e[o+8>>2],e[i+560>>2]=n,o=a&1,i=1):i=0,i=i&o):i=0,i|0}function OA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+36>>2]=o,i=1):i=0,i|0}function BA(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=0;return i=e[i>>2],e[i>>2]==1?(l=n,h=i,g=o,c=e[1363],a=c&31,32<=(c&63)>>>0?(c=-1<>>32-a|-1<>>0>o>>>0|a>>>0>n>>>0,e[h+592>>2]=o?g:f,e[i+596>>2]=o?l:a,i=1):i=0,i}function jA(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0;if(a=e[i>>2],e[a>>2]==1){if(c=e[a+600>>2],c&&(Me(c),a=e[i>>2],e[a+600>>2]=0,e[a+604>>2]=0),n=o?n:0,n){if(a=pu(4,n),!a)return 0;o=gn(a,o,n<<2),a=e[i>>2],e[a+604>>2]=n,e[a+600>>2]=o}i=a+632|0,n>>>e[1886]?i=0:(e[i+4>>2]=n,i=1),i=(i|0)!=0}else i=0;return i|0}function zA(i){return i=i|0,e[e[i>>2]+4>>2]?Fd(e[e[i+4>>2]+11752>>2])|0:9}function VA(i){return i=i|0,e[e[i>>2]+4>>2]}function WA(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0,G=0,te=0;f=e[i>>2],A=e[f+36>>2],z=A+1|0,c=e[i+4>>2],v=e[f+24>>2],E=A<<2;e:{for(;;){if(a=z-e[c+7052>>2]|0,l=n-h|0,l=a>>>0>>0?a:l,e[f+4>>2]){if(v)for(f=l<<2,a=0;g=a<<2,gn(e[(g+c|0)+11764>>2]+(e[c+11800>>2]<<2)|0,e[o+g>>2]+(h<<2)|0,f),a=a+1|0,(v|0)!=(a|0););c=c+11800|0,e[c>>2]=e[c>>2]+l}if(v)for(f=l<<2,c=0,a=0;;){if(g=a<<2,C=e[g+o>>2],!C)break e;if(m=g,g=e[i+4>>2],gn(e[(m+g|0)+4>>2]+(e[g+7052>>2]<<2)|0,C+(h<<2)|0,f),a=a+1|0,(v|0)==(a|0))break}f=e[i>>2];t:{if(e[f+16>>2]){if(c=e[i+4>>2],h>>>0>=n>>>0||(a=e[c+7052>>2],a>>>0>A>>>0))break t;for(g=e[c+40>>2],C=e[c+36>>2],G=e[o+4>>2],te=e[o>>2];;){if(N=a<<2,m=h<<2,T=m+te|0,m=m+G|0,e[N+g>>2]=e[T>>2]-e[m>>2],e[C+N>>2]=e[m>>2]+e[T>>2]>>1,h=h+1|0,h>>>0>=n>>>0)break t;if(a=a+1|0,!(a>>>0<=A>>>0))break}break t}h=h+l|0,c=e[i+4>>2]}if(a=e[c+7052>>2]+l|0,e[c+7052>>2]=a,a>>>0>A>>>0){if(c=0,!mu(i,0,0))break e;if(v)for(c=e[i+4>>2],a=0;l=e[(c+(a<<2)|0)+4>>2],e[l>>2]=e[l+E>>2],a=a+1|0,(v|0)!=(a|0););c=e[i+4>>2],f=e[i>>2],e[f+16>>2]&&(a=e[c+36>>2],e[a>>2]=e[a+E>>2],a=e[c+40>>2],e[a>>2]=e[a+E>>2]),e[c+7052>>2]=1}if(!(h>>>0>>0))break}c=1}return c|0}function UA(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,N=0,T=0,z=0;a=e[i>>2],m=e[a+36>>2],z=m+1|0;e:{t:{if(v=e[a+24>>2],!(!e[a+16>>2]|(v|0)!=2))for(;;){if(c=e[i+4>>2],e[a+4>>2]){a=e[c+11800>>2],f=z-e[c+7052>>2]|0,l=n-h|0,g=f>>>0>>0?f:l;n:{if(!g)break n;if(!v){a=a+g|0;break n}for(f=h<<1,A=e[c+11768>>2],T=e[c+11764>>2],l=0;E=a<<2,N=f<<2,e[E+T>>2]=e[N+o>>2],e[A+E>>2]=e[(N|4)+o>>2],a=a+1|0,f=f+2|0,l=l+1|0,(g|0)!=(l|0););}e[c+11800>>2]=a}f=h>>>0>>0,a=e[c+7052>>2];n:{if(a>>>0>m>>>0|h>>>0>=n>>>0)break n;for(A=e[c+40>>2],T=e[c+8>>2],E=e[c+36>>2],N=e[c+4>>2];;){if(f=a<<2,g=(C<<2)+o|0,l=e[g>>2],e[f+N>>2]=l,g=e[g+4>>2],e[f+T>>2]=g,e[f+A>>2]=l-g,e[f+E>>2]=l+g>>1,a=a+1|0,C=C+2|0,h=h+1|0,f=h>>>0>>0,h>>>0>=n>>>0)break n;if(!(a>>>0<=m>>>0))break}}if(e[c+7052>>2]=a,a>>>0>m>>>0){if(a=0,!mu(i,0,0))break e;a=e[i+4>>2],l=e[a+4>>2],c=l,l=m<<2,e[c>>2]=e[c+l>>2],c=e[a+8>>2],e[c>>2]=e[c+l>>2],c=e[a+36>>2],e[c>>2]=e[c+l>>2],c=e[a+40>>2],e[c>>2]=e[c+l>>2],e[a+7052>>2]=1}if(!f)break t;a=e[i>>2]}for(;;){if(h=e[i+4>>2],e[a+4>>2]){l=e[h+11800>>2],a=z-e[h+7052>>2]|0,f=n-c|0,g=a>>>0>>0?a:f;n:{if(!g)break n;if(!v){l=l+g|0;break n}for(f=ie(c,v),A=0;;){for(a=0;e[e[(h+(a<<2)|0)+11764>>2]+(l<<2)>>2]=e[(f<<2)+o>>2],f=f+1|0,a=a+1|0,(v|0)!=(a|0););if(l=l+1|0,A=A+1|0,(g|0)==(A|0))break}}e[h+11800>>2]=l}l=c>>>0>>0,f=e[h+7052>>2];n:{if(f>>>0>m>>>0|c>>>0>=n>>>0)break n;if(v)for(;;){for(a=0;e[e[(h+(a<<2)|0)+4>>2]+(f<<2)>>2]=e[(C<<2)+o>>2],C=C+1|0,a=a+1|0,(v|0)!=(a|0););if(f=f+1|0,c=c+1|0,l=c>>>0>>0,c>>>0>=n>>>0)break n;if(!(f>>>0<=m>>>0))break n}for(;;){if(f=f+1|0,c=c+1|0,l=c>>>0>>0,c>>>0>=n>>>0)break n;if(!(f>>>0<=m>>>0))break}}if(e[h+7052>>2]=f,f>>>0>m>>>0){if(a=0,!mu(i,0,0))break e;if(f=e[i+4>>2],v)for(a=0;h=e[(f+(a<<2)|0)+4>>2],e[h>>2]=e[h+(m<<2)>>2],a=a+1|0,(v|0)!=(a|0););e[f+7052>>2]=1}if(!l)break t;a=e[i>>2]}}a=1}return a|0}function Zm(i,o,n,a,c,f,l,h,g,m,v,A,C){var E=0,N=0,T=0,z=0,G=0,te=0,ae=0,pe=0,ke=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,bt=0,_t=0,xt=0,Pt=0,It=0,Lt=0,Bt=0,Wt=0,Ht=0,ln=0;je=c+f|0,N=B8(m,je,f),Se=N>>>0>g>>>0?g:N,Le[e[i+7220>>2]](o,n,c,f,Se,N,v);e:{if(!A)break e;if(v=0,g=0,(N|0)>=0)for(g=1<>>0>1?g:1,z=je>>>N|0;;){G=0,m=E,te=0,Qe=(T<<2)+a|0;t:{n:{if(Ee=T?0:f,ae=z-Ee|0,!ae)break n;for(;ke=G,G=e[(m<<2)+o>>2],G=ke|G>>31^G,m=m+1|0,te=te+1|0,(ae|0)!=(te|0););if(E=(E+z|0)-Ee|0,!G)break n;m=(Kt(G)^31)+2|0;break t}m=1}if(e[Qe>>2]=m,T=T+1|0,(pe|0)==(T|0))break}if((N|0)<=(Se|0))break e;for(o=N;;){for(o=o+-1|0,m=0;E=(v<<2)+a|0,T=e[E>>2],E=e[E+4>>2],e[(g<<2)+a>>2]=T>>>0>E>>>0?T:E,g=g+1|0,v=v+2|0,m=m+1|0,!(m>>>o););if(!((o|0)>(Se|0)))break}}e:{if((N|0)<(Se|0)){e[C+4>>2]=0,n=6;break e}for(Ye=e[1407],ln=Ye+(ie(l+1|0,c)-(c>>>1|0)|0)|0,It=h+-1|0,Lt=e[1409]+e[1408]|0,Ee=e[1406]+e[1405]|0,Qe=l+-1|0;;){t:{pe=N,Bt=!at,o=ie(Bt,12)+i|0,g=o+11724|0,Nd(g,N>>>0>6?N:6),Wt=(st<<2)+a|0,Be=(st<<3)+n|0,Ht=e[o+11728>>2],bt=e[g>>2];n:{if(N){if(_t=je>>>pe|0,_t>>>0<=f>>>0)break t;if(te=0,xt=0,ke=Ee,!A)for(;;){G=_t-(te?0:f)|0,o=Be+(te<<3)|0,E=e[o+4>>2],z=e[o>>2];o:{if(!E&z>>>0>=268435457|E>>>0>0){o=G,v=0,g=0;r:{if((E|0)==16777216&z>>>0>0|E>>>0>16777216){N=o,m=0;break r}if(N=o,m=0,T=o>>>25|0,ae=o<<7,(E|0)==(T|0)&ae>>>0>=z>>>0|T>>>0>E>>>0)break r;for(;g=g+8|0,T=v<<15|o>>>17,ae=o<<15,m=v<<8|o>>>24,N=o<<8,o=N,v=m,!!((E|0)==(T|0)&ae>>>0>>0|T>>>0>>0););}if((m|0)==(E|0)&N>>>0>=z>>>0|m>>>0>E>>>0)break o;for(;g=g+1|0,o=N,T=m<<1|o>>>31,N=o<<1,o=N,m=T,!!((E|0)==(m|0)&o>>>0>>0|m>>>0>>0););break o}if(g=0,v=G,o=z,v<<3>>>0>>0)for(;g=g+4|0,m=v<<7,v=v<<4,m>>>0>>0;);if(v>>>0>=o>>>0)break o;for(;g=g+1|0,v=v<<1,v>>>0>>0;);}if(g=g>>>0>>0?g:It,v=g+-1|0,o=v&31,o=((Ye-(G>>>1|0)|0)+ie(G,g+1|0)|0)+(g?32<=(v&63)>>>0?E>>>o|0:((1<>>o:z<<1)|0,xt=(o|0)==-1?xt:g,e[bt+(te<<2)>>2]=xt,ke=o+ke|0,te=te+1|0,!!(te>>>pe))break n}for(;;){G=_t-(te?0:f)|0,o=Be+(te<<3)|0,E=e[o+4>>2],z=e[o>>2];o:{r:{if(!E&z>>>0>=268435457|E>>>0>0){if(o=G,v=0,g=0,(E|0)==16777216&z>>>0>0|E>>>0>16777216||(N=o,m=0,T=o>>>25|0,ae=o<<7,(E|0)==(T|0)&ae>>>0>=z>>>0|T>>>0>E>>>0))break r;for(;g=g+8|0,o=m,v=N,T=o<<15|v>>>17,ae=v<<15,m=o<<8,o=v,m=m|o>>>24,o=o<<8,N=o,v=m,!!((E|0)==(T|0)&ae>>>0>>0|T>>>0>>0););break r}if(g=0,v=G,o=z,v<<3>>>0>>0)for(;g=g+4|0,m=v<<7,v=v<<4,m>>>0>>0;);if(v>>>0>=o>>>0)break o;for(;g=g+1|0,v=v<<1,v>>>0>>0;);break o}if((v|0)==(E|0)&o>>>0>=z>>>0|v>>>0>E>>>0)break o;for(;g=g+1|0,T=v<<1|o>>>31,o=o<<1,v=T,!!((E|0)==(v|0)&o>>>0>>0|v>>>0>>0););}if(m=te<<2,o=e[m+Wt>>2],ae=o,v=ie(o,G)+Lt|0,g=g>>>0>>0?g:It,T=g+-1|0,o=T&31,N=((Ye-(G>>>1|0)|0)+ie(G,g+1|0)|0)+(g?32<=(T&63)>>>0?E>>>o|0:((1<>>o:z<<1)|0,o=v>>>0>N>>>0,e[m+Ht>>2]=o?0:ae,e[m+bt>>2]=o?g:0,ke=(o?N:v)+ke|0,te=te+1|0,!!(te>>>pe))break}break n}m=e[Be+4>>2],o=Qe,g=o&31,v=e[Be>>2],g=(l?32<=(o&63)>>>0?m>>>g|0:((1<>>g:v<<1)+ln|0,v=(g|0)==-1?0:l,A&&(m=e[Wt>>2],N=ie(m,c)+Lt|0,o=N>>>0>g>>>0,e[Ht>>2]=o?0:m,v=o?v:0,g=o?g:N),e[bt>>2]=v,ke=g+Ee|0}if(o=Pt+-1>>>0>>0,Te=o?Te:pe,at=o?at:Bt,Pt=o?Pt:ke,N=pe+-1|0,st=(1<(Se|0))continue}break}e[C+4>>2]=Te,n=Te>>>0>6?Te:6}o=e[C+8>>2],Nd(o,n),n=ie(at,12)+i|0,i=1<>2],e[n+11724>>2],a),A&&gn(e[o+4>>2],e[n+11728>>2],a),i=i>>>0>1?i:1,n=e[1410],o=e[o>>2],g=0;e:{for(;;){if(ze[o+(g<<2)>>2]>>0){if(g=g+1|0,(i|0)!=(g|0))continue;break e}break}e[C>>2]=1}return Pt}function HA(){return be|0}function GA(i){i=i|0,be=i}function QA(i){return i=i|0,i=be-i&-16,be=i,i|0}function YA(i){return i=i|0,i3(i|0)|0}function KA(i,o,n){return i=i|0,o=o|0,n=n|0,Le[i](o,n)|0}function XA(i,o){return i=i|0,o=o|0,Le[i](o)|0}function qA(i,o,n,a){return i=i|0,o=o|0,n=n|0,a=a|0,Le[i](o,n,a)|0}function ZA(i,o,n,a,c,f,l){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0,Le[i](o,n,a,c,f,l)}function JA(i,o,n,a,c){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,Le[i](o,n,a,c)|0}function $A(i,o,n,a,c,f,l,h){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0,h=h|0,Le[i](o,n,a,c,f,l,h)}function e3(i,o,n,a,c){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,Le[i](o,n,a,c)}function t3(i,o,n,a){i=i|0,o=o|0,n=n|0,a=a|0,Le[i](o,n,a)}function n3(i,o,n){return i=i|0,o=o|0,n=n|0,BA(i,o,n)|0}function r3(i,o,n,a,c){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,i=Le[i](o,n,a,c)|0,v8(ne|0),i|0}function o3(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0;return c=n>>>16|0,f=i>>>16|0,m=ie(c,f),l=n&65535,h=i&65535,g=ie(l,h),f=(g>>>16|0)+ie(f,l)|0,c=(f&65535)+ie(c,h)|0,i=(ie(o,n)+m|0)+ie(i,a)+(f>>>16)+(c>>>16)|0,o=g&65535|c<<16,ne=i,o}function Jm(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0;e:{t:{n:{o:{r:{i:{a:{s:{l:{if(a=o,a){if(c=n,!c)break l;break s}return o=i,i=(i>>>0)/(n>>>0)|0,rs=o-ie(i,n)|0,os=0,ne=0,i}if(!i)break a;break i}if(l=c+-1|0,!(l&c))break r;l=(Kt(c)+33|0)-Kt(a)|0,h=0-l|0;break n}return rs=0,i=(a>>>0)/0|0,os=a-ie(i,0)|0,ne=0,i}if(a=32-Kt(a)|0,a>>>0<31)break o;break t}if(rs=i&l,os=0,(c|0)==1)break e;return a=Yd(c),n=a&31,32<=(a&63)>>>0?(c=0,i=o>>>n|0):(c=o>>>n|0,i=((1<>>n),ne=c,i}l=a+1|0,h=63-a|0}if(a=o,c=l&63,f=c&31,32<=c>>>0?(c=0,f=a>>>f|0):(c=a>>>f|0,f=((1<>>f),h=h&63,a=h&31,32<=h>>>0?(o=i<>>32-a|o<>>31,m=g,c=c<<1|f>>>31,g=h-(c+(a>>>0>>0)|0)>>31,v=n&g,f=m-v|0,c=c-(m>>>0>>0)|0,o=o<<1|i>>>31,i=A|i<<1,g=g&1,A=g,l=l+-1|0,!!l;);return rs=f,os=c,ne=o<<1|i>>>31,g|i<<1}rs=i,os=o,i=0,o=0}return ne=o,i}function Yd(i){return i?31-Kt(i+-1^i)|0:32}function oe(i,o,n,a){return i=o3(i,o,n,a),i}function $m(i,o,n){return Jm(i,o,n)}function Kd(i,o){return Jm(i,o,588),ne=os,rs}function Xe(i,o){var n=0,a=0;return n=o&31,a=(-1>>>n&i)<>>i}Le[1]=F8,Le[2]=tw,Le[3]=nw,Le[4]=rw,Le[5]=uw,Le[6]=fw,Le[7]=ww,Le[8]=Lw,Le[9]=Hw,Le[10]=mw,Le[11]=Gw,Le[12]=lw,Le[13]=cw,Le[14]=vw,Le[15]=bw,Le[16]=xA,Le[17]=iw,Le[18]=SA,Le[19]=EA,Le[20]=PA,Le[21]=MA;function eg(){return zt.byteLength/65536|0}function i3(i){i=i|0;var o=eg()|0,n=o+i|0;if(o=0;--sr)dn[48+sr]=52+sr,dn[65+sr]=sr,dn[97+sr]=26+sr;dn[43]=62,dn[47]=63;function Et(gt,_n,zt){for(var _l,Le,K=0,Ut=_n,e=zt.length,H=_n+(e*3>>2)-(zt[e-2]=="=")-(zt[e-1]=="=");K>4,Ut>2),Ut>0]=x;break;case"i8":dt[w>>0]=x;break;case"i16":yn[w>>1]=x;break;case"i32":ut[w>>2]=x;break;case"i64":Br=[x>>>0,(mn=x,+Nt(mn)>=1?mn>0?(pa(+uo(mn/4294967296),4294967295)|0)>>>0:~~+Un((mn-+(~~mn>>>0))/4294967296)>>>0:0)],ut[w>>2]=Br[0],ut[w+4>>2]=Br[1];break;case"float":$n[w>>2]=x;break;case"double":Qt[w>>3]=x;break;default:Pr("invalid type for setValue: "+M)}}function ve(w,x,M){switch(x=x||"i8",x.charAt(x.length-1)==="*"&&(x="i32"),x){case"i1":return dt[w>>0];case"i8":return dt[w>>0];case"i16":return yn[w>>1];case"i32":return ut[w>>2];case"i64":return ut[w>>2];case"float":return $n[w>>2];case"double":return Qt[w>>3];default:Pr("invalid type for getValue: "+x)}return null}var ce,we=new ge.Table({initial:22,maximum:27,element:"anyfunc"}),Ne=!1;function Ae(w,x){w||Pr("Assertion failed: "+x)}function Pe(w){var x=d["_"+w];return Ae(x,"Cannot call unknown function "+w+", make sure it is exported"),x}function tt(w,x,M,W,$){var re={string:function(qe){var yt=0;if(qe!=null&&qe!==0){var en=(qe.length<<2)+1;yt=_d(en),Gt(qe,yt,en)}return yt},array:function(qe){var yt=_d(qe.length);return Rt(qe,yt),yt}};function se(qe){return x==="string"?Zt(qe):x==="boolean"?!!qe:qe}var fe=Pe(w),xe=[],Fe=0;if(W)for(var Oe=0;Oe=W);)++$;if($-x>16&&w.subarray&&He)return He.decode(w.subarray(x,$));for(var re="";x<$;){var se=w[x++];if(!(se&128)){re+=String.fromCharCode(se);continue}var fe=w[x++]&63;if((se&224)==192){re+=String.fromCharCode((se&31)<<6|fe);continue}var xe=w[x++]&63;if((se&240)==224?se=(se&15)<<12|fe<<6|xe:se=(se&7)<<18|fe<<12|xe<<6|w[x++]&63,se<65536)re+=String.fromCharCode(se);else{var Fe=se-65536;re+=String.fromCharCode(55296|Fe>>10,56320|Fe&1023)}}return re}function Zt(w,x){return w?mt(Jt,w,x):""}function nt(w,x,M,W){if(!(W>0))return 0;for(var $=M,re=M+W-1,se=0;se=55296&&fe<=57343){var xe=w.charCodeAt(++se);fe=65536+((fe&1023)<<10)|xe&1023}if(fe<=127){if(M>=re)break;x[M++]=fe}else if(fe<=2047){if(M+1>=re)break;x[M++]=192|fe>>6,x[M++]=128|fe&63}else if(fe<=65535){if(M+2>=re)break;x[M++]=224|fe>>12,x[M++]=128|fe>>6&63,x[M++]=128|fe&63}else{if(M+3>=re)break;x[M++]=240|fe>>18,x[M++]=128|fe>>12&63,x[M++]=128|fe>>6&63,x[M++]=128|fe&63}}return x[M]=0,M-$}function Gt(w,x,M){return nt(w,Jt,x,M)}function hn(w){for(var x=0,M=0;M=55296&&W<=57343&&(W=65536+((W&1023)<<10)|w.charCodeAt(++M)&1023),W<=127?++x:W<=2047?x+=2:W<=65535?x+=3:x+=4}return x}typeof TextDecoder<"u"&&new TextDecoder("utf-16le");function Rt(w,x){dt.set(w,x)}var Vt=65536;function Ct(w,x){return w%x>0&&(w+=x-w%x),w}var pt,dt,Jt,yn,ut,$n,Qt;function Yt(w){pt=w,d.HEAP8=dt=new Int8Array(w),d.HEAP16=yn=new Int16Array(w),d.HEAP32=ut=new Int32Array(w),d.HEAPU8=Jt=new Uint8Array(w),d.HEAPU16=new Uint16Array(w),d.HEAPU32=new Uint32Array(w),d.HEAPF32=$n=new Float32Array(w),d.HEAPF64=Qt=new Float64Array(w)}var Sr=5257216,Kn=14176,$t=d.INITIAL_MEMORY||16777216;d.wasmMemory?ce=d.wasmMemory:ce=new ge.Memory({initial:$t/Vt,maximum:2147483648/Vt}),ce&&(pt=ce.buffer),$t=pt.byteLength,Yt(pt),ut[Kn>>2]=Sr;function ir(w){for(;w.length>0;){var x=w.shift();if(typeof x=="function"){x(d);continue}var M=x.func;typeof M=="number"?x.arg===void 0?d.dynCall_v(M):d.dynCall_vi(M,x.arg):M(x.arg===void 0?null:x.arg)}}var Er=[],ar=[],De=[],Re=[];function ct(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)Ot(d.preRun.shift());ir(Er)}function Tt(){!d.noFSInit&&!V.init.initialized&&V.init(),ir(ar)}function Dt(){V.ignorePermissions=!1,ir(De)}function Ge(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)on(d.postRun.shift());ir(Re)}function Ot(w){Er.unshift(w)}function on(w){Re.unshift(w)}var Nt=Math.abs,Un=Math.ceil,uo=Math.floor,pa=Math.min,Wo=0,Fi=null;function qa(w){Wo++,d.monitorRunDependencies&&d.monitorRunDependencies(Wo)}function ha(w){if(Wo--,d.monitorRunDependencies&&d.monitorRunDependencies(Wo),Wo==0&&Fi){var x=Fi;Fi=null,x()}}d.preloadedImages={},d.preloadedAudios={};function Pr(w){throw d.onAbort&&d.onAbort(w),w+="",Q(w),U(w),Ne=!0,w="abort("+w+"). Build with -s ASSERTIONS=1 for more info.",new ge.RuntimeError(w)}function Za(w,x){return String.prototype.startsWith?w.startsWith(x):w.indexOf(x)===0}var $c="data:application/octet-stream;base64,";function ma(w){return Za(w,$c)}var gl="file://";function Ja(w){return Za(w,gl)}var qr="libflac.wasm";ma(qr)||(qr=D(qr));function eu(){try{if(_e)return new Uint8Array(_e);var w=es(qr);if(w)return w;if(F)return F(qr);throw"both async and sync fetching of the wasm failed"}catch(x){Pr(x)}}function hd(){return!_e&&(S||P)&&typeof fetch=="function"&&!Ja(qr)?fetch(qr,{credentials:"same-origin"}).then(function(w){if(!w.ok)throw"failed to load wasm binary file at '"+qr+"'";return w.arrayBuffer()}).catch(function(){return eu()}):new Promise(function(w,x){w(eu())})}function md(){var w={env:yd,wasi_snapshot_preview1:yd};function x(se,fe){var xe=se.exports;d.asm=xe,ha()}qa();function M(se){x(se.instance)}function W(se){return hd().then(function(fe){return ge.instantiate(fe,w)}).then(se,function(fe){U("failed to asynchronously prepare wasm: "+fe),Pr(fe)})}function $(){if(!_e&&typeof ge.instantiateStreaming=="function"&&!ma(qr)&&!Ja(qr)&&typeof fetch=="function")fetch(qr,{credentials:"same-origin"}).then(function(se){var fe=ge.instantiateStreaming(se,w);return fe.then(M,function(xe){return U("wasm streaming compile failed: "+xe),U("falling back to ArrayBuffer instantiation"),W(M)})});else return W(M)}if(d.instantiateWasm)try{var re=d.instantiateWasm(w,x);return re}catch(se){return U("Module.instantiateWasm callback failed with error: "+se),!1}return $(),{}}var mn,Br;ar.push({func:function(){jh()}});function tu(w){return w}function gd(w){var x=/\b_Z[\w\d_]+/g;return w.replace(x,function(M){var W=M;return M===W?M:W+" ["+M+"]"})}function bl(){var w=new Error;if(!w.stack){try{throw new Error}catch(x){w=x}if(!w.stack)return"(no stack trace available)"}return w.stack.toString()}function vl(){var w=bl();return d.extraStackTrace&&(w+=` -`+d.extraStackTrace()),gd(w)}function bd(){return 14176}function Ln(w,x,M){Jt.copyWithin(w,x,x+M)}function er(){return Jt.length}function kl(w){try{return ce.grow(w-pt.byteLength+65535>>>16),Yt(ce.buffer),1}catch{}}function $a(w){w=w>>>0;var x=er(),M=65536,W=2147483648;if(w>W)return!1;for(var $=16777216,re=1;re<=4;re*=2){var se=x*(1+.2/re);se=Math.min(se,w+100663296);var fe=Math.min(W,Ct(Math.max($,w,se),M)),xe=kl(fe);if(xe)return!0}return!1}var St={splitPath:function(w){var x=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return x.exec(w).slice(1)},normalizeArray:function(w,x){for(var M=0,W=w.length-1;W>=0;W--){var $=w[W];$==="."?w.splice(W,1):$===".."?(w.splice(W,1),M++):M&&(w.splice(W,1),M--)}if(x)for(;M;M--)w.unshift("..");return w},normalize:function(w){var x=w.charAt(0)==="/",M=w.substr(-1)==="/";return w=St.normalizeArray(w.split("/").filter(function(W){return!!W}),!x).join("/"),!w&&!x&&(w="."),w&&M&&(w+="/"),(x?"/":"")+w},dirname:function(w){var x=St.splitPath(w),M=x[0],W=x[1];return!M&&!W?".":(W&&(W=W.substr(0,W.length-1)),M+W)},basename:function(w){if(w==="/")return"/";var x=w.lastIndexOf("/");return x===-1?w:w.substr(x+1)},extname:function(w){return St.splitPath(w)[3]},join:function(){var w=Array.prototype.slice.call(arguments,0);return St.normalize(w.join("/"))},join2:function(w,x){return St.normalize(w+"/"+x)}};function vd(w){return ut[zh()>>2]=w,w}var Uo={resolve:function(){for(var w="",x=!1,M=arguments.length-1;M>=-1&&!x;M--){var W=M>=0?arguments[M]:V.cwd();if(typeof W!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!W)return"";w=W+"/"+w,x=W.charAt(0)==="/"}return w=St.normalizeArray(w.split("/").filter(function($){return!!$}),!x).join("/"),(x?"/":"")+w||"."},relative:function(w,x){w=Uo.resolve(w).substr(1),x=Uo.resolve(x).substr(1);function M(Fe){for(var Oe=0;Oe=0&&Fe[ot]==="";ot--);return Oe>ot?[]:Fe.slice(Oe,ot-Oe+1)}for(var W=M(w.split("/")),$=M(x.split("/")),re=Math.min(W.length,$.length),se=re,fe=0;fe0?x=W.slice(0,$).toString("utf-8"):x=null}else typeof window<"u"&&typeof window.prompt=="function"?(x=window.prompt("Input: "),x!==null&&(x+=` -`)):typeof readline=="function"&&(x=readline(),x!==null&&(x+=` -`));if(!x)return null;w.input=kd(x,!0)}return w.input.shift()},put_char:function(w,x){x===null||x===10?(Q(mt(w.output,0)),w.output=[]):x!=0&&w.output.push(x)},flush:function(w){w.output&&w.output.length>0&&(Q(mt(w.output,0)),w.output=[])}},default_tty1_ops:{put_char:function(w,x){x===null||x===10?(U(mt(w.output,0)),w.output=[]):x!=0&&w.output.push(x)},flush:function(w){w.output&&w.output.length>0&&(U(mt(w.output,0)),w.output=[])}}},Mt={ops_table:null,mount:function(w){return Mt.createNode(null,"/",16895,0)},createNode:function(w,x,M,W){if(V.isBlkdev(M)||V.isFIFO(M))throw new V.ErrnoError(63);Mt.ops_table||(Mt.ops_table={dir:{node:{getattr:Mt.node_ops.getattr,setattr:Mt.node_ops.setattr,lookup:Mt.node_ops.lookup,mknod:Mt.node_ops.mknod,rename:Mt.node_ops.rename,unlink:Mt.node_ops.unlink,rmdir:Mt.node_ops.rmdir,readdir:Mt.node_ops.readdir,symlink:Mt.node_ops.symlink},stream:{llseek:Mt.stream_ops.llseek}},file:{node:{getattr:Mt.node_ops.getattr,setattr:Mt.node_ops.setattr},stream:{llseek:Mt.stream_ops.llseek,read:Mt.stream_ops.read,write:Mt.stream_ops.write,allocate:Mt.stream_ops.allocate,mmap:Mt.stream_ops.mmap,msync:Mt.stream_ops.msync}},link:{node:{getattr:Mt.node_ops.getattr,setattr:Mt.node_ops.setattr,readlink:Mt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Mt.node_ops.getattr,setattr:Mt.node_ops.setattr},stream:V.chrdev_stream_ops}});var $=V.createNode(w,x,M,W);return V.isDir($.mode)?($.node_ops=Mt.ops_table.dir.node,$.stream_ops=Mt.ops_table.dir.stream,$.contents={}):V.isFile($.mode)?($.node_ops=Mt.ops_table.file.node,$.stream_ops=Mt.ops_table.file.stream,$.usedBytes=0,$.contents=null):V.isLink($.mode)?($.node_ops=Mt.ops_table.link.node,$.stream_ops=Mt.ops_table.link.stream):V.isChrdev($.mode)&&($.node_ops=Mt.ops_table.chrdev.node,$.stream_ops=Mt.ops_table.chrdev.stream),$.timestamp=Date.now(),w&&(w.contents[x]=$),$},getFileDataAsRegularArray:function(w){if(w.contents&&w.contents.subarray){for(var x=[],M=0;M=x)){var W=1024*1024;x=Math.max(x,M*(M>>0),M!=0&&(x=Math.max(x,256));var $=w.contents;w.contents=new Uint8Array(x),w.usedBytes>0&&w.contents.set($.subarray(0,w.usedBytes),0)}},resizeFileStorage:function(w,x){if(w.usedBytes!=x){if(x==0){w.contents=null,w.usedBytes=0;return}if(!w.contents||w.contents.subarray){var M=w.contents;w.contents=new Uint8Array(x),M&&w.contents.set(M.subarray(0,Math.min(x,w.usedBytes))),w.usedBytes=x;return}if(w.contents||(w.contents=[]),w.contents.length>x)w.contents.length=x;else for(;w.contents.length=w.node.usedBytes)return 0;var se=Math.min(w.node.usedBytes-$,W);if(se>8&&re.subarray)x.set(re.subarray($,$+se),M);else for(var fe=0;fe0||W+M8)throw new V.ErrnoError(32);for(var $=St.normalizeArray(w.split("/").filter(function(rt){return!!rt}),!1),re=V.root,se="/",fe=0;fe<$.length;fe++){var xe=fe===$.length-1;if(xe&&x.parent)break;if(re=V.lookupNode(re,$[fe]),se=St.join2(se,$[fe]),V.isMountpoint(re)&&(!xe||xe&&x.follow_mount)&&(re=re.mounted.root),!xe||x.follow)for(var Fe=0;V.isLink(re.mode);){var Oe=V.readlink(se);se=Uo.resolve(St.dirname(se),Oe);var ot=V.lookupPath(se,{recurse_count:x.recurse_count});if(re=ot.node,Fe++>40)throw new V.ErrnoError(32)}}return{path:se,node:re}},getPath:function(w){for(var x;;){if(V.isRoot(w)){var M=w.mount.mountpoint;return x?M[M.length-1]!=="/"?M+"/"+x:M+x:M}x=x?w.name+"/"+x:w.name,w=w.parent}},hashName:function(w,x){for(var M=0,W=0;W>>0)%V.nameTable.length},hashAddNode:function(w){var x=V.hashName(w.parent.id,w.name);w.name_next=V.nameTable[x],V.nameTable[x]=w},hashRemoveNode:function(w){var x=V.hashName(w.parent.id,w.name);if(V.nameTable[x]===w)V.nameTable[x]=w.name_next;else for(var M=V.nameTable[x];M;){if(M.name_next===w){M.name_next=w.name_next;break}M=M.name_next}},lookupNode:function(w,x){var M=V.mayLookup(w);if(M)throw new V.ErrnoError(M,w);for(var W=V.hashName(w.id,x),$=V.nameTable[W];$;$=$.name_next){var re=$.name;if($.parent.id===w.id&&re===x)return $}return V.lookup(w,x)},createNode:function(w,x,M,W){var $=new V.FSNode(w,x,M,W);return V.hashAddNode($),$},destroyNode:function(w){V.hashRemoveNode(w)},isRoot:function(w){return w===w.parent},isMountpoint:function(w){return!!w.mounted},isFile:function(w){return(w&61440)===32768},isDir:function(w){return(w&61440)===16384},isLink:function(w){return(w&61440)===40960},isChrdev:function(w){return(w&61440)===8192},isBlkdev:function(w){return(w&61440)===24576},isFIFO:function(w){return(w&61440)===4096},isSocket:function(w){return(w&49152)===49152},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(w){var x=V.flagModes[w];if(typeof x>"u")throw new Error("Unknown file open mode: "+w);return x},flagsToPermissionString:function(w){var x=["r","w","rw"][w&3];return w&512&&(x+="w"),x},nodePermissions:function(w,x){return V.ignorePermissions?0:x.indexOf("r")!==-1&&!(w.mode&292)||x.indexOf("w")!==-1&&!(w.mode&146)||x.indexOf("x")!==-1&&!(w.mode&73)?2:0},mayLookup:function(w){var x=V.nodePermissions(w,"x");return x||(w.node_ops.lookup?0:2)},mayCreate:function(w,x){try{var M=V.lookupNode(w,x);return 20}catch{}return V.nodePermissions(w,"wx")},mayDelete:function(w,x,M){var W;try{W=V.lookupNode(w,x)}catch(re){return re.errno}var $=V.nodePermissions(w,"wx");if($)return $;if(M){if(!V.isDir(W.mode))return 54;if(V.isRoot(W)||V.getPath(W)===V.cwd())return 10}else if(V.isDir(W.mode))return 31;return 0},mayOpen:function(w,x){return w?V.isLink(w.mode)?32:V.isDir(w.mode)&&(V.flagsToPermissionString(x)!=="r"||x&512)?31:V.nodePermissions(w,V.flagsToPermissionString(x)):44},MAX_OPEN_FDS:4096,nextfd:function(w,x){w=w||0,x=x||V.MAX_OPEN_FDS;for(var M=w;M<=x;M++)if(!V.streams[M])return M;throw new V.ErrnoError(33)},getStream:function(w){return V.streams[w]},createStream:function(w,x,M){V.FSStream||(V.FSStream=function(){},V.FSStream.prototype={object:{get:function(){return this.node},set:function(se){this.node=se}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}});var W=new V.FSStream;for(var $ in w)W[$]=w[$];w=W;var re=V.nextfd(x,M);return w.fd=re,V.streams[re]=w,w},closeStream:function(w){V.streams[w]=null},chrdev_stream_ops:{open:function(w){var x=V.getDevice(w.node.rdev);w.stream_ops=x.stream_ops,w.stream_ops.open&&w.stream_ops.open(w)},llseek:function(){throw new V.ErrnoError(70)}},major:function(w){return w>>8},minor:function(w){return w&255},makedev:function(w,x){return w<<8|x},registerDevice:function(w,x){V.devices[w]={stream_ops:x}},getDevice:function(w){return V.devices[w]},getMounts:function(w){for(var x=[],M=[w];M.length;){var W=M.pop();x.push(W),M.push.apply(M,W.mounts)}return x},syncfs:function(w,x){typeof w=="function"&&(x=w,w=!1),V.syncFSRequests++,V.syncFSRequests>1&&U("warning: "+V.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var M=V.getMounts(V.root.mount),W=0;function $(se){return V.syncFSRequests--,x(se)}function re(se){if(se)return re.errored?void 0:(re.errored=!0,$(se));++W>=M.length&&$(null)}M.forEach(function(se){if(!se.type.syncfs)return re(null);se.type.syncfs(se,w,re)})},mount:function(w,x,M){var W=M==="/",$=!M,re;if(W&&V.root)throw new V.ErrnoError(10);if(!W&&!$){var se=V.lookupPath(M,{follow_mount:!1});if(M=se.path,re=se.node,V.isMountpoint(re))throw new V.ErrnoError(10);if(!V.isDir(re.mode))throw new V.ErrnoError(54)}var fe={type:w,opts:x,mountpoint:M,mounts:[]},xe=w.mount(fe);return xe.mount=fe,fe.root=xe,W?V.root=xe:re&&(re.mounted=fe,re.mount&&re.mount.mounts.push(fe)),xe},unmount:function(w){var x=V.lookupPath(w,{follow_mount:!1});if(!V.isMountpoint(x.node))throw new V.ErrnoError(28);var M=x.node,W=M.mounted,$=V.getMounts(W);Object.keys(V.nameTable).forEach(function(se){for(var fe=V.nameTable[se];fe;){var xe=fe.name_next;$.indexOf(fe.mount)!==-1&&V.destroyNode(fe),fe=xe}}),M.mounted=null;var re=M.mount.mounts.indexOf(W);M.mount.mounts.splice(re,1)},lookup:function(w,x){return w.node_ops.lookup(w,x)},mknod:function(w,x,M){var W=V.lookupPath(w,{parent:!0}),$=W.node,re=St.basename(w);if(!re||re==="."||re==="..")throw new V.ErrnoError(28);var se=V.mayCreate($,re);if(se)throw new V.ErrnoError(se);if(!$.node_ops.mknod)throw new V.ErrnoError(63);return $.node_ops.mknod($,re,x,M)},create:function(w,x){return x=x!==void 0?x:438,x&=4095,x|=32768,V.mknod(w,x,0)},mkdir:function(w,x){return x=x!==void 0?x:511,x&=1023,x|=16384,V.mknod(w,x,0)},mkdirTree:function(w,x){for(var M=w.split("/"),W="",$=0;$"u"&&(M=x,x=438),x|=8192,V.mknod(w,x,M)},symlink:function(w,x){if(!Uo.resolve(w))throw new V.ErrnoError(44);var M=V.lookupPath(x,{parent:!0}),W=M.node;if(!W)throw new V.ErrnoError(44);var $=St.basename(x),re=V.mayCreate(W,$);if(re)throw new V.ErrnoError(re);if(!W.node_ops.symlink)throw new V.ErrnoError(63);return W.node_ops.symlink(W,$,w)},rename:function(w,x){var M=St.dirname(w),W=St.dirname(x),$=St.basename(w),re=St.basename(x),se,fe,xe;try{se=V.lookupPath(w,{parent:!0}),fe=se.node,se=V.lookupPath(x,{parent:!0}),xe=se.node}catch{throw new V.ErrnoError(10)}if(!fe||!xe)throw new V.ErrnoError(44);if(fe.mount!==xe.mount)throw new V.ErrnoError(75);var Fe=V.lookupNode(fe,$),Oe=Uo.relative(w,W);if(Oe.charAt(0)!==".")throw new V.ErrnoError(28);if(Oe=Uo.relative(x,M),Oe.charAt(0)!==".")throw new V.ErrnoError(55);var ot;try{ot=V.lookupNode(xe,re)}catch{}if(Fe!==ot){var rt=V.isDir(Fe.mode),qe=V.mayDelete(fe,$,rt);if(qe)throw new V.ErrnoError(qe);if(qe=ot?V.mayDelete(xe,re,rt):V.mayCreate(xe,re),qe)throw new V.ErrnoError(qe);if(!fe.node_ops.rename)throw new V.ErrnoError(63);if(V.isMountpoint(Fe)||ot&&V.isMountpoint(ot))throw new V.ErrnoError(10);if(xe!==fe&&(qe=V.nodePermissions(fe,"w"),qe))throw new V.ErrnoError(qe);try{V.trackingDelegate.willMovePath&&V.trackingDelegate.willMovePath(w,x)}catch(yt){U("FS.trackingDelegate['willMovePath']('"+w+"', '"+x+"') threw an exception: "+yt.message)}V.hashRemoveNode(Fe);try{fe.node_ops.rename(Fe,xe,re)}catch(yt){throw yt}finally{V.hashAddNode(Fe)}try{V.trackingDelegate.onMovePath&&V.trackingDelegate.onMovePath(w,x)}catch(yt){U("FS.trackingDelegate['onMovePath']('"+w+"', '"+x+"') threw an exception: "+yt.message)}}},rmdir:function(w){var x=V.lookupPath(w,{parent:!0}),M=x.node,W=St.basename(w),$=V.lookupNode(M,W),re=V.mayDelete(M,W,!0);if(re)throw new V.ErrnoError(re);if(!M.node_ops.rmdir)throw new V.ErrnoError(63);if(V.isMountpoint($))throw new V.ErrnoError(10);try{V.trackingDelegate.willDeletePath&&V.trackingDelegate.willDeletePath(w)}catch(se){U("FS.trackingDelegate['willDeletePath']('"+w+"') threw an exception: "+se.message)}M.node_ops.rmdir(M,W),V.destroyNode($);try{V.trackingDelegate.onDeletePath&&V.trackingDelegate.onDeletePath(w)}catch(se){U("FS.trackingDelegate['onDeletePath']('"+w+"') threw an exception: "+se.message)}},readdir:function(w){var x=V.lookupPath(w,{follow:!0}),M=x.node;if(!M.node_ops.readdir)throw new V.ErrnoError(54);return M.node_ops.readdir(M)},unlink:function(w){var x=V.lookupPath(w,{parent:!0}),M=x.node,W=St.basename(w),$=V.lookupNode(M,W),re=V.mayDelete(M,W,!1);if(re)throw new V.ErrnoError(re);if(!M.node_ops.unlink)throw new V.ErrnoError(63);if(V.isMountpoint($))throw new V.ErrnoError(10);try{V.trackingDelegate.willDeletePath&&V.trackingDelegate.willDeletePath(w)}catch(se){U("FS.trackingDelegate['willDeletePath']('"+w+"') threw an exception: "+se.message)}M.node_ops.unlink(M,W),V.destroyNode($);try{V.trackingDelegate.onDeletePath&&V.trackingDelegate.onDeletePath(w)}catch(se){U("FS.trackingDelegate['onDeletePath']('"+w+"') threw an exception: "+se.message)}},readlink:function(w){var x=V.lookupPath(w),M=x.node;if(!M)throw new V.ErrnoError(44);if(!M.node_ops.readlink)throw new V.ErrnoError(28);return Uo.resolve(V.getPath(M.parent),M.node_ops.readlink(M))},stat:function(w,x){var M=V.lookupPath(w,{follow:!x}),W=M.node;if(!W)throw new V.ErrnoError(44);if(!W.node_ops.getattr)throw new V.ErrnoError(63);return W.node_ops.getattr(W)},lstat:function(w){return V.stat(w,!0)},chmod:function(w,x,M){var W;if(typeof w=="string"){var $=V.lookupPath(w,{follow:!M});W=$.node}else W=w;if(!W.node_ops.setattr)throw new V.ErrnoError(63);W.node_ops.setattr(W,{mode:x&4095|W.mode&-4096,timestamp:Date.now()})},lchmod:function(w,x){V.chmod(w,x,!0)},fchmod:function(w,x){var M=V.getStream(w);if(!M)throw new V.ErrnoError(8);V.chmod(M.node,x)},chown:function(w,x,M,W){var $;if(typeof w=="string"){var re=V.lookupPath(w,{follow:!W});$=re.node}else $=w;if(!$.node_ops.setattr)throw new V.ErrnoError(63);$.node_ops.setattr($,{timestamp:Date.now()})},lchown:function(w,x,M){V.chown(w,x,M,!0)},fchown:function(w,x,M){var W=V.getStream(w);if(!W)throw new V.ErrnoError(8);V.chown(W.node,x,M)},truncate:function(w,x){if(x<0)throw new V.ErrnoError(28);var M;if(typeof w=="string"){var W=V.lookupPath(w,{follow:!0});M=W.node}else M=w;if(!M.node_ops.setattr)throw new V.ErrnoError(63);if(V.isDir(M.mode))throw new V.ErrnoError(31);if(!V.isFile(M.mode))throw new V.ErrnoError(28);var $=V.nodePermissions(M,"w");if($)throw new V.ErrnoError($);M.node_ops.setattr(M,{size:x,timestamp:Date.now()})},ftruncate:function(w,x){var M=V.getStream(w);if(!M)throw new V.ErrnoError(8);if(!(M.flags&2097155))throw new V.ErrnoError(28);V.truncate(M.node,x)},utime:function(w,x,M){var W=V.lookupPath(w,{follow:!0}),$=W.node;$.node_ops.setattr($,{timestamp:Math.max(x,M)})},open:function(w,x,M,W,$){if(w==="")throw new V.ErrnoError(44);x=typeof x=="string"?V.modeStringToFlags(x):x,M=typeof M>"u"?438:M,x&64?M=M&4095|32768:M=0;var re;if(typeof w=="object")re=w;else{w=St.normalize(w);try{var se=V.lookupPath(w,{follow:!(x&131072)});re=se.node}catch{}}var fe=!1;if(x&64)if(re){if(x&128)throw new V.ErrnoError(20)}else re=V.mknod(w,M,0),fe=!0;if(!re)throw new V.ErrnoError(44);if(V.isChrdev(re.mode)&&(x&=-513),x&65536&&!V.isDir(re.mode))throw new V.ErrnoError(54);if(!fe){var xe=V.mayOpen(re,x);if(xe)throw new V.ErrnoError(xe)}x&512&&V.truncate(re,0),x&=-131713;var Fe=V.createStream({node:re,path:V.getPath(re),flags:x,seekable:!0,position:0,stream_ops:re.stream_ops,ungotten:[],error:!1},W,$);Fe.stream_ops.open&&Fe.stream_ops.open(Fe),d.logReadFiles&&!(x&1)&&(V.readFiles||(V.readFiles={}),w in V.readFiles||(V.readFiles[w]=1,U("FS.trackingDelegate error on read file: "+w)));try{if(V.trackingDelegate.onOpenFile){var Oe=0;(x&2097155)!==1&&(Oe|=V.tracking.openFlags.READ),x&2097155&&(Oe|=V.tracking.openFlags.WRITE),V.trackingDelegate.onOpenFile(w,Oe)}}catch(ot){U("FS.trackingDelegate['onOpenFile']('"+w+"', flags) threw an exception: "+ot.message)}return Fe},close:function(w){if(V.isClosed(w))throw new V.ErrnoError(8);w.getdents&&(w.getdents=null);try{w.stream_ops.close&&w.stream_ops.close(w)}catch(x){throw x}finally{V.closeStream(w.fd)}w.fd=null},isClosed:function(w){return w.fd===null},llseek:function(w,x,M){if(V.isClosed(w))throw new V.ErrnoError(8);if(!w.seekable||!w.stream_ops.llseek)throw new V.ErrnoError(70);if(M!=0&&M!=1&&M!=2)throw new V.ErrnoError(28);return w.position=w.stream_ops.llseek(w,x,M),w.ungotten=[],w.position},read:function(w,x,M,W,$){if(W<0||$<0)throw new V.ErrnoError(28);if(V.isClosed(w))throw new V.ErrnoError(8);if((w.flags&2097155)===1)throw new V.ErrnoError(8);if(V.isDir(w.node.mode))throw new V.ErrnoError(31);if(!w.stream_ops.read)throw new V.ErrnoError(28);var re=typeof $<"u";if(!re)$=w.position;else if(!w.seekable)throw new V.ErrnoError(70);var se=w.stream_ops.read(w,x,M,W,$);return re||(w.position+=se),se},write:function(w,x,M,W,$,re){if(W<0||$<0)throw new V.ErrnoError(28);if(V.isClosed(w))throw new V.ErrnoError(8);if(!(w.flags&2097155))throw new V.ErrnoError(8);if(V.isDir(w.node.mode))throw new V.ErrnoError(31);if(!w.stream_ops.write)throw new V.ErrnoError(28);w.seekable&&w.flags&1024&&V.llseek(w,0,2);var se=typeof $<"u";if(!se)$=w.position;else if(!w.seekable)throw new V.ErrnoError(70);var fe=w.stream_ops.write(w,x,M,W,$,re);se||(w.position+=fe);try{w.path&&V.trackingDelegate.onWriteToFile&&V.trackingDelegate.onWriteToFile(w.path)}catch(xe){U("FS.trackingDelegate['onWriteToFile']('"+w.path+"') threw an exception: "+xe.message)}return fe},allocate:function(w,x,M){if(V.isClosed(w))throw new V.ErrnoError(8);if(x<0||M<=0)throw new V.ErrnoError(28);if(!(w.flags&2097155))throw new V.ErrnoError(8);if(!V.isFile(w.node.mode)&&!V.isDir(w.node.mode))throw new V.ErrnoError(43);if(!w.stream_ops.allocate)throw new V.ErrnoError(138);w.stream_ops.allocate(w,x,M)},mmap:function(w,x,M,W,$,re){if($&2&&!(re&2)&&(w.flags&2097155)!==2)throw new V.ErrnoError(2);if((w.flags&2097155)===1)throw new V.ErrnoError(2);if(!w.stream_ops.mmap)throw new V.ErrnoError(43);return w.stream_ops.mmap(w,x,M,W,$,re)},msync:function(w,x,M,W,$){return!w||!w.stream_ops.msync?0:w.stream_ops.msync(w,x,M,W,$)},munmap:function(w){return 0},ioctl:function(w,x,M){if(!w.stream_ops.ioctl)throw new V.ErrnoError(59);return w.stream_ops.ioctl(w,x,M)},readFile:function(w,x){if(x=x||{},x.flags=x.flags||"r",x.encoding=x.encoding||"binary",x.encoding!=="utf8"&&x.encoding!=="binary")throw new Error('Invalid encoding type "'+x.encoding+'"');var M,W=V.open(w,x.flags),$=V.stat(w),re=$.size,se=new Uint8Array(re);return V.read(W,se,0,re,0),x.encoding==="utf8"?M=mt(se,0):x.encoding==="binary"&&(M=se),V.close(W),M},writeFile:function(w,x,M){M=M||{},M.flags=M.flags||"w";var W=V.open(w,M.flags,M.mode);if(typeof x=="string"){var $=new Uint8Array(hn(x)+1),re=nt(x,$,0,$.length);V.write(W,$,0,re,void 0,M.canOwn)}else if(ArrayBuffer.isView(x))V.write(W,x,0,x.byteLength,void 0,M.canOwn);else throw new Error("Unsupported data type");V.close(W)},cwd:function(){return V.currentPath},chdir:function(w){var x=V.lookupPath(w,{follow:!0});if(x.node===null)throw new V.ErrnoError(44);if(!V.isDir(x.node.mode))throw new V.ErrnoError(54);var M=V.nodePermissions(x.node,"x");if(M)throw new V.ErrnoError(M);V.currentPath=x.path},createDefaultDirectories:function(){V.mkdir("/tmp"),V.mkdir("/home"),V.mkdir("/home/web_user")},createDefaultDevices:function(){V.mkdir("/dev"),V.registerDevice(V.makedev(1,3),{read:function(){return 0},write:function(W,$,re,se,fe){return se}}),V.mkdev("/dev/null",V.makedev(1,3)),ga.register(V.makedev(5,0),ga.default_tty_ops),ga.register(V.makedev(6,0),ga.default_tty1_ops),V.mkdev("/dev/tty",V.makedev(5,0)),V.mkdev("/dev/tty1",V.makedev(6,0));var w;if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var x=new Uint8Array(1);w=function(){return crypto.getRandomValues(x),x[0]}}else if(I)try{var M=p("crypto");w=function(){return M.randomBytes(1)[0]}}catch{}w||(w=function(){Pr("random_device")}),V.createDevice("/dev","random",w),V.createDevice("/dev","urandom",w),V.mkdir("/dev/shm"),V.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){V.mkdir("/proc"),V.mkdir("/proc/self"),V.mkdir("/proc/self/fd"),V.mount({mount:function(){var w=V.createNode("/proc/self","fd",16895,73);return w.node_ops={lookup:function(x,M){var W=+M,$=V.getStream(W);if(!$)throw new V.ErrnoError(8);var re={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return $.path}}};return re.parent=re,re}},w}},{},"/proc/self/fd")},createStandardStreams:function(){d.stdin?V.createDevice("/dev","stdin",d.stdin):V.symlink("/dev/tty","/dev/stdin"),d.stdout?V.createDevice("/dev","stdout",null,d.stdout):V.symlink("/dev/tty","/dev/stdout"),d.stderr?V.createDevice("/dev","stderr",null,d.stderr):V.symlink("/dev/tty1","/dev/stderr"),V.open("/dev/stdin","r"),V.open("/dev/stdout","w"),V.open("/dev/stderr","w")},ensureErrnoError:function(){V.ErrnoError||(V.ErrnoError=function(x,M){this.node=M,this.setErrno=function(W){this.errno=W},this.setErrno(x),this.message="FS error"},V.ErrnoError.prototype=new Error,V.ErrnoError.prototype.constructor=V.ErrnoError,[44].forEach(function(w){V.genericErrors[w]=new V.ErrnoError(w),V.genericErrors[w].stack=""}))},staticInit:function(){V.ensureErrnoError(),V.nameTable=new Array(4096),V.mount(Mt,{},"/"),V.createDefaultDirectories(),V.createDefaultDevices(),V.createSpecialDirectories(),V.filesystems={MEMFS:Mt}},init:function(w,x,M){V.init.initialized=!0,V.ensureErrnoError(),d.stdin=w||d.stdin,d.stdout=x||d.stdout,d.stderr=M||d.stderr,V.createStandardStreams()},quit:function(){V.init.initialized=!1;var w=d._fflush;w&&w(0);for(var x=0;xthis.length-1||rt<0)){var qe=rt%this.chunkSize,yt=rt/this.chunkSize|0;return this.getter(yt)[qe]}},re.prototype.setDataGetter=function(rt){this.getter=rt},re.prototype.cacheLength=function(){var rt=new XMLHttpRequest;if(rt.open("HEAD",M,!1),rt.send(null),!(rt.status>=200&&rt.status<300||rt.status===304))throw new Error("Couldn't load "+M+". Status: "+rt.status);var qe=Number(rt.getResponseHeader("Content-length")),yt,en=(yt=rt.getResponseHeader("Accept-Ranges"))&&yt==="bytes",Ft=(yt=rt.getResponseHeader("Content-Encoding"))&&yt==="gzip",dn=1024*1024;en||(dn=qe);var sr=function(gt,_n){if(gt>_n)throw new Error("invalid range ("+gt+", "+_n+") or no bytes requested!");if(_n>qe-1)throw new Error("only "+qe+" bytes available! programmer error!");var zt=new XMLHttpRequest;if(zt.open("GET",M,!1),qe!==dn&&zt.setRequestHeader("Range","bytes="+gt+"-"+_n),typeof Uint8Array<"u"&&(zt.responseType="arraybuffer"),zt.overrideMimeType&&zt.overrideMimeType("text/plain; charset=x-user-defined"),zt.send(null),!(zt.status>=200&&zt.status<300||zt.status===304))throw new Error("Couldn't load "+M+". Status: "+zt.status);return zt.response!==void 0?new Uint8Array(zt.response||[]):kd(zt.responseText||"",!0)},Et=this;Et.setDataGetter(function(gt){var _n=gt*dn,zt=(gt+1)*dn-1;if(zt=Math.min(zt,qe-1),typeof Et.chunks[gt]>"u"&&(Et.chunks[gt]=sr(_n,zt)),typeof Et.chunks[gt]>"u")throw new Error("doXHR failed!");return Et.chunks[gt]}),(Ft||!qe)&&(dn=qe=1,qe=this.getter(0).length,dn=qe,Q("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=qe,this._chunkSize=dn,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!P)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var se=new re;Object.defineProperties(se,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var fe={isDevice:!1,contents:se}}else var fe={isDevice:!1,url:M};var xe=V.createFile(w,x,fe,W,$);fe.contents?xe.contents=fe.contents:fe.url&&(xe.contents=null,xe.url=fe.url),Object.defineProperties(xe,{usedBytes:{get:function(){return this.contents.length}}});var Fe={},Oe=Object.keys(xe.stream_ops);return Oe.forEach(function(ot){var rt=xe.stream_ops[ot];Fe[ot]=function(){if(!V.forceLoadFile(xe))throw new V.ErrnoError(29);return rt.apply(null,arguments)}}),Fe.read=function(rt,qe,yt,en,Ft){if(!V.forceLoadFile(xe))throw new V.ErrnoError(29);var dn=rt.node.contents;if(Ft>=dn.length)return 0;var sr=Math.min(dn.length-Ft,en);if(dn.slice)for(var Et=0;Et>2]=W.dev,ut[M+4>>2]=0,ut[M+8>>2]=W.ino,ut[M+12>>2]=W.mode,ut[M+16>>2]=W.nlink,ut[M+20>>2]=W.uid,ut[M+24>>2]=W.gid,ut[M+28>>2]=W.rdev,ut[M+32>>2]=0,Br=[W.size>>>0,(mn=W.size,+Nt(mn)>=1?mn>0?(pa(+uo(mn/4294967296),4294967295)|0)>>>0:~~+Un((mn-+(~~mn>>>0))/4294967296)>>>0:0)],ut[M+40>>2]=Br[0],ut[M+44>>2]=Br[1],ut[M+48>>2]=4096,ut[M+52>>2]=W.blocks,ut[M+56>>2]=W.atime.getTime()/1e3|0,ut[M+60>>2]=0,ut[M+64>>2]=W.mtime.getTime()/1e3|0,ut[M+68>>2]=0,ut[M+72>>2]=W.ctime.getTime()/1e3|0,ut[M+76>>2]=0,Br=[W.ino>>>0,(mn=W.ino,+Nt(mn)>=1?mn>0?(pa(+uo(mn/4294967296),4294967295)|0)>>>0:~~+Un((mn-+(~~mn>>>0))/4294967296)>>>0:0)],ut[M+80>>2]=Br[0],ut[M+84>>2]=Br[1],0},doMsync:function(w,x,M,W,$){var re=Jt.slice(w,w+M);V.msync(x,re,$,M,W)},doMkdir:function(w,x){return w=St.normalize(w),w[w.length-1]==="/"&&(w=w.substr(0,w.length-1)),V.mkdir(w,x,0),0},doMknod:function(w,x,M){switch(x&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return V.mknod(w,x,M),0},doReadlink:function(w,x,M){if(M<=0)return-28;var W=V.readlink(w),$=Math.min(M,hn(W)),re=dt[x+$];return Gt(W,x,M+1),dt[x+$]=re,$},doAccess:function(w,x){if(x&-8)return-28;var M,W=V.lookupPath(w,{follow:!0});if(M=W.node,!M)return-44;var $="";return x&4&&($+="r"),x&2&&($+="w"),x&1&&($+="x"),$&&V.nodePermissions(M,$)?-2:0},doDup:function(w,x,M){var W=V.getStream(M);return W&&V.close(W),V.open(w,x,0,M,M).fd},doReadv:function(w,x,M,W){for(var $=0,re=0;re>2],fe=ut[x+(re*8+4)>>2],xe=V.read(w,dt,se,fe,W);if(xe<0)return-1;if($+=xe,xe>2],fe=ut[x+(re*8+4)>>2],xe=V.write(w,dt,se,fe,W);if(xe<0)return-1;$+=xe}return $},varargs:void 0,get:function(){Li.varargs+=4;var w=ut[Li.varargs-4>>2];return w},getStr:function(w){var x=Zt(w);return x},getStreamFromFD:function(w){var x=V.getStream(w);if(!x)throw new V.ErrnoError(8);return x},get64:function(w,x){return w}};function R_(w){try{var x=Li.getStreamFromFD(w);return V.close(x),0}catch(M){return(typeof V>"u"||!(M instanceof V.ErrnoError))&&Pr(M),M.errno}}function T_(w,x,M,W){try{var $=Li.getStreamFromFD(w),re=Li.doReadv($,x,M);return ut[W>>2]=re,0}catch(se){return(typeof V>"u"||!(se instanceof V.ErrnoError))&&Pr(se),se.errno}}function F_(w,x,M,W,$){try{var re=Li.getStreamFromFD(w),se=4294967296,fe=M*se+(x>>>0),xe=9007199254740992;return fe<=-xe||fe>=xe?-61:(V.llseek(re,fe,W),Br=[re.position>>>0,(mn=re.position,+Nt(mn)>=1?mn>0?(pa(+uo(mn/4294967296),4294967295)|0)>>>0:~~+Un((mn-+(~~mn>>>0))/4294967296)>>>0:0)],ut[$>>2]=Br[0],ut[$+4>>2]=Br[1],re.getdents&&fe===0&&W===0&&(re.getdents=null),0)}catch(Fe){return(typeof V>"u"||!(Fe instanceof V.ErrnoError))&&Pr(Fe),Fe.errno}}function L_(w,x,M,W){try{var $=Li.getStreamFromFD(w),re=Li.doWritev($,x,M);return ut[W>>2]=re,0}catch(se){return(typeof V>"u"||!(se instanceof V.ErrnoError))&&Pr(se),se.errno}}function D_(w){return w=+w,w>=0?+uo(w+.5):+Un(w-.5)}var Oh=function(w,x,M,W){w||(w=this),this.parent=w,this.mount=w.mount,this.mounted=null,this.id=V.nextInode++,this.name=x,this.mode=M,this.node_ops={},this.stream_ops={},this.rdev=W},nu=365,ru=146;Object.defineProperties(Oh.prototype,{read:{get:function(){return(this.mode&nu)===nu},set:function(w){w?this.mode|=nu:this.mode&=~nu}},write:{get:function(){return(this.mode&ru)===ru},set:function(w){w?this.mode|=ru:this.mode&=~ru}},isFolder:{get:function(){return V.isDir(this.mode)}},isDevice:{get:function(){return V.isChrdev(this.mode)}}}),V.FSNode=Oh,V.staticInit();function kd(w,x,M){var W=M>0?M:hn(w)+1,$=new Array(W),re=nt(w,$,0,$.length);return x&&($.length=re),$}function Bh(w){for(var x=[],M=0;M255&&(W&=255),x.push(String.fromCharCode(W))}return x.join("")}var O_=typeof atob=="function"?atob:function(w){var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",M="",W,$,re,se,fe,xe,Fe,Oe=0;w=w.replace(/[^A-Za-z0-9\+\/\=]/g,"");do se=x.indexOf(w.charAt(Oe++)),fe=x.indexOf(w.charAt(Oe++)),xe=x.indexOf(w.charAt(Oe++)),Fe=x.indexOf(w.charAt(Oe++)),W=se<<2|fe>>4,$=(fe&15)<<4|xe>>2,re=(xe&3)<<6|Fe,M=M+String.fromCharCode(W),xe!==64&&(M=M+String.fromCharCode($)),Fe!==64&&(M=M+String.fromCharCode(re));while(Oe0||(ct(),Wo>0))return;function x(){ou||(ou=!0,d.calledRun=!0,!Ne&&(Tt(),Dt(),d.onRuntimeInitialized&&d.onRuntimeInitialized(),Ge()))}d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),x()},1)):x()}if(d.run=wd,d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();wd();function j_(w){var x=d.getValue(w,"i32"),M=d.getValue(w+4,"i32"),W=d.getValue(w+8,"i32"),$=d.getValue(w+12,"i32"),re=d.getValue(w+16,"i32"),se=d.getValue(w+20,"i32"),fe=d.getValue(w+24,"i32"),xe=d.getValue(w+32,"i64"),Fe=z_(w+40);return{min_blocksize:x,max_blocksize:M,min_framesize:W,max_framesize:$,sampleRate:re,channels:se,bitsPerSample:fe,total_samples:xe,md5sum:Fe}}function z_(w){for(var x=[],M,W,$=0,re=16;$0&&(M=d.getValue(w+W++,"i8"),M!==0);)x.push(String.fromCodePoint(M));return x.join("")}function U_(w){return{dummy:d.getValue(w,"i32")}}function H_(w){for(var x=d.getValue(w,"i32"),M=d.getValue(w+4,"i32"),W=[],$=0;$0){se=d.getValue(w+24,"i32");for(var fe=0;fe0&&(fe+=re.blocksize*Fe);for(var Oe=[],ot,rt,qe=0;qe=0;--W)if(M=Cd[W],M&&M.event===w){x.apply(null,M.args);break}},u8=function(w,x){var M=au[w];if(M)for(var W=M.length-1;W>=0;--W)M[W]===x&&M.splice(W,1)},ns=function(w,x,M){ci["on"+w]&&ci["on"+w].apply(null,x);var W=au[w];if(W)for(var $=0,re=W.length;$"u"?1:re+0,$=typeof $=="number"?$:0,se=typeof se=="number"?se:0;var fe=!0,xe=d.ccall("FLAC__stream_encoder_new","number",[],[]);return fe&=d.ccall("FLAC__stream_encoder_set_verify","number",["number","number"],[xe,re]),fe&=d.ccall("FLAC__stream_encoder_set_compression_level","number",["number","number"],[xe,W]),fe&=d.ccall("FLAC__stream_encoder_set_channels","number",["number","number"],[xe,x]),fe&=d.ccall("FLAC__stream_encoder_set_bits_per_sample","number",["number","number"],[xe,M]),fe&=d.ccall("FLAC__stream_encoder_set_sample_rate","number",["number","number"],[xe,w]),fe&=d.ccall("FLAC__stream_encoder_set_blocksize","number",["number","number"],[xe,se]),fe&=d.ccall("FLAC__stream_encoder_set_total_samples_estimate","number",["number","number"],[xe,$]),fe?(ns("created",[{type:"created",target:{id:xe,type:"encoder"}}],!1),xe):0},init_libflac_encoder:function(){return console.warn("Flac.init_libflac_encoder() is deprecated, use Flac.create_libflac_encoder() instead!"),this.create_libflac_encoder.apply(this,arguments)},create_libflac_decoder:function(w){w=typeof w>"u"?1:w+0;var x=!0,M=d.ccall("FLAC__stream_decoder_new","number",[],[]);return x&=d.ccall("FLAC__stream_decoder_set_md5_checking","number",["number","number"],[M,w]),x?(ns("created",[{type:"created",target:{id:M,type:"decoder"}}],!1),M):0},init_libflac_decoder:function(){return console.warn("Flac.init_libflac_decoder() is deprecated, use Flac.create_libflac_decoder() instead!"),this.create_libflac_decoder.apply(this,arguments)},init_encoder_stream:function(w,x,M,W,$){var re=W===!0;if($=$|0,typeof x!="function")return e8;ts(w,"write",x);var se=0;typeof M=="function"&&(ts(w,"metadata",M),se=Zh);var fe="FLAC__stream_encoder_init_stream",xe=["number","number","number","number","number","number"],Fe=[w,o8,0,0,se,$];typeof W=="number"?re=!0:re&&(W=1),re&&(fe="FLAC__stream_encoder_init_ogg_stream",Fe.unshift(Fe[0]),Fe[1]=0,xe.unshift(xe[0]),xe[1]="number",d.ccall("FLAC__stream_encoder_set_ogg_serial_number","number",["number","number"],[w,W]));var Oe=d.ccall(fe,"number",xe,Fe);return Oe},init_encoder_ogg_stream:function(w,x,M,W,$){return typeof W!="number"&&(W=!0),this.init_encoder_stream(w,x,M,W,$)},init_decoder_stream:function(w,x,M,W,$,re,se){if(se=se|0,typeof x!="function"||(ts(w,"read",x),typeof M!="function"))return qh;ts(w,"write",M);var fe=0;typeof W=="function"&&(ts(w,"error",W),fe=l8);var xe=0;typeof $=="function"&&(ts(w,"metadata",$),xe=Zh);var Fe=re===!0;typeof re=="number"&&(Fe=!0,d.ccall("FLAC__stream_decoder_set_ogg_serial_number","number",["number","number"],[w,re]));var Oe=Fe?"FLAC__stream_decoder_init_ogg_stream":"FLAC__stream_decoder_init_stream",ot=d.ccall(Oe,"number",["number","number","number","number","number","number","number","number","number","number"],[w,i8,0,0,0,0,a8,xe,fe,se]);return ot},init_decoder_ogg_stream:function(w,x,M,W,$,re,se){return typeof re!="number"&&(re=!0),this.init_decoder_stream(w,x,M,W,$,re,se)},FLAC__stream_encoder_process_interleaved:function(w,x,M){var W=x.length*x.BYTES_PER_ELEMENT,$=d._malloc(W),re=new Uint8Array(d.HEAPU8.buffer,$,W);re.set(new Uint8Array(x.buffer,x.byteOffset,x.byteLength));var se=d.ccall("FLAC__stream_encoder_process_interleaved","number",["number","number","number"],[w,re.byteOffset,M]);return d._free($),se},FLAC__stream_encoder_process:function(w,x,M){var W=this._create_pointer_array(x),$=W.pointerPointer,re=d.ccall("FLAC__stream_encoder_process","number",["number","number","number"],[w,$,M]);return this._destroy_pointer_array(W),re},FLAC__stream_decoder_process_single:d.cwrap("FLAC__stream_decoder_process_single","number",["number"]),FLAC__stream_decoder_process_until_end_of_stream:d.cwrap("FLAC__stream_decoder_process_until_end_of_stream","number",["number"]),FLAC__stream_decoder_process_until_end_of_metadata:d.cwrap("FLAC__stream_decoder_process_until_end_of_metadata","number",["number"]),FLAC__stream_decoder_get_state:d.cwrap("FLAC__stream_decoder_get_state","number",["number"]),FLAC__stream_encoder_get_state:d.cwrap("FLAC__stream_encoder_get_state","number",["number"]),FLAC__stream_decoder_set_metadata_respond:d.cwrap("FLAC__stream_decoder_set_metadata_respond","number",["number","number"]),FLAC__stream_decoder_set_metadata_respond_application:d.cwrap("FLAC__stream_decoder_set_metadata_respond_application","number",["number","number"]),FLAC__stream_decoder_set_metadata_respond_all:d.cwrap("FLAC__stream_decoder_set_metadata_respond_all","number",["number"]),FLAC__stream_decoder_set_metadata_ignore:d.cwrap("FLAC__stream_decoder_set_metadata_ignore","number",["number","number"]),FLAC__stream_decoder_set_metadata_ignore_application:d.cwrap("FLAC__stream_decoder_set_metadata_ignore_application","number",["number","number"]),FLAC__stream_decoder_set_metadata_ignore_all:d.cwrap("FLAC__stream_decoder_set_metadata_ignore_all","number",["number"]),FLAC__stream_encoder_set_metadata:function(w,x,M){var W=d.ccall("FLAC__stream_encoder_set_metadata","number",["number","number","number"],[w,x.pointerPointer,M]);return W},_create_pointer_array:function(w){for(var x=w.length,M=[],W=new Uint32Array(x),$=new DataView(W.buffer),re,se,fe,xe,Fe=0,x;Fe({endTime:r,insertTime:s,type:"exponentialRampToValue",value:t}),Sv=(t,r,s)=>({endTime:r,insertTime:s,type:"linearRampToValue",value:t}),Wp=(t,r)=>({startTime:r,type:"setValue",value:t}),zy=(t,r,s)=>({duration:s,startTime:r,type:"setValueCurve",values:t}),Vy=(t,r,{startTime:s,target:u,timeConstant:p})=>u+(r-u)*Math.exp((s-t)/p),Ls=t=>t.type==="exponentialRampToValue",Q0=t=>t.type==="linearRampToValue",Gi=t=>Ls(t)||Q0(t),Ph=t=>t.type==="setValue",pi=t=>t.type==="setValueCurve",Y0=(t,r,s,u)=>{const p=t[r];return p===void 0?u:Gi(p)||Ph(p)?p.value:pi(p)?p.values[p.values.length-1]:Vy(s,Y0(t,r-1,p.startTime,u),p)},Ev=(t,r,s,u,p)=>s===void 0?[u.insertTime,p]:Gi(s)?[s.endTime,s.value]:Ph(s)?[s.startTime,s.value]:pi(s)?[s.startTime+s.duration,s.values[s.values.length-1]]:[s.startTime,Y0(t,r-1,s.startTime,p)],Up=t=>t.type==="cancelAndHold",Hp=t=>t.type==="cancelScheduledValues",Wi=t=>Up(t)||Hp(t)?t.cancelTime:Ls(t)||Q0(t)?t.endTime:t.startTime,Pv=(t,r,s,{endTime:u,value:p})=>s===p?p:0s+(t-r)/(u-r)*(p-s),QL=(t,r)=>{const s=Math.floor(r),u=Math.ceil(r);return s===u?t[s]:(1-(r-s))*t[s]+(1-(u-r))*t[u]},YL=(t,{duration:r,startTime:s,values:u})=>{const p=(t-s)/r*(u.length-1);return QL(u,p)},Gu=t=>t.type==="setTarget";class KL{constructor(r){this._automationEvents=[],this._currenTime=0,this._defaultValue=r}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(r){const s=Wi(r);if(Up(r)||Hp(r)){const u=this._automationEvents.findIndex(d=>Hp(r)&&pi(d)?d.startTime+d.duration>=s:Wi(d)>=s),p=this._automationEvents[u];if(u!==-1&&(this._automationEvents=this._automationEvents.slice(0,u)),Up(r)){const d=this._automationEvents[this._automationEvents.length-1];if(p!==void 0&&Gi(p)){if(d!==void 0&&Gu(d))throw new Error("The internal list is malformed.");const b=d===void 0?p.insertTime:pi(d)?d.startTime+d.duration:Wi(d),k=d===void 0?this._defaultValue:pi(d)?d.values[d.values.length-1]:d.value,y=Ls(p)?Pv(s,b,k,p):Mv(s,b,k,p),_=Ls(p)?xv(y,s,this._currenTime):Sv(y,s,this._currenTime);this._automationEvents.push(_)}if(d!==void 0&&Gu(d)&&this._automationEvents.push(Wp(this.getValue(s),s)),d!==void 0&&pi(d)&&d.startTime+d.duration>s){const b=s-d.startTime,k=(d.values.length-1)/d.duration,y=Math.max(2,1+Math.ceil(b*k)),_=b/(y-1)*k,S=d.values.slice(0,y);if(_<1)for(let P=1;PWi(b)>s),p=u===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[u-1];if(p!==void 0&&pi(p)&&Wi(p)+p.duration>s)return!1;const d=Ls(r)?xv(r.value,r.endTime,this._currenTime):Q0(r)?Sv(r.value,s,this._currenTime):r;if(u===-1)this._automationEvents.push(d);else{if(pi(r)&&s+r.duration>Wi(this._automationEvents[u]))return!1;this._automationEvents.splice(u,0,d)}}return!0}flush(r){const s=this._automationEvents.findIndex(u=>Wi(u)>r);if(s>1){const u=this._automationEvents.slice(s-1),p=u[0];Gu(p)&&u.unshift(Wp(Y0(this._automationEvents,s-2,p.startTime,this._defaultValue),p.startTime)),this._automationEvents=u}}getValue(r){if(this._automationEvents.length===0)return this._defaultValue;const s=this._automationEvents.findIndex(b=>Wi(b)>r),u=this._automationEvents[s],p=(s===-1?this._automationEvents.length:s)-1,d=this._automationEvents[p];if(d!==void 0&&Gu(d)&&(u===void 0||!Gi(u)||u.insertTime>r))return Vy(r,Y0(this._automationEvents,p-1,d.startTime,this._defaultValue),d);if(d!==void 0&&Ph(d)&&(u===void 0||!Gi(u)))return d.value;if(d!==void 0&&pi(d)&&(u===void 0||!Gi(u)||d.startTime+d.duration>r))return r({cancelTime:t,type:"cancelAndHold"}),qL=t=>({cancelTime:t,type:"cancelScheduledValues"}),ZL=(t,r)=>({endTime:r,type:"exponentialRampToValue",value:t}),JL=(t,r)=>({endTime:r,type:"linearRampToValue",value:t}),$L=(t,r,s)=>({startTime:r,target:t,timeConstant:s,type:"setTarget"}),eD=()=>new DOMException("","AbortError"),tD=t=>(r,s,[u,p,d],b)=>{t(r[p],[s,u,d],k=>k[0]===s&&k[1]===u,b)},nD=t=>(r,s,u)=>{const p=[];for(let d=0;d(r,s)=>{t.set(r,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:s})},nl=new WeakSet,Wy=new WeakMap,Uy=new WeakMap,Hy=new WeakMap,Gy=new WeakMap,Qy=new WeakMap,Yy=new WeakMap,Gp=new WeakMap,Iv=new WeakMap,Ky={construct(){return Ky}},oD=t=>{try{const r=new Proxy(t,Ky);new r}catch{return!1}return!0},Nv=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,Rv=(t,r)=>{const s=[];let u=t.replace(/^[\s]+/,""),p=u.match(Nv);for(;p!==null;){const d=p[1].slice(1,-1),b=p[0].replace(/([\s]+)?;?$/,"").replace(d,new URL(d,r).toString());s.push(b),u=u.slice(p[0].length).replace(/^[\s]+/,""),p=u.match(Nv)}return[s.join(";"),u]},Tv=t=>{if(t!==void 0&&!Array.isArray(t))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},Fv=t=>{if(!oD(t))throw new TypeError("The given value for processorCtor should be a constructor.");if(t.prototype===null||typeof t.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},iD=(t,r,s,u,p,d,b,k,y,_,S,P,I)=>{let L=0;return(R,D,Z={credentials:"omit"})=>{const F=S.get(R);if(F!==void 0&&F.has(D))return Promise.resolve();const O=_.get(R);if(O!==void 0){const U=O.get(D);if(U!==void 0)return U}const B=d(R),Q=B.audioWorklet===void 0?p(D).then(([U,ee])=>{const[q,X]=Rv(U,ee),me=`${q};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${X} -})})(window,'_AWGS')`;return s(me)}).then(()=>{const U=I._AWGS.pop();if(U===void 0)throw new SyntaxError;u(B.currentTime,B.sampleRate,()=>U(class{},void 0,(ee,q)=>{if(ee.trim()==="")throw r();const X=Iv.get(B);if(X!==void 0){if(X.has(ee))throw r();Fv(q),Tv(q.parameterDescriptors),X.set(ee,q)}else Fv(q),Tv(q.parameterDescriptors),Iv.set(B,new Map([[ee,q]]))},B.sampleRate,void 0,void 0))}):Promise.all([p(D),Promise.resolve(t(P,P))]).then(([[U,ee],q])=>{const X=L+1;L=X;const[me,le]=Rv(U,ee),_e=`${me};((AudioWorkletProcessor,registerProcessor)=>{${le} -})(${q?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${q?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${q?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${X}',class extends AudioWorkletProcessor{process(){return !1}})`,ge=new Blob([_e],{type:"application/javascript; charset=utf-8"}),ye=URL.createObjectURL(ge);return B.audioWorklet.addModule(ye,Z).then(()=>{if(k(B))return B;const ve=b(B);return ve.audioWorklet.addModule(ye,Z).then(()=>ve)}).then(ve=>{if(y===null)throw new SyntaxError;try{new y(ve,`__sac${X}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(ye))});return O===void 0?_.set(R,new Map([[D,Q]])):O.set(D,Q),Q.then(()=>{const U=S.get(R);U===void 0?S.set(R,new Set([D])):U.add(D)}).finally(()=>{const U=_.get(R);U!==void 0&&U.delete(D)}),Q}},da=(t,r)=>{const s=t.get(r);if(s===void 0)throw new Error("A value with the given key could not be found.");return s},ad=(t,r)=>{const s=Array.from(t).filter(r);if(s.length>1)throw Error("More than one element was found.");if(s.length===0)throw Error("No element was found.");const[u]=s;return t.delete(u),u},Xy=(t,r,s,u)=>{const p=da(t,r),d=ad(p,b=>b[0]===s&&b[1]===u);return p.size===0&&t.delete(r),d},Gc=t=>da(Yy,t),rl=t=>{if(nl.has(t))throw new Error("The AudioNode is already stored.");nl.add(t),Gc(t).forEach(r=>r(!0))},qy=t=>"port"in t,Qc=t=>{if(!nl.has(t))throw new Error("The AudioNode is not stored.");nl.delete(t),Gc(t).forEach(r=>r(!1))},Qp=(t,r)=>{!qy(t)&&r.every(s=>s.size===0)&&Qc(t)},aD=(t,r,s,u,p,d,b,k,y,_,S,P,I)=>{const L=new WeakMap;return(R,D,Z,F,O)=>{const{activeInputs:B,passiveInputs:Q}=d(D),{outputs:U}=d(R),ee=k(R),q=X=>{const me=y(D),le=y(R);if(X){const he=Xy(Q,R,Z,F);t(B,R,he,!1),!O&&!P(R)&&s(le,me,Z,F),I(D)&&rl(D)}else{const he=u(B,R,Z,F);r(Q,F,he,!1),!O&&!P(R)&&p(le,me,Z,F);const de=b(D);if(de===0)S(D)&&Qp(D,B);else{const Ce=L.get(D);Ce!==void 0&&clearTimeout(Ce),L.set(D,setTimeout(()=>{S(D)&&Qp(D,B)},de*1e3))}}};return _(U,[D,Z,F],X=>X[0]===D&&X[1]===Z&&X[2]===F,!0)?(ee.add(q),S(R)?t(B,R,[Z,F,q],!0):r(Q,F,[R,Z,q],!0),!0):!1}},sD=t=>(r,s,[u,p,d],b)=>{const k=r.get(u);k===void 0?r.set(u,new Set([[p,s,d]])):t(k,[p,s,d],y=>y[0]===p&&y[1]===s,b)},lD=t=>(r,s)=>{const u=t(r,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});s.connect(u).connect(r.destination);const p=()=>{s.removeEventListener("ended",p),s.disconnect(u),u.disconnect()};s.addEventListener("ended",p)},cD={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},uD=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=p(k),S={...cD,...y},P=u(_,S),I=d(_)?r():null;super(k,!1,P,I),this._nativeAnalyserNode=P}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(k){this._nativeAnalyserNode.fftSize=k}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(k){const y=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=k,!(k>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=y,s()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(k){const y=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=k,!(this._nativeAnalyserNode.maxDecibels>k))throw this._nativeAnalyserNode.minDecibels=y,s()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(k){this._nativeAnalyserNode.smoothingTimeConstant=k}getByteFrequencyData(k){this._nativeAnalyserNode.getByteFrequencyData(k)}getByteTimeDomainData(k){this._nativeAnalyserNode.getByteTimeDomainData(k)}getFloatFrequencyData(k){this._nativeAnalyserNode.getFloatFrequencyData(k)}getFloatTimeDomainData(k){this._nativeAnalyserNode.getFloatTimeDomainData(k)}},Or=(t,r)=>t.context===r,fD=(t,r,s)=>()=>{const u=new WeakMap,p=async(d,b)=>{let k=r(d);if(!Or(k,b)){const _={channelCount:k.channelCount,channelCountMode:k.channelCountMode,channelInterpretation:k.channelInterpretation,fftSize:k.fftSize,maxDecibels:k.maxDecibels,minDecibels:k.minDecibels,smoothingTimeConstant:k.smoothingTimeConstant};k=t(b,_)}return u.set(b,k),await s(d,b,k),k};return{render(d,b){const k=u.get(b);return k!==void 0?Promise.resolve(k):p(d,b)}}},Yp=t=>{try{t.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},Qa=()=>new DOMException("","IndexSizeError"),Zy=t=>{t.getChannelData=(r=>s=>{try{return r.call(t,s)}catch(u){throw u.code===12?Qa():u}})(t.getChannelData)},dD={numberOfChannels:1},pD=(t,r,s,u,p,d,b,k)=>{let y=null;return class Jy{constructor(S){if(p===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:P,numberOfChannels:I,sampleRate:L}={...dD,...S};y===null&&(y=new p(1,1,44100));const R=u!==null&&r(d,d)?new u({length:P,numberOfChannels:I,sampleRate:L}):y.createBuffer(I,P,L);if(R.numberOfChannels===0)throw s();return typeof R.copyFromChannel!="function"?(b(R),Zy(R)):r(Yp,()=>Yp(R))||k(R),t.add(R),R}static[Symbol.hasInstance](S){return S!==null&&typeof S=="object"&&Object.getPrototypeOf(S)===Jy.prototype||t.has(S)}}},$r=-34028234663852886e22,Ur=-$r,Ai=t=>nl.has(t),hD={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},mD=(t,r,s,u,p,d,b,k)=>class extends t{constructor(_,S){const P=d(_),I={...hD,...S},L=p(P,I),R=b(P),D=R?r():null;super(_,!1,L,D),this._audioBufferSourceNodeRenderer=D,this._isBufferNullified=!1,this._isBufferSet=I.buffer!==null,this._nativeAudioBufferSourceNode=L,this._onended=null,this._playbackRate=s(this,R,L.playbackRate,Ur,$r)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(_){if(this._nativeAudioBufferSourceNode.buffer=_,_!==null){if(this._isBufferSet)throw u();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(_){this._nativeAudioBufferSourceNode.loop=_}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(_){this._nativeAudioBufferSourceNode.loopEnd=_}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(_){this._nativeAudioBufferSourceNode.loopStart=_}get onended(){return this._onended}set onended(_){const S=typeof _=="function"?k(this,_):null;this._nativeAudioBufferSourceNode.onended=S;const P=this._nativeAudioBufferSourceNode.onended;this._onended=P!==null&&P===S?_:P}get playbackRate(){return this._playbackRate}start(_=0,S=0,P){if(this._nativeAudioBufferSourceNode.start(_,S,P),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=P===void 0?[_,S]:[_,S,P]),this.context.state!=="closed"){rl(this);const I=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",I),Ai(this)&&Qc(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",I)}}stop(_=0){this._nativeAudioBufferSourceNode.stop(_),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=_)}},gD=(t,r,s,u,p)=>()=>{const d=new WeakMap;let b=null,k=null;const y=async(_,S)=>{let P=s(_);const I=Or(P,S);if(!I){const L={buffer:P.buffer,channelCount:P.channelCount,channelCountMode:P.channelCountMode,channelInterpretation:P.channelInterpretation,loop:P.loop,loopEnd:P.loopEnd,loopStart:P.loopStart,playbackRate:P.playbackRate.value};P=r(S,L),b!==null&&P.start(...b),k!==null&&P.stop(k)}return d.set(S,P),I?await t(S,_.playbackRate,P.playbackRate):await u(S,_.playbackRate,P.playbackRate),await p(_,S,P),P};return{set start(_){b=_},set stop(_){k=_},render(_,S){const P=d.get(S);return P!==void 0?Promise.resolve(P):y(_,S)}}},bD=t=>"playbackRate"in t,vD=t=>"frequency"in t&&"gain"in t,kD=t=>"offset"in t,yD=t=>!("frequency"in t)&&"gain"in t,_D=t=>"detune"in t&&"frequency"in t&&!("gain"in t),wD=t=>"pan"in t,ro=t=>da(Wy,t),Yc=t=>da(Hy,t),Kp=(t,r)=>{const{activeInputs:s}=ro(t);s.forEach(p=>p.forEach(([d])=>{r.includes(t)||Kp(d,[...r,t])}));const u=bD(t)?[t.playbackRate]:qy(t)?Array.from(t.parameters.values()):vD(t)?[t.Q,t.detune,t.frequency,t.gain]:kD(t)?[t.offset]:yD(t)?[t.gain]:_D(t)?[t.detune,t.frequency]:wD(t)?[t.pan]:[];for(const p of u){const d=Yc(p);d!==void 0&&d.activeInputs.forEach(([b])=>Kp(b,r))}Ai(t)&&Qc(t)},AD=t=>{Kp(t.destination,[])},CD=t=>t===void 0||typeof t=="number"||typeof t=="string"&&(t==="balanced"||t==="interactive"||t==="playback"),xD=(t,r,s,u,p,d,b,k,y)=>class extends t{constructor(S={}){if(y===null)throw new Error("Missing the native AudioContext constructor.");let P;try{P=new y(S)}catch(R){throw R.code===12&&R.message==="sampleRate is not in range"?s():R}if(P===null)throw u();if(!CD(S.latencyHint))throw new TypeError(`The provided value '${S.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(S.sampleRate!==void 0&&P.sampleRate!==S.sampleRate)throw s();super(P,2);const{latencyHint:I}=S,{sampleRate:L}=P;if(this._baseLatency=typeof P.baseLatency=="number"?P.baseLatency:I==="balanced"?512/L:I==="interactive"||I===void 0?256/L:I==="playback"?1024/L:Math.max(2,Math.min(128,Math.round(I*L/128)))*128/L,this._nativeAudioContext=P,y.name==="webkitAudioContext"?(this._nativeGainNode=P.createGain(),this._nativeOscillatorNode=P.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(P.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,P.state==="running"){this._state="suspended";const R=()=>{this._state==="suspended"&&(this._state=null),P.removeEventListener("statechange",R)};P.addEventListener("statechange",R)}}get baseLatency(){return this._baseLatency}get state(){return this._state!==null?this._state:this._nativeAudioContext.state}close(){return this.state==="closed"?this._nativeAudioContext.close().then(()=>{throw r()}):(this._state==="suspended"&&(this._state=null),this._nativeAudioContext.close().then(()=>{this._nativeGainNode!==null&&this._nativeOscillatorNode!==null&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),AD(this)}))}createMediaElementSource(S){return new p(this,{mediaElement:S})}createMediaStreamDestination(){return new d(this)}createMediaStreamSource(S){return new b(this,{mediaStream:S})}createMediaStreamTrackSource(S){return new k(this,{mediaStreamTrack:S})}resume(){return this._state==="suspended"?new Promise((S,P)=>{const I=()=>{this._nativeAudioContext.removeEventListener("statechange",I),this._nativeAudioContext.state==="running"?S():this.resume().then(S,P)};this._nativeAudioContext.addEventListener("statechange",I)}):this._nativeAudioContext.resume().catch(S=>{throw S===void 0||S.code===15?r():S})}suspend(){return this._nativeAudioContext.suspend().catch(S=>{throw S===void 0?r():S})}},SD=(t,r,s,u,p,d,b,k)=>class extends t{constructor(_,S){const P=d(_),I=b(P),L=p(P,S,I),R=I?r(k):null;super(_,!1,L,R),this._isNodeOfNativeOfflineAudioContext=I,this._nativeAudioDestinationNode=L}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(_){if(this._isNodeOfNativeOfflineAudioContext)throw u();if(_>this._nativeAudioDestinationNode.maxChannelCount)throw s();this._nativeAudioDestinationNode.channelCount=_}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(_){if(this._isNodeOfNativeOfflineAudioContext)throw u();this._nativeAudioDestinationNode.channelCountMode=_}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},ED=t=>{const r=new WeakMap,s=async(u,p)=>{const d=p.destination;return r.set(p,d),await t(u,p,d),d};return{render(u,p){const d=r.get(p);return d!==void 0?Promise.resolve(d):s(u,p)}}},PD=(t,r,s,u,p,d,b,k)=>(y,_)=>{const S=_.listener,P=()=>{const U=new Float32Array(1),ee=r(_,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),q=b(_);let X=!1,me=[0,0,-1,0,1,0],le=[0,0,0];const he=()=>{if(X)return;X=!0;const ge=u(_,256,9,0);ge.onaudioprocess=({inputBuffer:ye})=>{const ve=[d(ye,U,0),d(ye,U,1),d(ye,U,2),d(ye,U,3),d(ye,U,4),d(ye,U,5)];ve.some((we,Ne)=>we!==me[Ne])&&(S.setOrientation(...ve),me=ve);const ce=[d(ye,U,6),d(ye,U,7),d(ye,U,8)];ce.some((we,Ne)=>we!==le[Ne])&&(S.setPosition(...ce),le=ce)},ee.connect(ge)},de=ge=>ye=>{ye!==me[ge]&&(me[ge]=ye,S.setOrientation(...me))},Ce=ge=>ye=>{ye!==le[ge]&&(le[ge]=ye,S.setPosition(...le))},_e=(ge,ye,ve)=>{const ce=s(_,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:ye});ce.connect(ee,0,ge),ce.start(),Object.defineProperty(ce.offset,"defaultValue",{get(){return ye}});const we=t({context:y},q,ce.offset,Ur,$r);return k(we,"value",Ne=>()=>Ne.call(we),Ne=>Ae=>{try{Ne.call(we,Ae)}catch(Pe){if(Pe.code!==9)throw Pe}he(),q&&ve(Ae)}),we.cancelAndHoldAtTime=(Ne=>q?()=>{throw p()}:(...Ae)=>{const Pe=Ne.apply(we,Ae);return he(),Pe})(we.cancelAndHoldAtTime),we.cancelScheduledValues=(Ne=>q?()=>{throw p()}:(...Ae)=>{const Pe=Ne.apply(we,Ae);return he(),Pe})(we.cancelScheduledValues),we.exponentialRampToValueAtTime=(Ne=>q?()=>{throw p()}:(...Ae)=>{const Pe=Ne.apply(we,Ae);return he(),Pe})(we.exponentialRampToValueAtTime),we.linearRampToValueAtTime=(Ne=>q?()=>{throw p()}:(...Ae)=>{const Pe=Ne.apply(we,Ae);return he(),Pe})(we.linearRampToValueAtTime),we.setTargetAtTime=(Ne=>q?()=>{throw p()}:(...Ae)=>{const Pe=Ne.apply(we,Ae);return he(),Pe})(we.setTargetAtTime),we.setValueAtTime=(Ne=>q?()=>{throw p()}:(...Ae)=>{const Pe=Ne.apply(we,Ae);return he(),Pe})(we.setValueAtTime),we.setValueCurveAtTime=(Ne=>q?()=>{throw p()}:(...Ae)=>{const Pe=Ne.apply(we,Ae);return he(),Pe})(we.setValueCurveAtTime),we};return{forwardX:_e(0,0,de(0)),forwardY:_e(1,0,de(1)),forwardZ:_e(2,-1,de(2)),positionX:_e(6,0,Ce(0)),positionY:_e(7,0,Ce(1)),positionZ:_e(8,0,Ce(2)),upX:_e(3,0,de(3)),upY:_e(4,1,de(4)),upZ:_e(5,0,de(5))}},{forwardX:I,forwardY:L,forwardZ:R,positionX:D,positionY:Z,positionZ:F,upX:O,upY:B,upZ:Q}=S.forwardX===void 0?P():S;return{get forwardX(){return I},get forwardY(){return L},get forwardZ(){return R},get positionX(){return D},get positionY(){return Z},get positionZ(){return F},get upX(){return O},get upY(){return B},get upZ(){return Q}}},K0=t=>"context"in t,Kc=t=>K0(t[0]),Ya=(t,r,s,u)=>{for(const p of t)if(s(p)){if(u)return!1;throw Error("The set contains at least one similar element.")}return t.add(r),!0},Lv=(t,r,[s,u],p)=>{Ya(t,[r,s,u],d=>d[0]===r&&d[1]===s,p)},Dv=(t,[r,s,u],p)=>{const d=t.get(r);d===void 0?t.set(r,new Set([[s,u]])):Ya(d,[s,u],b=>b[0]===s,p)},dl=t=>"inputs"in t,X0=(t,r,s,u)=>{if(dl(r)){const p=r.inputs[u];return t.connect(p,s,0),[p,s,0]}return t.connect(r,s,u),[r,s,u]},$y=(t,r,s)=>{for(const u of t)if(u[0]===r&&u[1]===s)return t.delete(u),u;return null},MD=(t,r,s)=>ad(t,u=>u[0]===r&&u[1]===s),e_=(t,r)=>{if(!Gc(t).delete(r))throw new Error("Missing the expected event listener.")},t_=(t,r,s)=>{const u=da(t,r),p=ad(u,d=>d[0]===s);return u.size===0&&t.delete(r),p},q0=(t,r,s,u)=>{dl(r)?t.disconnect(r.inputs[u],s,0):t.disconnect(r,s,u)},Tn=t=>da(Uy,t),Rc=t=>da(Gy,t),Wa=t=>Gp.has(t),p0=t=>!nl.has(t),Ov=(t,r)=>new Promise(s=>{if(r!==null)s(!0);else{const u=t.createScriptProcessor(256,1,1),p=t.createGain(),d=t.createBuffer(1,2,44100),b=d.getChannelData(0);b[0]=1,b[1]=1;const k=t.createBufferSource();k.buffer=d,k.loop=!0,k.connect(u).connect(t.destination),k.connect(p),k.disconnect(p),u.onaudioprocess=y=>{const _=y.inputBuffer.getChannelData(0);Array.prototype.some.call(_,S=>S===1)?s(!0):s(!1),k.stop(),u.onaudioprocess=null,k.disconnect(u),u.disconnect(t.destination)},k.start()}}),L2=(t,r)=>{const s=new Map;for(const u of t)for(const p of u){const d=s.get(p);s.set(p,d===void 0?1:d+1)}s.forEach((u,p)=>r(p,u))},Bv=t=>"context"in t,ID=t=>{const r=new Map;t.connect=(s=>(u,p=0,d=0)=>{const b=Bv(u)?s(u,p,d):s(u,p),k=r.get(u);return k===void 0?r.set(u,[{input:d,output:p}]):k.every(y=>y.input!==d||y.output!==p)&&k.push({input:d,output:p}),b})(t.connect.bind(t)),t.disconnect=(s=>(u,p,d)=>{if(s.apply(t),u===void 0)r.clear();else if(typeof u=="number")for(const[b,k]of r){const y=k.filter(_=>_.output!==u);y.length===0?r.delete(b):r.set(b,y)}else if(r.has(u))if(p===void 0)r.delete(u);else{const b=r.get(u);if(b!==void 0){const k=b.filter(y=>y.output!==p&&(y.input!==d||d===void 0));k.length===0?r.delete(u):r.set(u,k)}}for(const[b,k]of r)k.forEach(y=>{Bv(b)?t.connect(b,y.output,y.input):t.connect(b,y.output)})})(t.disconnect)},ND=(t,r,s,u)=>{const{activeInputs:p,passiveInputs:d}=Yc(r),{outputs:b}=ro(t),k=Gc(t),y=_=>{const S=Tn(t),P=Rc(r);if(_){const I=t_(d,t,s);Lv(p,t,I,!1),!u&&!Wa(t)&&S.connect(P,s)}else{const I=MD(p,t,s);Dv(d,I,!1),!u&&!Wa(t)&&S.disconnect(P,s)}};return Ya(b,[r,s],_=>_[0]===r&&_[1]===s,!0)?(k.add(y),Ai(t)?Lv(p,t,[s,y],!0):Dv(d,[t,s,y],!0),!0):!1},RD=(t,r,s,u)=>{const{activeInputs:p,passiveInputs:d}=ro(r),b=$y(p[u],t,s);return b===null?[Xy(d,t,s,u)[2],!1]:[b[2],!0]},TD=(t,r,s)=>{const{activeInputs:u,passiveInputs:p}=Yc(r),d=$y(u,t,s);return d===null?[t_(p,t,s)[1],!1]:[d[2],!0]},Mh=(t,r,s,u,p)=>{const[d,b]=RD(t,s,u,p);if(d!==null&&(e_(t,d),b&&!r&&!Wa(t)&&q0(Tn(t),Tn(s),u,p)),Ai(s)){const{activeInputs:k}=ro(s);Qp(s,k)}},Ih=(t,r,s,u)=>{const[p,d]=TD(t,s,u);p!==null&&(e_(t,p),d&&!r&&!Wa(t)&&Tn(t).disconnect(Rc(s),u))},FD=(t,r)=>{const s=ro(t),u=[];for(const p of s.outputs)Kc(p)?Mh(t,r,...p):Ih(t,r,...p),u.push(p[0]);return s.outputs.clear(),u},LD=(t,r,s)=>{const u=ro(t),p=[];for(const d of u.outputs)d[1]===s&&(Kc(d)?Mh(t,r,...d):Ih(t,r,...d),p.push(d[0]),u.outputs.delete(d));return p},DD=(t,r,s,u,p)=>{const d=ro(t);return Array.from(d.outputs).filter(b=>b[0]===s&&(u===void 0||b[1]===u)&&(p===void 0||b[2]===p)).map(b=>(Kc(b)?Mh(t,r,...b):Ih(t,r,...b),d.outputs.delete(b),b[0]))},OD=(t,r,s,u,p,d,b,k,y,_,S,P,I,L,R,D)=>class extends _{constructor(F,O,B,Q){super(B),this._context=F,this._nativeAudioNode=B;const U=S(F);P(U)&&s(Ov,()=>Ov(U,D))!==!0&&ID(B),Uy.set(this,B),Yy.set(this,new Set),F.state!=="closed"&&O&&rl(this),t(this,Q,B)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(F){this._nativeAudioNode.channelCount=F}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(F){this._nativeAudioNode.channelCountMode=F}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(F){this._nativeAudioNode.channelInterpretation=F}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(F,O=0,B=0){if(O<0||O>=this._nativeAudioNode.numberOfOutputs)throw p();const Q=S(this._context),U=R(Q);if(I(F)||L(F))throw d();if(K0(F)){const X=Tn(F);try{const le=X0(this._nativeAudioNode,X,O,B),he=p0(this);(U||he)&&this._nativeAudioNode.disconnect(...le),this.context.state!=="closed"&&!he&&p0(F)&&rl(F)}catch(le){throw le.code===12?d():le}if(r(this,F,O,B,U)){const le=y([this],F);L2(le,u(U))}return F}const ee=Rc(F);if(ee.name==="playbackRate"&&ee.maxValue===1024)throw b();try{this._nativeAudioNode.connect(ee,O),(U||p0(this))&&this._nativeAudioNode.disconnect(ee,O)}catch(X){throw X.code===12?d():X}if(ND(this,F,O,U)){const X=y([this],F);L2(X,u(U))}}disconnect(F,O,B){let Q;const U=S(this._context),ee=R(U);if(F===void 0)Q=FD(this,ee);else if(typeof F=="number"){if(F<0||F>=this.numberOfOutputs)throw p();Q=LD(this,ee,F)}else{if(O!==void 0&&(O<0||O>=this.numberOfOutputs)||K0(F)&&B!==void 0&&(B<0||B>=F.numberOfInputs))throw p();if(Q=DD(this,ee,F,O,B),Q.length===0)throw d()}for(const q of Q){const X=y([this],q);L2(X,k)}}},BD=(t,r,s,u,p,d,b,k,y,_,S,P,I)=>(L,R,D,Z=null,F=null)=>{const O=D.value,B=new KL(O),Q=R?u(B):null,U={get defaultValue(){return O},get maxValue(){return Z===null?D.maxValue:Z},get minValue(){return F===null?D.minValue:F},get value(){return D.value},set value(ee){D.value=ee,U.setValueAtTime(ee,L.context.currentTime)},cancelAndHoldAtTime(ee){if(typeof D.cancelAndHoldAtTime=="function")Q===null&&B.flush(L.context.currentTime),B.add(p(ee)),D.cancelAndHoldAtTime(ee);else{const q=Array.from(B).pop();Q===null&&B.flush(L.context.currentTime),B.add(p(ee));const X=Array.from(B).pop();D.cancelScheduledValues(ee),q!==X&&X!==void 0&&(X.type==="exponentialRampToValue"?D.exponentialRampToValueAtTime(X.value,X.endTime):X.type==="linearRampToValue"?D.linearRampToValueAtTime(X.value,X.endTime):X.type==="setValue"?D.setValueAtTime(X.value,X.startTime):X.type==="setValueCurve"&&D.setValueCurveAtTime(X.values,X.startTime,X.duration))}return U},cancelScheduledValues(ee){return Q===null&&B.flush(L.context.currentTime),B.add(d(ee)),D.cancelScheduledValues(ee),U},exponentialRampToValueAtTime(ee,q){if(ee===0)throw new RangeError;if(!Number.isFinite(q)||q<0)throw new RangeError;const X=L.context.currentTime;return Q===null&&B.flush(X),Array.from(B).length===0&&(B.add(_(O,X)),D.setValueAtTime(O,X)),B.add(b(ee,q)),D.exponentialRampToValueAtTime(ee,q),U},linearRampToValueAtTime(ee,q){const X=L.context.currentTime;return Q===null&&B.flush(X),Array.from(B).length===0&&(B.add(_(O,X)),D.setValueAtTime(O,X)),B.add(k(ee,q)),D.linearRampToValueAtTime(ee,q),U},setTargetAtTime(ee,q,X){return Q===null&&B.flush(L.context.currentTime),B.add(y(ee,q,X)),D.setTargetAtTime(ee,q,X),U},setValueAtTime(ee,q){return Q===null&&B.flush(L.context.currentTime),B.add(_(ee,q)),D.setValueAtTime(ee,q),U},setValueCurveAtTime(ee,q,X){const me=ee instanceof Float32Array?ee:new Float32Array(ee);if(P!==null&&P.name==="webkitAudioContext"){const le=q+X,he=L.context.sampleRate,de=Math.ceil(q*he),Ce=Math.floor(le*he),_e=Ce-de,ge=new Float32Array(_e);for(let ve=0;ve<_e;ve+=1){const ce=(me.length-1)/X*((de+ve)/he-q),we=Math.floor(ce),Ne=Math.ceil(ce);ge[ve]=we===Ne?me[we]:(1-(ce-we))*me[we]+(1-(Ne-ce))*me[Ne]}Q===null&&B.flush(L.context.currentTime),B.add(S(ge,q,X)),D.setValueCurveAtTime(ge,q,X);const ye=Ce/he;ye({replay(r){for(const s of t)if(s.type==="exponentialRampToValue"){const{endTime:u,value:p}=s;r.exponentialRampToValueAtTime(p,u)}else if(s.type==="linearRampToValue"){const{endTime:u,value:p}=s;r.linearRampToValueAtTime(p,u)}else if(s.type==="setTarget"){const{startTime:u,target:p,timeConstant:d}=s;r.setTargetAtTime(p,u,d)}else if(s.type==="setValue"){const{startTime:u,value:p}=s;r.setValueAtTime(p,u)}else if(s.type==="setValueCurve"){const{duration:u,startTime:p,values:d}=s;r.setValueCurveAtTime(d,p,u)}else throw new Error("Can't apply an unknown automation.")}}),zD=(t,r,s,u,p,d,b,k,y,_,S,P,I,L,R,D,Z,F,O,B)=>class extends R{constructor(U,ee){super(U,ee),this._nativeContext=U,this._audioWorklet=t===void 0?void 0:{addModule:(q,X)=>t(this,q,X)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new r(this)}createBiquadFilter(){return new p(this)}createBuffer(U,ee,q){return new s({length:ee,numberOfChannels:U,sampleRate:q})}createBufferSource(){return new u(this)}createChannelMerger(U=6){return new d(this,{numberOfInputs:U})}createChannelSplitter(U=6){return new b(this,{numberOfOutputs:U})}createConstantSource(){return new k(this)}createConvolver(){return new y(this)}createDelay(U=1){return new S(this,{maxDelayTime:U})}createDynamicsCompressor(){return new P(this)}createGain(){return new I(this)}createIIRFilter(U,ee){return new L(this,{feedback:ee,feedforward:U})}createOscillator(){return new D(this)}createPanner(){return new Z(this)}createPeriodicWave(U,ee,q={disableNormalization:!1}){return new F(this,{...q,imag:ee,real:U})}createStereoPanner(){return new O(this)}createWaveShaper(){return new B(this)}decodeAudioData(U,ee,q){return _(this._nativeContext,U).then(X=>(typeof ee=="function"&&ee(X),X),X=>{throw typeof q=="function"&&q(X),X})}},VD={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},WD=(t,r,s,u,p,d,b,k)=>class extends t{constructor(_,S){const P=d(_),I={...VD,...S},L=p(P,I),R=b(P),D=R?s():null;super(_,!1,L,D),this._Q=r(this,R,L.Q,Ur,$r),this._detune=r(this,R,L.detune,1200*Math.log2(Ur),-1200*Math.log2(Ur)),this._frequency=r(this,R,L.frequency,_.sampleRate/2,0),this._gain=r(this,R,L.gain,40*Math.log10(Ur),$r),this._nativeBiquadFilterNode=L,k(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(_){this._nativeBiquadFilterNode.type=_}getFrequencyResponse(_,S,P){try{this._nativeBiquadFilterNode.getFrequencyResponse(_,S,P)}catch(I){throw I.code===11?u():I}if(_.length!==S.length||S.length!==P.length)throw u()}},UD=(t,r,s,u,p)=>()=>{const d=new WeakMap,b=async(k,y)=>{let _=s(k);const S=Or(_,y);if(!S){const P={Q:_.Q.value,channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,detune:_.detune.value,frequency:_.frequency.value,gain:_.gain.value,type:_.type};_=r(y,P)}return d.set(y,_),S?(await t(y,k.Q,_.Q),await t(y,k.detune,_.detune),await t(y,k.frequency,_.frequency),await t(y,k.gain,_.gain)):(await u(y,k.Q,_.Q),await u(y,k.detune,_.detune),await u(y,k.frequency,_.frequency),await u(y,k.gain,_.gain)),await p(k,y,_),_};return{render(k,y){const _=d.get(y);return _!==void 0?Promise.resolve(_):b(k,y)}}},HD=(t,r)=>(s,u)=>{const p=r.get(s);if(p!==void 0)return p;const d=t.get(s);if(d!==void 0)return d;try{const b=u();return b instanceof Promise?(t.set(s,b),b.catch(()=>!1).then(k=>(t.delete(s),r.set(s,k),k))):(r.set(s,b),b)}catch{return r.set(s,!1),!1}},GD={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},QD=(t,r,s,u,p)=>class extends t{constructor(b,k){const y=u(b),_={...GD,...k},S=s(y,_),P=p(y)?r():null;super(b,!1,S,P)}},YD=(t,r,s)=>()=>{const u=new WeakMap,p=async(d,b)=>{let k=r(d);if(!Or(k,b)){const _={channelCount:k.channelCount,channelCountMode:k.channelCountMode,channelInterpretation:k.channelInterpretation,numberOfInputs:k.numberOfInputs};k=t(b,_)}return u.set(b,k),await s(d,b,k),k};return{render(d,b){const k=u.get(b);return k!==void 0?Promise.resolve(k):p(d,b)}}},KD={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},XD=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=u(k),S=d({...KD,...y}),P=s(_,S),I=p(_)?r():null;super(k,!1,P,I)}},qD=(t,r,s)=>()=>{const u=new WeakMap,p=async(d,b)=>{let k=r(d);if(!Or(k,b)){const _={channelCount:k.channelCount,channelCountMode:k.channelCountMode,channelInterpretation:k.channelInterpretation,numberOfOutputs:k.numberOfOutputs};k=t(b,_)}return u.set(b,k),await s(d,b,k),k};return{render(d,b){const k=u.get(b);return k!==void 0?Promise.resolve(k):p(d,b)}}},ZD=t=>(r,s,u)=>t(s,r,u),JD=t=>(r,s)=>{const u=t(r,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),p=r.createBuffer(1,2,44100);return u.buffer=p,u.loop=!0,u.connect(s),u.start(),()=>{u.stop(),u.disconnect(s)}},$D={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},eO=(t,r,s,u,p,d,b)=>class extends t{constructor(y,_){const S=p(y),P={...$D,..._},I=u(S,P),L=d(S),R=L?s():null;super(y,!1,I,R),this._constantSourceNodeRenderer=R,this._nativeConstantSourceNode=I,this._offset=r(this,L,I.offset,Ur,$r),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(y){const _=typeof y=="function"?b(this,y):null;this._nativeConstantSourceNode.onended=_;const S=this._nativeConstantSourceNode.onended;this._onended=S!==null&&S===_?y:S}start(y=0){if(this._nativeConstantSourceNode.start(y),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=y),this.context.state!=="closed"){rl(this);const _=()=>{this._nativeConstantSourceNode.removeEventListener("ended",_),Ai(this)&&Qc(this)};this._nativeConstantSourceNode.addEventListener("ended",_)}}stop(y=0){this._nativeConstantSourceNode.stop(y),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=y)}},tO=(t,r,s,u,p)=>()=>{const d=new WeakMap;let b=null,k=null;const y=async(_,S)=>{let P=s(_);const I=Or(P,S);if(!I){const L={channelCount:P.channelCount,channelCountMode:P.channelCountMode,channelInterpretation:P.channelInterpretation,offset:P.offset.value};P=r(S,L),b!==null&&P.start(b),k!==null&&P.stop(k)}return d.set(S,P),I?await t(S,_.offset,P.offset):await u(S,_.offset,P.offset),await p(_,S,P),P};return{set start(_){b=_},set stop(_){k=_},render(_,S){const P=d.get(S);return P!==void 0?Promise.resolve(P):y(_,S)}}},nO=t=>r=>(t[0]=r,t[0]),rO={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},oO=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=u(k),S={...rO,...y},P=s(_,S),L=p(_)?r():null;super(k,!1,P,L),this._isBufferNullified=!1,this._nativeConvolverNode=P,S.buffer!==null&&d(this,S.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(k){if(this._nativeConvolverNode.buffer=k,k===null&&this._nativeConvolverNode.buffer!==null){const y=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=y.createBuffer(1,1,y.sampleRate),this._isBufferNullified=!0,d(this,0)}else this._isBufferNullified=!1,d(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(k){this._nativeConvolverNode.normalize=k}},iO=(t,r,s)=>()=>{const u=new WeakMap,p=async(d,b)=>{let k=r(d);if(!Or(k,b)){const _={buffer:k.buffer,channelCount:k.channelCount,channelCountMode:k.channelCountMode,channelInterpretation:k.channelInterpretation,disableNormalization:!k.normalize};k=t(b,_)}return u.set(b,k),dl(k)?await s(d,b,k.inputs[0]):await s(d,b,k),k};return{render(d,b){const k=u.get(b);return k!==void 0?Promise.resolve(k):p(d,b)}}},aO=()=>new DOMException("","DataCloneError"),jv=t=>{const{port1:r,port2:s}=new MessageChannel;return new Promise(u=>{const p=()=>{s.onmessage=null,r.close(),s.close(),u()};s.onmessage=()=>p();try{r.postMessage(t,[t])}catch{}finally{p()}})},sO=(t,r,s,u,p,d,b,k,y,_,S)=>(P,I)=>{const L=b(P)?P:d(P);if(p.has(I)){const R=s();return Promise.reject(R)}try{p.add(I)}catch{}return r(y,()=>y(L))?L.decodeAudioData(I).then(R=>(jv(I).catch(()=>{}),r(k,()=>k(R))||S(R),t.add(R),R)):new Promise((R,D)=>{const Z=async()=>{try{await jv(I)}catch{}},F=O=>{D(O),Z()};try{L.decodeAudioData(I,O=>{typeof O.copyFromChannel!="function"&&(_(O),Zy(O)),t.add(O),Z().then(()=>R(O))},O=>{F(O===null?u():O)})}catch(O){F(O)}})},lO=(t,r,s,u,p,d,b,k)=>(y,_)=>{const S=r.get(y);if(S===void 0)throw new Error("Missing the expected cycle count.");const P=d(y.context),I=k(P);if(S===_){if(r.delete(y),!I&&b(y)){const L=u(y),{outputs:R}=s(y);for(const D of R)if(Kc(D)){const Z=u(D[0]);t(L,Z,D[1],D[2])}else{const Z=p(D[0]);L.connect(Z,D[1])}}}else r.set(y,S-_)},cO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},uO=(t,r,s,u,p,d,b)=>class extends t{constructor(y,_){const S=p(y),P={...cO,..._},I=u(S,P),L=d(S),R=L?s(P.maxDelayTime):null;super(y,!1,I,R),this._delayTime=r(this,L,I.delayTime),b(this,P.maxDelayTime)}get delayTime(){return this._delayTime}},fO=(t,r,s,u,p)=>d=>{const b=new WeakMap,k=async(y,_)=>{let S=s(y);const P=Or(S,_);if(!P){const I={channelCount:S.channelCount,channelCountMode:S.channelCountMode,channelInterpretation:S.channelInterpretation,delayTime:S.delayTime.value,maxDelayTime:d};S=r(_,I)}return b.set(_,S),P?await t(_,y.delayTime,S.delayTime):await u(_,y.delayTime,S.delayTime),await p(y,_,S),S};return{render(y,_){const S=b.get(_);return S!==void 0?Promise.resolve(S):k(y,_)}}},dO=t=>(r,s,u,p)=>t(r[p],d=>d[0]===s&&d[1]===u),pO=t=>"delayTime"in t,hO=(t,r,s)=>function u(p,d){const b=K0(d)?d:s(t,d);if(pO(b))return[];if(p[0]===b)return[p];if(p.includes(b))return[];const{outputs:k}=r(b);return Array.from(k).map(y=>u([...p,b],y[0])).reduce((y,_)=>y.concat(_),[])},mO={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},gO=(t,r,s,u,p,d,b,k)=>class extends t{constructor(_,S){const P=d(_),I={...mO,...S},L=u(P,I),R=b(P),D=R?s():null;super(_,!1,L,D),this._attack=r(this,R,L.attack),this._knee=r(this,R,L.knee),this._nativeDynamicsCompressorNode=L,this._ratio=r(this,R,L.ratio),this._release=r(this,R,L.release),this._threshold=r(this,R,L.threshold),k(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(_){const S=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=_,_>2)throw this._nativeDynamicsCompressorNode.channelCount=S,p()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(_){const S=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=_,_==="max")throw this._nativeDynamicsCompressorNode.channelCountMode=S,p()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return typeof this._nativeDynamicsCompressorNode.reduction.value=="number"?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}},bO=(t,r,s,u,p)=>()=>{const d=new WeakMap,b=async(k,y)=>{let _=s(k);const S=Or(_,y);if(!S){const P={attack:_.attack.value,channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,knee:_.knee.value,ratio:_.ratio.value,release:_.release.value,threshold:_.threshold.value};_=r(y,P)}return d.set(y,_),S?(await t(y,k.attack,_.attack),await t(y,k.knee,_.knee),await t(y,k.ratio,_.ratio),await t(y,k.release,_.release),await t(y,k.threshold,_.threshold)):(await u(y,k.attack,_.attack),await u(y,k.knee,_.knee),await u(y,k.ratio,_.ratio),await u(y,k.release,_.release),await u(y,k.threshold,_.threshold)),await p(k,y,_),_};return{render(k,y){const _=d.get(y);return _!==void 0?Promise.resolve(_):b(k,y)}}},vO=()=>new DOMException("","EncodingError"),kO=t=>r=>new Promise((s,u)=>{if(t===null){u(new SyntaxError);return}const p=t.document.head;if(p===null)u(new SyntaxError);else{const d=t.document.createElement("script"),b=new Blob([r],{type:"application/javascript"}),k=URL.createObjectURL(b),y=t.onerror,_=()=>{t.onerror=y,URL.revokeObjectURL(k)};t.onerror=(S,P,I,L,R)=>{if(P===k||P===t.location.href&&I===1&&L===1)return _(),u(R),!1;if(y!==null)return y(S,P,I,L,R)},d.onerror=()=>{_(),u(new SyntaxError)},d.onload=()=>{_(),s()},d.src=k,d.type="module",p.appendChild(d)}}),yO=t=>class{constructor(s){this._nativeEventTarget=s,this._listeners=new WeakMap}addEventListener(s,u,p){if(u!==null){let d=this._listeners.get(u);d===void 0&&(d=t(this,u),typeof u=="function"&&this._listeners.set(u,d)),this._nativeEventTarget.addEventListener(s,d,p)}}dispatchEvent(s){return this._nativeEventTarget.dispatchEvent(s)}removeEventListener(s,u,p){const d=u===null?void 0:this._listeners.get(u);this._nativeEventTarget.removeEventListener(s,d===void 0?null:d,p)}},_O=t=>(r,s,u)=>{Object.defineProperties(t,{currentFrame:{configurable:!0,get(){return Math.round(r*s)}},currentTime:{configurable:!0,get(){return r}}});try{return u()}finally{t!==null&&(delete t.currentFrame,delete t.currentTime)}},wO=t=>async r=>{try{const s=await fetch(r);if(s.ok)return[await s.text(),s.url]}catch{}throw t()},AO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},CO=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=p(k),S={...AO,...y},P=u(_,S),I=d(_),L=I?s():null;super(k,!1,P,L),this._gain=r(this,I,P.gain,Ur,$r)}get gain(){return this._gain}},xO=(t,r,s,u,p)=>()=>{const d=new WeakMap,b=async(k,y)=>{let _=s(k);const S=Or(_,y);if(!S){const P={channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,gain:_.gain.value};_=r(y,P)}return d.set(y,_),S?await t(y,k.gain,_.gain):await u(y,k.gain,_.gain),await p(k,y,_),_};return{render(k,y){const _=d.get(y);return _!==void 0?Promise.resolve(_):b(k,y)}}},SO=t=>r=>{const s=t(r);if(s.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return s.renderer},EO=t=>r=>{var s;return(s=t.get(r))!==null&&s!==void 0?s:0},PO=t=>r=>{const s=t(r);if(s.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return s.renderer},Fr=()=>new DOMException("","InvalidStateError"),MO=t=>r=>{const s=t.get(r);if(s===void 0)throw Fr();return s},IO=(t,r)=>s=>{let u=t.get(s);if(u!==void 0)return u;if(r===null)throw new Error("Missing the native OfflineAudioContext constructor.");return u=new r(1,1,44100),t.set(s,u),u},sd=()=>new DOMException("","InvalidAccessError"),NO=t=>{t.getFrequencyResponse=(r=>(s,u,p)=>{if(s.length!==u.length||u.length!==p.length)throw sd();return r.call(t,s,u,p)})(t.getFrequencyResponse)},RO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},TO=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=u(k),S=p(_),P={...RO,...y},I=r(_,S?null:k.baseLatency,P),L=S?s(P.feedback,P.feedforward):null;super(k,!1,I,L),NO(I),this._nativeIIRFilterNode=I,d(this,1)}getFrequencyResponse(k,y,_){return this._nativeIIRFilterNode.getFrequencyResponse(k,y,_)}},n_=(t,r,s,u,p,d,b,k,y,_,S)=>{const P=_.length;let I=k;for(let L=0;L{const p=s instanceof Float64Array?s:new Float64Array(s),d=u instanceof Float64Array?u:new Float64Array(u),b=p.length,k=d.length,y=Math.min(b,k);if(p[0]!==1){for(let R=0;R(d,b)=>{const k=new WeakMap;let y=null;const _=async(S,P)=>{let I=null,L=r(S);const R=Or(L,P);if(P.createIIRFilter===void 0?I=t(P,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):R||(L=P.createIIRFilter(b,d)),k.set(P,I===null?L:I),I!==null){if(y===null){if(s===null)throw new Error("Missing the native OfflineAudioContext constructor.");const Z=new s(S.context.destination.channelCount,S.context.length,P.sampleRate);y=(async()=>{await u(S,Z,Z.destination);const F=await p(Z);return FO(F,P,d,b)})()}const D=await y;return I.buffer=D,I.start(0),I}return await u(S,P,L),L};return{render(S,P){const I=k.get(P);return I!==void 0?Promise.resolve(I):_(S,P)}}},DO=(t,r,s,u,p,d)=>b=>(k,y)=>{const _=t.get(k);if(_===void 0){if(!b&&d(k)){const S=u(k),{outputs:P}=s(k);for(const I of P)if(Kc(I)){const L=u(I[0]);r(S,L,I[1],I[2])}else{const L=p(I[0]);S.disconnect(L,I[1])}}t.set(k,y)}else t.set(k,_+y)},OO=t=>r=>t!==null&&r instanceof t,BO=t=>r=>t!==null&&typeof t.AudioNode=="function"&&r instanceof t.AudioNode,jO=t=>r=>t!==null&&typeof t.AudioParam=="function"&&r instanceof t.AudioParam,zO=(t,r)=>s=>t(s)||r(s),VO=t=>r=>t!==null&&r instanceof t,WO=t=>t!==null&&t.isSecureContext,UO=(t,r,s,u)=>class extends t{constructor(d,b){const k=s(d),y=r(k,b);if(u(k))throw TypeError();super(d,!0,y,null),this._nativeMediaElementAudioSourceNode=y}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},HO={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},GO=(t,r,s,u)=>class extends t{constructor(d,b){const k=s(d);if(u(k))throw new TypeError;const y={...HO,...b},_=r(k,y);super(d,!1,_,null),this._nativeMediaStreamAudioDestinationNode=_}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},QO=(t,r,s,u)=>class extends t{constructor(d,b){const k=s(d),y=r(k,b);if(u(k))throw new TypeError;super(d,!0,y,null),this._nativeMediaStreamAudioSourceNode=y}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},YO=(t,r,s)=>class extends t{constructor(p,d){const b=s(p),k=r(b,d);super(p,!0,k,null)}},KO=(t,r,s,u,p,d)=>class extends s{constructor(k,y){super(k),this._nativeContext=k,Qy.set(this,k),u(k)&&p.set(k,new Set),this._destination=new t(this,y),this._listener=r(this,k),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(k){const y=typeof k=="function"?d(this,k):null;this._nativeContext.onstatechange=y;const _=this._nativeContext.onstatechange;this._onstatechange=_!==null&&_===y?k:_}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},Xp=t=>{const r=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const s=t.decodeAudioData(r.buffer,()=>{});return s===void 0?!1:(s.catch(()=>{}),!0)}catch{}return!1},XO=(t,r)=>(s,u,p)=>{const d=new Set;return s.connect=(b=>(k,y=0,_=0)=>{const S=d.size===0;if(r(k))return b.call(s,k,y,_),t(d,[k,y,_],P=>P[0]===k&&P[1]===y&&P[2]===_,!0),S&&u(),k;b.call(s,k,y),t(d,[k,y],P=>P[0]===k&&P[1]===y,!0),S&&u()})(s.connect),s.disconnect=(b=>(k,y,_)=>{const S=d.size>0;if(k===void 0)b.apply(s),d.clear();else if(typeof k=="number"){b.call(s,k);for(const I of d)I[1]===k&&d.delete(I)}else{r(k)?b.call(s,k,y,_):b.call(s,k,y);for(const I of d)I[0]===k&&(y===void 0||I[1]===y)&&(_===void 0||I[2]===_)&&d.delete(I)}const P=d.size===0;S&&P&&p()})(s.disconnect),s},En=(t,r,s)=>{const u=r[s];u!==void 0&&u!==t[s]&&(t[s]=u)},rr=(t,r)=>{En(t,r,"channelCount"),En(t,r,"channelCountMode"),En(t,r,"channelInterpretation")},zv=t=>typeof t.getFloatTimeDomainData=="function",qO=t=>{t.getFloatTimeDomainData=r=>{const s=new Uint8Array(r.length);t.getByteTimeDomainData(s);const u=Math.max(s.length,t.fftSize);for(let p=0;p(s,u)=>{const p=s.createAnalyser();if(rr(p,u),!(u.maxDecibels>u.minDecibels))throw r();return En(p,u,"fftSize"),En(p,u,"maxDecibels"),En(p,u,"minDecibels"),En(p,u,"smoothingTimeConstant"),t(zv,()=>zv(p))||qO(p),p},JO=t=>t===null?null:t.hasOwnProperty("AudioBuffer")?t.AudioBuffer:null,Vn=(t,r,s)=>{const u=r[s];u!==void 0&&u!==t[s].value&&(t[s].value=u)},$O=t=>{t.start=(r=>{let s=!1;return(u=0,p=0,d)=>{if(s)throw Fr();r.call(t,u,p,d),s=!0}})(t.start)},Nh=t=>{t.start=(r=>(s=0,u=0,p)=>{if(typeof p=="number"&&p<0||u<0||s<0)throw new RangeError("The parameters can't be negative.");r.call(t,s,u,p)})(t.start)},Rh=t=>{t.stop=(r=>(s=0)=>{if(s<0)throw new RangeError("The parameter can't be negative.");r.call(t,s)})(t.stop)},eB=(t,r,s,u,p,d,b,k,y,_,S)=>(P,I)=>{const L=P.createBufferSource();return rr(L,I),Vn(L,I,"playbackRate"),En(L,I,"buffer"),En(L,I,"loop"),En(L,I,"loopEnd"),En(L,I,"loopStart"),r(s,()=>s(P))||$O(L),r(u,()=>u(P))||y(L),r(p,()=>p(P))||_(L,P),r(d,()=>d(P))||Nh(L),r(b,()=>b(P))||S(L,P),r(k,()=>k(P))||Rh(L),t(P,L),L},tB=t=>t===null?null:t.hasOwnProperty("AudioContext")?t.AudioContext:t.hasOwnProperty("webkitAudioContext")?t.webkitAudioContext:null,nB=(t,r)=>(s,u,p)=>{const d=s.destination;if(d.channelCount!==u)try{d.channelCount=u}catch{}p&&d.channelCountMode!=="explicit"&&(d.channelCountMode="explicit"),d.maxChannelCount===0&&Object.defineProperty(d,"maxChannelCount",{value:u});const b=t(s,{channelCount:u,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,gain:1});return r(b,"channelCount",k=>()=>k.call(b),k=>y=>{k.call(b,y);try{d.channelCount=y}catch(_){if(y>d.maxChannelCount)throw _}}),r(b,"channelCountMode",k=>()=>k.call(b),k=>y=>{k.call(b,y),d.channelCountMode=y}),r(b,"channelInterpretation",k=>()=>k.call(b),k=>y=>{k.call(b,y),d.channelInterpretation=y}),Object.defineProperty(b,"maxChannelCount",{get:()=>d.maxChannelCount}),b.connect(d),b},rB=t=>t===null?null:t.hasOwnProperty("AudioWorkletNode")?t.AudioWorkletNode:null,oB=(t,r)=>t===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(t*r))))),r_=(t,r)=>{const s=t.createBiquadFilter();return rr(s,r),Vn(s,r,"Q"),Vn(s,r,"detune"),Vn(s,r,"frequency"),Vn(s,r,"gain"),En(s,r,"type"),s},iB=(t,r)=>(s,u)=>{const p=s.createChannelMerger(u.numberOfInputs);return t!==null&&t.name==="webkitAudioContext"&&r(s,p),rr(p,u),p},aB=t=>{const r=t.numberOfOutputs;Object.defineProperty(t,"channelCount",{get:()=>r,set:s=>{if(s!==r)throw Fr()}}),Object.defineProperty(t,"channelCountMode",{get:()=>"explicit",set:s=>{if(s!=="explicit")throw Fr()}}),Object.defineProperty(t,"channelInterpretation",{get:()=>"discrete",set:s=>{if(s!=="discrete")throw Fr()}})},Th=(t,r)=>{const s=t.createChannelSplitter(r.numberOfOutputs);return rr(s,r),aB(s),s},sB=(t,r,s,u,p)=>(d,b)=>{if(d.createConstantSource===void 0)return s(d,b);const k=d.createConstantSource();return rr(k,b),Vn(k,b,"offset"),r(u,()=>u(d))||Nh(k),r(p,()=>p(d))||Rh(k),t(d,k),k},pl=(t,r)=>(t.connect=r.connect.bind(r),t.disconnect=r.disconnect.bind(r),t),lB=(t,r,s,u)=>(p,{offset:d,...b})=>{const k=p.createBuffer(1,2,44100),y=r(p,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),_=s(p,{...b,gain:d}),S=k.getChannelData(0);S[0]=1,S[1]=1,y.buffer=k,y.loop=!0;const P={get bufferSize(){},get channelCount(){return _.channelCount},set channelCount(R){_.channelCount=R},get channelCountMode(){return _.channelCountMode},set channelCountMode(R){_.channelCountMode=R},get channelInterpretation(){return _.channelInterpretation},set channelInterpretation(R){_.channelInterpretation=R},get context(){return _.context},get inputs(){return[]},get numberOfInputs(){return y.numberOfInputs},get numberOfOutputs(){return _.numberOfOutputs},get offset(){return _.gain},get onended(){return y.onended},set onended(R){y.onended=R},addEventListener(...R){return y.addEventListener(R[0],R[1],R[2])},dispatchEvent(...R){return y.dispatchEvent(R[0])},removeEventListener(...R){return y.removeEventListener(R[0],R[1],R[2])},start(R=0){y.start.call(y,R)},stop(R=0){y.stop.call(y,R)}},I=()=>y.connect(_),L=()=>y.disconnect(_);return t(p,y),u(pl(P,_),I,L)},cB=(t,r)=>(s,u)=>{const p=s.createConvolver();if(rr(p,u),u.disableNormalization===p.normalize&&(p.normalize=!u.disableNormalization),En(p,u,"buffer"),u.channelCount>2||(r(p,"channelCount",d=>()=>d.call(p),d=>b=>{if(b>2)throw t();return d.call(p,b)}),u.channelCountMode==="max"))throw t();return r(p,"channelCountMode",d=>()=>d.call(p),d=>b=>{if(b==="max")throw t();return d.call(p,b)}),p},o_=(t,r)=>{const s=t.createDelay(r.maxDelayTime);return rr(s,r),Vn(s,r,"delayTime"),s},uB=t=>(r,s)=>{const u=r.createDynamicsCompressor();if(rr(u,s),s.channelCount>2||s.channelCountMode==="max")throw t();return Vn(u,s,"attack"),Vn(u,s,"knee"),Vn(u,s,"ratio"),Vn(u,s,"release"),Vn(u,s,"threshold"),u},Vo=(t,r)=>{const s=t.createGain();return rr(s,r),Vn(s,r,"gain"),s},fB=t=>(r,s,u)=>{if(r.createIIRFilter===void 0)return t(r,s,u);const p=r.createIIRFilter(u.feedforward,u.feedback);return rr(p,u),p};function dB(t,r){const s=r[0]*r[0]+r[1]*r[1];return[(t[0]*r[0]+t[1]*r[1])/s,(t[1]*r[0]-t[0]*r[1])/s]}function pB(t,r){return[t[0]*r[0]-t[1]*r[1],t[0]*r[1]+t[1]*r[0]]}function Vv(t,r){let s=[0,0];for(let u=t.length-1;u>=0;u-=1)s=pB(s,r),s[0]+=t[u];return s}const hB=(t,r,s,u)=>(p,d,{channelCount:b,channelCountMode:k,channelInterpretation:y,feedback:_,feedforward:S})=>{const P=oB(d,p.sampleRate),I=_ instanceof Float64Array?_:new Float64Array(_),L=S instanceof Float64Array?S:new Float64Array(S),R=I.length,D=L.length,Z=Math.min(R,D);if(R===0||R>20)throw u();if(I[0]===0)throw r();if(D===0||D>20)throw u();if(L[0]===0)throw r();if(I[0]!==1){for(let X=0;X{const me=X.inputBuffer,le=X.outputBuffer,he=me.numberOfChannels;for(let de=0;det.createMediaElementSource(r.mediaElement),gB=(t,r)=>{const s=t.createMediaStreamDestination();return rr(s,r),s.numberOfOutputs===1&&Object.defineProperty(s,"numberOfOutputs",{get:()=>0}),s},bB=(t,{mediaStream:r})=>{const s=r.getAudioTracks();s.sort((d,b)=>d.idb.id?1:0);const u=s.slice(0,1),p=t.createMediaStreamSource(new MediaStream(u));return Object.defineProperty(p,"mediaStream",{value:r}),p},vB=(t,r)=>(s,{mediaStreamTrack:u})=>{if(typeof s.createMediaStreamTrackSource=="function")return s.createMediaStreamTrackSource(u);const p=new MediaStream([u]),d=s.createMediaStreamSource(p);if(u.kind!=="audio")throw t();if(r(s))throw new TypeError;return d},kB=t=>t===null?null:t.hasOwnProperty("OfflineAudioContext")?t.OfflineAudioContext:t.hasOwnProperty("webkitOfflineAudioContext")?t.webkitOfflineAudioContext:null,yB=(t,r,s,u,p,d)=>(b,k)=>{const y=b.createOscillator();return rr(y,k),Vn(y,k,"detune"),Vn(y,k,"frequency"),k.periodicWave!==void 0?y.setPeriodicWave(k.periodicWave):En(y,k,"type"),r(s,()=>s(b))||Nh(y),r(u,()=>u(b))||d(y,b),r(p,()=>p(b))||Rh(y),t(b,y),y},_B=t=>(r,s)=>{const u=r.createPanner();return u.orientationX===void 0?t(r,s):(rr(u,s),Vn(u,s,"orientationX"),Vn(u,s,"orientationY"),Vn(u,s,"orientationZ"),Vn(u,s,"positionX"),Vn(u,s,"positionY"),Vn(u,s,"positionZ"),En(u,s,"coneInnerAngle"),En(u,s,"coneOuterAngle"),En(u,s,"coneOuterGain"),En(u,s,"distanceModel"),En(u,s,"maxDistance"),En(u,s,"panningModel"),En(u,s,"refDistance"),En(u,s,"rolloffFactor"),u)},wB=(t,r,s,u,p,d,b,k,y,_)=>(S,{coneInnerAngle:P,coneOuterAngle:I,coneOuterGain:L,distanceModel:R,maxDistance:D,orientationX:Z,orientationY:F,orientationZ:O,panningModel:B,positionX:Q,positionY:U,positionZ:ee,refDistance:q,rolloffFactor:X,...me})=>{const le=S.createPanner();if(me.channelCount>2||me.channelCountMode==="max")throw b();rr(le,me);const he={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},de=s(S,{...he,channelInterpretation:"speakers",numberOfInputs:6}),Ce=u(S,{...me,gain:1}),_e=u(S,{...he,gain:1}),ge=u(S,{...he,gain:0}),ye=u(S,{...he,gain:0}),ve=u(S,{...he,gain:0}),ce=u(S,{...he,gain:0}),we=u(S,{...he,gain:0}),Ne=p(S,256,6,1),Ae=d(S,{...he,curve:new Float32Array([1,1]),oversample:"none"});let Pe=[Z,F,O],tt=[Q,U,ee];const Ue=new Float32Array(1);Ne.onaudioprocess=({inputBuffer:nt})=>{const Gt=[y(nt,Ue,0),y(nt,Ue,1),y(nt,Ue,2)];Gt.some((Rt,Vt)=>Rt!==Pe[Vt])&&(le.setOrientation(...Gt),Pe=Gt);const hn=[y(nt,Ue,3),y(nt,Ue,4),y(nt,Ue,5)];hn.some((Rt,Vt)=>Rt!==tt[Vt])&&(le.setPosition(...hn),tt=hn)},Object.defineProperty(ge.gain,"defaultValue",{get:()=>0}),Object.defineProperty(ye.gain,"defaultValue",{get:()=>0}),Object.defineProperty(ve.gain,"defaultValue",{get:()=>0}),Object.defineProperty(ce.gain,"defaultValue",{get:()=>0}),Object.defineProperty(we.gain,"defaultValue",{get:()=>0});const He={get bufferSize(){},get channelCount(){return le.channelCount},set channelCount(nt){if(nt>2)throw b();Ce.channelCount=nt,le.channelCount=nt},get channelCountMode(){return le.channelCountMode},set channelCountMode(nt){if(nt==="max")throw b();Ce.channelCountMode=nt,le.channelCountMode=nt},get channelInterpretation(){return le.channelInterpretation},set channelInterpretation(nt){Ce.channelInterpretation=nt,le.channelInterpretation=nt},get coneInnerAngle(){return le.coneInnerAngle},set coneInnerAngle(nt){le.coneInnerAngle=nt},get coneOuterAngle(){return le.coneOuterAngle},set coneOuterAngle(nt){le.coneOuterAngle=nt},get coneOuterGain(){return le.coneOuterGain},set coneOuterGain(nt){if(nt<0||nt>1)throw r();le.coneOuterGain=nt},get context(){return le.context},get distanceModel(){return le.distanceModel},set distanceModel(nt){le.distanceModel=nt},get inputs(){return[Ce]},get maxDistance(){return le.maxDistance},set maxDistance(nt){if(nt<0)throw new RangeError;le.maxDistance=nt},get numberOfInputs(){return le.numberOfInputs},get numberOfOutputs(){return le.numberOfOutputs},get orientationX(){return _e.gain},get orientationY(){return ge.gain},get orientationZ(){return ye.gain},get panningModel(){return le.panningModel},set panningModel(nt){le.panningModel=nt},get positionX(){return ve.gain},get positionY(){return ce.gain},get positionZ(){return we.gain},get refDistance(){return le.refDistance},set refDistance(nt){if(nt<0)throw new RangeError;le.refDistance=nt},get rolloffFactor(){return le.rolloffFactor},set rolloffFactor(nt){if(nt<0)throw new RangeError;le.rolloffFactor=nt},addEventListener(...nt){return Ce.addEventListener(nt[0],nt[1],nt[2])},dispatchEvent(...nt){return Ce.dispatchEvent(nt[0])},removeEventListener(...nt){return Ce.removeEventListener(nt[0],nt[1],nt[2])}};P!==He.coneInnerAngle&&(He.coneInnerAngle=P),I!==He.coneOuterAngle&&(He.coneOuterAngle=I),L!==He.coneOuterGain&&(He.coneOuterGain=L),R!==He.distanceModel&&(He.distanceModel=R),D!==He.maxDistance&&(He.maxDistance=D),Z!==He.orientationX.value&&(He.orientationX.value=Z),F!==He.orientationY.value&&(He.orientationY.value=F),O!==He.orientationZ.value&&(He.orientationZ.value=O),B!==He.panningModel&&(He.panningModel=B),Q!==He.positionX.value&&(He.positionX.value=Q),U!==He.positionY.value&&(He.positionY.value=U),ee!==He.positionZ.value&&(He.positionZ.value=ee),q!==He.refDistance&&(He.refDistance=q),X!==He.rolloffFactor&&(He.rolloffFactor=X),(Pe[0]!==1||Pe[1]!==0||Pe[2]!==0)&&le.setOrientation(...Pe),(tt[0]!==0||tt[1]!==0||tt[2]!==0)&&le.setPosition(...tt);const mt=()=>{Ce.connect(le),t(Ce,Ae,0,0),Ae.connect(_e).connect(de,0,0),Ae.connect(ge).connect(de,0,1),Ae.connect(ye).connect(de,0,2),Ae.connect(ve).connect(de,0,3),Ae.connect(ce).connect(de,0,4),Ae.connect(we).connect(de,0,5),de.connect(Ne).connect(S.destination)},Zt=()=>{Ce.disconnect(le),k(Ce,Ae,0,0),Ae.disconnect(_e),_e.disconnect(de),Ae.disconnect(ge),ge.disconnect(de),Ae.disconnect(ye),ye.disconnect(de),Ae.disconnect(ve),ve.disconnect(de),Ae.disconnect(ce),ce.disconnect(de),Ae.disconnect(we),we.disconnect(de),de.disconnect(Ne),Ne.disconnect(S.destination)};return _(pl(He,le),mt,Zt)},AB=t=>(r,{disableNormalization:s,imag:u,real:p})=>{const d=u instanceof Float32Array?u:new Float32Array(u),b=p instanceof Float32Array?p:new Float32Array(p),k=r.createPeriodicWave(b,d,{disableNormalization:s});if(Array.from(u).length<2)throw t();return k},ld=(t,r,s,u)=>t.createScriptProcessor(r,s,u),CB=(t,r)=>(s,u)=>{const p=u.channelCountMode;if(p==="clamped-max")throw r();if(s.createStereoPanner===void 0)return t(s,u);const d=s.createStereoPanner();return rr(d,u),Vn(d,u,"pan"),Object.defineProperty(d,"channelCountMode",{get:()=>p,set:b=>{if(b!==p)throw r()}}),d},xB=(t,r,s,u,p,d)=>{const k=new Float32Array([1,1]),y=Math.PI/2,_={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},S={..._,oversample:"none"},P=(R,D,Z,F)=>{const O=new Float32Array(16385),B=new Float32Array(16385);for(let me=0;me<16385;me+=1){const le=me/16384*y;O[me]=Math.cos(le),B[me]=Math.sin(le)}const Q=s(R,{..._,gain:0}),U=u(R,{...S,curve:O}),ee=u(R,{...S,curve:k}),q=s(R,{..._,gain:0}),X=u(R,{...S,curve:B});return{connectGraph(){D.connect(Q),D.connect(ee.inputs===void 0?ee:ee.inputs[0]),D.connect(q),ee.connect(Z),Z.connect(U.inputs===void 0?U:U.inputs[0]),Z.connect(X.inputs===void 0?X:X.inputs[0]),U.connect(Q.gain),X.connect(q.gain),Q.connect(F,0,0),q.connect(F,0,1)},disconnectGraph(){D.disconnect(Q),D.disconnect(ee.inputs===void 0?ee:ee.inputs[0]),D.disconnect(q),ee.disconnect(Z),Z.disconnect(U.inputs===void 0?U:U.inputs[0]),Z.disconnect(X.inputs===void 0?X:X.inputs[0]),U.disconnect(Q.gain),X.disconnect(q.gain),Q.disconnect(F,0,0),q.disconnect(F,0,1)}}},I=(R,D,Z,F)=>{const O=new Float32Array(16385),B=new Float32Array(16385),Q=new Float32Array(16385),U=new Float32Array(16385),ee=Math.floor(16385/2);for(let ve=0;ve<16385;ve+=1)if(ve>ee){const ce=(ve-ee)/(16384-ee)*y;O[ve]=Math.cos(ce),B[ve]=Math.sin(ce),Q[ve]=0,U[ve]=1}else{const ce=ve/(16384-ee)*y;O[ve]=1,B[ve]=0,Q[ve]=Math.cos(ce),U[ve]=Math.sin(ce)}const q=r(R,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),X=s(R,{..._,gain:0}),me=u(R,{...S,curve:O}),le=s(R,{..._,gain:0}),he=u(R,{...S,curve:B}),de=u(R,{...S,curve:k}),Ce=s(R,{..._,gain:0}),_e=u(R,{...S,curve:Q}),ge=s(R,{..._,gain:0}),ye=u(R,{...S,curve:U});return{connectGraph(){D.connect(q),D.connect(de.inputs===void 0?de:de.inputs[0]),q.connect(X,0),q.connect(le,0),q.connect(Ce,1),q.connect(ge,1),de.connect(Z),Z.connect(me.inputs===void 0?me:me.inputs[0]),Z.connect(he.inputs===void 0?he:he.inputs[0]),Z.connect(_e.inputs===void 0?_e:_e.inputs[0]),Z.connect(ye.inputs===void 0?ye:ye.inputs[0]),me.connect(X.gain),he.connect(le.gain),_e.connect(Ce.gain),ye.connect(ge.gain),X.connect(F,0,0),Ce.connect(F,0,0),le.connect(F,0,1),ge.connect(F,0,1)},disconnectGraph(){D.disconnect(q),D.disconnect(de.inputs===void 0?de:de.inputs[0]),q.disconnect(X,0),q.disconnect(le,0),q.disconnect(Ce,1),q.disconnect(ge,1),de.disconnect(Z),Z.disconnect(me.inputs===void 0?me:me.inputs[0]),Z.disconnect(he.inputs===void 0?he:he.inputs[0]),Z.disconnect(_e.inputs===void 0?_e:_e.inputs[0]),Z.disconnect(ye.inputs===void 0?ye:ye.inputs[0]),me.disconnect(X.gain),he.disconnect(le.gain),_e.disconnect(Ce.gain),ye.disconnect(ge.gain),X.disconnect(F,0,0),Ce.disconnect(F,0,0),le.disconnect(F,0,1),ge.disconnect(F,0,1)}}},L=(R,D,Z,F,O)=>{if(D===1)return P(R,Z,F,O);if(D===2)return I(R,Z,F,O);throw p()};return(R,{channelCount:D,channelCountMode:Z,pan:F,...O})=>{if(Z==="max")throw p();const B=t(R,{...O,channelCount:1,channelCountMode:Z,numberOfInputs:2}),Q=s(R,{...O,channelCount:D,channelCountMode:Z,gain:1}),U=s(R,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:F});let{connectGraph:ee,disconnectGraph:q}=L(R,D,Q,U,B);Object.defineProperty(U.gain,"defaultValue",{get:()=>0}),Object.defineProperty(U.gain,"maxValue",{get:()=>1}),Object.defineProperty(U.gain,"minValue",{get:()=>-1});const X={get bufferSize(){},get channelCount(){return Q.channelCount},set channelCount(de){Q.channelCount!==de&&(me&&q(),{connectGraph:ee,disconnectGraph:q}=L(R,de,Q,U,B),me&&ee()),Q.channelCount=de},get channelCountMode(){return Q.channelCountMode},set channelCountMode(de){if(de==="clamped-max"||de==="max")throw p();Q.channelCountMode=de},get channelInterpretation(){return Q.channelInterpretation},set channelInterpretation(de){Q.channelInterpretation=de},get context(){return Q.context},get inputs(){return[Q]},get numberOfInputs(){return Q.numberOfInputs},get numberOfOutputs(){return Q.numberOfOutputs},get pan(){return U.gain},addEventListener(...de){return Q.addEventListener(de[0],de[1],de[2])},dispatchEvent(...de){return Q.dispatchEvent(de[0])},removeEventListener(...de){return Q.removeEventListener(de[0],de[1],de[2])}};let me=!1;const le=()=>{ee(),me=!0},he=()=>{q(),me=!1};return d(pl(X,B),le,he)}},SB=(t,r,s,u,p,d,b)=>(k,y)=>{const _=k.createWaveShaper();if(d!==null&&d.name==="webkitAudioContext"&&k.createGain().gain.automationRate===void 0)return s(k,y);rr(_,y);const S=y.curve===null||y.curve instanceof Float32Array?y.curve:new Float32Array(y.curve);if(S!==null&&S.length<2)throw r();En(_,{curve:S},"curve"),En(_,y,"oversample");let P=null,I=!1;return b(_,"curve",D=>()=>D.call(_),D=>Z=>(D.call(_,Z),I&&(u(Z)&&P===null?P=t(k,_):!u(Z)&&P!==null&&(P(),P=null)),Z)),p(_,()=>{I=!0,u(_.curve)&&(P=t(k,_))},()=>{I=!1,P!==null&&(P(),P=null)})},EB=(t,r,s,u,p)=>(d,{curve:b,oversample:k,...y})=>{const _=d.createWaveShaper(),S=d.createWaveShaper();rr(_,y),rr(S,y);const P=s(d,{...y,gain:1}),I=s(d,{...y,gain:-1}),L=s(d,{...y,gain:1}),R=s(d,{...y,gain:-1});let D=null,Z=!1,F=null;const O={get bufferSize(){},get channelCount(){return _.channelCount},set channelCount(U){P.channelCount=U,I.channelCount=U,_.channelCount=U,L.channelCount=U,S.channelCount=U,R.channelCount=U},get channelCountMode(){return _.channelCountMode},set channelCountMode(U){P.channelCountMode=U,I.channelCountMode=U,_.channelCountMode=U,L.channelCountMode=U,S.channelCountMode=U,R.channelCountMode=U},get channelInterpretation(){return _.channelInterpretation},set channelInterpretation(U){P.channelInterpretation=U,I.channelInterpretation=U,_.channelInterpretation=U,L.channelInterpretation=U,S.channelInterpretation=U,R.channelInterpretation=U},get context(){return _.context},get curve(){return F},set curve(U){if(U!==null&&U.length<2)throw r();if(U===null)_.curve=U,S.curve=U;else{const ee=U.length,q=new Float32Array(ee+2-ee%2),X=new Float32Array(ee+2-ee%2);q[0]=U[0],X[0]=-U[ee-1];const me=Math.ceil((ee+1)/2),le=(ee+1)/2-1;for(let he=1;he{P.connect(_).connect(L),P.connect(I).connect(S).connect(R).connect(L),Z=!0,u(F)&&(D=t(d,P))},Q=()=>{P.disconnect(_),_.disconnect(L),P.disconnect(I),I.disconnect(S),S.disconnect(R),R.disconnect(L),Z=!1,D!==null&&(D(),D=null)};return p(pl(O,L),B,Q)},Mo=()=>new DOMException("","NotSupportedError"),PB={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},MB=(t,r,s,u,p,d,b)=>class extends t{constructor(y,_){const S=p(y),P={...PB,..._},I=s(S,P),L=d(S),R=L?u():null,D=y.sampleRate/2;super(y,!1,I,R),this._detune=r(this,L,I.detune,153600,-153600),this._frequency=r(this,L,I.frequency,D,-D),this._nativeOscillatorNode=I,this._onended=null,this._oscillatorNodeRenderer=R,this._oscillatorNodeRenderer!==null&&P.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=P.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(y){const _=typeof y=="function"?b(this,y):null;this._nativeOscillatorNode.onended=_;const S=this._nativeOscillatorNode.onended;this._onended=S!==null&&S===_?y:S}get type(){return this._nativeOscillatorNode.type}set type(y){this._nativeOscillatorNode.type=y,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(y){this._nativeOscillatorNode.setPeriodicWave(y),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=y)}start(y=0){if(this._nativeOscillatorNode.start(y),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=y),this.context.state!=="closed"){rl(this);const _=()=>{this._nativeOscillatorNode.removeEventListener("ended",_),Ai(this)&&Qc(this)};this._nativeOscillatorNode.addEventListener("ended",_)}}stop(y=0){this._nativeOscillatorNode.stop(y),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=y)}},IB=(t,r,s,u,p)=>()=>{const d=new WeakMap;let b=null,k=null,y=null;const _=async(S,P)=>{let I=s(S);const L=Or(I,P);if(!L){const R={channelCount:I.channelCount,channelCountMode:I.channelCountMode,channelInterpretation:I.channelInterpretation,detune:I.detune.value,frequency:I.frequency.value,periodicWave:b===null?void 0:b,type:I.type};I=r(P,R),k!==null&&I.start(k),y!==null&&I.stop(y)}return d.set(P,I),L?(await t(P,S.detune,I.detune),await t(P,S.frequency,I.frequency)):(await u(P,S.detune,I.detune),await u(P,S.frequency,I.frequency)),await p(S,P,I),I};return{set periodicWave(S){b=S},set start(S){k=S},set stop(S){y=S},render(S,P){const I=d.get(P);return I!==void 0?Promise.resolve(I):_(S,P)}}},NB={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},RB=(t,r,s,u,p,d,b)=>class extends t{constructor(y,_){const S=p(y),P={...NB,..._},I=s(S,P),L=d(S),R=L?u():null;super(y,!1,I,R),this._nativePannerNode=I,this._orientationX=r(this,L,I.orientationX,Ur,$r),this._orientationY=r(this,L,I.orientationY,Ur,$r),this._orientationZ=r(this,L,I.orientationZ,Ur,$r),this._positionX=r(this,L,I.positionX,Ur,$r),this._positionY=r(this,L,I.positionY,Ur,$r),this._positionZ=r(this,L,I.positionZ,Ur,$r),b(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(y){this._nativePannerNode.coneInnerAngle=y}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(y){this._nativePannerNode.coneOuterAngle=y}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(y){this._nativePannerNode.coneOuterGain=y}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(y){this._nativePannerNode.distanceModel=y}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(y){this._nativePannerNode.maxDistance=y}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(y){this._nativePannerNode.panningModel=y}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(y){this._nativePannerNode.refDistance=y}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(y){this._nativePannerNode.rolloffFactor=y}},TB=(t,r,s,u,p,d,b,k,y,_)=>()=>{const S=new WeakMap;let P=null;const I=async(L,R)=>{let D=null,Z=d(L);const F={channelCount:Z.channelCount,channelCountMode:Z.channelCountMode,channelInterpretation:Z.channelInterpretation},O={...F,coneInnerAngle:Z.coneInnerAngle,coneOuterAngle:Z.coneOuterAngle,coneOuterGain:Z.coneOuterGain,distanceModel:Z.distanceModel,maxDistance:Z.maxDistance,panningModel:Z.panningModel,refDistance:Z.refDistance,rolloffFactor:Z.rolloffFactor},B=Or(Z,R);if("bufferSize"in Z)D=u(R,{...F,gain:1});else if(!B){const Q={...O,orientationX:Z.orientationX.value,orientationY:Z.orientationY.value,orientationZ:Z.orientationZ.value,positionX:Z.positionX.value,positionY:Z.positionY.value,positionZ:Z.positionZ.value};Z=p(R,Q)}if(S.set(R,D===null?Z:D),D!==null){if(P===null){if(b===null)throw new Error("Missing the native OfflineAudioContext constructor.");const he=new b(6,L.context.length,R.sampleRate),de=r(he,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});de.connect(he.destination),P=(async()=>{const Ce=await Promise.all([L.orientationX,L.orientationY,L.orientationZ,L.positionX,L.positionY,L.positionZ].map(async(_e,ge)=>{const ye=s(he,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:ge===0?1:0});return await k(he,_e,ye.offset),ye}));for(let _e=0;_e<6;_e+=1)Ce[_e].connect(de,0,_e),Ce[_e].start(0);return _(he)})()}const Q=await P,U=u(R,{...F,gain:1});await y(L,R,U);const ee=[];for(let he=0;he_e!==q[ge])||Ce.some((_e,ge)=>_e!==X[ge])){q=de,X=Ce;const _e=he/R.sampleRate;me.gain.setValueAtTime(0,_e),me=u(R,{...F,gain:0}),le=p(R,{...O,orientationX:q[0],orientationY:q[1],orientationZ:q[2],positionX:X[0],positionY:X[1],positionZ:X[2]}),me.gain.setValueAtTime(1,_e),U.connect(me).connect(le.inputs[0]),le.connect(D)}}return D}return B?(await t(R,L.orientationX,Z.orientationX),await t(R,L.orientationY,Z.orientationY),await t(R,L.orientationZ,Z.orientationZ),await t(R,L.positionX,Z.positionX),await t(R,L.positionY,Z.positionY),await t(R,L.positionZ,Z.positionZ)):(await k(R,L.orientationX,Z.orientationX),await k(R,L.orientationY,Z.orientationY),await k(R,L.orientationZ,Z.orientationZ),await k(R,L.positionX,Z.positionX),await k(R,L.positionY,Z.positionY),await k(R,L.positionZ,Z.positionZ)),dl(Z)?await y(L,R,Z.inputs[0]):await y(L,R,Z),Z};return{render(L,R){const D=S.get(R);return D!==void 0?Promise.resolve(D):I(L,R)}}},FB={disableNormalization:!1},LB=(t,r,s,u)=>class i_{constructor(d,b){const k=r(d),y=u({...FB,...b}),_=t(k,y);return s.add(_),_}static[Symbol.hasInstance](d){return d!==null&&typeof d=="object"&&Object.getPrototypeOf(d)===i_.prototype||s.has(d)}},DB=(t,r)=>(s,u,p)=>(t(u).replay(p),r(u,s,p)),OB=(t,r,s)=>async(u,p,d)=>{const b=t(u);await Promise.all(b.activeInputs.map((k,y)=>Array.from(k).map(async([_,S])=>{const I=await r(_).render(_,p),L=u.context.destination;!s(_)&&(u!==L||!s(u))&&I.connect(d,S,y)})).reduce((k,y)=>[...k,...y],[]))},BB=(t,r,s)=>async(u,p,d)=>{const b=r(u);await Promise.all(Array.from(b.activeInputs).map(async([k,y])=>{const S=await t(k).render(k,p);s(k)||S.connect(d,y)}))},jB=(t,r,s,u)=>p=>t(Xp,()=>Xp(p))?Promise.resolve(t(u,u)).then(d=>{if(!d){const b=s(p,512,0,1);p.oncomplete=()=>{b.onaudioprocess=null,b.disconnect()},b.onaudioprocess=()=>p.currentTime,b.connect(p.destination)}return p.startRendering()}):new Promise(d=>{const b=r(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});p.oncomplete=k=>{b.disconnect(),d(k.renderedBuffer)},b.connect(p.destination),p.startRendering()}),zB=t=>(r,s)=>t.set(r,s),VB={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},WB=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=p(k),S={...VB,...y},P=s(_,S),I=d(_),L=I?u():null;super(k,!1,P,L),this._pan=r(this,I,P.pan)}get pan(){return this._pan}},UB=(t,r,s,u,p)=>()=>{const d=new WeakMap,b=async(k,y)=>{let _=s(k);const S=Or(_,y);if(!S){const P={channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,pan:_.pan.value};_=r(y,P)}return d.set(y,_),S?await t(y,k.pan,_.pan):await u(y,k.pan,_.pan),dl(_)?await p(k,y,_.inputs[0]):await p(k,y,_),_};return{render(k,y){const _=d.get(y);return _!==void 0?Promise.resolve(_):b(k,y)}}},HB=t=>()=>{if(t===null)return!1;try{new t({length:1,sampleRate:44100})}catch{return!1}return!0},GB=(t,r)=>async()=>{if(t===null)return!0;if(r===null)return!1;const s=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),u=new r(1,128,44100),p=URL.createObjectURL(s);let d=!1,b=!1;try{await u.audioWorklet.addModule(p);const k=new t(u,"a",{numberOfOutputs:0}),y=u.createOscillator();k.port.onmessage=()=>d=!0,k.onprocessorerror=()=>b=!0,y.connect(k),y.start(0),await u.startRendering(),await new Promise(_=>setTimeout(_))}catch{}finally{URL.revokeObjectURL(p)}return d&&!b},QB=(t,r)=>()=>{if(r===null)return Promise.resolve(!1);const s=new r(1,1,44100),u=t(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(p=>{s.oncomplete=()=>{u.disconnect(),p(s.currentTime!==0)},s.startRendering()})},YB=()=>new DOMException("","UnknownError"),KB={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},XB=(t,r,s,u,p,d,b)=>class extends t{constructor(y,_){const S=p(y),P={...KB,..._},I=s(S,P),R=d(S)?u():null;super(y,!0,I,R),this._isCurveNullified=!1,this._nativeWaveShaperNode=I,b(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(y){if(y===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(y.length<2)throw r();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=y}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(y){this._nativeWaveShaperNode.oversample=y}},qB=(t,r,s)=>()=>{const u=new WeakMap,p=async(d,b)=>{let k=r(d);if(!Or(k,b)){const _={channelCount:k.channelCount,channelCountMode:k.channelCountMode,channelInterpretation:k.channelInterpretation,curve:k.curve,oversample:k.oversample};k=t(b,_)}return u.set(b,k),dl(k)?await s(d,b,k.inputs[0]):await s(d,b,k),k};return{render(d,b){const k=u.get(b);return k!==void 0?Promise.resolve(k):p(d,b)}}},ZB=()=>typeof window>"u"?null:window,JB=(t,r)=>s=>{s.copyFromChannel=(u,p,d=0)=>{const b=t(d),k=t(p);if(k>=s.numberOfChannels)throw r();const y=s.length,_=s.getChannelData(k),S=u.length;for(let P=b<0?-b:0;P+b{const b=t(d),k=t(p);if(k>=s.numberOfChannels)throw r();const y=s.length,_=s.getChannelData(k),S=u.length;for(let P=b<0?-b:0;P+br=>{r.copyFromChannel=(s=>(u,p,d=0)=>{const b=t(d),k=t(p);if(b(u,p,d=0)=>{const b=t(d),k=t(p);if(b(r,s)=>{const u=s.createBuffer(1,1,44100);r.buffer===null&&(r.buffer=u),t(r,"buffer",p=>()=>{const d=p.call(r);return d===u?null:d},p=>d=>p.call(r,d===null?u:d))},tj=(t,r)=>(s,u)=>{u.channelCount=1,u.channelCountMode="explicit",Object.defineProperty(u,"channelCount",{get:()=>1,set:()=>{throw t()}}),Object.defineProperty(u,"channelCountMode",{get:()=>"explicit",set:()=>{throw t()}});const p=s.createBufferSource();r(u,()=>{const k=u.numberOfInputs;for(let y=0;yp.disconnect(u))},a_=(t,r,s)=>t.copyFromChannel===void 0?t.getChannelData(s)[0]:(t.copyFromChannel(r,s),r[0]),s_=t=>{if(t===null)return!1;const r=t.length;return r%2!==0?t[Math.floor(r/2)]!==0:t[r/2-1]+t[r/2]!==0},Xc=(t,r,s,u)=>{let p=t;for(;!p.hasOwnProperty(r);)p=Object.getPrototypeOf(p);const{get:d,set:b}=Object.getOwnPropertyDescriptor(p,r);Object.defineProperty(t,r,{get:s(d),set:u(b)})},nj=t=>({...t,channelCount:t.numberOfOutputs}),rj=t=>{const{imag:r,real:s}=t;return r===void 0?s===void 0?{...t,imag:[0,0],real:[0,0]}:{...t,imag:Array.from(s,()=>0),real:s}:s===void 0?{...t,imag:r,real:Array.from(r,()=>0)}:{...t,imag:r,real:s}},l_=(t,r,s)=>{try{t.setValueAtTime(r,s)}catch(u){if(u.code!==9)throw u;l_(t,r,s+1e-7)}},oj=t=>{const r=t.createBufferSource();r.start();try{r.start()}catch{return!0}return!1},ij=t=>{const r=t.createBufferSource(),s=t.createBuffer(1,1,44100);r.buffer=s;try{r.start(0,1)}catch{return!1}return!0},aj=t=>{const r=t.createBufferSource();r.start();try{r.stop()}catch{return!1}return!0},Fh=t=>{const r=t.createOscillator();try{r.start(-1)}catch(s){return s instanceof RangeError}return!1},c_=t=>{const r=t.createBuffer(1,1,44100),s=t.createBufferSource();s.buffer=r,s.start(),s.stop();try{return s.stop(),!0}catch{return!1}},Lh=t=>{const r=t.createOscillator();try{r.stop(-1)}catch(s){return s instanceof RangeError}return!1},sj=t=>{t.start=(r=>(s=0,u=0,p)=>{const d=t.buffer,b=d===null?u:Math.min(d.duration,u);d!==null&&b>d.duration-.5/t.context.sampleRate?r.call(t,s,0,0):r.call(t,s,b,p)})(t.start)},u_=(t,r)=>{const s=r.createGain();t.connect(s);const u=(p=>()=>{p.call(t,s),t.removeEventListener("ended",u)})(t.disconnect);t.addEventListener("ended",u),pl(t,s),t.stop=(p=>{let d=!1;return(b=0)=>{if(d)try{p.call(t,b)}catch{s.gain.setValueAtTime(0,b)}else p.call(t,b),d=!0}})(t.stop)},qc=(t,r)=>s=>{const u={value:t};return Object.defineProperties(s,{currentTarget:u,target:u}),typeof r=="function"?r.call(t,s):r.handleEvent.call(t,s)},lj=tD(Ya),cj=sD(Ya),uj=dO(ad),f_=new WeakMap,fj=EO(f_),Ni=HD(new Map,new WeakMap),ai=ZB(),d_=ZO(Ni,Qa),p_=SO(ro),xr=OB(ro,p_,Wa),dj=fD(d_,Tn,xr),Cn=MO(Qy),Ka=kB(ai),kn=VO(Ka),h_=new WeakMap,m_=yO(qc),Zc=tB(ai),g_=OO(Zc),b_=BO(ai),pj=jO(ai),qp=rB(ai),Jn=OD(nD(Wy),aD(lj,cj,X0,uj,q0,ro,fj,Gc,Tn,Ya,Ai,Wa,p0),Ni,DO(Gp,q0,ro,Tn,Rc,Ai),Qa,sd,Mo,lO(X0,Gp,ro,Tn,Rc,Cn,Ai,kn),hO(h_,ro,da),m_,Cn,g_,b_,pj,kn,qp),hj=uD(Jn,dj,Qa,d_,Cn,kn),v_=new WeakSet,Wv=JO(ai),k_=nO(new Uint32Array(1)),y_=JB(k_,Qa),__=$B(k_),mj=pD(v_,Ni,Mo,Wv,Ka,HB(Wv),y_,__),cd=lD(Vo),w_=BB(p_,Yc,Wa),Ri=ZD(w_),Jc=eB(cd,Ni,oj,ij,aj,Fh,c_,Lh,sj,ej(Xc),u_),Ti=DB(PO(Yc),w_),gj=gD(Ri,Jc,Tn,Ti,xr),li=BD(rD(Hy),h_,Gy,jD,XL,qL,ZL,JL,$L,Wp,zy,Zc,l_),bj=mD(Jn,gj,li,Fr,Jc,Cn,kn,qc),vj=SD(Jn,ED,Qa,Fr,nB(Vo,Xc),Cn,kn,xr),kj=UD(Ri,r_,Tn,Ti,xr),Xa=zB(f_),yj=WD(Jn,li,kj,sd,r_,Cn,kn,Xa),hl=XO(Ya,b_),_j=tj(Fr,hl),ml=iB(Zc,_j),wj=YD(ml,Tn,xr),Aj=QD(Jn,wj,ml,Cn,kn),Cj=qD(Th,Tn,xr),xj=XD(Jn,Cj,Th,Cn,kn,nj),Sj=lB(cd,Jc,Vo,hl),ud=sB(cd,Ni,Sj,Fh,Lh),Ej=tO(Ri,ud,Tn,Ti,xr),Pj=eO(Jn,li,Ej,ud,Cn,kn,qc),A_=cB(Mo,Xc),Mj=iO(A_,Tn,xr),Ij=oO(Jn,Mj,A_,Cn,kn,Xa),Nj=fO(Ri,o_,Tn,Ti,xr),Rj=uO(Jn,li,Nj,o_,Cn,kn,Xa),C_=uB(Mo),Tj=bO(Ri,C_,Tn,Ti,xr),Fj=gO(Jn,li,Tj,C_,Mo,Cn,kn,Xa),Lj=xO(Ri,Vo,Tn,Ti,xr),Dj=CO(Jn,li,Lj,Vo,Cn,kn),Oj=hB(sd,Fr,ld,Mo),x_=jB(Ni,Vo,ld,QB(Vo,Ka)),Bj=LO(Jc,Tn,Ka,xr,x_),jj=fB(Oj),zj=TO(Jn,jj,Bj,Cn,kn,Xa),Vj=PD(li,ml,ud,ld,Mo,a_,kn,Xc),Wj=new WeakMap,Uj=KO(vj,Vj,m_,kn,Wj,qc),S_=yB(cd,Ni,Fh,c_,Lh,u_),Hj=IB(Ri,S_,Tn,Ti,xr),Gj=MB(Jn,li,S_,Hj,Cn,kn,qc),E_=JD(Jc),Qj=EB(E_,Fr,Vo,s_,hl),fd=SB(E_,Fr,Qj,s_,hl,Zc,Xc),Yj=wB(X0,Fr,ml,Vo,ld,fd,Mo,q0,a_,hl),P_=_B(Yj),Kj=TB(Ri,ml,ud,Vo,P_,Tn,Ka,Ti,xr,x_),Xj=RB(Jn,li,P_,Kj,Cn,kn,Xa),qj=AB(Qa),Zj=LB(qj,Cn,new WeakSet,rj),Jj=xB(ml,Th,Vo,fd,Mo,hl),M_=CB(Jj,Mo),$j=UB(Ri,M_,Tn,Ti,xr),ez=WB(Jn,li,M_,$j,Cn,kn),tz=qB(fd,Tn,xr),nz=XB(Jn,Fr,fd,tz,Cn,kn,Xa),rz=WO(ai),oz=_O(ai),iz=new WeakMap,az=IO(iz,Ka),sz=rz?iD(Ni,Mo,kO(ai),oz,wO(eD),Cn,az,kn,qp,new WeakMap,new WeakMap,GB(qp,Ka),ai):void 0,lz=zO(g_,kn),cz=sO(v_,Ni,aO,vO,new WeakSet,Cn,lz,Yp,Xp,y_,__),uz=zD(sz,hj,mj,bj,yj,Aj,xj,Pj,Ij,cz,Rj,Fj,Dj,zj,Uj,Gj,Xj,Zj,ez,nz),fz=UO(Jn,mB,Cn,kn),dz=GO(Jn,gB,Cn,kn),pz=QO(Jn,bB,Cn,kn),hz=vB(Fr,kn),mz=YO(Jn,hz,Cn),I_=xD(uz,Fr,Mo,YB,fz,dz,pz,mz,Zc);class gz extends I_{get outputLatency(){const r=this._nativeAudioContext;return r&&r.outputLatency!==void 0?r.outputLatency:0}}function bz(){const t=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return t?parseInt(t[2]):null}function vz(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const r=Math.random()*16|0;return(t==="x"?r:r&3|8).toString(16)})}class yi{constructor(r,s){Ie(this,"sec",0);Ie(this,"usec",0);this.sec=r,this.usec=s}setMilliseconds(r){this.sec=Math.floor(r/1e3),this.usec=Math.floor(r*1e3)%1e6}getMilliseconds(){return this.sec*1e3+this.usec/1e3}}class dd{constructor(){Ie(this,"type",0);Ie(this,"id",0);Ie(this,"refersTo",0);Ie(this,"received",new yi(0,0));Ie(this,"sent",new yi(0,0));Ie(this,"size",0)}deserialize(r){const s=new DataView(r);this.type=s.getUint16(0,!0),this.id=s.getUint16(2,!0),this.refersTo=s.getUint16(4,!0),this.received=new yi(s.getInt32(6,!0),s.getInt32(10,!0)),this.sent=new yi(s.getInt32(14,!0),s.getInt32(18,!0)),this.size=s.getUint32(22,!0)}serialize(){this.size=26+this.getSize();const r=new ArrayBuffer(this.size),s=new DataView(r);return s.setUint16(0,this.type,!0),s.setUint16(2,this.id,!0),s.setUint16(4,this.refersTo,!0),s.setInt32(6,this.sent.sec,!0),s.setInt32(10,this.sent.usec,!0),s.setInt32(14,this.received.sec,!0),s.setInt32(18,this.received.usec,!0),s.setUint32(22,this.size,!0),r}getSize(){return 0}}class kz extends dd{constructor(s){super();Ie(this,"codec","");Ie(this,"payload");this.payload=new ArrayBuffer(0),s&&this.deserialize(s),this.type=1}deserialize(s){super.deserialize(s);const u=new DataView(s),p=u.getInt32(26,!0),d=new TextDecoder("utf-8");this.codec=d.decode(s.slice(30,30+p));const b=u.getInt32(30+p,!0);console.debug("payload size: "+b),this.payload=s.slice(34+p,34+p+b),console.debug("payload: "+this.payload)}}class Uv extends dd{constructor(s){super();Ie(this,"latency",new yi(0,0));s&&this.deserialize(s),this.type=4}deserialize(s){super.deserialize(s);const u=new DataView(s);this.latency=new yi(u.getInt32(26,!0),u.getInt32(30,!0))}serialize(){const s=super.serialize(),u=new DataView(s);return u.setInt32(26,this.latency.sec,!0),u.setInt32(30,this.latency.usec,!0),s}getSize(){return 8}}class N_ extends dd{constructor(s){super();Ie(this,"json");s&&this.deserialize(s)}deserialize(s){super.deserialize(s);const p=new DataView(s).getUint32(26,!0),d=new TextDecoder;this.json=JSON.parse(d.decode(s.slice(30,30+p)))}serialize(){const s=super.serialize(),u=new DataView(s),p=JSON.stringify(this.json);u.setUint32(26,p.length,!0);const b=new TextEncoder().encode(p);for(let k=0;kthis.payloadSize()/p&&(u=this.payloadSize()/p-this.idx);const d=this.idx*p;this.idx+=u;const b=d+u*p;return this.payload.slice(d,b)}getFrameCount(){return this.payloadSize()/this.sampleFormat.frameSize()}isEndOfChunk(){return this.idx>=this.getFrameCount()}startMs(){return this.timestamp.getMilliseconds()+1e3*(this.idx/this.sampleFormat.rate)}duration(){return 1e3*((this.getFrameCount()-this.idx)/this.sampleFormat.rate)}payloadSize(){return this.payload.byteLength}clearPayload(){this.payload=new ArrayBuffer(0)}addPayload(s){const u=new ArrayBuffer(this.payload.byteLength+s.byteLength),p=new DataView(u),d=new DataView(this.payload),b=new DataView(s);for(let k=0;k "+this.volume+", muted: "+this.muted),this.muted=s}addChunk(r){for(this.chunks.push(r);this.chunks.length>0;){const s=this._timeProvider.serverNow()-this.chunks[0].timestamp.getMilliseconds();if(s>5e3+this._bufferMs)this.chunks.shift(),console.log("Dropping old chunk: "+s.toFixed(2)+", left: "+this.chunks.length);else break}}getNextBuffer(r,s){this.chunk||(this.chunk=this.chunks.shift());const u=r.length,p=new Float32Array(u),d=new Float32Array(u);let b=0,k=0;const y=this._timeProvider.serverTime(s);if(this.chunk){let _=y-this.chunk.startMs();const S=u/this._sampleFormat.msRate(),P=Math.floor(Date.now()/1e3);if(this.lastLog!==P&&(this.lastLog=P,console.log("age: "+_.toFixed(2)+", req: "+S)),_<-S)console.log("age: "+_.toFixed(2)+" < req: "+S*-1+", chunk.startMs: "+this.chunk.startMs().toFixed(2)+", timestamp: "+this.chunk.timestamp.getMilliseconds().toFixed(2)),console.log("Chunk too young, returning silence");else{if(Math.abs(_)>5){for(;this.chunk&&_>this.chunk.duration()&&(console.log("Chunk too old, dropping (age: "+_.toFixed(2)+" > "+this.chunk.duration().toFixed(2)+")"),this.chunk=this.chunks.shift(),!!this.chunk);)_=y-this.chunk.startMs();if(this.chunk){if(_>0)console.log("Fast forwarding "+_.toFixed(2)+"ms"),this.chunk.readFrames(Math.floor(_*this.chunk.sampleFormat.msRate()));else if(_<0){console.log("Playing silence "+-_.toFixed(2)+"ms");const D=Math.floor(-_*this.chunk.sampleFormat.msRate());p.fill(0,0,D),d.fill(0,0,D),b=D,k=D}_=0}}let I=0,L=0;_>.1?I=Math.ceil(_):_<-.1&&(I=Math.floor(_));const R=u+I-b;for(I!==0&&(L=Math.ceil((u+I-b)/(Math.abs(I)+1)));b=24?O=new Int32Array(Z):O=new Int16Array(Z);for(let B=0;B0?k--:(p[k+1]=p[k],d[k+1]=d[k],k++)),k++;D.isEndOfChunk()&&(this.chunk=this.chunks.shift())}I!==0&&console.debug("Pos: "+k+", frames: "+u+", add: "+I+", everyN: "+L),b===R&&(b=u)}}b100&&this.diffBuffer.shift();const u=[...this.diffBuffer];u.sort(),this.diff=u[Math.floor(u.length/2)]}}now(){if(this.ctx){const r=this.ctx,s=r.getOutputTimestamp?r.getOutputTimestamp().contextTime:void 0;return(s!==void 0?s:r.currentTime)*1e3}else return window.performance.now()}nowSec(){return this.now()/1e3}serverNow(){return this.serverTime(this.now())}serverTime(r){return r+this.diff}}class pd{constructor(){Ie(this,"rate",48e3);Ie(this,"channels",2);Ie(this,"bits",16)}msRate(){return this.rate/1e3}toString(){return this.rate+":"+this.bits+":"+this.channels}sampleSize(){return this.bits===24?4:this.bits/8}frameSize(){return this.channels*this.sampleSize()}durationMs(r){return r/this.frameSize()*this.msRate()}}class Dh{setHeader(r){return new pd}decode(r){return null}}class xz extends Dh{setHeader(r){const s=new DataView(r),u=1330664787;if(r.byteLength<12)return console.error("Opus header too small: "+r.byteLength),null;if(s.getUint32(0,!0)!==u)return console.error("Opus header too small: "+r.byteLength),null;const p=new pd;return p.rate=s.getUint32(4,!0),p.bits=s.getUint16(8,!0),p.channels=s.getUint16(10,!0),console.log("Opus samplerate: "+p.toString()),p}decode(r){return null}}class Sz extends Dh{constructor(){super();Ie(this,"sampleFormat");Ie(this,"decoder");Ie(this,"header",null);Ie(this,"flacChunk");Ie(this,"pcmChunk");Ie(this,"cacheInfo",{isCachedChunk:!1,cachedBlocks:0});if(this.decoder=Wl.create_libflac_decoder(!0),this.decoder){const s=Wl.init_decoder_stream(this.decoder,this.read_callback_fn.bind(this),this.write_callback_fn.bind(this),this.error_callback_fn.bind(this),this.metadata_callback_fn.bind(this),!1);console.log("Flac init: "+s),Wl.setOptions(this.decoder,{analyseSubframes:!0,analyseResiduals:!0})}this.sampleFormat=new pd,this.flacChunk=new ArrayBuffer(0)}decode(s){for(this.flacChunk=s.payload.slice(0),this.pcmChunk=s,this.pcmChunk.clearPayload(),this.cacheInfo={cachedBlocks:0,isCachedChunk:!0};this.flacChunk.byteLength>0;)if(!Wl.FLAC__stream_decoder_process_single(this.decoder))return null;if(this.cacheInfo.cachedBlocks>0){const u=this.cacheInfo.cachedBlocks/this.sampleFormat.msRate();this.pcmChunk.timestamp.setMilliseconds(this.pcmChunk.timestamp.getMilliseconds()-u)}return this.pcmChunk}read_callback_fn(s){if(this.header){console.log(" header: "+this.header.byteLength);const u=new Uint8Array(this.header);return this.header=null,{buffer:u,readDataLength:u.byteLength,error:!1}}else if(this.flacChunk){this.cacheInfo.isCachedChunk=!1;const u=new Uint8Array(this.flacChunk.slice(0,Math.min(s,this.flacChunk.byteLength)));return this.flacChunk=this.flacChunk.slice(u.byteLength),{buffer:u,readDataLength:u.byteLength,error:!1}}return{buffer:new Uint8Array(0),readDataLength:0,error:!1}}write_callback_fn(s,u){this.cacheInfo.isCachedChunk&&(this.cacheInfo.cachedBlocks+=u.blocksize);const p=new ArrayBuffer(this.sampleFormat.frameSize()*u.blocksize),d=new DataView(p);for(let b=0;b{}}start(){this.source.onended=()=>{this.onended(this)},this.source.start(this.playTime)}}class Pz extends Dh{setHeader(r){const s=new pd,u=new DataView(r);return s.channels=u.getUint16(22,!0),s.rate=u.getUint32(24,!0),s.bits=u.getUint16(34,!0),s}decode(r){return r}}class Z0{constructor(r){Ie(this,"baseUrl");Ie(this,"streamsocket");Ie(this,"playTime",0);Ie(this,"msgId",0);Ie(this,"bufferDurationMs",80);Ie(this,"bufferFrameCount",3844);Ie(this,"syncHandle",-1);Ie(this,"audioBuffers",new Array);Ie(this,"freeBuffers",new Array);Ie(this,"timeProvider");Ie(this,"stream");Ie(this,"ctx");Ie(this,"gainNode");Ie(this,"serverSettings");Ie(this,"decoder");Ie(this,"sampleFormat");Ie(this,"audioBufferCount",3);Ie(this,"bufferMs",1e3);Ie(this,"bufferNum",0);Ie(this,"latency",0);this.baseUrl=r,this.timeProvider=new Cz,this.setupAudioContext()?this.connect():alert("Sorry, but the Web Audio API is not supported by your browser")}resume(){this.ctx.resume()}setupAudioContext(){if(I_){let r;r={latencyHint:"interactive",sampleRate:this.sampleFormat?this.sampleFormat.rate:void 0};const s=bz();(s!==null&&s<55||!window.AudioContext)&&(r=void 0),this.ctx=new gz(r),this.gainNode=this.ctx.createGain(),this.gainNode.connect(this.ctx.destination)}else return!1;return!0}static getClientId(){return d0("uniqueId",vz())}connect(){this.streamsocket=new WebSocket(this.baseUrl+"/stream"),this.streamsocket.binaryType="arraybuffer",this.streamsocket.onmessage=r=>this.onMessage(r),this.streamsocket.onopen=()=>{console.log("on open");const r=new yz;r.mac="00:00:00:00:00:00",r.arch="web",r.os=(navigator==null?void 0:navigator.platform)||"unknown",r.hostname="Snapweb client",r.uniqueId=Z0.getClientId(),this.sendMessage(r),this.syncTime(),this.syncHandle=window.setInterval(()=>this.syncTime(),1e3)},this.streamsocket.onerror=r=>{console.error("error:",r)},this.streamsocket.onclose=()=>{window.clearInterval(this.syncHandle),console.info("connection lost, reconnecting in 1s"),setTimeout(()=>this.connect(),1e3)}}onMessage(r){const u=new DataView(r.data).getUint16(0,!0);if(u===1){const p=new kz(r.data);console.log("Codec: "+p.codec),p.codec==="flac"?this.decoder=new Sz:p.codec==="pcm"?this.decoder=new Pz:(p.codec==="opus"&&(this.decoder=new xz),alert("Codec not supported: "+p.codec)),this.decoder&&(this.sampleFormat=this.decoder.setHeader(p.payload),console.log("Sampleformat: "+this.sampleFormat.toString()),this.sampleFormat.channels!==2||this.sampleFormat.bits<16?alert("Stream must be stereo with 16, 24 or 32 bit depth, actual format: "+this.sampleFormat.toString()):(this.bufferDurationMs!==0&&(this.bufferFrameCount=Math.floor(this.bufferDurationMs*this.sampleFormat.msRate())),window.AudioContext&&this.sampleFormat.rate!==this.ctx.sampleRate.valueOf()&&(console.log("Stream samplerate != audio context samplerate ("+this.sampleFormat.rate+" != "+this.ctx.sampleRate.valueOf()+"), switching audio context to "+this.sampleFormat.rate+" Hz"),this.stopAudio(),this.setupAudioContext()),this.ctx.resume(),this.timeProvider.setAudioContext(this.ctx),this.gainNode.gain.value=this.serverSettings.muted?0:this.serverSettings.volumePercent/100,this.stream=new Az(this.timeProvider,this.sampleFormat,this.bufferMs),this.latency=(this.ctx.baseLatency!==void 0?this.ctx.baseLatency:0)+(this.ctx.outputLatency!==void 0?this.ctx.outputLatency:0),console.log("Base latency: "+this.ctx.baseLatency+", output latency: "+this.ctx.outputLatency+", latency: "+this.latency),this.play()))}else if(u===2){const p=new wz(r.data,this.sampleFormat);if(this.decoder){const d=this.decoder.decode(p);d&&this.stream.addChunk(d)}}else if(u===3)this.serverSettings=new _z(r.data),this.gainNode.gain.value=this.serverSettings.muted?0:this.serverSettings.volumePercent/100,this.bufferMs=this.serverSettings.bufferMs-this.serverSettings.latency,console.log("ServerSettings bufferMs: "+this.serverSettings.bufferMs+", latency: "+this.serverSettings.latency+", volume: "+this.serverSettings.volumePercent+", muted: "+this.serverSettings.muted);else if(u===4){if(this.timeProvider){const p=new Uv(r.data);this.timeProvider.setDiff(p.latency.getMilliseconds(),this.timeProvider.now()-p.sent.getMilliseconds())}}else console.info("Message not handled, type: "+u)}sendMessage(r){r.sent=new yi(0,0),r.sent.setMilliseconds(this.timeProvider.now()),r.id=++this.msgId,this.streamsocket.readyState===this.streamsocket.OPEN&&this.streamsocket.send(r.serialize())}syncTime(){const r=new Uv;r.latency.setMilliseconds(this.timeProvider.now()),this.sendMessage(r)}stopAudio(){for(this.ctx.suspend();this.audioBuffers.length>0;){const r=this.audioBuffers.pop();r.onended=()=>{},r.source.stop()}for(;this.freeBuffers.length>0;)this.freeBuffers.pop()}stop(){window.clearInterval(this.syncHandle),this.stopAudio(),(this.streamsocket.readyState===WebSocket.OPEN||this.streamsocket.readyState===WebSocket.CONNECTING)&&(this.streamsocket.onclose=()=>{},this.streamsocket.close())}play(){this.playTime=this.timeProvider.nowSec()+.1;for(let r=1;r<=this.audioBufferCount;++r)this.playNext()}playNext(){const r=this.freeBuffers.pop()||this.ctx.createBuffer(this.sampleFormat.channels,this.bufferFrameCount,this.sampleFormat.rate),s=(this.playTime+this.latency)*1e3-this.bufferMs;this.stream.getNextBuffer(r,s);const u=this.ctx.createBufferSource(),p=new Ez(r,this.playTime,u,this.gainNode);this.audioBuffers.push(p),p.num=++this.bufferNum,p.onended=d=>{this.freeBuffers.push(this.audioBuffers.splice(this.audioBuffers.indexOf(d),1)[0].buffer),this.playNext()},p.start(),this.playTime+=this.bufferFrameCount/this.sampleFormat.rate}}const Mz=""+new URL("10-seconds-of-silence-j39Pm5R-.mp3",import.meta.url).href,Iz=""+new URL("snapcast-512-B1PzHP_P.png",import.meta.url).href,Nz=Kf({palette:{primary:{light:"#757ce8",main:"#607d8b",dark:"#002884",contrastText:"#fff"},secondary:{light:"#ff7961",main:"#f44336",dark:"#ba000d",contrastText:"#000"}},typography:{subtitle1:{fontSize:17},body1:{fontWeight:500},h5:{fontWeight:300}},components:{MuiTextField:{defaultProps:{spellCheck:!1}}}}),Rz=Kf({palette:{mode:"dark",primary:{light:"#757ce8",main:"#607d8b",dark:"#002884",contrastText:"#fff"},secondary:{light:"#ff7961",main:"#f44336",dark:"#ba000d",contrastText:"#000"}},typography:{subtitle1:{fontSize:17},body1:{fontWeight:500},h5:{fontWeight:300}},components:{MuiTextField:{defaultProps:{spellCheck:!1}}}});function Tz(){const[t,r]=J.useState(0),[s,u]=J.useState(new Ta.Server),[p,d]=J.useState(!1),[b,k]=J.useState(wr.showOffline),[y,_]=J.useState(wr.theme),[S,P]=J.useState(wr.baseUrl),[I,L]=J.useState(!1),[R,D]=J.useState(!1),[Z,F]=J.useState(!1),[O,B]=J.useState(!1),[Q,U]=J.useState(""),ee=J.useRef(null),q=J.useRef(new Audio),X=J.useRef(new UL),me=A7("(prefers-color-scheme: dark)");window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",ge=>{_(wr.theme)}),J.useEffect(()=>{console.debug("server updated")},[s]),J.useEffect(()=>{console.debug("serverUrl updated: "+S),u(new Ta.Server),X.current.connect(S);const ge=X.current;return()=>{ge.disconnect()}},[S]);function le(ge){console.debug("Update: "+s.groups.length+" => "+ge.groups.length),u(ge),r(t+1),de()}X.current.onChange=(ge,ye)=>le(ye),X.current.onConnectionChanged=(ge,ye,ve)=>{console.log("Connection state changed: "+ye+", error: "+ve),ye||(F(!1),u(new Ta.Server),ve&&U(ve)),B(ye)};function he(){try{const ge=X.current.getGroupFromClient(Z0.getClientId());return X.current.getStream(ge.stream_id).id}catch{return""}}function de(){if(console.debug("updateMediaSession"),!!ee.current)try{const ge=he(),ye=X.current.getStream(ge).properties,ve=ye.metadata,ce=(ve==null?void 0:ve.title)||"Unknown Title",we=(ve==null?void 0:ve.artist)!==void 0?ve==null?void 0:ve.artist.join(", "):"Unknown Artist",Ne=(ve==null?void 0:ve.album)||"";let Ae=[{src:Iz,sizes:"512x512",type:"image/png"}];(ve==null?void 0:ve.artUrl)!==void 0&&(Ae=[{src:ve.artUrl,sizes:"96x96",type:"image/png"},{src:ve.artUrl,sizes:"128x128",type:"image/png"},{src:ve.artUrl,sizes:"192x192",type:"image/png"},{src:ve.artUrl,sizes:"256x256",type:"image/png"},{src:ve.artUrl,sizes:"384x384",type:"image/png"},{src:ve.artUrl,sizes:"512x512",type:"image/png"}]),console.info("Metadata title: "+ce+", artist: "+we+", album: "+Ne+", artwork: "+Ae),navigator.mediaSession.metadata=new MediaMetadata({title:ce,artist:we,album:Ne,artwork:Ae});const Pe=navigator.mediaSession;let tt="none";ye.playbackStatus!==void 0&&(ye.playbackStatus==="playing"?(console.debug("updateMediaSession: playing"),q.current.play(),tt="playing"):ye.playbackStatus==="paused"?(console.debug("updateMediaSession: paused"),q.current.pause(),tt="paused"):ye.playbackStatus==="stopped"&&(console.debug("updateMediaSession: stopped"),q.current.pause(),tt="none")),Pe.playbackState=tt,Pe.setActionHandler("play",ye.canPlay?()=>{X.current.control(ge,"play")}:null),Pe.setActionHandler("pause",ye.canPause?()=>{X.current.control(ge,"pause")}:null),Pe.setActionHandler("previoustrack",ye.canGoPrevious?()=>{X.current.control(ge,"previous")}:null),Pe.setActionHandler("nexttrack",ye.canGoNext?()=>{X.current.control(ge,"next")}:null);try{Pe.setActionHandler("stop",ye.canControl?()=>{X.current.control(ge,"stop")}:null)}catch{console.debug('Warning! The "stop" media session action is not supported.')}const Ue=10;Pe.setActionHandler("seekbackward",ye.canSeek?He=>{const mt=(He.seekOffset||Ue)*-1;ye.position!==void 0&&Math.max(ye.position+mt,0),X.current.control(ge,"seek",{offset:mt})}:null),Pe.setActionHandler("seekforward",ye.canSeek?He=>{const mt=He.seekOffset||Ue;(ve==null?void 0:ve.duration)!==void 0&&ye.position!==void 0&&Math.min(ye.position+mt,ve.duration),X.current.control(ge,"seek",{offset:mt})}:null);try{Pe.setActionHandler("seekto",ye.canSeek?He=>{const mt=He.seekTime||0;(ve==null?void 0:ve.duration)!==void 0&&Math.min(mt,ve.duration),X.current.control(ge,"setPosition",{position:mt})}:null)}catch{console.debug('Warning! The "seekto" media session action is not supported.')}(ve==null?void 0:ve.duration)!==void 0&&ye.position!==void 0&&ye.position<=ve.duration?"setPositionState"in Pe&&(console.debug("Updating position state: "+ye.position+"/"+ve.duration),Pe.setPositionState({duration:ve.duration,playbackRate:1,position:ye.position})):Pe.setPositionState({duration:0,playbackRate:1,position:0})}catch(ge){console.debug("updateMediaSession failed: "+ge);return}}J.useEffect(()=>{Z?(console.debug("isPlaying changed to true"),q.current.src=Mz,q.current.loop=!0,q.current.play().then(()=>{ee.current=new Z0(wr.baseUrl)})):(console.debug("isPlaying changed to false"),ee.current&&ee.current.stop(),ee.current=null,q.current.pause(),q.current.src="")},[Z]);function Ce(){return j.jsx(Va,{role:"presentation",sx:{mt:1},children:j.jsxs(Cy,{children:[j.jsx(uv,{disablePadding:!0,children:j.jsx(cv,{onClick:()=>{L(!0),d(!1)},children:j.jsx(dv,{primary:"About..."})})},"about"),j.jsx(uv,{disablePadding:!0,children:j.jsx(cv,{onClick:()=>{D(!0),d(!1)},children:j.jsx(dv,{primary:"Settings..."})})},"settings")]})})}function _e(){return O?null:j.jsx(Dy,{open:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},onClose:(ge,ye)=>{ye!=="clickaway"&&console.log("Snackbar - onClose")},children:j.jsx(iy,{onClose:ge=>{console.log("Snackbar - alert onClose")},severity:"error",sx:{width:"100%"},action:j.jsx(wi,{color:"inherit",size:"small",onClick:ge=>{D(!0)},children:"Settings"}),children:Q+` -Snapserver host: `+wr.baseUrl})},"connect-error")}return j.jsxs(f9,{theme:y==gi.Dark||y==gi.System&&me?Rz:Nz,children:[j.jsx(oI,{}),j.jsxs("div",{className:"SnapWeb",children:[j.jsx(SP,{position:"sticky",children:j.jsxs(yL,{children:[j.jsx(Do,{size:"large",edge:"start",color:"inherit","aria-label":"menu",sx:{mr:2},onClick:ge=>{d(!0)},children:j.jsx(EL,{})}),j.jsx(no,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Snapcast"}),O?j.jsx(Do,{size:"large",edge:"start",color:"inherit","aria-label":"menu",sx:{mr:2},onClick:ge=>{F(!Z)},children:Z?j.jsx(TL,{fontSize:"large"}):j.jsx(Oy,{fontSize:"large"})}):j.jsx(Do,{})]})}),j.jsx(SN,{anchor:"top",open:p,onClose:()=>{d(!1)},children:Ce()}),j.jsx(OL,{server:s,snapcontrol:X.current,showOffline:b}),_e(),j.jsx(jL,{open:I,onClose:()=>{L(!1)}}),j.jsx(WL,{open:R,onClose:ge=>{console.log("Apply: "+ge+", Serrver url: "+wr.baseUrl),D(!1),ge&&(P(wr.baseUrl),_(wr.theme),k(wr.showOffline))}})]})]})}const Fz=O2.createRoot(document.getElementById("root"));console.log("Welcome to snapweb 0.8.0");Fz.render(j.jsx(Oo.StrictMode,{children:j.jsx(Tz,{})})); diff --git a/music_assistant/server/providers/snapcast/snapweb/assets/logo192-wKJb_L8G.png b/music_assistant/server/providers/snapcast/snapweb/assets/logo192-wKJb_L8G.png deleted file mode 100644 index 9eb0bcadb3c64313abf2655b56cd31bed7978cfc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11870 zcmV-kE}_whP)e}8NZ*wU%f zCC~djevD7qXG`pL&fa^i^;?202|>P35uuz3NHLa(7=aKY5Rnl`F$_d0$U>k1$Onpb znh1l~2eJ+51kna^FGB7`YIR7t7vv5E8_5Z76vxq((jRbuBGTP~{)SwHmx7$>M6@H( zn1N&xFcBD*%5DHVfQ`UPgjj|MFC#a!TFfMr!hZC7vIby*e5YUt-NAVXF%QWxz*Hb7 z-Tg8k0CG8qw~;Kt6?j|Bra9f6%4D(z&E@s{0J#V+ zdEOJz#HC1i7T`&DpHhq;$?FKQ5WoLfaS|Qr?oc{7=nO#Cw2f4X~`r%Q62*Wp09iu;n(s#-ZzL1n z_#y{9L%>xCS{`T~aOHvU02*|yg|5x%?xkHi5!_GE^P7P%HR{&}AZu{r@?L@D7GP-l zdZK}E4CGCL{3(z-0X##&TLC%4z*COpue$yjSbr6S+f&lx_z_JA`9FjM5BF#1TE8^_ zS(7sp&GjJ2qf-9x+;LEJ92C!jf@zR9S-sigrG5dd`9}Qhq!P(G;0Iz};N^68B^LUf z0mz!d!Dzudfy+o$|9yu*=_zW!7atFvWW~Kn_+UH)>XOucG7$?1xvm#q?%0#=o;aaj z8Gu~k`vyer0#TOSCuvZ4B$S;FWv4;@)Z{*He^#6fEsIn4yo4f}fFFpt{=cNVCwA!< z1|VP0A4*R5AAz%y`k?$O81_vlzc7h!c?&+A3SAr1^X$a&3TWREbGx>uyCYU)yaC81 z-cy0cfZ<7bfV%{STm(ZeRd4-t(y~~60R{%GAg>m4gHNZsBW7f*0m!A~(doG#DZZVQ z2joqGkvFKpuVsMCp#5X`^c)EGt0}Y{{)9j9{Y(wE%SZ!|Z+j;ZW+5;w;f)WP10#O` zr6-g8A74UnFNF3$V5jNuQxbP?#dm9Xzo47WEyP@?R*!Lc^z6(U^0h;x_&2Pe|XJw55I+2_$<^^6$^@CGx0CI`vTo8XJUKIvc0gU^-3SDqY zU?*(51NJ-xk$}VJ=0ovpC^-QJouI-e;`udh`~mEIDE9jY4u0S~F*mR%l@Cp+0m!$! zrxW2>;vM{jN5bSkt0{&P!fmkQ9@zeSh&Yhe%qfMkGhpyJYT%0mDyTHS1}hV{`PI(} z0vCw6ffrNtz&N%^oFNx`ze0qC#5?$heH$j+<7^PhAk;ko+kR_*VXJwe>?{~|DGaKP zZ%4@t;Z07v{SyzcP}X?Q64inKq~d`oF#x&PSB;P_5Ko@2aKRzJgi$|oc3-}UuEa_7qS>u_CCf*_*5h`~n zO!=#te%PhE8MfXIbq``I#-`|47pF@PSmhL@3iIp#(R zkAkT$s2vzPw0#6?zonuu&G3y@1Hb%y67u7R+tob2^&QoR_GQrB5`Vi{_U8rW1kM#A z@$urxSp;j|JL4MsC0~K6f7(}C*!eJQ`mwn~N#wxD>tXcI)Lwo(bgY8L7gUVUz7MmG ztmJbROT2eN;J*^xaKgU;J&vwtVs5+iWT;wTZ<|vFl_P1_pUkf-Iu<6}-{Z83kHi2-FwQxJN5Ww* zgR98;+OGAm@^tWhRIJr!3^hp2{pp*C!p@W_;Ykcj#_tkE1bh z$tQRM$0n*uX5!WWF3-Kl7zcmuM40-#y}{qU3|5}0c2tZQda;`FXt~b%5!?;ie+#?+ z99#TeY!Tl+RLErL+9;h0l{>F-g_bNoy0Vk0A#J_JfwIg zrkg#(Va7Y)9btWK>)WvEJm_xKKQG*H$Suyj#o-PWkhbkN5O$EHqFuf!SvVEmZud>ufXcB8V9lE zltbk|9Xhn6dfRWg8A1*AZV?{kEgp8M@*%{k3A*hL`0Uo$?#%+Q7m+hn%xO273Rn~W z6v!)JkqRp%QI{=%6s^Uhf6 zypu(Bo6R}wf!J8F86djvi)rwChQP$ftREfNuC_W22mgGide;8n-~DI!_!#TKUwR50 z@s4uFC1vmjVZ*iA!JjZh8Lr?RG2b1_O|sTEA1Pmt>2Xt^Rq739M7rRUFRR!ZJxb<7 z)id_CIU@lTb!inKmpcw7JeXJkEh0UEaht&Znfd}X{;x9bEQurn+H5hm>s_ZeIyL}V zgB#7e3~(-*UvWK*`;FBTRF#zah5Dz9XQ>6Roxva64XZ9N-*Xo()vrT-;oNV~n@Fb$ zifevDsm67z>PIDy`aLVj4;(3G;wUi7`65{JUPCN{zhF9y{gw4~TW>cW{CQKLYN5S> z+O-)zJwv^HjmVz{6CaLGFSKi;iVunodZ$VDSrWxGI=z=e;9(~>Ir;*q@4lt5Q4TnjJCf3vNmrxGQ1IR=KA!Ggqh1Nc59>> zv`q$u1}FVV#rIgz`i>HsGMaaLN2=YOf+MWk+MmF7*mkEOd%HT^nH8Y*h_rpfKV}n6~H(2cN3|hF_t=N8$+o zN*Y#ke9sW&t#^tPSIbrATD0cB4bAs;z`{ID*m1XV81*^+2PI9e$KW%pLz`RQhR=SX ze=e`m{+qw)6*c%f6P9D0W;8hTP8ff${?9*Xjx%}5RI%@U>mbEZH^idVI*dloxn>tw zy$-(X^oa)`LuzWV;uP5S|6uE{R2cB)pBmreu~1PA?}K%htB~T}xJy*1gv&+-%-1RPLRx!wK;~KPvb9u6!E?NW2NzB<0(nQzl^6&hu#6DCt0^&|LnjT{JG=c z@Y>Xh`zDJmKgTq#%2fnIW2guuHN$NrT?3Fc_y8O3*CZf=DxBef5N4?&MAu!Re^2pj z>rX!@16updfiw6A%~3&yPI95sLBVvj3pH(#`rBw4*7lM0W<dz zPDkSKTa!TiTVdH8rK{s9?@1`poA&fzr%qV=a#(x$z#07I=fkAOl(I%9Q+|GrLo+(m zPJm(GQbNY{I!Zd*exnK>8sQragU^Nf1r9nP%4qbQ0>M7kr9TCd;;Rl?PZCmvI5fX$ zKKQ|UA34+jt1lclvg8%l!jz{nfAG7DVZsA_-`K*fj_d8}w12GPy381Po%6m##3g!% z`xt(ob_9&ifyl8b7!w3Tx(~duww_A9W zbD?9w>9VG;d{5smfZul(5NB>+irM*)aoo4_;UAWgU|f`==g@0M#=zlk+Dh1$ zQX*xBWT@?XAJbhOcd7DF_d)j5b~9n<#m*JKrPik&?EwZLmy&~sqp(Ff+4nwtco;05 z0n6vW`(srF`2J4eQE>QMwv^<;;V|phuO}SVaT2Bj|7WTeni&<>>JQ}l1?IJ!J;R~I z;ZPOwl-|2R2YvzCeY1$Cnq%6Ds88p<|BFrCInyXR6Q;kSVqq)@27|0wvxb(I4D)Pn z`?dLb??@=o@!xc}DhU}g>?BGZNHKeTbM`-QpaBTkzZSm(nTl(n>L0emcRM>fS+!~v z9UUn)df`&x%4S6j+di~jgN-oo@9eQqJS;s`DReub*BI};28d1PGfUzSE|m*0?swRU z+-z-aW%cUS1cSlk_icZMUJOTXfumNyFfT$RaTf0t^$=c z=mbIa{{Q^^H{6r>;#}`1OX6_lE3MNCdlBe+_wHrgx^=0a^GBU<`%ldZkAlNq)%VFX zzhb@(EnG14>pCYQ`q9MuQ+k@MF7L--^7X>c9S~owg9OhoRV$&)-v7|L zx;nOO*^-_epE3W9t{)<&Og~~%hLtv}8G{X?maP`iWqmewtkCcTW`FUIC{oPUy*x|u z$*)oYZ8qduB9RCiH*RFdj-(Y&H%E9>{WT+oeM4WlZ}$`CVJHRDA$LOGyAT`naDqS2sxb1KndkUbgbxQb${FKmZVKY&s8 z3ZL)Ww~q}QHqhOjA(5=R9)Y2{v1N+lvn| zf>7F_Bd*Gb!M|h24mNGtlv#s6%ATjq&zGL8f4un(^ZN!FB<=5e&-}h3hZ%8F&VVl# z!AYnE)DI~+0R~lDUzcR0lx*6xiMl!yCs4YnU!X5c5T)p7eI23}D+4f?&R7|M^BND6 z;R^$Zt-||2!%D(E1w?mx8X97%`Ib6@yUk0?iX43}ZQC*k8Pt6PwZ*EZ>d|UZ&enO^ z*@*y}e3x9nMw#}5fHW&61Ofq8uU^f*eGaPCr<0a9&Ci$UeN7|K_JPSwn*NKZbB(z| zw{ruikTn!&ggoQv7wJUf$aHbLKeBP+|VU)s|eUHhIdATd^2&a-M z0&>P{NHSbfVBpix(7>8CYY2tUcy1S8iw7zR%0H{IP+W>-llq99mRa3cfoe`emUULJJNqVS_x zYNjr-L<4CRRJYXDgifK}ZEy<`;44!3WIL-=#XAK}r{8$yS*3)UV3OzRp zeYSeTTNz02=70>563)_Zu`~c3B@4@eY%tY{^*(*NHDG|$4a$->tm-oB8i2(Y!01hG zY5>yd7oc4O(k(QTrN0x40a$%CjA{dz89>C3Lv@pO4X{|kXUSrLl?PVO04xg|8mQm7 z@{R9tHvIu*0HU8Hpk~Qfa>tpRjOcrcb1aH}7==8T8ID=9y)LptL&yv(DUzjMAw2q_ z%TfGW_2=atop}HK3F!pOxr@yUhFC?5_Cf5`kaDNPyRu~Yg4}WDmD`Q-1&mbQq6Bqf zg{-1I9UA~UHPEsKkR^7E;{Br-8GxP?`u^xem?qo+9F>k#u5#l>z8TCu%oJv0)MX=l5e~i9 z>D>d8uJy3>)^zs*Aq3;bjbr3Ur%Goj#5dYplRx5zRvk_MqA%$u$VBN_r5^`WWKjpq zsR0O9LNpyxuq<04sfTU9hJ7EvkgxS@yCq?VEN76dlBg9G6?nbg%qx)uFy!l){%%^| z(I3cz=9{0Pfq6QF&e3VTN+mDvTef2C8icrO-$Nb##%E5yN z6+WLs*^gvVQf)3pF2hj&OyA?)5m0oL$$dfnFM#h5b*~X! zo1J=rJJ}Ol4?PATst5wBoV1W70ql7SR-S2V_sQq;QB_q%VPOUc`3<|w{Cvxs`d-<= z=VF?LyYB=21beI9Cad~keOV?hRGE!O`Df+}1CVmD!&b5+iq6%re71GzAVAYJ z#*ZJLz8xar)>nCm65Im~FZ4a`8>@DJ43W_AufB)1T!UI;`{8)KCUp!z^DHJ?EjxV# z_rQu1q46bKmseC&Fm~)%gh+85mkb$uY5{gXuD`Asei@e2A3gp5LDlBo=FTj8vzY!g8tgV1vqDt!`J(GUla%PV?y{s58HP21B1^t?~BbZ=6;R7 zy8pipOy!X*LU5hK7PBOSy8G1|b;_U3rvN}+ULI9dRjgmXo{kPj@i4K|^s4&f%7;kE zTtNEat#3Kv$p!=$}dQg)?FNJuu~OFy`hM zs)b}AjW5Eoc@VHp+VglkOqnu;L4ynm&n1g+hxy{#XCg0)Y7TIx_g$7p_+N*urWfB>825Yn z{3z~HnEKqn_!9WH!m>GP%3*;JBK12%M&wOWyEta-xCh^TP1fpk|G)3p z?rQ)p|4V=~h0%0Uc82jU$}Y;#36=f3VMrxsL&e*)$`0*-6W3#Y$qY@FDZtdyx2h{PMkLsVZ+BIrftfoLtkn$gThxHAhJ@^ucW@k@G z5QFBx5g$Os)hY;T=*2MoHK@2&|N7=P?YY7ay;Hqe1`74h!pbxBb8a(*a0jgYR^L>` z&yVYTAqLGcPqYEpaj(OUh$hMdx|=(?1|Uu)0CJ(jr^JtNt2cfh0aO8p{u+w(V#1|* z8(IaE2^UO$0!mL#RBzKy>szpFwy}&zCeZu_d^7{L-ma!CTW?qYHj4Wn^%L{}j7a1mhfj&0g2TZ(O8=a2^%#d<$;}2>b-r~{wD71!@!)gf?`x*e zwF#Ebjb%q9b@;cz)?dN8%hcaSFRS9&%5PxCjz8dd{o|4bb1f4C5Y?gOAma;>&MAjU zkHPWvFuM(=ziFP^X;m~KcbxhX=+UtP)?bC?FGqM_%2P1(QuFKj6QL$pd76GSWp8Ar zZtw{hd%O81p?cV>JC!%1R?G?-#<*GKLE4MT(!*5K4Ny(+yDj#7ZR&x(1Q+CO)bkQyy-!F@Ob3eArkdY0EA8>3G4)J;eY3 z4bMqLK~#DSzZ|AMubgHBf(UH>DQvu6KSZFVR&5$&8o~vK++u!Bs9x=UIb&zf7&gSz z0Mx=kKJ4_VfcaD>_fQyZu-Mu5Tcs#qhO1D`<#j8QL}2Z=jgzu_Q!*cBysdO+1`0bL zft9Czkzf;UR}QpQ=K~q2KUzH7T4j3Moz}C1KFE8G7Qay}edh9AN(p&C1DqwJPI(H- zFED912p@e(t?GM|J6>&tnw7%=XnF-!ou?c`z0rJ7xd2K}wAbH=AGY2BJMPkNufHNZ z)-`$4&G0MCot6Hru=Fse1@PL41V-;4`>%(k7K%8ICM3?k0u2@+MZ(kbL+jXJ*GAZE zu^k2~SZcxp`fWt~>W$Z6kZ92x%?D#|g(Kcmk);ELOdtGUt?In>R>$>!fk&(cKiDml zE!}qk24(vUsDB39J~Y3kc$Tt$J$5~&pCr+nVc%5IpL)n3toa7)dfd95DEZUi@Wn9p zHtXt#SrS8Yjd5CI`^T~D{B+T+-EHSWTLvJiJ9Z;+7=;yq_20ABy&3mg>7n#y)HJ|;Dk~TD= z=vb)yhjoe0-h>)q$K6o(AVjit#gm5SRmySRQR<7(QWML1tQ~jGIB|TtPLZ*`I0_t> zOFaJr;uc5U(ehyC$JRyB>h6P0Kh{52a)R2f6gKi+t&G4sLM@JCndf)6s2H4GkD4nZ zWJx39HZj+Kv+b*$G%af=K=W<@EUK0DqVyD)YUQPrucA5=LBOF1c+++fpR}RsRfhrzdVOOCRcq1SZ;9{6=w{IwWhoS0Qm8Cp7+E zXg-+nmfB@8!@m`l9j^l1^suw0h|>0vT11&` zvk4E3{x9{%&J@dvaJv$D>i9&3c64okt}U4zwmdLc&Yr-`sOG0#VoDyBwK-oxYVTop z8#PK^B^>dNxwIar$i@{X8}HhTy;Xe;>=0^#wU-))-$u!=QpQ#C6?^SECDaJbufb=( zu%!c<#UVn>6Lb7aoZc4G1o)RvMCxw&mU|QeXR-^SdKI#4<(>770^dku(W90ca2G+* z(bms&<*N0A5Iriw2J3=Qz4ALWzo8cFR*QD0xboC?Z}~-P-Jq8Yk|jpu-^AR2t$qLA z#H^oj%a!4Gh`28UEaDY<(e|MVWXrEKzph|9xJ#hfKnbDwH4vJLBe6ngFlesYVr#86 zU$h2xsD$g5B`W;dG&eN{T=^=7$+4nY76Te^d(QghnJJuQct?2joqKtx0KZ1@@l0&4 z{(8hMAR`xh7b36_e%HY}5@x(>t{E9+^G(VTWklKOFy$|n5`qWN{xNL0&Xy!Opu!@` z&xc{(vN!cIqiX|vXt5cP#SV+a+<=98t~v1=Ky5)eGW026V+4TRZG|8rENF z93vuJF#2aIIL@h;x4Tt^In>>!U*pOS!lSlS^QWpsbncdQO&j_@kH` zxGE71CC&ieC6}Q0Jp|KZYQTw?xA7&F^%ZV2zNY9HnDn?BfKG`7V9(!R*B>)ChxXuQ z4f%nYVkQZRN=&GVs;u#jM`J0Vm#b*a*k8dYgMhf+bghR^&sTpN;VM+&*2BI@%s*<| zQdRb6??Q8f%aRJ(ami!MR34m?a2a8_*mD6wEQsxH0posSU&b)h1Zyr75lL;fPg7J4@+gI1JSSgQLZD)E%!kAz5=+7spkVK?YtrglnQh%bA3$s(EM6rlD zfir|iyrf0aDk;c!$tC1l0`jPs8yWIdC17P&ysEoJIk)OTXb)_$_a%+Q3=tu##Y4w)hH3nR6z!l!&a!9f=nC02mQ-Bc&(8?#aSpveO z+@A%xDi9HOaAX4v^h*!iH^sd0*{P?ho-G*3;F3Z^>?#g4M!YGtgSNaH|D+!3@Zo*b@Xd9(?2U z1%71^w%!Tb?uh-F1B(tM=cMw@A0=%SmE~gJY=nFfaIn8=fOn*Fn#J-p03ZTQufv`v zRhUB}Wlda#D(NR@u=;}r``$OMo_Nq98e*=k0ye&H& z#@}sRXUq=WO|W-?@+H{K7RwSVbqIN)m=jE!S1_#x03d7gh9ko-fkTA}BV73^AE4rz z_$$Qww!#MLnMj)E~aCoblv zyGa$~Xj!bLF!8JzvOGtA;L=3J^v6R+7yv{S=X|$;{0WKdS6-#k0WCWtVNC*R4!`d` zXnhYlRw_qZU`Jw~G4PNee$5>Jeia7xUBI zsth4&48h$H+@%8Hg1eNoN+fWwO02hmyh6+k#+WOT95T)TAR0d;o&gdcCy;w6R9p|k zz7gBreWHl?RXqg%7TEn~*!d`q3qbcDmJ#7XQ61Qr?vC^(BMksRE+vmn?;ntSCn*oe zDTQH|D?`Ygkd#L_V%MW8lzZUuMXr2JY+ADnwA6dk7&CW?-=u59iY2_MZ=1q1sZ5#TX$0yl}{ z=vS3M`ketpk+r_LMC3g&3vtCu&R`Y%mOoVm!sS=0zhj*?ZU2o@x9ESY0PTBXZr8i% z?no^3TLXX|=h-mtcaZ#wR7{KP;2oj7&^bfYw8>Mh{_V;K*C17^z+D7rs%VCPTTijQ zgv#Bdg53yyNjUJBsHWe>i1cd%h$7#jgs|_&2zedxq+MpQLmNW=magDk;v^DSG$B0< z2m^@HQ_TA&;40!tz09IVC-4aFoc|Y3L5fUcKp8+3S(7^w5&0p4D@a7r&B4t+qhK@4IqlFVGx?9v`G}YkT#@e1 zq>_Wq0HUa`g7-u;c>z+K&B3=;2q1Y4@a1CbXA1s5etaJD~@HGp2o8r*2U@zD6-#?<}O44UyR(4hPbhNn?s1#0rq_A>?A*!P@>7o0Dp?2H+6602d=X zlZj|EK+Zri4VVCoBDG(N?ZA3q9f*&Kgg>G%v?}|CcShC#5`BWQ(E5Q8hL8#T Yf3q*G`zesE82|tP07*qoM6N<$f`ozZ%m4rY diff --git a/music_assistant/server/providers/snapcast/snapweb/config.js b/music_assistant/server/providers/snapcast/snapweb/config.js new file mode 100644 index 000000000..39bc3c0bf --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/config.js @@ -0,0 +1,5 @@ +"use strict"; +let config = { + baseUrl: (window.location.protocol === 'https:' ? 'wss://' : 'ws://') + window.location.host +}; +//# sourceMappingURL=config.js.map diff --git a/music_assistant/server/providers/snapcast/snapweb/favicon.ico b/music_assistant/server/providers/snapcast/snapweb/favicon.ico index 34cc0b66e951640a8714d2141a52442fcb0630b2..1ec3fa871ea0ea4d75faec287860709dcab27849 100644 GIT binary patch literal 9662 zcmd5>d30699iEq$cW*!-lnMcqg5p-hint?IR8VYPTd1wbQCqQc)S^}Yz@wE`rLD&* zQqVHm1_37iPo+o!w z{rYw>h4*aZJAT7&zb)70S3ByoA>9Ed4dqmn0m(`YOj7DRClI`th4*aZyVy5rrq8fz z96W#X*JWdqRQJA}R7#gLDDte}@LNVY_dYYxeSZ1u(5w$PJ8$nQcNdq}hn7_di@Ug@ z-dVJ}JTz;|X7_~^vz>dNotQNImQmt9jh?A)$IYWDaOzo-ksHax5)}EUg_1rAhrU<`vmsVA~Z+u*cF`mF!XPYtov2pt~ zT!V)MRcfyufv%~8LX%#8%$*-8bJKx&jYu%Vi}uKh>WemN`NdW(&lGD}P^M+o0WH&a zYw4P$1=yQQMpWZD>Y}fk-YD+;qB4y6c;KYeb5-|VJrw8qDzEFtr(n3W(2Wzugy!vt z7~Ek`Q@7vG(elsFwGKy_&v+DmBG8$a4E>!6+^++7T?}(sov-hyJGES$ucd#smOg8t z`>-~Cb(H>F$^hHICK%g&|DeF99><&m)S!!~w~k*|jp>Zer-xqMu!QrF*;8QIx?9wt6KE=2=KK|G@n8Vm&de&0Tt**G4 z7}|f`bf5q2WuwS#{oPk{-i3XMA=(Xo{1PzHN6LZ!@f}*aK)=19=bJv%vbbE!{`zMB zp?t5Fo*;h8nh}jcSK>~~SPTpU)Fs#YJS);ZIVQ~r;ltjczvnL@cIeJa1@`wVeC%rv zYN6j#ua9om5`pg7yQak(iEu zJ^M0fS#=3LHTPjR1Ka>z&}XKBM~IQwzY8BZcY~HJ+*8N2#r(ZmF3r=@9ddpTzI1-B zmcHvcp!;|kXb1Rh@^4>zjF{AKCKFrh*TRK<`xzIwp>a?A*j;(p=$$%#GUDURj$yy+ zV_=T?$wKht8S8z#bM|QY82YCV)kl4Q0!MXJ|9(Hl19&5J+e5dif#>`2JY`DjGUOBm zllq+2*LiPW#LW_q*oPqgY8teVUj_o_ZSeC3U}M{_5u^007fO8FXz=A1N3;~yXjuYZ z`%$4;&pM1hg!x0TJ$cEQUsROT^VCz+>kC_78zLq)oaCwRO^o>~`CW3r-}I63SeI@A zcIuTpKQiCGSXILmUDZb$b}tufdpSA%6KxozMEh=ON-s z#G3d_z8VkzyBK39zO&Dqn_NdInMjw+Ro^g_$|j71|Fd9 z{zSjT98Y5ouJz=T;FEJ7Megczk;N_&P;N>WcUkpj!@F@SssV*fc2 zL*g?rF^3>W5fAY%LwuZ+fS+@5{bMdtTC3%3*qCug8<6vuYdH&w3srJ*S4GVB%9dbg z^2|YQdVQ5yJL2%iV<8R}<_2T7_%@Dz-`c(HvuZ!Fi&R%vOSGY(1%BG%TC5lR{!PjW z8EJFcmoncEu7H0=-4!)8!3k3bs}IDF%ul|;7{@A{BhlB{M*YPXese0~ zCa2QJQ(j&!xw*O0SYLM(e)btn{{+t87i;+e)(+xd0w3c#c?2=H4r3%EC#Mf3KfT}% zqxzlToQQ7+XW{Nwj)nPH?>K)y*yMWXFTM~{0l1Xco;`bH!-fr#mzUQ9KgT`?zDYmX zSmkp8*Ks~`oh*VsmB61Ehy2$0TkcGQKOfj*e&j5x-U#10uI>}%px)`52QioNZRjw* z*3qc!-o0Dau3anZ*RO9AKVyM>Lw{%9`sY~el0Vb2kEq6aGYGO^e$RO`Qef~Cdknw3 zs_uXr?ihY@KJg!_sgXz|BE`kUO=a7*ZIY9dW3V3!Ki3Q9BZq*KI{!J=8{_w%Xqk(6 zsKdH*71o0g{rla0l`;GZ_<8FZ-M7Q{ThqUf-;)aXH}#yIoqbdxZd=;&AL4(j%wOBd zo!7w^83T+5=7XO0bKFqa^IYtyfw`N(4*jQGJ+8aq%`c0;qFmOkTi1luVvetmg?|q8 z+z6ap+qgzzaWvS;|CHr6a9%R-J1c4=bjgS`<2%GZ^4`>M1O9mZlLzQO#LnE;=pTGQ z{W~iTi92{yFN+_x2r(`oLxpz3(o)0uR))6xhwJ-C;9Bk_s1LK>fc}}o zt&Zm(>UeR5jo*MOjPd`<+T4!tC*zsi$MuyQbfDgADwPeM@qrrf5^+<8w(xWP*n@nK zGLVly0hd-_Jnk)aAlKRj{!jDy-*Xm~=96^PN5HoRvSs25=g#R;+pNMD)GDb6_5}KKRtHGa9WGeL^3A#(G`(d0G`CB|j?zPC%k8RgN ze;i!Mz4|Txv#?X@eo4a0idonQ_<=Z^~ayfTp?Ok^N!ud`| zOfiR=h}?A;e3E-F=H@(CxE=be0)E<=Yb4v4$5{-m)qKxAbatiRhn&;ecbuD?kc;n_ zdvb2H`Mxvzv)BO@&|B;jWSh@JSOdyw|k@askKP3Y$Ok_lNYc)^M?n{yrKC5Gu{H<- z#~rXC*Yr)m%stdR*pl|o!}FQYWjA2qo{;fCId(t}#>d6*H=bP)uf=qtHPAzb(PeOAkB1zr*&S9+;O98+joWc>e{weEuAKeLuK`^U!BsEA@Sh z?^xc$_r`BCJ1&EfnP)l64@FX*Pj}VAxVUWsj+=!(kE#L*xaoC6tqrXH>{*+U0e(f> zR>J>@llvrcc4y!u=idpN{S~}_>lSbxWIIv4Cw%X@tLwy_v+YuoFA%fE8jqj%nW6&X znN}xD-(h6H*$ZW$zpp`lLcHWOo@;KLn z&e8+p3Cdst#^YWYzKw7OwiS!^nD}nGJoK?A^C{%u<*BmhY-`& zhHc`+xUIZHK8dsA4-UUW=qlZ7{oE~47%Sh0l9cku9ECAvo3UedU_3CU?KycVVqj{q zmeUZ+eZZmI^G+%9&%C$>@vQ2E@yGP;t~xR|<%+QZ^=XW6EVe|pb@!a8Ch5kC{gk_wKY0g2NvhXZu0yt7=;v2Z8+h39iTgW~TU({}m4fgMBt zIMcyc;AMM-`2S>mLGWh~~|7qf@`y~o&ud_%jCdze$V zy3R7kWiEzqOv&>0rDV!jj?FpDTm%%GyG?8-^1|A1dGq>#^T>NJC(ca0swON(mqwq| zXww@ zo7qoHAM~})|CgFEVK4rEvl@0mf&cpFdU3UBi@nF0tL=4k4&2<@?mLlikT9A`9e(uX zbCpu5tiwtLSx@2mjhZ9lpUEHPin49_>6WdkCn55 s?T}NmhTK*UG6K^IRP%2fMzJnIch{m}-zA0)!+sYJr1VjFP)*&Kur|N3$J44aWGOj-fp z*;8-S>ksku_m2)1N4@0jY)p|>#-5@QPzieffs%K?_bvp7CJY0jIz^R0y zfKPEIo#)5~xMX9++7iw_SZ^+;AyVr0e z|DqKu6et+Y>-B0UP^rYnSpx8AAk@u_#m&_JF)DBvMP&j2{&Kmv35dH*OWB}h-#!f) zr6(T&Pch<`lyw`S0zd6FLiUA=7p@Q8z3jNntweKZzeCOA_B?1SF*cF04p?$CSEzcx zvj&81r%?{r@1a#$%LDMMzS`5xdi?Lx&#JtEc17X00000NkvXXu0mjfQ=X!@ diff --git a/music_assistant/server/providers/snapcast/snapweb/index.html b/music_assistant/server/providers/snapcast/snapweb/index.html index 703b6c14a..1342e1026 100644 --- a/music_assistant/server/providers/snapcast/snapweb/index.html +++ b/music_assistant/server/providers/snapcast/snapweb/index.html @@ -1,23 +1,24 @@ - - - - - - - - - - - - - Snapweb - - - - - - -

- - + + + + + + + + + + + + + Snapweb + + + + + + + +
+ + diff --git a/music_assistant/server/providers/snapcast/snapweb/launcher-icon.png b/music_assistant/server/providers/snapcast/snapweb/launcher-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8a005f120161fe7826f2eeb491952b6c594a7280 GIT binary patch literal 15275 zcmV;cJ5*AE;EeIj5_Ez?*4-d>bRmH;=Zz~2m&s+ z0D=Mv)<_o0w3lOJOV1=XbTV-@|**_ww$j z_eyM#1GGzhk_Orsd=~#4e1>Kqo^g1uYTMBrfSiGKj<2Dbnc7;-lsl-|q>DORx>(H) zT&ZRSu2Qq*YuIA{P5+Ml8~qvlEPe;SOW(t>ad<}Iy<)QK(jC|GXJ+`))H#7O)y%-v z6vY2hv&f4S#Gg`N|49FwPyfuJYZqPlbe*89lrDv?a=KKp%EjN6il50Bzmp^0<45+M z?7it{;Ir_V^s_CmOLt0mPttq21HAx`38(@Th-cGvD+OYIy1t^|Tus+L0btc`m1j9$ zVcts-pShY}1HG0ka*LWtI^!Bcu3MvMo-ueY+nwG35N-?wjP_PZ*yK&&K4KT~g zDL5&BgIG$YVP(mRqm>!@yX-yrdzV{(KCX?O7(>`KlXo(BuZo?~u+vk{T}Pdr zdKsr1@=Ur8SnTEiWf=oH2W~lAnX($wrG1Vt6zv);PK^WXJK($EJJIhJ?)!VMn&8ZG zI#8>UvznE9DcwN_(6xwyrq~2b9BkPF?6C%VWQGBwuri2Z{@v(z#CO#>*Jk&`d!3>* zr_$fSk(@2}rQpam0llKpj)VlfLxa%1L#Q#(?~LzG??K3^;L)Q~m*%kDE<5mhN((*{ zj->f6pKO2+ZxD(`mki%|AHNs$p6E|Sj~<;G(VWWMo;kC#LLApq74+ea!RS!WV)sbr zD|pePB&Ry+LSH>KOMZ~9l_tA=Fe&LxG-;BEFjcxYxK~;7L+UTS`W`h(GUvA9|B;{q z@U!K0hJ+K_`D!faZH&R>R9MIEp)TR(Im?O4^Tk8KpTSw=AC%KB^?)C_Aym#((|egk z{;t2ro_~;tyFT2;kQPe{P+YJX0%|=pGh!{1^fxl>)uF zsx0WFD$A}=mG$>iP`{@t2YynOV=GmqV3Vqx*r_Td2UVr4P*s#5U5d#nqd&VrRaW0Z z-#3tur-C>UwEJ4Z?lryVX3xTV#d+5cW(Dq~4`izW_%Yh?Dd^{Spga0MDcIjum4iQ1 zkniFkHU+nfbv#E^W;aR(YNXxgt+@BzX%J_wU-92F18wPX{B@qJ*FzbVw)X3(na5I$#0S+gsO`g(Pu!Ph1oOmUNNFP!Ax>Hz4>{up*xg@ z%xOyb`)?^nf1iWCcz=|^Zeak6FH9O|*>D=<;hA`pC{~n5>?(*$)0;gkHgtyqe?eze z+4Q)o9L}P=y(kW#*R5l#6Pp4#qea8D+<`ta=e?ppdCD>%R+Cpneb=Aem{XiRUr;{3 zThN<00zXLohhwW$WyQ4#>jb+x4YK5wMKe-=>rtX8QXXYi;68eDk88k3c(cm8eRe%n zS$U(X?E98doC8q=bs0CJvI6ce;JxAC9-2js>`S`FsmiXAoL(Umy5V6}S=8;6kyi+* z`0?VO<@-HKR7LPJS;K7k?Wpeh*$q@>?cX^dqs84%?4j?MsVaG6sI&Yse}6c%^G;9N zUA?NO0iILoEcu-Y8h!PQz#aIHPWLq`&y*(_v^!OxI+S0p_@k;EoI!WyBas6hzCqz; zZa`ZH(NpA4)OR?WC%M>STN)AU3{NjD|J;tj_&fWa|vg&$34?~HxO{*kBUbcIJ+{rTn2g$9{SyB&rbmi&boK}~avHSm{Z zu>P3Gs|5b}XHdE^nS;q`q6#X`)qmmY&ae@rvnj24OjQog4y7{DSnv;Om~*TdLBVuV zuys8132KfJXy7lLE_J6jVQ=K%r@Qj50;fm~4X45g@aNHK^1htUq)Tdq5mbuv&z3hw?C>JWviepEpj_t;F5~$Z*&7s+ zWvg!HMJ*-yu~mLTVY>c5H9AZR$2ds;%>Pl|vidX9`IOERXray{Q+*A~vjR&Z20!?E z?vu{x$nkaDShDKazvsF>Jp37Tu^T--igt2G8Sj5!nyTy^&K>p|CX=u;f&)Lu%V&S! zYkEow=ydHgYSAzJUBt8}yP>LVea%^j6J?0V+%lnAz*-)Gd;yb39IG18k!3E(<&+Fz zQ1}f0^G7*Tv~r>{rc9<-=5ziPT5)DCPJK*9cJ>d>AWS>nvg7_<2Zg)?Mz`#19Yz={Do zr$V?haJRnirn}@;3su?usl&pO6+F{w>EKcaIQJ>a!S_ZcbuQY*YX_hS3g=9F%dMPR zJ^GWZ=6)eRbV@kI6%n5d=^_gHBbvC)wX6Z)FFO%FrhYh^@4{x`O*qa-UV-kgE)6am zRyf2=9zki%qOSa!JkZ9%9|*!9I5>qIUHQ5H@}xEb&5_9+=c`A**s_RtKWNXEfzCh* zBVqb`i>T3tM^&Y8n@fsA4Q21w)QP^iYEoxVF_c@*ZR0t<4#J}))F0UO9a%M@zps&& zElx&_Pc24$GAn9$U4p+pcX-2be(-Q~Y=At$?0w*X?w#PS#`i=XHz+u;+3D_1D>&WI z6aD%UPtc*~4}6l+DC80FAsjigsXVH)xCaM3GR%ks*%}+YmVMvx zrdl4@ZT$gCh1AubNqv|RIGC21NYtm+p`TJ)(=V|@+x=Z-coDY`7w5;ngOi)>&@dpB zC1NLcy6Z#g5H4S!zeXrI5oyYw>sb=ik)VoR@=dBg*46lM6Y*=I3}xV>o`UNhDB6594yIKQdWs z{^kMQL4E*KXww(|Z*=*AS_vQZDajzW>4wQUkM~2^#E@E?ZEreDltH!( zIWpUcQ^R+VfOu~I)T-qT^rsgZZ+RehGQU7Q@B>j-j*{+9=%|oJefCXGYfeGG(KYpf zq!~`5Eng3Ehu4hrgHuCd;HU;*KQ*EO^aiJgcf{A+Mhzt+x@}W-4Ntx%Sk)XA+V(Zs zJZWHRn}nr8qWwkfvRU#wuDdv3=Z4PSj#A*?5ScNH_5l2lAB4*lz<{91LDtp|`~W^q z22^cTb;k$aFFC-e*3qTZ@CJJcv#4auL9PVj!2NGkQVP}j_)javTN#t8eWt!hLbn246jLP;*R&6RbBzq zaANJs93f9ePya~d&6o#}H%?X7-R14@G0Y9DA4_IXtogP4K%#K}+C{&RzqodM!Q}x= zyBc03kC?V6HIz1Oem=a46AtmV!Pel%pbJ!eA>-?+kUq$-4S9wQkMM~wo)9kP4)LCe zL|rgc`WG-)?HOVrS*!i7B1 zNY*S`f)>O8Aa+!5aMiF`b{P20lWDY2B@xqr?2mZ!KxhfaKM^KZo^io$5A)Epm$C0(KJ?Lx57)W(cA#L|B zoDsq94;g`7gIXlJKuwGh6C|XNj0zWlL4k_Z&a&tN%G>8S-}R3!Qo>Zj7|N*Ja!n zi0dgJGI6z!Pmdt-g9cM547UOvT9=r0Zvc30a|J<8Q%q&i0iM`8zQ$Rm_Q(=m1K>y) zmq?M4R6b{H`#Zd94SK0W3dur8W$9lXQkCUbyNU?y{FbPhA279O?YL!!b#Z@x*(`ag z>&Opi44hjl@S$&yS#pZWn(e5{5+2Sp1^*R16YHeL7jg(0l zNF&}w=i94%u`xP~ssVGyrpfB6QPNC`MH08XfX4mzP4-`=4W@QIo^-`^Ch>a;{{558 zb@Dm)*h`Kv+Y6B)v(G{qBnxwfp*=WVHvV4(jd2rT;Z#Mq*EA|r4(n#A4OE-tL@4Fo0fG&rWVfag0szk z9!I)emUr_r=1wYxT00qq1Ovjnuw-;}kxbk<)P92i9ZCp4CcvxZ?2?xd9y%;P1@;b2 zk<~>b$rxZV=6-<2{nw02Z9^?^yWsx8$RA!k?ihuumCb#|Vj4T$N%l`M=jzyP4*n7z z{Lt(q(R|*@;oOdNN1YyiQa!5N62_lN6{=sG>tz!&orOfvPiVt{7R=o3q#&hIq$ zrH)lxxSVrp|7^eX!3yT>C z%y)l`EDbl69b-(BF49w1Ro30YP|L=g&n9v~MVE7AWkY^(5?iR0w#Fd@A8sJ%VWAY`ppglqpfJi#p#lrv)sk8Fa z_Iw?xox(1DWL3|MAYmL$!ox9)Scn}{W<;VeW@>%T3aUL{+U&9eq$PH zYhk{PI(0<8eWM%HtCKsfyxo z(-SKZvD#I%xDhH>Bjb@dWma2R9?5SP@K*149a@n+>K?5=4?;(L_SIopp zSRHkjE{8xa<8AT^uo^XioJN0;ZZ4TA|4`-Ff4u1sdUD#8LMG~hd;>-FVdzasNr{@9 zo2xEavLpebKsVZlWq*C%BvaqR-l^a6vg4!}qCtyCGHFC=)M$`Kf0hgloT-RTZ%JbS zNm=?wfx4;}uQ3i2<1Z{MRC982)CCI`sEZdbj;#T(`2IEA*#+G(Q*JWe(r78Dey zYuBz-=g*(dR!j{5dMb$OG%AK#4#+P;s^TDV>1!=n2c>~=heVM6WfKkB;jCar^b_4a zfvA&SmF{KHpsH$vpswrBPXJOdJuo<-!=FiCEJ7W`t%JDF62{rh&(BwvE?rsy{+Jp7 z{HY@r^eVSsXq0AtdvSVMTnk#*7!3!ff~7tv$c@TjI22vvGT)Pj0kgnvl@y|y@QtoO z@k}`*p~Iiaydd|6;4e%=V1R%B{{11~kEsD5!DSVGMNRj-GeS=RyAFLwmZ24n@pJ5I zM9`ot%yk9@4MOXb#UrHo6ti`K-TqaPMhO1z&wNMj;PL-hg*n>_SwQ$0|IVE|8PJX3 zkEsEmp_g6P4znh|@D(i8sdPtQd0pu5FzRGcqm9mb4gwj#CbGh7$B?|i_e4#KFtLMtZhv*}|M%Gw{dM0N|wBP1b>o-AIFA)cH0Y zKhPW1_&aD8T(r|Vk!B{RFb{{STfZX8S1*y7ZSp z0pgeZmv!=`7iY+GYLo#0EbH#zN=B!>gQC0;=~=aEl_T)S+yKzd#I7bA?{C!aBhpiH z(5CkL;n2@Pw?E4q!Wt8Y+uQ)qF=D|mvh>{6Y{*{327ujP`trHdHuQ~amII99dL(VC z0r-gY96EGJUA}y|WAMk^0I)VaX(SZ@*$JDoQovm7hc+i^l{!#Gkf^of+~Sw0{FN4VB!{e1!Yr@Ujr$#F+DCIWS0{cZC;KvpyeSz)8z9|^I2-@DTiSww=65&mv~ zbU!fs&SOj)R4Wn#2<)9CKjwPYSJE56t#JiE)SThMoYigsaB|_i+jes>jIKh-sZ~~( zg*I;tZS1w|)=@$X%1}gtCcny*p@E1D;L+=SGE{Z>Kgw?>y#7B)4FHtq=+UF< zx^?R!27deuKu|-wj(%u-Wh~)@hRAA2A(K)V3u_*-mVcv}ZkU!SL7gOG+MCiRz_7rw zI|Jy^gZThy$ET4mYg`7{#sKp2^3>I2*To8y z>V!5;vl=vxg8TVrIx&FY(Vt{B`vd<}U|3+;xdHU<&GbL`rMf46k$++Q-#Y==+O}<5 zQ~(?86&C}*D*V-2;(&5f!6h90qQmx2VF0|THNx4K}M zw5EA;Uo&9YRVY*#fc(-uzLupkjRDjWaZ`DCKlv>BM%z6D@C@Ljllq{wJQ^jOW-|dw z4p^%^%?4vw)gQn)Mz+|20l*hnHHz%++gs`eEW2@pH3JAtc!hKc&XV_e2H+XM$$N9N zHAO*(ZL$VS98Wl2Vc0$e<`qxVJ?mh;Dbkb2z25rQV;q@ z`JMrI22goG;ePA(=Ena1EW2w{+;7I|_kLyl^P8Uzp9>J#;Pqq4(E)w@J%Qzj3}D8a z(r@S+72wT01Mm!h>-MkU+8?XQoNT0&zS^y&svOR?zP6QrG6|iIw#f$fcWeNg#*?Bq zAM{`C+5p54*O~D)(*d3E48SvhlU=DV;!SU@48T|$fZTzdgn|u2GTJOenH zsOn_i1-ilj43g#9P3?0B=yq-V3{3j8%N{#7fYLV~tYiR=>H=yD3Y0cwu>W!j{vyu+ zJOgkfa6<;yICB9r-!K&0QsQht#>*%q!1V8A_cr;?fSR?h%D1E@6A!b+|T-@t5=CHi}sI?V;4Q6ntNuxU`t z9CIdxSn(;@^{;EB9U|BLojVP;{|G7EV#L~n>H z8Gi@5f2+cHv#_a&0hDCO>cU|p_v-Gxvw`KFd{cL309r8&T}=yTkVT#Wcm`0h?4~=K z4Yorob*rXY$4y$Dpe)i#YJs8~RHZqPLl^xltFu3pR#ObO0+!D`m+9MF833GyCP%07 zf*8*LJOg0s*a~<2eEt3QCk8UbMyJ_o#4Vg}GoQiO8;BYJn&i%Wj}^o;1(pS-9T@Tqp^-3Kh8QqEL*lLISc?r?^bjMe17%K?vh%0V?t|u zQ9oeS8>k>xRTiG-$N=(xl+_c}4NDU55`JuCfut z#Q^Nu9YP;uHhX#h6l;fe%fQf|U-MV%fq-aMh7-a;QT*OXMEzz!$|zu1VA+)cr2O-G zR!iAv-Dutz*K3Os+l4-$Yu2nu-nJ-+^&{(R>=F&0Z`D)OOa`&}dFz53%oTRlAh&$S zH$)xtKh_|(QSYmL^~IbE=LXQbCp$J8&K*MjDGZ?IG{(XhpD^>eVzDsuYr}>O5%mX( zPh+eM`^hgxaKZt$8utX6W1Jd^HY#wWtv+Mt5XX(NHh)RVKlrco2r%61GIj#EGk|Nl zvM5l4QUCM*E;x(N2Cgx!5tm+W9f^qX(xyJTHG%;U4 z-Me?M^f0(y%%VL!huEuq*w9T;xc z&Uq57!T_|sK=jY%c@yPNya9PpK4GA03^NfD3$4td$ba`lJX#CE;Nj47f@KB#2 z)BxZBmv5Uu)KO27!N9J-u;kVN^tpg0-wjCVrB#M`L$aehh6$lS&>{yBB0D39nE_x* zyWKb^j5h^%joDmGc(?i;$SJZ?Lqn#=)>xl1=ttzh0meqXb_^+f`Rw7* z0ZIwcKE$duxGqczJ<`I33ln2d_I#5;*>*kt;TRiRr!dLH8`c{DitxkJAIAT=1cGUR z+5)>RTe1jHN+bpV&LoRLV=Xp~CxbmdAjS(}K)VSkHeu4382~0TTD2-<;y05S!B$1{ z+K>yg9{*?*1Deu@3P+UEvex1ygtKOim(Ey7XzYB^@~ z$b}mpwI<pl}le_Vl;oU zr+cVDb}oQZhd##Q|1B@*zzSgkkvPCcN0@YL$09+e4Y=3elO8ks6P^aanM8|iO^5~V znm?C^8c; zdI76lPG`O=iPQnE> z#Bx@SEOm;PTx>o(qsT`5h77dB@aLf^vO488GM{3!J+LY;8!`W{@W$U<6%)XI1m&RDpSG)8bb4+%Pm5XId9;2fK(XDN{Peoc4j^w8q>UthA$ zdmz%}pa5RbpYq%G@c*9|E*0;8QfAS=NktsmK(V#l#o#AT^jrG*Q(xY%X;#MUF{%E$lAUd+-Qj^`NtNkgU8NvE{ zLyzWU3X>wK#DsLg#4rE=9fdJ41dK;T&6iE%?JE1 z0GsEw^PMJI`uL-<`&SBwwiYz#%JY2}P^V)<+?wX*K4Z-UagO%rzXyIESBPHlWGL4%f!ls*)vKx77hhDcBaZhei?k!MB2Ba4cE^n|xOE=%|{arzFdQ9{-?C!8*D*ButQ^jrDv1t^1qV>|l%bC%=A4)X~qRj0GkIHq)a? ze?n+bdp>!)4RwaEJ337|5)loW-GuJkKj^?oclW|AsCR)*&HVBSJ$JVUv^qHSOBRxP*0e2zM^$*$u5J`{_*{sYR z)%{b$P#J0}2?voXZTDX}N>&Hl z7m0@<#JatX%ti2fe;1KtlhQ=1wq88_(1qX z*M^79jQ}?r-58j9(V@Z;ktWb0R4+M*Qh3X*!t6r&Y#yPT)N?#xW_H?J=zd@X%RiCJ zU+&|78rVCtC2M|FKbFp~l{1_sEDslO_L|Z1EL7y+6mS#~0*H1Ew+9`LOEX@GqjFuJ z@G*WgoTyAwha-SnNy5b+IIN??TAHY(Q21L{Cwv} zjw-Jz`3G>64`*?$3#Owx5pH=a;#Dp*{|knZk|%Dj{Qxl6vJqn-4Pue`bsQ3f1qK4X zcJKujjv(J6HLXqQbCk-@xjTGhC-(^pKHpe0u?+)QM1C-R+{y^>-nb65-*8=U66A4r z$PFM+Ll(g&YqaW_$i;DuFP zQ=f{NU*zCzSEbwvtQmHHe>}l&42iN?Vy8Fvok{=fH1&1q-GfsIE0{sA7Drzc*g~><+lOo!*MD@Ws%#w`IvCDd zwvI2bw01O6Km0H2_tU9OGbVd(BCto|z5AQ_0`(g=W_f}34bpt)uN@^VFPPy{B7rPn zNf;gu`SXI#)`cQFhdTo$0J(L5wGn9jc~IqabV-!^|Ce#+->j{Ow@f7uEa^3ntgBzg zhoRT)8*#=_zdE?T*(spS6mG1Y0&hH!(r3rFq?Bcdol+r0YBoL^Uc!82KCeEq;_?u` zg^Lbpxdu!mN5Q$JR)(H7vzv0&DjeQ$4!7e|p@8??^gte#`XI76ZwM*vcYAF#yXqt` z*4PmFsTKnW$qS$wzkYpoJe@t`Eon6Rw7?f|duRodPOyv)zmad)uH8pL|5GWDSbkn=fFKkg?@0H*5I^K}5m;vM&Q z8WBP!u2I8=EH7|Y%O<|=D@RFdA(L>N8_@dsKq?)MMxZS>)P+{32_y`5Gp)=9Fkm{Q zlgcTaK&Umq)WWg|P6ZebJ9#{y+r|9%Ok{&DHl5bkcQG*4paE-m+elz7ZgGF7rvMRp zjApHyGE43J$~`H4wtPiSKqlcTDumcP^gy;*T44m1gOgJ^$Ut43W_ux_K=~lrdxuTU z2e{}Cxs059>B;a7mv>-bgze`Axfn26J5$7o`V{>vtFu2O#eI9%eh^rqm^w?;q-&a= zgxLKqCPb1@-ZiV9_nYY)ZMF5^bOkcHuUc&T1j= zX#-7CRb&rH*e&cVD4UlD2uFP=Yf!&@kx8A;2Zkt?+9i_X>%<{O3zg8uAdBx8x|BWS^E?GIy-1{)Ni)0^74T!g z-PG6R-G96=bP$IKztQ=yjB8SaE*?DYrb2R4o;Mc{U>J4qlO?<6~m zpFu-hyQWu2LLo|oTG>cq_~>=B=L;^K@Df^4<^9MVWq(LcJo8Wa31CKGr=@}V)b=It zD})N6TBmV3tJ*nl+zaySINn(8fLkMgj@-d8ITk{NY&l#HP!zzULd=y2&LqnVCmRJg z$S%VnPS#S&Y6d@YMvF(t>e~-X9{?)?Gp&<>`q)t+78QbUi4gXMy8Q4e8NYo3QOjnz z>@5m91PL;mBpwVOW<(=dG}N-w?jvWQ$sVejG%ren*;#Sx(dl z6vuj@iei{+?0ZTYd(uO$94@xc3S|0(*CR!;V2tQ?01Xn}AE8@FHkSY1bBIO6XTw;i zJf*o58{JG2UV%i6`naJ&NLrv*d&?&2+#l%BO1gw{y=6#rxNox_;JYfDSykqYrXUQ; z+HItUiR(Aw*wJ0h_4!odX%PuDT4ggmsJvgr9Z-y0zy^-ioEF zvIk2U#?~53hXDQ^-w<`;0J7zG7o=PdOtfgs7=p(8t5xY4D}R8MP@dL^m9w39$2H{U zg~P~BgubW|l(~J|Bqi^6;tyyo*4wse?mG_-&waf}@A<<>Uc^R#1QkM(cC%^C!ll^V znUh@C*@-i!Dc1m@HxV3cBbe6V#h zfssHmggo6+AuT^pUnDl#X-07W&E)U%hLF6y5z!${I&lRTr-f^QSjkD=t}5H#Qk4Z~ zxoaPe%r25@>+ay{RXDhaBEjEq{P{xFT7w*6&>pt)50>}!xk0*92mW?Cr&k~EujM;M zUV5ikOOoLWpV7P_H-dYwC%0k7D|UynnbZg(8NY-Am#u@`mo(z%(Hxfz(Tk*yW`O4v z;5TgQ$HSmdv>sW^eF!6U!p?u-M;jsEDOuGOMEHC1AURLl`Ngw8LtsHmc1foi`0XM? z5ICJ7c7d*c>q&0Te4lK>jVhh#Mm(pdMClxeNKm<=C}ms(2Wo`sG&JOm_<^T!XB({* zkplqF#~=@k1V!6Ns7=wxwr24Cax_W62-EKdl3#E7E#v%MTQ~D{72t1iDnxv$6dtAP zOmRcHUf#uj^|UvnWeAUz%w$QD$mS0q>4Z+nPCLLEWzpdI7}JxiQza85!;4J}MJ->v zNLF2XuKzkb<5ta>$n8u+xRadf;5Q48rilUvW(4#|?80x5|I*2W{Ik}NB`UN-j$1BT z^&WzvGtvkSxIHAy&=@T`-|GtJLf8h$%Zg8Bb@a2+oR-b}m*LqqYsfY_4g8G+25JoW z&5CIBMo{4sNRrfj+;h?wt3M+uRHRih0#?_18>dCCl%R%$8npdLlA+}y+WVp7w5RE_>gDeB55atiS*@j>*35#s>yFRr1OFx#?G0#f#uk4m`1D;va2EJ}W1>9B_ z>eQk=9{6pHKueaf4imz0>Pm0w1w$W~ht3~L3YnS|q0(p!>qa&hZMt`lj<8TB3f<$- zMlmk4e51STV^SlMTQlDyg>OG1jTC%eb9T=X&#<|8rZpne8LebleW43M56BJ;(|Cjk zM)1Hb(mhiLleK7`m68LoITftx3Ffs)rd_|RknZ}> z@lSY}|?t;CCUL2nbOWdO)&qOq5HWi`I+amZ_=I#UDQ{ zjhR1$6hT#pilXxDC=TsLW#BwFufkxT(oXPJ@BzLk%v?53TG0uU5Yl88sIgo8t7wL(CUr<-Xl1~#6h7N@I&ZS521>!X5e*ewVzrX4) zWiA{}N+GOch7gkz!Q}vJz^*3MMLpyJiZ?XN~DEK^`}9{hH1X8X=%Q0njt)So80%Cm&w9~!$=v% z>p)keH-w-kTL=L@f(ZyJETH#n{EK8!-`?`$8t`#%agPPp*YEoEb%HjJ^28}rsy_`h z-=IC+na&0;O-o}&fK#Cd4B^WcrP*_bkP{onRfJB<_4FuMQ$f#T`Q->{Lb5#PBXVNw z^U@pv{2m(J!9B&j#XZ(>ef_TQg*dD6Gyv~xETRu>1uZ%UkqON|z%F**P13!eJwtxT zc$XYpGn%Lm3S}H$yii2J;7(OCr>&6iEmv_jakDnq_{=?(>-F49&(4BJx-DxZC zabt1MyY^Uo6ZvX!{ET7<_K-t@p< z&8LBp7B$oP2h0#~j5lb&9xyY6hUxyxp8h*|YV`lew4dLW^U#tT{8xlgD`MZtVi0D# zyvi5ze^73Ud28t^rq-^_&Wc)NarMv90C!=>x|gVx%K zKo|27n$-7o7tS&>hMwokHxBqW8A$o>OwAbJIOqQ;GnxbtX}hS=AcEBhcH<5&K+paj zntViZ0Qz6vk@G%(PMZ1h-DJ>}UFBZ7-M$;{1@4KDcka`6{MI_)r;B?^ya-S7&?2KD zXeUBj!Dl^{=;7?*hXet~z#IK=Q=?Et;4fLo^s4=uV&EFF#|F<5NJ{tR+lmSr9`A9kj zSvI03DAa-ffbu^Z!1ySJqVbZawuan%d zFGv}0J|qpfx0m!_+td74Y2QNwJ^zjsG^eAu2d9gB($oX~sc#5%MclfvNZ@Gnh@A=m zMw*~VO}W3IH;5jssX^TNN2w2X)nSiIUwrYBls)A&vN7uea&XZwQUoxfCjN|ZB znHdNi&*BVDr_4?R{6ByVLjqq1eF6Q#WF4G5FgBb*OGlET><`I73igfoY+M7b<&LYR zyK!xhh3M%Gz5~9C0R1_--Cm36pGT`lprJ*DGk#DgZe?O2cqBLqPc4x}Nw`YGS@0#+O)eYCGqc>+8K;Oo&+iT%W&AIh}Ujqyw#o|@JADiB-5Oc!_9-6lYhKhye=5i( z#?VwygjRwl>kWdP5THz`dxcB@AZ*dZcVU|r(uDwKeYz7H48+yK@78C#xpV>E6Ynj6 z&T4H1kJom1J>X9l*L<4z4o1++hTYza>UgI@#i^h-hBQGD8VH`O8AMA#CEAKud3!-I zItnm$7QjSd|9Qed&S#FcwyTf#`e&%^gtT7p6&!OTiU;;>wYgy2l7<$8D?NN1H1=%?-e(rFdBwt9FopRh|XBdmi}k-zw5UE xx(9aem2d`OWgN9FjKvJpwQWG|0X~Ya{|BHBX - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/music_assistant/server/providers/snapcast/snapweb/manifest.json b/music_assistant/server/providers/snapcast/snapweb/manifest.json new file mode 100644 index 000000000..df145ff0a --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/manifest.json @@ -0,0 +1,16 @@ +{ + "short_name": "Snapweb", + "name": "Snapcast WebApp", + "icons": [ + { + "src": "launcher-icon.png", + "sizes": "192x192", + "type": "image/png" + } + ], + "start_url": "/index.html", + "display": "standalone", + "categories": ["music"], + "description": "Snapcast web client", + "theme_color": "#455A64" +} diff --git a/music_assistant/server/providers/snapcast/snapweb/manifest.webmanifest b/music_assistant/server/providers/snapcast/snapweb/manifest.webmanifest deleted file mode 100644 index 027ccb6a0..000000000 --- a/music_assistant/server/providers/snapcast/snapweb/manifest.webmanifest +++ /dev/null @@ -1 +0,0 @@ -{"name":"Snapweb - Snapcast web client","short_name":"Snapweb","start_url":"./","display":"standalone","background_color":"#ffffff","lang":"en","scope":"./","theme_color":"#ffffff","icons":[{"src":"pwa-64x64.png","sizes":"64x64","type":"image/png"},{"src":"pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"maskable-icon-512x512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}]} diff --git a/music_assistant/server/providers/snapcast/snapweb/maskable-icon-512x512.png b/music_assistant/server/providers/snapcast/snapweb/maskable-icon-512x512.png deleted file mode 100644 index e14502a11338cfad5b57bec862320ac2f836f0e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13747 zcmeIZWmlBn8}~hcgtQNoCEX?6EiD}~2uQ;a0)o=rA>HXn4&5+>bV)Zz4LQtp z{{Cy-5ARoST@Pll)&R$xv-eT^_u)$9~=UOQRo z17Lw%@m(>v`&zL5J1TkBBL6pg2vCytFeg=zGV9tDNLTqb1uIW`82S#Btld$BR+@Cq zNg!2}1a<(i75S@RXtHh_|6lT_Zp(B*=VkGP40k&yT8AenvppA{ZB*$YuHxY9jHC;*u3_5Y2vDF>D5`p)GLcc3X2WD;Gm_ST1pe3QQIn_o>{OA+zqO* zq0tx7Ia(vrSLPBcCtQe@7TsbVt~NKs3I6r;>sIpzhBqk81wk5GH!qW+H{$5FfwaRK zZhlN`(o{hU))v&x?b0a?){A@{SxBWG`Z(Q5eCy87#EXus8SQf z5i|5uuu~Oiy_MxEywEyzSm*;W|E8Sfb&bU|zqXu5+jDyKGb`kG~4ljrxq zgESO-JJl$IFJ2aF1`7XBGV$?%Be?d+KJCFW?Vmc1^~7oCy1uu~GkoZ8@r28#g2HjhaBPE8E_;}pprziO9jv+WoU<$&&vnR4}^BOaH*%??b@n3e%+ip-V;PigOpdJqu8Q zR*JWFQ5oMY5kySHGruQ6G#WjewFhE*{%@~xvvmlks}tBGEi4Ztyb3WE>BD9rgR7fe zv}O0sO|Yp~d5;~V{_hX9sDd_&AQ)|*Q!b~}${18{g+_l%-x(Kncj}kDo4%_xIc{!8 zj%%D3cS=LT3c_4sdnw+524wH8co%r4(ih>JA8_2kp;NCCQI(T#?R{Qk1QH#iUT;Qm z-YAVfG5p8!Ms)l*-a7}&qNPdVNrfZ_UqKlOTR5e8{A*4n@!jvk1&94>G8duynQ>^8 z?k=ylbUXhFfNQQ)!lYghwvm=g{6#2=sbO$ud!k4LOc+(fwTm{gxvyF3zjl`mGQ2}R z^IXnou~o_^DZ|y_R(RZkr%V~HQw?V0bUh$r!6+!l1KoT^#_4q-X!Mp*wR!Y7*gFMy zmZLVc^52CA`n+i@1_9I6-Jeevfv5kC=ee9<@+DnL5kZ(rht?M%Geq)6jQi{}!AX#f z!v2hf30fMGwzRz)u#$jfA>w>1;(V`vAW>6GcMy2^&~>B8a&!~?_1r$T0sbb91yhnG z3*QE;Vp`Qo3swB$M7CC$Sx6MA%u3LyyM*9;+L?qicnn8d^VEO+nir?_G*10RjQ6sCvPR3T{(~QK2^0@z?91Y)N&~8%(^y7?YV>LiHGB*~=>P zRNlMD!CbUNN%TYs5GJE!yQ(f{==S^D<}}|TAaUUXpSo~0Ee?OsW&lTVeB%`6 zICH6j9O?YwEn(uw$8S|Yv7)4qW0U;m7)^4 zcS8ob%CMlLxy<{up$aTF@11^6RHBYfug4-qp{DIi0uLZOuBdB~O9Z*J?RV!~iM&$=LsH>aBq*ZLI7) zsUNP`UTnP6a70tBoaS__%w0f+Zqj| z;$j%*Z=>B#Bb6PY*JWF3kEI-$+D|7zs(-3QZ6IJ?bjCE4Q<_K4t*|VCw#tO(f}&Iu z(`cJCE-{nUZ+SKY!8H~rl&xW`Rd&|(zserD=ljgeuS8Wsh&-qns)A{uBhGHI-K-rg zoYVF}=pTjBIR5)>gy(fl-c^m#BUo>fEsf}VZXB)H@HecyvUtyhdK(HEPg{t_>`J<$ z5Am%3pN=g3?FDV>iL;)6IE_fsU&~30o$Ive-T3yh2S>j0-Xk>3OKmx5*$<%k$L><8!Ha>3YUQzGu3HGQ>vwp4LOd|=8@dJ zEI$8mveXi6GzOl@cD3Uuk+O>H24|stiY-39NX8-Wwp6iUHfs+vL+gK@oZ%bOLzH&* z`r@C{-K)y>tl#UYd)*E}JCa>@?4wcqU!5%auefguE-6@#y-5}yvsX_wUrw<|V&I{6 z5Q@ABfQ_ktPKMV?ySu40gx~1}{oc>rW~t&B>b?I=5*RN%@14v6t|MiOmjSwi7ZJET zT1Lu^Cpu+ic|S*I)+(+rtR_G-PKC5)W_xWqM(UI_=LJS*!NH$u9}Hi(#2^D1m_$X( zCF~!Op{*8I*rRNm2H9N5_uc$ExnRdaT3@q7g{K(C)@5qf>^uB;dXC#O-Ig`XF!3p? zOLFhZsx{SWwaqO0jIcF(qDrv=kq4a4Hc?VM*!Zr+%YuFq5|R*!ZlcW+$Py8$1WM=+Wz~!p$~jg-(-|WI$Xvvf)ENzKn$4(Qqxv zMOco^d1Nk2T;jUcAO`+kO=sttdqI!78mE!BR}XW6J&!`T)98h zzzLCVC4X1MFyVyzSFt;J*Sig2cs=Mo`^k!U~*q8*bcbd zWPP~_i?ZyZ*P#duCZ_o(Zr2Jb=$ZH@x*+^fFu$PRK)u-{o<*mm?!xFcUC^}Tz_Nut z@{M!zGxu-lnyBo}B~tj$r&QPbayZ|yerH9dbcz)yUobFlByU>L3gL zwc-RfYlcAVW=eAbCkwtsc2TkSA|GM&97*-Y@_5IRPBkY*wGS`$F*a;4-7U@_>))DO z2Z4nX@LA1J<(WIP<{eKLU`N|nc%%g$H3))H3y$`Qe8WC=-3N19M3^?aeJ`>Pe$L2U zcS1U)`6fl`EzRX_Z#6nqAO^d7f*H(A-&2gkhe|m%@S;g7=29aa<#gSj{4K}eIF?nk z|MrK=5-cBF)!;7P2}ApRG0?jrZ27U&QloG0#S;9(Bl;4|Dd1!)HbXCR)h9Elsh)Qi z`{~hs^zhMHi-w^=?pahhQFmAD;Ll(~<{U<~EMC)*P}}=*yOnPZka4Z~fRfOQwys<> zp+yX}&oZx{RS^w6uG2~;wbzYZca`H=%!Hk_Hj|D1LLGJJo%w~TwqiL-xCo55ZzGS% z)$Q7Y#6AEAkNcz`|&>zzHiOW&fI=zCT`g$svlw0 zyA$jzb|MwEn<(~{^00@`6v<2eJx{dQnH%k37hwt``9P=W{9}PR?$wO9<69n4iKLUe z2-c|^zqC6aBOYRSBiA5rncUoUwC9LVF-%pwH`gGj6|#-M$y;#Lx}-Bk(O*`6Lz=DX z?&H|in+u8HS4iw3|KTMMZh)u%jWADYEhJl&>@n<1?E$?>R(9(414WSdNP?3`5*w|? z&?k3}DxxmWim*v(R%eSTdsY!PgZQdgAv#-qpq*6735oJ*5l`q1V^R4&y&=1Sl5x6a z_h`3A`RGWVI@7e*WUBr4{((ZTgyv9v~Ko1s}YDo5Y+l<={HV^Y{(?}7by6&BtOOPj3z3!zDmnud$| zG&njp`WWQ1AMw4DkJPYhyDp20jwdSXcf<5HOGd!S_)?*IUaFcH2Dv!yIvZ3WAus51 zuk?=L9!WZyi-t!Rm&04vC~51OOdhld7pB&qrmuvY`6j{8fw+3Hc#L?HV0FG+gItT$ z7`Dz_gaZ}zhwQ78cWM7TZ%I{vL)d_kMALNMx#rAm+@{6Ah-T<%#>_oCsNGd`{>tRx z8rw^;?n%ufGtpNI1SfC~w?2*qFPxpNas796{*E-84mkIs(cmU3AO9lotJn`%`J(zu zmcih?T0vWx%tvd}WMN)V1y_=IhuL$skUL2c_KRdC^v?*yiOmcNqlh!Y{^y-+WVA!g zETq>QcEI!av~zsd^7q)W7892UeoZbKEoudI)s6(?la=*Us zp@08lT9i)Zb>!(|k=h0OmT*C0WPZHB{{05&<5MZFPj~c-1U2o{X2Now*=@d2ss)Xb zCy2qRpS5)4lCM?d@sF3A6RWGAzxC88`h}80iDZVNYd_&niTAYk8GQ6B=Th~y2Q~Wm zFZ_}4e;!0v`DG5OjG*z7I9_RQ-)8CB7+{37Os>Z(evPIUthb67bLTaXFD!><4>uI; zm~%vXE##U9JoqFYeT6%t0IleZ`C)7F%f6eg;r z*wlVM3s=7fs}P@AgU`pYOB&%{owAO-PS%)a68t;q(bAk3*!joNxi@_sc){~yF0QU| zdKLQ3eoNHV!5AHw-*dmp$M%fYeBe@uB?Nn-jbkJzC1*3R270x69P3d*0iv< z|29)$FggPFiY1IAFjE6W zH`5P{PjAf_S5KZ!U9@;r6cm2wE33aMx6f}_!HC4!Qhe$sOG``ZJYO3;If?(+>im#> zX&>puZ|qqq#`U8qsCirZzM}CQI^bftaNCBw8IBQPFKWugxol(JM7#l;qutf^LSHrI z0%wJ!Pj=18=ap>P5E2|%aWV63m2v9AI`%ouxTnm^H)QQr4yah9m*EWYkvUP1K&!bj zZFt%MIJBKMsJ*6HJY*E;>WonEW3ArCPfG#<;MJ^VJ=1>27Wm_fir1{-BZVX?V%r18 zCfN%4hhaCn;T4q>)&rYooQ11|QcF?PQBgY9*Ya4AaxW{*VL24>DjsO_S!>*tAQykcUb2Qw88P9xom z(ecvukav$fU1EoQtIUa%`grB7=5>;DN&%e`V2zi)f}mFc+-Wuj#MRuT>SF3xSXhQl zj%4EE;x0se&HADBPWp+srdW)&WI@c(^015JSV|{*!5_BvrhU)5t<3pk6>rWNu}qP%MM0^_%lPyznX~w>`z$GaB?~l&s{+-ZhlXOrQT5$ z<>v?UJI!+QZUmb>@8LukSiM&HDCreVxS+92Hf!ZG<6_WL&hjaAfswuWm zX#= z3Y7UVqg|6{Yi5x`n|7q9Pfm;`NX;d-ll1-j_j^Z29)2$tiViVLn}LOr$FsuD8!D9T zGC2e_CJM@9xYDn-Vw*Xj z?$GkEH;{c}tF=Nli09E*5iB6XI^d=)aqx*)kGHZ8NtLhYF$D>nyUds0;J7 zW;1m?+?);+przTo#5m`WXN9Jz(rhIS1d68`tM!E66kr(? zOBA4$>WZYP3K*JJr7stMz)W9hW`@qyNzSkPq>ueXRh<7jK)p+Tt;$TDg=OI}?^^(W z>#fFY_c5B~?^w4Momym217@yrk+Mq>l1IN)z*&}KTrbP?Uxw=V4>C68hb)fuNswHW zB-=LmPf+6 zvOF&?Wt*aahy?Q(1BM7QO7_srw;o9~=AQpH$ zbF-Lkj9xMi?o|lf%s+ST+RJ~G2)a1dS3sBlbH6UJd-hJW@4msee6>hBhc9@}&w~g* z$a~+cC3sHTL{#C zpDK{kz0R$tM_7(SU0zm}-`t$eY5a>ga{jV=ki1A?k=|+sv{Jsg)Nv=+8`%C&>fSy3 zas=_O?`s4&xTIMe-Nt^ZP-!$*GI!Y|RJ?W}@96i@N3;%`zu%eE&X1}xr1`PoHhsBdjDVr;z|D#|a8 zVjb=kj^@4-1=D15y3%SG|3Sl-+SfXR(=HNV7#|N@r+nsA2ZCYa3}o`dWXsn&z(^$8 zQ?>`(zuO9oE(7>fZ@*5iZ*On^nVW0yJpK?Kj_>>FHzO3CO}#<*4SE$(U*O2eEM*?D zZoYE``nWY=^owMy)a@G!KIcUqJ{E+abB{$w0lhzY1waEbU@>eUL;o_<72F?w zh`jusu;rv+ug`dOyEaU&=WBlRx!BP%&6ai&`<^P*b#yZzcb9hyuUpH!47@+JM;af^ zVKAostG?NdLCC->5Nka8`*nZ={MV^%53~XfUvh6_7>IsZ#V;a8jKl4|qiQ>v7QYir zIV|`>VLD(|TuK$ab~|{!CY8<#25LE!Z!qhzTKKeo0XoIDn3Um+$soWI=!qh&nj7rn z_BprS8P8VX-aC&y`%8Fl<+(z6e>L?g-(LE`J)$Qc`3wXid-op;kdb$hK7Xp_4|FL| z@sE&E!}TGAK@;6yB#7zn_ciMr?kU2WY(lkbs$6X?EooEJ?AEa7EvYi#EPhW~4H)YQA!F`3iD+Dq>F&)>z|0d?_LAZZGnLp!MX zu7|jB-+To+>wD^Y6^7V!448jRGh|c$;%Sz0hLG87$33(bw+R3AU?4zsny~A1b-m~% zis9zwCiJfpW1-E5kCT%;I&{jxUeLK^{Agb4ttzq-`MDLMbVQ;rU3!;?ysaY4L6LD@ zs)?&XOwdBQ*pM9Bjl_fxm>fRjl!_OgCax(Z$O-&~&giE;HjTJ{kPPgB`;Ef&-E#$6w2*&&h z&PcjE$3Z=@Sg4CjEaKlm43`D@c=f*3G-@Q?L6O5BlL`4dD@vFyRoSg726eMOP9QmP zMO~ti`s$dfVm*(3RHy3R_FL-bGdpOpk4}+{aTufx4_zm{(;Jd_72YhPH&Zv!c5Ts! z?(z%E-D8(nCSe;aQI18rrqy-tE{-*Lp}VzLqz3Sw7#GFyjn+UOC%u(^4vJ9&^0*9qG$J;mDCPb5wCw-P_-2FmpRTKBE1I+j*YI zSEHeL_A>3^na>GHeVGSu?ZRJ-P|a)6Q?T`#4|U~T-cj9{fM=_zNN&UGt=5+g6k2MnE?I7Er^ocgT^0XB-1&_^rhkoFQp(@e((|0Pj!_3VXXBkD+# zhr=6mUQ*)HmR@?rXc$<~pdahv2pMf@)UzfQFtrLe`NMuB2?M4+70gy6_PGeXhEHJV?N?Zar=GC`lea-+~kdfoNeauJb&#_Cb~OkiWJBh ziPb3SBJiu**YJ|Q;c1eyz#;)VJbVS_>cG(BUMBF`Y_)cvt-+ezoMWGo1w_K_Tfy! z{!SOsjWHGj*Pnc5h%&mxeCB>X|Kg_+Z!if?*J#ZG{oH+vZjO?!y0B{0#nD2~17%SD z$5P&TMHf57829l3a?W~NE%?rF<5aB9(S>g|i{9w^9i>Br;CRx9&&=l~JqdPs-NnAH zv)`4Uh453T*ra>6m{a94zOJ}?+0ehc1dG-B2iv~jx;)WWrhdei3R={N|MSD3%fu*- zN{4u7)g>T#;q2?eMR^u)DeC9dc^W`0oYOQT`JS->lVxfzs}V=FYvoVU6$=xy5tS^| zyh_{}v!09l0R$Nw!?t}W^t5v&>|LKwV0dZ~jx0_KuW0`PKFqa^ zv(tsPmN@i+rQp^154Qo%vn7f0GXPzQ4`j{wtGmEc&u!)adepccIj5c(l9@`7wLH_Y z4P!FMVTZL_0qhaE*M{F%2f%^ocdWH|OquD?#|@=v)-CMzPu(`YyLJh9(+u$+4gh9| zHjnmx4hk5q<`r+_B=FVK%-RW{T~V8P5S^pzP)yfoRy))xV1vFvGh7m(zK z`cz;t7zoNhF^q84H@zt{2l@w&aDyPMzmGr*GV=Whs@X>}8v0rzvuf$U7=wKk(2VNV z;Mq9eb8ErANXcjEadqru^n>wNU-_yNF(-$p91^z$KcN!Xd%I|dAjQhL01aZia~KA< zasb6N?W3{`{s3rG%qQl1wk5hSVB}>ky$w$?PL{iCIC&&lBSd3JWx^bh zfsYrZSnV63wVrzDSINERGQo_1F;?LGLD_@) zr_O_PkG?o|<>IsO7Mwp+pIy&JY{3`ZU#Cfl!}6I8?|B-^`MPA%?u^oWXM~OjVuo{O zj>9oc^$uumRLbrO5I@oEx1$@fPHRT9aa3{y4~L%7#t)?e2_%+P2t+RN($b!T4gN&X z9Q;c`$g4ngL-khfVK!6gd-wTfo}U91O!gQMsnZRozd*qGX!b=AQVwz5SrcI`kJ_V# zro&4t-u?P>Kh+k}Uga({?nCC?-Rll!ae7td=f^7>;@v6G%m9>|$OGsoDGX19dh1x6h~cc0}7voGi;_O*@iR9M>^G^FaXM zQJn2uSvbT;jdJxs==DV2Q$Ds4v52GQ^ZN8ofc@KfkgBF5ow<7H+@Vg+%TjJ3pqs@U zy*v_=d=(q{EvCEvl?|#vIaia1=G-6MNeQWhF(KD;YGF!}y%iFs-I;gvqG9tD#?)o$ zRs79BG9BjCwTMYSNiusIr(l|(0TsI;s3>B@w|nYm(WSvjp^&*SE_F?U_#|7q$L!pH zpoI0Wp*gx<9}Fe^Davc zS*Y*hjQ`@fqGCDI3?}buBpHn7_vZsERzHw|o~3g;1jxCds@UdBN4ZZ+xP?_(R%~zx zq*!K6-x??m4dyboijtI#^88^izEt&<+JeU!ZA9rNi^s~$sZ2bUj%s?r3ZO&jg*!mz zv;w~Nmv^A-Z-grRJJy1Th>E{?u-Bd=RJ8Gq{Kg$`H*5LM+RvT2X96VNx8`j+>;)=S ztGA}6UkU4%8Tb}1YcaJjDLH^d1g4nb825qzpCi0o`fnJ9J>J-}_*`+)QzZ}^jAE5;*yBopJ5#XnqN#;O?ez1IUX@f7(>2PL1k0kf|W?2n3myaJ>MsP)>vA_NM`OuDq-Eu#op$a z7kN7$OCRGn=IMxJTi3(n9BJ5a6#G7xRH@Gdz60qv>}puoII(T11-JN(w)RBN+{Njd zpBQJ)`*ew=x#H^P5RhtUfRh11K+IHCInd#z4{a@^%%DXa7d`<}ZK@I+%GJgBx)l+y zGe_h3`MVGtQA;~Cj#Fd(CLD`~n}pOgI*4AerpCo3br=_airXcsn8DqZ=X)8oF5kUHzq_Iry0HDESJ zUw5{sG}#nabpk~b-Yib6F$GdBG4&cePtujx1Ue?$wSFC;Wt+XAiiv00|K;4D zn^^gz;k^hj4XC|OooL|T-_#kx`;+7sv67fS9~B{L8E9 zoxXCh_OG=We}9csNtQ$LWS##Hdu0wF({f``GT+S5kUH@;(UL2CA-ncrVME}zPPKQ0 z=LjTX$@-U1BNz_x8?aP0Vo2j^xZ|g26(=#D0?6ArmD)S>7t8S-rvP}gMI?JncA^(p zM?x7l;oL&u`M_`+C9+U#k)!JQoD(>L0JjJBe#Lt>lQ=)R`@&d=Ln7^lneWa?gDiYu zTw1gmO3BAb)k>oliQ}O@P}$Pn< zLXW%0{1TWhH`+1 za`zF6y7*K}4=p$Or!e0pV&WAQLViB=(LN&6hBjLnR=;U^*TlU}3;g$MpjxZ6m<1g}6&W0n9nbNk z`a~@kn|vz{8L5KI{=m#^e`KD-Q(AAEs5c)arMsoS3(y7<%AQTUgnbJ=RUl)sT~hOg zyrw&)Zh%yVFe?!1m)}?CivG%6Aon?8$z$F8B;GR=Qt<-L*BAs+YmrjB7r?!Pq`y=y zpZ%mxhO2_2rVH2HZX;P&R|8G5JR=Tmj2FixZ0QrUQH<&;! zVueo6KRE7*3BVvrsLIro(&79T=S>aE20$G9#N%h49CWmX6S}nR>Dw0Ol;>K_ zp}|@ix*?l)W5Fqt_rn2Hz9k=#2jRna{@R80ViB`Pjr+Ipqv+J@mDBekHV!d17eDiK z6P}Wt-s&)|9Cz!1$@K;+k|ib-wGU}Fdl58vk}k4-U1h{ OKuYrJa@8^xA^!)Pjw&et diff --git a/music_assistant/server/providers/snapcast/snapweb/mute_icon.png b/music_assistant/server/providers/snapcast/snapweb/mute_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cf85867e2594d0a6060cb212de4d23730dcbe2cc GIT binary patch literal 2594 zcmV+-3f=XIP) z7a~OW69-Yo=yCox^(H%kJ8IEd#Q7|2jrEPmyc>_Xm|{`j!uH?m;C(v>Lp8-e2_gD z!K1D-ro2@^S=(04<(`$+kU{?UVc*8a5Bo zIRe6f*QZaPu6)JLChfUl(kG>H1Ox>TrBlg}Bj9%kn%2kO5fB7Kl+F;8&K%Ml6C|C+ z))8O}WWRp>uETaJPb=Fr7IuyR6G$kX=7b5@-NWPOP%~wri+2R*(22!j$L!y~U);#o z@?^pt;s{U?fXqCL@qQLhk93;2A+44G)Ye6)Eg}B|p3iXHO~-M!J%jJljCt+?>MUiR z#Ge}w9Mf@`f0v2Yr>qC#eNQ6Aq1G{zl_hT_0lY&6@vo#z_?rP`=Zl$S)DZkkeM~YIxi5!rxO+rUjk}tYYTSn+_{!a{oL7``1-D{udm-4wot!x z^tK-Kw%3R|-Y0(EzX%W)Kw)8Fabv!KAmnhP$ z1gt8SGyiOi_oUHvrqL}SFO>^@bDRJSFT_yP$b}gKN!Dx|Tj}U9@+H8V{J&JR#zcP8 zdiLyj8_vK(>5x!SQBg|6dy_n5*!2xy{$U>D(>cV}^T>qse+kMtfW|hBir=iMC_{6@ z?aT*{h6Mwn3sHG8*9|k2bBpXOm`Q=7!WMRfrc)BYFw~A==xyHnV$HkDQs&jDl!YPc zCyn}H(%oT5I|KD~vlz>yR2HJ3BRPpyhSKQHpwTU+0;g*#@hdh}^n~?6Dhi%suz#GV zKr{5z(L;tIeg6;w-Z!*{Amtw^w#E-JNGJo~w|HTlD%*-OirFe7Pi~6D)d`u8$#Woi z{wQEISpuZ;-g4*j{4CV8ob@Q9!6>6&bghdI%xEW*Z5ZYGj$V`7f2T)A>X;vbqc z0UinW(Gw;by6z%K7_O41OzZ-BJ(K%+ntb*VHwEX#ySgrwIl+^_0lZR4mnmhplh^LHR<>%!(5Q!T{3l=A0Ja}?*EPFzFs}1SpV_uVl77zDY~HNCT$G)2kpsTni%Mr(l1l0sMu4KT;HrpPlOgNvL?P zgF606Cr@_}U&WBs1@OhaqLiD&Er!(Lb#-;Wt4MMLq#)yYY{iA3lc(Pk--bu!Q<7Xi zL2eF6$W2FpVVp>gh6HgTh$}%SPjxx|M{YU-0uUgkkZ?bLh=Vd{*vHURgW?f)hcUPz zNCA<^(~^=B*$^zQblaemo301gLYQQS%sdVS^R_`5CFlGM_BZ*-O-Dco0whWA-o4Lc zGF{Ej_PQ)kMepHYt5C^JM?gpdkfx&nSLCK?K`Aaz`9=`urgd<0fCef)v<5Kzh<8&b zHyKXgtO91plOUu+c+mk)|gy-pjhOZkOK;$7DR3_ZYGo|FS3S_d0| z4g}C2Bs)vT-Ou!vL8`keTn_+9whzVt>1BTE&M0idW&l8bp3Eh^W;mqG;oo#8IkymB z$(-SPk&3!qe&Cs$xYe2DVkpu z#Jf2XT|Zwpib3Q9#LIybU6|drZQC1?Syz@LS@F)rIuILkVKY;snGy$okp zGLgTYAYd6k`kENdv3TvyIKaP=`p98$o!qQPZq@|#ZhGs=MtMrvamSss1X=Zw)t~=U z(Cv*~o<*)yb6M&dJyAJAazDq*Y}LBVp6Ea=T7+IJ(*qolj>H0C*A z6CPnt$jJ5)**+-4a@qlTIvza5wV^r+_V)>yOot4dgg3piF9Bs`Wvz;eilpoNZJ-s! za~s&p*78OPau%9>LDL{%v|ont6Eclbl0_!o*XFaB2J)|4WbJ37J0&Rx1!WRW4h?|u z7)y%dZ55C0d&%g+`hdvO>eMupIW}tqNa5aXC~{o$EZYi%v{MowQjy{IX(}&zUG5^1 z19^|2cphkM@DuOOd~ht~J;mRz;1T7un_e-M?~qAZB|u)Nva<3t0GMIeO&k*U!^yNV zRBq#1w{BfmT4o1;+34q^N%sX((@UAFSFi5E@u-t1b5r8bN7f0D7n85X-Me>B=0(EZ zh-JdZctXaMLAK%}AwVjZ=ACdRd>jELgc9)~Z$&g^?+7p6ecqARPj{w5tCh!zOD-fDKAEHr@tV`9A}K_>dd{HsIRYc=tNUF69#~(>MYwfwDI9 zF1?d)h0Yd<903*}1vX(dOV01k;4!UXI|2fuYnj0FuTQ~TZoN|ZvcBP7hfe8UJ7)Px zX_-alj7#UO#gVsm?b>nVA)5*O)?63jVy;Q2jBKUNNdgk!@Z~J)*s`1X@a_XyRL8GW z4FMl#3&eEF$!P+l;@;#e>k6j;yj;BcWTq})O$TUI+MFjK6QE=>Pe(vD(e^3J5#R`j z7=eh3cRj!n5HSJ~7w>w2BOqb~A}-$b07pQ?2t-``U&8`QswxzafdBvi07*qoM6N<$ Eg8j$WasU7T literal 0 HcmV?d00001 diff --git a/music_assistant/server/providers/snapcast/snapweb/play.png b/music_assistant/server/providers/snapcast/snapweb/play.png new file mode 100644 index 0000000000000000000000000000000000000000..41f76bbf999de0813a0701fb8a560841e7c7d407 GIT binary patch literal 1183 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGoEX7WqAsj$Z!;#Vf4nJ za0`Jjl>Nr8ydc?7hKQ4!2HA0#WAE}&f7T~y_FqB+Uu*A7_@3I zo@V{X(wZxjb1r1%8zs$2aX0)rmU!=+ed*o52_o$ZEg2KtL>!fz0uDNP2wQM;x#}>* zP2S6WZ`PYM^-AN-@3np7(oUw|JDp#?>Dck(>=IV{0_7dpNdV5rj|A?Cot zt+cG@Pm!*S%iHXu%V>XbOiY%NynsX98BWbX0N(*tVFbuQ|LISp^SUyHj$~VPa8tCw$3~MoImHb-i&2Cr4}5?_KvDo5|caPbJ^$iwph)nUOT5w zow}4kHR^o(&g~1}R3s@c09wLsBl~vagv%FiaZB*9=_~4;VBr3DaKSdFw!;s9KYsi;^oCvh z>Z>i^e|lzUCU{Nw)SNTBD~ySWZDrw!@9de13MmtqR4N|ZP7yP3p1{QM>yOG5Q6Ov5 zv;B24Pgz_zgFf4=iwtyYSmUUrb%}d|t%s{?6yqwEl`A|n9hNGHimqf?A+cnUQY*vM z=8zB%))xXx7CEUoOji({+RA-F*TXe6k*S0?C~)R(hPyxoF5DG|m+zf?{P=Nu=PTK! z3C#*o2ZT-b6~49+(0w5Ekmbm?-tP})m$y6os&@bU_Vr=q5C&nne~oN}@)kVH{b8It XeVsvS@NsuwA;IA3>gTe~DWM4f&P4G* literal 0 HcmV?d00001 diff --git a/music_assistant/server/providers/snapcast/snapweb/pwa-192x192.png b/music_assistant/server/providers/snapcast/snapweb/pwa-192x192.png deleted file mode 100644 index 444e7300a07780464e3171d7e7bf43bdd11e02a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2349 zcmV+|3DWk7P)xuj7hQDGMHgLkQC;F( zh+!C}2Q8mMaQ+#ri(#5aoaT8NM9(ld&ASg{>JkJO)0j@ZfmoJ)%%*-Yhyw1P75>^Fk2$-b1zEM$%95dvS6eQB&?w>P;&T{uylY0IOm&-#N* zszqunJ<=e|XKcYqazsdvwE9Mo&9JGw&GJ)g|3|7Ldo-YnzsCJdn@rz)viK;6vdx^e z#;AqzodQ2md{itu+8HIgbZa6O9v3q&Yk2129PtliUt3izwm1MmB>oE8O;?ZmUweAA z`avbDLe@D`t_W3Cna^v>&mf!1c<}`50zt&Tzx+&raKh=bKm0)fOg_eLq zcHq%S{te-e7r`<$eVV8l|41E)PvDPhh7&aqKm+vV|0zC!@Vn~V?=?jP{|;MzT_+H& zs>o0QSZLZUeePO9A;)y39U1Bn0e}jZWm_u_7ZRv~|AQ$q#>W_CuLi>bhz!aE;{5#Sg|NPp@ zc86q+1)z@wHIeuz9fuQ@y#n8%!7l}n@Sjg38TeynReN^^G+2Z6R$)8@m;Vs%^YwT} z1js>sek!QhaSwW!9{U?0pUgphe)8|mVLx*VX2b$1!0&^9Kc29a8CFh%1KnJ<0Sd5Z zp#EY9v|1#iU`p)K01d?Hq0iU>tr|IBaPzi6AU;3=ak2sbc^+4~lt7!sDla@&D%l$B*@PW!h^J!#s)nbzb%m@VXvhzBt)3{%vxgjch?$ zM6~rM9U5R~sb&%YiP(p-mn5iI4BDeC{$rr)A@jjDvWG?=>EN~JwUs3bU!BQNKkHM`Hq_ITL6II z+sM{UdGAS;_hzH9sT=)FC!V6E2%)4`TXG@2OtT-XORr?(^cSYet!AK0a!xt zZDfbU*(zWI{&4_~U|L2-cRE=GJo9tEZ|wjg_&W4u^QkHT%+DGCQt)k-66{a`x#XtA zqyzCG0e};v^}bD(5)2hAB}yLu1OWe_raZxqm0&nThix+d1OQC%qwh^EF4tj}%s=Ic zeLIAFr)lwc2!Q)N1%NN?CRPZQa<1fu0Jx_C@C9EHV7AQAegNMw-4g)-VUM-gr2r6n z0mR%QL;>)HU3(fGnIX|B0841D4g*qgfE%a*fYMwR+R>p?0Ep)LyU{;@(bHCBH)H~U zsRsbQ9mN4my#mmBPOnuI!E|&hF?V{g zWr@qt3_sTNYVo-QGE@hbex9k|2+A*a!QCkJy?MF2=Y{FF4@OAo*XuS`0f!qQ(dL2U zwgCWn7&Eyyi!Gm+6!om+LLHvFe&n+hnAAtUVQlow>f+~l8{S!`JhL`?=tka&WvC8G z*&eM@4Ss*}mwsf*Us+owdn~VM^fROxnQBZ~jD_MfFR&`_%Uz{;I7Zt)W;7o$TV$Zo&FNCw@ z8-Q*BgPO}$TLV-(MEC^?b73*41^lVNj)Ue5w(2gtPY4C|xHD2ttYA>du=W`Cpza>o zW%XD&=wmx=DD?(pTr$%|K{W6Mf%9}>1!dSD>5!WAX-`uC1|3%1c_eBIpqZ`Q7J%<* z%MeuIdI(;Y2ko)t#+JPcXY4o_A$XgA41ycmHO4@zieExw5g&|oI+HEiJfXcko(K%; zgQM=LvT5^6w7bd;=_cV>f7q*#we3UeL^k%G8eds&{)2Q#C3YLpit&~YaW6NM4Z zR*WJ<KQDe{ZxdN5Y6@j>{f* zFdg1JK5$@_!-(qqC$#UciD5WtfP%dpGeJR|Ho^jJnay_goIY+63ZHXkplJ3})1AK~ zht8rI@~6<`_8c8r4AN06bAa*!y5pxAQG>AXP$)tmi2If@J&g_RQyoi>zgB_TxF zXeaF0**LGQfoi{FM3!jiaW`bg{syY0PvlE>2R%;Z`~S>EoW(U*bI)kg`IASR{s)H3 z77QnTazFGnqF7Ax=MGrT0?{e+{*ZBc%6R8P#sQ8`9rJ$CMHgLk(M16Xc5|5HCA*pO-iqfJ?UqZ+{6bhjYZI-A+Un!MT z%plncAxVpoM2i|r3^V3=ec$)If57i|&V8NF^|`O*oa?&Jxz4$-Gv1yq(quI<06^N! z)yW3{cu9o;30Z=sTY9Zau*}=TccaIFqj&@H{~vK2$6H%l@xlFg=URNG4<9cUCAoz! zITNCMJhy^VD98SRU*r;(V7mG*Au|4-K#$^m4gsJdeDF9y`)d^!w51X!&R9J`#GiG6XmYrBO)#V~9C=qIuq`9-nEfsW$sjNK0eh z);-00EuIk80SXa8q%lUa+7O&2RM6rIKFSN&2Y|9ia^30~TnVXS?BL-&a1JAo=Llo6 z^06CmEh?8YK&_r(ks;=Q8@~a%dxFW}e~C%8w*@me6BIBHbY(vU8QPZg?zvCBgiuCr zv#jbs>G*~%V4|y?z&R4e-%Wg+roE40H6~65iQeFg?0>*nClo5pXlCB%4xEY*TQD5d zv9M1}r5jZ}m=gs3D174ZS?rh(^fjrT$EutsOx39ZlWvpwNVA#is+e8(vUyfA-tGKC zu0icb*V7aS6wVR9a))KXAG!%TCB}A%#2z>pix+9}m5Ob?x40ae`K(6x;ry+OuqYy+ zTJ$#2_VE}mhyrDdMx-W2D3A;pRYHHQ+=jWF4eRq+;u)-b5N;0N&Te*i32`KIm0A56 zEK`x-h}14mW!BJPMro4qe9b8bk%X!=Ua*Uvi8-XVhRIT=Pn7Isu9+Y6yFYL<_>XoE zsxWV!f-A(0wMO_!pR(t5om|}IjI!rT(pWaXVl3eukv~`I^FL6bV+)3(J%!4`b(x&^ z@`!^$axOE##Y$mTJ*_mOv_({ye;g{qVYC=rx(_m+Ywdt5WIm3kY$fJU?o_ zH>5H1a`7FW;RUw_bDcKJ6C+~*Vw`7AB6rcHHV63<{{&}YGi|;_$%R;XOp3c!cqd?S zZ}ZV&|4c^NC((%e-(aOhH!5@c7hGpivb(T}wCmD>`N|*KDlRNoy_?8-ALkuazHZn% z%|R&)*Hp#{HnhG8oOws+Qa^Vla*9CNX0-2Y`u(Zp-`nQWDmPA=2Z`SE@GvytU=uwO zrYMQ_^u3u5ch6@a#9!cayGT7Vz3#GnuDVT83`~J})PM2x#o)nzJ9uR0N`I6t97F|&v zFvU<36Uhz!ae*rzSb@&InSoGW(oF_iKBu}pZsR@b2I0C($ve&=7pHbv4E8SU{k)G^ zs{q=|!Qr^(+!TBWF`qPqmh7dkw!L;2?tT5%JY96D<1%oS@tm*QbF}5F_DW5U+vX7W zE`bu+#rm@FdS~0p7nOQNuAuDU4%6S`i~jFl#62~KN|)G?C&I#nga16#^ot^MQkKHI zdV)W-B*y(9oc;dj$_EqW6IWPAKJILfdo?^7Hn4uXjz@ zaS1dDN9Xfo*aQ`$f-wQ6C+XMT5}eQ%HbM2KcP6ZPDra4fzqJY!dr>0DKH)4?Qt-E- z_bL#Rp?6~VJ*)5A*<>YG&gl3y@BTl~*kf|02mUdleV~F6v~ctMDk8eAuJL--*qYDQ z+jO9;0TZ|sQD6HN$7&n{vW=bmnv zuRGrqJr=0$^M)nr=xE{v9N9Eqmt69T6%Q-AqWSAVqWP^LgigWb^zUqtu>Fv5J?Nv! znr=~zA^7>HX5CJIPSBB#7yMP9F3K-Br+i6?5N%xCqdd8iaC^KdqsrnhOH93>|Z4_^^ugPv$a=)do?Q@}(E?^7B zoEEoTiwp%5>AEqah3_L~m3N&8an099{C+3N-p8E@Idj_E`fQl9QoKx%HF?hfT|ex< zsN2uxvJ3D|m!Oo-bOq6lfl>{R#3UyBHZtszq2Z(N*CN#|C)dnqrAop>~heL{(MC@G_# zSP&V8u^ncLh~D4%e2=(ig^z6L9tDu^JKev{4vE%75(zrcLG^Kg9>3s-HEu3cr_feF zrLUoPUzHjApD)Ml?E@&Zkr!PXWJu4rcx(m>fkUtH+xQw)n}|gOk@i^uR50?BCLVqs z(o11U{%1T8$vGp%ID&5`@jflItd>W&t)_Vd6Bep*;!G=%K%^jeGsebG z)Lt@7+;SN)^8<$j!An!+$lNAlac?gL3IjhRLAkWL-b|d}huQE|6tIW?)N4W8VR=#)c4Ihgpv)r>J_q1c{jhev{B+>d@1F(f_RSq?6#P0?Jk(z^^u9AFhC&i@=c7T>#Epr)eFh0yxtU zB!NwGv?OMq77<(Wr6q$%IrO2LEQ|pfAc6mYbAv!>>RnF(1ORO}04ISrpa28P5<{01 zf?p1>mE`QEEICs(#Y^ZRdx%HaYmi}vod#im zpG^8F_i$dxg2o}|IY}D;v-E5HE4CjMpMKnUj>bvc(Jb>x;^nc)t-;E5+K?JsrC0Pc z*0Rn_)Of+-b3x{J0fX>a>cMS}uh&Zqd@eZqQ?Ot0vvkxPGju3y1TM(>I~x@~l%_iw zUG=P`L}0HO|7AWltg9s^(QW~TeyP%XrzczP$EtEj3AftxrJhAKf$vb=Rq z$x%DSUy7v4bkMuj^Oi;Ak2j@S_oC8}Uj!5yE5{X}0|9W)_Nr7+Iu~pGoW!(O@3{`G zB%HpamA$~${9SJ`Pyl7`Be?DZbsP6D?&lH+PnJjTMa7`6#h<^q$(5#w&wQc^yLyZz zj6;@g$(G=b-5zz>aba$b!3Wo+N%Cv#PPByI7_{`LpE4|I%6<+1z^Ch5<3DQI6~!oY zzi@PpgzXeS|1SmEX-raq`#$Ch1GV_S={E&n_F7C>Wgr=n4S`=IOL3cE)1UCxXKl9# zMafc>L#CKMRH-girjMGof;HI#ok(Rk{8@GnUl{r0#*Jlc#s&@j~lN`0|61`Q7Ghm==APxo*aUJcMP^f-DvVIKI^RbV6 zIOBBJ^Unx3Ds%<|Fij71p9P~=mezjaOVqjUemHzLJaw0`*^A2-rk8#)?B9p=UIXu> ziPX&0b53&YlZB-p3=STKY%CzvW^^%Q+40L`vzMS~3+Q`wF_FM674s<2v+e?)B7uTj zyeUzQf}U6Ib|j8pMZTu^|I=;MkAdvcrucD7&L(1oVt%- z>vH1zn`up_KEKJ>f?!n&RvSLRAOk78?8>OOoO~CU}3hJ8XY%#B{AF_V6>JC3o8%9WR)<(vVa9ym5zZ2C#U>-xm?N z;j1ec48wxd`FRZY{;~51R5@7$?k^PEFw~#-w@0>?xl^o}vk%S*Lq-Do-TT`UUxQjr zCFFj^SS;SVUIh+{o4BE|KO}KtMb@{}vY-7(_G9e0d`{!`DaHw_!r@!gaTD+b1(xA7 zeb!`t-pA45HzZdTg9Rn*p|r=){+7!`TpD?SAZo_vc7fl!_=ftll6zZ!sM7xl_8ZJL z`ys~t<&2fY4NPp4KV5#oPfg&lWv*J>9L~9jU3Zc)}UVQhqxK4+FDyiqRgaI%QAk@${-!{cd|U_N1CVx%ysH9l_NC z`J5eg_p-R_j+s;S{M&k1b-G=<{hv)zt8MD9?7+tJ0)u;puR~uqfgYFj z+2tEp+hxa{0Qb%yO*? zUqdwp2ek7)&EKp~O41tShc?7n+h#XxiG7s1A6#14p_#kwRTqaXA7&Vf}R77IwgN=dfAxD@Rvzv3ssh0Ux*&9d{4Lx#9zp6c?E?D*9sp(ZY zj;u)44O1-F%Gg@tNu){?jeI(~=OtF7|J<2aCD#4-_meUP);CZSB;%xq)$d3sN+Djl*WiE0CU(=(VHbc)0+Tne1|dOJS>Zq!<3O7EXG= z+>N{W;Mk4LqUZbWbxoEBn^M9d=~^eh7A&*rvoMi;&&B_XTJMHordrHvL7?xzOvyE5 zPXSxI)kNff?~IWuN)@}>1im^LENgGHI}{jpdrQ?cQ=>Q?x_@IhL|v7X_VdY4s`pBy zDorY=UV^!;{$2d^Vbc8>UEK)!wVHe`P(=GGpk z%Pm=7ZGC@$HSEVPWZ5{+mo_E@ky`F+A>`ZWlXN)ph=yk>>$l1D&8;*WMVbbbZ6;=X z3vFFb@CKP-nBv@`Qm{0=kmzxmt%OLqG<>@*b44CcAbK~uvHn%1DPm1Eh~+Jme?%XV zjL>t%2Qs7zES&qO#w&AE(DI^(5Le!)_JU^nm& z`jcNkE;wLfq#^m@_|=<9ucQ;&4IzZ(CDp1X)}cXqt&;>;VN$e?_{0mQr#VBK$nX7j z#F<}-acZORPJFRJ~8^6hWXF;nTy|E&mR+>pYxkgVEKs1W0->yy!Qe?e-T=f`_UnX-ZWZ2shT`B#< z)yz+gwb!CZn{=I}HDf13FDhS*|6R=e>1S{DH}6KoOn$UR6e4s`rL6I0xXYhf!Fw0j zP#%+Pc*D{5@tLjoL|>FBaYAU-B-(tKaImEjrwqqie$-d345=`p!#2H3e?~Izi(=#b zo!4p*a_o0W+id9(V?kwjC6V`5ElxAu+2|%3lnxCK*mU;%c@;p^`N}ddAK*w+Y*^pi zk$y|ceWBrW@}&(8o~cge++agET7&U~?Y5C)q(aZdFOG6>*~AxZJ|LHUhh&tNoOYFi zjYgQk>BZdP4-ItuaXkE2k24jlFMIJm#tvW^UEHwf;>~6K zNyV*H?T^$e@?={Pb8|9Z!5iPa9E;TU2E3E7t4RH+BS)4TrNrU{J0>acnj|?3Niepw zUR^UL&X2hTGV%V)AcGaAip@r>K#T;@xlpL+`fBif=rRKJ3=PQ;iexphsgWl}oWDs3 zB{7Ev68@i9hdKg&WK~g$G7w1kQ!;bcRTZu_yg1F3JdU!{wGu3sWs`$VL<+GqHeE$j q+{79Ycuh|HZ&uVxJ8hl{E>4ugX3N~YtCrT~z-^0W010qNS#tmY z1Lyz%1Ly&@ds1rv00PrVL_t(|+U-}1j^iK<+&~_rJWXN$|5ML~G$kZtlium1lg?7N zyQ|E^9vjnAajiK+hpEV_}sZS2G?649}}b<<_|@J1O`Pz>S(wPGluRLtca^uy;=1nX1_zY9W;fTX!4Jf%XqCO9c0 z_6|gJ*d;tlS*5RZMWw)oodXOobjhVbe5hV;c`OMy)Gn;&-v%PlRqVb{(~->dS69|h z`LrP^H~)x5IuvGB`L9=PA~V0nA3!JRDd zH4{Y^uGfLZZ@bh&Q3pqr=zOxct;AOqR+V_?EaY>bsilnfPovTiBOnPVi(RW9K)WB9 z97UEuG&&O09j)p}7)6Sp>`3nzLNEr$lWF%v3lzmRf+dD14XP7Kx1dhCa_VaJY#LIx z@Fb62Ms#y7xa7dFpG-jg-V;NbOwdeBQdxW*jix+Xm)WR2xXZIKPv<0GOe>1Y(>Y$A z&Uru3IN4tNfuTLIMKCuu6s%QDzN1T zziH-0H$p4^ak{uGbLlPYD`Ds_ZR^f!ekj6x`M!V}cp0>IH}4D8jb-b-xO(ZC4)09j hFW%bzz`gMwvR^P {navigator.serviceWorker.register('./sw.js', { scope: './' })})} diff --git a/music_assistant/server/providers/snapcast/snapweb/robots.txt b/music_assistant/server/providers/snapcast/snapweb/robots.txt deleted file mode 100644 index e9e57dc4d..000000000 --- a/music_assistant/server/providers/snapcast/snapweb/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/music_assistant/server/providers/snapcast/snapweb/assets/snapcast-512-B1PzHP_P.png b/music_assistant/server/providers/snapcast/snapweb/snapcast-512.png similarity index 100% rename from music_assistant/server/providers/snapcast/snapweb/assets/snapcast-512-B1PzHP_P.png rename to music_assistant/server/providers/snapcast/snapweb/snapcast-512.png diff --git a/music_assistant/server/providers/snapcast/snapweb/snapcontrol.js b/music_assistant/server/providers/snapcast/snapweb/snapcontrol.js new file mode 100644 index 000000000..0003b929e --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/snapcontrol.js @@ -0,0 +1,903 @@ +"use strict"; +class Host { + constructor(json) { + this.fromJson(json); + } + fromJson(json) { + this.arch = json.arch; + this.ip = json.ip; + this.mac = json.mac; + this.name = json.name; + this.os = json.os; + } + arch = ""; + ip = ""; + mac = ""; + name = ""; + os = ""; +} +class Client { + constructor(json) { + this.fromJson(json); + } + fromJson(json) { + this.id = json.id; + this.host = new Host(json.host); + let jsnapclient = json.snapclient; + this.snapclient = { name: jsnapclient.name, protocolVersion: jsnapclient.protocolVersion, version: jsnapclient.version }; + let jconfig = json.config; + this.config = { instance: jconfig.instance, latency: jconfig.latency, name: jconfig.name, volume: { muted: jconfig.volume.muted, percent: jconfig.volume.percent } }; + this.lastSeen = { sec: json.lastSeen.sec, usec: json.lastSeen.usec }; + this.connected = Boolean(json.connected); + } + id = ""; + host; + snapclient; + config; + lastSeen; + connected = false; +} +class Group { + constructor(json) { + this.fromJson(json); + } + fromJson(json) { + this.name = json.name; + this.id = json.id; + this.stream_id = json.stream_id; + this.muted = Boolean(json.muted); + for (let client of json.clients) + this.clients.push(new Client(client)); + } + name = ""; + id = ""; + stream_id = ""; + muted = false; + clients = []; + getClient(id) { + for (let client of this.clients) { + if (client.id == id) + return client; + } + return null; + } +} +class Metadata { + constructor(json) { + this.fromJson(json); + } + fromJson(json) { + this.title = json.title; + this.artist = json.artist; + this.album = json.album; + this.artUrl = json.artUrl; + this.duration = json.duration; + } + title; + artist; + album; + artUrl; + duration; +} +class Properties { + constructor(json) { + this.fromJson(json); + } + fromJson(json) { + this.loopStatus = json.loopStatus; + this.shuffle = json.shuffle; + this.volume = json.volume; + this.rate = json.rate; + this.playbackStatus = json.playbackStatus; + this.position = json.position; + this.minimumRate = json.minimumRate; + this.maximumRate = json.maximumRate; + this.canGoNext = Boolean(json.canGoNext); + this.canGoPrevious = Boolean(json.canGoPrevious); + this.canPlay = Boolean(json.canPlay); + this.canPause = Boolean(json.canPause); + this.canSeek = Boolean(json.canSeek); + this.canControl = Boolean(json.canControl); + if (json.metadata != undefined) { + this.metadata = new Metadata(json.metadata); + } + else { + this.metadata = new Metadata({}); + } + } + loopStatus; + shuffle; + volume; + rate; + playbackStatus; + position; + minimumRate; + maximumRate; + canGoNext = false; + canGoPrevious = false; + canPlay = false; + canPause = false; + canSeek = false; + canControl = false; + metadata; +} +class Stream { + constructor(json) { + this.fromJson(json); + } + fromJson(json) { + this.id = json.id; + this.status = json.status; + if (json.properties != undefined) { + this.properties = new Properties(json.properties); + } + else { + this.properties = new Properties({}); + } + let juri = json.uri; + this.uri = { raw: juri.raw, scheme: juri.scheme, host: juri.host, path: juri.path, fragment: juri.fragment, query: juri.query }; + } + id = ""; + status = ""; + uri; + properties; +} +class Server { + constructor(json) { + if (json) + this.fromJson(json); + } + fromJson(json) { + this.groups = []; + for (let jgroup of json.groups) + this.groups.push(new Group(jgroup)); + let jsnapserver = json.server.snapserver; + this.server = { host: new Host(json.server.host), snapserver: { controlProtocolVersion: jsnapserver.controlProtocolVersion, name: jsnapserver.name, protocolVersion: jsnapserver.protocolVersion, version: jsnapserver.version } }; + this.streams = []; + for (let jstream of json.streams) { + this.streams.push(new Stream(jstream)); + } + } + groups = []; + server; + streams = []; + getClient(id) { + for (let group of this.groups) { + let client = group.getClient(id); + if (client) + return client; + } + return null; + } + getGroup(id) { + for (let group of this.groups) { + if (group.id == id) + return group; + } + return null; + } + getStream(id) { + for (let stream of this.streams) { + if (stream.id == id) + return stream; + } + return null; + } +} +class SnapControl { + constructor(baseUrl) { + this.server = new Server(); + this.baseUrl = baseUrl; + this.msg_id = 0; + this.status_req_id = -1; + this.connect(); + } + connect() { + this.connection = new WebSocket(this.baseUrl + '/jsonrpc'); + this.connection.onmessage = (msg) => this.onMessage(msg.data); + this.connection.onopen = () => { this.status_req_id = this.sendRequest('Server.GetStatus'); }; + this.connection.onerror = (ev) => { console.error('error:', ev); }; + this.connection.onclose = () => { + console.info('connection lost, reconnecting in 1s'); + setTimeout(() => this.connect(), 1000); + }; + } + onNotification(notification) { + let stream; + switch (notification.method) { + case 'Client.OnVolumeChanged': + let client = this.getClient(notification.params.id); + client.config.volume = notification.params.volume; + updateGroupVolume(this.getGroupFromClient(client.id)); + return true; + case 'Client.OnLatencyChanged': + this.getClient(notification.params.id).config.latency = notification.params.latency; + return false; + case 'Client.OnNameChanged': + this.getClient(notification.params.id).config.name = notification.params.name; + return true; + case 'Client.OnConnect': + case 'Client.OnDisconnect': + this.getClient(notification.params.client.id).fromJson(notification.params.client); + return true; + case 'Group.OnMute': + this.getGroup(notification.params.id).muted = Boolean(notification.params.mute); + return true; + case 'Group.OnStreamChanged': + this.getGroup(notification.params.id).stream_id = notification.params.stream_id; + this.updateProperties(notification.params.stream_id); + return true; + case 'Stream.OnUpdate': + stream = this.getStream(notification.params.id); + stream.fromJson(notification.params.stream); + this.updateProperties(stream.id); + return true; + case 'Server.OnUpdate': + this.server.fromJson(notification.params.server); + this.updateProperties(this.getMyStreamId()); + return true; + case 'Stream.OnProperties': + stream = this.getStream(notification.params.id); + stream.properties.fromJson(notification.params.properties); + if (this.getMyStreamId() == stream.id) + this.updateProperties(stream.id); + return false; + default: + return false; + } + } + updateProperties(stream_id) { + if (!('mediaSession' in navigator)) { + console.log('updateProperties: mediaSession not supported'); + return; + } + if (stream_id != this.getMyStreamId()) { + console.log('updateProperties: not my stream id: ' + stream_id + ', mine: ' + this.getMyStreamId()); + return; + } + let props; + let metadata; + try { + props = this.getStreamFromClient(SnapStream.getClientId()).properties; + metadata = this.getStreamFromClient(SnapStream.getClientId()).properties.metadata; + } + catch (e) { + console.log('updateProperties failed: ' + e); + return; + } + // https://developers.google.com/web/updates/2017/02/media-session + // https://github.com/googlechrome/samples/tree/gh-pages/media-session + // https://googlechrome.github.io/samples/media-session/audio.html + // https://developer.mozilla.org/en-US/docs/Web/API/MediaSession/setActionHandler#seekto + console.log('updateProperties: ', props); + let play_state = "none"; + if (props.playbackStatus != undefined) { + if (props.playbackStatus == "playing") { + audio.play(); + play_state = "playing"; + } + else if (props.playbackStatus == "paused") { + audio.pause(); + play_state = "paused"; + } + else if (props.playbackStatus == "stopped") { + audio.pause(); + play_state = "none"; + } + } + let mediaSession = navigator.mediaSession; + mediaSession.playbackState = play_state; + console.log('updateProperties playbackState: ', navigator.mediaSession.playbackState); + // if (props.canGoNext == undefined || !props.canGoNext!) + mediaSession.setActionHandler('play', () => { + props.canPlay ? + this.sendRequest('Stream.Control', { id: stream_id, command: 'play' }) : null; + }); + mediaSession.setActionHandler('pause', () => { + props.canPause ? + this.sendRequest('Stream.Control', { id: stream_id, command: 'pause' }) : null; + }); + mediaSession.setActionHandler('previoustrack', () => { + props.canGoPrevious ? + this.sendRequest('Stream.Control', { id: stream_id, command: 'previous' }) : null; + }); + mediaSession.setActionHandler('nexttrack', () => { + props.canGoNext ? + this.sendRequest('Stream.Control', { id: stream_id, command: 'next' }) : null; + }); + try { + mediaSession.setActionHandler('stop', () => { + props.canControl ? + this.sendRequest('Stream.Control', { id: stream_id, command: 'stop' }) : null; + }); + } + catch (error) { + console.log('Warning! The "stop" media session action is not supported.'); + } + let defaultSkipTime = 10; // Time to skip in seconds by default + mediaSession.setActionHandler('seekbackward', (event) => { + let offset = (event.seekOffset || defaultSkipTime) * -1; + if (props.position != undefined) + Math.max(props.position + offset, 0); + props.canSeek ? + this.sendRequest('Stream.Control', { id: stream_id, command: 'seek', params: { 'offset': offset } }) : null; + }); + mediaSession.setActionHandler('seekforward', (event) => { + let offset = event.seekOffset || defaultSkipTime; + if ((metadata.duration != undefined) && (props.position != undefined)) + Math.min(props.position + offset, metadata.duration); + props.canSeek ? + this.sendRequest('Stream.Control', { id: stream_id, command: 'seek', params: { 'offset': offset } }) : null; + }); + try { + mediaSession.setActionHandler('seekto', (event) => { + let position = event.seekTime || 0; + if (metadata.duration != undefined) + Math.min(position, metadata.duration); + props.canSeek ? + this.sendRequest('Stream.Control', { id: stream_id, command: 'setPosition', params: { 'position': position } }) : null; + }); + } + catch (error) { + console.log('Warning! The "seekto" media session action is not supported.'); + } + if ((metadata.duration != undefined) && (props.position != undefined) && (props.position <= metadata.duration)) { + if ('setPositionState' in mediaSession) { + console.log('Updating position state: ' + props.position + '/' + metadata.duration); + mediaSession.setPositionState({ + duration: metadata.duration, + playbackRate: 1.0, + position: props.position + }); + } + } + else { + mediaSession.setPositionState({ + duration: 0, + playbackRate: 1.0, + position: 0 + }); + } + console.log('updateMetadata: ', metadata); + // https://github.com/Microsoft/TypeScript/issues/19473 + let title = metadata.title || "Unknown Title"; + let artist = (metadata.artist != undefined) ? metadata.artist.join(', ') : "Unknown Artist"; + let album = metadata.album || ""; + let artwork = [{ src: 'snapcast-512.png', sizes: '512x512', type: 'image/png' }]; + if (metadata.artUrl != undefined) { + artwork = [ + { src: metadata.artUrl, sizes: '96x96', type: 'image/png' }, + { src: metadata.artUrl, sizes: '128x128', type: 'image/png' }, + { src: metadata.artUrl, sizes: '192x192', type: 'image/png' }, + { src: metadata.artUrl, sizes: '256x256', type: 'image/png' }, + { src: metadata.artUrl, sizes: '384x384', type: 'image/png' }, + { src: metadata.artUrl, sizes: '512x512', type: 'image/png' }, + ]; + } // || 'snapcast-512.png'; + console.log('Metadata title: ' + title + ', artist: ' + artist + ', album: ' + album + ", artwork: " + artwork); + navigator.mediaSession.metadata = new MediaMetadata({ + title: title, + artist: artist, + album: album, + artwork: artwork + }); + // mediaSession.setActionHandler('seekbackward', function () { }); + // mediaSession.setActionHandler('seekforward', function () { }); + } + getClient(client_id) { + let client = this.server.getClient(client_id); + if (client == null) { + throw new Error(`client ${client_id} was null`); + } + return client; + } + getGroup(group_id) { + let group = this.server.getGroup(group_id); + if (group == null) { + throw new Error(`group ${group_id} was null`); + } + return group; + } + getGroupVolume(group, online) { + if (group.clients.length == 0) + return 0; + let group_vol = 0; + let client_count = 0; + for (let client of group.clients) { + if (online && !client.connected) + continue; + group_vol += client.config.volume.percent; + ++client_count; + } + if (client_count == 0) + return 0; + return group_vol / client_count; + } + getGroupFromClient(client_id) { + for (let group of this.server.groups) + for (let client of group.clients) + if (client.id == client_id) + return group; + throw new Error(`group for client ${client_id} was null`); + } + getStreamFromClient(client_id) { + let group = this.getGroupFromClient(client_id); + return this.getStream(group.stream_id); + } + getMyStreamId() { + try { + let group = this.getGroupFromClient(SnapStream.getClientId()); + return this.getStream(group.stream_id).id; + } + catch (e) { + return ""; + } + } + getStream(stream_id) { + let stream = this.server.getStream(stream_id); + if (stream == null) { + throw new Error(`stream ${stream_id} was null`); + } + return stream; + } + setVolume(client_id, percent, mute) { + percent = Math.max(0, Math.min(100, percent)); + let client = this.getClient(client_id); + client.config.volume.percent = percent; + if (mute != undefined) + client.config.volume.muted = mute; + this.sendRequest('Client.SetVolume', { id: client_id, volume: { muted: client.config.volume.muted, percent: client.config.volume.percent } }); + } + setClientName(client_id, name) { + let client = this.getClient(client_id); + let current_name = (client.config.name != "") ? client.config.name : client.host.name; + if (name != current_name) { + this.sendRequest('Client.SetName', { id: client_id, name: name }); + client.config.name = name; + } + } + setClientLatency(client_id, latency) { + let client = this.getClient(client_id); + let current_latency = client.config.latency; + if (latency != current_latency) { + this.sendRequest('Client.SetLatency', { id: client_id, latency: latency }); + client.config.latency = latency; + } + } + deleteClient(client_id) { + this.sendRequest('Server.DeleteClient', { id: client_id }); + this.server.groups.forEach((g, gi) => { + g.clients.forEach((c, ci) => { + if (c.id == client_id) { + this.server.groups[gi].clients.splice(ci, 1); + } + }); + }); + this.server.groups.forEach((g, gi) => { + if (g.clients.length == 0) { + this.server.groups.splice(gi, 1); + } + }); + show(); + } + setStream(group_id, stream_id) { + this.getGroup(group_id).stream_id = stream_id; + this.updateProperties(stream_id); + this.sendRequest('Group.SetStream', { id: group_id, stream_id: stream_id }); + } + setClients(group_id, clients) { + this.status_req_id = this.sendRequest('Group.SetClients', { id: group_id, clients: clients }); + } + muteGroup(group_id, mute) { + this.getGroup(group_id).muted = mute; + this.sendRequest('Group.SetMute', { id: group_id, mute: mute }); + } + sendRequest(method, params) { + let msg = { + id: ++this.msg_id, + jsonrpc: '2.0', + method: method + }; + if (params) + msg.params = params; + let msgJson = JSON.stringify(msg); + console.log("Sending: " + msgJson); + this.connection.send(msgJson); + return this.msg_id; + } + onMessage(msg) { + let json_msg = JSON.parse(msg); + let is_response = (json_msg.id != undefined); + console.log("Received " + (is_response ? "response" : "notification") + ", json: " + JSON.stringify(json_msg)); + if (is_response) { + if (json_msg.id == this.status_req_id) { + this.server = new Server(json_msg.result.server); + this.updateProperties(this.getMyStreamId()); + show(); + } + } + else { + let refresh = false; + if (Array.isArray(json_msg)) { + for (let notification of json_msg) { + refresh = this.onNotification(notification) || refresh; + } + } + else { + refresh = this.onNotification(json_msg); + } + // TODO: don't update everything, but only the changed, + // e.g. update the values for the volume sliders + if (refresh) + show(); + } + } + baseUrl; + connection; + server; + msg_id; + status_req_id; +} +let snapcontrol; +let snapstream = null; +let hide_offline = true; +let autoplay_done = false; +let audio = document.createElement('audio'); +function autoplayRequested() { + return document.location.hash.match(/autoplay/) !== null; +} +function show() { + // Render the page + const versionElem = document.getElementsByTagName("meta").namedItem("version"); + console.log("Snapweb version " + (versionElem ? versionElem.content : "null")); + let play_img; + if (snapstream) { + play_img = 'stop.png'; + } + else { + play_img = 'play.png'; + } + let content = ""; + content += ""; + content += "
"; + let server = snapcontrol.server; + for (let group of server.groups) { + if (hide_offline) { + let groupActive = false; + for (let client of group.clients) { + if (client.connected) { + groupActive = true; + break; + } + } + if (!groupActive) + continue; + } + // Set mute variables + let classgroup; + let muted; + let mute_img; + if (group.muted == true) { + classgroup = 'group muted'; + muted = true; + mute_img = 'mute_icon.png'; + } + else { + classgroup = 'group'; + muted = false; + mute_img = 'speaker_icon.png'; + } + // Start group div + content += "
"; + // Create stream selection dropdown + let streamselect = ""; + // Group mute and refresh button + content += "
"; + content += streamselect; + // let cover_img: string = server.getStream(group.stream_id)!.properties.metadata.artUrl || "snapcast-512.png"; + // content += ""; + let clientCount = 0; + for (let client of group.clients) + if (!hide_offline || client.connected) + clientCount++; + if (clientCount > 1) { + let volume = snapcontrol.getGroupVolume(group, hide_offline); + // content += "
"; + content += ""; + content += "
"; + content += " "; + // content += " "; + content += "
"; + // content += "
"; + } + // transparent placeholder edit icon + content += "
"; + content += "
"; + content += "
"; + // Create clients in group + for (let client of group.clients) { + if (!client.connected && hide_offline) + continue; + // Set name and connection state vars, start client div + let name; + let clas = 'client'; + if (client.config.name != "") { + name = client.config.name; + } + else { + name = client.host.name; + } + if (client.connected == false) { + clas = 'client disconnected'; + } + content += "
"; + // Client mute status vars + let muted; + let mute_img; + let sliderclass; + if (client.config.volume.muted == true) { + muted = true; + sliderclass = 'slider muted'; + mute_img = 'mute_icon.png'; + } + else { + sliderclass = 'slider'; + muted = false; + mute_img = 'speaker_icon.png'; + } + // Populate client div + content += ""; + content += "
"; + content += " "; + content += "
"; + content += " "; + content += " "; + if (client.connected == false) { + content += " 🗑"; + content += " "; + } + else { + content += ""; + } + content += "
" + name + "
"; + content += "
"; + } + content += "
"; + } + content += "
"; // content + content += "
"; + content += "
"; + content += "
"; + content += " "; + content += " "; + content += " "; + content += " "; + content += " "; + content += " "; + content += " "; + content += "
"; + content += "
"; + content += "
"; + // Pad then update page + content = content + "

"; + document.getElementById('show').innerHTML = content; + let playElem = document.getElementById('play-button'); + playElem.onclick = () => { + play(); + }; + for (let group of snapcontrol.server.groups) { + if (group.clients.length > 1) { + let slider = document.getElementById("vol_" + group.id); + if (slider == null) + continue; + slider.addEventListener('pointerdown', function () { + groupVolumeEnter(group.id); + }); + slider.addEventListener('touchstart', function () { + groupVolumeEnter(group.id); + }); + } + } +} +function updateGroupVolume(group) { + let group_vol = snapcontrol.getGroupVolume(group, hide_offline); + let slider = document.getElementById("vol_" + group.id); + if (slider == null) + return; + console.log("updateGroupVolume group: " + group.id + ", volume: " + group_vol + ", slider: " + (slider != null)); + slider.value = String(group_vol); +} +let client_volumes; +let group_volume; +function setGroupVolume(group_id) { + let group = snapcontrol.getGroup(group_id); + let percent = document.getElementById('vol_' + group.id).valueAsNumber; + console.log("setGroupVolume id: " + group.id + ", volume: " + percent); + // show() + let delta = percent - group_volume; + let ratio; + if (delta < 0) + ratio = (group_volume - percent) / group_volume; + else + ratio = (percent - group_volume) / (100 - group_volume); + for (let i = 0; i < group.clients.length; ++i) { + let new_volume = client_volumes[i]; + if (delta < 0) + new_volume -= ratio * client_volumes[i]; + else + new_volume += ratio * (100 - client_volumes[i]); + let client_id = group.clients[i].id; + // TODO: use batch request to update all client volumes at once + snapcontrol.setVolume(client_id, new_volume); + let slider = document.getElementById('vol_' + client_id); + if (slider) + slider.value = String(new_volume); + } +} +function groupVolumeEnter(group_id) { + let group = snapcontrol.getGroup(group_id); + let percent = document.getElementById('vol_' + group.id).valueAsNumber; + console.log("groupVolumeEnter id: " + group.id + ", volume: " + percent); + group_volume = percent; + client_volumes = []; + for (let i = 0; i < group.clients.length; ++i) { + client_volumes.push(group.clients[i].config.volume.percent); + } + // show() +} +function setVolume(id, mute) { + console.log("setVolume id: " + id + ", mute: " + mute); + let percent = document.getElementById('vol_' + id).valueAsNumber; + let client = snapcontrol.getClient(id); + let needs_update = (mute != client.config.volume.muted); + snapcontrol.setVolume(id, percent, mute); + let group = snapcontrol.getGroupFromClient(id); + updateGroupVolume(group); + if (needs_update) + show(); +} +function play() { + if (snapstream) { + snapstream.stop(); + snapstream = null; + audio.pause(); + audio.src = ''; + document.body.removeChild(audio); + } + else { + snapstream = new SnapStream(config.baseUrl); + // User interacted with the page. Let's play audio... + document.body.appendChild(audio); + audio.src = "10-seconds-of-silence.mp3"; + audio.loop = true; + audio.play().then(() => { + snapcontrol.updateProperties(snapcontrol.getMyStreamId()); + }); + } +} +function setMuteGroup(id, mute) { + snapcontrol.muteGroup(id, mute); + show(); +} +function setStream(id) { + snapcontrol.setStream(id, document.getElementById('stream_' + id).value); + show(); +} +function setGroup(client_id, group_id) { + console.log("setGroup id: " + client_id + ", group: " + group_id); + let server = snapcontrol.server; + // Get client group id + let current_group = snapcontrol.getGroupFromClient(client_id); + // Get + // List of target group's clients + // OR + // List of current group's other clients + let send_clients = []; + for (let i_group = 0; i_group < server.groups.length; i_group++) { + if (server.groups[i_group].id == group_id || (group_id == "new" && server.groups[i_group].id == current_group.id)) { + for (let i_client = 0; i_client < server.groups[i_group].clients.length; i_client++) { + if (group_id == "new" && server.groups[i_group].clients[i_client].id == client_id) { } + else { + send_clients[send_clients.length] = server.groups[i_group].clients[i_client].id; + } + } + } + } + if (group_id == "new") + group_id = current_group.id; + else + send_clients[send_clients.length] = client_id; + snapcontrol.setClients(group_id, send_clients); +} +function setName(id) { + // Get current name and lacency + let client = snapcontrol.getClient(id); + let current_name = (client.config.name != "") ? client.config.name : client.host.name; + let current_latency = client.config.latency; + let new_name = window.prompt("New Name", current_name); + let new_latency = Number(window.prompt("New Latency", String(current_latency))); + if (new_name != null) + snapcontrol.setClientName(id, new_name); + if (new_latency != null) + snapcontrol.setClientLatency(id, new_latency); + show(); +} +function openClientSettings(id) { + let modal = document.getElementById("client-settings"); + let client = snapcontrol.getClient(id); + let current_name = (client.config.name != "") ? client.config.name : client.host.name; + let name = document.getElementById("client-name"); + name.name = id; + name.value = current_name; + let latency = document.getElementById("client-latency"); + latency.valueAsNumber = client.config.latency; + let group = snapcontrol.getGroupFromClient(id); + let group_input = document.getElementById("client-group"); + while (group_input.length > 0) + group_input.remove(0); + let group_num = 0; + for (let ogroup of snapcontrol.server.groups) { + let option = document.createElement('option'); + option.value = ogroup.id; + option.text = "Group " + (group_num + 1) + " (" + ogroup.clients.length + " Clients)"; + group_input.add(option); + if (ogroup == group) { + console.log("Selected: " + group_num); + group_input.selectedIndex = group_num; + } + ++group_num; + } + let option = document.createElement('option'); + option.value = option.text = "new"; + group_input.add(option); + modal.style.display = "block"; +} +function closeClientSettings() { + let name = document.getElementById("client-name"); + let id = name.name; + console.log("onclose " + id + ", value: " + name.value); + snapcontrol.setClientName(id, name.value); + let latency = document.getElementById("client-latency"); + snapcontrol.setClientLatency(id, latency.valueAsNumber); + let group_input = document.getElementById("client-group"); + let option = group_input.options[group_input.selectedIndex]; + setGroup(id, option.value); + let modal = document.getElementById("client-settings"); + modal.style.display = "none"; + show(); +} +function deleteClient(id) { + if (confirm('Are you sure?')) { + snapcontrol.deleteClient(id); + } +} +window.onload = function () { + snapcontrol = new SnapControl(config.baseUrl); +}; +// When the user clicks anywhere outside of the modal, close it +window.onclick = function (event) { + let modal = document.getElementById("client-settings"); + if (event.target == modal) { + modal.style.display = "none"; + } +}; +//# sourceMappingURL=snapcontrol.js.map diff --git a/music_assistant/server/providers/snapcast/snapweb/snapstream.js b/music_assistant/server/providers/snapcast/snapweb/snapstream.js new file mode 100644 index 000000000..b431c1379 --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/snapstream.js @@ -0,0 +1,919 @@ +"use strict"; +function setCookie(key, value, exdays = -1) { + let d = new Date(); + if (exdays < 0) + exdays = 10 * 365; + d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); + let expires = "expires=" + d.toUTCString(); + document.cookie = key + "=" + value + ";" + expires + ";sameSite=Strict;path=/"; +} +function getPersistentValue(key, defaultValue = "") { + if (!!window.localStorage) { + const value = window.localStorage.getItem(key); + if (value !== null) { + return value; + } + window.localStorage.setItem(key, defaultValue); + return defaultValue; + } + // Fallback to cookies if localStorage is not available. + let name = key + "="; + let decodedCookie = decodeURIComponent(document.cookie); + let ca = decodedCookie.split(';'); + for (let c of ca) { + c = c.trimLeft(); + if (c.indexOf(name) == 0) { + return c.substring(name.length, c.length); + } + } + setCookie(key, defaultValue); + return defaultValue; +} +function getChromeVersion() { + const raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); + return raw ? parseInt(raw[2]) : null; +} +function uuidv4() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); +} +class Tv { + constructor(sec, usec) { + this.sec = sec; + this.usec = usec; + } + setMilliseconds(ms) { + this.sec = Math.floor(ms / 1000); + this.usec = Math.floor(ms * 1000) % 1000000; + } + getMilliseconds() { + return this.sec * 1000 + this.usec / 1000; + } + sec = 0; + usec = 0; +} +class BaseMessage { + constructor(_buffer) { + } + deserialize(buffer) { + let view = new DataView(buffer); + this.type = view.getUint16(0, true); + this.id = view.getUint16(2, true); + this.refersTo = view.getUint16(4, true); + this.received = new Tv(view.getInt32(6, true), view.getInt32(10, true)); + this.sent = new Tv(view.getInt32(14, true), view.getInt32(18, true)); + this.size = view.getUint32(22, true); + } + serialize() { + this.size = 26 + this.getSize(); + let buffer = new ArrayBuffer(this.size); + let view = new DataView(buffer); + view.setUint16(0, this.type, true); + view.setUint16(2, this.id, true); + view.setUint16(4, this.refersTo, true); + view.setInt32(6, this.sent.sec, true); + view.setInt32(10, this.sent.usec, true); + view.setInt32(14, this.received.sec, true); + view.setInt32(18, this.received.usec, true); + view.setUint32(22, this.size, true); + return buffer; + } + getSize() { + return 0; + } + type = 0; + id = 0; + refersTo = 0; + received = new Tv(0, 0); + sent = new Tv(0, 0); + size = 0; +} +class CodecMessage extends BaseMessage { + constructor(buffer) { + super(buffer); + this.payload = new ArrayBuffer(0); + if (buffer) { + this.deserialize(buffer); + } + this.type = 1; + } + deserialize(buffer) { + super.deserialize(buffer); + let view = new DataView(buffer); + let codecSize = view.getInt32(26, true); + let decoder = new TextDecoder("utf-8"); + this.codec = decoder.decode(buffer.slice(30, 30 + codecSize)); + let payloadSize = view.getInt32(30 + codecSize, true); + console.log("payload size: " + payloadSize); + this.payload = buffer.slice(34 + codecSize, 34 + codecSize + payloadSize); + console.log("payload: " + this.payload); + } + codec = ""; + payload; +} +class TimeMessage extends BaseMessage { + constructor(buffer) { + super(buffer); + if (buffer) { + this.deserialize(buffer); + } + this.type = 4; + } + deserialize(buffer) { + super.deserialize(buffer); + let view = new DataView(buffer); + this.latency = new Tv(view.getInt32(26, true), view.getInt32(30, true)); + } + serialize() { + let buffer = super.serialize(); + let view = new DataView(buffer); + view.setInt32(26, this.latency.sec, true); + view.setInt32(30, this.latency.usec, true); + return buffer; + } + getSize() { + return 8; + } + latency = new Tv(0, 0); +} +class JsonMessage extends BaseMessage { + constructor(buffer) { + super(buffer); + if (buffer) { + this.deserialize(buffer); + } + } + deserialize(buffer) { + super.deserialize(buffer); + let view = new DataView(buffer); + let size = view.getUint32(26, true); + let decoder = new TextDecoder(); + this.json = JSON.parse(decoder.decode(buffer.slice(30, 30 + size))); + } + serialize() { + let buffer = super.serialize(); + let view = new DataView(buffer); + let jsonStr = JSON.stringify(this.json); + view.setUint32(26, jsonStr.length, true); + let encoder = new TextEncoder(); + let encoded = encoder.encode(jsonStr); + for (let i = 0; i < encoded.length; ++i) + view.setUint8(30 + i, encoded[i]); + return buffer; + } + getSize() { + let encoder = new TextEncoder(); + let encoded = encoder.encode(JSON.stringify(this.json)); + return encoded.length + 4; + // return JSON.stringify(this.json).length; + } + json; +} +class HelloMessage extends JsonMessage { + constructor(buffer) { + super(buffer); + if (buffer) { + this.deserialize(buffer); + } + this.type = 5; + } + deserialize(buffer) { + super.deserialize(buffer); + this.mac = this.json["MAC"]; + this.hostname = this.json["HostName"]; + this.version = this.json["Version"]; + this.clientName = this.json["ClientName"]; + this.os = this.json["OS"]; + this.arch = this.json["Arch"]; + this.instance = this.json["Instance"]; + this.uniqueId = this.json["ID"]; + this.snapStreamProtocolVersion = this.json["SnapStreamProtocolVersion"]; + } + serialize() { + this.json = { "MAC": this.mac, "HostName": this.hostname, "Version": this.version, "ClientName": this.clientName, "OS": this.os, "Arch": this.arch, "Instance": this.instance, "ID": this.uniqueId, "SnapStreamProtocolVersion": this.snapStreamProtocolVersion }; + return super.serialize(); + } + mac = ""; + hostname = ""; + version = "0.0.0"; + clientName = "Snapweb"; + os = ""; + arch = "web"; + instance = 1; + uniqueId = ""; + snapStreamProtocolVersion = 2; +} +class ServerSettingsMessage extends JsonMessage { + constructor(buffer) { + super(buffer); + if (buffer) { + this.deserialize(buffer); + } + this.type = 3; + } + deserialize(buffer) { + super.deserialize(buffer); + this.bufferMs = this.json["bufferMs"]; + this.latency = this.json["latency"]; + this.volumePercent = this.json["volume"]; + this.muted = this.json["muted"]; + } + serialize() { + this.json = { "bufferMs": this.bufferMs, "latency": this.latency, "volume": this.volumePercent, "muted": this.muted }; + return super.serialize(); + } + bufferMs = 0; + latency = 0; + volumePercent = 0; + muted = false; +} +class PcmChunkMessage extends BaseMessage { + constructor(buffer, sampleFormat) { + super(buffer); + this.deserialize(buffer); + this.sampleFormat = sampleFormat; + this.type = 2; + } + deserialize(buffer) { + super.deserialize(buffer); + let view = new DataView(buffer); + this.timestamp = new Tv(view.getInt32(26, true), view.getInt32(30, true)); + // this.payloadSize = view.getUint32(34, true); + this.payload = buffer.slice(38); //, this.payloadSize + 38));// , this.payloadSize); + // console.log("ts: " + this.timestamp.sec + " " + this.timestamp.usec + ", payload: " + this.payloadSize + ", len: " + this.payload.byteLength); + } + readFrames(frames) { + let frameCnt = frames; + let frameSize = this.sampleFormat.frameSize(); + if (this.idx + frames > this.payloadSize() / frameSize) + frameCnt = (this.payloadSize() / frameSize) - this.idx; + let begin = this.idx * frameSize; + this.idx += frameCnt; + let end = begin + frameCnt * frameSize; + // console.log("readFrames: " + frames + ", result: " + frameCnt + ", begin: " + begin + ", end: " + end + ", payload: " + this.payload.byteLength); + return this.payload.slice(begin, end); + } + getFrameCount() { + return (this.payloadSize() / this.sampleFormat.frameSize()); + } + isEndOfChunk() { + return this.idx >= this.getFrameCount(); + } + startMs() { + return this.timestamp.getMilliseconds() + 1000 * (this.idx / this.sampleFormat.rate); + } + duration() { + return 1000 * ((this.getFrameCount() - this.idx) / this.sampleFormat.rate); + } + payloadSize() { + return this.payload.byteLength; + } + clearPayload() { + this.payload = new ArrayBuffer(0); + } + addPayload(buffer) { + let payload = new ArrayBuffer(this.payload.byteLength + buffer.byteLength); + let view = new DataView(payload); + let viewOld = new DataView(this.payload); + let viewNew = new DataView(buffer); + for (let i = 0; i < viewOld.byteLength; ++i) { + view.setInt8(i, viewOld.getInt8(i)); + } + for (let i = 0; i < viewNew.byteLength; ++i) { + view.setInt8(i + viewOld.byteLength, viewNew.getInt8(i)); + } + this.payload = payload; + } + timestamp = new Tv(0, 0); + // payloadSize: number = 0; + payload = new ArrayBuffer(0); + idx = 0; + sampleFormat; +} +class AudioStream { + timeProvider; + sampleFormat; + bufferMs; + constructor(timeProvider, sampleFormat, bufferMs) { + this.timeProvider = timeProvider; + this.sampleFormat = sampleFormat; + this.bufferMs = bufferMs; + } + chunks = new Array(); + setVolume(percent, muted) { + // let base = 10; + this.volume = percent / 100; // (Math.pow(base, percent / 100) - 1) / (base - 1); + console.log("setVolume: " + percent + " => " + this.volume + ", muted: " + this.muted); + this.muted = muted; + } + addChunk(chunk) { + this.chunks.push(chunk); + // let oldest = this.timeProvider.serverNow() - this.chunks[0].timestamp.getMilliseconds(); + // let newest = this.timeProvider.serverNow() - this.chunks[this.chunks.length - 1].timestamp.getMilliseconds(); + // console.debug("chunks: " + this.chunks.length + ", oldest: " + oldest.toFixed(2) + ", newest: " + newest.toFixed(2)); + while (this.chunks.length > 0) { + let age = this.timeProvider.serverNow() - this.chunks[0].timestamp.getMilliseconds(); + // todo: consider buffer ms + if (age > 5000 + this.bufferMs) { + this.chunks.shift(); + console.log("Dropping old chunk: " + age.toFixed(2) + ", left: " + this.chunks.length); + } + else + break; + } + } + getNextBuffer(buffer, playTimeMs) { + if (!this.chunk) { + this.chunk = this.chunks.shift(); + } + // let age = this.timeProvider.serverTime(this.playTime * 1000) - startMs; + let frames = buffer.length; + // console.debug("getNextBuffer: " + frames + ", play time: " + playTimeMs.toFixed(2)); + let left = new Float32Array(frames); + let right = new Float32Array(frames); + let read = 0; + let pos = 0; + // let volume = this.muted ? 0 : this.volume; + let serverPlayTimeMs = this.timeProvider.serverTime(playTimeMs); + if (this.chunk) { + let age = serverPlayTimeMs - this.chunk.startMs(); // - 500; + let reqChunkDuration = frames / this.sampleFormat.msRate(); + let secs = Math.floor(Date.now() / 1000); + if (this.lastLog != secs) { + this.lastLog = secs; + console.log("age: " + age.toFixed(2) + ", req: " + reqChunkDuration); + } + if (age < -reqChunkDuration) { + console.log("age: " + age.toFixed(2) + " < req: " + reqChunkDuration * -1 + ", chunk.startMs: " + this.chunk.startMs().toFixed(2) + ", timestamp: " + this.chunk.timestamp.getMilliseconds().toFixed(2)); + console.log("Chunk too young, returning silence"); + } + else { + if (Math.abs(age) > 5) { + // We are 5ms apart, do a hard sync, i.e. don't play faster/slower, + // but seek to the desired position instead + while (this.chunk && age > this.chunk.duration()) { + console.log("Chunk too old, dropping (age: " + age.toFixed(2) + " > " + this.chunk.duration().toFixed(2) + ")"); + this.chunk = this.chunks.shift(); + if (!this.chunk) + break; + age = serverPlayTimeMs - this.chunk.startMs(); + } + if (this.chunk) { + if (age > 0) { + console.log("Fast forwarding " + age.toFixed(2) + "ms"); + this.chunk.readFrames(Math.floor(age * this.chunk.sampleFormat.msRate())); + } + else if (age < 0) { + console.log("Playing silence " + -age.toFixed(2) + "ms"); + let silentFrames = Math.floor(-age * this.chunk.sampleFormat.msRate()); + left.fill(0, 0, silentFrames); + right.fill(0, 0, silentFrames); + read = silentFrames; + pos = silentFrames; + } + age = 0; + } + } + // else if (age > 0.1) { + // let rate = age * 0.0005; + // rate = 1.0 - Math.min(rate, 0.0005); + // console.debug("Age > 0, rate: " + rate); + // // we are late (age > 0), this means we are not playing fast enough + // // => the real sample rate seems to be lower, we have to drop some frames + // this.setRealSampleRate(this.sampleFormat.rate * rate); // 0.9999); + // } + // else if (age < -0.1) { + // let rate = -age * 0.0005; + // rate = 1.0 + Math.min(rate, 0.0005); + // console.debug("Age < 0, rate: " + rate); + // // we are early (age > 0), this means we are playing too fast + // // => the real sample rate seems to be higher, we have to insert some frames + // this.setRealSampleRate(this.sampleFormat.rate * rate); // 0.9999); + // } + // else { + // this.setRealSampleRate(this.sampleFormat.rate); + // } + let addFrames = 0; + let everyN = 0; + if (age > 0.1) { + addFrames = Math.ceil(age); // / 5); + } + else if (age < -0.1) { + addFrames = Math.floor(age); // / 5); + } + // addFrames = -2; + let readFrames = frames + addFrames - read; + if (addFrames != 0) + everyN = Math.ceil((frames + addFrames - read) / (Math.abs(addFrames) + 1)); + // addFrames = 0; + // console.debug("frames: " + frames + ", readFrames: " + readFrames + ", addFrames: " + addFrames + ", everyN: " + everyN); + while ((read < readFrames) && this.chunk) { + let pcmChunk = this.chunk; + let pcmBuffer = pcmChunk.readFrames(readFrames - read); + let payload = new Int16Array(pcmBuffer); + // console.debug("readFrames: " + (frames - read) + ", read: " + pcmBuffer.byteLength + ", payload: " + payload.length); + // read += (pcmBuffer.byteLength / this.sampleFormat.frameSize()); + for (let i = 0; i < payload.length; i += 2) { + read++; + left[pos] = (payload[i] / 32768); // * volume; + right[pos] = (payload[i + 1] / 32768); // * volume; + if ((everyN != 0) && (read % everyN == 0)) { + if (addFrames > 0) { + pos--; + } + else { + left[pos + 1] = left[pos]; + right[pos + 1] = right[pos]; + pos++; + // console.log("Add: " + pos); + } + } + pos++; + } + if (pcmChunk.isEndOfChunk()) { + this.chunk = this.chunks.shift(); + } + } + if (addFrames != 0) + console.debug("Pos: " + pos + ", frames: " + frames + ", add: " + addFrames + ", everyN: " + everyN); + if (read == readFrames) + read = frames; + } + } + if (read < frames) { + console.log("Failed to get chunk, read: " + read + "/" + frames + ", chunks left: " + this.chunks.length); + left.fill(0, pos); + right.fill(0, pos); + } + // copyToChannel is not supported by Safari + buffer.getChannelData(0).set(left); + buffer.getChannelData(1).set(right); + } + // setRealSampleRate(sampleRate: number) { + // if (sampleRate == this.sampleFormat.rate) { + // this.correctAfterXFrames = 0; + // } + // else { + // this.correctAfterXFrames = Math.ceil((this.sampleFormat.rate / sampleRate) / (this.sampleFormat.rate / sampleRate - 1.)); + // console.debug("setRealSampleRate: " + sampleRate + ", correct after X: " + this.correctAfterXFrames); + // } + // } + chunk = undefined; + volume = 1; + muted = false; + lastLog = 0; +} +class TimeProvider { + constructor(ctx = undefined) { + if (ctx) { + this.setAudioContext(ctx); + } + } + setAudioContext(ctx) { + this.ctx = ctx; + this.reset(); + } + reset() { + this.diffBuffer.length = 0; + this.diff = 0; + } + setDiff(c2s, s2c) { + if (this.now() == 0) { + this.reset(); + } + else { + if (this.diffBuffer.push((c2s - s2c) / 2) > 100) + this.diffBuffer.shift(); + let sorted = [...this.diffBuffer]; + sorted.sort(); + this.diff = sorted[Math.floor(sorted.length / 2)]; + } + // console.debug("c2s: " + c2s.toFixed(2) + ", s2c: " + s2c.toFixed(2) + ", diff: " + this.diff.toFixed(2) + ", now: " + this.now().toFixed(2) + ", server.now: " + this.serverNow().toFixed(2) + ", win.now: " + window.performance.now().toFixed(2)); + // console.log("now: " + this.now() + "\t" + this.now() + "\t" + this.now()); + } + now() { + if (!this.ctx) { + return window.performance.now(); + } + else { + // Use the more accurate getOutputTimestamp if available, fallback to ctx.currentTime otherwise. + const contextTime = !!this.ctx.getOutputTimestamp ? this.ctx.getOutputTimestamp().contextTime : undefined; + return (contextTime !== undefined ? contextTime : this.ctx.currentTime) * 1000; + } + } + nowSec() { + return this.now() / 1000; + } + serverNow() { + return this.serverTime(this.now()); + } + serverTime(localTimeMs) { + return localTimeMs + this.diff; + } + diffBuffer = new Array(); + diff = 0; + ctx; +} +class SampleFormat { + rate = 48000; + channels = 2; + bits = 16; + msRate() { + return this.rate / 1000; + } + toString() { + return this.rate + ":" + this.bits + ":" + this.channels; + } + sampleSize() { + if (this.bits == 24) { + return 4; + } + return this.bits / 8; + } + frameSize() { + return this.channels * this.sampleSize(); + } + durationMs(bytes) { + return (bytes / this.frameSize()) * this.msRate(); + } +} +class Decoder { + setHeader(_buffer) { + return new SampleFormat(); + } + decode(_chunk) { + return null; + } +} +class OpusDecoder extends Decoder { + setHeader(buffer) { + let view = new DataView(buffer); + let ID_OPUS = 0x4F505553; + if (buffer.byteLength < 12) { + console.error("Opus header too small: " + buffer.byteLength); + return null; + } + else if (view.getUint32(0, true) != ID_OPUS) { + console.error("Opus header too small: " + buffer.byteLength); + return null; + } + let format = new SampleFormat(); + format.rate = view.getUint32(4, true); + format.bits = view.getUint16(8, true); + format.channels = view.getUint16(10, true); + console.log("Opus samplerate: " + format.toString()); + return format; + } + decode(_chunk) { + return null; + } +} +class FlacDecoder extends Decoder { + constructor() { + super(); + this.decoder = Flac.create_libflac_decoder(true); + if (this.decoder) { + let init_status = Flac.init_decoder_stream(this.decoder, this.read_callback_fn.bind(this), this.write_callback_fn.bind(this), this.error_callback_fn.bind(this), this.metadata_callback_fn.bind(this), false); + console.log("Flac init: " + init_status); + Flac.setOptions(this.decoder, { analyseSubframes: true, analyseResiduals: true }); + } + this.sampleFormat = new SampleFormat(); + this.flacChunk = new ArrayBuffer(0); + // this.pcmChunk = new PcmChunkMessage(); + // Flac.setOptions(this.decoder, {analyseSubframes: analyse_frames, analyseResiduals: analyse_residuals}); + // flac_ok &= init_status == 0; + // console.log("flac init : " + flac_ok);//DEBUG + } + decode(chunk) { + // console.log("Flac decode: " + chunk.payload.byteLength); + this.flacChunk = chunk.payload.slice(0); + this.pcmChunk = chunk; + this.pcmChunk.clearPayload(); + this.cacheInfo = { cachedBlocks: 0, isCachedChunk: true }; + // console.log("Flac len: " + this.flacChunk.byteLength); + while (this.flacChunk.byteLength && Flac.FLAC__stream_decoder_process_single(this.decoder)) { + Flac.FLAC__stream_decoder_get_state(this.decoder); + // let state = Flac.FLAC__stream_decoder_get_state(this.decoder); + // console.log("State: " + state); + } + // console.log("Pcm payload: " + this.pcmChunk!.payloadSize()); + if (this.cacheInfo.cachedBlocks > 0) { + let diffMs = this.cacheInfo.cachedBlocks / this.sampleFormat.msRate(); + // console.log("Cached: " + this.cacheInfo.cachedBlocks + ", " + diffMs + "ms"); + this.pcmChunk.timestamp.setMilliseconds(this.pcmChunk.timestamp.getMilliseconds() - diffMs); + } + return this.pcmChunk; + } + read_callback_fn(bufferSize) { + // console.log(' decode read callback, buffer bytes max=', bufferSize); + if (this.header) { + console.log(" header: " + this.header.byteLength); + let data = new Uint8Array(this.header); + this.header = null; + return { buffer: data, readDataLength: data.byteLength, error: false }; + } + else if (this.flacChunk) { + // console.log(" flacChunk: " + this.flacChunk.byteLength); + // a fresh read => next call to write will not be from cached data + this.cacheInfo.isCachedChunk = false; + let data = new Uint8Array(this.flacChunk.slice(0, Math.min(bufferSize, this.flacChunk.byteLength))); + this.flacChunk = this.flacChunk.slice(data.byteLength); + return { buffer: data, readDataLength: data.byteLength, error: false }; + } + return { buffer: new Uint8Array(0), readDataLength: 0, error: false }; + } + write_callback_fn(data, frameInfo) { + // console.log(" write frame metadata: " + frameInfo + ", len: " + data.length); + if (this.cacheInfo.isCachedChunk) { + // there was no call to read, so it's some cached data + this.cacheInfo.cachedBlocks += frameInfo.blocksize; + } + let payload = new ArrayBuffer((frameInfo.bitsPerSample / 8) * frameInfo.channels * frameInfo.blocksize); + let view = new DataView(payload); + for (let channel = 0; channel < frameInfo.channels; ++channel) { + let channelData = new DataView(data[channel].buffer, 0, data[channel].buffer.byteLength); + // console.log("channelData: " + channelData.byteLength + ", blocksize: " + frameInfo.blocksize); + for (let i = 0; i < frameInfo.blocksize; ++i) { + view.setInt16(2 * (frameInfo.channels * i + channel), channelData.getInt16(2 * i, true), true); + } + } + this.pcmChunk.addPayload(payload); + // console.log("write: " + payload.byteLength + ", len: " + this.pcmChunk!.payloadSize()); + } + /** @memberOf decode */ + metadata_callback_fn(data) { + console.info('meta data: ', data); + // let view = new DataView(data); + this.sampleFormat.rate = data.sampleRate; + this.sampleFormat.channels = data.channels; + this.sampleFormat.bits = data.bitsPerSample; + console.log("metadata_callback_fn, sampleformat: " + this.sampleFormat.toString()); + } + /** @memberOf decode */ + error_callback_fn(err, errMsg) { + console.error('decode error callback', err, errMsg); + } + setHeader(buffer) { + this.header = buffer.slice(0); + Flac.FLAC__stream_decoder_process_until_end_of_metadata(this.decoder); + return this.sampleFormat; + } + sampleFormat; + decoder; + header = null; + flacChunk; + pcmChunk; + cacheInfo = { isCachedChunk: false, cachedBlocks: 0 }; +} +class PlayBuffer { + constructor(buffer, playTime, source, destination) { + this.buffer = buffer; + this.playTime = playTime; + this.source = source; + this.source.buffer = this.buffer; + this.source.connect(destination); + this.onended = (_playBuffer) => { }; + } + onended; + start() { + this.source.onended = () => { + this.onended(this); + }; + this.source.start(this.playTime); + } + buffer; + playTime; + source; + num = 0; +} +class PcmDecoder extends Decoder { + setHeader(buffer) { + let sampleFormat = new SampleFormat(); + let view = new DataView(buffer); + sampleFormat.channels = view.getUint16(22, true); + sampleFormat.rate = view.getUint32(24, true); + sampleFormat.bits = view.getUint16(34, true); + return sampleFormat; + } + decode(chunk) { + return chunk; + } +} +class SnapStream { + constructor(baseUrl) { + this.baseUrl = baseUrl; + this.timeProvider = new TimeProvider(); + if (this.setupAudioContext()) { + this.connect(); + } + else { + alert("Sorry, but the Web Audio API is not supported by your browser"); + } + } + setupAudioContext() { + let AudioContext = window.AudioContext // Default + || window.webkitAudioContext // Safari and old versions of Chrome + || false; + if (AudioContext) { + let options; + options = { latencyHint: "playback", sampleRate: this.sampleFormat ? this.sampleFormat.rate : undefined }; + const chromeVersion = getChromeVersion(); + if ((chromeVersion !== null && chromeVersion < 55) || !window.AudioContext) { + // Some older browsers won't decode the stream if options are provided. + options = undefined; + } + this.ctx = new AudioContext(options); + this.gainNode = this.ctx.createGain(); + this.gainNode.connect(this.ctx.destination); + } + else { + // Web Audio API is not supported + return false; + } + return true; + } + static getClientId() { + return getPersistentValue("uniqueId", uuidv4()); + } + connect() { + this.streamsocket = new WebSocket(this.baseUrl + '/stream'); + this.streamsocket.binaryType = "arraybuffer"; + this.streamsocket.onmessage = (ev) => this.onMessage(ev); + this.streamsocket.onopen = () => { + console.log("on open"); + let hello = new HelloMessage(); + hello.mac = "00:00:00:00:00:00"; + hello.arch = "web"; + hello.os = navigator.platform; + hello.hostname = "Snapweb client"; + hello.uniqueId = SnapStream.getClientId(); + const versionElem = document.getElementsByTagName("meta").namedItem("version"); + hello.version = versionElem ? versionElem.content : "0.0.0"; + this.sendMessage(hello); + this.syncTime(); + this.syncHandle = window.setInterval(() => this.syncTime(), 1000); + }; + this.streamsocket.onerror = (ev) => { console.error('error:', ev); }; + this.streamsocket.onclose = () => { + window.clearInterval(this.syncHandle); + console.info('connection lost, reconnecting in 1s'); + setTimeout(() => this.connect(), 1000); + }; + } + onMessage(msg) { + let view = new DataView(msg.data); + let type = view.getUint16(0, true); + if (type == 1) { + let codec = new CodecMessage(msg.data); + console.log("Codec: " + codec.codec); + if (codec.codec == "flac") { + this.decoder = new FlacDecoder(); + } + else if (codec.codec == "pcm") { + this.decoder = new PcmDecoder(); + } + else if (codec.codec == "opus") { + this.decoder = new OpusDecoder(); + alert("Codec not supported: " + codec.codec); + } + else { + alert("Codec not supported: " + codec.codec); + } + if (this.decoder) { + this.sampleFormat = this.decoder.setHeader(codec.payload); + console.log("Sampleformat: " + this.sampleFormat.toString()); + if ((this.sampleFormat.channels != 2) || (this.sampleFormat.bits != 16)) { + alert("Stream must be stereo with 16 bit depth, actual format: " + this.sampleFormat.toString()); + } + else { + if (this.bufferDurationMs != 0) { + this.bufferFrameCount = Math.floor(this.bufferDurationMs * this.sampleFormat.msRate()); + } + if (window.AudioContext) { + // we are not using webkitAudioContext, so it's safe to setup a new AudioContext with the new samplerate + // since this code is not triggered by direct user input, we cannt create a webkitAudioContext here + this.stopAudio(); + this.setupAudioContext(); + } + this.ctx.resume(); + this.timeProvider.setAudioContext(this.ctx); + this.gainNode.gain.value = this.serverSettings.muted ? 0 : this.serverSettings.volumePercent / 100; + // this.timeProvider = new TimeProvider(this.ctx); + this.stream = new AudioStream(this.timeProvider, this.sampleFormat, this.bufferMs); + this.latency = (this.ctx.baseLatency !== undefined ? this.ctx.baseLatency : 0) + (this.ctx.outputLatency !== undefined ? this.ctx.outputLatency : 0); + console.log("Base latency: " + this.ctx.baseLatency + ", output latency: " + this.ctx.outputLatency + ", latency: " + this.latency); + this.play(); + } + } + } + else if (type == 2) { + let pcmChunk = new PcmChunkMessage(msg.data, this.sampleFormat); + if (this.decoder) { + let decoded = this.decoder.decode(pcmChunk); + if (decoded) { + this.stream.addChunk(decoded); + } + } + } + else if (type == 3) { + this.serverSettings = new ServerSettingsMessage(msg.data); + this.gainNode.gain.value = this.serverSettings.muted ? 0 : this.serverSettings.volumePercent / 100; + this.bufferMs = this.serverSettings.bufferMs - this.serverSettings.latency; + console.log("ServerSettings bufferMs: " + this.serverSettings.bufferMs + ", latency: " + this.serverSettings.latency + ", volume: " + this.serverSettings.volumePercent + ", muted: " + this.serverSettings.muted); + } + else if (type == 4) { + if (this.timeProvider) { + let time = new TimeMessage(msg.data); + this.timeProvider.setDiff(time.latency.getMilliseconds(), this.timeProvider.now() - time.sent.getMilliseconds()); + } + // console.log("Time sec: " + time.latency.sec + ", usec: " + time.latency.usec + ", diff: " + this.timeProvider.diff); + } + else { + console.info("Message not handled, type: " + type); + } + } + sendMessage(msg) { + msg.sent = new Tv(0, 0); + msg.sent.setMilliseconds(this.timeProvider.now()); + msg.id = ++this.msgId; + if (this.streamsocket.readyState == this.streamsocket.OPEN) { + this.streamsocket.send(msg.serialize()); + } + } + syncTime() { + let t = new TimeMessage(); + t.latency.setMilliseconds(this.timeProvider.now()); + this.sendMessage(t); + // console.log("prepareSource median: " + Math.round(this.median * 10) / 10); + } + stopAudio() { + // if (this.ctx) { + // this.ctx.close(); + // } + this.ctx.suspend(); + while (this.audioBuffers.length > 0) { + let buffer = this.audioBuffers.pop(); + buffer.onended = () => { }; + buffer.source.stop(); + } + while (this.freeBuffers.length > 0) { + this.freeBuffers.pop(); + } + } + stop() { + window.clearInterval(this.syncHandle); + this.stopAudio(); + if ([WebSocket.OPEN, WebSocket.CONNECTING].includes(this.streamsocket.readyState)) { + this.streamsocket.onclose = () => { }; + this.streamsocket.close(); + } + } + play() { + this.playTime = this.timeProvider.nowSec() + 0.1; + for (let i = 1; i <= this.audioBufferCount; ++i) { + this.playNext(); + } + } + playNext() { + let buffer = this.freeBuffers.pop() || this.ctx.createBuffer(this.sampleFormat.channels, this.bufferFrameCount, this.sampleFormat.rate); + let playTimeMs = (this.playTime + this.latency) * 1000 - this.bufferMs; + this.stream.getNextBuffer(buffer, playTimeMs); + let source = this.ctx.createBufferSource(); + let playBuffer = new PlayBuffer(buffer, this.playTime, source, this.gainNode); + this.audioBuffers.push(playBuffer); + playBuffer.num = ++this.bufferNum; + playBuffer.onended = (buffer) => { + // let diff = this.timeProvider.nowSec() - buffer.playTime; + this.freeBuffers.push(this.audioBuffers.splice(this.audioBuffers.indexOf(buffer), 1)[0].buffer); + // console.debug("PlayBuffer " + playBuffer.num + " ended after: " + (diff * 1000) + ", in flight: " + this.audioBuffers.length); + this.playNext(); + }; + playBuffer.start(); + this.playTime += this.bufferFrameCount / this.sampleFormat.rate; + } + baseUrl; + streamsocket; + playTime = 0; + msgId = 0; + bufferDurationMs = 80; // 0; + bufferFrameCount = 3844; // 9600; // 2400;//8192; + syncHandle = -1; + // ageBuffer: Array; + audioBuffers = new Array(); + freeBuffers = new Array(); + timeProvider; + stream; + ctx; // | undefined; + gainNode; + serverSettings; + decoder; + sampleFormat; + // median: number = 0; + audioBufferCount = 3; + bufferMs = 1000; + bufferNum = 0; + latency = 0; +} +//# sourceMappingURL=snapstream.js.map diff --git a/music_assistant/server/providers/snapcast/snapweb/speaker_icon.png b/music_assistant/server/providers/snapcast/snapweb/speaker_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ae8554d74a4e3caa85a70b1346543ff6ad8c2c5c GIT binary patch literal 3883 zcmV+`57h99P)_WBMX5k=1Z0L`fDu`#Ii@ZR@{y^SuS~7f!Sb1vnxKZ^E1O5K9&b{9Iefxa(-udp#y|;VMTHj*$&Uen)XaCRM zXPL@wVqG&F3#dGqEO zwEs2AC3x7(U^ss6+_~@OQdda=FmBwqgX!emJbM|PeXncRu7l^zoA;kw7?I1jb#--@ zAa$1q%K*r%9zA+A&Y3f3L$>vm8~}9w2s(co9o#XZleI`ebGA&#^*aW@Qp$|9%0b&@ z^XJbGf#YkVWB_PtYU;Xl>C!Xk$hADZqnO4>Y+x>UGFQfC`+XDu)Uh53JRAvJludml z0RTF;=cY}Yenf}P=jocMV;v2EPX#6DLJD4i-kRp-=JzwvTJ!*5>GbQ~z56XN_1H|E zN#u7l07$^6Xlo8nbp%a6M-85riRPjPfR28F4$S1K$<&e5{Eh}dZH*s4e(;tpTNd!= z&K}x6MiM46A3POBd(i?w2S>=R=h;6O=Ih(e06^`ail)Hi+auKC5~R02$|@>K02uk- zpi|fL^v{*~`2Ya$`!c#G0p#vXsBg5iv^=?d`SSHaT4We3S+Zm%Ae<0E=V_>-U;FZl z3IO!|Hlzz7_A;LC?O}dg09fGd0^_xs9+hYx2G3_wJ>HsB$BrGl8w;?dl=-}e-Zy&o z>^Wlg?AdFq{GtKCjk=#f_bcCk zfu0L7i)B8CQml@)cZ3GZp-XqBgEM$PDIayl0H6wH{uLVbG3eL=jZ>IZwE|B|&P<-q z%h4A7(DM%@dnj&-)gfT>(cw6C)YjJSiwLVz!{XGFTDH9axW(Sf)HTRM%fEPEgHB%= z%tv*Nr`;!b-_0E9RaNHz-VH?s07Q?3=(`|l&wMdo^|TiNl|>q_W29@r=Sz>SS+k~b z#flZ1Qa^CuJ;J*qJOy9Ifp-w|$j7Pq1yezYx;%-}n>*x_`FQ|9>QJ`(z8<=^I#nc3 zY+3@mT20tKDd7FlNRL2DrcMVyBW2mLWoI!;uZD_V`DT7x08}2yJPi7N$Dchs^u3CG zUyXhLks$@Mcz2jpPIWRFA5|~_Ff)5W_!SUx4n$=1>9iM|I4UU7CZqW#M)R2wG@NDa zJ2=UH*i&vD^W6|8<2MueohAWdK9;~QY51G%Wo)+P@&Ulai4%86XTLz3J{9>AgK2nh zm0Mk1-Meq!zJH>eWl5c3&b2HDqN&z6aCzViVvdGh2w>({S8 zfsuU(E8P}Gb1tCHOHo5oRcQ&nN_Bm$nCO_>uD0LU&)GmSc% zVfk*)0sw|I(T<#aR@%tRF^tM*tW2cfHl*MbPuUknjT$u~=p({OcL=IRQee%qZ=vo7 zX#$r7NLMM!;QuCh062gSF5}tG>L?7pA1OG_%5!dpxgG|!A|b;UEn4(qYJOv5V-Hr$ za%&7U%4sn-oc3N2075-Awx;BP@L54o)(M?nPq|^JhF60OaLio6`@tUOT!8dk7tDjV z+RfA6MkoQm=>TwRSpnd@u43fpET#a!l>qPqD-UMMRer7q0MiKK`egL!T-`3CQO*3co8(|nptu8dsQ{fxHWS-W=az_J6t zNx^+E+85?Bosrq(Q9}Zz#>zvdpNdZZO)w9MdzQ9_8)dd2HABi00JrI{3DQbW0ziY6 z!5nfuj6T~_?mEg{5X_^k`+4Vc!5mSR060h6YcR%ghp+10yZ2sJsCm@hFTgyE1T-1| zXfHSfjJ`uM&MZp+oEq|}2HEIefti{o(h`fS2GoYO9j){X5)g7dpn}ea(IFGn0dQqG z18^sdnc~ssM*)B~WYQ86pvBxv9spLdA|4oA5ob_$<+Tn-WgLu=TcXLsOnFGP`bMkovXuZP)YD+Vtrh@22bO+A03;&otAtYcB5}?4YWOB!;(iUhb+0A7O04nHMRM34M z0Ip^ZxY){bk#lCq3V`m*YFHAIOtdqacFb*0g|L(}04KwM(8|?ut_c7_{vsEGD0jrJ z1~@tzyF2Cn82~`BLgsNL?GKkN0F2~|VANHfIpAzY@{Pef=iB)^@2#-;7H0*e9ZNz2 z4u{c-6$&LS-pUyOg~(_xJd{u+#{qy`2x$ps?gP`L<3qb#ynlQ3>eYJ&Ll&bZd&RNW!7>1F7VkpREQ1Gc?Lo38UGZxM{1IY+WW2N~pRKWe327 z2@?hoOeKe!Z(rC9H*~SBuTxG(XF~}9#-p|rnx0H98c(Wj7o*5(tfsxn4uA~jxpdRX zAXLeRhAPp5O6LZwIG>M*^Vyp?pZ8MB(bkvwzk&d)GSAb_@Uj9xBa(Z4mcz&)9`$n@ zOwob6P|C2G-%PoXMHS_WhK9Ciys`qo#lXt`H&rq(>pZuth)>!NHg!4gub^BgikdPC zNl|EumD*y7RI$P)l4oK)AD7f?D=-VoXD24T=jn*4!+F1$kd%5tQd)zZb*ki9-uuoj z*TYO*TaZl7bE=@XgDmFZxU18RDgwYf7h6&s4-jhsfCUrf`%w*{^IM5(Q9oBwr|F#I zo0Wu@3=W>8r@j49Guqa)K$E*-Z_PDTZh1YA7rT`*(^F~p#D;o(KN|hSaZU)j5mcwH zCu0{(6Y1U-e_-;B=<-mc1bjV%Jej*zN-o;kW@pao?$2g|t_aYB|as>$@6bzg9 zlaNt#SOB;U_1TmQS|l4#2jhJwWinVz@_>%D<_*fp0e83uwC@7iPnFlz+-l3iw=Cdr*Ox6x%M38W&24pYGJ7^tX%Y{eYZ}R~FljwPj);2xuN!OtJHL<59cm09@ zuxD5)Zyl{HVR#6=-40M00Bh7RAMMcqkyP;mQEbZ0ouw2a`b zLsNsd3Ic#5bRr{6lcE)46AObl0BGNriFFor)cc6=#SOWeU$ofs9fO*N^^<0r77PG& z&aE(YRn2~}I36e*2Y{%6Ej2^kf9}<*SFLpe7X8uAS7=Ybk@qgZ9vHlJtDpdgFkShD zB;3W5w}aeq06>R75n(d7kark5Jap>Ct$gKr@Qwa!8U0#orKN%cAZlE+fx-lj$%iDw z0f15L-7BWv%VEBG)Rl6&_b7FZk=m6H@k0$|pIH$V#Rq^WlJ4EOaig~UbPz7qO)7B! zh&UO)3>7jF719!9B4z5KTdQoJv(DVER6Ru@0f`Q|Yapl58Qmq+ZkI?L0Njq5LKf>% z82vhR9%UV2b?XI5jql2})$SZ|X!I8y0ErGG&N{g-FYQk4QAu$CP?~LBWp8k;f%Zy3W$P0?fy#&Hz9^p8{=iQ$AINDy7ZQUgafI0^g6kZ}pNDYYE04Qf7{<54p zEV->p{U(5ZHz2{ow*cT6UBZ-0!zBxVI_V-7Nr4 tz#J%W^A!oG08n5K6u9|{1QZy6{{e9zmGJo31^xg4002ovPDHLkV1j0@K8OGS literal 0 HcmV?d00001 diff --git a/music_assistant/server/providers/snapcast/snapweb/stop.png b/music_assistant/server/providers/snapcast/snapweb/stop.png new file mode 100644 index 0000000000000000000000000000000000000000..0d55b491372f6130b5f5774694676eea2aedbada GIT binary patch literal 441 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGoY)RhkE)4%caKYZ?lYt_f1s;*b z3=G^tAk28_ZrvZCAbW|YuPgflMgbm1b*4v~oEaDx-8@|!Ln>~)y|X{J*+HWH;eFS< z*fi$ynGLo#*l)Dk+BjO7dAwxwaPIo^+V2zNd25D8?-~zJTDpGCYbo3H;?WEY4Gatd z3=B*R4h#$&K=T+B7#LU{T!_tzTQg;nie%eEQ_ty7rajs9*|th0a?+jUnZGS2RDsxSF}9XNN{WbgGmn^(DC`1a&GyPe^$+}^Ww%)5kTZpWTx*e=Wv68m`R zr?Y>5J?MLE@vd_F{~iCcPv>K^7uhik8(5KCge(JcrbWuu=d8A$lINYf_nh_b=3{C1 z8=kW8zrAF1;4cfq_cX?BJ7;}vG_U_ROEzltt72#2=IHrs3ii&7a4#Yo_@a7#o0HuU T*~1ok3_#%N>gTe~DWM4fHTjm7 literal 0 HcmV?d00001 diff --git a/music_assistant/server/providers/snapcast/snapweb/styles.css b/music_assistant/server/providers/snapcast/snapweb/styles.css new file mode 100644 index 000000000..06a8092a6 --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/styles.css @@ -0,0 +1,314 @@ +body { + background-color: rgb(246, 246, 246); + color: rgb(255, 255, 255); + font-family: 'Arial', sans-serif; + width: 100%; + margin: 0; + font-size: 20px; + overscroll-behavior: contain; +} + +/* width */ +::-webkit-scrollbar { + width: 10px; +} + +/* Track */ +::-webkit-scrollbar-track { + background: #1f1f1f; +} + +/* Handle */ +::-webkit-scrollbar-thumb { + background: #333; +} + +/* Handle on hover */ +::-webkit-scrollbar-thumb:hover { + background: #555; +} + +input, textarea, button, select, a { + -webkit-tap-highlight-color: rgba(0,0,0,0); +} + +.navbar { + overflow: hidden; + background-color: #607d8b; + z-index: 1; /* Sit on top */ + padding: 13px; + color: white; + position: fixed; /* Set the navbar to fixed position */ + top: 0; /* Position the navbar at the top of the page */ + width: 100%; /* Full width */ + font-size: 21px; + font-weight: 500; + user-select: none; +} + +.play-button { + display: block; + position: absolute; + right: 34px; + top: 5px; + height: 40px; + width: 40px; +} + +.content { + margin-top: 62px +} + +.group { + float: none; + background-color: white; + box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.2); + clear: both; + padding: 8px; + margin: 10px 15px 10px 15px; + overflow: auto; + width: auto; + border-radius: 3px; + user-select: none; +} + +.group.muted { + opacity: 0.27; +} + +.groupheader { + /* margin: 10px; */ + width: auto; + height: fit-content; + /* padding: 10px; */ + padding-bottom: 0px; + display: grid; + grid-template-columns: min-content auto min-content; + grid-template-rows: min-content min-content; + grid-gap: 0px; +} + +.groupheader-separator { + height: 1px; + margin: 8px 0px; + border-width: 0px; + color: lightgray; + background-color: lightgray; +} + +.stream { + color: #686868; + grid-row: 1; + grid-column: 1/3; + width: fit-content; +} + +select { + background-color: transparent; + border: 0px; + width: 150px; + font-size: 20px; + color: #e3e3e3; + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; +} + +.slidergroupdiv { + /* background: greenyellow; */ + display: flex; + justify-content: center; + align-items: center; + grid-row: 2; + grid-column: 2; +} + +.client { + /* text-align: left; */ + /* margin: 10px; */ + width: auto; + height: fit-content; + /* padding: 10px; */ + display: grid; + grid-template-columns: min-content auto min-content; + grid-template-rows: min-content min-content; + grid-gap: 0px; +/* align-items: center;*/ +} + +/* .client:hover { + box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); +} */ + +.client.disconnected { + opacity: 0.27; +} + +.name { + color: #686868; + user-select: none; + /* background: red; */ + padding-top: 5px; + grid-row: 1; + grid-column: 1/3; + text-decoration: none; +} + +.editdiv { + background: violet; + grid-row: 0/4; + grid-column: 3; +} + +.edit-icon { + color: #686868; + text-decoration: none; +} + +.delete-icon { + color: #ff4081; + text-decoration: none; +} + +.edit-icons { + align-items: center; + display: flex; + grid-row: 1/3; + grid-column: 3; +} + +.edit-group-icon { + display: flex; + color: transparent; + align-items: center; + grid-row: 1/3; + grid-column: 3; + text-decoration: none; +} + +.mute-button { + color: #686868; + grid-row: 2; + grid-column: 1; +/* top: 50%;*/ + height: 25px; + width: 25px; + padding-left: 10px; + padding-right: 10px; + text-decoration: none; +} +/* +.cover-img { + color: #686868; + grid-row: 2; + grid-column: 1; + height: 50px; + width: 50px; + padding: 5px; + text-decoration: none; +} +*/ +.sliderdiv { + display: flex; + justify-content: center; + align-items: center; + grid-row: 2; + grid-column: 2; + /* padding-left: 40px; */ + /* display: inline-block; + text-align: left; + width: 250px; */ +} + +.slider { + writing-mode: bt-lr; + -webkit-appearance: none; + background: #dbdbdb; + outline: none; + -webkit-transition: .2s; + transition: opacity .2s; + height: 2px; + width: 90%; +} + +.slider::-moz-range-track { + padding: 6px; + background-color: transparent; + border: none; +} + +.slider::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + height: 12px; + width: 12px; + border-radius: 50%; + background: #ff4081; + cursor: pointer; +} + +.slider::-moz-range-thumb { + height: 12px; + width: 12px; + border-radius: 50%; + background: #ff4081; + cursor: pointer; +} + +.slider.muted { + opacity: 0.27; +} + + .client-settings { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1; /* Sit on top */ + left: 0; + top: 0; + width: 100%; /* Full width */ + height: 100%; /* Full height */ + overflow: auto; /* Enable scroll if needed */ + background-color: rgb(0,0,0); /* Fallback color */ + background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ +} + +.client-setting-content { + background-color: #fefefe; + color: #686868; + margin: 15% auto; /* 15% from the top and centered */ + padding: 20px; + border: 1px solid #888; + width: 80%; /* Could be more or less, depending on screen size */ +} + +.client-input { + color: #686868; + width: 100%; + padding: 12px 20px; + margin: 8px 0; + display: block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} + +input[type=submit] { + width: 100%; + background-color: #4CAF50; + color: white; + padding: 14px 20px; + margin: 8px 0; + border: none; + border-radius: 4px; + cursor: pointer; +} + +input[type=submit]:hover { + background-color: #45a049; +} + +div.container { + border-radius: 5px; + background-color: #f2f2f2; + padding: 20px; +} diff --git a/music_assistant/server/providers/snapcast/snapweb/sw.js b/music_assistant/server/providers/snapcast/snapweb/sw.js deleted file mode 100644 index 1d8aaf938..000000000 --- a/music_assistant/server/providers/snapcast/snapweb/sw.js +++ /dev/null @@ -1 +0,0 @@ -if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()})).then((()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(s,r)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(i[c])return;let o={};const t=e=>n(e,c),l={module:{uri:c},exports:o,require:t};i[c]=Promise.all(s.map((e=>l[e]||t(e)))).then((e=>(r(...e),o)))}}define(["./workbox-3e911b1d"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-BDBx6C_I.css",revision:null},{url:"assets/index-BYMjFABP.js",revision:null},{url:"index.html",revision:"4cd1a8e9bddaa2b025a021559c9db55e"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.ico",revision:"7fdc1662d6e00b235ce85c4b73b7d67b"},{url:"maskable-icon-512x512.png",revision:"390549b472894ff2c812e9ef94c3def4"},{url:"pwa-192x192.png",revision:"61f5c7ab58978aaa789d945876887087"},{url:"pwa-512x512.png",revision:"c288ab9e43159776e6ee4feb2616f2b3"},{url:"pwa-64x64.png",revision:"0066803230966cc6ac241c8770003ee7"},{url:"manifest.webmanifest",revision:"988607152c20e350fdaf0b4cfc17380c"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); diff --git a/music_assistant/server/providers/snapcast/snapweb/workbox-3e911b1d.js b/music_assistant/server/providers/snapcast/snapweb/workbox-3e911b1d.js deleted file mode 100644 index 8c012bc70..000000000 --- a/music_assistant/server/providers/snapcast/snapweb/workbox-3e911b1d.js +++ /dev/null @@ -1 +0,0 @@ -define(["exports"],(function(t){"use strict";try{self["workbox:core:7.0.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.0.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function h(t,e,n){let o;if("string"==typeof t){const s=new URL(t,location.href);o=new i((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)o=new r(t,e,n);else if("function"==typeof t)o=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return a().registerRoute(o),o}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter((t=>t&&t.length>0)).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.0.0"]&&_()}catch(t){}function p(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class y{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class g{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let R;async function m(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,c=function(){if(void 0===R){const t=new Response("");if("body"in t)try{new Response(t.body),R=!0}catch(t){R=!1}R=!1}return R}()?i.body:await i.blob();return new Response(c,o)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class q{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const U=new Set;try{self["workbox:strategies:7.0.0"]&&_()}catch(t){}function L(t){return"string"==typeof t?new Request(t):t}class b{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new q,this.R=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=L(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=L(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=L(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const c=await this.q(e);if(!c)return!1;const{cacheName:a,matchOptions:h}=this.l,u=await self.caches.open(a),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of U)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:a,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=L(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.v.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.R.push(t),t}async doneWaiting(){let t;for(;t=this.R.shift();)await t}destroy(){this.p.resolve(null)}async q(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class C{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new b(this,{event:e,request:s,params:n}),r=this.U(i,s,e);return[r,this.L(r,i,s,e)]}async U(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this._(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async L(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class E extends C{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this.C=!1!==t.fallbackToNetwork,this.plugins.push(E.copyRedirectedCacheableResponsesPlugin)}async _(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.O(t,e):await this.N(t,e))}async N(t,e){let n;const i=e.params||{};if(!this.C)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&o&&"no-cors"!==t.mode&&(this.k(),await e.cachePut(t,n.clone()))}return n}async O(t,e){this.k();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}k(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==E.copyRedirectedCacheableResponsesPlugin&&(n===E.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(E.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}E.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},E.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await m(t):t};class O{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.K=new Map,this.P=new Map,this.T=new Map,this.l=new E({cacheName:f(t),plugins:[...e,new g({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.W||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.W=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=p(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.K.has(i)&&this.K.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.K.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.T.has(t)&&this.T.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.T.set(t,n.integrity)}if(this.K.set(i,t),this.P.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return d(t,(async()=>{const e=new y;this.strategy.plugins.push(e);for(const[e,s]of this.K){const n=this.T.get(s),i=this.P.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return d(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.K.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.K}getCachedURLs(){return[...this.K.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.K.get(e.href)}getIntegrityForCacheKey(t){return this.T.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let x;const N=()=>(x||(x=new O),x);class k extends i{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.j(t)),t),this.M=e,this.S=s}j({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.S)if(t.test(s))return!1;return!!this.M.some((t=>t.test(s)))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.createHandlerBoundToURL=function(t){return N().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){N().precache(t)}(t),function(t){const e=N();h(new k(e,t))}(e)},t.registerRoute=h}));