UNPKG

midi-json-parser

Version:

This module is parsing midi files into a human-readable JSON object.

28 lines (23 loc) 19.3 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('midi-json-parser-broker')) : typeof define === 'function' && define.amd ? define(['exports', 'midi-json-parser-broker'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.midiJsonParser = {}, global.midiJsonParserBroker)); })(this, (function (exports, midiJsonParserBroker) { 'use strict'; // This is the minified and stringified code of the midi-json-parser-worker package. var worker = "(()=>{var e={45:(e,t,r)=>{var n=r(738).default;e.exports=function(e,t){if(\"object\"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||\"default\");if(\"object\"!=n(o))return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},243:function(e,t,r){!function(e,t){\"use strict\";var r=function(e){return void 0!==e.channel},n=function(e){return e.toString(16).toUpperCase().padStart(2,\"0\")},o=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength-(t-e.byteOffset),o=t+e.byteOffset,i=[],a=new Uint8Array(e.buffer,o,r),u=0;u<r;u+=1)i[u]=n(a[u]);return i.join(\"\")},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength-(t-e.byteOffset),n=t+e.byteOffset,o=new Uint8Array(e.buffer,n,r);return String.fromCharCode.apply(null,o)};function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?a(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=function(e){for(var t=new DataView(e),r=f(t),n=14,o=[],i=0,a=r.numberOfTracks;i<a;i+=1){var u=void 0,c=v(t,n);n=c.offset,u=c.track,o.push(u)}return{division:r.division,format:r.format,tracks:o}},s=function(e,t,r){var n,o=d(e,t),i=o.offset,a=o.value,c=e.getUint8(i);return u(u({},n=240===c?h(e,i+1):255===c?l(e,i+1):p(c,e,i+1,r)),{},{event:u(u({},n.event),{},{delta:a}),eventTypeByte:c})},f=function(e){if(e.byteLength<14)throw new Error(\"Expected at least 14 bytes instead of \".concat(e.byteLength));if(\"MThd\"!==i(e,0,4))throw new Error('Unexpected characters \"'.concat(i(e,0,4),'\" found instead of \"MThd\"'));if(6!==e.getUint32(4))throw new Error(\"The header has an unexpected length of \".concat(e.getUint32(4),\" instead of 6\"));var t=e.getUint16(8),r=e.getUint16(10);return{division:e.getUint16(12),format:t,numberOfTracks:r}},l=function(e,t){var r,a=e.getUint8(t),u=d(e,t+1),c=u.offset,s=u.value;if(1===a)r={text:i(e,c,s)};else if(2===a)r={copyrightNotice:i(e,c,s)};else if(3===a)r={trackName:i(e,c,s)};else if(4===a)r={instrumentName:i(e,c,s)};else if(5===a)r={lyric:i(e,c,s)};else if(6===a)r={marker:i(e,c,s)};else if(7===a)r={cuePoint:i(e,c,s)};else if(8===a)r={programName:i(e,c,s)};else if(9===a)r={deviceName:i(e,c,s)};else if(10===a||11===a||12===a||13===a||14===a||15===a)r={metaTypeByte:n(a),text:i(e,c,s)};else if(32===a)r={channelPrefix:e.getUint8(c)};else if(33===a)r={midiPort:e.getUint8(c)};else if(47===a)r={endOfTrack:!0};else if(81===a)r={setTempo:{microsecondsPerQuarter:(e.getUint8(c)<<16)+(e.getUint8(c+1)<<8)+e.getUint8(c+2)}};else if(84===a){var f,l=e.getUint8(c);96&l?32==(96&l)?f=25:64==(96&l)?f=29:96&~l||(f=30):f=24,r={smpteOffset:{frame:e.getUint8(c+3),frameRate:f,hour:31&l,minutes:e.getUint8(c+1),seconds:e.getUint8(c+2),subFrame:e.getUint8(c+4)}}}else if(88===a)r={timeSignature:{denominator:Math.pow(2,e.getUint8(c+1)),metronome:e.getUint8(c+2),numerator:e.getUint8(c),thirtyseconds:e.getUint8(c+3)}};else if(89===a)r={keySignature:{key:e.getInt8(c),scale:e.getInt8(c+1)}};else{if(127!==a)throw new Error('Cannot parse a meta event with a type of \"'.concat(n(a),'\"'));r={sequencerSpecificData:o(e,c,s)}}return{event:r,offset:c+s}},p=function(e,t,r,o){var i,a=128&e?null:o,u=(null===a?e:a)>>4,c=null===a?r:r-1;if(8===u)i={noteOff:{noteNumber:t.getUint8(c),velocity:t.getUint8(c+1)}},c+=2;else if(9===u){var s=t.getUint8(c),f=t.getUint8(c+1);i=0===f?{noteOff:{noteNumber:s,velocity:f}}:{noteOn:{noteNumber:s,velocity:f}},c+=2}else if(10===u)i={keyPressure:{noteNumber:t.getUint8(c),pressure:t.getUint8(c+1)}},c+=2;else if(11===u)i={controlChange:{type:t.getUint8(c),value:t.getUint8(c+1)}},c+=2;else if(12===u)i={programChange:{programNumber:t.getUint8(c)}},c+=1;else if(13===u)i={channelPressure:{pressure:t.getUint8(c)}},c+=1;else{if(14!==u)throw new Error('Cannot parse a midi event with a type of \"'.concat(n(u),'\"'));i={pitchBend:t.getUint8(c)|t.getUint8(c+1)<<7},c+=2}return i.channel=15&(null===a?e:a),{event:i,offset:c}},h=function(e,t){var r=d(e,t),n=r.offset,i=r.value;return{event:{sysex:o(e,n,i)},offset:n+i}},v=function(e,t){if(\"MTrk\"!==i(e,t,4))throw new Error('Unexpected characters \"'.concat(i(e,t,4),'\" found instead of \"MTrk\"'));for(var n=[],o=e.getUint32(t+4)+t+8,a=null,u=t+8;u<o;){var c=s(e,u,a),f=c.event,l=c.eventTypeByte;n.push(f),u=c.offset,r(f)&&(128&l)>0&&(a=l)}return{offset:u,track:n}},d=function(e,t){for(var r=t,n=0;;){var o=e.getUint8(r);if(r+=1,!(o>127))return{offset:r,value:n+=o};n+=127&o,n<<=7}};e.createWorker(self,{parse:function(e){var t=e.arrayBuffer;return{result:c(t)}}})}(r(623),r(693))},293:e=>{function t(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,c,\"next\",e)}function c(e){t(a,o,i,u,c,\"throw\",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},389:function(e,t){!function(e){\"use strict\";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,i=2*o,a=function(e,t){return function(r){var a=t.get(r),u=void 0===a?r.size:a<i?a+1:0;if(!r.has(u))return e(r,u);if(r.size<o){for(;r.has(u);)u=Math.floor(Math.random()*i);return e(r,u)}if(r.size>n)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;r.has(u);)u=Math.floor(Math.random()*n);return e(r,u)}},u=new WeakMap,c=r(u),s=a(c,u),f=t(s);e.addUniqueNumber=f,e.generateUniqueNumber=s}(t)},623:function(e,t,r){!function(e,t,r,n,o){\"use strict\";var i={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},a=function(e,t){return Object.assign(new Error(e),{status:t})},u=function(e){return a('The requested method called \"'.concat(e,'\" is not supported.'),i.METHOD_NOT_FOUND)},c=function(e){return a('The handler of the method called \"'.concat(e,'\" returned no required result.'),i.INTERNAL_ERROR)},s=function(e){return a('The handler of the method called \"'.concat(e,'\" returned an unexpected result.'),i.INTERNAL_ERROR)},f=function(e){return a('The specified parameter called \"portId\" with the given value \"'.concat(e,'\" does not identify a port connected to this worker.'),i.INVALID_PARAMS)},l=function(e,n){return function(){var o=t(r.mark((function t(o){var i,a,f,l,p,h,v,d,y,g,m,b,w;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=o.data,a=i.id,f=i.method,l=i.params,p=n[f],t.prev=2,void 0!==p){t.next=5;break}throw u(f);case 5:if(void 0!==(h=void 0===l?p():p(l))){t.next=8;break}throw c(f);case 8:if(!(h instanceof Promise)){t.next=14;break}return t.next=11,h;case 11:t.t0=t.sent,t.next=15;break;case 14:t.t0=h;case 15:if(v=t.t0,null!==a){t.next=21;break}if(void 0===v.result){t.next=19;break}throw s(f);case 19:t.next=25;break;case 21:if(void 0!==v.result){t.next=23;break}throw s(f);case 23:d=v.result,y=v.transferables,g=void 0===y?[]:y,e.postMessage({id:a,result:d},g);case 25:t.next=31;break;case 27:t.prev=27,t.t1=t.catch(2),m=t.t1.message,b=t.t1.status,w=void 0===b?-32603:b,e.postMessage({error:{code:w,message:m},id:a});case 31:case\"end\":return t.stop()}}),t,null,[[2,27]])})));return function(e){return o.apply(this,arguments)}}()},p=function(){return new Promise((function(e){var t=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(t){var r=t.data;return e(null!==r)},o.postMessage(t,[t])}))};function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=new Map,y=function(e,n,i){return v(v({},n),{},{connect:function(t){var r=t.port;r.start();var i=e(r,n),a=o.generateUniqueNumber(d);return d.set(a,(function(){i(),r.close(),d.delete(a)})),{result:a}},disconnect:function(e){var t=e.portId,r=d.get(t);if(void 0===r)throw f(t);return r(),{result:null}},isSupported:function(){var e=t(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p();case 2:if(!e.sent){e.next=14;break}if(!((t=i())instanceof Promise)){e.next=11;break}return e.next=8,t;case 8:e.t0=e.sent,e.next=12;break;case 11:e.t0=t;case 12:return n=e.t0,e.abrupt(\"return\",{result:n});case 14:return e.abrupt(\"return\",{result:!1});case 15:case\"end\":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},g=function(e,t){var r=y(g,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),n=l(e,r);return e.addEventListener(\"message\",n),function(){return e.removeEventListener(\"message\",n)}};e.createWorker=g,e.isSupported=p}(t,r(293),r(756),r(693),r(389))},633:(e,t,r)=>{var n=r(738).default;function o(){\"use strict\";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c=\"function\"==typeof Symbol?Symbol:{},s=c.iterator||\"@@iterator\",f=c.asyncIterator||\"@@asyncIterator\",l=c.toStringTag||\"@@toStringTag\";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},\"\")}catch(t){p=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof w?t:w,i=Object.create(o.prototype),a=new S(n||[]);return u(i,\"_invoke\",{value:L(e,r,a)}),i}function v(e,t,r){try{return{type:\"normal\",arg:e.call(t,r)}}catch(e){return{type:\"throw\",arg:e}}}r.wrap=h;var d=\"suspendedStart\",y=\"suspendedYield\",g=\"executing\",m=\"completed\",b={};function w(){}function x(){}function O(){}var E={};p(E,s,(function(){return this}));var _=Object.getPrototypeOf,U=_&&_(_(R([])));U&&U!==i&&a.call(U,s)&&(E=U);var j=O.prototype=w.prototype=Object.create(E);function k(e){[\"next\",\"throw\",\"return\"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,u,c){var s=v(e[o],e,i);if(\"throw\"!==s.type){var f=s.arg,l=f.value;return l&&\"object\"==n(l)&&a.call(l,\"__await\")?t.resolve(l.__await).then((function(e){r(\"next\",e,u,c)}),(function(e){r(\"throw\",e,u,c)})):t.resolve(l).then((function(e){f.value=e,u(f)}),(function(e){return r(\"throw\",e,u,c)}))}c(s.arg)}var o;u(this,\"_invoke\",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function L(e,r,n){var o=d;return function(i,a){if(o===g)throw Error(\"Generator is already running\");if(o===m){if(\"throw\"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=N(u,n);if(c){if(c===b)continue;return c}}if(\"next\"===n.method)n.sent=n._sent=n.arg;else if(\"throw\"===n.method){if(o===d)throw o=m,n.arg;n.dispatchException(n.arg)}else\"return\"===n.method&&n.abrupt(\"return\",n.arg);o=g;var s=v(e,r,n);if(\"normal\"===s.type){if(o=n.done?m:y,s.arg===b)continue;return{value:s.arg,done:n.done}}\"throw\"===s.type&&(o=m,n.method=\"throw\",n.arg=s.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,\"throw\"===n&&e.iterator.return&&(r.method=\"return\",r.arg=t,N(e,r),\"throw\"===r.method)||\"return\"!==n&&(r.method=\"throw\",r.arg=new TypeError(\"The iterator does not provide a '\"+n+\"' method\")),b;var i=v(o,e.iterator,r.arg);if(\"throw\"===i.type)return r.method=\"throw\",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,\"return\"!==r.method&&(r.method=\"next\",r.arg=t),r.delegate=null,b):a:(r.method=\"throw\",r.arg=new TypeError(\"iterator result is not an object\"),r.delegate=null,b)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type=\"normal\",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:\"root\"}],e.forEach(T,this),this.reset(!0)}function R(e){if(e||\"\"===e){var r=e[s];if(r)return r.call(e);if(\"function\"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+\" is not iterable\")}return x.prototype=O,u(j,\"constructor\",{value:O,configurable:!0}),u(O,\"constructor\",{value:x,configurable:!0}),x.displayName=p(O,l,\"GeneratorFunction\"),r.isGeneratorFunction=function(e){var t=\"function\"==typeof e&&e.constructor;return!!t&&(t===x||\"GeneratorFunction\"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,p(e,l,\"GeneratorFunction\")),e.prototype=Object.create(j),e},r.awrap=function(e){return{__await:e}},k(P.prototype),p(P.prototype,f,(function(){return this})),r.AsyncIterator=P,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new P(h(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(j),p(j,l,\"Generator\"),p(j,s,(function(){return this})),p(j,\"toString\",(function(){return\"[object Generator]\"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=R,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=t,this.tryEntries.forEach(M),!e)for(var r in this)\"t\"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(\"throw\"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type=\"throw\",u.arg=e,r.next=n,o&&(r.method=\"next\",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if(\"root\"===i.tryLoc)return n(\"end\");if(i.tryLoc<=this.prev){var c=a.call(i,\"catchLoc\"),s=a.call(i,\"finallyLoc\");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error(\"try statement without catch or finally\");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,\"finallyLoc\")&&this.prev<n.finallyLoc){var o=n;break}}o&&(\"break\"===e||\"continue\"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method=\"next\",this.next=o.finallyLoc,b):this.complete(i)},complete:function(e,t){if(\"throw\"===e.type)throw e.arg;return\"break\"===e.type||\"continue\"===e.type?this.next=e.arg:\"return\"===e.type?(this.rval=this.arg=e.arg,this.method=\"return\",this.next=\"end\"):\"normal\"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if(\"throw\"===n.type){var o=n.arg;M(r)}return o}}throw Error(\"illegal catch attempt\")},delegateYield:function(e,r,n){return this.delegate={iterator:R(e),resultName:r,nextLoc:n},\"next\"===this.method&&(this.arg=t),b}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},693:(e,t,r)=>{var n=r(736);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},736:(e,t,r)=>{var n=r(738).default,o=r(45);e.exports=function(e){var t=o(e,\"string\");return\"symbol\"==n(t)?t:t+\"\"},e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(r){return e.exports=t=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,r)=>{var n=r(633)();e.exports=n;try{regeneratorRuntime=n}catch(e){\"object\"==typeof globalThis?globalThis.regeneratorRuntime=n:Function(\"r\",\"regeneratorRuntime = r\")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";r(243)})()})();"; // tslint:disable-line:max-line-length var blob = new Blob([worker], { type: 'application/javascript; charset=utf-8' }); var url = URL.createObjectURL(blob); var midiJsonParser = midiJsonParserBroker.load(url); var connect = midiJsonParser.connect; var disconnect = midiJsonParser.disconnect; var isSupported = midiJsonParser.isSupported; // @todo Remove type annotation when possible. var parseArrayBuffer = midiJsonParser.parseArrayBuffer; URL.revokeObjectURL(url); exports.connect = connect; exports.disconnect = disconnect; exports.isSupported = isSupported; exports.parseArrayBuffer = parseArrayBuffer; }));