/** * [oggmented]{@link https://github.com/jfrancos/oggmented} * * @namespace oggmented * @version 1.0.1 * @author Justin Francos [jf@justinfrancos.com] * @copyright Justin Francos 2019-2020 * @license MIT */ !function(A,I){"object"==typeof exports&&"object"==typeof module?module.exports=I():"function"==typeof define&&define.amd?define([],I):"object"==typeof exports?exports.oggmented=I():A.oggmented=I()}(window,(function(){return function(A){var I={};function g(C){if(I[C])return I[C].exports;var Q=I[C]={i:C,l:!1,exports:{}};return A[C].call(Q.exports,Q,Q.exports,g),Q.l=!0,Q.exports}return g.m=A,g.c=I,g.d=function(A,I,C){g.o(A,I)||Object.defineProperty(A,I,{enumerable:!0,get:C})},g.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},g.t=function(A,I){if(1&I&&(A=g(A)),8&I)return A;if(4&I&&"object"==typeof A&&A&&A.__esModule)return A;var C=Object.create(null);if(g.r(C),Object.defineProperty(C,"default",{enumerable:!0,value:A}),2&I&&"string"!=typeof A)for(var Q in A)g.d(C,Q,function(I){return A[I]}.bind(null,Q));return C},g.n=function(A){var I=A&&A.__esModule?function(){return A.default}:function(){return A};return g.d(I,"a",I),I},g.o=function(A,I){return Object.prototype.hasOwnProperty.call(A,I)},g.p="/",g(g.s=6)}([function(A,I){var g;g=function(){return this}();try{g=g||new Function("return this")()}catch(A){"object"==typeof window&&(g=window)}A.exports=g},function(A,I){var g,C,Q=A.exports={};function B(){throw new Error("setTimeout has not been defined")}function E(){throw new Error("clearTimeout has not been defined")}function D(A){if(g===setTimeout)return setTimeout(A,0);if((g===B||!g)&&setTimeout)return g=setTimeout,setTimeout(A,0);try{return g(A,0)}catch(I){try{return g.call(null,A,0)}catch(I){return g.call(this,A,0)}}}!function(){try{g="function"==typeof setTimeout?setTimeout:B}catch(A){g=B}try{C="function"==typeof clearTimeout?clearTimeout:E}catch(A){C=E}}();var w,i=[],o=!1,M=-1;function P(){o&&w&&(o=!1,w.length?i=w.concat(i):M=-1,i.length&&n())}function n(){if(!o){var A=D(P);o=!0;for(var I=i.length;I;){for(w=i,i=[];++M1)for(var g=1;g>0];case"i16":return k[A>>1];case"i32":case"i64":return f[A>>2];case"float":return x[A>>2];case"double":return U[A>>3];default:O("invalid type for getValue: "+I)}return null}n=null,w.quit&&(c=w.quit),w.wasmBinary&&(H=w.wasmBinary),w.noExitRuntime&&(s=w.noExitRuntime),"object"!==("undefined"==typeof WebAssembly?"undefined":E(WebAssembly))&&h("no native wasm support detected");var t,K=new WebAssembly.Table({initial:44,maximum:44,element:"anyfunc"}),y=!1;function R(A,I,g,C){var Q={string:function(A){var I=0;if(null!=A&&0!==A){var g=1+(A.length<<2),C=I=iA(g),Q=J;if(0=E&&(E=65536+((1023&E)<<10)|1023&A.charCodeAt(++B)),127>=E){if(C>=g)break;Q[C++]=E}else{if(2047>=E){if(C+1>=g)break;Q[C++]=192|E>>6}else{if(65535>=E){if(C+2>=g)break;Q[C++]=224|E>>12}else{if(C+3>=g)break;Q[C++]=240|E>>18,Q[C++]=128|E>>12&63}Q[C++]=128|E>>6&63}Q[C++]=128|63&E}}Q[C]=0}}return I},array:function(A){var I=iA(A.length);return G.set(A,I),I}},B=function(A){var I=w["_"+A];return I||O("Assertion failed: Cannot call unknown function "+A+", make sure it is exported"),I}(A),E=[];if(A=0,C)for(var D=0;D=C);)++Q;if(16(B=224==(240&B)?(15&B)<<12|E<<6|D:(7&B)<<18|E<<12|D<<6|63&g[A++])?C+=String.fromCharCode(B):(B-=65536,C+=String.fromCharCode(55296|B>>10,56320|1023&B))}}else C+=String.fromCharCode(B)}A=C}}else A="";else A="boolean"===I?!!A:A;return A}(g=B.apply(null,E)),0!==A&&oA(A),g}var N,G,J,k,f,S,x,U,z="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function q(A){N=A,w.HEAP8=G=new Int8Array(A),w.HEAP16=k=new Int16Array(A),w.HEAP32=f=new Int32Array(A),w.HEAPU8=J=new Uint8Array(A),w.HEAPU16=new Uint16Array(A),w.HEAPU32=S=new Uint32Array(A),w.HEAPF32=x=new Float32Array(A),w.HEAPF64=U=new Float64Array(A)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var T=w.INITIAL_MEMORY||16777216;function r(A){for(;0>4,Q=(15&Q)<<4|B>>2;var D=(3&B)<<6|E;I+=String.fromCharCode(C),64!==B&&(I+=String.fromCharCode(Q)),64!==E&&(I+=String.fromCharCode(D))}while(g=g;g*=2){var C=I*(1+.2/g);C=Math.min(C,A+100663296),0<(C=Math.max(16777216,A,C))%65536&&(C+=65536-C%65536);A:{try{t.grow(Math.min(2147418112,C)-N.byteLength+65535>>16),q(t.buffer);var Q=1;break A}catch(A){}Q=void 0}if(Q)return!0}return!1},c:function(A){!s&&(y=!0,w.onExit)&&w.onExit(A),c(A,new MA(A))},memory:t,table:K},_=function(){function A(A){w.asm=A.exports,p--,w.monitorRunDependencies&&w.monitorRunDependencies(p),0==p&&(null!==u&&(clearInterval(u),u=null),V&&(A=V,V=null,A()))}function I(I){A(I.instance)}function g(A){return(H||"function"!=typeof fetch?new Promise((function(A){A(b())})):fetch(X,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+X+"'";return A.arrayBuffer()})).catch((function(){return b()}))).then((function(A){return WebAssembly.instantiate(A,C)})).then(A,(function(A){h("failed to asynchronously prepare wasm: "+A),O(A)}))}var C={a:v};if(p++,w.monitorRunDependencies&&w.monitorRunDependencies(p),w.instantiateWasm)try{return w.instantiateWasm(C,A)}catch(A){return h("Module.instantiateWasm callback failed with error: "+A),!1}return function(){if(H||"function"!=typeof WebAssembly.instantiateStreaming||m(X)||"function"!=typeof fetch)return g(I);fetch(X,{credentials:"same-origin"}).then((function(A){return WebAssembly.instantiateStreaming(A,C).then(I,(function(A){h("wasm streaming compile failed: "+A),h("falling back to ArrayBuffer instantiation"),g(I)}))}))}(),{}}();w.asm=_;var $=w.___wasm_call_ctors=function(){return($=w.___wasm_call_ctors=w.asm.d).apply(null,arguments)};w._open_buffer=function(){return(w._open_buffer=w.asm.e).apply(null,arguments)};var AA=w._close_buffer=function(){return(AA=w._close_buffer=w.asm.f).apply(null,arguments)},IA=w._get_length=function(){return(IA=w._get_length=w.asm.g).apply(null,arguments)},gA=w._get_channels=function(){return(gA=w._get_channels=w.asm.h).apply(null,arguments)},CA=w._get_rate=function(){return(CA=w._get_rate=w.asm.i).apply(null,arguments)};w._get_time=function(){return(w._get_time=w.asm.j).apply(null,arguments)},w._get_streams=function(){return(w._get_streams=w.asm.k).apply(null,arguments)};var QA,BA=w._read_float=function(){return(BA=w._read_float=w.asm.l).apply(null,arguments)},EA=w._free=function(){return(EA=w._free=w.asm.m).apply(null,arguments)},DA=w._malloc=function(){return(DA=w._malloc=w.asm.n).apply(null,arguments)},wA=w.stackSave=function(){return(wA=w.stackSave=w.asm.o).apply(null,arguments)},iA=w.stackAlloc=function(){return(iA=w.stackAlloc=w.asm.p).apply(null,arguments)},oA=w.stackRestore=function(){return(oA=w.stackRestore=w.asm.q).apply(null,arguments)};function MA(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function PA(){function A(){if(!QA&&(QA=!0,w.calledRun=!0,!y)){if(r(Y),r(L),w.onRuntimeInitialized&&w.onRuntimeInitialized(),w.postRun)for("function"==typeof w.postRun&&(w.postRun=[w.postRun]);w.postRun.length;){var A=w.postRun.shift();d.unshift(A)}r(d)}}if(!(0=0&&(A._idleTimeoutId=setTimeout((function(){A._onTimeout&&A._onTimeout()}),I))},g(4),I.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==A&&A.setImmediate||this&&this.setImmediate,I.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==A&&A.clearImmediate||this&&this.clearImmediate}).call(this,g(0))},function(A,I,g){(function(A,I){!function(A,g){"use strict";if(!A.setImmediate){var C,Q,B,E,D,w=1,i={},o=!1,M=A.document,P=Object.getPrototypeOf&&Object.getPrototypeOf(A);P=P&&P.setTimeout?P:A,"[object process]"==={}.toString.call(A.process)?C=function(A){I.nextTick((function(){c(A)}))}:!function(){if(A.postMessage&&!A.importScripts){var I=!0,g=A.onmessage;return A.onmessage=function(){I=!1},A.postMessage("","*"),A.onmessage=g,I}}()?A.MessageChannel?((B=new MessageChannel).port1.onmessage=function(A){c(A.data)},C=function(A){B.port2.postMessage(A)}):M&&"onreadystatechange"in M.createElement("script")?(Q=M.documentElement,C=function(A){var I=M.createElement("script");I.onreadystatechange=function(){c(A),I.onreadystatechange=null,Q.removeChild(I),I=null},Q.appendChild(I)}):C=function(A){setTimeout(c,0,A)}:(E="setImmediate$"+Math.random()+"$",D=function(I){I.source===A&&"string"==typeof I.data&&0===I.data.indexOf(E)&&c(+I.data.slice(E.length))},A.addEventListener?A.addEventListener("message",D,!1):A.attachEvent("onmessage",D),C=function(I){A.postMessage(E+I,"*")}),P.setImmediate=function(A){"function"!=typeof A&&(A=new Function(""+A));for(var I=new Array(arguments.length-1),g=0;g