Commit 4475c6bc authored by Joseph Larralde's avatar Joseph Larralde
Browse files

started adding some basic waves-audio examples

parent 982d8ddf
......@@ -48,4 +48,6 @@ flycheck_*.el
# directory configuration
.dir-locals.el
**/.DS_Store
# End of https://www.gitignore.io/api/emacs
\ No newline at end of file
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="./assets/waves-audio.min.js"></script>
<script src="./assets/waves-loaders.min.js"></script>
</head>
<body>
<canvas width="100%" height="100%"></canvas>
<script type="text/javascript">
(function() {
var audioContext = wavesAudio.audioContext;
var loader = new wavesLoaders.AudioBufferLoader(); // instantiate loader
var audioFile = './assets/amen.mp3';
loader.load(audioFile).then(function(loaded) {
var frac = loaded.duration / 8;
var posArray = [];
var durArray = [];
for (var i = 0; i < 8; i++) {
posArray.push(i * frac);
durArray.push(frac);
}
var scheduler = wavesAudio.getScheduler();
var segEngine = new wavesAudio.SegmentEngine({
buffer: loaded,
periodAbs: loaded.duration / 8,
periodRel: 0,
positionArray: posArray,
durationArray: durArray,
});
segEngine.connect(audioContext.destination);
scheduler.add(segEngine);
setInterval(function() {
segEngine.segmentIndex = Math.floor(Math.random() * 8);
}, frac * 1000);
});
})();
</script>
</body>
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="./assets/waves-audio.min.js"></script>
<script src="./assets/waves-loaders.min.js"></script>
</head>
<body>
<canvas width="100%" height="100%"></canvas>
<script type="text/javascript">
(function() {
var audioContext = wavesAudio.audioContext;
var loader = new wavesLoaders.AudioBufferLoader(); // instantiate loader
var audioFile = './assets/amen.mp3';
loader.load(audioFile).then(function(loaded) {
var scheduler = wavesAudio.getScheduler();
var gEngine = new wavesAudio.GranularEngine({
buffer: loaded
});
var gain = audioContext.createGain();
gEngine.periodAbs = 0.01; // 10 ms
gEngine.durationAbs = 0.12; // 120 ms
var x = 0, y = 0, prevx = 0, prevy = 0, dx = 0, dy = 0, speed = 0;
// update granular parameters from mouse position
document.addEventListener('mousemove', function(e) {
x = e.x;
y = e.y;
var normX = e.x / window.innerWidth;
gEngine.position = gEngine.buffer.duration * normX;
var normY = e.y / window.innerHeight;
gEngine.resampling = normY * -2400 + 1200;
}, false);
// control gain from mouse speed
// (todo : improve speed calculation with delta time in some way)
setInterval(function() {
dx = x - prevx;
dy = y - prevy;
prevx = x;
prevy = y;
speed = Math.sqrt(dx * dx + dy * dy);
gain.gain.value = Math.min(speed * 0.1, 1);
}, 20);
gEngine.connect(gain);
gain.connect(audioContext.destination);
scheduler.add(gEngine);
});
})();
</script>
</body>
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.wavesAudio=e()}}(function(){return function e(t,n,r){function i(s,u){if(!n[s]){if(!t[s]){var a="function"==typeof require&&require;if(!u&&a)return a(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=null,i=window.AudioContext||window.webkitAudioContext;if(i&&(r=new i,/(iPhone|iPad)/i.test(navigator.userAgent)&&r.sampleRate<44100)){var o=r.createBuffer(1,1,44100),s=r.createBufferSource();s.buffer=o,s.connect(r.destination),s.start(0),s.disconnect()}n["default"]=r},{}],2:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("babel-runtime/core-js/object/get-prototype-of"),o=r(i),s=e("babel-runtime/helpers/classCallCheck"),u=r(s),a=e("babel-runtime/helpers/createClass"),c=r(a),l=e("babel-runtime/helpers/possibleConstructorReturn"),_=r(l),f=e("babel-runtime/helpers/inherits"),h=r(f),d=e("./time-engine"),p=r(d),b=e("./audio-context"),m=r(b),y=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?m["default"]:arguments[0];(0,u["default"])(this,t);var n=(0,_["default"])(this,(0,o["default"])(t).call(this));return n.audioContext=e,n.outputNode=null,n}return(0,h["default"])(t,e),(0,c["default"])(t,[{key:"connect",value:function(e){return this.outputNode.connect(e),this}},{key:"disconnect",value:function(e){return this.outputNode.disconnect(e),this}}]),t}(p["default"]);n["default"]=y},{"./audio-context":1,"./time-engine":5,"babel-runtime/core-js/object/get-prototype-of":20,"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27,"babel-runtime/helpers/inherits":29,"babel-runtime/helpers/possibleConstructorReturn":30}],3:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function o(e,t){for(var n=e.length,r=1;n>r;r++)if(e[r]===t)return r;return-1}Object.defineProperty(n,"__esModule",{value:!0});var s=e("babel-runtime/helpers/classCallCheck"),u=r(s),a=e("babel-runtime/helpers/createClass"),c=r(a),l=function(e,t){return t>e},_=function(e,t){return e>t},f=function(e,t){return e>t},h=function(e,t){return t>e},d=Number.POSITIVE_INFINITY,p=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?100:arguments[0];(0,u["default"])(this,e),this._currentLength=1,this._heap=new Array(t+1),this._reverse=null,this.reverse=!1}return(0,c["default"])(e,[{key:"_bubbleUp",value:function(e){for(var t=this._heap[e],n=e,r=Math.floor(n/2),o=this._heap[r];o&&this._isHigher(t.queueTime,o.queueTime);)i(this._heap,n,r),n=r,r=Math.floor(n/2),o=this._heap[r]}},{key:"_bubbleDown",value:function(e){for(var t=this._heap[e],n=e,r=2*n,o=r+1,s=this._heap[r],u=this._heap[o];s&&this._isLower(t.queueTime,s.queueTime)||u&&this._isLower(t.queueTime,u.queueTime);){var a=void 0;a=u?this._isHigher(s.queueTime,u.queueTime)?r:o:r,i(this._heap,n,a),n=a,r=2*n,o=r+1,s=this._heap[r],u=this._heap[o]}}},{key:"buildHeap",value:function(){for(var e=Math.floor((this._currentLength-1)/2),t=e;t>0;t--)this._bubbleDown(t)}},{key:"insert",value:function(e,t){return Math.abs(t)!==d?(e.queueTime=t,this._heap[this._currentLength]=e,this._bubbleUp(this._currentLength),this._currentLength+=1,this.time):(e.queueTime=void 0,this.remove(e))}},{key:"move",value:function(e,t){if(Math.abs(t)!==d){var n=o(this._heap,e);if(-1!==n){e.queueTime=t;var r=this._heap[Math.floor(n/2)];r&&this._isHigher(t,r.queueTime)?this._bubbleUp(n):this._bubbleDown(n)}return this.time}return e.queueTime=void 0,this.remove(e)}},{key:"remove",value:function(e){var t=o(this._heap,e);if(-1!==t){var n=this._currentLength-1;if(t===n)return this._heap[n]=void 0,this._currentLength=n,this.time;if(i(this._heap,t,n),this._heap[n]=void 0,1===t)this._bubbleDown(1);else{var r=this._heap[t],s=this._heap[Math.floor(t/2)];s&&this._isHigher(r.queueTime,s.queueTime)?this._bubbleUp(t):this._bubbleDown(t)}this._currentLength=n}return this.time}},{key:"clear",value:function(){this._currentLength=1,this._heap=new Array(this._heap.length)}},{key:"has",value:function(e){return-1!==this._heap.indexOf(e)}},{key:"time",get:function(){return this._currentLength>1?this._heap[1].queueTime:1/0}},{key:"head",get:function(){return this._heap[1]}},{key:"reverse",set:function(e){e!==this._reverse&&(this._reverse=e,this._reverse===!0?(this._isLower=l,this._isHigher=f):(this._isLower=_,this._isHigher=h),this.buildHeap())},get:function(){return this._reverse}}]),e}();n["default"]=p},{"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27}],4:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("babel-runtime/core-js/set"),o=r(i),s=e("babel-runtime/core-js/object/get-prototype-of"),u=r(s),a=e("babel-runtime/helpers/classCallCheck"),c=r(a),l=e("babel-runtime/helpers/createClass"),_=r(l),f=e("babel-runtime/helpers/possibleConstructorReturn"),h=r(f),d=e("babel-runtime/helpers/inherits"),p=r(d),b=e("./priority-queue"),m=r(b),y=e("./time-engine"),v=r(y),g=e("./audio-context"),j=(r(g),function(e){function t(){(0,c["default"])(this,t);var e=(0,h["default"])(this,(0,u["default"])(t).call(this));return e.__queue=new m["default"],e.__engines=new o["default"],e}return(0,p["default"])(t,e),(0,_["default"])(t,[{key:"advanceTime",value:function(e){var t=this.__queue.head,n=t.advanceTime(e);return n?this.__queue.move(t,n):(t.master=null,this.__engines["delete"](t),this.__queue.remove(t)),this.__queue.time}},{key:"defer",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentTime:arguments[1];if(!(e instanceof Function))throw new Error("object cannot be defered by scheduler");this.add({advanceTime:function(t){e(t)}},t)}},{key:"add",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentTime:arguments[1];if(!v["default"].implementsScheduled(e))throw new Error("object cannot be added to scheduler");if(e.master)throw new Error("object has already been added to a master");e.master=this,this.__engines.add(e);var n=this.__queue.insert(e,t);this.resetTime(n)}},{key:"remove",value:function(e){if(e.master!==this)throw new Error("object has not been added to this scheduler");e.master=null,this.__engines["delete"](e);var t=this.__queue.remove(e);this.resetTime(t)}},{key:"resetEngineTime",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentTime:arguments[1];if(e.master!==this)throw new Error("object has not been added to this scheduler");var n=void 0;n=this.__queue.has(e)?this.__queue.move(e,t):this.__queue.insert(e,t),this.resetTime(n)}},{key:"has",value:function(e){return this.__engines.has(e)}},{key:"clear",value:function(){this.__queue.clear(),this.__engines.clear(),this.resetTime(1/0)}},{key:"currentTime",get:function(){return 0}}]),t}(v["default"]));n["default"]=j},{"./audio-context":1,"./priority-queue":3,"./time-engine":5,"babel-runtime/core-js/object/get-prototype-of":20,"babel-runtime/core-js/set":22,"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27,"babel-runtime/helpers/inherits":29,"babel-runtime/helpers/possibleConstructorReturn":30}],5:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("babel-runtime/helpers/classCallCheck"),o=r(i),s=e("babel-runtime/helpers/createClass"),u=r(s),a=function(){function e(){(0,o["default"])(this,e),this.master=null,this.outputNode=null}return(0,u["default"])(e,[{key:"resetTime",value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];this.master&&this.master.resetEngineTime(this,e)}},{key:"resetPosition",value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];this.master&&this.master.resetEnginePosition(this,e)}},{key:"currentTime",get:function(){return this.master?this.master.currentTime:void 0}},{key:"currentPosition",get:function(){var e=this.master;return e&&void 0!==e.currentPosition?e.currentPosition:void 0}}],[{key:"implementsScheduled",value:function(e){return e.advanceTime&&e.advanceTime instanceof Function}},{key:"implementsTransported",value:function(e){return e.syncPosition&&e.syncPosition instanceof Function&&e.advancePosition&&e.advancePosition instanceof Function}},{key:"implementsSpeedControlled",value:function(e){return e.syncSpeed&&e.syncSpeed instanceof Function}}]),e}();n["default"]=a},{"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27}],6:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return void 0!==e?e:t}Object.defineProperty(n,"__esModule",{value:!0});var o=e("babel-runtime/core-js/object/get-prototype-of"),s=r(o),u=e("babel-runtime/helpers/classCallCheck"),a=r(u),c=e("babel-runtime/helpers/createClass"),l=r(c),_=e("babel-runtime/helpers/possibleConstructorReturn"),f=r(_),h=e("babel-runtime/helpers/inherits"),d=r(h),p=e("../core/audio-time-engine"),b=r(p),m=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,a["default"])(this,t);var n=(0,f["default"])(this,(0,s["default"])(t).call(this,e.audioContext));return n.buffer=i(e.buffer,null),n.periodAbs=i(e.periodAbs,.01),n.periodRel=i(e.periodRel,0),n.periodVar=i(e.periodVar,0),n.position=i(e.position,0),n.positionVar=i(e.positionVar,.003),n.durationAbs=i(e.durationAbs,.1),n.durationRel=i(e.durationRel,0),n.attackAbs=i(e.attackAbs,0),n.attackRel=i(e.attackRel,.5),n.attackShape=i(e.attackShape,"lin"),n.releaseAbs=i(e.releaseAbs,0),n.releaseRel=i(e.releaseRel,.5),n.releaseShape=i(e.releaseShape,"lin"),n.expRampOffset=i(e.expRampOffset,1e-4),n.resampling=i(e.resampling,0),n.resamplingVar=i(e.resamplingVar,0),n.gain=i(e.gain,1),n.centered=i(e.centered,!0),n.cyclic=i(e.cyclic,!1),n.wrapAroundExtension=i(e.wrapAroundExtension,0),n.outputNode=n.audioContext.createGain(),n}return(0,d["default"])(t,e),(0,l["default"])(t,[{key:"advanceTime",value:function(e){return e=Math.max(e,this.audioContext.currentTime),e+this.trigger(e)}},{key:"trigger",value:function(e){var t=this.audioContext,n=e||t.currentTime,r=this.periodAbs,i=this.currentPosition,o=this.durationAbs;if(this.buffer){var s=1;if(0!==this.resampling||this.resamplingVar>0){var u=2*(Math.random()-.5)*this.resamplingVar;s=Math.pow(2,(this.resampling+u)/1200)}r+=this.periodRel*o,o+=this.durationRel*r,this.periodVar>0&&(r+=2*(Math.random()-.5)*this.periodVar*r),this.centered&&(i-=.5*o),this.positionVar>0&&(i+=(2*Math.random()-1)*this.positionVar);var a=this.bufferDuration;if(0>i||i>=a)if(this.cyclic){var c=i/a;i=(c-Math.floor(c))*a,i+o>this.buffer.duration&&(o=this.buffer.duration-i)}else 0>i&&(n-=i,o+=i,i=0),i+o>a&&(o=a-i);if(this.gain>0&&o>=.001){var l=t.createGain(),_=this.attackAbs+this.attackRel*o,f=this.releaseAbs+this.releaseRel*o;if(_+f>o){var h=o/(_+f);_*=h,f*=h}var d=n+_,p=n+o/s,b=p-f;l.gain.value=0,"lin"===this.attackShape?(l.gain.setValueAtTime(0,n),l.gain.linearRampToValueAtTime(this.gain,d)):(l.gain.setValueAtTime(this.expRampOffset,n),l.gain.exponentialRampToValueAtTime(this.gain,d)),b>d&&l.gain.setValueAtTime(this.gain,b),"lin"===this.releaseShape?l.gain.linearRampToValueAtTime(0,p):l.gain.exponentialRampToValueAtTime(this.expRampOffset,p),l.connect(this.outputNode);var m=t.createBufferSource();m.buffer=this.buffer,m.playbackRate.value=s,m.connect(l),m.start(n,i),m.stop(p)}}return r}},{key:"bufferDuration",get:function(){if(this.buffer){var e=this.buffer.duration;return this.wrapAroundExtension&&(e-=this.wrapAroundExtension),e}return 0}},{key:"currentPosition",get:function(){var e=this.master;return e&&void 0!==e.currentPosition?e.currentPosition:this.position}}]),t}(b["default"]);n["default"]=m},{"../core/audio-time-engine":2,"babel-runtime/core-js/object/get-prototype-of":20,"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27,"babel-runtime/helpers/inherits":29,"babel-runtime/helpers/possibleConstructorReturn":30}],7:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return void 0!==e?e:t}Object.defineProperty(n,"__esModule",{value:!0});var o=e("babel-runtime/core-js/object/get-prototype-of"),s=r(o),u=e("babel-runtime/helpers/classCallCheck"),a=r(u),c=e("babel-runtime/helpers/createClass"),l=r(c),_=e("babel-runtime/helpers/possibleConstructorReturn"),f=r(_),h=e("babel-runtime/helpers/inherits"),d=r(h),p=e("../core/audio-time-engine"),b=r(p),m=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,a["default"])(this,t);var n=(0,f["default"])(this,(0,s["default"])(t).call(this,e.audioContext));return n.__period=i(e.period,1),n.clickFreq=i(e.clickFreq,600),n.clickAttack=i(e.clickAttack,.002),n.clickRelease=i(e.clickRelease,.098),n.__lastTime=0,n.__phase=0,n.__gainNode=n.audioContext.createGain(),n.__gainNode.gain.value=i(e.gain,1),n.outputNode=n.__gainNode,n}return(0,d["default"])(t,e),(0,l["default"])(t,[{key:"advanceTime",value:function(e){return this.trigger(e),this.__lastTime=e,e+this.__period}},{key:"syncPosition",value:function(e,t,n){if(this.__period>0){var r=(Math.floor(t/this.__period)+this.__phase)*this.__period;return n>0&&t>r?r+=this.__period:0>n&&r>t&&(r-=this.__period),r}return 1/0*n}},{key:"advancePosition",value:function(e,t,n){return this.trigger(e),0>n?t-this.__period:t+this.__period}},{key:"trigger",value:function(e){var t=this.audioContext,n=this.clickAttack,r=this.clickRelease,i=t.createGain();i.gain.value=0,i.gain.setValueAtTime(0,e),i.gain.linearRampToValueAtTime(1,e+n),i.gain.exponentialRampToValueAtTime(1e-7,e+n+r),i.gain.setValueAtTime(0,e),i.connect(this.outputNode);var o=t.createOscillator();o.frequency.value=this.clickFreq,o.start(e),o.stop(e+n+r),o.connect(i)}},{key:"gain",set:function(e){this.__gainNode.gain.value=e},get:function(){return this.__gainNode.gain.value}},{key:"period",set:function(e){this.__period=e;var t=this.master;t&&(t.resetEngineTime?t.resetEngineTime(this,this.__lastTime+e):t.resetEnginePosition&&t.resetEnginePosition(this))},get:function(){return this.__period}},{key:"phase",set:function(e){this.__phase=e-Math.floor(e);var t=this.master;t&&void 0!==t.resetEnginePosition&&t.resetEnginePosition(this)},get:function(){return this.__phase}}]),t}(b["default"]);n["default"]=m},{"../core/audio-time-engine":2,"babel-runtime/core-js/object/get-prototype-of":20,"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27,"babel-runtime/helpers/inherits":29,"babel-runtime/helpers/possibleConstructorReturn":30}],8:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return void 0!==e?e:t}Object.defineProperty(n,"__esModule",{value:!0});var o=e("babel-runtime/core-js/object/get-prototype-of"),s=r(o),u=e("babel-runtime/helpers/classCallCheck"),a=r(u),c=e("babel-runtime/helpers/createClass"),l=r(c),_=e("babel-runtime/helpers/possibleConstructorReturn"),f=r(_),h=e("babel-runtime/helpers/inherits"),d=r(h),p=e("../core/audio-time-engine"),b=r(p),m=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,a["default"])(this,t);var n=(0,f["default"])(this,(0,s["default"])(t).call(this,e.audioContext));return n.transport=null,n.buffer=i(e.buffer,null),n.fadeTime=i(e.fadeTime,.005),n.__time=0,n.__position=0,n.__speed=0,n.__bufferSource=null,n.__envNode=null,n.__gainNode=n.audioContext.createGain(),n.__gainNode.gain.value=i(e.gain,1),n.__cyclic=i(e.cyclic,!1),n.outputNode=n.__gainNode,n}return(0,d["default"])(t,e),(0,l["default"])(t,[{key:"__start",value:function(e,t,n){var r=this.audioContext;if(this.buffer){var i=this.buffer.duration;if(this.__cyclic&&(0>t||t>=i)){var o=t/i;t=(o-Math.floor(o))*i}t>=0&&i>t&&n>0&&(this.__envNode=r.createGain(),this.__envNode.gain.setValueAtTime(0,e),this.__envNode.gain.linearRampToValueAtTime(1,e+this.fadeTime),this.__envNode.connect(this.__gainNode),this.__bufferSource=r.createBufferSource(),this.__bufferSource.buffer=this.buffer,this.__bufferSource.playbackRate.value=n,this.__bufferSource.loop=this.__cyclic,this.__bufferSource.loopStart=0,this.__bufferSource.loopEnd=i,this.__bufferSource.start(e,t),this.__bufferSource.connect(this.__envNode))}}},{key:"__halt",value:function(e){this.__bufferSource&&(this.__envNode.gain.cancelScheduledValues(e),this.__envNode.gain.setValueAtTime(this.__envNode.gain.value,e),this.__envNode.gain.linearRampToValueAtTime(0,e+this.fadeTime),this.__bufferSource.stop(e+this.fadeTime),this.__bufferSource=null,this.__envNode=null)}},{key:"syncSpeed",value:function(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],i=this.__speed;(n!==i||r)&&(r||0>i*n?(this.__halt(e),this.__start(e,t,n)):0===i||r?this.__start(e,t,n):0===n?this.__halt(e):this.__bufferSource&&this.__bufferSource.playbackRate.setValueAtTime(n,e),this.__speed=n)}},{key:"cyclic",set:function(e){if(e!==this.__cyclic){var t=this.currentTime,n=this.currentosition;this.__halt(t),this.__cyclic=e,0!==this.__speed&&this.__start(t,n,this.__speed)}},get:function(){return this.__cyclic}},{key:"gain",set:function(e){var t=this.currentTime;this.__gainNode.cancelScheduledValues(t),this.__gainNode.setValueAtTime(this.__gainNode.gain.value,t),this.__gainNode.linearRampToValueAtTime(0,t+this.fadeTime)},get:function(){return this.__gainNode.gain.value}},{key:"bufferDuration",get:function(){return this.buffer?this.buffer.duration:0}}]),t}(b["default"]);n["default"]=m},{"../core/audio-time-engine":2,"babel-runtime/core-js/object/get-prototype-of":20,"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27,"babel-runtime/helpers/inherits":29,"babel-runtime/helpers/possibleConstructorReturn":30}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return void 0!==e?e:t}function o(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=e.length;if(r>0){var i=e[0],o=e[r-1];if(i>t)n=-1;else if(t>=o)n=r-1;else{for((0>n||n>=r)&&(n=Math.floor((r-1)*(t-i)/(o-i)));e[n]>t;)n--;for(;e[n+1]<=t;)n++}}return n}function s(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=e.length;if(r>0){var i=e[0],o=e[r-1];if(i>=t)n=0;else if(t>=o)n=r;else{for((0>n||n>=r)&&(n=Math.floor((r-1)*(t-i)/(o-i)));e[n]<t;)n++;for(;e[n+1]>=t;)n--}}return n}Object.defineProperty(n,"__esModule",{value:!0});var u=e("babel-runtime/core-js/object/get-prototype-of"),a=r(u),c=e("babel-runtime/helpers/classCallCheck"),l=r(c),_=e("babel-runtime/helpers/createClass"),f=r(_),h=e("babel-runtime/helpers/possibleConstructorReturn"),d=r(h),p=e("babel-runtime/helpers/inherits"),b=r(p),m=e("../core/audio-time-engine"),y=r(m),v=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,l["default"])(this,t);var n=(0,d["default"])(this,(0,a["default"])(t).call(this,e.audioContext));return n.buffer=i(e.buffer,null),n.periodAbs=i(e.periodAbs,0),n.periodRel=i(e.periodRel,1),n.periodVar=i(e.periodVar,0),n.positionArray=i(e.positionArray,[0]),n.positionVar=i(e.positionVar,0),n.durationArray=i(e.durationArray,[0]),n.durationAbs=i(e.durationAbs,0),n.durationRel=i(e.durationRel,1),n.offsetArray=i(e.offsetArray,[0]),n.offsetAbs=i(e.offsetAbs,-.005),n.offsetRel=i(e.offsetRel,0),n.delay=i(e.delay,.005),n.attackAbs=i(e.attackAbs,.005),n.attackRel=i(e.attackRel,0),n.releaseAbs=i(e.releaseAbs,.005),n.releaseRel=i(e.releaseRel,0),n.resampling=i(e.resampling,0),n.resamplingVar=i(e.resamplingVar,0),n.gain=i(e.gain,1),n.segmentIndex=i(e.segmentIndex,0),n.cyclic=i(e.cyclic,!1),n.__cyclicOffset=0,n.wrapAroundExtension=i(e.wrapAroundExtension,0),n.outputNode=n.audioContext.createGain(),n}return(0,b["default"])(t,e),(0,f["default"])(t,[{key:"advanceTime",value:function(e){return e=Math.max(e,this.audioContext.currentTime),e+this.trigger(e)}},{key:"syncPosition",value:function(e,t,n){var r=this.segmentIndex,i=0,u=this.bufferDuration;if(this.cyclic){var a=t/u;i=Math.floor(a)*u,t-=i}if(n>0){if(r=s(this.positionArray,t),r>=this.positionArray.length&&(r=0,i+=u,!this.cyclic))return 1/0}else{if(!(0>n))return 1/0;if(r=o(this.positionArray,t),0>r&&(r=this.positionArray.length-1,i-=u,!this.cyclic))return-(1/0)}return this.segmentIndex=r,this.__cyclicOffset=i,i+this.positionArray[r]}},{key:"advancePosition",value:function(e,t,n){var r=this.segmentIndex,i=this.__cyclicOffset;if(this.trigger(e),n>0){if(r++,r>=this.positionArray.length&&(r=0,i+=this.bufferDuration,!this.cyclic))return 1/0}else if(r--,0>r&&(r=this.positionArray.length-1,i-=this.bufferDuration,!this.cyclic))return-(1/0);return this.segmentIndex=r,this.__cyclicOffset=i,i+this.positionArray[r]}},{key:"trigger",value:function(e){var t=this.audioContext,n=(e||t.currentTime)+this.delay,r=this.periodAbs,i=this.segmentIndex;if(this.buffer){var o=0,s=0,u=0,a=1,c=this.bufferDuration;if(this.cyclic?i%=this.positionArray.length:i=Math.max(0,Math.min(i,this.positionArray.length-1)),this.positionArray&&(o=this.positionArray[i]||0),this.durationArray&&(s=this.durationArray[i]||0),this.offsetArray&&(u=this.offsetArray[i]||0),0!==this.resampling||this.resamplingVar>0){var l=2*(Math.random()-.5)*this.resamplingVar;a=Math.pow(2,(this.resampling+l)/1200)}if(0===s||this.periodRel>0){var _,f,h=i+1;h===this.positionArray.length?this.cyclic?(_=this.positionArray[0]+c,f=this.offsetArray[0]):(_=c,f=0):(_=this.positionArray[h],f=this.offsetArray[h]);var d=_-o;u>0&&(d-=u),f>0&&(d+=f),0>d&&(d=0),0===s&&(s=d),r+=this.periodRel*d}if(s*=this.durationRel,s+=this.durationAbs,u*=this.offsetRel,u+=this.offsetAbs,0>u?(s-=u,o+=u,n+=u/a):n-=u/a,this.positionVar>0&&(o+=2*(Math.random()-.5)*this.positionVar),0>o&&(s+=o,o=0),o+s>this.buffer.duration&&(s=this.buffer.duration-o),s/=a,this.gain>0&&s>0){var p=t.createGain(),b=this.attackAbs+this.attackRel*s,m=this.releaseAbs+this.releaseRel*s;if(b+m>s){var y=s/(b+m);b*=y,m*=y}var v=n+b,g=n+s,j=g-m;p.gain.value=0,p.gain.setValueAtTime(0,n),p.gain.linearRampToValueAtTime(this.gain,v),j>v&&p.gain.setValueAtTime(this.gain,j),p.gain.linearRampToValueAtTime(0,g),p.connect(this.outputNode);var k=t.createBufferSource();k.buffer=this.buffer,k.playbackRate.value=a,k.connect(p),k.start(n,o),k.stop(n+s)}}return r}},{key:"bufferDuration",get:function(){if(this.buffer){var e=this.buffer.duration;return this.wrapAroundExtension&&(e-=this.wrapAroundExtension),e}return 0}}]),t}(y["default"]);n["default"]=v},{"../core/audio-time-engine":2,"babel-runtime/core-js/object/get-prototype-of":20,"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27,"babel-runtime/helpers/inherits":29,"babel-runtime/helpers/possibleConstructorReturn":30}],10:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./core/audio-context");Object.defineProperty(n,"audioContext",{enumerable:!0,get:function(){return r(i)["default"]}});var o=e("./core/time-engine");Object.defineProperty(n,"TimeEngine",{enumerable:!0,get:function(){return r(o)["default"]}});var s=e("./core/audio-time-engine");Object.defineProperty(n,"AudioTimeEngine",{enumerable:!0,get:function(){return r(s)["default"]}});var u=e("./core/priority-queue");Object.defineProperty(n,"PriorityQueue",{enumerable:!0,get:function(){return r(u)["default"]}});var a=e("./core/scheduling-queue");Object.defineProperty(n,"SchedulingQueue",{enumerable:!0,get:function(){return r(a)["default"]}});var c=e("./engines/granular-engine");Object.defineProperty(n,"GranularEngine",{enumerable:!0,get:function(){return r(c)["default"]}});var l=e("./engines/metronome");Object.defineProperty(n,"Metronome",{enumerable:!0,get:function(){return r(l)["default"]}});var _=e("./engines/player-engine");Object.defineProperty(n,"PlayerEngine",{enumerable:!0,get:function(){return r(_)["default"]}});var f=e("./engines/segment-engine");Object.defineProperty(n,"SegmentEngine",{enumerable:!0,get:function(){return r(f)["default"]}});var h=e("./masters/play-control");Object.defineProperty(n,"PlayControl",{enumerable:!0,get:function(){return r(h)["default"]}});var d=e("./masters/transport");Object.defineProperty(n,"Transport",{enumerable:!0,get:function(){return r(d)["default"]}});var p=e("./masters/scheduler");Object.defineProperty(n,"Scheduler",{enumerable:!0,get:function(){return r(p)["default"]}});var b=e("./masters/simple-scheduler");Object.defineProperty(n,"SimpleScheduler",{enumerable:!0,get:function(){return r(b)["default"]}});var m=e("./masters/factories");Object.defineProperty(n,"getScheduler",{enumerable:!0,get:function(){return m.getScheduler}}),Object.defineProperty(n,"getSimpleScheduler",{enumerable:!0,get:function(){return m.getSimpleScheduler}})},{"./core/audio-context":1,"./core/audio-time-engine":2,"./core/priority-queue":3,"./core/scheduling-queue":4,"./core/time-engine":5,"./engines/granular-engine":6,"./engines/metronome":7,"./engines/player-engine":8,"./engines/segment-engine":9,"./masters/factories":11,"./masters/play-control":12,"./masters/scheduler":13,"./masters/simple-scheduler":14,"./masters/transport":15}],11:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.getSimpleScheduler=n.getScheduler=void 0;var i=e("babel-runtime/core-js/weak-map"),o=r(i),s=e("../core/audio-context"),u=r(s),a=e("./scheduler"),c=r(a),l=e("./simple-scheduler"),_=r(l),f=new o["default"],h=new o["default"];n.getScheduler=function(){var e=arguments.length<=0||void 0===arguments[0]?u["default"]:arguments[0],t=f.get(e);return t||(t=new c["default"]({audioContext:e}),f.set(e,t)),t},n.getSimpleScheduler=function(){var e=arguments.length<=0||void 0===arguments[0]?u["default"]:arguments[0],t=h.get(e);return t||(t=new _["default"]({audioContext:e}),h.set(e,t)),t}},{"../core/audio-context":1,"./scheduler":13,"./simple-scheduler":14,"babel-runtime/core-js/weak-map":25}],12:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("babel-runtime/helpers/get"),o=r(i),s=e("babel-runtime/core-js/object/get-prototype-of"),u=r(s),a=e("babel-runtime/helpers/classCallCheck"),c=r(a),l=e("babel-runtime/helpers/createClass"),_=r(l),f=e("babel-runtime/helpers/possibleConstructorReturn"),h=r(f),d=e("babel-runtime/helpers/inherits"),p=r(d),b=e("../core/audio-context"),m=r(b),y=e("../core/scheduling-queue"),v=r(y),g=e("../core/time-engine"),j=r(g),k=e("./factories"),x=1e-8,T=function(e){function t(e){(0,c["default"])(this,t);var n=(0,h["default"])(this,(0,u["default"])(t).call(this));return n.__playControl=e,n.lower=-(1/0),n.upper=1/0,n}return(0,p["default"])(t,e),(0,_["default"])(t,[{key:"advanceTime",value:function(e){var t=this.__playControl,n=t.speed,r=this.lower,i=this.upper;return n>0?e+=x:e-=EPSILON,n>0?(t.syncSpeed(e,r,n,!0),t.__getTimeAtPosition(i)-x):0>n?(t.syncSpeed(e,i,n,!0),t.__getTimeAtPosition(r)+x):1/0}},{key:"reschedule",value:function(e){var t=this.__playControl,n=Math.min(t.__loopStart,t.__loopEnd),r=Math.max(t.__loopStart,t.__loopEnd);this.speed=e,this.lower=n,this.upper=r,n===r&&(e=0),e>0?this.resetTime(t.__getTimeAtPosition(r)-x):0>e?this.resetTime(t.__getTimeAtPosition(n)+x):this.resetTime(1/0)}},{key:"applyLoopBoundaries",value:function(e,t){var n=this.lower,r=this.upper;return t>0&&e>=r?n+(e-n)%(r-n):0>t&&n>e?r-(r-e)%(r-n):e}}]),t}(j["default"]),P=function(){function e(t,n){(0,c["default"])(this,e),this.__playControl=t,n.master=this,this.__engine=n}return(0,_["default"])(e,[{key:"syncSpeed",value:function(e,t,n,r,i){this.__engine.syncSpeed(e,t,n,r)}},{key:"destroy",value:function(){this.__playControl=null,this.__engine.master=null,this.__engine=null}},{key:"currentTime",get:function(){return this.__playControl.currentTime}},{key:"currentPosition",get:function(){return this.__playControl.currentPosition}}]),e}(),w=function(e){function t(e,n){return(0,c["default"])(this,t),(0,h["default"])(this,(0,u["default"])(t).call(this,e,n))}return(0,p["default"])(t,e),t}(P),C=function(e){function t(e,n){(0,c["default"])(this,t);var r=(0,h["default"])(this,(0,u["default"])(t).call(this,e,n));return r.__schedulerHook=new E(e,n),r}return(0,p["default"])(t,e),(0,_["default"])(t,[{key:"syncSpeed",value:function(e,t,n,r,i){if(n!==i||r&&0!==n){var o;r||0>n*i?o=this.__engine.syncPosition(e,t,n):0===i?o=this.__engine.syncPosition(e,t,n):0===n?(o=1/0,this.__engine.syncSpeed&&this.__engine.syncSpeed(e,t,0)):this.__engine.syncSpeed&&this.__engine.syncSpeed(e,t,n),this.__schedulerHook.resetPosition(o)}}},{key:"resetEnginePosition",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1];if(void 0===t){var n=this.__playControl,r=n.__sync();t=this.__engine.syncPosition(r,n.__position,n.__speed)}this.__schedulerHook.resetPosition(t)}},{key:"destroy",value:function(){this.__schedulerHook.destroy(),this.__schedulerHook=null,(0,o["default"])((0,u["default"])(t.prototype),"destroy",this).call(this)}}]),t}(P),S=function(e){function t(e,n){(0,c["default"])(this,t);var r=(0,h["default"])(this,(0,u["default"])(t).call(this,e,n));return n.master=null,r.__schedulingQueue=new A(e,n),r}return(0,p["default"])(t,e),(0,_["default"])(t,[{key:"syncSpeed",value:function(e,t,n,r,i){0===i&&0!==n?this.__engine.resetTime():0!==i&&0===n&&this.__engine.resetTime(1/0)}},{key:"destroy",value:function(){this.__schedulingQueue.destroy(),(0,o["default"])((0,u["default"])(t.prototype),"destroy",this).call(this)}}]),t}(P),E=function(e){function t(e,n){(0,c["default"])(this,t);var r=(0,h["default"])(this,(0,u["default"])(t).call(this));return r.__playControl=e,r.__engine=n,r.__nextPosition=1/0,e.__scheduler.add(r,1/0),r}return(0,p["default"])(t,e),(0,_["default"])(t,[{key:"advanceTime",value:function(e){var t=this.__playControl,n=this.__engine,r=this.__nextPosition,i=n.advancePosition(e,r,t.__speed),o=t.__getTimeAtPosition(i);return this.__nextPosition=i,o}},{key:"resetPosition",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.__nextPosition:arguments[0],t=this.__playControl.__getTimeAtPosition(e);this.__nextPosition=e,this.resetTime(t)}},{key:"destroy",value:function(){this.__playControl.__scheduler.remove(this),this.__playControl=null,this.__engine=null}},{key:"currentTime",get:function(){return this.__playControl.currentTime}},{key:"currentPosition",get:function(){return this.__playControl.currentPosition}}]),t}(j["default"]),A=function(e){function t(e,n){(0,c["default"])(this,t);var r=(0,h["default"])(this,(0,u["default"])(t).call(this));return r.__playControl=e,r.__engine=n,r.add(n,1/0),e.__scheduler.add(r,1/0),r}return(0,p["default"])(t,e),(0,_["default"])(t,[{key:"destroy",value:function(){this.__playControl.__scheduler.remove(this),this.remove(this.__engine),this.__playControl=null,this.__engine=null}},{key:"currentTime",get:function(){return this.__playControl.currentTime}},{key:"currentPosition",get:function(){return this.__playControl.currentPosition}}]),t}(v["default"]),O=function(e){function t(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];(0,c["default"])(this,t);var r=(0,h["default"])(this,(0,u["default"])(t).call(this));return r.audioContext=n.audioContext||m["default"],r.__scheduler=(0,k.getScheduler)(r.audioContext),r.__playControlled=null,r.__loopControl=null,r.__loopStart=0,r.__loopEnd=1,r.__time=0,r.__position=0,
r.__speed=0,r.__playingSpeed=1,e&&r.__setEngine(e),r}return(0,p["default"])(t,e),(0,_["default"])(t,[{key:"__setEngine",value:function(e){if(e.master)throw new Error("object has already been added to a master");if(j["default"].implementsSpeedControlled(e))this.__playControlled=new w(this,e);else if(j["default"].implementsTransported(e))this.__playControlled=new C(this,e);else{if(!j["default"].implementsScheduled(e))throw new Error("object cannot be added to play control");this.__playControlled=new S(this,e)}}},{key:"__resetEngine",value:function(){this.__playControlled.destroy(),this.__playControlled=null}},{key:"__getTimeAtPosition",value:function(e){return this.__time+(e-this.__position)/this.__speed}},{key:"__getPositionAtTime",value:function(e){return this.__position+(e-this.__time)*this.__speed}},{key:"__sync",value:function(){var e=this.currentTime;return this.__position+=(e-this.__time)*this.__speed,this.__time=e,e}},{key:"set",value:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0],t=this.__sync(),n=this.__speed;null!==this.__playControlled&&this.__playControlled.__engine!==e&&(this.syncSpeed(t,this.__position,0),this.__playControlled&&this.__resetEngine(),null===this.__playControlled&&null!==e&&(this.__setEngine(e),0!==n&&this.syncSpeed(t,this.__position,n)))}},{key:"setLoopBoundaries",value:function(e,t){this.__loopStart=e,this.__loopEnd=t,this.loop=this.loop}},{key:"syncSpeed",value:function(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],i=this.__speed;(n!==i||r)&&((r||0===i)&&this.__loopControl&&(t=this.__loopControl.applyLoopBoundaries(t,n)),this.__time=e,this.__position=t,this.__speed=n,this.__playControlled&&this.__playControlled.syncSpeed(e,t,n,r,i),this.__loopControl&&this.__loopControl.reschedule(n))}},{key:"start",value:function(){var e=this.__sync();this.syncSpeed(e,this.__position,this.__playingSpeed)}},{key:"pause",value:function(){var e=this.__sync();this.syncSpeed(e,this.__position,0)}},{key:"stop",value:function(){var e=this.__sync();this.syncSpeed(e,this.__position,0),this.seek(0)}},{key:"seek",value:function(e){if(e!==this.__position){var t=this.__sync();this.__position=e,this.syncSpeed(t,e,this.__speed,!0)}}},{key:"currentTime",get:function(){return this.__scheduler.currentTime}},{key:"currentPosition",get:function(){return this.__position+(this.__scheduler.currentTime-this.__time)*this.__speed}},{key:"loop",set:function(e){if(e&&this.__loopStart>-(1/0)&&this.__loopEnd<1/0){if(this.__loopControl||(this.__loopControl=new T(this),this.__scheduler.add(this.__loopControl,1/0)),0!==this.__speed){var t=this.currentPosition,n=Math.min(this.__loopStart,this.__loopEnd),r=Math.max(this.__loopStart,this.__loopEnd);this.__speed>0&&t>r?this.seek(r):this.__speed<0&&n>t?this.seek(n):this.__loopControl.reschedule(this.__speed)}}else this.__loopControl&&(this.__scheduler.remove(this.__loopControl),this.__loopControl=null)},get:function(){return!!this.__loopControl}},{key:"loopStart",set:function(e){this.setLoopBoundaries(e,this.__loopEnd)},get:function(){return this.__loopStart}},{key:"loopEnd",set:function(e){this.setLoopBoundaries(this.__loopStart,e)},get:function(){return this.__loopEnd}},{key:"speed",set:function(e){var t=this.__sync();e>=0?.01>e?e=.01:e>100&&(e=100):-100>e?e=-100:e>-.01&&(e=-.01),this.__playingSpeed=e,0!==this.__speed&&this.syncSpeed(t,this.__position,e)},get:function(){return this.__playingSpeed}}]),t}(j["default"]);n["default"]=O},{"../core/audio-context":1,"../core/scheduling-queue":4,"../core/time-engine":5,"./factories":11,"babel-runtime/core-js/object/get-prototype-of":20,"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27,"babel-runtime/helpers/get":28,"babel-runtime/helpers/inherits":29,"babel-runtime/helpers/possibleConstructorReturn":30}],13:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("babel-runtime/core-js/object/get-prototype-of"),o=r(i),s=e("babel-runtime/helpers/classCallCheck"),u=r(s),a=e("babel-runtime/helpers/createClass"),c=r(a),l=e("babel-runtime/helpers/possibleConstructorReturn"),_=r(l),f=e("babel-runtime/helpers/inherits"),h=r(f),d=e("debug"),p=r(d),b=e("../core/audio-context"),m=r(b),y=e("../core/scheduling-queue"),v=r(y),g=(0,p["default"])("wavesjs:audio"),j=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,u["default"])(this,t);var n=(0,_["default"])(this,(0,o["default"])(t).call(this));return n.audioContext=e.audioContext||m["default"],n.__currentTime=null,n.__nextTime=1/0,n.__timeout=null,n.period=e.period||.025,n.lookahead=e.lookahead||.1,n}return(0,h["default"])(t,e),(0,c["default"])(t,[{key:"__tick",value:function(){var e=this.audioContext,t=e.currentTime,n=this.__nextTime;for(this.__timeout=null;n<=t+this.lookahead;)this.__currentTime=n,n=this.advanceTime(n);this.__currentTime=null,this.resetTime(n)}},{key:"resetTime",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?this.currentTime:arguments[0];if(this.master)this.master.reset(this,t);else{if(this.__timeout&&(clearTimeout(this.__timeout),this.__timeout=null),t!==1/0){this.__nextTime===1/0&&g("Scheduler Start");var n=Math.max(t-this.lookahead-this.audioContext.currentTime,this.period);this.__timeout=setTimeout(function(){e.__tick()},1e3*n)}else this.__nextTime!==1/0&&g("Scheduler Stop");this.__nextTime=t}}},{key:"currentTime",get:function(){return this.master?this.master.currentTime:this.__currentTime||this.audioContext.currentTime+this.lookahead}},{key:"currentPosition",get:function(){var e=this.master;return e&&void 0!==e.currentPosition?e.currentPosition:void 0}}]),t}(v["default"]);n["default"]=j},{"../core/audio-context":1,"../core/scheduling-queue":4,"babel-runtime/core-js/object/get-prototype-of":20,"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27,"babel-runtime/helpers/inherits":29,"babel-runtime/helpers/possibleConstructorReturn":30,debug:128}],14:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("babel-runtime/core-js/set"),o=r(i),s=e("babel-runtime/helpers/classCallCheck"),u=r(s),a=e("babel-runtime/helpers/createClass"),c=r(a),l=e("debug"),_=r(l),f=e("../core/audio-context"),h=r(f),d=e("../core/time-engine"),p=r(d),b=(0,_["default"])("wavesjs:audio"),m=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,u["default"])(this,e),this.audioContext=t.audioContext||h["default"],this.__engines=new o["default"],this.__schedEngines=[],this.__schedTimes=[],this.__currentTime=null,this.__timeout=null,this.period=t.period||.025,this.lookahead=t.lookahead||.1}return(0,c["default"])(e,[{key:"__scheduleEngine",value:function(e,t){this.__schedEngines.push(e),this.__schedTimes.push(t)}},{key:"__rescheduleEngine",value:function(e,t){var n=this.__schedEngines.indexOf(e);n>=0?t!==1/0?this.__schedTimes[n]=t:(this.__schedEngines.splice(n,1),this.__schedTimes.splice(n,1)):1/0>t&&(this.__schedEngines.push(e),this.__schedTimes.push(t))}},{key:"__unscheduleEngine",value:function(e){var t=this.__schedEngines.indexOf(e);t>=0&&(this.__schedEngines.splice(t,1),this.__schedTimes.splice(t,1))}},{key:"__resetTick",value:function(){this.__schedEngines.length>0?this.__timeout||(b("SimpleScheduler Start"),this.__tick()):this.__timeout&&(b("SimpleScheduler Stop"),clearTimeout(this.__timeout),this.__timeout=null)}},{key:"__tick",value:function(){for(var e=this,t=this.audioContext,n=t.currentTime,r=0;r<this.__schedEngines.length;){for(var i=this.__schedEngines[r],o=this.__schedTimes[r];o&&o<=n+this.lookahead;)o=Math.max(o,n),this.__currentTime=o,o=i.advanceTime(o);o&&1/0>o?this.__schedTimes[r++]=o:(this.__unscheduleEngine(i),o||(i.master=null,this.__engines["delete"](i)))}this.__currentTime=null,this.__timeout=null,this.__schedEngines.length>0&&(this.__timeout=setTimeout(function(){e.__tick()},1e3*this.period))}},{key:"defer",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentTime:arguments[1];if(!(e instanceof Function))throw new Error("object cannot be defered by scheduler");this.add({advanceTime:function(t){e(t)}},t)}},{key:"add",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentTime:arguments[1];if(!p["default"].implementsScheduled(e))throw new Error("object cannot be added to scheduler");if(e.master)throw new Error("object has already been added to a master");e.master=this,this.__engines.add(e),this.__scheduleEngine(e,t),this.__resetTick()}},{key:"remove",value:function(e){if(!e.master||e.master!==this)throw new Error("engine has not been added to this scheduler");e.master=null,this.__engines["delete"](e),this.__unscheduleEngine(e),this.__resetTick()}},{key:"resetEngineTime",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentTime:arguments[1];this.__rescheduleEngine(e,t),this.__resetTick()}},{key:"has",value:function(e){return this.__engines.has(e)}},{key:"clear",value:function(){this.__timeout&&(clearTimeout(this.__timeout),this.__timeout=null),this.__schedEngines.length=0,this.__schedTimes.length=0}},{key:"currentTime",get:function(){return this.__currentTime||this.audioContext.currentTime+this.lookahead}},{key:"currentPosition",get:function(){}}]),e}();n["default"]=m},{"../core/audio-context":1,"../core/time-engine":5,"babel-runtime/core-js/set":22,"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27,debug:128}],15:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n,r){e.push(n),t.push(r)}function o(e,t,n){var r=e.indexOf(n);if(r>=0){var i=t[r];return e.splice(r,1),t.splice(r,1),i}return null}Object.defineProperty(n,"__esModule",{value:!0});var s=e("babel-runtime/core-js/get-iterator"),u=r(s),a=e("babel-runtime/helpers/get"),c=r(a),l=e("babel-runtime/core-js/object/get-prototype-of"),_=r(l),f=e("babel-runtime/helpers/classCallCheck"),h=r(f),d=e("babel-runtime/helpers/createClass"),p=r(d),b=e("babel-runtime/helpers/possibleConstructorReturn"),m=r(b),y=e("babel-runtime/helpers/inherits"),v=r(y),g=e("../core/audio-context"),j=r(g),k=e("../core/priority-queue"),x=r(k),T=e("../core/scheduling-queue"),P=r(T),w=e("../core/time-engine"),C=r(w),S=e("./factories"),E=function(e){function t(e,n,r,i,o){var s=arguments.length<=5||void 0===arguments[5]?1:arguments[5];(0,h["default"])(this,t);var u=(0,m["default"])(this,(0,_["default"])(t).call(this));return u.master=e,u.__engine=n,n.master=u,u.__startPosition=r,u.__endPosition=isFinite(i)?r+i:1/0,u.__offsetPosition=r+o,u.__stretchPosition=s,u.__isRunning=!1,u}return(0,v["default"])(t,e),(0,p["default"])(t,[{key:"setBoundaries",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?1:arguments[3];this.__startPosition=e,this.__endPosition=e+t,this.__offsetPosition=e+n,this.__stretchPosition=r,this.resetPosition()}},{key:"start",value:function(e,t,n){}},{key:"stop",value:function(e,t){}},{key:"resetPosition",value:function(e){void 0!==e&&(e+=this.__offsetPosition),this.master.resetEnginePosition(this,e)}},{key:"syncPosition",value:function(e,t,n){if(n>0){if(t<this.__startPosition)return this.__isRunning&&this.stop(e,t-this.__offsetPosition),this.__isRunning=!1,this.__startPosition;if(t<this.__endPosition)return this.start(e,t-this.__offsetPosition,n),this.__isRunning=!0,this.__endPosition}else{if(t>this.__endPosition)return this.__isRunning&&this.stop(e,t-this.__offsetPosition),this.__isRunning=!1,this.__endPosition;if(t>this.__startPosition)return this.start(e,t-this.__offsetPosition,n),this.__isRunning=!0,this.__startPosition}return this.__isRunning&&this.stop(e,t),this.__isRunning=!1,1/0*n}},{key:"advancePosition",value:function(e,t,n){return this.__isRunning?(this.stop(e,t-this.__offsetPosition),this.__isRunning=!1,1/0*n):(this.start(e,t-this.__offsetPosition,n),this.__isRunning=!0,n>0?this.__endPosition:this.__startPosition)}},{key:"syncSpeed",value:function(e,t,n){0===n&&this.stop(e,t-this.__offsetPosition)}},{key:"destroy",value:function(){this.master=null,this.__engine.master=null,this.__engine=null}},{key:"currentTime",get:function(){return this.master.currentTime}},{key:"currentPosition",get:function(){return this.master.currentPosition-this.__offsetPosition}}]),t}(C["default"]),A=function(e){function t(e,n,r,i,o){return(0,h["default"])(this,t),(0,m["default"])(this,(0,_["default"])(t).call(this,e,n,r,i,o))}return(0,v["default"])(t,e),(0,p["default"])(t,[{key:"syncPosition",value:function(e,t,n){return n>0&&t<this.__endPosition?t=Math.max(t,this.__startPosition):0>n&&t>=this.__startPosition&&(t=Math.min(t,this.__endPosition)),this.__offsetPosition+this.__engine.syncPosition(e,t-this.__offsetPosition,n)}},{key:"advancePosition",value:function(e,t,n){return t=this.__offsetPosition+this.__engine.advancePosition(e,t-this.__offsetPosition,n),n>0&&t<this.__endPosition||0>n&&t>=this.__startPosition?t:1/0*n}},{key:"syncSpeed",value:function(e,t,n){this.__engine.syncSpeed&&this.__engine.syncSpeed(e,t,n)}},{key:"resetEnginePosition",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1];void 0!==t&&(t+=this.__offsetPosition),this.resetPosition(t)}}]),t}(E),O=function(e){function t(e,n,r,i,o){return(0,h["default"])(this,t),(0,m["default"])(this,(0,_["default"])(t).call(this,e,n,r,i,o))}return(0,v["default"])(t,e),(0,p["default"])(t,[{key:"start",value:function(e,t,n){this.__engine.syncSpeed(e,t,n,!0)}},{key:"stop",value:function(e,t){this.__engine.syncSpeed(e,t,0)}},{key:"syncSpeed",value:function(e,t,n){this.__isRunning&&this.__engine.syncSpeed(e,t,n)}},{key:"destroy",value:function(){this.__engine.syncSpeed(this.master.currentTime,this.master.currentPosition-this.__offsetPosition,0),(0,c["default"])((0,_["default"])(t.prototype),"destroy",this).call(this)}}]),t}(E),M=function(e){function t(e,n,r,i,o){(0,h["default"])(this,t);var s=(0,m["default"])(this,(0,_["default"])(t).call(this,e,n,r,i,o));return n.master=null,e.__schedulingQueue.add(n,1/0),s}return(0,v["default"])(t,e),(0,p["default"])(t,[{key:"start",value:function(e,t,n){this.master.__schedulingQueue.resetEngineTime(this.__engine,e)}},{key:"stop",value:function(e,t){this.master.__schedulingQueue.resetEngineTime(this.__engine,1/0)}},{key:"destroy",value:function(){this.master.__schedulingQueue.remove(this.__engine),(0,c["default"])((0,_["default"])(t.prototype),"destroy",this).call(this)}}]),t}(E),R=function(e){function t(e){(0,h["default"])(this,t);var n=(0,m["default"])(this,(0,_["default"])(t).call(this));return n.__transport=e,n.__nextPosition=1/0,n.__nextTime=1/0,e.__scheduler.add(n,1/0),n}return(0,v["default"])(t,e),(0,p["default"])(t,[{key:"advanceTime",value:function(e){var t=this.__transport,n=this.__nextPosition,r=t.__speed,i=t.advancePosition(e,n,r),o=t.__getTimeAtPosition(i);return this.__nextPosition=i,this.__nextTime=o,o}},{key:"resetPosition",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.__nextPosition:arguments[0],t=this.__transport,n=t.__getTimeAtPosition(e);this.__nextPosition=e,this.__nextTime=n,this.resetTime(n)}},{key:"destroy",value:function(){this.__transport.__scheduler.remove(this),this.__transport=null}}]),t}(C["default"]),N=function(e){function t(e){(0,h["default"])(this,t);var n=(0,m["default"])(this,(0,_["default"])(t).call(this));return n.__transport=e,e.__scheduler.add(n,1/0),n}return(0,v["default"])(t,e),(0,p["default"])(t,[{key:"destroy",value:function(){this.__transport.__scheduler.remove(this),this.__transport=null}},{key:"currentTime",get:function(){return this.__transport.currentTime}},{key:"currentPosition",get:function(){return this.__transport.currentPosition}}]),t}(P["default"]),q=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,h["default"])(this,t);var n=(0,m["default"])(this,(0,_["default"])(t).call(this));return n.audioContext=e.audioContext||j["default"],n.__engines=[],n.__transported=[],n.__scheduler=(0,S.getScheduler)(n.audioContext),n.__schedulerHook=new R(n),n.__transportedQueue=new x["default"],n.__schedulingQueue=new N(n),n.__time=0,n.__position=0,n.__speed=0,n}return(0,v["default"])(t,e),(0,p["default"])(t,[{key:"__getTimeAtPosition",value:function(e){return this.__time+(e-this.__position)/this.__speed}},{key:"__getPositionAtTime",value:function(e){return this.__position+(e-this.__time)*this.__speed}},{key:"__syncTransportedPosition",value:function(e,t,n){var r=this.__transported.length,i=1/0*n;if(r>0){this.__transportedQueue.clear(),this.__transportedQueue.reverse=0>n;for(var o=0;r>o;o++){var s=this.__transported[o],u=s.syncPosition(e,t,n);this.__transportedQueue.insert(s,u)}i=this.__transportedQueue.time}return i}},{key:"__syncTransportedSpeed",value:function(e,t,n){var r=!0,i=!1,o=void 0;try{for(var s,a=(0,u["default"])(this.__transported);!(r=(s=a.next()).done);r=!0){var c=s.value;c.syncSpeed(e,t,n)}}catch(l){i=!0,o=l}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}}},{key:"resetPosition",value:function(e){var t=this.master;t&&void 0!==t.resetEnginePosition?t.resetEnginePosition(this,e):this.__schedulerHook.resetPosition(e)}},{key:"syncPosition",value:function(e,t,n){return this.__time=e,this.__position=t,this.__speed=n,this.__syncTransportedPosition(e,t,n)}},{key:"advancePosition",value:function(e,t,n){var r=this.__transportedQueue.head,i=r.advancePosition(e,t,n);return this.__transportedQueue.move(r,i)}},{key:"syncSpeed",value:function(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],i=this.__speed;if(this.__time=e,this.__position=t,this.__speed=n,n!==i||r&&0!==n){var o=void 0;r||0>n*i?o=this.__syncTransportedPosition(e,t,n):0===i?o=this.__syncTransportedPosition(e,t,n):0===n?(o=1/0,this.__syncTransportedSpeed(e,t,0)):this.__syncTransportedSpeed(e,t,n),this.resetPosition(o)}}},{key:"add",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=arguments.length<=2||void 0===arguments[2]?1/0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?0:arguments[3],o=null;if(r===-(1/0)&&(r=0),e.master)throw new Error("object has already been added to a master");if(C["default"].implementsTransported(e))o=new A(this,e,t,n,r);else if(C["default"].implementsSpeedControlled(e))o=new O(this,e,t,n,r);else{if(!C["default"].implementsScheduled(e))throw new Error("object cannot be added to a transport");o=new M(this,e,t,n,r)}if(o){var s=this.__speed;if(i(this.__engines,this.__transported,e,o),0!==s){var u=o.syncPosition(this.currentTime,this.currentPosition,s),a=this.__transportedQueue.insert(o,u);this.resetPosition(a)}}return o}},{key:"remove",value:function(e){var t=e,n=o(this.__engines,this.__transported,e);if(n||(t=o(this.__transported,this.__engines,e),n=e),!t||!n)throw new Error("object has not been added to this transport");var r=this.__transportedQueue.remove(n);n.destroy(),0!==this.__speed&&this.resetPosition(r)}},{key:"resetEnginePosition",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1],n=this.__speed;if(0!==n){void 0===t&&(t=e.syncPosition(this.currentTime,this.currentPosition,n));var r=this.__transportedQueue.move(e,t);this.resetPosition(r)}}},{key:"clear",value:function(){this.syncSpeed(this.currentTime,this.currentPosition,0);var e=!0,t=!1,n=void 0;try{for(var r,i=(0,u["default"])(this.__transported);!(e=(r=i.next()).done);e=!0){var o=r.value;o.destroy()}}catch(s){t=!0,n=s}finally{try{!e&&i["return"]&&i["return"]()}finally{if(t)throw n}}}},{key:"currentTime",get:function(){return this.__scheduler.currentTime}},{key:"currentPosition",get:function(){var e=this.master;return e&&void 0!==e.currentPosition?e.currentPosition:this.__position+(this.__scheduler.currentTime-this.__time)*this.__speed}}]),t}(C["default"]);n["default"]=q},{"../core/audio-context":1,"../core/priority-queue":3,"../core/scheduling-queue":4,"../core/time-engine":5,"./factories":11,"babel-runtime/core-js/get-iterator":16,"babel-runtime/core-js/object/get-prototype-of":20,"babel-runtime/helpers/classCallCheck":26,"babel-runtime/helpers/createClass":27,"babel-runtime/helpers/get":28,"babel-runtime/helpers/inherits":29,"babel-runtime/helpers/possibleConstructorReturn":30}],16:[function(e,t,n){t.exports={"default":e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":32}],17:[function(e,t,n){t.exports={"default":e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":33}],18:[function(e,t,n){t.exports={"default":e("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":34}],19:[function(e,t,n){t.exports={"default":e("core-js/library/fn/object/get-own-property-descriptor"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-descriptor":35}],20:[function(e,t,n){t.exports={"default":e("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":36}],21:[function(e,t,n){t.exports={"default":e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":37}],22:[function(e,t,n){t.exports={"default":e("core-js/library/fn/set"),__esModule:!0}},{"core-js/library/fn/set":38}],23:[function(e,t,n){t.exports={"default":e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":39}],24:[function(e,t,n){t.exports={"default":e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":40}],25:[function(e,t,n){t.exports={"default":e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":41}],26:[function(e,t,n){"use strict";n.__esModule=!0,n["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],27:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var i=e("babel-runtime/core-js/object/define-property"),o=r(i);n["default"]=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o["default"])(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},{"babel-runtime/core-js/object/define-property":18}],28:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var i=e("babel-runtime/core-js/object/get-prototype-of"),o=r(i),s=e("babel-runtime/core-js/object/get-own-property-descriptor"),u=r(s);n["default"]=function a(e,t,n){null===e&&(e=Function.prototype);var r=(0,u["default"])(e,t);if(void 0===r){var i=(0,o["default"])(e);return null===i?void 0:a(i,t,n)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(n)}},{"babel-runtime/core-js/object/get-own-property-descriptor":19,"babel-runtime/core-js/object/get-prototype-of":20}],29:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var i=e("babel-runtime/core-js/object/set-prototype-of"),o=r(i),s=e("babel-runtime/core-js/object/create"),u=r(s),a=e("babel-runtime/helpers/typeof"),c=r(a);n["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,c["default"])(t)));e.prototype=(0,u["default"])(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o["default"]?(0,o["default"])(e,t):e.__proto__=t)}},{"babel-runtime/core-js/object/create":17,"babel-runtime/core-js/object/set-prototype-of":21,"babel-runtime/helpers/typeof":31}],30:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var i=e("babel-runtime/helpers/typeof"),o=r(i);n["default"]=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,o["default"])(t))&&"function"!=typeof t?e:t}},{"babel-runtime/helpers/typeof":31}],31:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var i=e("babel-runtime/core-js/symbol/iterator"),o=r(i),s=e("babel-runtime/core-js/symbol"),u=r(s),a="function"==typeof u["default"]&&"symbol"==typeof o["default"]?function(e){return typeof e}:function(e){return e&&"function"==typeof u["default"]&&e.constructor===u["default"]?"symbol":typeof e};n["default"]="function"==typeof u["default"]&&"symbol"===a(o["default"])?function(e){return"undefined"==typeof e?"undefined":a(e)}:function(e){return e&&"function"==typeof u["default"]&&e.constructor===u["default"]?"symbol":"undefined"==typeof e?"undefined":a(e)}},{"babel-runtime/core-js/symbol":23,"babel-runtime/core-js/symbol/iterator":24}],32:[function(e,t,n){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":114,"../modules/es6.string.iterator":123,"../modules/web.dom.iterable":127}],33:[function(e,t,n){e("../../modules/es6.object.create");var r=e("../../modules/_core").Object;t.exports=function(e,t){return r.create(e,t)}},{"../../modules/_core":56,"../../modules/es6.object.create":116}],34:[function(e,t,n){e("../../modules/es6.object.define-property");var r=e("../../modules/_core").Object;t.exports=function(e,t,n){return r.defineProperty(e,t,n)}},{"../../modules/_core":56,"../../modules/es6.object.define-property":117}],35:[function(e,t,n){e("../../modules/es6.object.get-own-property-descriptor");var r=e("../../modules/_core").Object;t.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)}},{"../../modules/_core":56,"../../modules/es6.object.get-own-property-descriptor":118}],36:[function(e,t,n){e("../../modules/es6.object.get-prototype-of"),t.exports=e("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":56,"../../modules/es6.object.get-prototype-of":119}],37:[function(e,t,n){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":56,"../../modules/es6.object.set-prototype-of":120}],38:[function(e,t,n){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.set"),e("../modules/es7.set.to-json"),t.exports=e("../modules/_core").Set},{"../modules/_core":56,"../modules/es6.object.to-string":121,"../modules/es6.set":122,"../modules/es6.string.iterator":123,"../modules/es7.set.to-json":126,"../modules/web.dom.iterable":127}],39:[function(e,t,n){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":56,"../../modules/es6.object.to-string":121,"../../modules/es6.symbol":124}],40:[function(e,t,n){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks")("iterator")},{"../../modules/_wks":112,"../../modules/es6.string.iterator":123,"../../modules/web.dom.iterable":127}],41:[function(e,t,n){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-map"),t.exports=e("../modules/_core").WeakMap},{"../modules/_core":56,"../modules/es6.object.to-string":121,"../modules/es6.weak-map":125,"../modules/web.dom.iterable":127}],42:[function(e,t,n){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],43:[function(e,t,n){t.exports=function(){}},{}],44:[function(e,t,n){t.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},{}],45:[function(e,t,n){var r=e("./_is-object");t.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":74}],46:[function(e,t,n){var r=e("./_for-of");t.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},{"./_for-of":65}],47:[function(e,t,n){var r=e("./_to-iobject"),i=e("./_to-length"),o=e("./_to-index");t.exports=function(e){return function(t,n,s){var u,a=r(t),c=i(a.length),l=o(s,c);if(e&&n!=n){for(;c>l;)if(u=a[l++],u!=u)return!0}else for(;c>l;l++)if((e||l in a)&&a[l]===n)return e||l;return!e&&-1}}},{"./_to-index":105,"./_to-iobject":107,"./_to-length":108}],48:[function(e,t,n){var r=e("./_ctx"),i=e("./_iobject"),o=e("./_to-object"),s=e("./_to-length"),u=e("./_array-species-create");t.exports=function(e,t){var n=1==e,a=2==e,c=3==e,l=4==e,_=6==e,f=5==e||_,h=t||u;return function(t,u,d){for(var p,b,m=o(t),y=i(m),v=r(u,d,3),g=s(y.length),j=0,k=n?h(t,g):a?h(t,0):void 0;g>j;j++)if((f||j in y)&&(p=y[j],b=v(p,j,m),e))if(n)k[j]=b;else if(b)switch(e){case 3:return!0;case 5:return p;case 6:return j;case 2:k.push(p)}else if(l)return!1;return _?-1:c||l?l:k}}},{"./_array-species-create":49,"./_ctx":57,"./_iobject":71,"./_to-length":108,"./_to-object":109}],49:[function(e,t,n){var r=e("./_is-object"),i=e("./_is-array"),o=e("./_wks")("species");t.exports=function(e,t){var n;return i(e)&&(n=e.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&(n=n[o],null===n&&(n=void 0))),new(void 0===n?Array:n)(t)}},{"./_is-array":73,"./_is-object":74,"./_wks":112}],50:[function(e,t,n){var r=e("./_cof"),i=e("./_wks")("toStringTag"),o="Arguments"==r(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(n){}};t.exports=function(e){var t,n,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=s(t=Object(e),i))?n:o?r(t):"Object"==(u=r(t))&&"function"==typeof t.callee?"Arguments":u}},{"./_cof":51,"./_wks":112}],51:[function(e,t,n){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],52:[function(e,t,n){"use strict";var r=e("./_object-dp").f,i=e("./_object-create"),o=(e("./_hide"),e("./_redefine-all")),s=e("./_ctx"),u=e("./_an-instance"),a=e("./_defined"),c=e("./_for-of"),l=e("./_iter-define"),_=e("./_iter-step"),f=e("./_set-species"),h=e("./_descriptors"),d=e("./_meta").fastKey,p=h?"_s":"size",b=function(e,t){var n,r=d(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};t.exports={getConstructor:function(e,t,n,l){var _=e(function(e,r){u(e,_,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[p]=0,void 0!=r&&c(r,n,e[l],e)});return o(_.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[p]=0},"delete":function(e){var t=this,n=b(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[p]--}return!!n},forEach:function(e){u(this,_,"forEach");for(var t,n=s(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!b(this,e)}}),h&&r(_.prototype,"size",{get:function(){return a(this[p])}}),_},def:function(e,t,n){var r,i,o=b(e,t);return o?o.v=n:(e._l=o={i:i=d(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[p]++,"F"!==i&&(e._i[i]=o)),e},getEntry:b,setStrong:function(e,t,n){l(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?_(0,n.k):"values"==t?_(0,n.v):_(0,[n.k,n.v]):(e._t=void 0,_(1))},n?"entries":"values",!n,!0),f(t)}}},{"./_an-instance":44,"./_ctx":57,"./_defined":58,"./_descriptors":59,"./_for-of":65,"./_hide":68,"./_iter-define":77,"./_iter-step":78,"./_meta":82,"./_object-create":84,"./_object-dp":85,"./_redefine-all":97,"./_set-species":100}],53:[function(e,t,n){var r=e("./_classof"),i=e("./_array-from-iterable");t.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},{"./_array-from-iterable":46,"./_classof":50}],54:[function(e,t,n){"use strict";var r=e("./_redefine-all"),i=e("./_meta").getWeak,o=e("./_an-object"),s=e("./_is-object"),u=e("./_an-instance"),a=e("./_for-of"),c=e("./_array-methods"),l=e("./_has"),_=c(5),f=c(6),h=0,d=function(e){
return e._l||(e._l=new p)},p=function(){this.a=[]},b=function(e,t){return _(e.a,function(e){return e[0]===t})};p.prototype={get:function(e){var t=b(this,e);return t?t[1]:void 0},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.a.push([e,t])},"delete":function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,n,o){var c=e(function(e,r){u(e,c,t,"_i"),e._i=h++,e._l=void 0,void 0!=r&&a(r,n,e[o],e)});return r(c.prototype,{"delete":function(e){if(!s(e))return!1;var t=i(e);return t===!0?d(this)["delete"](e):t&&l(t,this._i)&&delete t[this._i]},has:function(e){if(!s(e))return!1;var t=i(e);return t===!0?d(this).has(e):t&&l(t,this._i)}}),c},def:function(e,t,n){var r=i(o(t),!0);return r===!0?d(e).set(t,n):r[e._i]=n,e},ufstore:d}},{"./_an-instance":44,"./_an-object":45,"./_array-methods":48,"./_for-of":65,"./_has":67,"./_is-object":74,"./_meta":82,"./_redefine-all":97}],55:[function(e,t,n){"use strict";var r=e("./_global"),i=e("./_export"),o=e("./_meta"),s=e("./_fails"),u=e("./_hide"),a=e("./_redefine-all"),c=e("./_for-of"),l=e("./_an-instance"),_=e("./_is-object"),f=e("./_set-to-string-tag"),h=e("./_object-dp").f,d=e("./_array-methods")(0),p=e("./_descriptors");t.exports=function(e,t,n,b,m,y){var v=r[e],g=v,j=m?"set":"add",k=g&&g.prototype,x={};return p&&"function"==typeof g&&(y||k.forEach&&!s(function(){(new g).entries().next()}))?(g=t(function(t,n){l(t,g,e,"_c"),t._c=new v,void 0!=n&&c(n,m,t[j],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in k&&(!y||"clear"!=e)&&u(g.prototype,e,function(n,r){if(l(this,g,e),!t&&y&&!_(n))return"get"==e?void 0:!1;var i=this._c[e](0===n?0:n,r);return t?this:i})}),"size"in k&&h(g.prototype,"size",{get:function(){return this._c.size}})):(g=b.getConstructor(t,e,m,j),a(g.prototype,n),o.NEED=!0),f(g,e),x[e]=g,i(i.G+i.W+i.F,x),y||b.setStrong(g,e,m),g}},{"./_an-instance":44,"./_array-methods":48,"./_descriptors":59,"./_export":63,"./_fails":64,"./_for-of":65,"./_global":66,"./_hide":68,"./_is-object":74,"./_meta":82,"./_object-dp":85,"./_redefine-all":97,"./_set-to-string-tag":101}],56:[function(e,t,n){var r=t.exports={version:"2.1.5"};"number"==typeof __e&&(__e=r)},{}],57:[function(e,t,n){var r=e("./_a-function");t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":42}],58:[function(e,t,n){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],59:[function(e,t,n){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":64}],60:[function(e,t,n){var r=e("./_is-object"),i=e("./_global").document,o=r(i)&&r(i.createElement);t.exports=function(e){return o?i.createElement(e):{}}},{"./_global":66,"./_is-object":74}],61:[function(e,t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],62:[function(e,t,n){var r=e("./_object-keys"),i=e("./_object-gops"),o=e("./_object-pie");t.exports=function(e){var t=r(e),n=i.f;if(n)for(var s,u=n(e),a=o.f,c=0;u.length>c;)a.call(e,s=u[c++])&&t.push(s);return t}},{"./_object-gops":90,"./_object-keys":93,"./_object-pie":94}],63:[function(e,t,n){var r=e("./_global"),i=e("./_core"),o=e("./_ctx"),s=e("./_hide"),u="prototype",a=function(e,t,n){var c,l,_,f=e&a.F,h=e&a.G,d=e&a.S,p=e&a.P,b=e&a.B,m=e&a.W,y=h?i:i[t]||(i[t]={}),v=y[u],g=h?r:d?r[t]:(r[t]||{})[u];h&&(n=t);for(c in n)l=!f&&g&&void 0!==g[c],l&&c in y||(_=l?g[c]:n[c],y[c]=h&&"function"!=typeof g[c]?n[c]:b&&l?o(_,r):m&&g[c]==_?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[u]=e[u],t}(_):p&&"function"==typeof _?o(Function.call,_):_,p&&((y.virtual||(y.virtual={}))[c]=_,e&a.R&&v&&!v[c]&&s(v,c,_)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},{"./_core":56,"./_ctx":57,"./_global":66,"./_hide":68}],64:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(t){return!0}}},{}],65:[function(e,t,n){var r=e("./_ctx"),i=e("./_iter-call"),o=e("./_is-array-iter"),s=e("./_an-object"),u=e("./_to-length"),a=e("./core.get-iterator-method");t.exports=function(e,t,n,c,l){var _,f,h,d=l?function(){return e}:a(e),p=r(n,c,t?2:1),b=0;if("function"!=typeof d)throw TypeError(e+" is not iterable!");if(o(d))for(_=u(e.length);_>b;b++)t?p(s(f=e[b])[0],f[1]):p(e[b]);else for(h=d.call(e);!(f=h.next()).done;)i(h,p,f.value,t)}},{"./_an-object":45,"./_ctx":57,"./_is-array-iter":72,"./_iter-call":75,"./_to-length":108,"./core.get-iterator-method":113}],66:[function(e,t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],67:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],68:[function(e,t,n){var r=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},{"./_descriptors":59,"./_object-dp":85,"./_property-desc":96}],69:[function(e,t,n){t.exports=e("./_global").document&&document.documentElement},{"./_global":66}],70:[function(e,t,n){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":59,"./_dom-create":60,"./_fails":64}],71:[function(e,t,n){var r=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},{"./_cof":51}],72:[function(e,t,n){var r=e("./_iterators"),i=e("./_wks")("iterator"),o=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},{"./_iterators":79,"./_wks":112}],73:[function(e,t,n){var r=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==r(e)}},{"./_cof":51}],74:[function(e,t,n){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],75:[function(e,t,n){var r=e("./_an-object");t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(o){var s=e["return"];throw void 0!==s&&r(s.call(e)),o}}},{"./_an-object":45}],76:[function(e,t,n){"use strict";var r=e("./_object-create"),i=e("./_property-desc"),o=e("./_set-to-string-tag"),s={};e("./_hide")(s,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,n){e.prototype=r(s,{next:i(1,n)}),o(e,t+" Iterator")}},{"./_hide":68,"./_object-create":84,"./_property-desc":96,"./_set-to-string-tag":101,"./_wks":112}],77:[function(e,t,n){"use strict";var r=e("./_library"),i=e("./_export"),o=e("./_redefine"),s=e("./_hide"),u=e("./_has"),a=e("./_iterators"),c=e("./_iter-create"),l=e("./_set-to-string-tag"),_=e("./_object-gpo"),f=e("./_wks")("iterator"),h=!([].keys&&"next"in[].keys()),d="@@iterator",p="keys",b="values",m=function(){return this};t.exports=function(e,t,n,y,v,g,j){c(n,t,y);var k,x,T,P=function(e){if(!h&&e in E)return E[e];switch(e){case p:return function(){return new n(this,e)};case b:return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",C=v==b,S=!1,E=e.prototype,A=E[f]||E[d]||v&&E[v],O=A||P(v),M=v?C?P("entries"):O:void 0,R="Array"==t?E.entries||A:A;if(R&&(T=_(R.call(new e)),T!==Object.prototype&&(l(T,w,!0),r||u(T,f)||s(T,f,m))),C&&A&&A.name!==b&&(S=!0,O=function(){return A.call(this)}),r&&!j||!h&&!S&&E[f]||s(E,f,O),a[t]=O,a[w]=m,v)if(k={values:C?O:P(b),keys:g?O:P(p),entries:M},j)for(x in k)x in E||o(E,x,k[x]);else i(i.P+i.F*(h||S),t,k);return k}},{"./_export":63,"./_has":67,"./_hide":68,"./_iter-create":76,"./_iterators":79,"./_library":81,"./_object-gpo":91,"./_redefine":98,"./_set-to-string-tag":101,"./_wks":112}],78:[function(e,t,n){t.exports=function(e,t){return{value:t,done:!!e}}},{}],79:[function(e,t,n){t.exports={}},{}],80:[function(e,t,n){var r=e("./_object-keys"),i=e("./_to-iobject");t.exports=function(e,t){for(var n,o=i(e),s=r(o),u=s.length,a=0;u>a;)if(o[n=s[a++]]===t)return n}},{"./_object-keys":93,"./_to-iobject":107}],81:[function(e,t,n){t.exports=!0},{}],82:[function(e,t,n){var r=e("./_uid")("meta"),i=e("./_is-object"),o=e("./_has"),s=e("./_object-dp").f,u=0,a=Object.isExtensible||function(){return!0},c=!e("./_fails")(function(){return a(Object.preventExtensions({}))}),l=function(e){s(e,r,{value:{i:"O"+ ++u,w:{}}})},_=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!a(e))return"F";if(!t)return"E";l(e)}return e[r].i},f=function(e,t){if(!o(e,r)){if(!a(e))return!0;if(!t)return!1;l(e)}return e[r].w},h=function(e){return c&&d.NEED&&a(e)&&!o(e,r)&&l(e),e},d=t.exports={KEY:r,NEED:!1,fastKey:_,getWeak:f,onFreeze:h}},{"./_fails":64,"./_has":67,"./_is-object":74,"./_object-dp":85,"./_uid":111}],83:[function(e,t,n){"use strict";var r=e("./_object-keys"),i=e("./_object-gops"),o=e("./_object-pie"),s=e("./_to-object"),u=e("./_iobject"),a=Object.assign;t.exports=!a||e("./_fails")(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=a({},e)[n]||Object.keys(a({},t)).join("")!=r})?function(e,t){for(var n=s(e),a=arguments.length,c=1,l=i.f,_=o.f;a>c;)for(var f,h=u(arguments[c++]),d=l?r(h).concat(l(h)):r(h),p=d.length,b=0;p>b;)_.call(h,f=d[b++])&&(n[f]=h[f]);return n}:a},{"./_fails":64,"./_iobject":71,"./_object-gops":90,"./_object-keys":93,"./_object-pie":94,"./_to-object":109}],84:[function(e,t,n){var r=e("./_an-object"),i=e("./_object-dps"),o=e("./_enum-bug-keys"),s=e("./_shared-key")("IE_PROTO"),u=function(){},a="prototype",c=function(){var t,n=e("./_dom-create")("iframe"),r=o.length,i=">";for(n.style.display="none",e("./_html").appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object</script"+i),t.close(),c=t.F;r--;)delete c[a][o[r]];return c()};t.exports=Object.create||function(e,t){var n;return null!==e?(u[a]=r(e),n=new u,u[a]=null,n[s]=e):n=c(),void 0===t?n:i(n,t)}},{"./_an-object":45,"./_dom-create":60,"./_enum-bug-keys":61,"./_html":69,"./_object-dps":86,"./_shared-key":102}],85:[function(e,t,n){var r=e("./_an-object"),i=e("./_ie8-dom-define"),o=e("./_to-primitive"),s=Object.defineProperty;n.f=e("./_descriptors")?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return s(e,t,n)}catch(u){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},{"./_an-object":45,"./_descriptors":59,"./_ie8-dom-define":70,"./_to-primitive":110}],86:[function(e,t,n){var r=e("./_object-dp"),i=e("./_an-object"),o=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){i(e);for(var n,s=o(t),u=s.length,a=0;u>a;)r.f(e,n=s[a++],t[n]);return e}},{"./_an-object":45,"./_descriptors":59,"./_object-dp":85,"./_object-keys":93}],87:[function(e,t,n){var r=e("./_object-pie"),i=e("./_property-desc"),o=e("./_to-iobject"),s=e("./_to-primitive"),u=e("./_has"),a=e("./_ie8-dom-define"),c=Object.getOwnPropertyDescriptor;n.f=e("./_descriptors")?c:function(e,t){if(e=o(e),t=s(t,!0),a)try{return c(e,t)}catch(n){}return u(e,t)?i(!r.f.call(e,t),e[t]):void 0}},{"./_descriptors":59,"./_has":67,"./_ie8-dom-define":70,"./_object-pie":94,"./_property-desc":96,"./_to-iobject":107,"./_to-primitive":110}],88:[function(e,t,n){var r=e("./_to-iobject"),i=e("./_object-gopn").f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(e){try{return i.f(e)}catch(t){return s.slice()}};t.exports.f=function(e){return s&&"[object Window]"==o.call(e)?u(e):i(r(e))}},{"./_object-gopn":89,"./_to-iobject":107}],89:[function(e,t,n){var r=e("./_object-keys-internal"),i=e("./_enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},{"./_enum-bug-keys":61,"./_object-keys-internal":92}],90:[function(e,t,n){n.f=Object.getOwnPropertySymbols},{}],91:[function(e,t,n){var r=e("./_has"),i=e("./_to-object"),o=e("./_shared-key")("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},{"./_has":67,"./_shared-key":102,"./_to-object":109}],92:[function(e,t,n){var r=e("./_has"),i=e("./_to-iobject"),o=e("./_array-includes")(!1),s=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var n,u=i(e),a=0,c=[];for(n in u)n!=s&&r(u,n)&&c.push(n);for(;t.length>a;)r(u,n=t[a++])&&(~o(c,n)||c.push(n));return c}},{"./_array-includes":47,"./_has":67,"./_shared-key":102,"./_to-iobject":107}],93:[function(e,t,n){var r=e("./_object-keys-internal"),i=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return r(e,i)}},{"./_enum-bug-keys":61,"./_object-keys-internal":92}],94:[function(e,t,n){n.f={}.propertyIsEnumerable},{}],95:[function(e,t,n){var r=e("./_export"),i=e("./_core"),o=e("./_fails");t.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},{"./_core":56,"./_export":63,"./_fails":64}],96:[function(e,t,n){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],97:[function(e,t,n){var r=e("./_hide");t.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},{"./_hide":68}],98:[function(e,t,n){t.exports=e("./_hide")},{"./_hide":68}],99:[function(e,t,n){var r=e("./_is-object"),i=e("./_an-object"),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{r=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2),r(t,[]),n=!(t instanceof Array)}catch(i){n=!0}return function(e,t){return o(e,t),n?e.__proto__=t:r(e,t),e}}({},!1):void 0),check:o}},{"./_an-object":45,"./_ctx":57,"./_is-object":74,"./_object-gopd":87}],100:[function(e,t,n){"use strict";var r=e("./_global"),i=e("./_core"),o=e("./_object-dp"),s=e("./_descriptors"),u=e("./_wks")("species");t.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];s&&t&&!t[u]&&o.f(t,u,{configurable:!0,get:function(){return this}})}},{"./_core":56,"./_descriptors":59,"./_global":66,"./_object-dp":85,"./_wks":112}],101:[function(e,t,n){var r=e("./_object-dp").f,i=e("./_has"),o=e("./_wks")("toStringTag");t.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},{"./_has":67,"./_object-dp":85,"./_wks":112}],102:[function(e,t,n){var r=e("./_shared")("keys"),i=e("./_uid");t.exports=function(e){return r[e]||(r[e]=i(e))}},{"./_shared":103,"./_uid":111}],103:[function(e,t,n){var r=e("./_global"),i="__core-js_shared__",o=r[i]||(r[i]={});t.exports=function(e){return o[e]||(o[e]={})}},{"./_global":66}],104:[function(e,t,n){var r=e("./_to-integer"),i=e("./_defined");t.exports=function(e){return function(t,n){var o,s,u=String(i(t)),a=r(n),c=u.length;return 0>a||a>=c?e?"":void 0:(o=u.charCodeAt(a),55296>o||o>56319||a+1===c||(s=u.charCodeAt(a+1))<56320||s>57343?e?u.charAt(a):o:e?u.slice(a,a+2):(o-55296<<10)+(s-56320)+65536)}}},{"./_defined":58,"./_to-integer":106}],105:[function(e,t,n){var r=e("./_to-integer"),i=Math.max,o=Math.min;t.exports=function(e,t){return e=r(e),0>e?i(e+t,0):o(e,t)}},{"./_to-integer":106}],106:[function(e,t,n){var r=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},{}],107:[function(e,t,n){var r=e("./_iobject"),i=e("./_defined");t.exports=function(e){return r(i(e))}},{"./_defined":58,"./_iobject":71}],108:[function(e,t,n){var r=e("./_to-integer"),i=Math.min;t.exports=function(e){return e>0?i(r(e),9007199254740991):0}},{"./_to-integer":106}],109:[function(e,t,n){var r=e("./_defined");t.exports=function(e){return Object(r(e))}},{"./_defined":58}],110:[function(e,t,n){var r=e("./_is-object");t.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":74}],111:[function(e,t,n){var r=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},{}],112:[function(e,t,n){var r=e("./_shared")("wks"),i=e("./_uid"),o=e("./_global").Symbol,s="function"==typeof o